auth0-deploy-cli 8.38.0 → 8.40.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. package/CHANGELOG.md +28 -1
  2. package/lib/context/defaults.d.ts +1 -0
  3. package/lib/context/defaults.js +47 -0
  4. package/lib/context/directory/handlers/clientAuthCredentials.d.ts +5 -0
  5. package/lib/context/directory/handlers/clientAuthCredentials.js +13 -0
  6. package/lib/context/directory/handlers/clients.js +15 -0
  7. package/lib/context/directory/handlers/eventStreams.d.ts +5 -0
  8. package/lib/context/directory/handlers/eventStreams.js +52 -0
  9. package/lib/context/directory/handlers/index.js +6 -0
  10. package/lib/context/directory/handlers/rateLimitPolicies.d.ts +6 -0
  11. package/lib/context/directory/handlers/rateLimitPolicies.js +53 -0
  12. package/lib/context/yaml/handlers/clientAuthCredentials.d.ts +5 -0
  13. package/lib/context/yaml/handlers/clientAuthCredentials.js +13 -0
  14. package/lib/context/yaml/handlers/clients.js +15 -0
  15. package/lib/context/yaml/handlers/eventStreams.d.ts +5 -0
  16. package/lib/context/yaml/handlers/eventStreams.js +24 -0
  17. package/lib/context/yaml/handlers/index.js +6 -0
  18. package/lib/context/yaml/handlers/rateLimitPolicies.d.ts +6 -0
  19. package/lib/context/yaml/handlers/rateLimitPolicies.js +27 -0
  20. package/lib/tools/auth0/handlers/clientAuthCredentials.d.ts +26 -0
  21. package/lib/tools/auth0/handlers/clientAuthCredentials.js +216 -0
  22. package/lib/tools/auth0/handlers/clientAuthCredentialsPre.d.ts +37 -0
  23. package/lib/tools/auth0/handlers/clientAuthCredentialsPre.js +118 -0
  24. package/lib/tools/auth0/handlers/clients.js +38 -1
  25. package/lib/tools/auth0/handlers/connections.js +1 -0
  26. package/lib/tools/auth0/handlers/eventStreams.d.ts +58 -0
  27. package/lib/tools/auth0/handlers/eventStreams.js +186 -0
  28. package/lib/tools/auth0/handlers/index.js +10 -0
  29. package/lib/tools/auth0/handlers/prompts.js +1 -1
  30. package/lib/tools/auth0/handlers/rateLimitPolicies.d.ts +81 -0
  31. package/lib/tools/auth0/handlers/rateLimitPolicies.js +203 -0
  32. package/lib/tools/constants.d.ts +2 -0
  33. package/lib/tools/constants.js +2 -0
  34. package/lib/types.d.ts +5 -1
  35. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -7,6 +7,25 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [8.40.0] - 2026-07-09
11
+
12
+ ### Added
13
+
14
+ - Add client credential lifecycle management for Private Key JWT and mTLS authentication methods. [#1417]
15
+ - Add Rate Limit Policies (EA) support. [#1395]
16
+
17
+ ### Fixed
18
+
19
+ - Preserve `false` value for `default_head_tags_disabled` in screen renderer update. [#1416]
20
+ - Skip destination update for action event streams as the destination type cannot be changed after creation. [#1425]
21
+
22
+ ## [8.39.0] - 2026-06-30
23
+
24
+ ### Added
25
+
26
+ - Add `eventStreams` support. [#1412]
27
+ - Add `id_token_session_expiry_supported` validation for enterprise connections. [#1411]
28
+
10
29
  ## [8.38.0] - 2026-06-25
11
30
 
12
31
  ### Added
@@ -1835,6 +1854,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1835
1854
  [#1389]: https://github.com/auth0/auth0-deploy-cli/issues/1389
1836
1855
  [#1391]: https://github.com/auth0/auth0-deploy-cli/issues/1391
1837
1856
  [#1392]: https://github.com/auth0/auth0-deploy-cli/issues/1392
1857
+ [#1395]: https://github.com/auth0/auth0-deploy-cli/issues/1395
1838
1858
  [#1396]: https://github.com/auth0/auth0-deploy-cli/issues/1396
1839
1859
  [#1398]: https://github.com/auth0/auth0-deploy-cli/issues/1398
1840
1860
  [#1400]: https://github.com/auth0/auth0-deploy-cli/issues/1400
@@ -1845,7 +1865,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1845
1865
  [#1407]: https://github.com/auth0/auth0-deploy-cli/issues/1407
1846
1866
  [#1408]: https://github.com/auth0/auth0-deploy-cli/issues/1408
1847
1867
  [#1409]: https://github.com/auth0/auth0-deploy-cli/issues/1409
1848
- [Unreleased]: https://github.com/auth0/auth0-deploy-cli/compare/v8.38.0...HEAD
1868
+ [#1411]: https://github.com/auth0/auth0-deploy-cli/issues/1411
1869
+ [#1412]: https://github.com/auth0/auth0-deploy-cli/issues/1412
1870
+ [#1416]: https://github.com/auth0/auth0-deploy-cli/issues/1416
1871
+ [#1417]: https://github.com/auth0/auth0-deploy-cli/issues/1417
1872
+ [#1425]: https://github.com/auth0/auth0-deploy-cli/issues/1425
1873
+ [Unreleased]: https://github.com/auth0/auth0-deploy-cli/compare/v8.40.0...HEAD
1874
+ [8.40.0]: https://github.com/auth0/auth0-deploy-cli/compare/v8.39.0...v8.40.0
1875
+ [8.39.0]: https://github.com/auth0/auth0-deploy-cli/compare/v8.38.0...v8.39.0
1849
1876
  [8.38.0]: https://github.com/auth0/auth0-deploy-cli/compare/v8.37.0...v8.38.0
1850
1877
  [8.37.0]: https://github.com/auth0/auth0-deploy-cli/compare/v8.36.0...v8.37.0
1851
1878
  [8.36.0]: https://github.com/auth0/auth0-deploy-cli/compare/v8.35.0...v8.36.0
@@ -5,4 +5,5 @@ export declare function phoneProviderDefaults(phoneProvider: any): any;
5
5
  export declare function phoneTemplatesDefaults(phoneTemplate: any): any;
6
6
  export declare function connectionDefaults(connection: any, config?: Pick<Config, 'AUTH0_EXPORT_SECRETS'>): any;
7
7
  export declare function logStreamDefaults(logStreams: any, config?: Pick<Config, 'AUTH0_EXPORT_SECRETS'>): any;
8
+ export declare function eventStreamDefaults(eventStreams: any[], config?: Pick<Config, 'AUTH0_EXPORT_SECRETS'>): any[];
8
9
  export declare function attackProtectionDefaults(attackProtection: AttackProtection, config?: Pick<Config, 'AUTH0_EXPORT_SECRETS'>): AttackProtection;
@@ -5,6 +5,7 @@ exports.phoneProviderDefaults = phoneProviderDefaults;
5
5
  exports.phoneTemplatesDefaults = phoneTemplatesDefaults;
6
6
  exports.connectionDefaults = connectionDefaults;
7
7
  exports.logStreamDefaults = logStreamDefaults;
8
+ exports.eventStreamDefaults = eventStreamDefaults;
8
9
  exports.attackProtectionDefaults = attackProtectionDefaults;
9
10
  const utils_1 = require("../tools/utils");
10
11
  // env vars arrive as strings, so check both forms
@@ -146,6 +147,52 @@ function logStreamDefaults(logStreams, config) {
146
147
  });
147
148
  return maskedLogStreams;
148
149
  }
150
+ function eventStreamDefaults(eventStreams, config) {
151
+ return eventStreams.map((stream) => {
152
+ const { created_at: _ca, updated_at: _ua, ...rest } = stream;
153
+ stream = rest;
154
+ if (isExportSecrets(config))
155
+ return stream;
156
+ if (stream.destination?.type !== 'webhook')
157
+ return stream;
158
+ const auth = stream.destination.configuration?.webhook_authorization;
159
+ if (!auth)
160
+ return stream;
161
+ const method = auth.method;
162
+ let maskedAuth;
163
+ if (method === 'basic') {
164
+ maskedAuth = {
165
+ method,
166
+ username: auth.username ?? '',
167
+ password: `##EVENT_STREAM_WEBHOOK_BASIC_AUTH_PASSWORD##`,
168
+ };
169
+ }
170
+ else if (method === 'bearer') {
171
+ maskedAuth = { method, token: `##EVENT_STREAM_WEBHOOK_BEARER_TOKEN##` };
172
+ }
173
+ else if (method === 'custom_header') {
174
+ maskedAuth = {
175
+ method,
176
+ header_key: auth.header_key ?? '',
177
+ header_value: `##EVENT_STREAM_WEBHOOK_HEADER_VALUE##`,
178
+ };
179
+ }
180
+ else {
181
+ // Unknown auth method — preserve as-is rather than silently dropping credentials
182
+ return stream;
183
+ }
184
+ return {
185
+ ...stream,
186
+ destination: {
187
+ ...stream.destination,
188
+ configuration: {
189
+ ...stream.destination.configuration,
190
+ webhook_authorization: maskedAuth,
191
+ },
192
+ },
193
+ };
194
+ });
195
+ }
149
196
  function attackProtectionDefaults(attackProtection, config) {
150
197
  if (isExportSecrets(config))
151
198
  return attackProtection;
@@ -0,0 +1,5 @@
1
+ import { DirectoryHandler } from '.';
2
+ import { ParsedAsset } from '../../../types';
3
+ type ParsedClientAuthCredentials = ParsedAsset<'clientAuthCredentials', null>;
4
+ declare const clientAuthCredentialsHandler: DirectoryHandler<ParsedClientAuthCredentials>;
5
+ export default clientAuthCredentialsHandler;
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ function parse(_context) {
4
+ return { clientAuthCredentials: null };
5
+ }
6
+ async function dump(_context) {
7
+ // Credentials are embedded inside each client's JSON file — nothing to dump separately.
8
+ }
9
+ const clientAuthCredentialsHandler = {
10
+ parse,
11
+ dump,
12
+ };
13
+ exports.default = clientAuthCredentialsHandler;
@@ -106,6 +106,21 @@ async function dump(context) {
106
106
  organization_require_behavior: client.organization_require_behavior,
107
107
  };
108
108
  }
109
+ else {
110
+ // strip id-only credentials and remove client_authentication_methods entirely
111
+ // if no named credentials remain — an absent field is treated as deletion on deploy
112
+ if (client.client_authentication_methods) {
113
+ Object.values(client.client_authentication_methods).forEach((method) => {
114
+ if (method?.credentials) {
115
+ method.credentials = method.credentials.filter((c) => c.name);
116
+ }
117
+ });
118
+ const hasAnyCredentials = Object.values(client.client_authentication_methods).some((method) => method?.credentials?.length > 0);
119
+ if (!hasAnyCredentials) {
120
+ delete client.client_authentication_methods;
121
+ }
122
+ }
123
+ }
109
124
  (0, utils_1.dumpJSON)(clientFile, (0, utils_1.clearClientArrays)(client));
110
125
  });
111
126
  }
@@ -0,0 +1,5 @@
1
+ import { DirectoryHandler } from '.';
2
+ import { Asset, ParsedAsset } from '../../../types';
3
+ type ParsedEventStreams = ParsedAsset<'eventStreams', Asset[]>;
4
+ declare const eventStreamsHandler: DirectoryHandler<ParsedEventStreams>;
5
+ export default eventStreamsHandler;
@@ -0,0 +1,52 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const path_1 = __importDefault(require("path"));
7
+ const fs_extra_1 = __importDefault(require("fs-extra"));
8
+ const tools_1 = require("../../../tools");
9
+ const utils_1 = require("../../../utils");
10
+ const defaults_1 = require("../../defaults");
11
+ function parse(context) {
12
+ const eventStreamsDirectory = path_1.default.join(context.filePath, tools_1.constants.EVENT_STREAMS_DIRECTORY);
13
+ if (!(0, utils_1.existsMustBeDir)(eventStreamsDirectory))
14
+ return { eventStreams: null };
15
+ const foundFiles = (0, utils_1.getFiles)(eventStreamsDirectory, ['.json']);
16
+ const eventStreams = foundFiles
17
+ .map((f) => (0, utils_1.loadJSON)(f, {
18
+ mappings: context.mappings,
19
+ disableKeywordReplacement: context.disableKeywordReplacement,
20
+ }))
21
+ .filter((p) => Object.keys(p).length > 0);
22
+ return {
23
+ eventStreams,
24
+ };
25
+ }
26
+ async function dump(context) {
27
+ const { eventStreams } = context.assets;
28
+ if (!eventStreams)
29
+ return;
30
+ const eventStreamsDirectory = path_1.default.join(context.filePath, tools_1.constants.EVENT_STREAMS_DIRECTORY);
31
+ fs_extra_1.default.ensureDirSync(eventStreamsDirectory);
32
+ const maskedEventStreams = (0, defaults_1.eventStreamDefaults)(eventStreams, context.config);
33
+ const expectedFiles = new Set();
34
+ maskedEventStreams.forEach((eventStream) => {
35
+ const fileName = `${(0, utils_1.sanitize)(eventStream.name)}.json`;
36
+ const streamFile = path_1.default.join(eventStreamsDirectory, fileName);
37
+ (0, utils_1.dumpJSON)(streamFile, eventStream);
38
+ expectedFiles.add(fileName);
39
+ });
40
+ // Remove files for event streams no longer present in the tenant
41
+ for (const existing of fs_extra_1.default.readdirSync(eventStreamsDirectory)) {
42
+ const fullPath = path_1.default.join(eventStreamsDirectory, existing);
43
+ if (fs_extra_1.default.statSync(fullPath).isFile() && !expectedFiles.has(existing)) {
44
+ fs_extra_1.default.removeSync(fullPath);
45
+ }
46
+ }
47
+ }
48
+ const eventStreamsHandler = {
49
+ parse,
50
+ dump,
51
+ };
52
+ exports.default = eventStreamsHandler;
@@ -43,6 +43,9 @@ const userAttributeProfiles_1 = __importDefault(require("./userAttributeProfiles
43
43
  const connectionProfiles_1 = __importDefault(require("./connectionProfiles"));
44
44
  const tokenExchangeProfiles_1 = __importDefault(require("./tokenExchangeProfiles"));
45
45
  const supplementalSignals_1 = __importDefault(require("./supplementalSignals"));
46
+ const rateLimitPolicies_1 = __importDefault(require("./rateLimitPolicies"));
47
+ const eventStreams_1 = __importDefault(require("./eventStreams"));
48
+ const clientAuthCredentials_1 = __importDefault(require("./clientAuthCredentials"));
46
49
  const selfServiceProfiles_1 = __importDefault(require("./selfServiceProfiles"));
47
50
  const directoryHandlers = {
48
51
  rules: rules_1.default,
@@ -86,5 +89,8 @@ const directoryHandlers = {
86
89
  connectionProfiles: connectionProfiles_1.default,
87
90
  tokenExchangeProfiles: tokenExchangeProfiles_1.default,
88
91
  supplementalSignals: supplementalSignals_1.default,
92
+ rateLimitPolicies: rateLimitPolicies_1.default,
93
+ eventStreams: eventStreams_1.default,
94
+ clientAuthCredentials: clientAuthCredentials_1.default,
89
95
  };
90
96
  exports.default = directoryHandlers;
@@ -0,0 +1,6 @@
1
+ import { DirectoryHandler } from '.';
2
+ import { ParsedAsset } from '../../../types';
3
+ import { RateLimitPolicy } from '../../../tools/auth0/handlers/rateLimitPolicies';
4
+ type ParsedRateLimitPolicies = ParsedAsset<'rateLimitPolicies', RateLimitPolicy[]>;
5
+ declare const rateLimitPoliciesHandler: DirectoryHandler<ParsedRateLimitPolicies>;
6
+ export default rateLimitPoliciesHandler;
@@ -0,0 +1,53 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const path_1 = __importDefault(require("path"));
7
+ const fs_extra_1 = __importDefault(require("fs-extra"));
8
+ const tools_1 = require("../../../tools");
9
+ const utils_1 = require("../../../utils");
10
+ function parse(context) {
11
+ const rateLimitPoliciesDirectory = path_1.default.join(context.filePath, tools_1.constants.RATE_LIMIT_POLICIES_DIRECTORY);
12
+ if (!(0, utils_1.existsMustBeDir)(rateLimitPoliciesDirectory))
13
+ return { rateLimitPolicies: null }; // Skip
14
+ const foundFiles = (0, utils_1.getFiles)(rateLimitPoliciesDirectory, ['.json']);
15
+ const rateLimitPolicies = foundFiles
16
+ .map((f) => (0, utils_1.loadJSON)(f, {
17
+ mappings: context.mappings,
18
+ disableKeywordReplacement: context.disableKeywordReplacement,
19
+ }))
20
+ .filter((p) => Object.keys(p).length > 0);
21
+ return { rateLimitPolicies };
22
+ }
23
+ async function dump(context) {
24
+ const { rateLimitPolicies } = context.assets;
25
+ if (!rateLimitPolicies)
26
+ return; // Skip, nothing to dump
27
+ const rateLimitPoliciesDirectory = path_1.default.join(context.filePath, tools_1.constants.RATE_LIMIT_POLICIES_DIRECTORY);
28
+ fs_extra_1.default.ensureDirSync(rateLimitPoliciesDirectory);
29
+ const removeKeysFromOutput = ['id', 'created_at', 'updated_at'];
30
+ const expectedFiles = new Set();
31
+ rateLimitPolicies.forEach((policy) => {
32
+ const policyToWrite = { ...policy };
33
+ removeKeysFromOutput.forEach((key) => {
34
+ delete policyToWrite[key];
35
+ });
36
+ const fileName = (0, utils_1.sanitize)(policy.consumer_selector);
37
+ const filePath = path_1.default.join(rateLimitPoliciesDirectory, `${fileName}.json`);
38
+ expectedFiles.add(`${fileName}.json`);
39
+ (0, utils_1.dumpJSON)(filePath, policyToWrite);
40
+ });
41
+ // Remove files for policies that no longer exist in the tenant
42
+ for (const existing of fs_extra_1.default.readdirSync(rateLimitPoliciesDirectory)) {
43
+ const fullPath = path_1.default.join(rateLimitPoliciesDirectory, existing);
44
+ if (fs_extra_1.default.statSync(fullPath).isFile() && !expectedFiles.has(existing)) {
45
+ fs_extra_1.default.removeSync(fullPath);
46
+ }
47
+ }
48
+ }
49
+ const rateLimitPoliciesHandler = {
50
+ parse,
51
+ dump,
52
+ };
53
+ exports.default = rateLimitPoliciesHandler;
@@ -0,0 +1,5 @@
1
+ import { YAMLHandler } from '.';
2
+ import { ParsedAsset } from '../../../types';
3
+ type ParsedClientAuthCredentials = ParsedAsset<'clientAuthCredentials', null>;
4
+ declare const clientAuthCredentialsHandler: YAMLHandler<ParsedClientAuthCredentials>;
5
+ export default clientAuthCredentialsHandler;
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ async function parse(_context) {
4
+ return { clientAuthCredentials: null };
5
+ }
6
+ async function dump(_context) {
7
+ return { clientAuthCredentials: null };
8
+ }
9
+ const clientAuthCredentialsHandler = {
10
+ parse,
11
+ dump,
12
+ };
13
+ exports.default = clientAuthCredentialsHandler;
@@ -99,6 +99,21 @@ async function dump(context) {
99
99
  organization_require_behavior: client.organization_require_behavior,
100
100
  };
101
101
  }
102
+ else {
103
+ // strip id-only credentials and remove client_authentication_methods entirely
104
+ // if no named credentials remain — an absent field is treated as deletion on deploy
105
+ if (client.client_authentication_methods) {
106
+ Object.values(client.client_authentication_methods).forEach((method) => {
107
+ if (method?.credentials) {
108
+ method.credentials = method.credentials.filter((c) => c.name);
109
+ }
110
+ });
111
+ const hasAnyCredentials = Object.values(client.client_authentication_methods).some((method) => method?.credentials?.length > 0);
112
+ if (!hasAnyCredentials) {
113
+ delete client.client_authentication_methods;
114
+ }
115
+ }
116
+ }
102
117
  return (0, utils_1.clearClientArrays)(client);
103
118
  }),
104
119
  ],
@@ -0,0 +1,5 @@
1
+ import { YAMLHandler } from '.';
2
+ import { Asset, ParsedAsset } from '../../../types';
3
+ type ParsedEventStreams = ParsedAsset<'eventStreams', Asset[]>;
4
+ declare const eventStreamsHandler: YAMLHandler<ParsedEventStreams>;
5
+ export default eventStreamsHandler;
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const defaults_1 = require("../../defaults");
4
+ async function parse(context) {
5
+ const { eventStreams } = context.assets;
6
+ if (!eventStreams)
7
+ return { eventStreams: null };
8
+ return {
9
+ eventStreams,
10
+ };
11
+ }
12
+ async function dump(context) {
13
+ const { eventStreams } = context.assets;
14
+ if (!eventStreams)
15
+ return { eventStreams: null };
16
+ return {
17
+ eventStreams: (0, defaults_1.eventStreamDefaults)(eventStreams, context.config),
18
+ };
19
+ }
20
+ const eventStreamsHandler = {
21
+ parse,
22
+ dump,
23
+ };
24
+ exports.default = eventStreamsHandler;
@@ -43,6 +43,9 @@ const userAttributeProfiles_1 = __importDefault(require("./userAttributeProfiles
43
43
  const connectionProfiles_1 = __importDefault(require("./connectionProfiles"));
44
44
  const tokenExchangeProfiles_1 = __importDefault(require("./tokenExchangeProfiles"));
45
45
  const supplementalSignals_1 = __importDefault(require("./supplementalSignals"));
46
+ const rateLimitPolicies_1 = __importDefault(require("./rateLimitPolicies"));
47
+ const eventStreams_1 = __importDefault(require("./eventStreams"));
48
+ const clientAuthCredentials_1 = __importDefault(require("./clientAuthCredentials"));
46
49
  const selfServiceProfiles_1 = __importDefault(require("./selfServiceProfiles"));
47
50
  const yamlHandlers = {
48
51
  rules: rules_1.default,
@@ -86,5 +89,8 @@ const yamlHandlers = {
86
89
  connectionProfiles: connectionProfiles_1.default,
87
90
  tokenExchangeProfiles: tokenExchangeProfiles_1.default,
88
91
  supplementalSignals: supplementalSignals_1.default,
92
+ rateLimitPolicies: rateLimitPolicies_1.default,
93
+ eventStreams: eventStreams_1.default,
94
+ clientAuthCredentials: clientAuthCredentials_1.default,
89
95
  };
90
96
  exports.default = yamlHandlers;
@@ -0,0 +1,6 @@
1
+ import { YAMLHandler } from '.';
2
+ import { ParsedAsset } from '../../../types';
3
+ import { RateLimitPolicy } from '../../../tools/auth0/handlers/rateLimitPolicies';
4
+ type ParsedRateLimitPolicies = ParsedAsset<'rateLimitPolicies', RateLimitPolicy[]>;
5
+ declare const rateLimitPoliciesHandler: YAMLHandler<ParsedRateLimitPolicies>;
6
+ export default rateLimitPoliciesHandler;
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ async function parse(context) {
4
+ const { rateLimitPolicies } = context.assets;
5
+ if (!rateLimitPolicies)
6
+ return { rateLimitPolicies: null };
7
+ return { rateLimitPolicies };
8
+ }
9
+ async function dump(context) {
10
+ const { rateLimitPolicies } = context.assets;
11
+ if (!rateLimitPolicies)
12
+ return { rateLimitPolicies: null };
13
+ const removeKeysFromOutput = ['id', 'created_at', 'updated_at'];
14
+ const cleaned = rateLimitPolicies.map((policy) => {
15
+ const policyToWrite = { ...policy };
16
+ removeKeysFromOutput.forEach((key) => {
17
+ delete policyToWrite[key];
18
+ });
19
+ return policyToWrite;
20
+ });
21
+ return { rateLimitPolicies: cleaned };
22
+ }
23
+ const rateLimitPoliciesHandler = {
24
+ parse,
25
+ dump,
26
+ };
27
+ exports.default = rateLimitPoliciesHandler;
@@ -0,0 +1,26 @@
1
+ import { Assets, Auth0APIClient } from '../../../types';
2
+ import { ConfigFunction } from '../../../configFactory';
3
+ export declare const schema: {
4
+ type: string;
5
+ items: {
6
+ type: string;
7
+ };
8
+ };
9
+ export default class ClientAuthCredentialsHandler {
10
+ client: Auth0APIClient;
11
+ config: ConfigFunction;
12
+ type: string;
13
+ existing: null;
14
+ constructor({ client, config }: {
15
+ client: Auth0APIClient;
16
+ config: ConfigFunction;
17
+ });
18
+ getType(): Promise<null>;
19
+ load(): Promise<{
20
+ [x: string]: null;
21
+ }>;
22
+ validate(): Promise<null>;
23
+ processChanges(assets: Assets): Promise<void>;
24
+ private inferCredentialType;
25
+ private inferMethodFromType;
26
+ }