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
package/dist/cjs/management/api/resources/experimentation/resources/experiments/client/Client.d.ts
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { BaseClientOptions, BaseRequestOptions } from "../../../../../../BaseClient.js";
|
|
2
|
+
import { type NormalizedClientOptionsWithAuth } from "../../../../../../BaseClient.js";
|
|
3
|
+
import * as core from "../../../../../../core/index.js";
|
|
4
|
+
import * as Management from "../../../../../index.js";
|
|
5
|
+
export declare namespace ExperimentsClient {
|
|
6
|
+
type Options = BaseClientOptions;
|
|
7
|
+
interface RequestOptions extends BaseRequestOptions {
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
export declare class ExperimentsClient {
|
|
11
|
+
protected readonly _options: NormalizedClientOptionsWithAuth<ExperimentsClient.Options>;
|
|
12
|
+
constructor(options: ExperimentsClient.Options);
|
|
13
|
+
/**
|
|
14
|
+
* Increments the current ramp index to the requested target level. Up-only: the target must be the immediate next level in the schedule. Idempotent: calling with the current level returns success without writing anything.
|
|
15
|
+
*
|
|
16
|
+
* @param {string} id - The ID of the experiment to advance.
|
|
17
|
+
* @param {Management.AdvanceRampRequestContent} request
|
|
18
|
+
* @param {ExperimentsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
19
|
+
*
|
|
20
|
+
* @throws {@link Management.BadRequestError}
|
|
21
|
+
* @throws {@link Management.UnauthorizedError}
|
|
22
|
+
* @throws {@link Management.ForbiddenError}
|
|
23
|
+
* @throws {@link Management.NotFoundError}
|
|
24
|
+
* @throws {@link Management.ConflictError}
|
|
25
|
+
* @throws {@link Management.TooManyRequestsError}
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* await client.experimentation.experiments.advanceRamp("id", {
|
|
29
|
+
* target_level: 1
|
|
30
|
+
* })
|
|
31
|
+
*/
|
|
32
|
+
advanceRamp(id: string, request: Management.AdvanceRampRequestContent, requestOptions?: ExperimentsClient.RequestOptions): core.HttpResponsePromise<Management.AdvanceRampResponseContent>;
|
|
33
|
+
private __advanceRamp;
|
|
34
|
+
}
|
package/dist/cjs/management/api/resources/experimentation/resources/experiments/client/Client.js
ADDED
|
@@ -0,0 +1,131 @@
|
|
|
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
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
37
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
38
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
39
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
40
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
41
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
42
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
43
|
+
});
|
|
44
|
+
};
|
|
45
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
46
|
+
exports.ExperimentsClient = void 0;
|
|
47
|
+
const BaseClient_js_1 = require("../../../../../../BaseClient.js");
|
|
48
|
+
const core = __importStar(require("../../../../../../core/index.js"));
|
|
49
|
+
const headers_js_1 = require("../../../../../../core/headers.js");
|
|
50
|
+
const environments = __importStar(require("../../../../../../environments.js"));
|
|
51
|
+
const handleNonStatusCodeError_js_1 = require("../../../../../../errors/handleNonStatusCodeError.js");
|
|
52
|
+
const errors = __importStar(require("../../../../../../errors/index.js"));
|
|
53
|
+
const Management = __importStar(require("../../../../../index.js"));
|
|
54
|
+
class ExperimentsClient {
|
|
55
|
+
constructor(options) {
|
|
56
|
+
this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Increments the current ramp index to the requested target level. Up-only: the target must be the immediate next level in the schedule. Idempotent: calling with the current level returns success without writing anything.
|
|
60
|
+
*
|
|
61
|
+
* @param {string} id - The ID of the experiment to advance.
|
|
62
|
+
* @param {Management.AdvanceRampRequestContent} request
|
|
63
|
+
* @param {ExperimentsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
64
|
+
*
|
|
65
|
+
* @throws {@link Management.BadRequestError}
|
|
66
|
+
* @throws {@link Management.UnauthorizedError}
|
|
67
|
+
* @throws {@link Management.ForbiddenError}
|
|
68
|
+
* @throws {@link Management.NotFoundError}
|
|
69
|
+
* @throws {@link Management.ConflictError}
|
|
70
|
+
* @throws {@link Management.TooManyRequestsError}
|
|
71
|
+
*
|
|
72
|
+
* @example
|
|
73
|
+
* await client.experimentation.experiments.advanceRamp("id", {
|
|
74
|
+
* target_level: 1
|
|
75
|
+
* })
|
|
76
|
+
*/
|
|
77
|
+
advanceRamp(id, request, requestOptions) {
|
|
78
|
+
return core.HttpResponsePromise.fromPromise(this.__advanceRamp(id, request, requestOptions));
|
|
79
|
+
}
|
|
80
|
+
__advanceRamp(id, request, requestOptions) {
|
|
81
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
82
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
83
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
84
|
+
let _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
85
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
86
|
+
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, `experimentation/experiments/${core.url.encodePathParam(id)}/advance-ramp`),
|
|
87
|
+
method: "POST",
|
|
88
|
+
headers: _headers,
|
|
89
|
+
contentType: "application/json",
|
|
90
|
+
queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
|
|
91
|
+
requestType: "json",
|
|
92
|
+
body: request,
|
|
93
|
+
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,
|
|
94
|
+
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,
|
|
95
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
96
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
97
|
+
logging: this._options.logging,
|
|
98
|
+
});
|
|
99
|
+
if (_response.ok) {
|
|
100
|
+
return {
|
|
101
|
+
data: _response.body,
|
|
102
|
+
rawResponse: _response.rawResponse,
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
if (_response.error.reason === "status-code") {
|
|
106
|
+
switch (_response.error.statusCode) {
|
|
107
|
+
case 400:
|
|
108
|
+
throw new Management.BadRequestError(_response.error.body, _response.rawResponse);
|
|
109
|
+
case 401:
|
|
110
|
+
throw new Management.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
111
|
+
case 403:
|
|
112
|
+
throw new Management.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
113
|
+
case 404:
|
|
114
|
+
throw new Management.NotFoundError(_response.error.body, _response.rawResponse);
|
|
115
|
+
case 409:
|
|
116
|
+
throw new Management.ConflictError(_response.error.body, _response.rawResponse);
|
|
117
|
+
case 429:
|
|
118
|
+
throw new Management.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
119
|
+
default:
|
|
120
|
+
throw new errors.ManagementError({
|
|
121
|
+
statusCode: _response.error.statusCode,
|
|
122
|
+
body: _response.error.body,
|
|
123
|
+
rawResponse: _response.rawResponse,
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/experimentation/experiments/{id}/advance-ramp");
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
exports.ExperimentsClient = ExperimentsClient;
|
|
@@ -15,7 +15,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
16
16
|
};
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
exports.
|
|
18
|
+
exports.ExperimentsClient = void 0;
|
|
19
19
|
var Client_js_1 = require("./client/Client.js");
|
|
20
|
-
Object.defineProperty(exports, "
|
|
20
|
+
Object.defineProperty(exports, "ExperimentsClient", { enumerable: true, get: function () { return Client_js_1.ExperimentsClient; } });
|
|
21
21
|
__exportStar(require("./client/index.js"), exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * as experiments from "./experiments/index.js";
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.experiments = void 0;
|
|
37
|
+
exports.experiments = __importStar(require("./experiments/index.js"));
|
|
@@ -1,10 +1,14 @@
|
|
|
1
|
-
import type { BaseClientOptions } from "../../../../BaseClient.js";
|
|
1
|
+
import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.js";
|
|
2
2
|
import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.js";
|
|
3
|
+
import * as core from "../../../../core/index.js";
|
|
4
|
+
import * as Management from "../../../index.js";
|
|
3
5
|
import { EnrollmentsClient } from "../resources/enrollments/client/Client.js";
|
|
4
6
|
import { FactorsClient } from "../resources/factors/client/Client.js";
|
|
5
7
|
import { PoliciesClient } from "../resources/policies/client/Client.js";
|
|
6
8
|
export declare namespace GuardianClient {
|
|
7
9
|
type Options = BaseClientOptions;
|
|
10
|
+
interface RequestOptions extends BaseRequestOptions {
|
|
11
|
+
}
|
|
8
12
|
}
|
|
9
13
|
export declare class GuardianClient {
|
|
10
14
|
protected readonly _options: NormalizedClientOptionsWithAuth<GuardianClient.Options>;
|
|
@@ -15,4 +19,39 @@ export declare class GuardianClient {
|
|
|
15
19
|
get enrollments(): EnrollmentsClient;
|
|
16
20
|
get factors(): FactorsClient;
|
|
17
21
|
get policies(): PoliciesClient;
|
|
22
|
+
/**
|
|
23
|
+
* TODO: Link this endpoint to relevant documentation when available.
|
|
24
|
+
*
|
|
25
|
+
* @param {GuardianClient.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.get()
|
|
33
|
+
*/
|
|
34
|
+
get(requestOptions?: GuardianClient.RequestOptions): core.HttpResponsePromise<Management.GetGuardianSettingsResponseContent>;
|
|
35
|
+
private __get;
|
|
36
|
+
/**
|
|
37
|
+
* Update a tenant's guardian settings such as Remember Me
|
|
38
|
+
*
|
|
39
|
+
* @param {Management.SetGuardianSettingsRequestContent} request
|
|
40
|
+
* @param {GuardianClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
41
|
+
*
|
|
42
|
+
* @throws {@link Management.BadRequestError}
|
|
43
|
+
* @throws {@link Management.UnauthorizedError}
|
|
44
|
+
* @throws {@link Management.ForbiddenError}
|
|
45
|
+
* @throws {@link Management.TooManyRequestsError}
|
|
46
|
+
*
|
|
47
|
+
* @example
|
|
48
|
+
* await client.guardian.set({
|
|
49
|
+
* display_remember_me_checkbox: true,
|
|
50
|
+
* remember_me_default_value: true,
|
|
51
|
+
* mfa_session_inactivity_timeout: 1,
|
|
52
|
+
* mfa_session_overall_timeout: 1
|
|
53
|
+
* })
|
|
54
|
+
*/
|
|
55
|
+
set(request: Management.SetGuardianSettingsRequestContent, requestOptions?: GuardianClient.RequestOptions): core.HttpResponsePromise<Management.SetGuardianSettingsResponseContent>;
|
|
56
|
+
private __set;
|
|
18
57
|
}
|
|
@@ -1,8 +1,56 @@
|
|
|
1
1
|
"use strict";
|
|
2
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
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
37
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
38
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
39
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
40
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
41
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
42
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
43
|
+
});
|
|
44
|
+
};
|
|
3
45
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
46
|
exports.GuardianClient = void 0;
|
|
5
47
|
const BaseClient_js_1 = require("../../../../BaseClient.js");
|
|
48
|
+
const core = __importStar(require("../../../../core/index.js"));
|
|
49
|
+
const headers_js_1 = require("../../../../core/headers.js");
|
|
50
|
+
const environments = __importStar(require("../../../../environments.js"));
|
|
51
|
+
const handleNonStatusCodeError_js_1 = require("../../../../errors/handleNonStatusCodeError.js");
|
|
52
|
+
const errors = __importStar(require("../../../../errors/index.js"));
|
|
53
|
+
const Management = __importStar(require("../../../index.js"));
|
|
6
54
|
const Client_js_1 = require("../resources/enrollments/client/Client.js");
|
|
7
55
|
const Client_js_2 = require("../resources/factors/client/Client.js");
|
|
8
56
|
const Client_js_3 = require("../resources/policies/client/Client.js");
|
|
@@ -22,5 +70,129 @@ class GuardianClient {
|
|
|
22
70
|
var _a;
|
|
23
71
|
return ((_a = this._policies) !== null && _a !== void 0 ? _a : (this._policies = new Client_js_3.PoliciesClient(this._options)));
|
|
24
72
|
}
|
|
73
|
+
/**
|
|
74
|
+
* TODO: Link this endpoint to relevant documentation when available.
|
|
75
|
+
*
|
|
76
|
+
* @param {GuardianClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
77
|
+
*
|
|
78
|
+
* @throws {@link Management.UnauthorizedError}
|
|
79
|
+
* @throws {@link Management.ForbiddenError}
|
|
80
|
+
* @throws {@link Management.TooManyRequestsError}
|
|
81
|
+
*
|
|
82
|
+
* @example
|
|
83
|
+
* await client.guardian.get()
|
|
84
|
+
*/
|
|
85
|
+
get(requestOptions) {
|
|
86
|
+
return core.HttpResponsePromise.fromPromise(this.__get(requestOptions));
|
|
87
|
+
}
|
|
88
|
+
__get(requestOptions) {
|
|
89
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
90
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
91
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
92
|
+
let _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
93
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
94
|
+
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"),
|
|
95
|
+
method: "GET",
|
|
96
|
+
headers: _headers,
|
|
97
|
+
queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
|
|
98
|
+
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,
|
|
99
|
+
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,
|
|
100
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
101
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
102
|
+
logging: this._options.logging,
|
|
103
|
+
});
|
|
104
|
+
if (_response.ok) {
|
|
105
|
+
return {
|
|
106
|
+
data: _response.body,
|
|
107
|
+
rawResponse: _response.rawResponse,
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
if (_response.error.reason === "status-code") {
|
|
111
|
+
switch (_response.error.statusCode) {
|
|
112
|
+
case 401:
|
|
113
|
+
throw new Management.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
114
|
+
case 403:
|
|
115
|
+
throw new Management.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
116
|
+
case 429:
|
|
117
|
+
throw new Management.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
118
|
+
default:
|
|
119
|
+
throw new errors.ManagementError({
|
|
120
|
+
statusCode: _response.error.statusCode,
|
|
121
|
+
body: _response.error.body,
|
|
122
|
+
rawResponse: _response.rawResponse,
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/guardian/settings");
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* Update a tenant's guardian settings such as Remember Me
|
|
131
|
+
*
|
|
132
|
+
* @param {Management.SetGuardianSettingsRequestContent} request
|
|
133
|
+
* @param {GuardianClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
134
|
+
*
|
|
135
|
+
* @throws {@link Management.BadRequestError}
|
|
136
|
+
* @throws {@link Management.UnauthorizedError}
|
|
137
|
+
* @throws {@link Management.ForbiddenError}
|
|
138
|
+
* @throws {@link Management.TooManyRequestsError}
|
|
139
|
+
*
|
|
140
|
+
* @example
|
|
141
|
+
* await client.guardian.set({
|
|
142
|
+
* display_remember_me_checkbox: true,
|
|
143
|
+
* remember_me_default_value: true,
|
|
144
|
+
* mfa_session_inactivity_timeout: 1,
|
|
145
|
+
* mfa_session_overall_timeout: 1
|
|
146
|
+
* })
|
|
147
|
+
*/
|
|
148
|
+
set(request, requestOptions) {
|
|
149
|
+
return core.HttpResponsePromise.fromPromise(this.__set(request, requestOptions));
|
|
150
|
+
}
|
|
151
|
+
__set(request, requestOptions) {
|
|
152
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
153
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
154
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
155
|
+
let _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
156
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
157
|
+
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"),
|
|
158
|
+
method: "PUT",
|
|
159
|
+
headers: _headers,
|
|
160
|
+
contentType: "application/json",
|
|
161
|
+
queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
|
|
162
|
+
requestType: "json",
|
|
163
|
+
body: request,
|
|
164
|
+
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,
|
|
165
|
+
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,
|
|
166
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
167
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
168
|
+
logging: this._options.logging,
|
|
169
|
+
});
|
|
170
|
+
if (_response.ok) {
|
|
171
|
+
return {
|
|
172
|
+
data: _response.body,
|
|
173
|
+
rawResponse: _response.rawResponse,
|
|
174
|
+
};
|
|
175
|
+
}
|
|
176
|
+
if (_response.error.reason === "status-code") {
|
|
177
|
+
switch (_response.error.statusCode) {
|
|
178
|
+
case 400:
|
|
179
|
+
throw new Management.BadRequestError(_response.error.body, _response.rawResponse);
|
|
180
|
+
case 401:
|
|
181
|
+
throw new Management.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
182
|
+
case 403:
|
|
183
|
+
throw new Management.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
184
|
+
case 429:
|
|
185
|
+
throw new Management.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
186
|
+
default:
|
|
187
|
+
throw new errors.ManagementError({
|
|
188
|
+
statusCode: _response.error.statusCode,
|
|
189
|
+
body: _response.error.body,
|
|
190
|
+
rawResponse: _response.rawResponse,
|
|
191
|
+
});
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "PUT", "/guardian/settings");
|
|
195
|
+
});
|
|
196
|
+
}
|
|
25
197
|
}
|
|
26
198
|
exports.GuardianClient = GuardianClient;
|
|
@@ -3,6 +3,7 @@ import { type NormalizedClientOptionsWithAuth } from "../../../../../../BaseClie
|
|
|
3
3
|
import * as core from "../../../../../../core/index.js";
|
|
4
4
|
import * as Management from "../../../../../index.js";
|
|
5
5
|
import { DuoClient } from "../resources/duo/client/Client.js";
|
|
6
|
+
import { EmailClient } from "../resources/email/client/Client.js";
|
|
6
7
|
import { PhoneClient } from "../resources/phone/client/Client.js";
|
|
7
8
|
import { PushNotificationClient } from "../resources/pushNotification/client/Client.js";
|
|
8
9
|
import { SmsClient } from "../resources/sms/client/Client.js";
|
|
@@ -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;
|
|
@@ -52,24 +52,29 @@ const handleNonStatusCodeError_js_1 = require("../../../../../../errors/handleNo
|
|
|
52
52
|
const errors = __importStar(require("../../../../../../errors/index.js"));
|
|
53
53
|
const Management = __importStar(require("../../../../../index.js"));
|
|
54
54
|
const Client_js_1 = require("../resources/duo/client/Client.js");
|
|
55
|
-
const Client_js_2 = require("../resources/
|
|
56
|
-
const Client_js_3 = require("../resources/
|
|
57
|
-
const Client_js_4 = require("../resources/
|
|
55
|
+
const Client_js_2 = require("../resources/email/client/Client.js");
|
|
56
|
+
const Client_js_3 = require("../resources/phone/client/Client.js");
|
|
57
|
+
const Client_js_4 = require("../resources/pushNotification/client/Client.js");
|
|
58
|
+
const Client_js_5 = require("../resources/sms/client/Client.js");
|
|
58
59
|
class FactorsClient {
|
|
59
60
|
constructor(options) {
|
|
60
61
|
this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
|
|
61
62
|
}
|
|
63
|
+
get email() {
|
|
64
|
+
var _a;
|
|
65
|
+
return ((_a = this._email) !== null && _a !== void 0 ? _a : (this._email = new Client_js_2.EmailClient(this._options)));
|
|
66
|
+
}
|
|
62
67
|
get phone() {
|
|
63
68
|
var _a;
|
|
64
|
-
return ((_a = this._phone) !== null && _a !== void 0 ? _a : (this._phone = new
|
|
69
|
+
return ((_a = this._phone) !== null && _a !== void 0 ? _a : (this._phone = new Client_js_3.PhoneClient(this._options)));
|
|
65
70
|
}
|
|
66
71
|
get pushNotification() {
|
|
67
72
|
var _a;
|
|
68
|
-
return ((_a = this._pushNotification) !== null && _a !== void 0 ? _a : (this._pushNotification = new
|
|
73
|
+
return ((_a = this._pushNotification) !== null && _a !== void 0 ? _a : (this._pushNotification = new Client_js_4.PushNotificationClient(this._options)));
|
|
69
74
|
}
|
|
70
75
|
get sms() {
|
|
71
76
|
var _a;
|
|
72
|
-
return ((_a = this._sms) !== null && _a !== void 0 ? _a : (this._sms = new
|
|
77
|
+
return ((_a = this._sms) !== null && _a !== void 0 ? _a : (this._sms = new Client_js_5.SmsClient(this._options)));
|
|
73
78
|
}
|
|
74
79
|
get duo() {
|
|
75
80
|
var _a;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import type { BaseClientOptions, BaseRequestOptions } from "../../../../../../../../BaseClient.js";
|
|
2
|
+
import { type NormalizedClientOptionsWithAuth } from "../../../../../../../../BaseClient.js";
|
|
3
|
+
import * as core from "../../../../../../../../core/index.js";
|
|
4
|
+
import * as Management from "../../../../../../../index.js";
|
|
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
|
+
}
|