auth0-deploy-cli 7.7.1 → 7.10.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/CHANGELOG.md +40 -1
- package/README.md +2 -2
- package/lib/args.d.ts +29 -0
- package/lib/commands/export.d.ts +2 -0
- package/lib/commands/import.d.ts +2 -0
- package/lib/commands/index.d.ts +9 -0
- package/lib/configFactory.d.ts +7 -0
- package/lib/context/defaults.d.ts +1 -0
- package/lib/context/directory/handlers/actions.d.ts +6 -0
- package/lib/context/directory/handlers/attackProtection.d.ts +10 -0
- package/lib/context/directory/handlers/branding.d.ts +6 -0
- package/lib/context/directory/handlers/branding.js +55 -21
- package/lib/context/directory/handlers/clientGrants.d.ts +6 -0
- package/lib/context/directory/handlers/clients.d.ts +6 -0
- package/lib/context/directory/handlers/connections.d.ts +6 -0
- package/lib/context/directory/handlers/databases.d.ts +6 -0
- package/lib/context/directory/handlers/emailProvider.d.ts +6 -0
- package/lib/context/directory/handlers/emailTemplates.d.ts +6 -0
- package/lib/context/directory/handlers/guardianFactorProviders.d.ts +6 -0
- package/lib/context/directory/handlers/guardianFactorTemplates.d.ts +6 -0
- package/lib/context/directory/handlers/guardianFactors.d.ts +6 -0
- package/lib/context/directory/handlers/guardianPhoneFactorMessageTypes.d.ts +6 -0
- package/lib/context/directory/handlers/guardianPhoneFactorSelectedProvider.d.ts +6 -0
- package/lib/context/directory/handlers/guardianPolicies.d.ts +6 -0
- package/lib/context/directory/handlers/hooks.d.ts +6 -0
- package/lib/context/directory/handlers/index.d.ts +12 -0
- package/lib/context/directory/handlers/index.js +2 -0
- package/lib/context/directory/handlers/logStreams.d.ts +7 -0
- package/lib/context/directory/handlers/logStreams.js +49 -0
- package/lib/context/directory/handlers/migrations.d.ts +6 -0
- package/lib/context/directory/handlers/organizations.d.ts +6 -0
- package/lib/context/directory/handlers/pages.d.ts +6 -0
- package/lib/context/directory/handlers/resourceServers.d.ts +6 -0
- package/lib/context/directory/handlers/roles.d.ts +6 -0
- package/lib/context/directory/handlers/rules.d.ts +6 -0
- package/lib/context/directory/handlers/rulesConfigs.d.ts +6 -0
- package/lib/context/directory/handlers/tenant.d.ts +10 -0
- package/lib/context/directory/handlers/triggers.d.ts +6 -0
- package/lib/context/directory/index.d.ts +17 -0
- package/lib/context/index.d.ts +4 -0
- package/lib/context/yaml/handlers/actions.d.ts +6 -0
- package/lib/context/yaml/handlers/attackProtection.d.ts +6 -0
- package/lib/context/yaml/handlers/branding.d.ts +13 -0
- package/lib/context/yaml/handlers/branding.js +23 -6
- package/lib/context/yaml/handlers/clientGrants.d.ts +6 -0
- package/lib/context/yaml/handlers/clients.d.ts +6 -0
- package/lib/context/yaml/handlers/connections.d.ts +6 -0
- package/lib/context/yaml/handlers/databases.d.ts +6 -0
- package/lib/context/yaml/handlers/emailProvider.d.ts +6 -0
- package/lib/context/yaml/handlers/emailTemplates.d.ts +6 -0
- package/lib/context/yaml/handlers/guardianFactorProviders.d.ts +6 -0
- package/lib/context/yaml/handlers/guardianFactorTemplates.d.ts +6 -0
- package/lib/context/yaml/handlers/guardianFactors.d.ts +6 -0
- package/lib/context/yaml/handlers/guardianPhoneFactorMessageTypes.d.ts +6 -0
- package/lib/context/yaml/handlers/guardianPhoneFactorSelectedProvider.d.ts +6 -0
- package/lib/context/yaml/handlers/guardianPolicies.d.ts +6 -0
- package/lib/context/yaml/handlers/hooks.d.ts +6 -0
- package/lib/context/yaml/handlers/index.d.ts +12 -0
- package/lib/context/yaml/handlers/index.js +2 -0
- package/lib/context/yaml/handlers/logStreams.d.ts +7 -0
- package/lib/context/yaml/handlers/logStreams.js +23 -0
- package/lib/context/yaml/handlers/migrations.d.ts +6 -0
- package/lib/context/yaml/handlers/organizations.d.ts +6 -0
- package/lib/context/yaml/handlers/pages.d.ts +6 -0
- package/lib/context/yaml/handlers/resourceServers.d.ts +6 -0
- package/lib/context/yaml/handlers/roles.d.ts +6 -0
- package/lib/context/yaml/handlers/rules.d.ts +6 -0
- package/lib/context/yaml/handlers/rulesConfigs.d.ts +6 -0
- package/lib/context/yaml/handlers/tenant.d.ts +6 -0
- package/lib/context/yaml/handlers/triggers.d.ts +6 -0
- package/lib/context/yaml/index.d.ts +13 -0
- package/lib/index.d.ts +89 -0
- package/lib/index.js +5 -2
- package/lib/logger.d.ts +2 -0
- package/lib/logger.js +7 -17
- package/lib/readonly.d.ts +2 -0
- package/lib/sessionDurationsToMinutes.d.ts +7 -0
- package/lib/tools/auth0/client.d.ts +2 -0
- package/lib/tools/auth0/handlers/actions.d.ts +95 -0
- package/lib/tools/auth0/handlers/actions.js +1 -1
- package/lib/tools/auth0/handlers/attackProtection.d.ts +28 -0
- package/lib/tools/auth0/handlers/branding.d.ts +27 -0
- package/lib/tools/auth0/handlers/clientGrants.d.ts +32 -0
- package/lib/tools/auth0/handlers/clients.d.ts +23 -0
- package/lib/tools/auth0/handlers/connections.d.ts +54 -0
- package/lib/tools/auth0/handlers/databases.d.ts +36 -0
- package/lib/tools/auth0/handlers/default.d.ts +54 -0
- package/lib/tools/auth0/handlers/default.js +23 -8
- package/lib/tools/auth0/handlers/emailProvider.d.ts +11 -0
- package/lib/tools/auth0/handlers/emailTemplates.d.ts +26 -0
- package/lib/tools/auth0/handlers/guardianFactorProviders.d.ts +25 -0
- package/lib/tools/auth0/handlers/guardianFactorTemplates.d.ts +21 -0
- package/lib/tools/auth0/handlers/guardianFactors.d.ts +21 -0
- package/lib/tools/auth0/handlers/guardianPhoneFactorMessageTypes.d.ts +21 -0
- package/lib/tools/auth0/handlers/guardianPhoneFactorSelectedProvider.d.ts +18 -0
- package/lib/tools/auth0/handlers/guardianPolicies.d.ts +23 -0
- package/lib/tools/auth0/handlers/hooks.d.ts +58 -0
- package/lib/tools/auth0/handlers/index.d.ts +134 -0
- package/lib/tools/auth0/handlers/index.js +2 -0
- package/lib/tools/auth0/handlers/logStreams.d.ts +40 -0
- package/lib/tools/auth0/handlers/logStreams.js +77 -0
- package/lib/tools/auth0/handlers/migrations.d.ts +15 -0
- package/lib/tools/auth0/handlers/migrations.js +1 -1
- package/lib/tools/auth0/handlers/organizations.d.ts +51 -0
- package/lib/tools/auth0/handlers/organizations.js +2 -2
- package/lib/tools/auth0/handlers/pages.d.ts +42 -0
- package/lib/tools/auth0/handlers/prompts.d.ts +11 -0
- package/lib/tools/auth0/handlers/resourceServers.d.ts +51 -0
- package/lib/tools/auth0/handlers/resourceServers.js +1 -1
- package/lib/tools/auth0/handlers/roles.d.ts +48 -0
- package/lib/tools/auth0/handlers/roles.js +2 -2
- package/lib/tools/auth0/handlers/rules.d.ts +55 -0
- package/lib/tools/auth0/handlers/rules.js +2 -2
- package/lib/tools/auth0/handlers/rulesConfigs.d.ts +25 -0
- package/lib/tools/auth0/handlers/tenant.d.ts +11 -0
- package/lib/tools/auth0/handlers/triggers.d.ts +35 -0
- package/lib/tools/auth0/handlers/triggers.js +1 -1
- package/lib/tools/auth0/index.d.ts +15 -0
- package/lib/tools/auth0/schema.d.ts +15 -0
- package/lib/tools/calculateChanges.d.ts +26 -0
- package/lib/tools/calculateChanges.js +3 -3
- package/lib/tools/constants.d.ts +72 -0
- package/lib/tools/constants.js +4 -1
- package/lib/tools/deploy.d.ts +3 -0
- package/lib/tools/deploy.js +2 -2
- package/lib/tools/index.d.ts +83 -0
- package/lib/tools/utils.d.ts +18 -0
- package/lib/tools/utils.js +36 -3
- package/lib/tools/validationError.d.ts +5 -0
- package/lib/types.d.ts +257 -0
- package/lib/utils.d.ts +67 -0
- package/package.json +10 -10
- package/tsconfig.json +2 -1
- package/lib/tools/logger.js +0 -21
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import DefaultHandler from './default';
|
|
2
|
+
import { Asset, Assets } from '../../../types';
|
|
3
|
+
import DefaultAPIHandler from './default';
|
|
4
|
+
export declare const schema: {
|
|
5
|
+
type: string;
|
|
6
|
+
items: {
|
|
7
|
+
type: string;
|
|
8
|
+
properties: {
|
|
9
|
+
client_id: {
|
|
10
|
+
type: string;
|
|
11
|
+
};
|
|
12
|
+
audience: {
|
|
13
|
+
type: string;
|
|
14
|
+
};
|
|
15
|
+
scope: {
|
|
16
|
+
type: string;
|
|
17
|
+
items: {
|
|
18
|
+
type: string;
|
|
19
|
+
};
|
|
20
|
+
uniqueItems: boolean;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
required: string[];
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
export default class ClientGrantsHandler extends DefaultHandler {
|
|
27
|
+
existing: Asset[] | null;
|
|
28
|
+
constructor(config: DefaultAPIHandler);
|
|
29
|
+
objString(item: any): string;
|
|
30
|
+
getType(): Promise<Asset>;
|
|
31
|
+
processChanges(assets: Assets): Promise<void>;
|
|
32
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Asset, Assets } from '../../../types';
|
|
2
|
+
import DefaultAPIHandler from './default';
|
|
3
|
+
export declare const schema: {
|
|
4
|
+
type: string;
|
|
5
|
+
items: {
|
|
6
|
+
type: string;
|
|
7
|
+
properties: {
|
|
8
|
+
name: {
|
|
9
|
+
type: string;
|
|
10
|
+
minLength: number;
|
|
11
|
+
pattern: string;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
required: string[];
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
export default class ClientHandler extends DefaultAPIHandler {
|
|
18
|
+
existing: Asset[] | null;
|
|
19
|
+
constructor(config: DefaultAPIHandler);
|
|
20
|
+
objString(item: any): string;
|
|
21
|
+
processChanges(assets: Assets): Promise<void>;
|
|
22
|
+
getType(): Promise<Asset[]>;
|
|
23
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import DefaultAPIHandler from './default';
|
|
2
|
+
import { CalculatedChanges, Asset, Assets } from '../../../types';
|
|
3
|
+
import { ConfigFunction } from '../../../configFactory';
|
|
4
|
+
export declare const schema: {
|
|
5
|
+
type: string;
|
|
6
|
+
items: {
|
|
7
|
+
type: string;
|
|
8
|
+
properties: {
|
|
9
|
+
name: {
|
|
10
|
+
type: string;
|
|
11
|
+
};
|
|
12
|
+
strategy: {
|
|
13
|
+
type: string;
|
|
14
|
+
};
|
|
15
|
+
options: {
|
|
16
|
+
type: string;
|
|
17
|
+
};
|
|
18
|
+
enabled_clients: {
|
|
19
|
+
type: string;
|
|
20
|
+
items: {
|
|
21
|
+
type: string;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
realms: {
|
|
25
|
+
type: string;
|
|
26
|
+
items: {
|
|
27
|
+
type: string;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
metadata: {
|
|
31
|
+
type: string;
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
required: string[];
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
export declare const addExcludedConnectionPropertiesToChanges: ({ proposedChanges, existingConnections, config, }: {
|
|
38
|
+
proposedChanges: CalculatedChanges;
|
|
39
|
+
existingConnections: Asset[];
|
|
40
|
+
config: ConfigFunction;
|
|
41
|
+
}) => CalculatedChanges;
|
|
42
|
+
export default class ConnectionsHandler extends DefaultAPIHandler {
|
|
43
|
+
existing: Asset[] | null;
|
|
44
|
+
constructor(config: DefaultAPIHandler);
|
|
45
|
+
objString(connection: any): string;
|
|
46
|
+
getFormattedOptions(connection: any, clients: any): {
|
|
47
|
+
options: any;
|
|
48
|
+
} | {
|
|
49
|
+
options?: undefined;
|
|
50
|
+
};
|
|
51
|
+
getType(): Promise<Asset[] | null>;
|
|
52
|
+
calcChanges(assets: Assets): Promise<CalculatedChanges>;
|
|
53
|
+
processChanges(assets: Assets): Promise<void>;
|
|
54
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import DefaultAPIHandler from './default';
|
|
2
|
+
import { CalculatedChanges, Assets } from '../../../types';
|
|
3
|
+
export declare const schema: {
|
|
4
|
+
type: string;
|
|
5
|
+
items: {
|
|
6
|
+
type: string;
|
|
7
|
+
properties: {
|
|
8
|
+
strategy: {
|
|
9
|
+
type: string;
|
|
10
|
+
enum: string[];
|
|
11
|
+
default: string;
|
|
12
|
+
};
|
|
13
|
+
name: {
|
|
14
|
+
type: string;
|
|
15
|
+
};
|
|
16
|
+
options: {
|
|
17
|
+
type: string;
|
|
18
|
+
properties: {
|
|
19
|
+
customScripts: {
|
|
20
|
+
type: string;
|
|
21
|
+
properties: {};
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
required: string[];
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
export default class DatabaseHandler extends DefaultAPIHandler {
|
|
30
|
+
constructor(config: DefaultAPIHandler);
|
|
31
|
+
objString(db: any): string;
|
|
32
|
+
getClientFN(fn: 'create' | 'delete' | 'getAll' | 'update'): Function;
|
|
33
|
+
getType(): Promise<import("../../../types").Asset>;
|
|
34
|
+
calcChanges(assets: Assets): Promise<CalculatedChanges>;
|
|
35
|
+
processChanges(assets: Assets): Promise<void>;
|
|
36
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { Asset, Assets, Auth0APIClient, CalculatedChanges } from '../../../types';
|
|
2
|
+
import { ConfigFunction } from '../../../configFactory';
|
|
3
|
+
export declare function order(value: any): (t: any, n: any, descriptor: any) => any;
|
|
4
|
+
export default class APIHandler {
|
|
5
|
+
config: ConfigFunction;
|
|
6
|
+
id: string;
|
|
7
|
+
type: string;
|
|
8
|
+
updated: number;
|
|
9
|
+
created: number;
|
|
10
|
+
deleted: number;
|
|
11
|
+
existing: null | Asset | Asset[];
|
|
12
|
+
client: Auth0APIClient;
|
|
13
|
+
identifiers: string[];
|
|
14
|
+
objectFields: string[];
|
|
15
|
+
sensitiveFieldsToObfuscate: string[];
|
|
16
|
+
stripUpdateFields: string[];
|
|
17
|
+
stripCreateFields: string[];
|
|
18
|
+
name?: string;
|
|
19
|
+
functions: {
|
|
20
|
+
getAll: string;
|
|
21
|
+
update: string;
|
|
22
|
+
create: string;
|
|
23
|
+
delete: string;
|
|
24
|
+
};
|
|
25
|
+
constructor(options: {
|
|
26
|
+
id?: APIHandler['id'];
|
|
27
|
+
config: ConfigFunction;
|
|
28
|
+
type: APIHandler['type'];
|
|
29
|
+
client: Auth0APIClient;
|
|
30
|
+
objectFields?: APIHandler['objectFields'];
|
|
31
|
+
identifiers?: APIHandler['identifiers'];
|
|
32
|
+
stripUpdateFields?: APIHandler['stripUpdateFields'];
|
|
33
|
+
sensitiveFieldsToObfuscate?: APIHandler['sensitiveFieldsToObfuscate'];
|
|
34
|
+
stripCreateFields?: APIHandler['stripCreateFields'];
|
|
35
|
+
functions: {
|
|
36
|
+
getAll?: string;
|
|
37
|
+
update?: string;
|
|
38
|
+
create?: string;
|
|
39
|
+
delete?: string;
|
|
40
|
+
};
|
|
41
|
+
});
|
|
42
|
+
getClientFN(fn: string | Function): Function;
|
|
43
|
+
didDelete(item: Asset): void;
|
|
44
|
+
didCreate(item: Asset): void;
|
|
45
|
+
didUpdate(item: Asset): void;
|
|
46
|
+
objString(item: Asset): string;
|
|
47
|
+
getType(): Promise<Asset | Asset[] | null>;
|
|
48
|
+
load(): Promise<{
|
|
49
|
+
[key: string]: Asset | Asset[] | null;
|
|
50
|
+
}>;
|
|
51
|
+
calcChanges(assets: Assets): Promise<CalculatedChanges>;
|
|
52
|
+
validate(assets: Assets): Promise<void>;
|
|
53
|
+
processChanges(assets: Assets, changes: CalculatedChanges): Promise<void>;
|
|
54
|
+
}
|
|
@@ -14,8 +14,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
15
|
exports.order = void 0;
|
|
16
16
|
const validationError_1 = __importDefault(require("../../validationError"));
|
|
17
|
-
const logger_1 = __importDefault(require("../../logger"));
|
|
18
17
|
const utils_1 = require("../../utils");
|
|
18
|
+
const logger_1 = __importDefault(require("../../../logger"));
|
|
19
19
|
const calculateChanges_1 = require("../../calculateChanges");
|
|
20
20
|
function order(value) {
|
|
21
21
|
return function decorator(t, n, descriptor) {
|
|
@@ -34,6 +34,8 @@ class APIHandler {
|
|
|
34
34
|
this.identifiers = options.identifiers || ['id', 'name'];
|
|
35
35
|
this.objectFields = options.objectFields || [];
|
|
36
36
|
this.stripUpdateFields = [...(options.stripUpdateFields || []), this.id];
|
|
37
|
+
this.sensitiveFieldsToObfuscate = options.sensitiveFieldsToObfuscate || [];
|
|
38
|
+
this.stripCreateFields = options.stripCreateFields || [];
|
|
37
39
|
this.functions = Object.assign({ getAll: 'getAll', create: 'create', delete: 'delete', update: 'update' }, (options.functions || {}));
|
|
38
40
|
this.updated = 0;
|
|
39
41
|
this.created = 0;
|
|
@@ -68,7 +70,8 @@ class APIHandler {
|
|
|
68
70
|
return __awaiter(this, void 0, void 0, function* () {
|
|
69
71
|
// Load Asset from Tenant
|
|
70
72
|
logger_1.default.info(`Retrieving ${this.type} data from Auth0`);
|
|
71
|
-
|
|
73
|
+
const data = yield this.getType();
|
|
74
|
+
this.existing = (0, utils_1.obfuscateSensitiveValues)(data, this.sensitiveFieldsToObfuscate);
|
|
72
75
|
return { [this.type]: this.existing };
|
|
73
76
|
});
|
|
74
77
|
}
|
|
@@ -76,18 +79,20 @@ class APIHandler {
|
|
|
76
79
|
return __awaiter(this, void 0, void 0, function* () {
|
|
77
80
|
const typeAssets = assets[this.type];
|
|
78
81
|
// Do nothing if not set
|
|
79
|
-
if (!typeAssets)
|
|
82
|
+
if (!typeAssets) {
|
|
80
83
|
return {
|
|
81
84
|
del: [],
|
|
82
85
|
create: [],
|
|
83
86
|
conflicts: [],
|
|
84
87
|
update: [],
|
|
85
88
|
};
|
|
89
|
+
}
|
|
86
90
|
const existing = yield this.getType();
|
|
87
91
|
// Figure out what needs to be updated vs created
|
|
88
92
|
return (0, calculateChanges_1.calculateChanges)({
|
|
89
93
|
handler: this,
|
|
90
94
|
assets: typeAssets,
|
|
95
|
+
allowDelete: !!this.config('AUTH0_ALLOW_DELETE'),
|
|
91
96
|
//@ts-ignore TODO: investigate what happens when `existing` is null
|
|
92
97
|
existing,
|
|
93
98
|
identifiers: this.identifiers,
|
|
@@ -166,8 +171,11 @@ class APIHandler {
|
|
|
166
171
|
generator: (updateItem) => {
|
|
167
172
|
const updateFN = this.getClientFN(this.functions.update);
|
|
168
173
|
const params = { [this.id]: updateItem[this.id] };
|
|
169
|
-
const
|
|
170
|
-
|
|
174
|
+
const updatePayload = (() => {
|
|
175
|
+
let data = (0, utils_1.stripFields)(Object.assign({}, updateItem), this.stripUpdateFields);
|
|
176
|
+
return (0, utils_1.stripObfuscatedFieldsFromPayload)(data, this.sensitiveFieldsToObfuscate);
|
|
177
|
+
})();
|
|
178
|
+
return updateFN(params, updatePayload)
|
|
171
179
|
.then((data) => this.didUpdate(data))
|
|
172
180
|
.catch((err) => {
|
|
173
181
|
throw new Error(`Problem updating ${this.type} ${this.objString(updateItem)}\n${err}`);
|
|
@@ -181,7 +189,11 @@ class APIHandler {
|
|
|
181
189
|
data: create || [],
|
|
182
190
|
generator: (createItem) => {
|
|
183
191
|
const createFunction = this.getClientFN(this.functions.create);
|
|
184
|
-
|
|
192
|
+
const createPayload = (() => {
|
|
193
|
+
const strippedPayload = (0, utils_1.stripFields)(createItem, this.stripCreateFields);
|
|
194
|
+
return (0, utils_1.stripObfuscatedFieldsFromPayload)(strippedPayload, this.sensitiveFieldsToObfuscate);
|
|
195
|
+
})();
|
|
196
|
+
return createFunction(createPayload)
|
|
185
197
|
.then((data) => {
|
|
186
198
|
this.didCreate(data);
|
|
187
199
|
this.created += 1;
|
|
@@ -199,8 +211,11 @@ class APIHandler {
|
|
|
199
211
|
generator: (updateItem) => {
|
|
200
212
|
const updateFN = this.getClientFN(this.functions.update);
|
|
201
213
|
const params = { [this.id]: updateItem[this.id] };
|
|
202
|
-
const
|
|
203
|
-
|
|
214
|
+
const updatePayload = (() => {
|
|
215
|
+
let data = (0, utils_1.stripFields)(Object.assign({}, updateItem), this.stripUpdateFields);
|
|
216
|
+
return (0, utils_1.stripObfuscatedFieldsFromPayload)(data, this.sensitiveFieldsToObfuscate);
|
|
217
|
+
})();
|
|
218
|
+
return updateFN(params, updatePayload)
|
|
204
219
|
.then((data) => {
|
|
205
220
|
this.didUpdate(data);
|
|
206
221
|
this.updated += 1;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import DefaultHandler from './default';
|
|
2
|
+
import { Asset, Assets } from '../../../types';
|
|
3
|
+
export declare const schema: {
|
|
4
|
+
type: string;
|
|
5
|
+
};
|
|
6
|
+
export default class EmailProviderHandler extends DefaultHandler {
|
|
7
|
+
constructor(options: DefaultHandler);
|
|
8
|
+
getType(): Promise<Asset>;
|
|
9
|
+
objString(provider: any): string;
|
|
10
|
+
processChanges(assets: Assets): Promise<void>;
|
|
11
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import DefaultHandler from './default';
|
|
2
|
+
import { Assets, Asset } from '../../../types';
|
|
3
|
+
export declare const supportedTemplates: string[];
|
|
4
|
+
export declare const schema: {
|
|
5
|
+
type: string;
|
|
6
|
+
items: {
|
|
7
|
+
type: string;
|
|
8
|
+
properties: {
|
|
9
|
+
template: {
|
|
10
|
+
type: string;
|
|
11
|
+
enum: string[];
|
|
12
|
+
};
|
|
13
|
+
body: {
|
|
14
|
+
type: string;
|
|
15
|
+
default: string;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
required: string[];
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
export default class EmailTemplateHandler extends DefaultHandler {
|
|
22
|
+
constructor(options: DefaultHandler);
|
|
23
|
+
getType(): Promise<Asset>;
|
|
24
|
+
updateOrCreate(emailTemplate: any): Promise<void>;
|
|
25
|
+
processChanges(assets: Assets): Promise<void>;
|
|
26
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import DefaultHandler from './default';
|
|
2
|
+
import { Asset, Assets } from '../../../types';
|
|
3
|
+
export declare const schema: {
|
|
4
|
+
type: string;
|
|
5
|
+
items: {
|
|
6
|
+
type: string;
|
|
7
|
+
properties: {
|
|
8
|
+
name: {
|
|
9
|
+
type: string;
|
|
10
|
+
enum: string[];
|
|
11
|
+
};
|
|
12
|
+
provider: {
|
|
13
|
+
type: string;
|
|
14
|
+
enum: string[];
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
required: string[];
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
export default class GuardianFactorProvidersHandler extends DefaultHandler {
|
|
21
|
+
existing: Asset[];
|
|
22
|
+
constructor(options: DefaultHandler);
|
|
23
|
+
getType(): Promise<Asset[]>;
|
|
24
|
+
processChanges(assets: Assets): Promise<void>;
|
|
25
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import DefaultHandler from './default';
|
|
2
|
+
import { Assets, Asset } from '../../../types';
|
|
3
|
+
export declare const schema: {
|
|
4
|
+
type: string;
|
|
5
|
+
items: {
|
|
6
|
+
type: string;
|
|
7
|
+
properties: {
|
|
8
|
+
name: {
|
|
9
|
+
type: string;
|
|
10
|
+
enum: string[];
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
required: string[];
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
export default class GuardianFactorTemplatesHandler extends DefaultHandler {
|
|
17
|
+
existing: Asset[];
|
|
18
|
+
constructor(options: any);
|
|
19
|
+
getType(): Promise<Asset[]>;
|
|
20
|
+
processChanges(assets: Assets): Promise<void>;
|
|
21
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import DefaultHandler from './default';
|
|
2
|
+
import { Asset, Assets } from '../../../types';
|
|
3
|
+
export declare const schema: {
|
|
4
|
+
type: string;
|
|
5
|
+
items: {
|
|
6
|
+
type: string;
|
|
7
|
+
properties: {
|
|
8
|
+
name: {
|
|
9
|
+
type: string;
|
|
10
|
+
enum: string[];
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
required: string[];
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
export default class GuardianFactorsHandler extends DefaultHandler {
|
|
17
|
+
existing: Asset[];
|
|
18
|
+
constructor(options: DefaultHandler);
|
|
19
|
+
getType(): Promise<Asset[]>;
|
|
20
|
+
processChanges(assets: Assets): Promise<void>;
|
|
21
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import DefaultHandler from './default';
|
|
2
|
+
import { Asset, Assets } from '../../../types';
|
|
3
|
+
export declare const schema: {
|
|
4
|
+
type: string;
|
|
5
|
+
properties: {
|
|
6
|
+
message_types: {
|
|
7
|
+
type: string;
|
|
8
|
+
items: {
|
|
9
|
+
type: string;
|
|
10
|
+
enum: string[];
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
additionalProperties: boolean;
|
|
15
|
+
};
|
|
16
|
+
export default class GuardianPhoneMessageTypesHandler extends DefaultHandler {
|
|
17
|
+
existing: Asset[];
|
|
18
|
+
constructor(options: DefaultHandler);
|
|
19
|
+
getType(): Promise<Asset[] | {}>;
|
|
20
|
+
processChanges(assets: Assets): Promise<void>;
|
|
21
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import DefaultHandler from './default';
|
|
2
|
+
import { Asset, Assets } from '../../../types';
|
|
3
|
+
export declare const schema: {
|
|
4
|
+
type: string;
|
|
5
|
+
properties: {
|
|
6
|
+
provider: {
|
|
7
|
+
type: string;
|
|
8
|
+
enum: string[];
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
additionalProperties: boolean;
|
|
12
|
+
};
|
|
13
|
+
export default class GuardianPhoneSelectedProviderHandler extends DefaultHandler {
|
|
14
|
+
existing: Asset[];
|
|
15
|
+
constructor(options: any);
|
|
16
|
+
getType(): Promise<{}>;
|
|
17
|
+
processChanges(assets: Assets): Promise<void>;
|
|
18
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import DefaultHandler from './default';
|
|
2
|
+
import { Asset, Assets } from '../../../types';
|
|
3
|
+
export declare const schema: {
|
|
4
|
+
type: string;
|
|
5
|
+
properties: {
|
|
6
|
+
policies: {
|
|
7
|
+
type: string;
|
|
8
|
+
items: {
|
|
9
|
+
type: string;
|
|
10
|
+
enum: string[];
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
additionalProperties: boolean;
|
|
15
|
+
};
|
|
16
|
+
export default class GuardianPoliciesHandler extends DefaultHandler {
|
|
17
|
+
existing: {
|
|
18
|
+
policies: Asset[];
|
|
19
|
+
};
|
|
20
|
+
constructor(options: any);
|
|
21
|
+
getType(): Promise<GuardianPoliciesHandler['existing'] | {}>;
|
|
22
|
+
processChanges(assets: Assets): Promise<void>;
|
|
23
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import DefaultHandler from './default';
|
|
2
|
+
import { Asset, Assets, CalculatedChanges } from '../../../types';
|
|
3
|
+
export declare const excludeSchema: {
|
|
4
|
+
type: string;
|
|
5
|
+
items: {
|
|
6
|
+
type: string;
|
|
7
|
+
};
|
|
8
|
+
};
|
|
9
|
+
export declare const schema: {
|
|
10
|
+
type: string;
|
|
11
|
+
items: {
|
|
12
|
+
type: string;
|
|
13
|
+
default: never[];
|
|
14
|
+
properties: {
|
|
15
|
+
script: {
|
|
16
|
+
type: string;
|
|
17
|
+
description: string;
|
|
18
|
+
default: string;
|
|
19
|
+
};
|
|
20
|
+
name: {
|
|
21
|
+
type: string;
|
|
22
|
+
description: string;
|
|
23
|
+
pattern: string;
|
|
24
|
+
};
|
|
25
|
+
enabled: {
|
|
26
|
+
type: string;
|
|
27
|
+
description: string;
|
|
28
|
+
default: boolean;
|
|
29
|
+
};
|
|
30
|
+
triggerId: {
|
|
31
|
+
type: string;
|
|
32
|
+
description: string;
|
|
33
|
+
enum: string[];
|
|
34
|
+
};
|
|
35
|
+
secrets: {
|
|
36
|
+
type: string;
|
|
37
|
+
description: string;
|
|
38
|
+
default: {};
|
|
39
|
+
};
|
|
40
|
+
dependencies: {
|
|
41
|
+
type: string;
|
|
42
|
+
default: {};
|
|
43
|
+
description: string;
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
required: string[];
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
export default class HooksHandler extends DefaultHandler {
|
|
50
|
+
existing: Asset[];
|
|
51
|
+
constructor(options: DefaultHandler);
|
|
52
|
+
objString(hook: any): string;
|
|
53
|
+
processSecrets(hooks: any): Promise<void>;
|
|
54
|
+
getType(reload: boolean): Promise<Asset[]>;
|
|
55
|
+
calcChanges(assets: Assets): Promise<CalculatedChanges>;
|
|
56
|
+
validate(assets: any): Promise<void>;
|
|
57
|
+
processChanges(assets: Assets): Promise<void>;
|
|
58
|
+
}
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
import APIHandler from './default';
|
|
2
|
+
declare const _default: {
|
|
3
|
+
rules: {
|
|
4
|
+
default: typeof APIHandler;
|
|
5
|
+
excludeSchema?: any;
|
|
6
|
+
schema: any;
|
|
7
|
+
};
|
|
8
|
+
rulesConfigs: {
|
|
9
|
+
default: typeof APIHandler;
|
|
10
|
+
excludeSchema?: any;
|
|
11
|
+
schema: any;
|
|
12
|
+
};
|
|
13
|
+
hooks: {
|
|
14
|
+
default: typeof APIHandler;
|
|
15
|
+
excludeSchema?: any;
|
|
16
|
+
schema: any;
|
|
17
|
+
};
|
|
18
|
+
pages: {
|
|
19
|
+
default: typeof APIHandler;
|
|
20
|
+
excludeSchema?: any;
|
|
21
|
+
schema: any;
|
|
22
|
+
};
|
|
23
|
+
databases: {
|
|
24
|
+
default: typeof APIHandler;
|
|
25
|
+
excludeSchema?: any;
|
|
26
|
+
schema: any;
|
|
27
|
+
};
|
|
28
|
+
clientGrants: {
|
|
29
|
+
default: typeof APIHandler;
|
|
30
|
+
excludeSchema?: any;
|
|
31
|
+
schema: any;
|
|
32
|
+
};
|
|
33
|
+
resourceServers: {
|
|
34
|
+
default: typeof APIHandler;
|
|
35
|
+
excludeSchema?: any;
|
|
36
|
+
schema: any;
|
|
37
|
+
};
|
|
38
|
+
clients: {
|
|
39
|
+
default: typeof APIHandler;
|
|
40
|
+
excludeSchema?: any;
|
|
41
|
+
schema: any;
|
|
42
|
+
};
|
|
43
|
+
connections: {
|
|
44
|
+
default: typeof APIHandler;
|
|
45
|
+
excludeSchema?: any;
|
|
46
|
+
schema: any;
|
|
47
|
+
};
|
|
48
|
+
tenant: {
|
|
49
|
+
default: typeof APIHandler;
|
|
50
|
+
excludeSchema?: any;
|
|
51
|
+
schema: any;
|
|
52
|
+
};
|
|
53
|
+
emailProvider: {
|
|
54
|
+
default: typeof APIHandler;
|
|
55
|
+
excludeSchema?: any;
|
|
56
|
+
schema: any;
|
|
57
|
+
};
|
|
58
|
+
emailTemplates: {
|
|
59
|
+
default: typeof APIHandler;
|
|
60
|
+
excludeSchema?: any;
|
|
61
|
+
schema: any;
|
|
62
|
+
};
|
|
63
|
+
guardianFactors: {
|
|
64
|
+
default: typeof APIHandler;
|
|
65
|
+
excludeSchema?: any;
|
|
66
|
+
schema: any;
|
|
67
|
+
};
|
|
68
|
+
guardianFactorProviders: {
|
|
69
|
+
default: typeof APIHandler;
|
|
70
|
+
excludeSchema?: any;
|
|
71
|
+
schema: any;
|
|
72
|
+
};
|
|
73
|
+
guardianFactorTemplates: {
|
|
74
|
+
default: typeof APIHandler;
|
|
75
|
+
excludeSchema?: any;
|
|
76
|
+
schema: any;
|
|
77
|
+
};
|
|
78
|
+
migrations: {
|
|
79
|
+
default: typeof APIHandler;
|
|
80
|
+
excludeSchema?: any;
|
|
81
|
+
schema: any;
|
|
82
|
+
};
|
|
83
|
+
guardianPhoneFactorMessageTypes: {
|
|
84
|
+
default: typeof APIHandler;
|
|
85
|
+
excludeSchema?: any;
|
|
86
|
+
schema: any;
|
|
87
|
+
};
|
|
88
|
+
guardianPhoneFactorSelectedProvider: {
|
|
89
|
+
default: typeof APIHandler;
|
|
90
|
+
excludeSchema?: any;
|
|
91
|
+
schema: any;
|
|
92
|
+
};
|
|
93
|
+
guardianPolicies: {
|
|
94
|
+
default: typeof APIHandler;
|
|
95
|
+
excludeSchema?: any;
|
|
96
|
+
schema: any;
|
|
97
|
+
};
|
|
98
|
+
roles: {
|
|
99
|
+
default: typeof APIHandler;
|
|
100
|
+
excludeSchema?: any;
|
|
101
|
+
schema: any;
|
|
102
|
+
};
|
|
103
|
+
actions: {
|
|
104
|
+
default: typeof APIHandler;
|
|
105
|
+
excludeSchema?: any;
|
|
106
|
+
schema: any;
|
|
107
|
+
};
|
|
108
|
+
organizations: {
|
|
109
|
+
default: typeof APIHandler;
|
|
110
|
+
excludeSchema?: any;
|
|
111
|
+
schema: any;
|
|
112
|
+
};
|
|
113
|
+
triggers: {
|
|
114
|
+
default: typeof APIHandler;
|
|
115
|
+
excludeSchema?: any;
|
|
116
|
+
schema: any;
|
|
117
|
+
};
|
|
118
|
+
attackProtection: {
|
|
119
|
+
default: typeof APIHandler;
|
|
120
|
+
excludeSchema?: any;
|
|
121
|
+
schema: any;
|
|
122
|
+
};
|
|
123
|
+
branding: {
|
|
124
|
+
default: typeof APIHandler;
|
|
125
|
+
excludeSchema?: any;
|
|
126
|
+
schema: any;
|
|
127
|
+
};
|
|
128
|
+
logStreams: {
|
|
129
|
+
default: typeof APIHandler;
|
|
130
|
+
excludeSchema?: any;
|
|
131
|
+
schema: any;
|
|
132
|
+
};
|
|
133
|
+
};
|
|
134
|
+
export default _default;
|
|
@@ -50,6 +50,7 @@ const actions = __importStar(require("./actions"));
|
|
|
50
50
|
const triggers = __importStar(require("./triggers"));
|
|
51
51
|
const organizations = __importStar(require("./organizations"));
|
|
52
52
|
const attackProtection = __importStar(require("./attackProtection"));
|
|
53
|
+
const logStreams = __importStar(require("./logStreams"));
|
|
53
54
|
const auth0ApiHandlers = {
|
|
54
55
|
rules,
|
|
55
56
|
rulesConfigs,
|
|
@@ -78,5 +79,6 @@ const auth0ApiHandlers = {
|
|
|
78
79
|
triggers,
|
|
79
80
|
organizations,
|
|
80
81
|
attackProtection,
|
|
82
|
+
logStreams,
|
|
81
83
|
};
|
|
82
84
|
exports.default = auth0ApiHandlers; // TODO: apply stronger types to schema properties
|