auth0 6.3.0 → 7.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/README.md +20 -15
- package/dist/cjs/index.d.ts +0 -2
- package/dist/cjs/index.js +0 -2
- package/dist/cjs/lib/errors.d.ts +0 -18
- package/dist/cjs/lib/errors.js +1 -25
- package/dist/cjs/lib/middleware/auth0-client-telemetry.d.ts +3 -7
- package/dist/cjs/lib/middleware/auth0-client-telemetry.js +1 -25
- package/dist/cjs/lib/models.d.ts +0 -24
- package/dist/cjs/lib/models.js +0 -53
- package/dist/cjs/management/Client.d.ts +3 -0
- package/dist/cjs/management/Client.js +45 -40
- package/dist/cjs/management/api/errors/UnprocessableEntityError.d.ts +5 -0
- package/dist/cjs/management/api/errors/UnprocessableEntityError.js +54 -0
- package/dist/cjs/management/api/errors/index.d.ts +1 -0
- package/dist/cjs/management/api/errors/index.js +1 -0
- package/dist/cjs/management/api/requests/requests.d.ts +91 -0
- package/dist/cjs/management/api/resources/connections/client/Client.d.ts +2 -0
- package/dist/cjs/management/api/resources/connections/client/Client.js +6 -0
- package/dist/cjs/management/api/resources/connections/resources/scimConfiguration/client/Client.d.ts +1 -0
- package/dist/cjs/management/api/resources/connections/resources/scimConfiguration/client/Client.js +3 -0
- package/dist/cjs/management/api/resources/index.d.ts +1 -0
- package/dist/cjs/management/api/resources/index.js +2 -1
- package/dist/cjs/management/api/resources/keys/resources/networkAcls/client/Client.d.ts +17 -0
- package/dist/cjs/management/api/resources/keys/resources/networkAcls/client/Client.js +60 -0
- package/dist/cjs/management/api/resources/organizationTemplates/client/Client.d.ts +106 -0
- package/dist/cjs/management/api/resources/organizationTemplates/client/Client.js +411 -0
- package/dist/cjs/management/api/resources/organizationTemplates/client/index.d.ts +1 -0
- package/dist/cjs/management/api/resources/organizationTemplates/client/index.js +2 -0
- package/dist/cjs/management/api/resources/organizationTemplates/exports.d.ts +2 -0
- package/dist/cjs/management/api/resources/organizationTemplates/exports.js +21 -0
- package/dist/cjs/management/api/resources/organizationTemplates/index.d.ts +1 -0
- package/dist/cjs/{lib → management/api/resources/organizationTemplates}/index.js +1 -2
- package/dist/cjs/management/api/resources/organizations/client/Client.d.ts +3 -0
- package/dist/cjs/management/api/resources/organizations/client/Client.js +7 -2
- package/dist/cjs/management/api/resources/organizations/resources/index.d.ts +1 -0
- package/dist/cjs/management/api/resources/organizations/resources/index.js +2 -1
- package/dist/cjs/management/api/resources/organizations/resources/organizationTemplate/client/Client.d.ts +63 -0
- package/dist/cjs/management/api/resources/organizations/resources/organizationTemplate/client/Client.js +232 -0
- package/dist/cjs/management/api/resources/organizations/resources/organizationTemplate/client/index.d.ts +1 -0
- package/dist/cjs/management/api/resources/organizations/resources/organizationTemplate/client/index.js +2 -0
- package/dist/cjs/management/api/resources/organizations/resources/organizationTemplate/exports.d.ts +2 -0
- package/dist/cjs/management/api/resources/organizations/resources/organizationTemplate/exports.js +21 -0
- package/dist/cjs/management/api/resources/organizations/resources/organizationTemplate/index.d.ts +1 -0
- package/dist/cjs/management/api/resources/organizations/resources/organizationTemplate/index.js +17 -0
- package/dist/cjs/management/api/resources/users/resources/organizations/client/Client.d.ts +17 -0
- package/dist/cjs/management/api/resources/users/resources/organizations/client/Client.js +19 -0
- package/dist/cjs/management/api/types/types.d.ts +8896 -2027
- package/dist/cjs/management/api/types/types.js +1455 -166
- package/dist/cjs/management/version.d.ts +1 -1
- package/dist/cjs/management/version.js +1 -1
- package/dist/cjs/management/wrapper/ManagementClient.d.ts +9 -2
- package/dist/cjs/management/wrapper/ManagementClient.js +0 -1
- package/dist/cjs/management/wrapper/token-provider.d.ts +4 -2
- package/dist/cjs/management/wrapper/token-provider.js +142 -11
- package/dist/cjs/utils.d.ts +0 -18
- package/dist/cjs/utils.js +1 -32
- package/dist/esm/index.d.mts +0 -2
- package/dist/esm/index.mjs +0 -2
- package/dist/esm/lib/errors.d.mts +0 -18
- package/dist/esm/lib/errors.mjs +0 -22
- package/dist/esm/lib/middleware/auth0-client-telemetry.d.mts +3 -7
- package/dist/esm/lib/middleware/auth0-client-telemetry.mjs +1 -25
- package/dist/esm/lib/models.d.mts +0 -24
- package/dist/esm/lib/models.mjs +1 -49
- package/dist/esm/management/Client.d.mts +3 -0
- package/dist/esm/management/Client.mjs +5 -0
- package/dist/esm/management/api/errors/UnprocessableEntityError.d.mts +5 -0
- package/dist/esm/management/api/errors/UnprocessableEntityError.mjs +17 -0
- package/dist/esm/management/api/errors/index.d.mts +1 -0
- package/dist/esm/management/api/errors/index.mjs +1 -0
- package/dist/esm/management/api/requests/requests.d.mts +91 -0
- package/dist/esm/management/api/resources/connections/client/Client.d.mts +2 -0
- package/dist/esm/management/api/resources/connections/client/Client.mjs +6 -0
- package/dist/esm/management/api/resources/connections/resources/scimConfiguration/client/Client.d.mts +1 -0
- package/dist/esm/management/api/resources/connections/resources/scimConfiguration/client/Client.mjs +3 -0
- package/dist/esm/management/api/resources/index.d.mts +1 -0
- package/dist/esm/management/api/resources/index.mjs +1 -0
- package/dist/esm/management/api/resources/keys/resources/networkAcls/client/Client.d.mts +17 -0
- package/dist/esm/management/api/resources/keys/resources/networkAcls/client/Client.mjs +60 -0
- package/dist/esm/management/api/resources/organizationTemplates/client/Client.d.mts +106 -0
- package/dist/esm/management/api/resources/organizationTemplates/client/Client.mjs +374 -0
- package/dist/esm/management/api/resources/organizationTemplates/client/index.d.mts +1 -0
- package/dist/esm/management/api/resources/organizationTemplates/client/index.mjs +1 -0
- package/dist/esm/management/api/resources/organizationTemplates/exports.d.mts +2 -0
- package/dist/esm/management/api/resources/organizationTemplates/exports.mjs +3 -0
- package/dist/esm/management/api/resources/organizationTemplates/index.d.mts +1 -0
- package/dist/esm/management/api/resources/organizationTemplates/index.mjs +1 -0
- package/dist/esm/management/api/resources/organizations/client/Client.d.mts +3 -0
- package/dist/esm/management/api/resources/organizations/client/Client.mjs +5 -0
- package/dist/esm/management/api/resources/organizations/resources/index.d.mts +1 -0
- package/dist/esm/management/api/resources/organizations/resources/index.mjs +1 -0
- package/dist/esm/management/api/resources/organizations/resources/organizationTemplate/client/Client.d.mts +63 -0
- package/dist/esm/management/api/resources/organizations/resources/organizationTemplate/client/Client.mjs +195 -0
- package/dist/esm/management/api/resources/organizations/resources/organizationTemplate/client/index.d.mts +1 -0
- package/dist/esm/management/api/resources/organizations/resources/organizationTemplate/client/index.mjs +1 -0
- package/dist/esm/management/api/resources/organizations/resources/organizationTemplate/exports.d.mts +2 -0
- package/dist/esm/management/api/resources/organizations/resources/organizationTemplate/exports.mjs +3 -0
- package/dist/esm/management/api/resources/organizations/resources/organizationTemplate/index.d.mts +1 -0
- package/dist/esm/management/api/resources/organizations/resources/organizationTemplate/index.mjs +1 -0
- package/dist/esm/management/api/resources/users/resources/organizations/client/Client.d.mts +17 -0
- package/dist/esm/management/api/resources/users/resources/organizations/client/Client.mjs +19 -0
- package/dist/esm/management/api/types/types.d.mts +8896 -2027
- package/dist/esm/management/api/types/types.mjs +1434 -150
- package/dist/esm/management/version.d.mts +1 -1
- package/dist/esm/management/version.mjs +1 -1
- package/dist/esm/management/wrapper/ManagementClient.d.mts +9 -2
- package/dist/esm/management/wrapper/ManagementClient.mjs +0 -1
- package/dist/esm/management/wrapper/token-provider.d.mts +4 -2
- package/dist/esm/management/wrapper/token-provider.mjs +142 -11
- package/dist/esm/utils.d.mts +0 -18
- package/dist/esm/utils.mjs +0 -30
- package/package.json +23 -2
- package/reference.md +688 -28
- package/dist/cjs/auth/backchannel.d.ts +0 -158
- package/dist/cjs/auth/backchannel.js +0 -135
- package/dist/cjs/auth/base-auth-api.d.ts +0 -41
- package/dist/cjs/auth/base-auth-api.js +0 -109
- package/dist/cjs/auth/client-authentication.d.ts +0 -27
- package/dist/cjs/auth/client-authentication.js +0 -82
- package/dist/cjs/auth/database.d.ts +0 -157
- package/dist/cjs/auth/database.js +0 -94
- package/dist/cjs/auth/id-token-validator.d.ts +0 -18
- package/dist/cjs/auth/id-token-validator.js +0 -158
- package/dist/cjs/auth/index.d.ts +0 -65
- package/dist/cjs/auth/index.js +0 -80
- package/dist/cjs/auth/oauth.d.ts +0 -462
- package/dist/cjs/auth/oauth.js +0 -280
- package/dist/cjs/auth/passwordless.d.ts +0 -165
- package/dist/cjs/auth/passwordless.js +0 -173
- package/dist/cjs/auth/tokenExchange.d.ts +0 -166
- package/dist/cjs/auth/tokenExchange.js +0 -74
- package/dist/cjs/lib/index.d.ts +0 -3
- package/dist/cjs/lib/runtime.d.ts +0 -61
- package/dist/cjs/lib/runtime.js +0 -222
- package/dist/cjs/userinfo/index.d.ts +0 -87
- package/dist/cjs/userinfo/index.js +0 -104
- package/dist/esm/auth/backchannel.d.mts +0 -158
- package/dist/esm/auth/backchannel.mjs +0 -131
- package/dist/esm/auth/base-auth-api.d.mts +0 -41
- package/dist/esm/auth/base-auth-api.mjs +0 -103
- package/dist/esm/auth/client-authentication.d.mts +0 -27
- package/dist/esm/auth/client-authentication.mjs +0 -45
- package/dist/esm/auth/database.d.mts +0 -157
- package/dist/esm/auth/database.mjs +0 -90
- package/dist/esm/auth/id-token-validator.d.mts +0 -18
- package/dist/esm/auth/id-token-validator.mjs +0 -120
- package/dist/esm/auth/index.d.mts +0 -65
- package/dist/esm/auth/index.mjs +0 -60
- package/dist/esm/auth/oauth.d.mts +0 -462
- package/dist/esm/auth/oauth.mjs +0 -276
- package/dist/esm/auth/passwordless.d.mts +0 -165
- package/dist/esm/auth/passwordless.mjs +0 -169
- package/dist/esm/auth/tokenExchange.d.mts +0 -166
- package/dist/esm/auth/tokenExchange.mjs +0 -70
- package/dist/esm/lib/index.d.mts +0 -3
- package/dist/esm/lib/index.mjs +0 -2
- package/dist/esm/lib/runtime.d.mts +0 -61
- package/dist/esm/lib/runtime.mjs +0 -201
- package/dist/esm/userinfo/index.d.mts +0 -87
- package/dist/esm/userinfo/index.mjs +0 -98
package/README.md
CHANGED
|
@@ -15,6 +15,8 @@
|
|
|
15
15
|
- [SDK Documentation](http://auth0.github.io/node-auth0/) - explore the SDK documentation
|
|
16
16
|
- [API Reference](https://github.com/auth0/node-auth0/blob/master/reference.md) - full reference for this library
|
|
17
17
|
- [v6 Migration Guide](https://github.com/auth0/node-auth0/blob/master/v6_MIGRATION_GUIDE.md) - upgrade from v5 to v6
|
|
18
|
+
- [v7 Migration Guide](https://github.com/auth0/node-auth0/blob/master/v7_MIGRATION_GUIDE.md) - upgrade from v6 to v7
|
|
19
|
+
- [Authentication Migration Guide](https://github.com/auth0/node-auth0/tree/master/auth-migration) - migrate the Authentication API layer to `@auth0/auth0-auth-js` / `@auth0/auth0-server-js`
|
|
18
20
|
|
|
19
21
|
## Getting Started
|
|
20
22
|
|
|
@@ -34,20 +36,22 @@ npm install auth0
|
|
|
34
36
|
|
|
35
37
|
### Configure the SDK
|
|
36
38
|
|
|
37
|
-
#### Authentication
|
|
39
|
+
#### Authentication
|
|
38
40
|
|
|
39
|
-
|
|
41
|
+
For authentication operations (OAuth flows, token management, user sign-up), use [`@auth0/auth0-auth-js`](https://github.com/auth0/auth0-auth-js/tree/main/packages/auth0-auth-js). As of v7, node-auth0 no longer ships `AuthenticationClient` in its main entrypoint. The authentication layer has been separated into a dedicated package.
|
|
40
42
|
|
|
41
43
|
```js
|
|
42
|
-
import {
|
|
44
|
+
import { AuthClient } from "@auth0/auth0-auth-js";
|
|
43
45
|
|
|
44
|
-
const
|
|
46
|
+
const auth = new AuthClient({
|
|
45
47
|
domain: "{YOUR_TENANT_AND REGION}.auth0.com",
|
|
46
48
|
clientId: "{YOUR_CLIENT_ID}",
|
|
47
49
|
clientSecret: "{OPTIONAL_CLIENT_SECRET}",
|
|
48
50
|
});
|
|
49
51
|
```
|
|
50
52
|
|
|
53
|
+
See the [auth0-auth-js documentation](https://github.com/auth0/auth0-auth-js/tree/main/packages/auth0-auth-js) for full API reference.
|
|
54
|
+
|
|
51
55
|
#### Management API Client
|
|
52
56
|
|
|
53
57
|
The Auth0 Management API is meant to be used by back-end servers or trusted parties performing administrative tasks. Generally speaking, anything that can be done through the Auth0 dashboard (and more) can also be done through this API.
|
|
@@ -169,25 +173,28 @@ types from the root `auth0` entry adds nothing to your bundle and does not pull
|
|
|
169
173
|
> through a bundler. A plain CommonJS `require()` cannot tree-shake and loads the full
|
|
170
174
|
> resource graph.
|
|
171
175
|
|
|
172
|
-
####
|
|
176
|
+
#### User Profile Information
|
|
173
177
|
|
|
174
|
-
|
|
178
|
+
As of v7, node-auth0 no longer ships `UserInfoClient`. Use `authClient.getUserInfo` from `@auth0/auth0-auth-js` instead.
|
|
175
179
|
|
|
176
180
|
```js
|
|
177
|
-
import {
|
|
181
|
+
import { AuthClient } from "@auth0/auth0-auth-js";
|
|
178
182
|
|
|
179
|
-
const
|
|
180
|
-
domain: "{YOUR_TENANT_AND REGION}.auth0.com",
|
|
181
|
-
});
|
|
183
|
+
const auth = new AuthClient({ domain: "...", clientId: "..." });
|
|
182
184
|
|
|
183
|
-
//
|
|
184
|
-
|
|
185
|
+
// Requires a default OIDC token (openid scope, no explicit audience).
|
|
186
|
+
// If your app uses MRRT, request https://{domain}/userinfo as the audience.
|
|
187
|
+
const profile = await auth.getUserInfo({ accessToken });
|
|
185
188
|
```
|
|
186
189
|
|
|
190
|
+
Note: tokens issued with a custom `audience` (e.g. the Management API) are rejected by `/userinfo`. Use a token obtained without an explicit audience, or request `https://{domain}/userinfo` as the audience when using MRRT.
|
|
191
|
+
|
|
187
192
|
## Legacy Usage
|
|
188
193
|
|
|
189
194
|
If you are migrating from the legacy `node-auth0` package (v4.x) or need to maintain compatibility with legacy code, you can use the legacy export which provides the `node-auth0` v4.x API interface.
|
|
190
195
|
|
|
196
|
+
**Note:** The legacy entrypoint still includes `AuthenticationClient` from the v4.x API. This is separate from the v7 main entrypoint, which no longer ships authentication clients.
|
|
197
|
+
|
|
191
198
|
### Installing Legacy Version
|
|
192
199
|
|
|
193
200
|
The legacy version (`node-auth0` v4.x) is available through the `/legacy` export path:
|
|
@@ -202,7 +209,7 @@ const { ManagementClient, AuthenticationClient } = require("auth0/legacy");
|
|
|
202
209
|
|
|
203
210
|
### Legacy Configuration
|
|
204
211
|
|
|
205
|
-
The legacy API uses the `node-auth0` v4.x configuration format and method signatures, which are different from the current
|
|
212
|
+
The legacy API uses the `node-auth0` v4.x configuration format and method signatures, which are different from the current API:
|
|
206
213
|
|
|
207
214
|
#### Legacy Management Client
|
|
208
215
|
|
|
@@ -375,8 +382,6 @@ const actions = await client.actions.list(listParams);
|
|
|
375
382
|
### Key Classes
|
|
376
383
|
|
|
377
384
|
- **ManagementClient** - for Auth0 Management API operations
|
|
378
|
-
- **AuthenticationClient** - for Auth0 Authentication API operations
|
|
379
|
-
- **UserInfoClient** - for retrieving user profile information
|
|
380
385
|
|
|
381
386
|
## Exception Handling
|
|
382
387
|
|
package/dist/cjs/index.d.ts
CHANGED
package/dist/cjs/index.js
CHANGED
|
@@ -15,8 +15,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./management/index.js"), exports);
|
|
18
|
-
__exportStar(require("./auth/index.js"), exports);
|
|
19
|
-
__exportStar(require("./userinfo/index.js"), exports);
|
|
20
18
|
__exportStar(require("./lib/errors.js"), exports);
|
|
21
19
|
__exportStar(require("./lib/models.js"), exports);
|
|
22
20
|
__exportStar(require("./lib/httpResponseHeadersUtils.js"), exports);
|
package/dist/cjs/lib/errors.d.ts
CHANGED
|
@@ -1,13 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Error thrown when the API returns an error response that can't be parsed to a more specific Error instance.
|
|
3
|
-
*/
|
|
4
|
-
export declare class ResponseError extends Error {
|
|
5
|
-
statusCode: number;
|
|
6
|
-
body: string;
|
|
7
|
-
headers: Headers;
|
|
8
|
-
name: "ResponseError";
|
|
9
|
-
constructor(statusCode: number, body: string, headers: Headers, msg?: string);
|
|
10
|
-
}
|
|
11
1
|
/**
|
|
12
2
|
* Error thrown when the request is aborted due to a timeout.
|
|
13
3
|
*/
|
|
@@ -15,14 +5,6 @@ export declare class TimeoutError extends Error {
|
|
|
15
5
|
name: "TimeoutError";
|
|
16
6
|
constructor();
|
|
17
7
|
}
|
|
18
|
-
/**
|
|
19
|
-
* Error thrown when there is a network error.
|
|
20
|
-
*/
|
|
21
|
-
export declare class FetchError extends Error {
|
|
22
|
-
cause: Error;
|
|
23
|
-
name: "FetchError";
|
|
24
|
-
constructor(cause: Error, msg?: string);
|
|
25
|
-
}
|
|
26
8
|
/**
|
|
27
9
|
* Error thrown when a required argument was not provided.
|
|
28
10
|
*/
|
package/dist/cjs/lib/errors.js
CHANGED
|
@@ -1,19 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.RequiredError = exports.
|
|
4
|
-
/**
|
|
5
|
-
* Error thrown when the API returns an error response that can't be parsed to a more specific Error instance.
|
|
6
|
-
*/
|
|
7
|
-
class ResponseError extends Error {
|
|
8
|
-
constructor(statusCode, body, headers, msg) {
|
|
9
|
-
super(msg);
|
|
10
|
-
this.statusCode = statusCode;
|
|
11
|
-
this.body = body;
|
|
12
|
-
this.headers = headers;
|
|
13
|
-
this.name = "ResponseError";
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
exports.ResponseError = ResponseError;
|
|
3
|
+
exports.RequiredError = exports.TimeoutError = void 0;
|
|
17
4
|
/**
|
|
18
5
|
* Error thrown when the request is aborted due to a timeout.
|
|
19
6
|
*/
|
|
@@ -24,17 +11,6 @@ class TimeoutError extends Error {
|
|
|
24
11
|
}
|
|
25
12
|
}
|
|
26
13
|
exports.TimeoutError = TimeoutError;
|
|
27
|
-
/**
|
|
28
|
-
* Error thrown when there is a network error.
|
|
29
|
-
*/
|
|
30
|
-
class FetchError extends Error {
|
|
31
|
-
constructor(cause, msg) {
|
|
32
|
-
super(msg);
|
|
33
|
-
this.cause = cause;
|
|
34
|
-
this.name = "FetchError";
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
exports.FetchError = FetchError;
|
|
38
14
|
/**
|
|
39
15
|
* Error thrown when a required argument was not provided.
|
|
40
16
|
*/
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ClientOptions } from "../models.js";
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
4
|
-
* for automatic header injection and as a standalone utility for manual telemetry header generation.
|
|
3
|
+
* Generates the Auth0-Client telemetry header value.
|
|
5
4
|
* @private
|
|
6
5
|
*/
|
|
7
|
-
export declare class Auth0ClientTelemetry
|
|
6
|
+
export declare class Auth0ClientTelemetry {
|
|
8
7
|
clientInfo: {
|
|
9
8
|
name: string;
|
|
10
9
|
[key: string]: unknown;
|
|
@@ -12,9 +11,6 @@ export declare class Auth0ClientTelemetry implements Middleware {
|
|
|
12
11
|
constructor(options: ClientOptions);
|
|
13
12
|
/**
|
|
14
13
|
* Get the Auth0-Client header value for telemetry.
|
|
15
|
-
* This method can be used when you need to manually add telemetry headers
|
|
16
|
-
* instead of using the middleware system.
|
|
17
14
|
*/
|
|
18
15
|
getAuth0ClientHeader(): string | undefined;
|
|
19
|
-
pre?(context: RequestContext): Promise<FetchParams | void>;
|
|
20
16
|
}
|
|
@@ -1,20 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
3
|
exports.Auth0ClientTelemetry = void 0;
|
|
13
4
|
const utils_js_1 = require("../../utils.js");
|
|
14
5
|
const jose_1 = require("jose");
|
|
15
6
|
/**
|
|
16
|
-
*
|
|
17
|
-
* for automatic header injection and as a standalone utility for manual telemetry header generation.
|
|
7
|
+
* Generates the Auth0-Client telemetry header value.
|
|
18
8
|
* @private
|
|
19
9
|
*/
|
|
20
10
|
class Auth0ClientTelemetry {
|
|
@@ -23,8 +13,6 @@ class Auth0ClientTelemetry {
|
|
|
23
13
|
}
|
|
24
14
|
/**
|
|
25
15
|
* Get the Auth0-Client header value for telemetry.
|
|
26
|
-
* This method can be used when you need to manually add telemetry headers
|
|
27
|
-
* instead of using the middleware system.
|
|
28
16
|
*/
|
|
29
17
|
getAuth0ClientHeader() {
|
|
30
18
|
if ("string" === typeof this.clientInfo.name && this.clientInfo.name.length > 0) {
|
|
@@ -32,17 +20,5 @@ class Auth0ClientTelemetry {
|
|
|
32
20
|
}
|
|
33
21
|
return undefined;
|
|
34
22
|
}
|
|
35
|
-
pre(context) {
|
|
36
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
37
|
-
const headerValue = this.getAuth0ClientHeader();
|
|
38
|
-
if (headerValue) {
|
|
39
|
-
context.init.headers = Object.assign(Object.assign({}, context.init.headers), { "Auth0-Client": headerValue });
|
|
40
|
-
}
|
|
41
|
-
return {
|
|
42
|
-
url: context.url,
|
|
43
|
-
init: context.init,
|
|
44
|
-
};
|
|
45
|
-
});
|
|
46
|
-
}
|
|
47
23
|
}
|
|
48
24
|
exports.Auth0ClientTelemetry = Auth0ClientTelemetry;
|
package/dist/cjs/lib/models.d.ts
CHANGED
|
@@ -71,30 +71,6 @@ export interface ApiResponse<T> {
|
|
|
71
71
|
status: number;
|
|
72
72
|
statusText: string;
|
|
73
73
|
}
|
|
74
|
-
export declare class JSONApiResponse<T> implements ApiResponse<T> {
|
|
75
|
-
data: T;
|
|
76
|
-
headers: Headers;
|
|
77
|
-
readonly status: number;
|
|
78
|
-
readonly statusText: string;
|
|
79
|
-
constructor(data: T, headers: Headers, status: number, statusText: string);
|
|
80
|
-
static fromResponse<T = unknown>(raw: Response): Promise<JSONApiResponse<T>>;
|
|
81
|
-
}
|
|
82
|
-
export declare class VoidApiResponse implements ApiResponse<undefined> {
|
|
83
|
-
headers: Headers;
|
|
84
|
-
readonly status: number;
|
|
85
|
-
readonly statusText: string;
|
|
86
|
-
data: undefined;
|
|
87
|
-
constructor(headers: Headers, status: number, statusText: string);
|
|
88
|
-
static fromResponse(raw: Response): Promise<VoidApiResponse>;
|
|
89
|
-
}
|
|
90
|
-
export declare class TextApiResponse implements ApiResponse<string> {
|
|
91
|
-
data: string;
|
|
92
|
-
headers: Headers;
|
|
93
|
-
readonly status: number;
|
|
94
|
-
readonly statusText: string;
|
|
95
|
-
constructor(data: string, headers: Headers, status: number, statusText: string);
|
|
96
|
-
static fromResponse(raw: Response): Promise<TextApiResponse>;
|
|
97
|
-
}
|
|
98
74
|
export interface FetchParams {
|
|
99
75
|
url: string | URL | Request;
|
|
100
76
|
init: RequestInit;
|
package/dist/cjs/lib/models.js
CHANGED
|
@@ -1,55 +1,2 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.TextApiResponse = exports.VoidApiResponse = exports.JSONApiResponse = void 0;
|
|
13
|
-
class JSONApiResponse {
|
|
14
|
-
constructor(data, headers, status, statusText) {
|
|
15
|
-
this.data = data;
|
|
16
|
-
this.headers = headers;
|
|
17
|
-
this.status = status;
|
|
18
|
-
this.statusText = statusText;
|
|
19
|
-
}
|
|
20
|
-
static fromResponse(raw) {
|
|
21
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
22
|
-
const value = (yield raw.json());
|
|
23
|
-
return new JSONApiResponse(value, raw.headers, raw.status, raw.statusText);
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
exports.JSONApiResponse = JSONApiResponse;
|
|
28
|
-
class VoidApiResponse {
|
|
29
|
-
constructor(headers, status, statusText) {
|
|
30
|
-
this.headers = headers;
|
|
31
|
-
this.status = status;
|
|
32
|
-
this.statusText = statusText;
|
|
33
|
-
}
|
|
34
|
-
static fromResponse(raw) {
|
|
35
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
36
|
-
return new VoidApiResponse(raw.headers, raw.status, raw.statusText);
|
|
37
|
-
});
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
exports.VoidApiResponse = VoidApiResponse;
|
|
41
|
-
class TextApiResponse {
|
|
42
|
-
constructor(data, headers, status, statusText) {
|
|
43
|
-
this.data = data;
|
|
44
|
-
this.headers = headers;
|
|
45
|
-
this.status = status;
|
|
46
|
-
this.statusText = statusText;
|
|
47
|
-
}
|
|
48
|
-
static fromResponse(raw) {
|
|
49
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
50
|
-
const value = yield raw.text();
|
|
51
|
-
return new TextApiResponse(value, raw.headers, raw.status, raw.statusText);
|
|
52
|
-
});
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
exports.TextApiResponse = TextApiResponse;
|
|
@@ -24,6 +24,7 @@ import { LogsClient } from "./api/resources/logs/client/Client.js";
|
|
|
24
24
|
import { LogStreamsClient } from "./api/resources/logStreams/client/Client.js";
|
|
25
25
|
import { NetworkAclsClient } from "./api/resources/networkAcls/client/Client.js";
|
|
26
26
|
import { OrganizationsClient } from "./api/resources/organizations/client/Client.js";
|
|
27
|
+
import { OrganizationTemplatesClient } from "./api/resources/organizationTemplates/client/Client.js";
|
|
27
28
|
import { PromptsClient } from "./api/resources/prompts/client/Client.js";
|
|
28
29
|
import { RateLimitPoliciesClient } from "./api/resources/rateLimitPolicies/client/Client.js";
|
|
29
30
|
import { RefreshTokensClient } from "./api/resources/refreshTokens/client/Client.js";
|
|
@@ -75,6 +76,7 @@ export declare class ManagementClient {
|
|
|
75
76
|
protected _logStreams: LogStreamsClient | undefined;
|
|
76
77
|
protected _logs: LogsClient | undefined;
|
|
77
78
|
protected _networkAcls: NetworkAclsClient | undefined;
|
|
79
|
+
protected _organizationTemplates: OrganizationTemplatesClient | undefined;
|
|
78
80
|
protected _organizations: OrganizationsClient | undefined;
|
|
79
81
|
protected _prompts: PromptsClient | undefined;
|
|
80
82
|
protected _rateLimitPolicies: RateLimitPoliciesClient | undefined;
|
|
@@ -122,6 +124,7 @@ export declare class ManagementClient {
|
|
|
122
124
|
get logStreams(): LogStreamsClient;
|
|
123
125
|
get logs(): LogsClient;
|
|
124
126
|
get networkAcls(): NetworkAclsClient;
|
|
127
|
+
get organizationTemplates(): OrganizationTemplatesClient;
|
|
125
128
|
get organizations(): OrganizationsClient;
|
|
126
129
|
get prompts(): PromptsClient;
|
|
127
130
|
get rateLimitPolicies(): RateLimitPoliciesClient;
|
|
@@ -70,26 +70,27 @@ const Client_js_23 = require("./api/resources/logs/client/Client.js");
|
|
|
70
70
|
const Client_js_24 = require("./api/resources/logStreams/client/Client.js");
|
|
71
71
|
const Client_js_25 = require("./api/resources/networkAcls/client/Client.js");
|
|
72
72
|
const Client_js_26 = require("./api/resources/organizations/client/Client.js");
|
|
73
|
-
const Client_js_27 = require("./api/resources/
|
|
74
|
-
const Client_js_28 = require("./api/resources/
|
|
75
|
-
const Client_js_29 = require("./api/resources/
|
|
76
|
-
const Client_js_30 = require("./api/resources/
|
|
77
|
-
const Client_js_31 = require("./api/resources/
|
|
78
|
-
const Client_js_32 = require("./api/resources/
|
|
79
|
-
const Client_js_33 = require("./api/resources/
|
|
80
|
-
const Client_js_34 = require("./api/resources/
|
|
81
|
-
const Client_js_35 = require("./api/resources/
|
|
82
|
-
const Client_js_36 = require("./api/resources/
|
|
83
|
-
const Client_js_37 = require("./api/resources/
|
|
84
|
-
const Client_js_38 = require("./api/resources/
|
|
85
|
-
const Client_js_39 = require("./api/resources/
|
|
86
|
-
const Client_js_40 = require("./api/resources/
|
|
87
|
-
const Client_js_41 = require("./api/resources/
|
|
88
|
-
const Client_js_42 = require("./api/resources/
|
|
89
|
-
const Client_js_43 = require("./api/resources/
|
|
90
|
-
const Client_js_44 = require("./api/resources/
|
|
91
|
-
const Client_js_45 = require("./api/resources/
|
|
92
|
-
const Client_js_46 = require("./api/resources/
|
|
73
|
+
const Client_js_27 = require("./api/resources/organizationTemplates/client/Client.js");
|
|
74
|
+
const Client_js_28 = require("./api/resources/prompts/client/Client.js");
|
|
75
|
+
const Client_js_29 = require("./api/resources/rateLimitPolicies/client/Client.js");
|
|
76
|
+
const Client_js_30 = require("./api/resources/refreshTokens/client/Client.js");
|
|
77
|
+
const Client_js_31 = require("./api/resources/resourceServers/client/Client.js");
|
|
78
|
+
const Client_js_32 = require("./api/resources/riskAssessments/client/Client.js");
|
|
79
|
+
const Client_js_33 = require("./api/resources/roles/client/Client.js");
|
|
80
|
+
const Client_js_34 = require("./api/resources/rules/client/Client.js");
|
|
81
|
+
const Client_js_35 = require("./api/resources/rulesConfigs/client/Client.js");
|
|
82
|
+
const Client_js_36 = require("./api/resources/selfServiceProfiles/client/Client.js");
|
|
83
|
+
const Client_js_37 = require("./api/resources/sessions/client/Client.js");
|
|
84
|
+
const Client_js_38 = require("./api/resources/stats/client/Client.js");
|
|
85
|
+
const Client_js_39 = require("./api/resources/supplementalSignals/client/Client.js");
|
|
86
|
+
const Client_js_40 = require("./api/resources/tenants/client/Client.js");
|
|
87
|
+
const Client_js_41 = require("./api/resources/tickets/client/Client.js");
|
|
88
|
+
const Client_js_42 = require("./api/resources/tokenExchangeProfiles/client/Client.js");
|
|
89
|
+
const Client_js_43 = require("./api/resources/userAttributeProfiles/client/Client.js");
|
|
90
|
+
const Client_js_44 = require("./api/resources/userBlocks/client/Client.js");
|
|
91
|
+
const Client_js_45 = require("./api/resources/userGrants/client/Client.js");
|
|
92
|
+
const Client_js_46 = require("./api/resources/users/client/Client.js");
|
|
93
|
+
const Client_js_47 = require("./api/resources/verifiableCredentials/client/Client.js");
|
|
93
94
|
const BaseClient_js_1 = require("./BaseClient.js");
|
|
94
95
|
const core = __importStar(require("./core/index.js"));
|
|
95
96
|
class ManagementClient {
|
|
@@ -154,7 +155,7 @@ class ManagementClient {
|
|
|
154
155
|
}
|
|
155
156
|
get userGrants() {
|
|
156
157
|
var _a;
|
|
157
|
-
return ((_a = this._userGrants) !== null && _a !== void 0 ? _a : (this._userGrants = new
|
|
158
|
+
return ((_a = this._userGrants) !== null && _a !== void 0 ? _a : (this._userGrants = new Client_js_45.UserGrantsClient(this._options)));
|
|
158
159
|
}
|
|
159
160
|
get groups() {
|
|
160
161
|
var _a;
|
|
@@ -180,73 +181,77 @@ class ManagementClient {
|
|
|
180
181
|
var _a;
|
|
181
182
|
return ((_a = this._networkAcls) !== null && _a !== void 0 ? _a : (this._networkAcls = new Client_js_25.NetworkAclsClient(this._options)));
|
|
182
183
|
}
|
|
184
|
+
get organizationTemplates() {
|
|
185
|
+
var _a;
|
|
186
|
+
return ((_a = this._organizationTemplates) !== null && _a !== void 0 ? _a : (this._organizationTemplates = new Client_js_27.OrganizationTemplatesClient(this._options)));
|
|
187
|
+
}
|
|
183
188
|
get organizations() {
|
|
184
189
|
var _a;
|
|
185
190
|
return ((_a = this._organizations) !== null && _a !== void 0 ? _a : (this._organizations = new Client_js_26.OrganizationsClient(this._options)));
|
|
186
191
|
}
|
|
187
192
|
get prompts() {
|
|
188
193
|
var _a;
|
|
189
|
-
return ((_a = this._prompts) !== null && _a !== void 0 ? _a : (this._prompts = new
|
|
194
|
+
return ((_a = this._prompts) !== null && _a !== void 0 ? _a : (this._prompts = new Client_js_28.PromptsClient(this._options)));
|
|
190
195
|
}
|
|
191
196
|
get rateLimitPolicies() {
|
|
192
197
|
var _a;
|
|
193
|
-
return ((_a = this._rateLimitPolicies) !== null && _a !== void 0 ? _a : (this._rateLimitPolicies = new
|
|
198
|
+
return ((_a = this._rateLimitPolicies) !== null && _a !== void 0 ? _a : (this._rateLimitPolicies = new Client_js_29.RateLimitPoliciesClient(this._options)));
|
|
194
199
|
}
|
|
195
200
|
get refreshTokens() {
|
|
196
201
|
var _a;
|
|
197
|
-
return ((_a = this._refreshTokens) !== null && _a !== void 0 ? _a : (this._refreshTokens = new
|
|
202
|
+
return ((_a = this._refreshTokens) !== null && _a !== void 0 ? _a : (this._refreshTokens = new Client_js_30.RefreshTokensClient(this._options)));
|
|
198
203
|
}
|
|
199
204
|
get resourceServers() {
|
|
200
205
|
var _a;
|
|
201
|
-
return ((_a = this._resourceServers) !== null && _a !== void 0 ? _a : (this._resourceServers = new
|
|
206
|
+
return ((_a = this._resourceServers) !== null && _a !== void 0 ? _a : (this._resourceServers = new Client_js_31.ResourceServersClient(this._options)));
|
|
202
207
|
}
|
|
203
208
|
get roles() {
|
|
204
209
|
var _a;
|
|
205
|
-
return ((_a = this._roles) !== null && _a !== void 0 ? _a : (this._roles = new
|
|
210
|
+
return ((_a = this._roles) !== null && _a !== void 0 ? _a : (this._roles = new Client_js_33.RolesClient(this._options)));
|
|
206
211
|
}
|
|
207
212
|
get rules() {
|
|
208
213
|
var _a;
|
|
209
|
-
return ((_a = this._rules) !== null && _a !== void 0 ? _a : (this._rules = new
|
|
214
|
+
return ((_a = this._rules) !== null && _a !== void 0 ? _a : (this._rules = new Client_js_34.RulesClient(this._options)));
|
|
210
215
|
}
|
|
211
216
|
get rulesConfigs() {
|
|
212
217
|
var _a;
|
|
213
|
-
return ((_a = this._rulesConfigs) !== null && _a !== void 0 ? _a : (this._rulesConfigs = new
|
|
218
|
+
return ((_a = this._rulesConfigs) !== null && _a !== void 0 ? _a : (this._rulesConfigs = new Client_js_35.RulesConfigsClient(this._options)));
|
|
214
219
|
}
|
|
215
220
|
get selfServiceProfiles() {
|
|
216
221
|
var _a;
|
|
217
|
-
return ((_a = this._selfServiceProfiles) !== null && _a !== void 0 ? _a : (this._selfServiceProfiles = new
|
|
222
|
+
return ((_a = this._selfServiceProfiles) !== null && _a !== void 0 ? _a : (this._selfServiceProfiles = new Client_js_36.SelfServiceProfilesClient(this._options)));
|
|
218
223
|
}
|
|
219
224
|
get sessions() {
|
|
220
225
|
var _a;
|
|
221
|
-
return ((_a = this._sessions) !== null && _a !== void 0 ? _a : (this._sessions = new
|
|
226
|
+
return ((_a = this._sessions) !== null && _a !== void 0 ? _a : (this._sessions = new Client_js_37.SessionsClient(this._options)));
|
|
222
227
|
}
|
|
223
228
|
get stats() {
|
|
224
229
|
var _a;
|
|
225
|
-
return ((_a = this._stats) !== null && _a !== void 0 ? _a : (this._stats = new
|
|
230
|
+
return ((_a = this._stats) !== null && _a !== void 0 ? _a : (this._stats = new Client_js_38.StatsClient(this._options)));
|
|
226
231
|
}
|
|
227
232
|
get supplementalSignals() {
|
|
228
233
|
var _a;
|
|
229
|
-
return ((_a = this._supplementalSignals) !== null && _a !== void 0 ? _a : (this._supplementalSignals = new
|
|
234
|
+
return ((_a = this._supplementalSignals) !== null && _a !== void 0 ? _a : (this._supplementalSignals = new Client_js_39.SupplementalSignalsClient(this._options)));
|
|
230
235
|
}
|
|
231
236
|
get tickets() {
|
|
232
237
|
var _a;
|
|
233
|
-
return ((_a = this._tickets) !== null && _a !== void 0 ? _a : (this._tickets = new
|
|
238
|
+
return ((_a = this._tickets) !== null && _a !== void 0 ? _a : (this._tickets = new Client_js_41.TicketsClient(this._options)));
|
|
234
239
|
}
|
|
235
240
|
get tokenExchangeProfiles() {
|
|
236
241
|
var _a;
|
|
237
|
-
return ((_a = this._tokenExchangeProfiles) !== null && _a !== void 0 ? _a : (this._tokenExchangeProfiles = new
|
|
242
|
+
return ((_a = this._tokenExchangeProfiles) !== null && _a !== void 0 ? _a : (this._tokenExchangeProfiles = new Client_js_42.TokenExchangeProfilesClient(this._options)));
|
|
238
243
|
}
|
|
239
244
|
get userAttributeProfiles() {
|
|
240
245
|
var _a;
|
|
241
|
-
return ((_a = this._userAttributeProfiles) !== null && _a !== void 0 ? _a : (this._userAttributeProfiles = new
|
|
246
|
+
return ((_a = this._userAttributeProfiles) !== null && _a !== void 0 ? _a : (this._userAttributeProfiles = new Client_js_43.UserAttributeProfilesClient(this._options)));
|
|
242
247
|
}
|
|
243
248
|
get userBlocks() {
|
|
244
249
|
var _a;
|
|
245
|
-
return ((_a = this._userBlocks) !== null && _a !== void 0 ? _a : (this._userBlocks = new
|
|
250
|
+
return ((_a = this._userBlocks) !== null && _a !== void 0 ? _a : (this._userBlocks = new Client_js_44.UserBlocksClient(this._options)));
|
|
246
251
|
}
|
|
247
252
|
get users() {
|
|
248
253
|
var _a;
|
|
249
|
-
return ((_a = this._users) !== null && _a !== void 0 ? _a : (this._users = new
|
|
254
|
+
return ((_a = this._users) !== null && _a !== void 0 ? _a : (this._users = new Client_js_46.UsersClient(this._options)));
|
|
250
255
|
}
|
|
251
256
|
get anomaly() {
|
|
252
257
|
var _a;
|
|
@@ -270,15 +275,15 @@ class ManagementClient {
|
|
|
270
275
|
}
|
|
271
276
|
get riskAssessments() {
|
|
272
277
|
var _a;
|
|
273
|
-
return ((_a = this._riskAssessments) !== null && _a !== void 0 ? _a : (this._riskAssessments = new
|
|
278
|
+
return ((_a = this._riskAssessments) !== null && _a !== void 0 ? _a : (this._riskAssessments = new Client_js_32.RiskAssessmentsClient(this._options)));
|
|
274
279
|
}
|
|
275
280
|
get tenants() {
|
|
276
281
|
var _a;
|
|
277
|
-
return ((_a = this._tenants) !== null && _a !== void 0 ? _a : (this._tenants = new
|
|
282
|
+
return ((_a = this._tenants) !== null && _a !== void 0 ? _a : (this._tenants = new Client_js_40.TenantsClient(this._options)));
|
|
278
283
|
}
|
|
279
284
|
get verifiableCredentials() {
|
|
280
285
|
var _a;
|
|
281
|
-
return ((_a = this._verifiableCredentials) !== null && _a !== void 0 ? _a : (this._verifiableCredentials = new
|
|
286
|
+
return ((_a = this._verifiableCredentials) !== null && _a !== void 0 ? _a : (this._verifiableCredentials = new Client_js_47.VerifiableCredentialsClient(this._options)));
|
|
282
287
|
}
|
|
283
288
|
/**
|
|
284
289
|
* Make a passthrough request using the SDK's configured auth, retry, logging, etc.
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
+
if (k2 === undefined) k2 = k;
|
|
5
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
+
}
|
|
9
|
+
Object.defineProperty(o, k2, desc);
|
|
10
|
+
}) : (function(o, m, k, k2) {
|
|
11
|
+
if (k2 === undefined) k2 = k;
|
|
12
|
+
o[k2] = m[k];
|
|
13
|
+
}));
|
|
14
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
15
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
16
|
+
}) : function(o, v) {
|
|
17
|
+
o["default"] = v;
|
|
18
|
+
});
|
|
19
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
20
|
+
var ownKeys = function(o) {
|
|
21
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
22
|
+
var ar = [];
|
|
23
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
24
|
+
return ar;
|
|
25
|
+
};
|
|
26
|
+
return ownKeys(o);
|
|
27
|
+
};
|
|
28
|
+
return function (mod) {
|
|
29
|
+
if (mod && mod.__esModule) return mod;
|
|
30
|
+
var result = {};
|
|
31
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
32
|
+
__setModuleDefault(result, mod);
|
|
33
|
+
return result;
|
|
34
|
+
};
|
|
35
|
+
})();
|
|
36
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
|
+
exports.UnprocessableEntityError = void 0;
|
|
38
|
+
const errors = __importStar(require("../../errors/index.js"));
|
|
39
|
+
class UnprocessableEntityError extends errors.ManagementError {
|
|
40
|
+
constructor(body, rawResponse) {
|
|
41
|
+
super({
|
|
42
|
+
message: "UnprocessableEntityError",
|
|
43
|
+
statusCode: 422,
|
|
44
|
+
body: body,
|
|
45
|
+
rawResponse: rawResponse,
|
|
46
|
+
});
|
|
47
|
+
Object.setPrototypeOf(this, new.target.prototype);
|
|
48
|
+
if (Error.captureStackTrace) {
|
|
49
|
+
Error.captureStackTrace(this, this.constructor);
|
|
50
|
+
}
|
|
51
|
+
this.name = "UnprocessableEntityError";
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
exports.UnprocessableEntityError = UnprocessableEntityError;
|
|
@@ -26,3 +26,4 @@ __exportStar(require("./PreconditionFailedError.js"), exports);
|
|
|
26
26
|
__exportStar(require("./ServiceUnavailableError.js"), exports);
|
|
27
27
|
__exportStar(require("./TooManyRequestsError.js"), exports);
|
|
28
28
|
__exportStar(require("./UnauthorizedError.js"), exports);
|
|
29
|
+
__exportStar(require("./UnprocessableEntityError.js"), exports);
|