auth0 7.2.0 → 7.4.0-beta.1
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 +5 -0
- package/dist/cjs/management/api/requests/requests.d.ts +238 -4
- package/dist/cjs/management/api/resources/clients/client/Client.d.ts +37 -0
- package/dist/cjs/management/api/resources/clients/client/Client.js +111 -0
- package/dist/cjs/management/api/resources/experimentation/client/Client.d.ts +6 -0
- package/dist/cjs/management/api/resources/experimentation/client/Client.js +10 -0
- package/dist/cjs/management/api/resources/experimentation/resources/experiments/client/Client.d.ts +133 -0
- package/dist/cjs/management/api/resources/experimentation/resources/experiments/client/Client.js +485 -0
- package/dist/cjs/management/api/resources/experimentation/resources/featureFlags/client/Client.d.ts +126 -0
- package/dist/cjs/management/api/resources/experimentation/resources/featureFlags/client/Client.js +471 -0
- package/dist/cjs/management/api/resources/experimentation/resources/featureFlags/exports.d.ts +3 -0
- package/dist/cjs/management/api/resources/experimentation/resources/featureFlags/exports.js +22 -0
- package/dist/cjs/management/api/resources/experimentation/resources/featureFlags/index.d.ts +2 -0
- package/dist/cjs/management/api/resources/experimentation/resources/featureFlags/index.js +18 -0
- package/dist/cjs/management/api/resources/experimentation/resources/featureFlags/resources/index.d.ts +1 -0
- package/dist/cjs/management/api/resources/experimentation/resources/featureFlags/resources/index.js +37 -0
- package/dist/cjs/management/api/resources/experimentation/resources/featureFlags/resources/variations/client/Client.d.ts +109 -0
- package/dist/cjs/management/api/resources/experimentation/resources/featureFlags/resources/variations/client/Client.js +390 -0
- package/dist/cjs/management/api/resources/experimentation/resources/featureFlags/resources/variations/client/index.js +2 -0
- package/dist/cjs/management/api/resources/experimentation/resources/featureFlags/resources/variations/exports.d.ts +2 -0
- package/dist/cjs/management/api/resources/{organizations/resources/organizationTemplate → experimentation/resources/featureFlags/resources/variations}/exports.js +2 -2
- package/dist/cjs/management/api/resources/experimentation/resources/index.d.ts +2 -0
- package/dist/cjs/management/api/resources/experimentation/resources/index.js +3 -1
- package/dist/cjs/management/api/resources/experimentation/resources/segments/client/Client.d.ts +104 -0
- package/dist/cjs/management/api/resources/{organizations/resources/organizationTemplate → experimentation/resources/segments}/client/Client.js +205 -39
- package/dist/cjs/management/api/resources/experimentation/resources/segments/client/index.js +2 -0
- package/dist/cjs/management/api/resources/experimentation/resources/segments/exports.d.ts +2 -0
- package/dist/cjs/management/api/resources/experimentation/resources/segments/exports.js +21 -0
- package/dist/cjs/management/api/resources/experimentation/resources/segments/index.d.ts +1 -0
- package/dist/cjs/management/api/resources/experimentation/resources/segments/index.js +17 -0
- package/dist/cjs/management/api/resources/organizations/client/Client.d.ts +0 -3
- package/dist/cjs/management/api/resources/organizations/client/Client.js +2 -7
- package/dist/cjs/management/api/resources/organizations/resources/index.d.ts +0 -1
- package/dist/cjs/management/api/resources/organizations/resources/index.js +1 -2
- package/dist/cjs/management/api/resources/users/client/Client.d.ts +8 -10
- package/dist/cjs/management/api/resources/users/client/Client.js +8 -10
- package/dist/cjs/management/api/types/types.d.ts +642 -91
- package/dist/cjs/management/api/types/types.js +109 -50
- package/dist/cjs/management/version.d.ts +1 -1
- package/dist/cjs/management/version.js +1 -1
- package/dist/esm/management/api/requests/requests.d.mts +238 -4
- package/dist/esm/management/api/resources/clients/client/Client.d.mts +37 -0
- package/dist/esm/management/api/resources/clients/client/Client.mjs +111 -0
- package/dist/esm/management/api/resources/experimentation/client/Client.d.mts +6 -0
- package/dist/esm/management/api/resources/experimentation/client/Client.mjs +10 -0
- package/dist/esm/management/api/resources/experimentation/resources/experiments/client/Client.d.mts +133 -0
- package/dist/esm/management/api/resources/experimentation/resources/experiments/client/Client.mjs +485 -0
- package/dist/esm/management/api/resources/experimentation/resources/featureFlags/client/Client.d.mts +126 -0
- package/dist/esm/management/api/resources/experimentation/resources/featureFlags/client/Client.mjs +434 -0
- package/dist/esm/management/api/resources/experimentation/resources/featureFlags/client/index.d.mts +1 -0
- package/dist/esm/management/api/resources/experimentation/resources/featureFlags/client/index.mjs +1 -0
- package/dist/esm/management/api/resources/experimentation/resources/featureFlags/exports.d.mts +3 -0
- package/dist/esm/management/api/resources/experimentation/resources/featureFlags/exports.mjs +4 -0
- package/dist/esm/management/api/resources/experimentation/resources/featureFlags/index.d.mts +2 -0
- package/dist/esm/management/api/resources/experimentation/resources/featureFlags/index.mjs +2 -0
- package/dist/esm/management/api/resources/experimentation/resources/featureFlags/resources/index.d.mts +1 -0
- package/dist/esm/management/api/resources/experimentation/resources/featureFlags/resources/index.mjs +1 -0
- package/dist/esm/management/api/resources/experimentation/resources/featureFlags/resources/variations/client/Client.d.mts +109 -0
- package/dist/esm/management/api/resources/experimentation/resources/featureFlags/resources/variations/client/Client.mjs +353 -0
- package/dist/esm/management/api/resources/experimentation/resources/featureFlags/resources/variations/client/index.d.mts +1 -0
- package/dist/esm/management/api/resources/experimentation/resources/featureFlags/resources/variations/client/index.mjs +1 -0
- package/dist/esm/management/api/resources/experimentation/resources/featureFlags/resources/variations/exports.d.mts +2 -0
- package/dist/esm/management/api/resources/{organizations/resources/organizationTemplate → experimentation/resources/featureFlags/resources/variations}/exports.mjs +1 -1
- package/dist/esm/management/api/resources/experimentation/resources/index.d.mts +2 -0
- package/dist/esm/management/api/resources/experimentation/resources/index.mjs +2 -0
- package/dist/esm/management/api/resources/experimentation/resources/segments/client/Client.d.mts +104 -0
- package/dist/esm/management/api/resources/experimentation/resources/segments/client/Client.mjs +361 -0
- package/dist/esm/management/api/resources/experimentation/resources/segments/client/index.d.mts +1 -0
- package/dist/esm/management/api/resources/experimentation/resources/segments/client/index.mjs +1 -0
- package/dist/esm/management/api/resources/experimentation/resources/segments/exports.d.mts +2 -0
- package/dist/esm/management/api/resources/experimentation/resources/segments/exports.mjs +3 -0
- package/dist/esm/management/api/resources/experimentation/resources/segments/index.d.mts +1 -0
- package/dist/esm/management/api/resources/experimentation/resources/segments/index.mjs +1 -0
- package/dist/esm/management/api/resources/organizations/client/Client.d.mts +0 -3
- package/dist/esm/management/api/resources/organizations/client/Client.mjs +0 -5
- package/dist/esm/management/api/resources/organizations/resources/index.d.mts +0 -1
- package/dist/esm/management/api/resources/organizations/resources/index.mjs +0 -1
- package/dist/esm/management/api/resources/users/client/Client.d.mts +8 -10
- package/dist/esm/management/api/resources/users/client/Client.mjs +8 -10
- package/dist/esm/management/api/types/types.d.mts +642 -91
- package/dist/esm/management/api/types/types.mjs +88 -29
- package/dist/esm/management/version.d.mts +1 -1
- package/dist/esm/management/version.mjs +1 -1
- package/package.json +34 -12
- package/reference.md +1829 -313
- package/dist/cjs/management/api/resources/organizations/resources/organizationTemplate/client/Client.d.ts +0 -63
- package/dist/cjs/management/api/resources/organizations/resources/organizationTemplate/exports.d.ts +0 -2
- package/dist/esm/management/api/resources/organizations/resources/organizationTemplate/client/Client.d.mts +0 -63
- package/dist/esm/management/api/resources/organizations/resources/organizationTemplate/client/Client.mjs +0 -195
- package/dist/esm/management/api/resources/organizations/resources/organizationTemplate/exports.d.mts +0 -2
- /package/dist/cjs/management/api/resources/{organizations/resources/organizationTemplate → experimentation/resources/featureFlags}/client/index.d.ts +0 -0
- /package/dist/cjs/management/api/resources/{organizations/resources/organizationTemplate → experimentation/resources/featureFlags}/client/index.js +0 -0
- /package/dist/{esm/management/api/resources/organizations/resources/organizationTemplate/client/index.d.mts → cjs/management/api/resources/experimentation/resources/featureFlags/resources/variations/client/index.d.ts} +0 -0
- /package/dist/cjs/management/api/resources/{organizations/resources/organizationTemplate → experimentation/resources/featureFlags/resources/variations}/index.d.ts +0 -0
- /package/dist/cjs/management/api/resources/{organizations/resources/organizationTemplate → experimentation/resources/featureFlags/resources/variations}/index.js +0 -0
- /package/dist/{esm/management/api/resources/organizations/resources/organizationTemplate/client/index.mjs → cjs/management/api/resources/experimentation/resources/segments/client/index.d.ts} +0 -0
- /package/dist/esm/management/api/resources/{organizations/resources/organizationTemplate → experimentation/resources/featureFlags/resources/variations}/index.d.mts +0 -0
- /package/dist/esm/management/api/resources/{organizations/resources/organizationTemplate → experimentation/resources/featureFlags/resources/variations}/index.mjs +0 -0
package/dist/cjs/management/api/resources/experimentation/resources/segments/client/Client.d.ts
ADDED
|
@@ -0,0 +1,104 @@
|
|
|
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 SegmentsClient {
|
|
6
|
+
type Options = BaseClientOptions;
|
|
7
|
+
interface RequestOptions extends BaseRequestOptions {
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
export declare class SegmentsClient {
|
|
11
|
+
protected readonly _options: NormalizedClientOptionsWithAuth<SegmentsClient.Options>;
|
|
12
|
+
constructor(options: SegmentsClient.Options);
|
|
13
|
+
/**
|
|
14
|
+
* Retrieve a paginated list of segments for the tenant.
|
|
15
|
+
*
|
|
16
|
+
* @param {Management.ListSegmentsRequestParameters} request
|
|
17
|
+
* @param {SegmentsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
18
|
+
*
|
|
19
|
+
* @throws {@link Management.BadRequestError}
|
|
20
|
+
* @throws {@link Management.UnauthorizedError}
|
|
21
|
+
* @throws {@link Management.ForbiddenError}
|
|
22
|
+
* @throws {@link Management.TooManyRequestsError}
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* await client.experimentation.segments.list({
|
|
26
|
+
* from: "from",
|
|
27
|
+
* take: 1,
|
|
28
|
+
* type: "auth0"
|
|
29
|
+
* })
|
|
30
|
+
*/
|
|
31
|
+
list(request?: Management.ListSegmentsRequestParameters, requestOptions?: SegmentsClient.RequestOptions): Promise<core.Page<Management.Segment, Management.ListSegmentsResponseContent>>;
|
|
32
|
+
/**
|
|
33
|
+
* Create a new segment with rule-based membership criteria for use in experiments.
|
|
34
|
+
*
|
|
35
|
+
* @param {Management.CreateSegmentRequestContent} request
|
|
36
|
+
* @param {SegmentsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
37
|
+
*
|
|
38
|
+
* @throws {@link Management.BadRequestError}
|
|
39
|
+
* @throws {@link Management.UnauthorizedError}
|
|
40
|
+
* @throws {@link Management.ForbiddenError}
|
|
41
|
+
* @throws {@link Management.ConflictError}
|
|
42
|
+
* @throws {@link Management.UnprocessableEntityError}
|
|
43
|
+
* @throws {@link Management.TooManyRequestsError}
|
|
44
|
+
*
|
|
45
|
+
* @example
|
|
46
|
+
* await client.experimentation.segments.create({
|
|
47
|
+
* name: "name",
|
|
48
|
+
* rules: [{}]
|
|
49
|
+
* })
|
|
50
|
+
*/
|
|
51
|
+
create(request: Management.CreateSegmentRequestContent, requestOptions?: SegmentsClient.RequestOptions): core.HttpResponsePromise<Management.CreateSegmentResponseContent>;
|
|
52
|
+
private __create;
|
|
53
|
+
/**
|
|
54
|
+
* Retrieve a single segment by its ID.
|
|
55
|
+
*
|
|
56
|
+
* @param {string} id - The ID of the segment to retrieve.
|
|
57
|
+
* @param {SegmentsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
58
|
+
*
|
|
59
|
+
* @throws {@link Management.UnauthorizedError}
|
|
60
|
+
* @throws {@link Management.ForbiddenError}
|
|
61
|
+
* @throws {@link Management.NotFoundError}
|
|
62
|
+
* @throws {@link Management.TooManyRequestsError}
|
|
63
|
+
*
|
|
64
|
+
* @example
|
|
65
|
+
* await client.experimentation.segments.get("id")
|
|
66
|
+
*/
|
|
67
|
+
get(id: string, requestOptions?: SegmentsClient.RequestOptions): core.HttpResponsePromise<Management.GetSegmentResponseContent>;
|
|
68
|
+
private __get;
|
|
69
|
+
/**
|
|
70
|
+
* Delete a segment by ID. Idempotent: returns 204 even if segment does not exist.
|
|
71
|
+
*
|
|
72
|
+
* @param {string} id - The ID of the segment to delete.
|
|
73
|
+
* @param {SegmentsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
74
|
+
*
|
|
75
|
+
* @throws {@link Management.ForbiddenError}
|
|
76
|
+
* @throws {@link Management.ConflictError}
|
|
77
|
+
* @throws {@link Management.TooManyRequestsError}
|
|
78
|
+
*
|
|
79
|
+
* @example
|
|
80
|
+
* await client.experimentation.segments.delete("id")
|
|
81
|
+
*/
|
|
82
|
+
delete(id: string, requestOptions?: SegmentsClient.RequestOptions): core.HttpResponsePromise<void>;
|
|
83
|
+
private __delete;
|
|
84
|
+
/**
|
|
85
|
+
* Partially update a segment by ID. Only provided fields are updated. Sending rules replaces the entire rules array.
|
|
86
|
+
*
|
|
87
|
+
* @param {string} id - The ID of the segment to update.
|
|
88
|
+
* @param {Management.UpdateSegmentRequestContent} request
|
|
89
|
+
* @param {SegmentsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
90
|
+
*
|
|
91
|
+
* @throws {@link Management.BadRequestError}
|
|
92
|
+
* @throws {@link Management.UnauthorizedError}
|
|
93
|
+
* @throws {@link Management.ForbiddenError}
|
|
94
|
+
* @throws {@link Management.NotFoundError}
|
|
95
|
+
* @throws {@link Management.ConflictError}
|
|
96
|
+
* @throws {@link Management.UnprocessableEntityError}
|
|
97
|
+
* @throws {@link Management.TooManyRequestsError}
|
|
98
|
+
*
|
|
99
|
+
* @example
|
|
100
|
+
* await client.experimentation.segments.update("id")
|
|
101
|
+
*/
|
|
102
|
+
update(id: string, request?: Management.UpdateSegmentRequestContent, requestOptions?: SegmentsClient.RequestOptions): core.HttpResponsePromise<Management.UpdateSegmentResponseContent>;
|
|
103
|
+
private __update;
|
|
104
|
+
}
|
|
@@ -43,7 +43,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
43
43
|
});
|
|
44
44
|
};
|
|
45
45
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
46
|
-
exports.
|
|
46
|
+
exports.SegmentsClient = void 0;
|
|
47
47
|
const BaseClient_js_1 = require("../../../../../../BaseClient.js");
|
|
48
48
|
const core = __importStar(require("../../../../../../core/index.js"));
|
|
49
49
|
const headers_js_1 = require("../../../../../../core/headers.js");
|
|
@@ -51,15 +51,170 @@ const environments = __importStar(require("../../../../../../environments.js"));
|
|
|
51
51
|
const handleNonStatusCodeError_js_1 = require("../../../../../../errors/handleNonStatusCodeError.js");
|
|
52
52
|
const errors = __importStar(require("../../../../../../errors/index.js"));
|
|
53
53
|
const Management = __importStar(require("../../../../../index.js"));
|
|
54
|
-
class
|
|
54
|
+
class SegmentsClient {
|
|
55
55
|
constructor(options) {
|
|
56
56
|
this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
|
|
57
57
|
}
|
|
58
58
|
/**
|
|
59
|
-
* Retrieve
|
|
59
|
+
* Retrieve a paginated list of segments for the tenant.
|
|
60
60
|
*
|
|
61
|
-
* @param {
|
|
62
|
-
* @param {
|
|
61
|
+
* @param {Management.ListSegmentsRequestParameters} request
|
|
62
|
+
* @param {SegmentsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
63
|
+
*
|
|
64
|
+
* @throws {@link Management.BadRequestError}
|
|
65
|
+
* @throws {@link Management.UnauthorizedError}
|
|
66
|
+
* @throws {@link Management.ForbiddenError}
|
|
67
|
+
* @throws {@link Management.TooManyRequestsError}
|
|
68
|
+
*
|
|
69
|
+
* @example
|
|
70
|
+
* await client.experimentation.segments.list({
|
|
71
|
+
* from: "from",
|
|
72
|
+
* take: 1,
|
|
73
|
+
* type: "auth0"
|
|
74
|
+
* })
|
|
75
|
+
*/
|
|
76
|
+
list() {
|
|
77
|
+
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
78
|
+
const list = core.HttpResponsePromise.interceptFunction((request) => __awaiter(this, void 0, void 0, function* () {
|
|
79
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
80
|
+
const { from: from_, take = 50, type: type_ } = request;
|
|
81
|
+
const _queryParams = {
|
|
82
|
+
from: from_,
|
|
83
|
+
take,
|
|
84
|
+
type: type_ !== undefined ? type_ : undefined,
|
|
85
|
+
};
|
|
86
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
87
|
+
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);
|
|
88
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
89
|
+
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/segments"),
|
|
90
|
+
method: "GET",
|
|
91
|
+
headers: _headers,
|
|
92
|
+
queryString: core.url
|
|
93
|
+
.queryBuilder()
|
|
94
|
+
.addMany(_queryParams)
|
|
95
|
+
.mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams)
|
|
96
|
+
.build(),
|
|
97
|
+
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,
|
|
98
|
+
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,
|
|
99
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
100
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
101
|
+
logging: this._options.logging,
|
|
102
|
+
});
|
|
103
|
+
if (_response.ok) {
|
|
104
|
+
return {
|
|
105
|
+
data: _response.body,
|
|
106
|
+
rawResponse: _response.rawResponse,
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
if (_response.error.reason === "status-code") {
|
|
110
|
+
switch (_response.error.statusCode) {
|
|
111
|
+
case 400:
|
|
112
|
+
throw new Management.BadRequestError(_response.error.body, _response.rawResponse);
|
|
113
|
+
case 401:
|
|
114
|
+
throw new Management.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
115
|
+
case 403:
|
|
116
|
+
throw new Management.ForbiddenError(_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, "GET", "/experimentation/segments");
|
|
128
|
+
}));
|
|
129
|
+
const dataWithRawResponse = yield list(request).withRawResponse();
|
|
130
|
+
return new core.Page({
|
|
131
|
+
response: dataWithRawResponse.data,
|
|
132
|
+
rawResponse: dataWithRawResponse.rawResponse,
|
|
133
|
+
hasNextPage: (response) => (response === null || response === void 0 ? void 0 : response.next) != null && !(typeof (response === null || response === void 0 ? void 0 : response.next) === "string" && (response === null || response === void 0 ? void 0 : response.next) === ""),
|
|
134
|
+
getItems: (response) => { var _a; return (_a = response === null || response === void 0 ? void 0 : response.segments) !== null && _a !== void 0 ? _a : []; },
|
|
135
|
+
loadPage: (response) => {
|
|
136
|
+
return list(core.setObjectProperty(request, "from", response === null || response === void 0 ? void 0 : response.next));
|
|
137
|
+
},
|
|
138
|
+
});
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
/**
|
|
142
|
+
* Create a new segment with rule-based membership criteria for use in experiments.
|
|
143
|
+
*
|
|
144
|
+
* @param {Management.CreateSegmentRequestContent} request
|
|
145
|
+
* @param {SegmentsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
146
|
+
*
|
|
147
|
+
* @throws {@link Management.BadRequestError}
|
|
148
|
+
* @throws {@link Management.UnauthorizedError}
|
|
149
|
+
* @throws {@link Management.ForbiddenError}
|
|
150
|
+
* @throws {@link Management.ConflictError}
|
|
151
|
+
* @throws {@link Management.UnprocessableEntityError}
|
|
152
|
+
* @throws {@link Management.TooManyRequestsError}
|
|
153
|
+
*
|
|
154
|
+
* @example
|
|
155
|
+
* await client.experimentation.segments.create({
|
|
156
|
+
* name: "name",
|
|
157
|
+
* rules: [{}]
|
|
158
|
+
* })
|
|
159
|
+
*/
|
|
160
|
+
create(request, requestOptions) {
|
|
161
|
+
return core.HttpResponsePromise.fromPromise(this.__create(request, requestOptions));
|
|
162
|
+
}
|
|
163
|
+
__create(request, requestOptions) {
|
|
164
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
165
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
166
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
167
|
+
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);
|
|
168
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
169
|
+
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/segments"),
|
|
170
|
+
method: "POST",
|
|
171
|
+
headers: _headers,
|
|
172
|
+
contentType: "application/json",
|
|
173
|
+
queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
|
|
174
|
+
requestType: "json",
|
|
175
|
+
body: request,
|
|
176
|
+
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,
|
|
177
|
+
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,
|
|
178
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
179
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
180
|
+
logging: this._options.logging,
|
|
181
|
+
});
|
|
182
|
+
if (_response.ok) {
|
|
183
|
+
return {
|
|
184
|
+
data: _response.body,
|
|
185
|
+
rawResponse: _response.rawResponse,
|
|
186
|
+
};
|
|
187
|
+
}
|
|
188
|
+
if (_response.error.reason === "status-code") {
|
|
189
|
+
switch (_response.error.statusCode) {
|
|
190
|
+
case 400:
|
|
191
|
+
throw new Management.BadRequestError(_response.error.body, _response.rawResponse);
|
|
192
|
+
case 401:
|
|
193
|
+
throw new Management.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
194
|
+
case 403:
|
|
195
|
+
throw new Management.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
196
|
+
case 409:
|
|
197
|
+
throw new Management.ConflictError(_response.error.body, _response.rawResponse);
|
|
198
|
+
case 422:
|
|
199
|
+
throw new Management.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
200
|
+
case 429:
|
|
201
|
+
throw new Management.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
202
|
+
default:
|
|
203
|
+
throw new errors.ManagementError({
|
|
204
|
+
statusCode: _response.error.statusCode,
|
|
205
|
+
body: _response.error.body,
|
|
206
|
+
rawResponse: _response.rawResponse,
|
|
207
|
+
});
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/experimentation/segments");
|
|
211
|
+
});
|
|
212
|
+
}
|
|
213
|
+
/**
|
|
214
|
+
* Retrieve a single segment by its ID.
|
|
215
|
+
*
|
|
216
|
+
* @param {string} id - The ID of the segment to retrieve.
|
|
217
|
+
* @param {SegmentsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
63
218
|
*
|
|
64
219
|
* @throws {@link Management.UnauthorizedError}
|
|
65
220
|
* @throws {@link Management.ForbiddenError}
|
|
@@ -67,7 +222,7 @@ class OrganizationTemplateClient {
|
|
|
67
222
|
* @throws {@link Management.TooManyRequestsError}
|
|
68
223
|
*
|
|
69
224
|
* @example
|
|
70
|
-
* await client.
|
|
225
|
+
* await client.experimentation.segments.get("id")
|
|
71
226
|
*/
|
|
72
227
|
get(id, requestOptions) {
|
|
73
228
|
return core.HttpResponsePromise.fromPromise(this.__get(id, requestOptions));
|
|
@@ -78,7 +233,7 @@ class OrganizationTemplateClient {
|
|
|
78
233
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
79
234
|
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);
|
|
80
235
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
81
|
-
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, `
|
|
236
|
+
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/segments/${core.url.encodePathParam(id)}`),
|
|
82
237
|
method: "GET",
|
|
83
238
|
headers: _headers,
|
|
84
239
|
queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
|
|
@@ -109,35 +264,33 @@ class OrganizationTemplateClient {
|
|
|
109
264
|
});
|
|
110
265
|
}
|
|
111
266
|
}
|
|
112
|
-
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/
|
|
267
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/experimentation/segments/{id}");
|
|
113
268
|
});
|
|
114
269
|
}
|
|
115
270
|
/**
|
|
116
|
-
*
|
|
271
|
+
* Delete a segment by ID. Idempotent: returns 204 even if segment does not exist.
|
|
117
272
|
*
|
|
118
|
-
* @param {string} id - The ID of the
|
|
119
|
-
* @param {
|
|
120
|
-
* @param {OrganizationTemplateClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
273
|
+
* @param {string} id - The ID of the segment to delete.
|
|
274
|
+
* @param {SegmentsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
121
275
|
*
|
|
122
|
-
* @throws {@link Management.BadRequestError}
|
|
123
|
-
* @throws {@link Management.UnauthorizedError}
|
|
124
276
|
* @throws {@link Management.ForbiddenError}
|
|
277
|
+
* @throws {@link Management.ConflictError}
|
|
125
278
|
* @throws {@link Management.TooManyRequestsError}
|
|
126
279
|
*
|
|
127
280
|
* @example
|
|
128
|
-
* await client.
|
|
281
|
+
* await client.experimentation.segments.delete("id")
|
|
129
282
|
*/
|
|
130
|
-
|
|
131
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
283
|
+
delete(id, requestOptions) {
|
|
284
|
+
return core.HttpResponsePromise.fromPromise(this.__delete(id, requestOptions));
|
|
132
285
|
}
|
|
133
|
-
|
|
286
|
+
__delete(id, requestOptions) {
|
|
134
287
|
return __awaiter(this, void 0, void 0, function* () {
|
|
135
288
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
136
289
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
137
290
|
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);
|
|
138
291
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
139
|
-
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, `
|
|
140
|
-
method: "
|
|
292
|
+
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/segments/${core.url.encodePathParam(id)}`),
|
|
293
|
+
method: "DELETE",
|
|
141
294
|
headers: _headers,
|
|
142
295
|
queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
|
|
143
296
|
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,
|
|
@@ -151,12 +304,10 @@ class OrganizationTemplateClient {
|
|
|
151
304
|
}
|
|
152
305
|
if (_response.error.reason === "status-code") {
|
|
153
306
|
switch (_response.error.statusCode) {
|
|
154
|
-
case 400:
|
|
155
|
-
throw new Management.BadRequestError(_response.error.body, _response.rawResponse);
|
|
156
|
-
case 401:
|
|
157
|
-
throw new Management.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
158
307
|
case 403:
|
|
159
308
|
throw new Management.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
309
|
+
case 409:
|
|
310
|
+
throw new Management.ConflictError(_response.error.body, _response.rawResponse);
|
|
160
311
|
case 429:
|
|
161
312
|
throw new Management.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
162
313
|
default:
|
|
@@ -167,37 +318,43 @@ class OrganizationTemplateClient {
|
|
|
167
318
|
});
|
|
168
319
|
}
|
|
169
320
|
}
|
|
170
|
-
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "
|
|
321
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "DELETE", "/experimentation/segments/{id}");
|
|
171
322
|
});
|
|
172
323
|
}
|
|
173
324
|
/**
|
|
174
|
-
*
|
|
325
|
+
* Partially update a segment by ID. Only provided fields are updated. Sending rules replaces the entire rules array.
|
|
175
326
|
*
|
|
176
|
-
* @param {string} id - The ID of the
|
|
177
|
-
* @param {
|
|
178
|
-
* @param {
|
|
327
|
+
* @param {string} id - The ID of the segment to update.
|
|
328
|
+
* @param {Management.UpdateSegmentRequestContent} request
|
|
329
|
+
* @param {SegmentsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
179
330
|
*
|
|
180
331
|
* @throws {@link Management.BadRequestError}
|
|
181
332
|
* @throws {@link Management.UnauthorizedError}
|
|
182
333
|
* @throws {@link Management.ForbiddenError}
|
|
334
|
+
* @throws {@link Management.NotFoundError}
|
|
335
|
+
* @throws {@link Management.ConflictError}
|
|
336
|
+
* @throws {@link Management.UnprocessableEntityError}
|
|
183
337
|
* @throws {@link Management.TooManyRequestsError}
|
|
184
338
|
*
|
|
185
339
|
* @example
|
|
186
|
-
* await client.
|
|
340
|
+
* await client.experimentation.segments.update("id")
|
|
187
341
|
*/
|
|
188
|
-
|
|
189
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
342
|
+
update(id, request = {}, requestOptions) {
|
|
343
|
+
return core.HttpResponsePromise.fromPromise(this.__update(id, request, requestOptions));
|
|
190
344
|
}
|
|
191
|
-
|
|
192
|
-
return __awaiter(this,
|
|
345
|
+
__update(id_1) {
|
|
346
|
+
return __awaiter(this, arguments, void 0, function* (id, request = {}, requestOptions) {
|
|
193
347
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
194
348
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
195
349
|
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);
|
|
196
350
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
197
|
-
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, `
|
|
198
|
-
method: "
|
|
351
|
+
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/segments/${core.url.encodePathParam(id)}`),
|
|
352
|
+
method: "PATCH",
|
|
199
353
|
headers: _headers,
|
|
354
|
+
contentType: "application/json",
|
|
200
355
|
queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
|
|
356
|
+
requestType: "json",
|
|
357
|
+
body: request,
|
|
201
358
|
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,
|
|
202
359
|
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,
|
|
203
360
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -205,7 +362,10 @@ class OrganizationTemplateClient {
|
|
|
205
362
|
logging: this._options.logging,
|
|
206
363
|
});
|
|
207
364
|
if (_response.ok) {
|
|
208
|
-
return {
|
|
365
|
+
return {
|
|
366
|
+
data: _response.body,
|
|
367
|
+
rawResponse: _response.rawResponse,
|
|
368
|
+
};
|
|
209
369
|
}
|
|
210
370
|
if (_response.error.reason === "status-code") {
|
|
211
371
|
switch (_response.error.statusCode) {
|
|
@@ -215,6 +375,12 @@ class OrganizationTemplateClient {
|
|
|
215
375
|
throw new Management.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
216
376
|
case 403:
|
|
217
377
|
throw new Management.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
378
|
+
case 404:
|
|
379
|
+
throw new Management.NotFoundError(_response.error.body, _response.rawResponse);
|
|
380
|
+
case 409:
|
|
381
|
+
throw new Management.ConflictError(_response.error.body, _response.rawResponse);
|
|
382
|
+
case 422:
|
|
383
|
+
throw new Management.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
218
384
|
case 429:
|
|
219
385
|
throw new Management.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
220
386
|
default:
|
|
@@ -225,8 +391,8 @@ class OrganizationTemplateClient {
|
|
|
225
391
|
});
|
|
226
392
|
}
|
|
227
393
|
}
|
|
228
|
-
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "
|
|
394
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "PATCH", "/experimentation/segments/{id}");
|
|
229
395
|
});
|
|
230
396
|
}
|
|
231
397
|
}
|
|
232
|
-
exports.
|
|
398
|
+
exports.SegmentsClient = SegmentsClient;
|
|
@@ -0,0 +1,21 @@
|
|
|
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 __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
15
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
16
|
+
};
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.SegmentsClient = void 0;
|
|
19
|
+
var Client_js_1 = require("./client/Client.js");
|
|
20
|
+
Object.defineProperty(exports, "SegmentsClient", { enumerable: true, get: function () { return Client_js_1.SegmentsClient; } });
|
|
21
|
+
__exportStar(require("./client/index.js"), exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./client/index.js";
|
|
@@ -0,0 +1,17 @@
|
|
|
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 __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./client/index.js"), exports);
|
|
@@ -10,7 +10,6 @@ import { EnabledConnectionsClient } from "../resources/enabledConnections/client
|
|
|
10
10
|
import { GroupsClient } from "../resources/groups/client/Client.js";
|
|
11
11
|
import { InvitationsClient } from "../resources/invitations/client/Client.js";
|
|
12
12
|
import { MembersClient } from "../resources/members/client/Client.js";
|
|
13
|
-
import { OrganizationTemplateClient } from "../resources/organizationTemplate/client/Client.js";
|
|
14
13
|
import { RolesClient } from "../resources/roles/client/Client.js";
|
|
15
14
|
export declare namespace OrganizationsClient {
|
|
16
15
|
type Options = BaseClientOptions;
|
|
@@ -26,7 +25,6 @@ export declare class OrganizationsClient {
|
|
|
26
25
|
protected _enabledConnections: EnabledConnectionsClient | undefined;
|
|
27
26
|
protected _invitations: InvitationsClient | undefined;
|
|
28
27
|
protected _members: MembersClient | undefined;
|
|
29
|
-
protected _organizationTemplate: OrganizationTemplateClient | undefined;
|
|
30
28
|
protected _groups: GroupsClient | undefined;
|
|
31
29
|
protected _roles: RolesClient | undefined;
|
|
32
30
|
constructor(options: OrganizationsClient.Options);
|
|
@@ -37,7 +35,6 @@ export declare class OrganizationsClient {
|
|
|
37
35
|
get enabledConnections(): EnabledConnectionsClient;
|
|
38
36
|
get invitations(): InvitationsClient;
|
|
39
37
|
get members(): MembersClient;
|
|
40
|
-
get organizationTemplate(): OrganizationTemplateClient;
|
|
41
38
|
get groups(): GroupsClient;
|
|
42
39
|
get roles(): RolesClient;
|
|
43
40
|
/**
|
|
@@ -59,8 +59,7 @@ const Client_js_5 = require("../resources/enabledConnections/client/Client.js");
|
|
|
59
59
|
const Client_js_6 = require("../resources/groups/client/Client.js");
|
|
60
60
|
const Client_js_7 = require("../resources/invitations/client/Client.js");
|
|
61
61
|
const Client_js_8 = require("../resources/members/client/Client.js");
|
|
62
|
-
const Client_js_9 = require("../resources/
|
|
63
|
-
const Client_js_10 = require("../resources/roles/client/Client.js");
|
|
62
|
+
const Client_js_9 = require("../resources/roles/client/Client.js");
|
|
64
63
|
class OrganizationsClient {
|
|
65
64
|
constructor(options) {
|
|
66
65
|
this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
|
|
@@ -93,17 +92,13 @@ class OrganizationsClient {
|
|
|
93
92
|
var _a;
|
|
94
93
|
return ((_a = this._members) !== null && _a !== void 0 ? _a : (this._members = new Client_js_8.MembersClient(this._options)));
|
|
95
94
|
}
|
|
96
|
-
get organizationTemplate() {
|
|
97
|
-
var _a;
|
|
98
|
-
return ((_a = this._organizationTemplate) !== null && _a !== void 0 ? _a : (this._organizationTemplate = new Client_js_9.OrganizationTemplateClient(this._options)));
|
|
99
|
-
}
|
|
100
95
|
get groups() {
|
|
101
96
|
var _a;
|
|
102
97
|
return ((_a = this._groups) !== null && _a !== void 0 ? _a : (this._groups = new Client_js_6.GroupsClient(this._options)));
|
|
103
98
|
}
|
|
104
99
|
get roles() {
|
|
105
100
|
var _a;
|
|
106
|
-
return ((_a = this._roles) !== null && _a !== void 0 ? _a : (this._roles = new
|
|
101
|
+
return ((_a = this._roles) !== null && _a !== void 0 ? _a : (this._roles = new Client_js_9.RolesClient(this._options)));
|
|
107
102
|
}
|
|
108
103
|
/**
|
|
109
104
|
* Retrieve detailed list of all Organizations available in your tenant. For more information, see Auth0 Organizations.
|
|
@@ -6,5 +6,4 @@ export * as enabledConnections from "./enabledConnections/index.js";
|
|
|
6
6
|
export * as groups from "./groups/index.js";
|
|
7
7
|
export * as invitations from "./invitations/index.js";
|
|
8
8
|
export * as members from "./members/index.js";
|
|
9
|
-
export * as organizationTemplate from "./organizationTemplate/index.js";
|
|
10
9
|
export * as roles from "./roles/index.js";
|
|
@@ -33,7 +33,7 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
33
33
|
};
|
|
34
34
|
})();
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
exports.roles = exports.
|
|
36
|
+
exports.roles = exports.members = exports.invitations = exports.groups = exports.enabledConnections = exports.discoveryDomains = exports.connections = exports.clients = exports.clientGrants = void 0;
|
|
37
37
|
exports.clientGrants = __importStar(require("./clientGrants/index.js"));
|
|
38
38
|
exports.clients = __importStar(require("./clients/index.js"));
|
|
39
39
|
exports.connections = __importStar(require("./connections/index.js"));
|
|
@@ -42,5 +42,4 @@ exports.enabledConnections = __importStar(require("./enabledConnections/index.js
|
|
|
42
42
|
exports.groups = __importStar(require("./groups/index.js"));
|
|
43
43
|
exports.invitations = __importStar(require("./invitations/index.js"));
|
|
44
44
|
exports.members = __importStar(require("./members/index.js"));
|
|
45
|
-
exports.organizationTemplate = __importStar(require("./organizationTemplate/index.js"));
|
|
46
45
|
exports.roles = __importStar(require("./roles/index.js"));
|
|
@@ -59,24 +59,22 @@ export declare class UsersClient {
|
|
|
59
59
|
get refreshToken(): RefreshTokenClient;
|
|
60
60
|
get sessions(): SessionsClient;
|
|
61
61
|
/**
|
|
62
|
-
*
|
|
62
|
+
* This endpoint retrieves details of users. It's best suited to interactive, best-effort search and lookups where slightly stale results are acceptable. With it, you can:
|
|
63
63
|
*
|
|
64
|
-
* - Specify
|
|
64
|
+
* - Specify search criteria for users
|
|
65
65
|
* - Sort the users to be returned
|
|
66
66
|
* - Select the fields to be returned
|
|
67
67
|
* - Specify the number of users to retrieve per page and the page index
|
|
68
68
|
*
|
|
69
|
+
* This endpoint is **not suited for use in critical paths**. It is eventually consistent and runs under a short (~2 second) query time limit, so results can be stale and heavy queries can return a 503.
|
|
69
70
|
*
|
|
71
|
+
* - Do not use this endpoint for authentication, account linking, or logic inside login-flow Actions. Instead, [look users up directly by ID or email](https://auth0.com/docs/manage-users/user-search/get-users-by-id-or-email#management-api) to get their current state.
|
|
72
|
+
* - Do not use this endpoint to keep an external system in sync with user data. Instead, subscribe to [Event Streams](https://auth0.com/docs/customize/events/sync-data-across-systems) to receive every change as it happens.
|
|
73
|
+
* - Do not use this endpoint to enumerate or export your entire user base. Instead, run a [bulk user export](https://auth0.com/docs/manage-users/user-migration/bulk-user-exports) to retrieve the full set.
|
|
70
74
|
*
|
|
71
|
-
*
|
|
75
|
+
* Use the `q` query parameter to match users with [query string syntax](https://auth0.com/docs/manage-users/user-search/user-search-query-syntax). For full instructions and guidance, see [How to List and Search Users](https://auth0.com/docs/manage-users/user-search/list-and-search-users).
|
|
72
76
|
*
|
|
73
|
-
*
|
|
74
|
-
*
|
|
75
|
-
* Read about [best practices](https://auth0.com/docs/users/search/best-practices) when working with the API endpoints for retrieving users.
|
|
76
|
-
*
|
|
77
|
-
*
|
|
78
|
-
*
|
|
79
|
-
* Auth0 limits the number of users you can return. If you exceed this threshold, please redefine your search, use the [export job](https://auth0.com/docs/api/management/v2#!/Jobs/post_users_exports), or the [User Import / Export](https://auth0.com/docs/extensions/user-import-export) extension.
|
|
77
|
+
* For efficient queries, prefer indexed top-level fields and exact matches. Certain kinds of queries can be slow and may time out, such as filtering on freeform or multi-value fields (like user-defined attributes in `app_metadata` or `user_metadata`) or using leading wildcards.
|
|
80
78
|
*
|
|
81
79
|
* @param {Management.ListUsersRequestParameters} request
|
|
82
80
|
* @param {UsersClient.RequestOptions} requestOptions - Request-specific configuration.
|