auth0 6.4.0 → 7.1.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 +5 -5
- package/dist/cjs/management/Client.js +28 -28
- package/dist/cjs/management/api/errors/GatewayTimeoutError.d.ts +5 -0
- package/dist/cjs/management/api/errors/GatewayTimeoutError.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 +112 -88
- package/dist/cjs/management/api/resources/experimentation/client/Client.d.ts +12 -0
- package/dist/cjs/management/api/resources/experimentation/client/Client.js +16 -0
- package/dist/cjs/management/api/resources/experimentation/exports.d.ts +3 -0
- package/dist/cjs/management/api/resources/experimentation/exports.js +22 -0
- package/dist/cjs/management/api/resources/experimentation/index.d.ts +2 -0
- package/dist/cjs/management/api/resources/experimentation/index.js +18 -0
- package/dist/cjs/management/api/resources/experimentation/resources/experiments/client/Client.d.ts +34 -0
- package/dist/cjs/management/api/resources/experimentation/resources/experiments/client/Client.js +131 -0
- package/dist/cjs/management/api/resources/experimentation/resources/experiments/client/index.js +2 -0
- package/dist/cjs/management/api/resources/experimentation/resources/experiments/exports.d.ts +2 -0
- package/dist/cjs/management/api/resources/{organizationTemplates → experimentation/resources/experiments}/exports.js +2 -2
- package/dist/cjs/management/api/resources/experimentation/resources/index.d.ts +1 -0
- package/dist/cjs/management/api/resources/experimentation/resources/index.js +37 -0
- package/dist/cjs/management/api/resources/guardian/client/Client.d.ts +40 -1
- package/dist/cjs/management/api/resources/guardian/client/Client.js +172 -0
- package/dist/cjs/management/api/resources/guardian/resources/factors/client/Client.d.ts +3 -0
- package/dist/cjs/management/api/resources/guardian/resources/factors/client/Client.js +11 -6
- package/dist/cjs/management/api/resources/guardian/resources/factors/resources/email/client/Client.d.ts +46 -0
- package/dist/cjs/management/api/resources/guardian/resources/factors/resources/email/client/Client.js +181 -0
- package/dist/cjs/management/api/resources/guardian/resources/factors/resources/email/client/index.js +2 -0
- package/dist/cjs/management/api/resources/guardian/resources/factors/resources/email/exports.d.ts +2 -0
- package/dist/cjs/management/api/resources/guardian/resources/factors/resources/email/exports.js +21 -0
- package/dist/cjs/management/api/resources/guardian/resources/factors/resources/email/index.d.ts +1 -0
- package/dist/cjs/{lib → management/api/resources/guardian/resources/factors/resources/email}/index.js +1 -2
- package/dist/cjs/management/api/resources/guardian/resources/factors/resources/index.d.ts +1 -0
- package/dist/cjs/management/api/resources/guardian/resources/factors/resources/index.js +2 -1
- package/dist/cjs/management/api/resources/guardian/resources/factors/resources/phone/client/Client.d.ts +33 -0
- package/dist/cjs/management/api/resources/guardian/resources/factors/resources/phone/client/Client.js +122 -0
- package/dist/cjs/management/api/resources/index.d.ts +1 -1
- package/dist/cjs/management/api/resources/index.js +2 -2
- package/dist/cjs/management/api/resources/organizations/client/Client.d.ts +36 -0
- package/dist/cjs/management/api/resources/organizations/client/Client.js +104 -0
- package/dist/cjs/management/api/resources/resourceServers/client/Client.d.ts +29 -0
- package/dist/cjs/management/api/resources/resourceServers/client/Client.js +103 -0
- package/dist/cjs/management/api/types/types.d.ts +226 -51
- package/dist/cjs/management/api/types/types.js +37 -36
- 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 +5 -5
- package/dist/esm/management/Client.mjs +7 -7
- package/dist/esm/management/api/errors/GatewayTimeoutError.d.mts +5 -0
- package/dist/esm/management/api/errors/GatewayTimeoutError.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 +112 -88
- package/dist/esm/management/api/resources/experimentation/client/Client.d.mts +12 -0
- package/dist/esm/management/api/resources/experimentation/client/Client.mjs +12 -0
- package/dist/esm/management/api/resources/experimentation/client/index.d.mts +1 -0
- package/dist/esm/management/api/resources/experimentation/client/index.mjs +1 -0
- package/dist/esm/management/api/resources/experimentation/exports.d.mts +3 -0
- package/dist/esm/management/api/resources/experimentation/exports.mjs +4 -0
- package/dist/esm/management/api/resources/experimentation/index.d.mts +2 -0
- package/dist/esm/management/api/resources/experimentation/index.mjs +2 -0
- package/dist/esm/management/api/resources/experimentation/resources/experiments/client/Client.d.mts +34 -0
- package/dist/esm/management/api/resources/experimentation/resources/experiments/client/Client.mjs +94 -0
- package/dist/esm/management/api/resources/experimentation/resources/experiments/client/index.d.mts +1 -0
- package/dist/esm/management/api/resources/experimentation/resources/experiments/client/index.mjs +1 -0
- package/dist/esm/management/api/resources/experimentation/resources/experiments/exports.d.mts +2 -0
- package/dist/esm/management/api/resources/{organizationTemplates → experimentation/resources/experiments}/exports.mjs +1 -1
- package/dist/esm/management/api/resources/experimentation/resources/index.d.mts +1 -0
- package/dist/esm/management/api/resources/experimentation/resources/index.mjs +1 -0
- package/dist/esm/management/api/resources/guardian/client/Client.d.mts +40 -1
- package/dist/esm/management/api/resources/guardian/client/Client.mjs +139 -0
- package/dist/esm/management/api/resources/guardian/resources/factors/client/Client.d.mts +3 -0
- package/dist/esm/management/api/resources/guardian/resources/factors/client/Client.mjs +5 -0
- package/dist/esm/management/api/resources/guardian/resources/factors/resources/email/client/Client.d.mts +46 -0
- package/dist/esm/management/api/resources/guardian/resources/factors/resources/email/client/Client.mjs +144 -0
- package/dist/esm/management/api/resources/guardian/resources/factors/resources/email/client/index.d.mts +1 -0
- package/dist/esm/management/api/resources/guardian/resources/factors/resources/email/client/index.mjs +1 -0
- package/dist/esm/management/api/resources/guardian/resources/factors/resources/email/exports.d.mts +2 -0
- package/dist/esm/management/api/resources/guardian/resources/factors/resources/email/exports.mjs +3 -0
- package/dist/esm/management/api/resources/guardian/resources/factors/resources/email/index.d.mts +1 -0
- package/dist/esm/management/api/resources/guardian/resources/factors/resources/email/index.mjs +1 -0
- package/dist/esm/management/api/resources/guardian/resources/factors/resources/index.d.mts +1 -0
- package/dist/esm/management/api/resources/guardian/resources/factors/resources/index.mjs +1 -0
- package/dist/esm/management/api/resources/guardian/resources/factors/resources/phone/client/Client.d.mts +33 -0
- package/dist/esm/management/api/resources/guardian/resources/factors/resources/phone/client/Client.mjs +122 -0
- package/dist/esm/management/api/resources/index.d.mts +1 -1
- package/dist/esm/management/api/resources/index.mjs +1 -1
- package/dist/esm/management/api/resources/organizations/client/Client.d.mts +36 -0
- package/dist/esm/management/api/resources/organizations/client/Client.mjs +104 -0
- package/dist/esm/management/api/resources/resourceServers/client/Client.d.mts +29 -0
- package/dist/esm/management/api/resources/resourceServers/client/Client.mjs +103 -0
- package/dist/esm/management/api/types/types.d.mts +226 -51
- package/dist/esm/management/api/types/types.mjs +34 -33
- 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 +45 -23
- package/reference.md +654 -389
- 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/management/api/resources/organizationTemplates/client/Client.d.ts +0 -106
- package/dist/cjs/management/api/resources/organizationTemplates/client/Client.js +0 -411
- package/dist/cjs/management/api/resources/organizationTemplates/exports.d.ts +0 -2
- 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/management/api/resources/organizationTemplates/client/Client.d.mts +0 -106
- package/dist/esm/management/api/resources/organizationTemplates/client/Client.mjs +0 -374
- package/dist/esm/management/api/resources/organizationTemplates/exports.d.mts +0 -2
- package/dist/esm/userinfo/index.d.mts +0 -87
- package/dist/esm/userinfo/index.mjs +0 -98
- /package/dist/cjs/management/api/resources/{organizationTemplates → experimentation}/client/index.d.ts +0 -0
- /package/dist/cjs/management/api/resources/{organizationTemplates → experimentation}/client/index.js +0 -0
- /package/dist/{esm/management/api/resources/organizationTemplates/client/index.d.mts → cjs/management/api/resources/experimentation/resources/experiments/client/index.d.ts} +0 -0
- /package/dist/cjs/management/api/resources/{organizationTemplates → experimentation/resources/experiments}/index.d.ts +0 -0
- /package/dist/cjs/management/api/resources/{organizationTemplates → experimentation/resources/experiments}/index.js +0 -0
- /package/dist/{esm/management/api/resources/organizationTemplates/client/index.mjs → cjs/management/api/resources/guardian/resources/factors/resources/email/client/index.d.ts} +0 -0
- /package/dist/esm/management/api/resources/{organizationTemplates → experimentation/resources/experiments}/index.d.mts +0 -0
- /package/dist/esm/management/api/resources/{organizationTemplates → experimentation/resources/experiments}/index.mjs +0 -0
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;
|
|
@@ -13,6 +13,7 @@ import { EmailsClient } from "./api/resources/emails/client/Client.js";
|
|
|
13
13
|
import { EmailTemplatesClient } from "./api/resources/emailTemplates/client/Client.js";
|
|
14
14
|
import { EventsClient } from "./api/resources/events/client/Client.js";
|
|
15
15
|
import { EventStreamsClient } from "./api/resources/eventStreams/client/Client.js";
|
|
16
|
+
import { ExperimentationClient } from "./api/resources/experimentation/client/Client.js";
|
|
16
17
|
import { FlowsClient } from "./api/resources/flows/client/Client.js";
|
|
17
18
|
import { FormsClient } from "./api/resources/forms/client/Client.js";
|
|
18
19
|
import { GroupsClient } from "./api/resources/groups/client/Client.js";
|
|
@@ -24,7 +25,6 @@ import { LogsClient } from "./api/resources/logs/client/Client.js";
|
|
|
24
25
|
import { LogStreamsClient } from "./api/resources/logStreams/client/Client.js";
|
|
25
26
|
import { NetworkAclsClient } from "./api/resources/networkAcls/client/Client.js";
|
|
26
27
|
import { OrganizationsClient } from "./api/resources/organizations/client/Client.js";
|
|
27
|
-
import { OrganizationTemplatesClient } from "./api/resources/organizationTemplates/client/Client.js";
|
|
28
28
|
import { PromptsClient } from "./api/resources/prompts/client/Client.js";
|
|
29
29
|
import { RateLimitPoliciesClient } from "./api/resources/rateLimitPolicies/client/Client.js";
|
|
30
30
|
import { RefreshTokensClient } from "./api/resources/refreshTokens/client/Client.js";
|
|
@@ -71,12 +71,12 @@ export declare class ManagementClient {
|
|
|
71
71
|
protected _forms: FormsClient | undefined;
|
|
72
72
|
protected _userGrants: UserGrantsClient | undefined;
|
|
73
73
|
protected _groups: GroupsClient | undefined;
|
|
74
|
+
protected _guardian: GuardianClient | undefined;
|
|
74
75
|
protected _hooks: HooksClient | undefined;
|
|
75
76
|
protected _jobs: JobsClient | undefined;
|
|
76
77
|
protected _logStreams: LogStreamsClient | undefined;
|
|
77
78
|
protected _logs: LogsClient | undefined;
|
|
78
79
|
protected _networkAcls: NetworkAclsClient | undefined;
|
|
79
|
-
protected _organizationTemplates: OrganizationTemplatesClient | undefined;
|
|
80
80
|
protected _organizations: OrganizationsClient | undefined;
|
|
81
81
|
protected _prompts: PromptsClient | undefined;
|
|
82
82
|
protected _rateLimitPolicies: RateLimitPoliciesClient | undefined;
|
|
@@ -97,7 +97,7 @@ export declare class ManagementClient {
|
|
|
97
97
|
protected _anomaly: AnomalyClient | undefined;
|
|
98
98
|
protected _attackProtection: AttackProtectionClient | undefined;
|
|
99
99
|
protected _emails: EmailsClient | undefined;
|
|
100
|
-
protected
|
|
100
|
+
protected _experimentation: ExperimentationClient | undefined;
|
|
101
101
|
protected _keys: KeysClient | undefined;
|
|
102
102
|
protected _riskAssessments: RiskAssessmentsClient | undefined;
|
|
103
103
|
protected _tenants: TenantsClient | undefined;
|
|
@@ -119,12 +119,12 @@ export declare class ManagementClient {
|
|
|
119
119
|
get forms(): FormsClient;
|
|
120
120
|
get userGrants(): UserGrantsClient;
|
|
121
121
|
get groups(): GroupsClient;
|
|
122
|
+
get guardian(): GuardianClient;
|
|
122
123
|
get hooks(): HooksClient;
|
|
123
124
|
get jobs(): JobsClient;
|
|
124
125
|
get logStreams(): LogStreamsClient;
|
|
125
126
|
get logs(): LogsClient;
|
|
126
127
|
get networkAcls(): NetworkAclsClient;
|
|
127
|
-
get organizationTemplates(): OrganizationTemplatesClient;
|
|
128
128
|
get organizations(): OrganizationsClient;
|
|
129
129
|
get prompts(): PromptsClient;
|
|
130
130
|
get rateLimitPolicies(): RateLimitPoliciesClient;
|
|
@@ -145,7 +145,7 @@ export declare class ManagementClient {
|
|
|
145
145
|
get anomaly(): AnomalyClient;
|
|
146
146
|
get attackProtection(): AttackProtectionClient;
|
|
147
147
|
get emails(): EmailsClient;
|
|
148
|
-
get
|
|
148
|
+
get experimentation(): ExperimentationClient;
|
|
149
149
|
get keys(): KeysClient;
|
|
150
150
|
get riskAssessments(): RiskAssessmentsClient;
|
|
151
151
|
get tenants(): TenantsClient;
|
|
@@ -59,18 +59,18 @@ const Client_js_12 = require("./api/resources/emails/client/Client.js");
|
|
|
59
59
|
const Client_js_13 = require("./api/resources/emailTemplates/client/Client.js");
|
|
60
60
|
const Client_js_14 = require("./api/resources/events/client/Client.js");
|
|
61
61
|
const Client_js_15 = require("./api/resources/eventStreams/client/Client.js");
|
|
62
|
-
const Client_js_16 = require("./api/resources/
|
|
63
|
-
const Client_js_17 = require("./api/resources/
|
|
64
|
-
const Client_js_18 = require("./api/resources/
|
|
65
|
-
const Client_js_19 = require("./api/resources/
|
|
66
|
-
const Client_js_20 = require("./api/resources/
|
|
67
|
-
const Client_js_21 = require("./api/resources/
|
|
68
|
-
const Client_js_22 = require("./api/resources/
|
|
69
|
-
const Client_js_23 = require("./api/resources/
|
|
70
|
-
const Client_js_24 = require("./api/resources/
|
|
71
|
-
const Client_js_25 = require("./api/resources/
|
|
72
|
-
const Client_js_26 = require("./api/resources/
|
|
73
|
-
const Client_js_27 = require("./api/resources/
|
|
62
|
+
const Client_js_16 = require("./api/resources/experimentation/client/Client.js");
|
|
63
|
+
const Client_js_17 = require("./api/resources/flows/client/Client.js");
|
|
64
|
+
const Client_js_18 = require("./api/resources/forms/client/Client.js");
|
|
65
|
+
const Client_js_19 = require("./api/resources/groups/client/Client.js");
|
|
66
|
+
const Client_js_20 = require("./api/resources/guardian/client/Client.js");
|
|
67
|
+
const Client_js_21 = require("./api/resources/hooks/client/Client.js");
|
|
68
|
+
const Client_js_22 = require("./api/resources/jobs/client/Client.js");
|
|
69
|
+
const Client_js_23 = require("./api/resources/keys/client/Client.js");
|
|
70
|
+
const Client_js_24 = require("./api/resources/logs/client/Client.js");
|
|
71
|
+
const Client_js_25 = require("./api/resources/logStreams/client/Client.js");
|
|
72
|
+
const Client_js_26 = require("./api/resources/networkAcls/client/Client.js");
|
|
73
|
+
const Client_js_27 = require("./api/resources/organizations/client/Client.js");
|
|
74
74
|
const Client_js_28 = require("./api/resources/prompts/client/Client.js");
|
|
75
75
|
const Client_js_29 = require("./api/resources/rateLimitPolicies/client/Client.js");
|
|
76
76
|
const Client_js_30 = require("./api/resources/refreshTokens/client/Client.js");
|
|
@@ -147,11 +147,11 @@ class ManagementClient {
|
|
|
147
147
|
}
|
|
148
148
|
get flows() {
|
|
149
149
|
var _a;
|
|
150
|
-
return ((_a = this._flows) !== null && _a !== void 0 ? _a : (this._flows = new
|
|
150
|
+
return ((_a = this._flows) !== null && _a !== void 0 ? _a : (this._flows = new Client_js_17.FlowsClient(this._options)));
|
|
151
151
|
}
|
|
152
152
|
get forms() {
|
|
153
153
|
var _a;
|
|
154
|
-
return ((_a = this._forms) !== null && _a !== void 0 ? _a : (this._forms = new
|
|
154
|
+
return ((_a = this._forms) !== null && _a !== void 0 ? _a : (this._forms = new Client_js_18.FormsClient(this._options)));
|
|
155
155
|
}
|
|
156
156
|
get userGrants() {
|
|
157
157
|
var _a;
|
|
@@ -159,35 +159,35 @@ class ManagementClient {
|
|
|
159
159
|
}
|
|
160
160
|
get groups() {
|
|
161
161
|
var _a;
|
|
162
|
-
return ((_a = this._groups) !== null && _a !== void 0 ? _a : (this._groups = new
|
|
162
|
+
return ((_a = this._groups) !== null && _a !== void 0 ? _a : (this._groups = new Client_js_19.GroupsClient(this._options)));
|
|
163
|
+
}
|
|
164
|
+
get guardian() {
|
|
165
|
+
var _a;
|
|
166
|
+
return ((_a = this._guardian) !== null && _a !== void 0 ? _a : (this._guardian = new Client_js_20.GuardianClient(this._options)));
|
|
163
167
|
}
|
|
164
168
|
get hooks() {
|
|
165
169
|
var _a;
|
|
166
|
-
return ((_a = this._hooks) !== null && _a !== void 0 ? _a : (this._hooks = new
|
|
170
|
+
return ((_a = this._hooks) !== null && _a !== void 0 ? _a : (this._hooks = new Client_js_21.HooksClient(this._options)));
|
|
167
171
|
}
|
|
168
172
|
get jobs() {
|
|
169
173
|
var _a;
|
|
170
|
-
return ((_a = this._jobs) !== null && _a !== void 0 ? _a : (this._jobs = new
|
|
174
|
+
return ((_a = this._jobs) !== null && _a !== void 0 ? _a : (this._jobs = new Client_js_22.JobsClient(this._options)));
|
|
171
175
|
}
|
|
172
176
|
get logStreams() {
|
|
173
177
|
var _a;
|
|
174
|
-
return ((_a = this._logStreams) !== null && _a !== void 0 ? _a : (this._logStreams = new
|
|
178
|
+
return ((_a = this._logStreams) !== null && _a !== void 0 ? _a : (this._logStreams = new Client_js_25.LogStreamsClient(this._options)));
|
|
175
179
|
}
|
|
176
180
|
get logs() {
|
|
177
181
|
var _a;
|
|
178
|
-
return ((_a = this._logs) !== null && _a !== void 0 ? _a : (this._logs = new
|
|
182
|
+
return ((_a = this._logs) !== null && _a !== void 0 ? _a : (this._logs = new Client_js_24.LogsClient(this._options)));
|
|
179
183
|
}
|
|
180
184
|
get networkAcls() {
|
|
181
185
|
var _a;
|
|
182
|
-
return ((_a = this._networkAcls) !== null && _a !== void 0 ? _a : (this._networkAcls = new
|
|
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)));
|
|
186
|
+
return ((_a = this._networkAcls) !== null && _a !== void 0 ? _a : (this._networkAcls = new Client_js_26.NetworkAclsClient(this._options)));
|
|
187
187
|
}
|
|
188
188
|
get organizations() {
|
|
189
189
|
var _a;
|
|
190
|
-
return ((_a = this._organizations) !== null && _a !== void 0 ? _a : (this._organizations = new
|
|
190
|
+
return ((_a = this._organizations) !== null && _a !== void 0 ? _a : (this._organizations = new Client_js_27.OrganizationsClient(this._options)));
|
|
191
191
|
}
|
|
192
192
|
get prompts() {
|
|
193
193
|
var _a;
|
|
@@ -265,13 +265,13 @@ class ManagementClient {
|
|
|
265
265
|
var _a;
|
|
266
266
|
return ((_a = this._emails) !== null && _a !== void 0 ? _a : (this._emails = new Client_js_12.EmailsClient(this._options)));
|
|
267
267
|
}
|
|
268
|
-
get
|
|
268
|
+
get experimentation() {
|
|
269
269
|
var _a;
|
|
270
|
-
return ((_a = this.
|
|
270
|
+
return ((_a = this._experimentation) !== null && _a !== void 0 ? _a : (this._experimentation = new Client_js_16.ExperimentationClient(this._options)));
|
|
271
271
|
}
|
|
272
272
|
get keys() {
|
|
273
273
|
var _a;
|
|
274
|
-
return ((_a = this._keys) !== null && _a !== void 0 ? _a : (this._keys = new
|
|
274
|
+
return ((_a = this._keys) !== null && _a !== void 0 ? _a : (this._keys = new Client_js_23.KeysClient(this._options)));
|
|
275
275
|
}
|
|
276
276
|
get riskAssessments() {
|
|
277
277
|
var _a;
|
|
@@ -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.GatewayTimeoutError = void 0;
|
|
38
|
+
const errors = __importStar(require("../../errors/index.js"));
|
|
39
|
+
class GatewayTimeoutError extends errors.ManagementError {
|
|
40
|
+
constructor(body, rawResponse) {
|
|
41
|
+
super({
|
|
42
|
+
message: "GatewayTimeoutError",
|
|
43
|
+
statusCode: 504,
|
|
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 = "GatewayTimeoutError";
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
exports.GatewayTimeoutError = GatewayTimeoutError;
|
|
@@ -2,6 +2,7 @@ export * from "./BadRequestError.js";
|
|
|
2
2
|
export * from "./ConflictError.js";
|
|
3
3
|
export * from "./ContentTooLargeError.js";
|
|
4
4
|
export * from "./ForbiddenError.js";
|
|
5
|
+
export * from "./GatewayTimeoutError.js";
|
|
5
6
|
export * from "./GoneError.js";
|
|
6
7
|
export * from "./InternalServerError.js";
|
|
7
8
|
export * from "./NotFoundError.js";
|
|
@@ -18,6 +18,7 @@ __exportStar(require("./BadRequestError.js"), exports);
|
|
|
18
18
|
__exportStar(require("./ConflictError.js"), exports);
|
|
19
19
|
__exportStar(require("./ContentTooLargeError.js"), exports);
|
|
20
20
|
__exportStar(require("./ForbiddenError.js"), exports);
|
|
21
|
+
__exportStar(require("./GatewayTimeoutError.js"), exports);
|
|
21
22
|
__exportStar(require("./GoneError.js"), exports);
|
|
22
23
|
__exportStar(require("./InternalServerError.js"), exports);
|
|
23
24
|
__exportStar(require("./NotFoundError.js"), exports);
|