auth0 7.0.0 → 7.2.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/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 +117 -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/management/api/resources/guardian/resources/factors/resources/email/index.js +17 -0
- 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 +287 -51
- package/dist/cjs/management/api/types/types.js +51 -36
- package/dist/cjs/management/version.d.ts +1 -1
- package/dist/cjs/management/version.js +1 -1
- 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 +117 -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 +287 -51
- package/dist/esm/management/api/types/types.mjs +48 -33
- package/dist/esm/management/version.d.mts +1 -1
- package/dist/esm/management/version.mjs +1 -1
- package/package.json +46 -23
- package/reference.md +654 -389
- 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/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/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
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
// This file was auto-generated by Fern from our API Definition.
|
|
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
|
+
};
|
|
2
11
|
import { normalizeClientOptionsWithAuth } from "../../../../BaseClient.mjs";
|
|
12
|
+
import * as core from "../../../../core/index.mjs";
|
|
13
|
+
import { mergeHeaders } from "../../../../core/headers.mjs";
|
|
14
|
+
import * as environments from "../../../../environments.mjs";
|
|
15
|
+
import { handleNonStatusCodeError } from "../../../../errors/handleNonStatusCodeError.mjs";
|
|
16
|
+
import * as errors from "../../../../errors/index.mjs";
|
|
17
|
+
import * as Management from "../../../index.mjs";
|
|
3
18
|
import { EnrollmentsClient } from "../resources/enrollments/client/Client.mjs";
|
|
4
19
|
import { FactorsClient } from "../resources/factors/client/Client.mjs";
|
|
5
20
|
import { PoliciesClient } from "../resources/policies/client/Client.mjs";
|
|
@@ -19,4 +34,128 @@ export class GuardianClient {
|
|
|
19
34
|
var _a;
|
|
20
35
|
return ((_a = this._policies) !== null && _a !== void 0 ? _a : (this._policies = new PoliciesClient(this._options)));
|
|
21
36
|
}
|
|
37
|
+
/**
|
|
38
|
+
* TODO: Link this endpoint to relevant documentation when available.
|
|
39
|
+
*
|
|
40
|
+
* @param {GuardianClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
41
|
+
*
|
|
42
|
+
* @throws {@link Management.UnauthorizedError}
|
|
43
|
+
* @throws {@link Management.ForbiddenError}
|
|
44
|
+
* @throws {@link Management.TooManyRequestsError}
|
|
45
|
+
*
|
|
46
|
+
* @example
|
|
47
|
+
* await client.guardian.get()
|
|
48
|
+
*/
|
|
49
|
+
get(requestOptions) {
|
|
50
|
+
return core.HttpResponsePromise.fromPromise(this.__get(requestOptions));
|
|
51
|
+
}
|
|
52
|
+
__get(requestOptions) {
|
|
53
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
54
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
55
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
56
|
+
let _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
57
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
58
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ManagementEnvironment.Default, "guardian/settings"),
|
|
59
|
+
method: "GET",
|
|
60
|
+
headers: _headers,
|
|
61
|
+
queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
|
|
62
|
+
timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
|
|
63
|
+
maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
|
|
64
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
65
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
66
|
+
logging: this._options.logging,
|
|
67
|
+
});
|
|
68
|
+
if (_response.ok) {
|
|
69
|
+
return {
|
|
70
|
+
data: _response.body,
|
|
71
|
+
rawResponse: _response.rawResponse,
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
if (_response.error.reason === "status-code") {
|
|
75
|
+
switch (_response.error.statusCode) {
|
|
76
|
+
case 401:
|
|
77
|
+
throw new Management.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
78
|
+
case 403:
|
|
79
|
+
throw new Management.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
80
|
+
case 429:
|
|
81
|
+
throw new Management.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
82
|
+
default:
|
|
83
|
+
throw new errors.ManagementError({
|
|
84
|
+
statusCode: _response.error.statusCode,
|
|
85
|
+
body: _response.error.body,
|
|
86
|
+
rawResponse: _response.rawResponse,
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/guardian/settings");
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Update a tenant's guardian settings such as Remember Me
|
|
95
|
+
*
|
|
96
|
+
* @param {Management.SetGuardianSettingsRequestContent} request
|
|
97
|
+
* @param {GuardianClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
98
|
+
*
|
|
99
|
+
* @throws {@link Management.BadRequestError}
|
|
100
|
+
* @throws {@link Management.UnauthorizedError}
|
|
101
|
+
* @throws {@link Management.ForbiddenError}
|
|
102
|
+
* @throws {@link Management.TooManyRequestsError}
|
|
103
|
+
*
|
|
104
|
+
* @example
|
|
105
|
+
* await client.guardian.set({
|
|
106
|
+
* display_remember_me_checkbox: true,
|
|
107
|
+
* remember_me_default_value: true,
|
|
108
|
+
* mfa_session_inactivity_timeout: 1,
|
|
109
|
+
* mfa_session_overall_timeout: 1
|
|
110
|
+
* })
|
|
111
|
+
*/
|
|
112
|
+
set(request, requestOptions) {
|
|
113
|
+
return core.HttpResponsePromise.fromPromise(this.__set(request, requestOptions));
|
|
114
|
+
}
|
|
115
|
+
__set(request, requestOptions) {
|
|
116
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
117
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
118
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
119
|
+
let _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
120
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
121
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ManagementEnvironment.Default, "guardian/settings"),
|
|
122
|
+
method: "PUT",
|
|
123
|
+
headers: _headers,
|
|
124
|
+
contentType: "application/json",
|
|
125
|
+
queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
|
|
126
|
+
requestType: "json",
|
|
127
|
+
body: request,
|
|
128
|
+
timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
|
|
129
|
+
maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
|
|
130
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
131
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
132
|
+
logging: this._options.logging,
|
|
133
|
+
});
|
|
134
|
+
if (_response.ok) {
|
|
135
|
+
return {
|
|
136
|
+
data: _response.body,
|
|
137
|
+
rawResponse: _response.rawResponse,
|
|
138
|
+
};
|
|
139
|
+
}
|
|
140
|
+
if (_response.error.reason === "status-code") {
|
|
141
|
+
switch (_response.error.statusCode) {
|
|
142
|
+
case 400:
|
|
143
|
+
throw new Management.BadRequestError(_response.error.body, _response.rawResponse);
|
|
144
|
+
case 401:
|
|
145
|
+
throw new Management.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
146
|
+
case 403:
|
|
147
|
+
throw new Management.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
148
|
+
case 429:
|
|
149
|
+
throw new Management.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
150
|
+
default:
|
|
151
|
+
throw new errors.ManagementError({
|
|
152
|
+
statusCode: _response.error.statusCode,
|
|
153
|
+
body: _response.error.body,
|
|
154
|
+
rawResponse: _response.rawResponse,
|
|
155
|
+
});
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "PUT", "/guardian/settings");
|
|
159
|
+
});
|
|
160
|
+
}
|
|
22
161
|
}
|
|
@@ -3,6 +3,7 @@ import { type NormalizedClientOptionsWithAuth } from "../../../../../../BaseClie
|
|
|
3
3
|
import * as core from "../../../../../../core/index.mjs";
|
|
4
4
|
import * as Management from "../../../../../index.mjs";
|
|
5
5
|
import { DuoClient } from "../resources/duo/client/Client.mjs";
|
|
6
|
+
import { EmailClient } from "../resources/email/client/Client.mjs";
|
|
6
7
|
import { PhoneClient } from "../resources/phone/client/Client.mjs";
|
|
7
8
|
import { PushNotificationClient } from "../resources/pushNotification/client/Client.mjs";
|
|
8
9
|
import { SmsClient } from "../resources/sms/client/Client.mjs";
|
|
@@ -13,11 +14,13 @@ export declare namespace FactorsClient {
|
|
|
13
14
|
}
|
|
14
15
|
export declare class FactorsClient {
|
|
15
16
|
protected readonly _options: NormalizedClientOptionsWithAuth<FactorsClient.Options>;
|
|
17
|
+
protected _email: EmailClient | undefined;
|
|
16
18
|
protected _phone: PhoneClient | undefined;
|
|
17
19
|
protected _pushNotification: PushNotificationClient | undefined;
|
|
18
20
|
protected _sms: SmsClient | undefined;
|
|
19
21
|
protected _duo: DuoClient | undefined;
|
|
20
22
|
constructor(options: FactorsClient.Options);
|
|
23
|
+
get email(): EmailClient;
|
|
21
24
|
get phone(): PhoneClient;
|
|
22
25
|
get pushNotification(): PushNotificationClient;
|
|
23
26
|
get sms(): SmsClient;
|
|
@@ -16,6 +16,7 @@ import { handleNonStatusCodeError } from "../../../../../../errors/handleNonStat
|
|
|
16
16
|
import * as errors from "../../../../../../errors/index.mjs";
|
|
17
17
|
import * as Management from "../../../../../index.mjs";
|
|
18
18
|
import { DuoClient } from "../resources/duo/client/Client.mjs";
|
|
19
|
+
import { EmailClient } from "../resources/email/client/Client.mjs";
|
|
19
20
|
import { PhoneClient } from "../resources/phone/client/Client.mjs";
|
|
20
21
|
import { PushNotificationClient } from "../resources/pushNotification/client/Client.mjs";
|
|
21
22
|
import { SmsClient } from "../resources/sms/client/Client.mjs";
|
|
@@ -23,6 +24,10 @@ export class FactorsClient {
|
|
|
23
24
|
constructor(options) {
|
|
24
25
|
this._options = normalizeClientOptionsWithAuth(options);
|
|
25
26
|
}
|
|
27
|
+
get email() {
|
|
28
|
+
var _a;
|
|
29
|
+
return ((_a = this._email) !== null && _a !== void 0 ? _a : (this._email = new EmailClient(this._options)));
|
|
30
|
+
}
|
|
26
31
|
get phone() {
|
|
27
32
|
var _a;
|
|
28
33
|
return ((_a = this._phone) !== null && _a !== void 0 ? _a : (this._phone = new PhoneClient(this._options)));
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import type { BaseClientOptions, BaseRequestOptions } from "../../../../../../../../BaseClient.mjs";
|
|
2
|
+
import { type NormalizedClientOptionsWithAuth } from "../../../../../../../../BaseClient.mjs";
|
|
3
|
+
import * as core from "../../../../../../../../core/index.mjs";
|
|
4
|
+
import * as Management from "../../../../../../../index.mjs";
|
|
5
|
+
export declare namespace EmailClient {
|
|
6
|
+
type Options = BaseClientOptions;
|
|
7
|
+
interface RequestOptions extends BaseRequestOptions {
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
export declare class EmailClient {
|
|
11
|
+
protected readonly _options: NormalizedClientOptionsWithAuth<EmailClient.Options>;
|
|
12
|
+
constructor(options: EmailClient.Options);
|
|
13
|
+
/**
|
|
14
|
+
* TODO: Link this endpoint to relevant documentation when available.
|
|
15
|
+
*
|
|
16
|
+
* @param {EmailClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
17
|
+
*
|
|
18
|
+
* @throws {@link Management.UnauthorizedError}
|
|
19
|
+
* @throws {@link Management.ForbiddenError}
|
|
20
|
+
* @throws {@link Management.TooManyRequestsError}
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* await client.guardian.factors.email.get()
|
|
24
|
+
*/
|
|
25
|
+
get(requestOptions?: EmailClient.RequestOptions): core.HttpResponsePromise<Management.GetEmailFactorSettingsResponseContent>;
|
|
26
|
+
private __get;
|
|
27
|
+
/**
|
|
28
|
+
* TODO: Link this endpoint to relevant documentation when available.
|
|
29
|
+
*
|
|
30
|
+
* @param {Management.SetEmailFactorSettingsRequestContent} request
|
|
31
|
+
* @param {EmailClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
32
|
+
*
|
|
33
|
+
* @throws {@link Management.BadRequestError}
|
|
34
|
+
* @throws {@link Management.UnauthorizedError}
|
|
35
|
+
* @throws {@link Management.ForbiddenError}
|
|
36
|
+
* @throws {@link Management.TooManyRequestsError}
|
|
37
|
+
*
|
|
38
|
+
* @example
|
|
39
|
+
* await client.guardian.factors.email.set({
|
|
40
|
+
* otp_length: 1,
|
|
41
|
+
* otp_expiration_time: 1
|
|
42
|
+
* })
|
|
43
|
+
*/
|
|
44
|
+
set(request: Management.SetEmailFactorSettingsRequestContent, requestOptions?: EmailClient.RequestOptions): core.HttpResponsePromise<Management.SetEmailFactorSettingsResponseContent>;
|
|
45
|
+
private __set;
|
|
46
|
+
}
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
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
|
+
import { normalizeClientOptionsWithAuth, } from "../../../../../../../../BaseClient.mjs";
|
|
12
|
+
import * as core from "../../../../../../../../core/index.mjs";
|
|
13
|
+
import { mergeHeaders } from "../../../../../../../../core/headers.mjs";
|
|
14
|
+
import * as environments from "../../../../../../../../environments.mjs";
|
|
15
|
+
import { handleNonStatusCodeError } from "../../../../../../../../errors/handleNonStatusCodeError.mjs";
|
|
16
|
+
import * as errors from "../../../../../../../../errors/index.mjs";
|
|
17
|
+
import * as Management from "../../../../../../../index.mjs";
|
|
18
|
+
export class EmailClient {
|
|
19
|
+
constructor(options) {
|
|
20
|
+
this._options = normalizeClientOptionsWithAuth(options);
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* TODO: Link this endpoint to relevant documentation when available.
|
|
24
|
+
*
|
|
25
|
+
* @param {EmailClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
26
|
+
*
|
|
27
|
+
* @throws {@link Management.UnauthorizedError}
|
|
28
|
+
* @throws {@link Management.ForbiddenError}
|
|
29
|
+
* @throws {@link Management.TooManyRequestsError}
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
* await client.guardian.factors.email.get()
|
|
33
|
+
*/
|
|
34
|
+
get(requestOptions) {
|
|
35
|
+
return core.HttpResponsePromise.fromPromise(this.__get(requestOptions));
|
|
36
|
+
}
|
|
37
|
+
__get(requestOptions) {
|
|
38
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
39
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
40
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
41
|
+
let _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
42
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
43
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ManagementEnvironment.Default, "guardian/factors/email/settings"),
|
|
44
|
+
method: "GET",
|
|
45
|
+
headers: _headers,
|
|
46
|
+
queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
|
|
47
|
+
timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
|
|
48
|
+
maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
|
|
49
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
50
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
51
|
+
logging: this._options.logging,
|
|
52
|
+
});
|
|
53
|
+
if (_response.ok) {
|
|
54
|
+
return {
|
|
55
|
+
data: _response.body,
|
|
56
|
+
rawResponse: _response.rawResponse,
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
if (_response.error.reason === "status-code") {
|
|
60
|
+
switch (_response.error.statusCode) {
|
|
61
|
+
case 401:
|
|
62
|
+
throw new Management.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
63
|
+
case 403:
|
|
64
|
+
throw new Management.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
65
|
+
case 429:
|
|
66
|
+
throw new Management.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
67
|
+
default:
|
|
68
|
+
throw new errors.ManagementError({
|
|
69
|
+
statusCode: _response.error.statusCode,
|
|
70
|
+
body: _response.error.body,
|
|
71
|
+
rawResponse: _response.rawResponse,
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/guardian/factors/email/settings");
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* TODO: Link this endpoint to relevant documentation when available.
|
|
80
|
+
*
|
|
81
|
+
* @param {Management.SetEmailFactorSettingsRequestContent} request
|
|
82
|
+
* @param {EmailClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
83
|
+
*
|
|
84
|
+
* @throws {@link Management.BadRequestError}
|
|
85
|
+
* @throws {@link Management.UnauthorizedError}
|
|
86
|
+
* @throws {@link Management.ForbiddenError}
|
|
87
|
+
* @throws {@link Management.TooManyRequestsError}
|
|
88
|
+
*
|
|
89
|
+
* @example
|
|
90
|
+
* await client.guardian.factors.email.set({
|
|
91
|
+
* otp_length: 1,
|
|
92
|
+
* otp_expiration_time: 1
|
|
93
|
+
* })
|
|
94
|
+
*/
|
|
95
|
+
set(request, requestOptions) {
|
|
96
|
+
return core.HttpResponsePromise.fromPromise(this.__set(request, requestOptions));
|
|
97
|
+
}
|
|
98
|
+
__set(request, requestOptions) {
|
|
99
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
100
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
101
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
102
|
+
let _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
103
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
104
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ManagementEnvironment.Default, "guardian/factors/email/settings"),
|
|
105
|
+
method: "PUT",
|
|
106
|
+
headers: _headers,
|
|
107
|
+
contentType: "application/json",
|
|
108
|
+
queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
|
|
109
|
+
requestType: "json",
|
|
110
|
+
body: request,
|
|
111
|
+
timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
|
|
112
|
+
maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
|
|
113
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
114
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
115
|
+
logging: this._options.logging,
|
|
116
|
+
});
|
|
117
|
+
if (_response.ok) {
|
|
118
|
+
return {
|
|
119
|
+
data: _response.body,
|
|
120
|
+
rawResponse: _response.rawResponse,
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
if (_response.error.reason === "status-code") {
|
|
124
|
+
switch (_response.error.statusCode) {
|
|
125
|
+
case 400:
|
|
126
|
+
throw new Management.BadRequestError(_response.error.body, _response.rawResponse);
|
|
127
|
+
case 401:
|
|
128
|
+
throw new Management.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
129
|
+
case 403:
|
|
130
|
+
throw new Management.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
131
|
+
case 429:
|
|
132
|
+
throw new Management.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
133
|
+
default:
|
|
134
|
+
throw new errors.ManagementError({
|
|
135
|
+
statusCode: _response.error.statusCode,
|
|
136
|
+
body: _response.error.body,
|
|
137
|
+
rawResponse: _response.rawResponse,
|
|
138
|
+
});
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "PUT", "/guardian/factors/email/settings");
|
|
142
|
+
});
|
|
143
|
+
}
|
|
144
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/esm/management/api/resources/guardian/resources/factors/resources/email/index.d.mts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./client/index.mjs";
|
package/dist/esm/management/api/resources/guardian/resources/factors/resources/email/index.mjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./client/index.mjs";
|
|
@@ -100,6 +100,39 @@ export declare class PhoneClient {
|
|
|
100
100
|
*/
|
|
101
101
|
setProvider(request: Management.SetGuardianFactorsProviderPhoneRequestContent, requestOptions?: PhoneClient.RequestOptions): core.HttpResponsePromise<Management.SetGuardianFactorsProviderPhoneResponseContent>;
|
|
102
102
|
private __setProvider;
|
|
103
|
+
/**
|
|
104
|
+
* TODO: Link this endpoint to relevant documentation when available.
|
|
105
|
+
*
|
|
106
|
+
* @param {PhoneClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
107
|
+
*
|
|
108
|
+
* @throws {@link Management.UnauthorizedError}
|
|
109
|
+
* @throws {@link Management.ForbiddenError}
|
|
110
|
+
* @throws {@link Management.TooManyRequestsError}
|
|
111
|
+
*
|
|
112
|
+
* @example
|
|
113
|
+
* await client.guardian.factors.phone.get()
|
|
114
|
+
*/
|
|
115
|
+
get(requestOptions?: PhoneClient.RequestOptions): core.HttpResponsePromise<Management.GetPhoneFactorSettingsResponseContent>;
|
|
116
|
+
private __get;
|
|
117
|
+
/**
|
|
118
|
+
* TODO: Link this endpoint to relevant documentation when available.
|
|
119
|
+
*
|
|
120
|
+
* @param {Management.SetPhoneFactorSettingsRequestContent} request
|
|
121
|
+
* @param {PhoneClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
122
|
+
*
|
|
123
|
+
* @throws {@link Management.BadRequestError}
|
|
124
|
+
* @throws {@link Management.UnauthorizedError}
|
|
125
|
+
* @throws {@link Management.ForbiddenError}
|
|
126
|
+
* @throws {@link Management.TooManyRequestsError}
|
|
127
|
+
*
|
|
128
|
+
* @example
|
|
129
|
+
* await client.guardian.factors.phone.set({
|
|
130
|
+
* otp_length: 1,
|
|
131
|
+
* otp_expiration_time: 1
|
|
132
|
+
* })
|
|
133
|
+
*/
|
|
134
|
+
set(request: Management.SetPhoneFactorSettingsRequestContent, requestOptions?: PhoneClient.RequestOptions): core.HttpResponsePromise<Management.SetPhoneFactorSettingsResponseContent>;
|
|
135
|
+
private __set;
|
|
103
136
|
/**
|
|
104
137
|
* Retrieve details of the multi-factor authentication enrollment and verification templates for phone-type factors available in your tenant.
|
|
105
138
|
*
|
|
@@ -372,6 +372,128 @@ export class PhoneClient {
|
|
|
372
372
|
return handleNonStatusCodeError(_response.error, _response.rawResponse, "PUT", "/guardian/factors/phone/selected-provider");
|
|
373
373
|
});
|
|
374
374
|
}
|
|
375
|
+
/**
|
|
376
|
+
* TODO: Link this endpoint to relevant documentation when available.
|
|
377
|
+
*
|
|
378
|
+
* @param {PhoneClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
379
|
+
*
|
|
380
|
+
* @throws {@link Management.UnauthorizedError}
|
|
381
|
+
* @throws {@link Management.ForbiddenError}
|
|
382
|
+
* @throws {@link Management.TooManyRequestsError}
|
|
383
|
+
*
|
|
384
|
+
* @example
|
|
385
|
+
* await client.guardian.factors.phone.get()
|
|
386
|
+
*/
|
|
387
|
+
get(requestOptions) {
|
|
388
|
+
return core.HttpResponsePromise.fromPromise(this.__get(requestOptions));
|
|
389
|
+
}
|
|
390
|
+
__get(requestOptions) {
|
|
391
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
392
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
393
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
394
|
+
let _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
395
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
396
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ManagementEnvironment.Default, "guardian/factors/phone/settings"),
|
|
397
|
+
method: "GET",
|
|
398
|
+
headers: _headers,
|
|
399
|
+
queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
|
|
400
|
+
timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
|
|
401
|
+
maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
|
|
402
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
403
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
404
|
+
logging: this._options.logging,
|
|
405
|
+
});
|
|
406
|
+
if (_response.ok) {
|
|
407
|
+
return {
|
|
408
|
+
data: _response.body,
|
|
409
|
+
rawResponse: _response.rawResponse,
|
|
410
|
+
};
|
|
411
|
+
}
|
|
412
|
+
if (_response.error.reason === "status-code") {
|
|
413
|
+
switch (_response.error.statusCode) {
|
|
414
|
+
case 401:
|
|
415
|
+
throw new Management.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
416
|
+
case 403:
|
|
417
|
+
throw new Management.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
418
|
+
case 429:
|
|
419
|
+
throw new Management.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
420
|
+
default:
|
|
421
|
+
throw new errors.ManagementError({
|
|
422
|
+
statusCode: _response.error.statusCode,
|
|
423
|
+
body: _response.error.body,
|
|
424
|
+
rawResponse: _response.rawResponse,
|
|
425
|
+
});
|
|
426
|
+
}
|
|
427
|
+
}
|
|
428
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/guardian/factors/phone/settings");
|
|
429
|
+
});
|
|
430
|
+
}
|
|
431
|
+
/**
|
|
432
|
+
* TODO: Link this endpoint to relevant documentation when available.
|
|
433
|
+
*
|
|
434
|
+
* @param {Management.SetPhoneFactorSettingsRequestContent} request
|
|
435
|
+
* @param {PhoneClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
436
|
+
*
|
|
437
|
+
* @throws {@link Management.BadRequestError}
|
|
438
|
+
* @throws {@link Management.UnauthorizedError}
|
|
439
|
+
* @throws {@link Management.ForbiddenError}
|
|
440
|
+
* @throws {@link Management.TooManyRequestsError}
|
|
441
|
+
*
|
|
442
|
+
* @example
|
|
443
|
+
* await client.guardian.factors.phone.set({
|
|
444
|
+
* otp_length: 1,
|
|
445
|
+
* otp_expiration_time: 1
|
|
446
|
+
* })
|
|
447
|
+
*/
|
|
448
|
+
set(request, requestOptions) {
|
|
449
|
+
return core.HttpResponsePromise.fromPromise(this.__set(request, requestOptions));
|
|
450
|
+
}
|
|
451
|
+
__set(request, requestOptions) {
|
|
452
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
453
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
454
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
455
|
+
let _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
456
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
457
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ManagementEnvironment.Default, "guardian/factors/phone/settings"),
|
|
458
|
+
method: "PUT",
|
|
459
|
+
headers: _headers,
|
|
460
|
+
contentType: "application/json",
|
|
461
|
+
queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
|
|
462
|
+
requestType: "json",
|
|
463
|
+
body: request,
|
|
464
|
+
timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
|
|
465
|
+
maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
|
|
466
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
467
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
468
|
+
logging: this._options.logging,
|
|
469
|
+
});
|
|
470
|
+
if (_response.ok) {
|
|
471
|
+
return {
|
|
472
|
+
data: _response.body,
|
|
473
|
+
rawResponse: _response.rawResponse,
|
|
474
|
+
};
|
|
475
|
+
}
|
|
476
|
+
if (_response.error.reason === "status-code") {
|
|
477
|
+
switch (_response.error.statusCode) {
|
|
478
|
+
case 400:
|
|
479
|
+
throw new Management.BadRequestError(_response.error.body, _response.rawResponse);
|
|
480
|
+
case 401:
|
|
481
|
+
throw new Management.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
482
|
+
case 403:
|
|
483
|
+
throw new Management.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
484
|
+
case 429:
|
|
485
|
+
throw new Management.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
486
|
+
default:
|
|
487
|
+
throw new errors.ManagementError({
|
|
488
|
+
statusCode: _response.error.statusCode,
|
|
489
|
+
body: _response.error.body,
|
|
490
|
+
rawResponse: _response.rawResponse,
|
|
491
|
+
});
|
|
492
|
+
}
|
|
493
|
+
}
|
|
494
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "PUT", "/guardian/factors/phone/settings");
|
|
495
|
+
});
|
|
496
|
+
}
|
|
375
497
|
/**
|
|
376
498
|
* Retrieve details of the multi-factor authentication enrollment and verification templates for phone-type factors available in your tenant.
|
|
377
499
|
*
|
|
@@ -14,6 +14,7 @@ export * as emailTemplates from "./emailTemplates/index.mjs";
|
|
|
14
14
|
export * as events from "./events/index.mjs";
|
|
15
15
|
export * as eventStreams from "./eventStreams/index.mjs";
|
|
16
16
|
export * from "./eventStreams/types/index.mjs";
|
|
17
|
+
export * as experimentation from "./experimentation/index.mjs";
|
|
17
18
|
export * as flows from "./flows/index.mjs";
|
|
18
19
|
export * as forms from "./forms/index.mjs";
|
|
19
20
|
export * as groups from "./groups/index.mjs";
|
|
@@ -25,7 +26,6 @@ export * as logs from "./logs/index.mjs";
|
|
|
25
26
|
export * as logStreams from "./logStreams/index.mjs";
|
|
26
27
|
export * as networkAcls from "./networkAcls/index.mjs";
|
|
27
28
|
export * as organizations from "./organizations/index.mjs";
|
|
28
|
-
export * as organizationTemplates from "./organizationTemplates/index.mjs";
|
|
29
29
|
export * as prompts from "./prompts/index.mjs";
|
|
30
30
|
export * as rateLimitPolicies from "./rateLimitPolicies/index.mjs";
|
|
31
31
|
export * as refreshTokens from "./refreshTokens/index.mjs";
|
|
@@ -14,6 +14,7 @@ export * as emailTemplates from "./emailTemplates/index.mjs";
|
|
|
14
14
|
export * as events from "./events/index.mjs";
|
|
15
15
|
export * as eventStreams from "./eventStreams/index.mjs";
|
|
16
16
|
export * from "./eventStreams/types/index.mjs";
|
|
17
|
+
export * as experimentation from "./experimentation/index.mjs";
|
|
17
18
|
export * as flows from "./flows/index.mjs";
|
|
18
19
|
export * as forms from "./forms/index.mjs";
|
|
19
20
|
export * as groups from "./groups/index.mjs";
|
|
@@ -25,7 +26,6 @@ export * as logs from "./logs/index.mjs";
|
|
|
25
26
|
export * as logStreams from "./logStreams/index.mjs";
|
|
26
27
|
export * as networkAcls from "./networkAcls/index.mjs";
|
|
27
28
|
export * as organizations from "./organizations/index.mjs";
|
|
28
|
-
export * as organizationTemplates from "./organizationTemplates/index.mjs";
|
|
29
29
|
export * as prompts from "./prompts/index.mjs";
|
|
30
30
|
export * as rateLimitPolicies from "./rateLimitPolicies/index.mjs";
|
|
31
31
|
export * as refreshTokens from "./refreshTokens/index.mjs";
|