auth0-deploy-cli 7.24.2 → 8.0.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/.github/workflows/semgrep.yml +1 -1
- package/.nyc_output/21e10bd2-0a3e-4ba1-bd1d-f10aec1ae717.json +1 -0
- package/.nyc_output/processinfo/21e10bd2-0a3e-4ba1-bd1d-f10aec1ae717.json +1 -0
- package/.nyc_output/processinfo/5682adea-ce69-4464-a15f-6e98b29ca5cf.json +1 -0
- package/.nyc_output/processinfo/cb634365-204c-4c03-9f35-74638d381757.json +1 -0
- package/.nyc_output/processinfo/index.json +1 -1
- package/CHANGELOG.md +30 -1
- package/CONTRIBUTING.md +6 -0
- package/README.md +1 -1
- package/coverage/lcov-report/index.html +69 -69
- package/coverage/lcov.info +3664 -3595
- package/docs/configuring-the-deploy-cli.md +1 -1
- package/docs/excluding-from-management.md +0 -1
- package/docs/resource-specific-documentation.md +11 -8
- package/docs/v8_MIGRATION_GUIDE.md +46 -0
- package/examples/directory/README.md +0 -7
- package/examples/directory/config.json.example +3 -3
- package/examples/yaml/config.json.example +4 -4
- package/examples/yaml/tenant.yaml +0 -21
- package/lib/args.js +1 -2
- package/lib/args.js.map +1 -1
- package/lib/commands/export.js +1 -1
- package/lib/commands/export.js.map +1 -1
- package/lib/commands/import.js +1 -1
- package/lib/commands/import.js.map +1 -1
- package/lib/configFactory.js.map +1 -1
- package/lib/context/defaults.js +1 -2
- package/lib/context/defaults.js.map +1 -1
- package/lib/context/directory/handlers/actions.js +3 -0
- package/lib/context/directory/handlers/actions.js.map +1 -1
- package/lib/context/directory/handlers/attackProtection.js.map +1 -1
- package/lib/context/directory/handlers/branding.js.map +1 -1
- package/lib/context/directory/handlers/clientGrants.js +3 -2
- package/lib/context/directory/handlers/clientGrants.js.map +1 -1
- package/lib/context/directory/handlers/clients.js.map +1 -1
- package/lib/context/directory/handlers/connections.js.map +1 -1
- package/lib/context/directory/handlers/databases.js.map +1 -1
- package/lib/context/directory/handlers/emailProvider.js.map +1 -1
- package/lib/context/directory/handlers/emailTemplates.js.map +1 -1
- package/lib/context/directory/handlers/guardianPhoneFactorMessageTypes.js.map +1 -1
- package/lib/context/directory/handlers/guardianPhoneFactorSelectedProvider.js.map +1 -1
- package/lib/context/directory/handlers/guardianPolicies.js.map +1 -1
- package/lib/context/directory/handlers/hooks.js.map +1 -1
- package/lib/context/directory/handlers/index.js +3 -5
- package/lib/context/directory/handlers/index.js.map +1 -1
- package/lib/context/directory/handlers/organizations.js.map +1 -1
- package/lib/context/directory/handlers/pages.js.map +1 -1
- package/lib/context/directory/handlers/prompts.js +4 -1
- package/lib/context/directory/handlers/prompts.js.map +1 -1
- package/lib/context/directory/handlers/resourceServers.d.ts +1 -1
- package/lib/context/directory/handlers/resourceServers.js.map +1 -1
- package/lib/context/directory/handlers/roles.js.map +1 -1
- package/lib/context/directory/handlers/rules.js.map +1 -1
- package/lib/context/directory/handlers/tenant.js.map +1 -1
- package/lib/context/directory/handlers/themes.js.map +1 -1
- package/lib/context/directory/index.d.ts +2 -1
- package/lib/context/directory/index.js +3 -3
- package/lib/context/directory/index.js.map +1 -1
- package/lib/context/index.d.ts +1 -1
- package/lib/context/index.js +8 -3
- package/lib/context/index.js.map +1 -1
- package/lib/context/yaml/handlers/actions.js +4 -1
- package/lib/context/yaml/handlers/actions.js.map +1 -1
- package/lib/context/yaml/handlers/branding.js.map +1 -1
- package/lib/context/yaml/handlers/clientGrants.js +4 -2
- package/lib/context/yaml/handlers/clientGrants.js.map +1 -1
- package/lib/context/yaml/handlers/clients.js.map +1 -1
- package/lib/context/yaml/handlers/connections.js.map +1 -1
- package/lib/context/yaml/handlers/emailProvider.js.map +1 -1
- package/lib/context/yaml/handlers/emailTemplates.js.map +1 -1
- package/lib/context/yaml/handlers/guardianPolicies.d.ts +2 -2
- package/lib/context/yaml/handlers/hooks.js.map +1 -1
- package/lib/context/yaml/handlers/index.js +4 -6
- package/lib/context/yaml/handlers/index.js.map +1 -1
- package/lib/context/yaml/handlers/organizations.js.map +1 -1
- package/lib/context/yaml/handlers/pages.js.map +1 -1
- package/lib/context/yaml/handlers/resourceServers.d.ts +1 -1
- package/lib/context/yaml/handlers/resourceServers.js.map +1 -1
- package/lib/context/yaml/handlers/roles.js.map +1 -1
- package/lib/context/yaml/handlers/rules.js.map +1 -1
- package/lib/context/yaml/handlers/themes.d.ts +1 -1
- package/lib/context/yaml/index.d.ts +2 -1
- package/lib/context/yaml/index.js +4 -4
- package/lib/context/yaml/index.js.map +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.js.map +1 -1
- package/lib/keywordPreservation.d.ts +1 -1
- package/lib/keywordPreservation.js.map +1 -1
- package/lib/readonly.js +1 -1
- package/lib/readonly.js.map +1 -1
- package/lib/sessionDurationsToMinutes.d.ts +2 -2
- package/lib/tools/auth0/client.d.ts +4 -2
- package/lib/tools/auth0/client.js +14 -4
- package/lib/tools/auth0/client.js.map +1 -1
- package/lib/tools/auth0/handlers/actions.d.ts +8 -3
- package/lib/tools/auth0/handlers/actions.js +19 -17
- package/lib/tools/auth0/handlers/actions.js.map +1 -1
- package/lib/tools/auth0/handlers/attackProtection.js +8 -8
- package/lib/tools/auth0/handlers/attackProtection.js.map +1 -1
- package/lib/tools/auth0/handlers/branding.js +25 -12
- package/lib/tools/auth0/handlers/branding.js.map +1 -1
- package/lib/tools/auth0/handlers/clientGrants.js +11 -3
- package/lib/tools/auth0/handlers/clientGrants.js.map +1 -1
- package/lib/tools/auth0/handlers/clients.d.ts +3 -3
- package/lib/tools/auth0/handlers/clients.js +3 -1
- package/lib/tools/auth0/handlers/clients.js.map +1 -1
- package/lib/tools/auth0/handlers/connections.d.ts +8 -1
- package/lib/tools/auth0/handlers/connections.js +18 -8
- package/lib/tools/auth0/handlers/connections.js.map +1 -1
- package/lib/tools/auth0/handlers/customDomains.js +2 -2
- package/lib/tools/auth0/handlers/customDomains.js.map +1 -1
- package/lib/tools/auth0/handlers/databases.d.ts +1 -1
- package/lib/tools/auth0/handlers/databases.js +14 -7
- package/lib/tools/auth0/handlers/databases.js.map +1 -1
- package/lib/tools/auth0/handlers/default.js +14 -4
- package/lib/tools/auth0/handlers/default.js.map +1 -1
- package/lib/tools/auth0/handlers/emailProvider.js +20 -11
- package/lib/tools/auth0/handlers/emailProvider.js.map +1 -1
- package/lib/tools/auth0/handlers/emailTemplates.js +23 -10
- package/lib/tools/auth0/handlers/emailTemplates.js.map +1 -1
- package/lib/tools/auth0/handlers/guardianFactorProviders.js +40 -6
- package/lib/tools/auth0/handlers/guardianFactorProviders.js.map +1 -1
- package/lib/tools/auth0/handlers/guardianFactorTemplates.js +29 -5
- package/lib/tools/auth0/handlers/guardianFactorTemplates.js.map +1 -1
- package/lib/tools/auth0/handlers/guardianFactors.js +2 -1
- package/lib/tools/auth0/handlers/guardianFactors.js.map +1 -1
- package/lib/tools/auth0/handlers/guardianPhoneFactorMessageTypes.d.ts +1 -1
- package/lib/tools/auth0/handlers/guardianPhoneFactorMessageTypes.js +3 -3
- package/lib/tools/auth0/handlers/guardianPhoneFactorMessageTypes.js.map +1 -1
- package/lib/tools/auth0/handlers/guardianPhoneFactorSelectedProvider.d.ts +2 -2
- package/lib/tools/auth0/handlers/guardianPhoneFactorSelectedProvider.js +3 -3
- package/lib/tools/auth0/handlers/guardianPhoneFactorSelectedProvider.js.map +1 -1
- package/lib/tools/auth0/handlers/guardianPolicies.d.ts +2 -2
- package/lib/tools/auth0/handlers/guardianPolicies.js +2 -3
- package/lib/tools/auth0/handlers/guardianPolicies.js.map +1 -1
- package/lib/tools/auth0/handlers/hooks.js +8 -4
- package/lib/tools/auth0/handlers/hooks.js.map +1 -1
- package/lib/tools/auth0/handlers/index.d.ts +6 -147
- package/lib/tools/auth0/handlers/index.js +0 -3
- package/lib/tools/auth0/handlers/index.js.map +1 -1
- package/lib/tools/auth0/handlers/logStreams.js +1 -1
- package/lib/tools/auth0/handlers/logStreams.js.map +1 -1
- package/lib/tools/auth0/handlers/organizations.js +11 -10
- package/lib/tools/auth0/handlers/organizations.js.map +1 -1
- package/lib/tools/auth0/handlers/pages.js +7 -6
- package/lib/tools/auth0/handlers/pages.js.map +1 -1
- package/lib/tools/auth0/handlers/prompts.d.ts +2 -3
- package/lib/tools/auth0/handlers/prompts.js +43 -70
- package/lib/tools/auth0/handlers/prompts.js.map +1 -1
- package/lib/tools/auth0/handlers/resourceServers.d.ts +1 -9
- package/lib/tools/auth0/handlers/resourceServers.js +2 -1
- package/lib/tools/auth0/handlers/resourceServers.js.map +1 -1
- package/lib/tools/auth0/handlers/roles.js +33 -12
- package/lib/tools/auth0/handlers/roles.js.map +1 -1
- package/lib/tools/auth0/handlers/rules.js +8 -3
- package/lib/tools/auth0/handlers/rules.js.map +1 -1
- package/lib/tools/auth0/handlers/rulesConfigs.js +2 -1
- package/lib/tools/auth0/handlers/rulesConfigs.js.map +1 -1
- package/lib/tools/auth0/handlers/scimHandler.d.ts +10 -11
- package/lib/tools/auth0/handlers/scimHandler.js +57 -46
- package/lib/tools/auth0/handlers/scimHandler.js.map +1 -1
- package/lib/tools/auth0/handlers/tenant.d.ts +5 -9
- package/lib/tools/auth0/handlers/tenant.js +55 -54
- package/lib/tools/auth0/handlers/tenant.js.map +1 -1
- package/lib/tools/auth0/handlers/themes.d.ts +2 -85
- package/lib/tools/auth0/handlers/themes.js +4 -4
- package/lib/tools/auth0/handlers/themes.js.map +1 -1
- package/lib/tools/auth0/handlers/triggers.js +8 -7
- package/lib/tools/auth0/handlers/triggers.js.map +1 -1
- package/lib/tools/auth0/index.d.ts +2 -2
- package/lib/tools/auth0/index.js.map +1 -1
- package/lib/tools/auth0/schema.js.map +1 -1
- package/lib/tools/calculateChanges.js +2 -3
- package/lib/tools/calculateChanges.js.map +1 -1
- package/lib/tools/constants.d.ts +2 -1
- package/lib/tools/constants.js +1 -1
- package/lib/tools/constants.js.map +1 -1
- package/lib/tools/deploy.js +1 -1
- package/lib/tools/deploy.js.map +1 -1
- package/lib/tools/index.d.ts +1 -1
- package/lib/tools/utils.js +16 -16
- package/lib/tools/utils.js.map +1 -1
- package/lib/tools/validationError.js.map +1 -1
- package/lib/types.d.ts +9 -205
- package/lib/types.js.map +1 -1
- package/lib/utils.d.ts +7 -69
- package/lib/utils.js +18 -19
- package/lib/utils.js.map +1 -1
- package/package.json +17 -13
- package/.nyc_output/6fbd242f-7eed-4196-adf4-fe545cdfb540.json +0 -1
- package/.nyc_output/processinfo/1aa55350-a75f-48f9-bb54-ad1223aae81c.json +0 -1
- package/.nyc_output/processinfo/54aa2604-c08d-4a3c-b33f-07ffb35277e3.json +0 -1
- package/.nyc_output/processinfo/6fbd242f-7eed-4196-adf4-fe545cdfb540.json +0 -1
- package/lib/context/directory/handlers/migrations.d.ts +0 -5
- package/lib/context/directory/handlers/migrations.js +0 -45
- package/lib/context/directory/handlers/migrations.js.map +0 -1
- package/lib/context/yaml/handlers/migrations.d.ts +0 -5
- package/lib/context/yaml/handlers/migrations.js +0 -25
- package/lib/context/yaml/handlers/migrations.js.map +0 -1
- package/lib/tools/auth0/handlers/migrations.d.ts +0 -15
- package/lib/tools/auth0/handlers/migrations.js +0 -110
- package/lib/tools/auth0/handlers/migrations.js.map +0 -1
- /package/.nyc_output/{1aa55350-a75f-48f9-bb54-ad1223aae81c.json → 5682adea-ce69-4464-a15f-6e98b29ca5cf.json} +0 -0
- /package/.nyc_output/{54aa2604-c08d-4a3c-b33f-07ffb35277e3.json → cb634365-204c-4c03-9f35-74638d381757.json} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rules.js","sourceRoot":"","sources":["../../../../src/tools/auth0/handlers/rules.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"rules.js","sourceRoot":"","sources":["../../../../src/tools/auth0/handlers/rules.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AACA,4EAAoD;AACpD,uCAAkG;AAClG,wDAAuC;AACvC,6DAAkC;AAClC,6DAA0D;AAE1D,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AAC;oBACX,IAAI,EAAE,OAAO,CAAC,OAAO;oBACrB,SAAS,EAAE,CAAC,IAAI,EAAE,EAAE,CAClB,IAAI,CAAC,MAAM,CAAC,KAAK;yBACd,MAAM,CAAC,EAAE,EAAE,EAAE,IAAI,CAAC,EAAE,EAAE,EAAE,IAAA,mBAAW,EAAC,IAAI,EAAE,IAAI,CAAC,iBAAiB,CAAC,CAAC;yBAClE,IAAI,CAAC,GAAG,EAAE;wBACT,MAAM,OAAO,GAAG;4BACd,IAAI,EAAE,IAAI,CAAC,IAAI;4BACf,KAAK,EAAE,IAAI,CAAC,KAAK;4BACjB,KAAK,EAAE,IAAI,CAAC,KAAK;4BACjB,EAAE,EAAE,IAAI,CAAC,EAAE;yBACZ,CAAC;wBACF,gBAAG,CAAC,IAAI,CAAC,4BAA4B,IAAA,2BAAmB,EAAC,OAAO,CAAC,EAAE,CAAC,CAAC;oBACvE,CAAC,CAAC;iBACP,CAAC;qBACD,OAAO,EAAE,CAAC;gBAEb,MAAM,OAAM,cAAc,YAAC,MAAM,EAAE;oBACjC,GAAG,EAAE,OAAO,CAAC,GAAG;oBAChB,MAAM,EAAE,OAAO,CAAC,MAAM;oBACtB,MAAM,EAAE,OAAO,CAAC,MAAM;oBACtB,SAAS,EAAE,OAAO,CAAC,SAAS;iBAC7B,CAAC,CAAC;YACL,CAAC;YAAC,OAAO,GAAG,EAAE,CAAC;gBACb,IAAI,IAAA,yBAAiB,EAAC,GAAG,CAAC,EAAE,CAAC;oBAC3B,gBAAG,CAAC,IAAI,CACN,iMAAiM,CAClM,CAAC;oBACF,OAAO;gBACT,CAAC;gBACD,MAAM,GAAG,CAAC;YACZ,CAAC;QACH,CAAC;KAAA;CACF;AAxMD,+BAwMC"}
|
|
@@ -37,7 +37,8 @@ class RulesConfigsHandler extends default_1.default {
|
|
|
37
37
|
getType() {
|
|
38
38
|
return __awaiter(this, void 0, void 0, function* () {
|
|
39
39
|
try {
|
|
40
|
-
|
|
40
|
+
const { data } = yield this.client.rulesConfigs.getAll();
|
|
41
|
+
return data;
|
|
41
42
|
}
|
|
42
43
|
catch (err) {
|
|
43
44
|
if ((0, utils_1.isDeprecatedError)(err))
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rulesConfigs.js","sourceRoot":"","sources":["../../../../src/tools/auth0/handlers/rulesConfigs.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AACA,wDAAuC;AACvC,6DAAkC;AAClC,uCAAgD;AAEnC,QAAA,MAAM,GAAG;IACpB,IAAI,EAAE,OAAO;IACb,KAAK,EAAE;QACL,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,GAAG,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,kBAAkB,EAAE;YACpD,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;SAC1B;QACD,QAAQ,EAAE,CAAC,KAAK,EAAE,OAAO,CAAC;KAC3B;IACD,oBAAoB,EAAE,KAAK;CAC5B,CAAC;AAEF,MAAqB,mBAAoB,SAAQ,iBAAc;IAC7D,YAAY,OAAuB;QACjC,KAAK,iCACA,OAAO,KACV,IAAI,EAAE,cAAc,EACpB,EAAE,EAAE,KAAK,EACT,SAAS,EAAE;gBACT,MAAM,EAAE,KAAK,EAAE,2DAA2D;aAC3E,IACD,CAAC;IACL,CAAC;IAEK,OAAO;;YACX,IAAI;
|
|
1
|
+
{"version":3,"file":"rulesConfigs.js","sourceRoot":"","sources":["../../../../src/tools/auth0/handlers/rulesConfigs.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AACA,wDAAuC;AACvC,6DAAkC;AAClC,uCAAgD;AAEnC,QAAA,MAAM,GAAG;IACpB,IAAI,EAAE,OAAO;IACb,KAAK,EAAE;QACL,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,GAAG,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,kBAAkB,EAAE;YACpD,KAAK,EAAE,EAAE,IAAI,EA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AAC;KAAA;CACF;AAlDD,sCAkDC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Asset } from '../../../types';
|
|
2
1
|
import { PromisePoolExecutor } from 'promise-pool-executor';
|
|
2
|
+
import { Asset } from '../../../types';
|
|
3
3
|
interface ScimRequestParams {
|
|
4
4
|
id: string;
|
|
5
5
|
}
|
|
@@ -48,33 +48,32 @@ export default class ScimHandler {
|
|
|
48
48
|
applyScimConfiguration(connections: Asset[]): Promise<Asset[] | undefined>;
|
|
49
49
|
/**
|
|
50
50
|
* Wrapper over scimClient methods.
|
|
51
|
-
|
|
52
|
-
private useScimClient;
|
|
51
|
+
*/
|
|
53
52
|
/**
|
|
54
53
|
* Error handler wrapper.
|
|
55
54
|
*/
|
|
56
55
|
withErrorHandling(callback: any, method: string, connectionId: string): Promise<any>;
|
|
57
56
|
/**
|
|
58
|
-
|
|
59
|
-
|
|
57
|
+
* Handle expected errors.
|
|
58
|
+
*/
|
|
60
59
|
handleExpectedErrors(error: any, method: string, connectionId: string): null;
|
|
61
60
|
/**
|
|
62
61
|
* Creates a new `SCIM` configuration.
|
|
63
62
|
*/
|
|
64
|
-
createScimConfiguration({ id
|
|
63
|
+
createScimConfiguration({ id }: ScimRequestParams, { user_id_attribute, mapping }: ScimBodyParams): Promise<Asset | null>;
|
|
65
64
|
/**
|
|
66
65
|
* Retrieves `SCIM` configuration of an enterprise connection.
|
|
67
66
|
*/
|
|
68
|
-
getScimConfiguration({ id
|
|
67
|
+
getScimConfiguration({ id }: ScimRequestParams): Promise<Asset | null>;
|
|
69
68
|
/**
|
|
70
69
|
* Updates an existing `SCIM` configuration.
|
|
71
70
|
*/
|
|
72
|
-
updateScimConfiguration({ id
|
|
71
|
+
updateScimConfiguration({ id }: ScimRequestParams, { user_id_attribute, mapping }: ScimBodyParams): Promise<Asset | null>;
|
|
73
72
|
/**
|
|
74
73
|
* Deletes an existing `SCIM` configuration.
|
|
75
74
|
*/
|
|
76
|
-
deleteScimConfiguration({ id
|
|
77
|
-
updateOverride(requestParams: ScimRequestParams, bodyParams: Asset): Promise<
|
|
78
|
-
createOverride(bodyParams: Asset): Promise<
|
|
75
|
+
deleteScimConfiguration({ id }: ScimRequestParams): Promise<Asset | null>;
|
|
76
|
+
updateOverride(requestParams: ScimRequestParams, bodyParams: Asset): Promise<import("auth0").ApiResponse<import("auth0").Connection>>;
|
|
77
|
+
createOverride(bodyParams: Asset): Promise<import("auth0").Connection>;
|
|
79
78
|
}
|
|
80
79
|
export {};
|
|
@@ -25,11 +25,10 @@ class ScimHandler {
|
|
|
25
25
|
get: 'read',
|
|
26
26
|
post: 'create',
|
|
27
27
|
patch: 'update',
|
|
28
|
-
delete: 'delete'
|
|
28
|
+
delete: 'delete',
|
|
29
29
|
};
|
|
30
30
|
this.config = config;
|
|
31
31
|
this.connectionsManager = connectionsManager;
|
|
32
|
-
this.scimClient = connectionsManager === null || connectionsManager === void 0 ? void 0 : connectionsManager._getRestClient('/connections/:id/scim-configuration');
|
|
33
32
|
this.poolClient = poolClient;
|
|
34
33
|
this.idMap = new Map();
|
|
35
34
|
}
|
|
@@ -51,7 +50,8 @@ class ScimHandler {
|
|
|
51
50
|
return __awaiter(this, void 0, void 0, function* () {
|
|
52
51
|
this.idMap.clear();
|
|
53
52
|
logger_1.default.info('Reviewing connections for SCIM support. This may take a while...');
|
|
54
|
-
yield this.poolClient
|
|
53
|
+
yield this.poolClient
|
|
54
|
+
.addEachTask({
|
|
55
55
|
data: connections || [],
|
|
56
56
|
generator: (connection) => {
|
|
57
57
|
if (!this.scimScopes.read)
|
|
@@ -59,12 +59,15 @@ class ScimHandler {
|
|
|
59
59
|
if (!this.isScimStrategy(connection.strategy))
|
|
60
60
|
return Promise.resolve(null);
|
|
61
61
|
this.idMap.set(connection.id, { strategy: connection.strategy });
|
|
62
|
-
return this.getScimConfiguration({ id: connection.id })
|
|
62
|
+
return this.getScimConfiguration({ id: connection.id })
|
|
63
|
+
.then((response) => {
|
|
64
|
+
const scimConfiguration = response === null || response === void 0 ? void 0 : response.data;
|
|
63
65
|
if (scimConfiguration) {
|
|
64
66
|
const { mapping, user_id_attribute, connection_id } = scimConfiguration;
|
|
65
67
|
this.idMap.set(connection_id, Object.assign(Object.assign({}, this.idMap.get(connection_id)), { scimConfiguration: { mapping, user_id_attribute } }));
|
|
66
68
|
}
|
|
67
|
-
})
|
|
69
|
+
})
|
|
70
|
+
.catch((error) => {
|
|
68
71
|
throw new Error(`Problem fetching SCIM configurations while running \"createIdMap\".\n${error}`);
|
|
69
72
|
});
|
|
70
73
|
},
|
|
@@ -99,14 +102,21 @@ class ScimHandler {
|
|
|
99
102
|
}
|
|
100
103
|
/**
|
|
101
104
|
* Wrapper over scimClient methods.
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
105
|
+
*/
|
|
106
|
+
/*
|
|
107
|
+
private async useScimClient(
|
|
108
|
+
method: string,
|
|
109
|
+
options: [ScimRequestParams, ...Record<string, any>[]]
|
|
110
|
+
): Promise<Asset> {
|
|
111
|
+
return await this.withErrorHandling(
|
|
112
|
+
async () => {
|
|
113
|
+
return await this.scimClient[method](...options);
|
|
114
|
+
},
|
|
115
|
+
method,
|
|
116
|
+
options[0].id
|
|
117
|
+
);
|
|
109
118
|
}
|
|
119
|
+
*/
|
|
110
120
|
/**
|
|
111
121
|
* Error handler wrapper.
|
|
112
122
|
*/
|
|
@@ -121,8 +131,8 @@ class ScimHandler {
|
|
|
121
131
|
});
|
|
122
132
|
}
|
|
123
133
|
/**
|
|
124
|
-
|
|
125
|
-
|
|
134
|
+
* Handle expected errors.
|
|
135
|
+
*/
|
|
126
136
|
handleExpectedErrors(error, method, connectionId) {
|
|
127
137
|
var _a;
|
|
128
138
|
// Skip the connection if it returns 404. This can happen if `SCIM` is not enabled on a `SCIM` connection.
|
|
@@ -130,13 +140,12 @@ class ScimHandler {
|
|
|
130
140
|
logger_1.default.debug(`SCIM configuration is not enabled on connection \"${connectionId}\".`);
|
|
131
141
|
return null;
|
|
132
142
|
}
|
|
133
|
-
|
|
134
|
-
// Skip the connection if it returns 403. Looks like "scim_config" permissions are not enabled on Management API.
|
|
143
|
+
// Skip the connection if it returns 403. Looks like "scim_config" permissions are not enabled on Management API.
|
|
135
144
|
if (error && error.statusCode === 403) {
|
|
136
145
|
const scope = this.scopeMethodMap[method];
|
|
137
146
|
this.scimScopes[scope] = false;
|
|
138
147
|
const warningMessage = `Insufficient scope, \"${scope}:scim_config\". Required \"read:scim_config\", \"create:scim_config\", \"update:scim_config\" and \"delete:scim_config\".`;
|
|
139
|
-
const suggestionText =
|
|
148
|
+
const suggestionText = 'If you are not using SCIM, you can keep these permissions disabled and ignore this warning.';
|
|
140
149
|
logger_1.default.warn(`${warningMessage}\n${suggestionText}\n`);
|
|
141
150
|
return null;
|
|
142
151
|
}
|
|
@@ -156,37 +165,41 @@ class ScimHandler {
|
|
|
156
165
|
/**
|
|
157
166
|
* Creates a new `SCIM` configuration.
|
|
158
167
|
*/
|
|
159
|
-
createScimConfiguration(
|
|
160
|
-
return __awaiter(this,
|
|
161
|
-
|
|
162
|
-
|
|
168
|
+
createScimConfiguration(_a, _b) {
|
|
169
|
+
return __awaiter(this, arguments, void 0, function* ({ id },
|
|
170
|
+
// eslint-disable-next-line camelcase
|
|
171
|
+
{ user_id_attribute, mapping }) {
|
|
172
|
+
logger_1.default.debug(`Creating SCIM configuration on connection ${id}`);
|
|
173
|
+
return this.withErrorHandling(() => __awaiter(this, void 0, void 0, function* () { return this.connectionsManager.createScimConfiguration({ id }, { user_id_attribute, mapping }); }), 'create', id);
|
|
163
174
|
});
|
|
164
175
|
}
|
|
165
176
|
/**
|
|
166
177
|
* Retrieves `SCIM` configuration of an enterprise connection.
|
|
167
178
|
*/
|
|
168
|
-
getScimConfiguration(
|
|
169
|
-
return __awaiter(this,
|
|
170
|
-
logger_1.default.debug(`Getting SCIM configuration from connection ${
|
|
171
|
-
return
|
|
179
|
+
getScimConfiguration(_a) {
|
|
180
|
+
return __awaiter(this, arguments, void 0, function* ({ id }) {
|
|
181
|
+
logger_1.default.debug(`Getting SCIM configuration from connection ${id}`);
|
|
182
|
+
return this.withErrorHandling(() => __awaiter(this, void 0, void 0, function* () { return this.connectionsManager.getScimConfiguration({ id }); }), 'get', id);
|
|
172
183
|
});
|
|
173
184
|
}
|
|
174
185
|
/**
|
|
175
186
|
* Updates an existing `SCIM` configuration.
|
|
176
187
|
*/
|
|
177
|
-
updateScimConfiguration(
|
|
178
|
-
return __awaiter(this,
|
|
179
|
-
|
|
180
|
-
|
|
188
|
+
updateScimConfiguration(_a, _b) {
|
|
189
|
+
return __awaiter(this, arguments, void 0, function* ({ id },
|
|
190
|
+
// eslint-disable-next-line camelcase
|
|
191
|
+
{ user_id_attribute, mapping }) {
|
|
192
|
+
logger_1.default.debug(`Updating SCIM configuration on connection ${id}`);
|
|
193
|
+
return this.withErrorHandling(() => __awaiter(this, void 0, void 0, function* () { return this.connectionsManager.updateScimConfiguration({ id }, { user_id_attribute, mapping }); }), 'patch', id);
|
|
181
194
|
});
|
|
182
195
|
}
|
|
183
196
|
/**
|
|
184
197
|
* Deletes an existing `SCIM` configuration.
|
|
185
198
|
*/
|
|
186
|
-
deleteScimConfiguration(
|
|
187
|
-
return __awaiter(this,
|
|
188
|
-
logger_1.default.debug(`Deleting SCIM configuration on connection ${
|
|
189
|
-
return
|
|
199
|
+
deleteScimConfiguration(_a) {
|
|
200
|
+
return __awaiter(this, arguments, void 0, function* ({ id }) {
|
|
201
|
+
logger_1.default.debug(`Deleting SCIM configuration on connection ${id}`);
|
|
202
|
+
return this.withErrorHandling(() => __awaiter(this, void 0, void 0, function* () { return this.connectionsManager.deleteScimConfiguration({ id }); }), 'delete', id);
|
|
190
203
|
});
|
|
191
204
|
}
|
|
192
205
|
updateOverride(requestParams, bodyParams) {
|
|
@@ -208,21 +221,19 @@ class ScimHandler {
|
|
|
208
221
|
yield this.updateScimConfiguration(requestParams, scimBodyParams);
|
|
209
222
|
}
|
|
210
223
|
}
|
|
211
|
-
else {
|
|
212
|
-
if (this.
|
|
213
|
-
|
|
214
|
-
yield this.deleteScimConfiguration(requestParams);
|
|
215
|
-
}
|
|
216
|
-
}
|
|
217
|
-
else {
|
|
218
|
-
logger_1.default.warn(`Skipping DELETE scim_configuration on \"${requestParams.id}\". Enable deletes by setting \"AUTH0_ALLOW_DELETE\" to true in your config.`);
|
|
224
|
+
else if (this.config('AUTH0_ALLOW_DELETE')) {
|
|
225
|
+
if (this.scimScopes.delete) {
|
|
226
|
+
yield this.deleteScimConfiguration(requestParams);
|
|
219
227
|
}
|
|
220
228
|
}
|
|
229
|
+
else {
|
|
230
|
+
logger_1.default.warn(`Skipping DELETE scim_configuration on \"${requestParams.id}\". Enable deletes by setting \"AUTH0_ALLOW_DELETE\" to true in your config.`);
|
|
231
|
+
}
|
|
221
232
|
}
|
|
222
233
|
else if (scimBodyParams && this.scimScopes.create) {
|
|
223
234
|
yield this.createScimConfiguration(requestParams, scimBodyParams);
|
|
224
235
|
}
|
|
225
|
-
// Return response from connections.update(...).
|
|
236
|
+
// Return response from connections.update(...).
|
|
226
237
|
return updated;
|
|
227
238
|
});
|
|
228
239
|
}
|
|
@@ -233,13 +244,13 @@ class ScimHandler {
|
|
|
233
244
|
const { scim_configuration: scimBodyParams } = bodyParams;
|
|
234
245
|
delete bodyParams.scim_configuration;
|
|
235
246
|
// First, create the new `connection`.
|
|
236
|
-
const
|
|
247
|
+
const { data } = yield this.connectionsManager.create(bodyParams);
|
|
237
248
|
if (scimBodyParams && this.scimScopes.create) {
|
|
238
249
|
// Now, create the `scim_configuration` for newly created `connection`.
|
|
239
|
-
yield this.createScimConfiguration({ id:
|
|
250
|
+
yield this.createScimConfiguration({ id: data.id }, scimBodyParams);
|
|
240
251
|
}
|
|
241
|
-
// Return response from connections.create(...).
|
|
242
|
-
return
|
|
252
|
+
// Return response from connections.create(...).
|
|
253
|
+
return data;
|
|
243
254
|
});
|
|
244
255
|
}
|
|
245
256
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scimHandler.js","sourceRoot":"","sources":["../../../../src/tools/auth0/handlers/scimHandler.ts"],"names":[],"mappings":";;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"scimHandler.js","sourceRoot":"","sources":["../../../../src/tools/auth0/handlers/scimHandler.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAGA,6DAAkC;AA+BlC;;;GAGG;AACH,MAAqB,WAAW;IAsB9B,YAAY,MAAM,EAAE,kBAAkB,EAAE,UAA+B;QAnBtD,mBAAc,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;QAM5D,eAAU,GAAe,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;QAElF,mBAAc,GAAG;YACvB,GAAG,EAAE,MAAM;YACX,IAAI,EAAE,QAAQ;YACd,KAAK,EAAE,QAAQ;YACf,MAAM,EAAE,QAAQ;SACjB,CAAC;QAOA,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,kBAAkB,GAAG,kBAAkB,CAAC;QAC7C,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC7B,IAAI,CAAC,KAAK,GAAG,IAAI,GAAG,EAAsB,CAAC;IAC7C,CAAC;IAED;;;OAGG;IACH,cAAc,CAAC,QAAgB;QAC7B,OAAO,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,QAAQ,CAAC,WAAW,EAAE,CAAC,CAAC;IAC9D,CAAC;IAED;;;;;;OAMG;IACG,WAAW,CAAC,WAAoB;;YACpC,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC;YACnB,gBAAG,CAAC,IAAI,CAAC,kEAAkE,CAAC,CAAC;YAE7E,MAAM,IAAI,CAAC,UAAU;iBAClB,WAAW,CA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,EAAE,GAAG,MAAM,IAAI,CAAC,kBAAkB,CAAC,MAAM,CAAC,UAA8B,CAAC,CAAC;YAEtF,IAAI,cAAc,IAAI,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE,CAAC;gBAC7C,uEAAuE;gBACvE,MAAM,IAAI,CAAC,uBAAuB,CAAC,EAAE,EAAE,EAAE,IAAI,CAAC,EAAE,EAAE,EAAE,cAAc,CAAC,CAAC;YACtE,CAAC;YAED,gDAAgD;YAChD,OAAO,IAAI,CAAC;QACd,CAAC;KAAA;CACF;AArSD,8BAqSC"}
|
|
@@ -1,14 +1,12 @@
|
|
|
1
|
+
import { TenantSettings, TenantSettingsFlags } from 'auth0';
|
|
1
2
|
import DefaultHandler from './default';
|
|
2
|
-
import { Asset, Assets
|
|
3
|
+
import { Asset, Assets } from '../../../types';
|
|
3
4
|
export declare const schema: {
|
|
4
5
|
type: string;
|
|
5
6
|
};
|
|
6
|
-
export type Tenant =
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
[key: string]: boolean;
|
|
10
|
-
};
|
|
11
|
-
};
|
|
7
|
+
export type Tenant = TenantSettings;
|
|
8
|
+
export declare const allowedTenantFlags: string[];
|
|
9
|
+
export declare const removeUnallowedTenantFlags: (proposedFlags: TenantSettingsFlags) => TenantSettingsFlags;
|
|
12
10
|
export default class TenantHandler extends DefaultHandler {
|
|
13
11
|
existing: Tenant;
|
|
14
12
|
constructor(options: DefaultHandler);
|
|
@@ -16,5 +14,3 @@ export default class TenantHandler extends DefaultHandler {
|
|
|
16
14
|
validate(assets: Assets): Promise<void>;
|
|
17
15
|
processChanges(assets: Assets): Promise<void>;
|
|
18
16
|
}
|
|
19
|
-
export declare const allowedTenantFlags: string[];
|
|
20
|
-
export declare const removeUnallowedTenantFlags: (proposedFlags: Tenant['flags'] | undefined) => Tenant['flags'];
|
|
@@ -55,60 +55,6 @@ const blockPageKeys = [
|
|
|
55
55
|
...Object.values(pages_1.pageNameMap),
|
|
56
56
|
...pages_1.supportedPages,
|
|
57
57
|
];
|
|
58
|
-
class TenantHandler extends default_1.default {
|
|
59
|
-
constructor(options) {
|
|
60
|
-
super(Object.assign(Object.assign({}, options), { type: 'tenant' }));
|
|
61
|
-
}
|
|
62
|
-
getType() {
|
|
63
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
64
|
-
const tenant = yield this.client.tenant.getSettings();
|
|
65
|
-
tenant.flags = (0, exports.removeUnallowedTenantFlags)(tenant.flags);
|
|
66
|
-
this.existing = tenant;
|
|
67
|
-
blockPageKeys.forEach((key) => {
|
|
68
|
-
if (tenant[key])
|
|
69
|
-
delete tenant[key];
|
|
70
|
-
});
|
|
71
|
-
return tenant;
|
|
72
|
-
});
|
|
73
|
-
}
|
|
74
|
-
validate(assets) {
|
|
75
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
76
|
-
const { tenant } = assets;
|
|
77
|
-
// Nothing to validate?
|
|
78
|
-
if (!tenant)
|
|
79
|
-
return;
|
|
80
|
-
const pageKeys = Object.keys(tenant).filter((k) => blockPageKeys.includes(k));
|
|
81
|
-
if (pageKeys.length > 0) {
|
|
82
|
-
throw new validationError_1.default(`The following pages ${(0, utils_1.convertJsonToString)(pageKeys)} were found in tenant settings. Pages should be set separately. Please refer to the documentation.`);
|
|
83
|
-
}
|
|
84
|
-
});
|
|
85
|
-
}
|
|
86
|
-
// Run after other updates so objected can be referenced such as default directory
|
|
87
|
-
processChanges(assets) {
|
|
88
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
89
|
-
const { tenant } = assets;
|
|
90
|
-
// Do nothing if not set
|
|
91
|
-
if (!tenant)
|
|
92
|
-
return;
|
|
93
|
-
const updatedTenant = Object.assign({}, tenant);
|
|
94
|
-
if ('flags' in updatedTenant) {
|
|
95
|
-
updatedTenant.flags = (0, exports.removeUnallowedTenantFlags)(tenant.flags);
|
|
96
|
-
if (Object.keys(updatedTenant.flags).length === 0) {
|
|
97
|
-
delete updatedTenant.flags;
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
if (updatedTenant && Object.keys(updatedTenant).length > 0) {
|
|
101
|
-
yield this.client.tenant.updateSettings(updatedTenant);
|
|
102
|
-
this.updated += 1;
|
|
103
|
-
this.didUpdate(updatedTenant);
|
|
104
|
-
}
|
|
105
|
-
});
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
__decorate([
|
|
109
|
-
(0, default_1.order)('100')
|
|
110
|
-
], TenantHandler.prototype, "processChanges", null);
|
|
111
|
-
exports.default = TenantHandler;
|
|
112
58
|
/*
|
|
113
59
|
Tenant flags are used to facilitate a number of functionalities, some
|
|
114
60
|
public, some internal. The subset of flags that are allowed to be updated
|
|
@@ -163,4 +109,59 @@ const removeUnallowedTenantFlags = (proposedFlags) => {
|
|
|
163
109
|
return filteredFlags;
|
|
164
110
|
};
|
|
165
111
|
exports.removeUnallowedTenantFlags = removeUnallowedTenantFlags;
|
|
112
|
+
class TenantHandler extends default_1.default {
|
|
113
|
+
constructor(options) {
|
|
114
|
+
super(Object.assign(Object.assign({}, options), { type: 'tenant' }));
|
|
115
|
+
}
|
|
116
|
+
getType() {
|
|
117
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
118
|
+
const { data: tenant } = yield this.client.tenants.getSettings();
|
|
119
|
+
tenant.flags = (0, exports.removeUnallowedTenantFlags)(tenant.flags);
|
|
120
|
+
this.existing = tenant;
|
|
121
|
+
blockPageKeys.forEach((key) => {
|
|
122
|
+
if (tenant[key])
|
|
123
|
+
delete tenant[key];
|
|
124
|
+
});
|
|
125
|
+
return tenant;
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
validate(assets) {
|
|
129
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
130
|
+
const { tenant } = assets;
|
|
131
|
+
// Nothing to validate?
|
|
132
|
+
if (!tenant)
|
|
133
|
+
return;
|
|
134
|
+
const pageKeys = Object.keys(tenant).filter((k) => blockPageKeys.includes(k));
|
|
135
|
+
if (pageKeys.length > 0) {
|
|
136
|
+
throw new validationError_1.default(`The following pages ${(0, utils_1.convertJsonToString)(pageKeys)} were found in tenant settings. Pages should be set separately. Please refer to the documentation.`);
|
|
137
|
+
}
|
|
138
|
+
});
|
|
139
|
+
}
|
|
140
|
+
// Run after other updates so objected can be referenced such as default directory
|
|
141
|
+
processChanges(assets) {
|
|
142
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
143
|
+
const { tenant } = assets;
|
|
144
|
+
// Do nothing if not set
|
|
145
|
+
if (!tenant)
|
|
146
|
+
return;
|
|
147
|
+
const updatedTenant = Object.assign(Object.assign({}, tenant), { flags: tenant.flags
|
|
148
|
+
? (0, exports.removeUnallowedTenantFlags)(tenant.flags)
|
|
149
|
+
: undefined });
|
|
150
|
+
if ('flags' in updatedTenant) {
|
|
151
|
+
if (updatedTenant.flags === undefined || Object.keys(updatedTenant.flags).length === 0) {
|
|
152
|
+
delete updatedTenant.flags;
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
if (updatedTenant && Object.keys(updatedTenant).length > 0) {
|
|
156
|
+
yield this.client.tenants.updateSettings(updatedTenant);
|
|
157
|
+
this.updated += 1;
|
|
158
|
+
this.didUpdate(updatedTenant);
|
|
159
|
+
}
|
|
160
|
+
});
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
exports.default = TenantHandler;
|
|
164
|
+
__decorate([
|
|
165
|
+
(0, default_1.order)('100')
|
|
166
|
+
], TenantHandler.prototype, "processChanges", null);
|
|
166
167
|
//# sourceMappingURL=tenant.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tenant.js","sourceRoot":"","sources":["../../../../src/tools/auth0/handlers/tenant.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"tenant.js","sourceRoot":"","sources":["../../../../src/tools/auth0/handlers/tenant.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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BrandingTheme200Response } from 'auth0';
|
|
1
2
|
import { Assets } from '../../../types';
|
|
2
3
|
import DefaultHandler from './default';
|
|
4
|
+
export type Theme = PostBrandingTheme200Response;
|
|
3
5
|
export default class ThemesHandler extends DefaultHandler {
|
|
4
6
|
existing: Theme[] | null;
|
|
5
7
|
constructor(options: DefaultHandler);
|
|
@@ -374,88 +376,3 @@ export declare const schema: {
|
|
|
374
376
|
type: string;
|
|
375
377
|
};
|
|
376
378
|
};
|
|
377
|
-
/**
|
|
378
|
-
* Utility types
|
|
379
|
-
*/
|
|
380
|
-
export interface Colors {
|
|
381
|
-
primary_button: string;
|
|
382
|
-
primary_button_label: string;
|
|
383
|
-
secondary_button_border: string;
|
|
384
|
-
secondary_button_label: string;
|
|
385
|
-
links_focused_components: string;
|
|
386
|
-
header: string;
|
|
387
|
-
body_text: string;
|
|
388
|
-
captcha_widget_theme: string;
|
|
389
|
-
widget_background: string;
|
|
390
|
-
widget_border: string;
|
|
391
|
-
input_labels_placeholders: string;
|
|
392
|
-
input_filled_text: string;
|
|
393
|
-
input_border: string;
|
|
394
|
-
input_background: string;
|
|
395
|
-
icons: string;
|
|
396
|
-
error: string;
|
|
397
|
-
success: string;
|
|
398
|
-
base_focus_color?: string;
|
|
399
|
-
base_hover_color?: string;
|
|
400
|
-
}
|
|
401
|
-
export interface Fonts {
|
|
402
|
-
font_url: string;
|
|
403
|
-
reference_text_size: number;
|
|
404
|
-
title: {
|
|
405
|
-
size: number;
|
|
406
|
-
bold: boolean;
|
|
407
|
-
};
|
|
408
|
-
subtitle: {
|
|
409
|
-
size: number;
|
|
410
|
-
bold: boolean;
|
|
411
|
-
};
|
|
412
|
-
body_text: {
|
|
413
|
-
size: number;
|
|
414
|
-
bold: boolean;
|
|
415
|
-
};
|
|
416
|
-
buttons_text: {
|
|
417
|
-
size: number;
|
|
418
|
-
bold: boolean;
|
|
419
|
-
};
|
|
420
|
-
input_labels: {
|
|
421
|
-
size: number;
|
|
422
|
-
bold: boolean;
|
|
423
|
-
};
|
|
424
|
-
links: {
|
|
425
|
-
size: number;
|
|
426
|
-
bold: boolean;
|
|
427
|
-
};
|
|
428
|
-
links_style: 'normal' | 'underlined';
|
|
429
|
-
}
|
|
430
|
-
export interface Borders {
|
|
431
|
-
button_border_weight: number;
|
|
432
|
-
buttons_style: 'sharp' | 'pill' | 'rounded';
|
|
433
|
-
button_border_radius: number;
|
|
434
|
-
input_border_weight: number;
|
|
435
|
-
inputs_style: 'sharp' | 'pill' | 'rounded';
|
|
436
|
-
input_border_radius: number;
|
|
437
|
-
widget_corner_radius: number;
|
|
438
|
-
widget_border_weight: number;
|
|
439
|
-
show_widget_shadow: boolean;
|
|
440
|
-
}
|
|
441
|
-
export interface Widget {
|
|
442
|
-
logo_position: 'left' | 'center' | 'right' | 'none';
|
|
443
|
-
logo_url: string;
|
|
444
|
-
logo_height: number;
|
|
445
|
-
header_text_alignment: 'left' | 'center' | 'right';
|
|
446
|
-
social_buttons_layout: 'top' | 'bottom';
|
|
447
|
-
}
|
|
448
|
-
export interface PageBackground {
|
|
449
|
-
page_layout: 'left' | 'center' | 'right';
|
|
450
|
-
background_color: string;
|
|
451
|
-
background_image_url: string;
|
|
452
|
-
}
|
|
453
|
-
export interface Theme {
|
|
454
|
-
colors: Colors;
|
|
455
|
-
fonts: Fonts;
|
|
456
|
-
borders: Borders;
|
|
457
|
-
widget: Widget;
|
|
458
|
-
page_background: PageBackground;
|
|
459
|
-
themeId: string;
|
|
460
|
-
displayName?: string;
|
|
461
|
-
}
|