auth0 7.5.0-beta.0 → 7.5.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 +3 -0
- package/dist/cjs/management/Client.js +87 -82
- package/dist/cjs/management/api/requests/requests.d.ts +42 -0
- package/dist/cjs/management/api/resources/clientProfiles/client/Client.d.ts +106 -0
- package/dist/cjs/management/api/resources/clientProfiles/client/Client.js +391 -0
- package/dist/cjs/management/api/resources/clientProfiles/client/index.d.ts +1 -0
- package/dist/cjs/management/api/resources/clientProfiles/client/index.js +2 -0
- package/dist/cjs/management/api/resources/clientProfiles/exports.d.ts +2 -0
- package/dist/cjs/management/api/resources/clientProfiles/exports.js +21 -0
- package/dist/cjs/management/api/resources/clientProfiles/index.d.ts +1 -0
- package/dist/cjs/management/api/resources/clientProfiles/index.js +17 -0
- package/dist/cjs/management/api/resources/index.d.ts +1 -0
- package/dist/cjs/management/api/resources/index.js +2 -1
- package/dist/cjs/management/api/types/types.d.ts +630 -874
- package/dist/cjs/management/api/types/types.js +218 -21
- package/dist/cjs/management/version.d.ts +1 -1
- package/dist/cjs/management/version.js +1 -1
- package/dist/esm/management/Client.d.mts +3 -0
- package/dist/esm/management/Client.mjs +5 -0
- package/dist/esm/management/api/requests/requests.d.mts +42 -0
- package/dist/esm/management/api/resources/clientProfiles/client/Client.d.mts +106 -0
- package/dist/esm/management/api/resources/clientProfiles/client/Client.mjs +354 -0
- package/dist/esm/management/api/resources/clientProfiles/client/index.d.mts +1 -0
- package/dist/esm/management/api/resources/clientProfiles/client/index.mjs +1 -0
- package/dist/esm/management/api/resources/clientProfiles/exports.d.mts +2 -0
- package/dist/esm/management/api/resources/clientProfiles/exports.mjs +3 -0
- package/dist/esm/management/api/resources/clientProfiles/index.d.mts +1 -0
- package/dist/esm/management/api/resources/clientProfiles/index.mjs +1 -0
- package/dist/esm/management/api/resources/index.d.mts +1 -0
- package/dist/esm/management/api/resources/index.mjs +1 -0
- package/dist/esm/management/api/types/types.d.mts +630 -874
- package/dist/esm/management/api/types/types.mjs +197 -0
- package/dist/esm/management/version.d.mts +1 -1
- package/dist/esm/management/version.mjs +1 -1
- package/package.json +12 -1
- package/reference.md +350 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "7.5.0
|
|
1
|
+
export declare const SDK_VERSION = "7.5.0";
|
|
@@ -4,6 +4,7 @@ import { AnomalyClient } from "./api/resources/anomaly/client/Client.mjs";
|
|
|
4
4
|
import { AttackProtectionClient } from "./api/resources/attackProtection/client/Client.mjs";
|
|
5
5
|
import { BrandingClient } from "./api/resources/branding/client/Client.mjs";
|
|
6
6
|
import { ClientGrantsClient } from "./api/resources/clientGrants/client/Client.mjs";
|
|
7
|
+
import { ClientProfilesClient } from "./api/resources/clientProfiles/client/Client.mjs";
|
|
7
8
|
import { ClientsClient } from "./api/resources/clients/client/Client.mjs";
|
|
8
9
|
import { ConnectionProfilesClient } from "./api/resources/connectionProfiles/client/Client.mjs";
|
|
9
10
|
import { ConnectionsClient } from "./api/resources/connections/client/Client.mjs";
|
|
@@ -59,6 +60,7 @@ export declare class ManagementClient {
|
|
|
59
60
|
protected _agents: AgentsClient | undefined;
|
|
60
61
|
protected _branding: BrandingClient | undefined;
|
|
61
62
|
protected _clientGrants: ClientGrantsClient | undefined;
|
|
63
|
+
protected _clientProfiles: ClientProfilesClient | undefined;
|
|
62
64
|
protected _clients: ClientsClient | undefined;
|
|
63
65
|
protected _connectionProfiles: ConnectionProfilesClient | undefined;
|
|
64
66
|
protected _connections: ConnectionsClient | undefined;
|
|
@@ -107,6 +109,7 @@ export declare class ManagementClient {
|
|
|
107
109
|
get agents(): AgentsClient;
|
|
108
110
|
get branding(): BrandingClient;
|
|
109
111
|
get clientGrants(): ClientGrantsClient;
|
|
112
|
+
get clientProfiles(): ClientProfilesClient;
|
|
110
113
|
get clients(): ClientsClient;
|
|
111
114
|
get connectionProfiles(): ConnectionProfilesClient;
|
|
112
115
|
get connections(): ConnectionsClient;
|
|
@@ -14,6 +14,7 @@ import { AnomalyClient } from "./api/resources/anomaly/client/Client.mjs";
|
|
|
14
14
|
import { AttackProtectionClient } from "./api/resources/attackProtection/client/Client.mjs";
|
|
15
15
|
import { BrandingClient } from "./api/resources/branding/client/Client.mjs";
|
|
16
16
|
import { ClientGrantsClient } from "./api/resources/clientGrants/client/Client.mjs";
|
|
17
|
+
import { ClientProfilesClient } from "./api/resources/clientProfiles/client/Client.mjs";
|
|
17
18
|
import { ClientsClient } from "./api/resources/clients/client/Client.mjs";
|
|
18
19
|
import { ConnectionProfilesClient } from "./api/resources/connectionProfiles/client/Client.mjs";
|
|
19
20
|
import { ConnectionsClient } from "./api/resources/connections/client/Client.mjs";
|
|
@@ -77,6 +78,10 @@ export class ManagementClient {
|
|
|
77
78
|
var _a;
|
|
78
79
|
return ((_a = this._clientGrants) !== null && _a !== void 0 ? _a : (this._clientGrants = new ClientGrantsClient(this._options)));
|
|
79
80
|
}
|
|
81
|
+
get clientProfiles() {
|
|
82
|
+
var _a;
|
|
83
|
+
return ((_a = this._clientProfiles) !== null && _a !== void 0 ? _a : (this._clientProfiles = new ClientProfilesClient(this._options)));
|
|
84
|
+
}
|
|
80
85
|
get clients() {
|
|
81
86
|
var _a;
|
|
82
87
|
return ((_a = this._clients) !== null && _a !== void 0 ? _a : (this._clients = new ClientsClient(this._options)));
|
|
@@ -240,6 +240,46 @@ export interface UpdateClientGrantRequestContent {
|
|
|
240
240
|
/** If enabled, all scopes configured on the resource server are allowed for this grant. */
|
|
241
241
|
allow_all_scopes?: boolean | null;
|
|
242
242
|
}
|
|
243
|
+
/**
|
|
244
|
+
* @example
|
|
245
|
+
* {
|
|
246
|
+
* from: "from",
|
|
247
|
+
* take: 1
|
|
248
|
+
* }
|
|
249
|
+
*/
|
|
250
|
+
export interface ListClientProfilesRequestParameters {
|
|
251
|
+
/** Optional Id from which to start selection. */
|
|
252
|
+
from?: string | null;
|
|
253
|
+
/** Number of results per page. Defaults to 50. */
|
|
254
|
+
take?: number | null;
|
|
255
|
+
}
|
|
256
|
+
/**
|
|
257
|
+
* @example
|
|
258
|
+
* {
|
|
259
|
+
* name: "name",
|
|
260
|
+
* client_configuration: {},
|
|
261
|
+
* apply_policy: {
|
|
262
|
+
* external_metadata_type: "cimd",
|
|
263
|
+
* external_metadata_created_by: "client"
|
|
264
|
+
* }
|
|
265
|
+
* }
|
|
266
|
+
*/
|
|
267
|
+
export interface CreateClientProfileRequestContent {
|
|
268
|
+
name: Management.ClientProfileName;
|
|
269
|
+
description?: (Management.ClientProfileDescription | undefined) | null;
|
|
270
|
+
client_configuration: Management.ClientProfileClientConfiguration;
|
|
271
|
+
apply_policy: Management.ClientProfileApplyPolicy;
|
|
272
|
+
}
|
|
273
|
+
/**
|
|
274
|
+
* @example
|
|
275
|
+
* {}
|
|
276
|
+
*/
|
|
277
|
+
export interface UpdateClientProfileRequestContent {
|
|
278
|
+
name?: Management.ClientProfileName;
|
|
279
|
+
description?: (Management.ClientProfileDescription | undefined) | null;
|
|
280
|
+
client_configuration?: Management.ClientProfileClientConfiguration;
|
|
281
|
+
apply_policy?: Management.ClientProfileApplyPolicy;
|
|
282
|
+
}
|
|
243
283
|
/**
|
|
244
284
|
* @example
|
|
245
285
|
* {
|
|
@@ -4319,6 +4359,8 @@ export interface UpdateTenantSettingsRequestContent {
|
|
|
4319
4359
|
resource_parameter_profile?: Management.TenantSettingsResourceParameterProfile;
|
|
4320
4360
|
/** Whether the authorization server supports retrieving client metadata from a client_id URL. */
|
|
4321
4361
|
client_id_metadata_document_supported?: boolean;
|
|
4362
|
+
/** Whether the authorization server supports registering clients dynamically from a client_id URL. Requires client_id_metadata_document_supported to be enabled. */
|
|
4363
|
+
client_id_metadata_document_dynamic_registration_supported?: boolean;
|
|
4322
4364
|
/** Whether Auth0 Guide (AI-powered assistance) is enabled for this tenant. */
|
|
4323
4365
|
enable_ai_guide?: boolean;
|
|
4324
4366
|
/** Whether Phone Consolidated Experience is enabled for this tenant. */
|
|
@@ -0,0 +1,106 @@
|
|
|
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 ClientProfilesClient {
|
|
6
|
+
type Options = BaseClientOptions;
|
|
7
|
+
interface RequestOptions extends BaseRequestOptions {
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
export declare class ClientProfilesClient {
|
|
11
|
+
protected readonly _options: NormalizedClientOptionsWithAuth<ClientProfilesClient.Options>;
|
|
12
|
+
constructor(options: ClientProfilesClient.Options);
|
|
13
|
+
/**
|
|
14
|
+
* Retrieve a paginated list of client profiles for the tenant. Uses checkpoint pagination: pass the <code>next</code> cursor from a previous response as the <code>from</code> query parameter to retrieve the following page.
|
|
15
|
+
*
|
|
16
|
+
* @param {Management.ListClientProfilesRequestParameters} request
|
|
17
|
+
* @param {ClientProfilesClient.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.clientProfiles.list({
|
|
26
|
+
* from: "from",
|
|
27
|
+
* take: 1
|
|
28
|
+
* })
|
|
29
|
+
*/
|
|
30
|
+
list(request?: Management.ListClientProfilesRequestParameters, requestOptions?: ClientProfilesClient.RequestOptions): Promise<core.Page<Management.ClientProfile, Management.ListClientProfilesPaginatedResponseContent>>;
|
|
31
|
+
/**
|
|
32
|
+
* Create a client profile. At most one profile is allowed per tenant in this release; attempting to create a second returns <code>409 Conflict</code>. The profile governs Dynamic CIMD clients matched by its <code>apply_policy</code> at runtime.
|
|
33
|
+
*
|
|
34
|
+
* @param {Management.CreateClientProfileRequestContent} request
|
|
35
|
+
* @param {ClientProfilesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
36
|
+
*
|
|
37
|
+
* @throws {@link Management.BadRequestError}
|
|
38
|
+
* @throws {@link Management.UnauthorizedError}
|
|
39
|
+
* @throws {@link Management.ForbiddenError}
|
|
40
|
+
* @throws {@link Management.ConflictError}
|
|
41
|
+
* @throws {@link Management.TooManyRequestsError}
|
|
42
|
+
*
|
|
43
|
+
* @example
|
|
44
|
+
* await client.clientProfiles.create({
|
|
45
|
+
* name: "name",
|
|
46
|
+
* client_configuration: {},
|
|
47
|
+
* apply_policy: {
|
|
48
|
+
* external_metadata_type: "cimd",
|
|
49
|
+
* external_metadata_created_by: "client"
|
|
50
|
+
* }
|
|
51
|
+
* })
|
|
52
|
+
*/
|
|
53
|
+
create(request: Management.CreateClientProfileRequestContent, requestOptions?: ClientProfilesClient.RequestOptions): core.HttpResponsePromise<Management.ClientProfile>;
|
|
54
|
+
private __create;
|
|
55
|
+
/**
|
|
56
|
+
* Retrieve a single client profile by its identifier. Returns <code>404</code> if no profile with the given ID exists for the tenant.
|
|
57
|
+
*
|
|
58
|
+
* @param {Management.ClientProfileId} id - ID of the client profile.
|
|
59
|
+
* @param {ClientProfilesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
60
|
+
*
|
|
61
|
+
* @throws {@link Management.BadRequestError}
|
|
62
|
+
* @throws {@link Management.UnauthorizedError}
|
|
63
|
+
* @throws {@link Management.ForbiddenError}
|
|
64
|
+
* @throws {@link Management.NotFoundError}
|
|
65
|
+
* @throws {@link Management.TooManyRequestsError}
|
|
66
|
+
*
|
|
67
|
+
* @example
|
|
68
|
+
* await client.clientProfiles.get("id")
|
|
69
|
+
*/
|
|
70
|
+
get(id: Management.ClientProfileId, requestOptions?: ClientProfilesClient.RequestOptions): core.HttpResponsePromise<Management.ClientProfile>;
|
|
71
|
+
private __get;
|
|
72
|
+
/**
|
|
73
|
+
* Delete a client profile. Idempotent: returns <code>204 No Content</code> whether or not a profile with the given ID existed. Deleting the profile removes fleet governance for matched clients immediately.
|
|
74
|
+
*
|
|
75
|
+
* @param {Management.ClientProfileId} id - ID of the client profile.
|
|
76
|
+
* @param {ClientProfilesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
77
|
+
*
|
|
78
|
+
* @throws {@link Management.BadRequestError}
|
|
79
|
+
* @throws {@link Management.UnauthorizedError}
|
|
80
|
+
* @throws {@link Management.ForbiddenError}
|
|
81
|
+
* @throws {@link Management.TooManyRequestsError}
|
|
82
|
+
*
|
|
83
|
+
* @example
|
|
84
|
+
* await client.clientProfiles.delete("id")
|
|
85
|
+
*/
|
|
86
|
+
delete(id: Management.ClientProfileId, requestOptions?: ClientProfilesClient.RequestOptions): core.HttpResponsePromise<void>;
|
|
87
|
+
private __delete;
|
|
88
|
+
/**
|
|
89
|
+
* Update a client profile. Supports partial updates at the top level (JSON Merge Patch); omitted top-level fields remain unchanged. Nested objects such as <code>client_configuration</code> must be supplied in full.
|
|
90
|
+
*
|
|
91
|
+
* @param {Management.ClientProfileId} id - ID of the client profile.
|
|
92
|
+
* @param {Management.UpdateClientProfileRequestContent} request
|
|
93
|
+
* @param {ClientProfilesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
94
|
+
*
|
|
95
|
+
* @throws {@link Management.BadRequestError}
|
|
96
|
+
* @throws {@link Management.UnauthorizedError}
|
|
97
|
+
* @throws {@link Management.ForbiddenError}
|
|
98
|
+
* @throws {@link Management.NotFoundError}
|
|
99
|
+
* @throws {@link Management.TooManyRequestsError}
|
|
100
|
+
*
|
|
101
|
+
* @example
|
|
102
|
+
* await client.clientProfiles.update("id")
|
|
103
|
+
*/
|
|
104
|
+
update(id: Management.ClientProfileId, request?: Management.UpdateClientProfileRequestContent, requestOptions?: ClientProfilesClient.RequestOptions): core.HttpResponsePromise<Management.ClientProfile>;
|
|
105
|
+
private __update;
|
|
106
|
+
}
|
|
@@ -0,0 +1,354 @@
|
|
|
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 ClientProfilesClient {
|
|
19
|
+
constructor(options) {
|
|
20
|
+
this._options = normalizeClientOptionsWithAuth(options);
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Retrieve a paginated list of client profiles for the tenant. Uses checkpoint pagination: pass the <code>next</code> cursor from a previous response as the <code>from</code> query parameter to retrieve the following page.
|
|
24
|
+
*
|
|
25
|
+
* @param {Management.ListClientProfilesRequestParameters} request
|
|
26
|
+
* @param {ClientProfilesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
27
|
+
*
|
|
28
|
+
* @throws {@link Management.BadRequestError}
|
|
29
|
+
* @throws {@link Management.UnauthorizedError}
|
|
30
|
+
* @throws {@link Management.ForbiddenError}
|
|
31
|
+
* @throws {@link Management.TooManyRequestsError}
|
|
32
|
+
*
|
|
33
|
+
* @example
|
|
34
|
+
* await client.clientProfiles.list({
|
|
35
|
+
* from: "from",
|
|
36
|
+
* take: 1
|
|
37
|
+
* })
|
|
38
|
+
*/
|
|
39
|
+
list() {
|
|
40
|
+
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
41
|
+
const list = core.HttpResponsePromise.interceptFunction((request) => __awaiter(this, void 0, void 0, function* () {
|
|
42
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
43
|
+
const { from: from_, take = 50 } = request;
|
|
44
|
+
const _queryParams = {
|
|
45
|
+
from: from_,
|
|
46
|
+
take,
|
|
47
|
+
};
|
|
48
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
49
|
+
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);
|
|
50
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
51
|
+
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, "client-profiles"),
|
|
52
|
+
method: "GET",
|
|
53
|
+
headers: _headers,
|
|
54
|
+
queryString: core.url
|
|
55
|
+
.queryBuilder()
|
|
56
|
+
.addMany(_queryParams)
|
|
57
|
+
.mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams)
|
|
58
|
+
.build(),
|
|
59
|
+
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,
|
|
60
|
+
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,
|
|
61
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
62
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
63
|
+
logging: this._options.logging,
|
|
64
|
+
});
|
|
65
|
+
if (_response.ok) {
|
|
66
|
+
return {
|
|
67
|
+
data: _response.body,
|
|
68
|
+
rawResponse: _response.rawResponse,
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
if (_response.error.reason === "status-code") {
|
|
72
|
+
switch (_response.error.statusCode) {
|
|
73
|
+
case 400:
|
|
74
|
+
throw new Management.BadRequestError(_response.error.body, _response.rawResponse);
|
|
75
|
+
case 401:
|
|
76
|
+
throw new Management.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
77
|
+
case 403:
|
|
78
|
+
throw new Management.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
79
|
+
case 429:
|
|
80
|
+
throw new Management.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
81
|
+
default:
|
|
82
|
+
throw new errors.ManagementError({
|
|
83
|
+
statusCode: _response.error.statusCode,
|
|
84
|
+
body: _response.error.body,
|
|
85
|
+
rawResponse: _response.rawResponse,
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/client-profiles");
|
|
90
|
+
}));
|
|
91
|
+
const dataWithRawResponse = yield list(request).withRawResponse();
|
|
92
|
+
return new core.Page({
|
|
93
|
+
response: dataWithRawResponse.data,
|
|
94
|
+
rawResponse: dataWithRawResponse.rawResponse,
|
|
95
|
+
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) === ""),
|
|
96
|
+
getItems: (response) => { var _a; return (_a = response === null || response === void 0 ? void 0 : response.client_profiles) !== null && _a !== void 0 ? _a : []; },
|
|
97
|
+
loadPage: (response) => {
|
|
98
|
+
return list(core.setObjectProperty(request, "from", response === null || response === void 0 ? void 0 : response.next));
|
|
99
|
+
},
|
|
100
|
+
});
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Create a client profile. At most one profile is allowed per tenant in this release; attempting to create a second returns <code>409 Conflict</code>. The profile governs Dynamic CIMD clients matched by its <code>apply_policy</code> at runtime.
|
|
105
|
+
*
|
|
106
|
+
* @param {Management.CreateClientProfileRequestContent} request
|
|
107
|
+
* @param {ClientProfilesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
108
|
+
*
|
|
109
|
+
* @throws {@link Management.BadRequestError}
|
|
110
|
+
* @throws {@link Management.UnauthorizedError}
|
|
111
|
+
* @throws {@link Management.ForbiddenError}
|
|
112
|
+
* @throws {@link Management.ConflictError}
|
|
113
|
+
* @throws {@link Management.TooManyRequestsError}
|
|
114
|
+
*
|
|
115
|
+
* @example
|
|
116
|
+
* await client.clientProfiles.create({
|
|
117
|
+
* name: "name",
|
|
118
|
+
* client_configuration: {},
|
|
119
|
+
* apply_policy: {
|
|
120
|
+
* external_metadata_type: "cimd",
|
|
121
|
+
* external_metadata_created_by: "client"
|
|
122
|
+
* }
|
|
123
|
+
* })
|
|
124
|
+
*/
|
|
125
|
+
create(request, requestOptions) {
|
|
126
|
+
return core.HttpResponsePromise.fromPromise(this.__create(request, requestOptions));
|
|
127
|
+
}
|
|
128
|
+
__create(request, requestOptions) {
|
|
129
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
130
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
131
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
132
|
+
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);
|
|
133
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
134
|
+
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, "client-profiles"),
|
|
135
|
+
method: "POST",
|
|
136
|
+
headers: _headers,
|
|
137
|
+
contentType: "application/json",
|
|
138
|
+
queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
|
|
139
|
+
requestType: "json",
|
|
140
|
+
body: request,
|
|
141
|
+
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,
|
|
142
|
+
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,
|
|
143
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
144
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
145
|
+
logging: this._options.logging,
|
|
146
|
+
});
|
|
147
|
+
if (_response.ok) {
|
|
148
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
149
|
+
}
|
|
150
|
+
if (_response.error.reason === "status-code") {
|
|
151
|
+
switch (_response.error.statusCode) {
|
|
152
|
+
case 400:
|
|
153
|
+
throw new Management.BadRequestError(_response.error.body, _response.rawResponse);
|
|
154
|
+
case 401:
|
|
155
|
+
throw new Management.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
156
|
+
case 403:
|
|
157
|
+
throw new Management.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
158
|
+
case 409:
|
|
159
|
+
throw new Management.ConflictError(_response.error.body, _response.rawResponse);
|
|
160
|
+
case 429:
|
|
161
|
+
throw new Management.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
162
|
+
default:
|
|
163
|
+
throw new errors.ManagementError({
|
|
164
|
+
statusCode: _response.error.statusCode,
|
|
165
|
+
body: _response.error.body,
|
|
166
|
+
rawResponse: _response.rawResponse,
|
|
167
|
+
});
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/client-profiles");
|
|
171
|
+
});
|
|
172
|
+
}
|
|
173
|
+
/**
|
|
174
|
+
* Retrieve a single client profile by its identifier. Returns <code>404</code> if no profile with the given ID exists for the tenant.
|
|
175
|
+
*
|
|
176
|
+
* @param {Management.ClientProfileId} id - ID of the client profile.
|
|
177
|
+
* @param {ClientProfilesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
178
|
+
*
|
|
179
|
+
* @throws {@link Management.BadRequestError}
|
|
180
|
+
* @throws {@link Management.UnauthorizedError}
|
|
181
|
+
* @throws {@link Management.ForbiddenError}
|
|
182
|
+
* @throws {@link Management.NotFoundError}
|
|
183
|
+
* @throws {@link Management.TooManyRequestsError}
|
|
184
|
+
*
|
|
185
|
+
* @example
|
|
186
|
+
* await client.clientProfiles.get("id")
|
|
187
|
+
*/
|
|
188
|
+
get(id, requestOptions) {
|
|
189
|
+
return core.HttpResponsePromise.fromPromise(this.__get(id, requestOptions));
|
|
190
|
+
}
|
|
191
|
+
__get(id, requestOptions) {
|
|
192
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
193
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
194
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
195
|
+
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);
|
|
196
|
+
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, `client-profiles/${core.url.encodePathParam(id)}`),
|
|
198
|
+
method: "GET",
|
|
199
|
+
headers: _headers,
|
|
200
|
+
queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
|
|
201
|
+
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
|
+
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
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
204
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
205
|
+
logging: this._options.logging,
|
|
206
|
+
});
|
|
207
|
+
if (_response.ok) {
|
|
208
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
209
|
+
}
|
|
210
|
+
if (_response.error.reason === "status-code") {
|
|
211
|
+
switch (_response.error.statusCode) {
|
|
212
|
+
case 400:
|
|
213
|
+
throw new Management.BadRequestError(_response.error.body, _response.rawResponse);
|
|
214
|
+
case 401:
|
|
215
|
+
throw new Management.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
216
|
+
case 403:
|
|
217
|
+
throw new Management.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
218
|
+
case 404:
|
|
219
|
+
throw new Management.NotFoundError(_response.error.body, _response.rawResponse);
|
|
220
|
+
case 429:
|
|
221
|
+
throw new Management.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
222
|
+
default:
|
|
223
|
+
throw new errors.ManagementError({
|
|
224
|
+
statusCode: _response.error.statusCode,
|
|
225
|
+
body: _response.error.body,
|
|
226
|
+
rawResponse: _response.rawResponse,
|
|
227
|
+
});
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/client-profiles/{id}");
|
|
231
|
+
});
|
|
232
|
+
}
|
|
233
|
+
/**
|
|
234
|
+
* Delete a client profile. Idempotent: returns <code>204 No Content</code> whether or not a profile with the given ID existed. Deleting the profile removes fleet governance for matched clients immediately.
|
|
235
|
+
*
|
|
236
|
+
* @param {Management.ClientProfileId} id - ID of the client profile.
|
|
237
|
+
* @param {ClientProfilesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
238
|
+
*
|
|
239
|
+
* @throws {@link Management.BadRequestError}
|
|
240
|
+
* @throws {@link Management.UnauthorizedError}
|
|
241
|
+
* @throws {@link Management.ForbiddenError}
|
|
242
|
+
* @throws {@link Management.TooManyRequestsError}
|
|
243
|
+
*
|
|
244
|
+
* @example
|
|
245
|
+
* await client.clientProfiles.delete("id")
|
|
246
|
+
*/
|
|
247
|
+
delete(id, requestOptions) {
|
|
248
|
+
return core.HttpResponsePromise.fromPromise(this.__delete(id, requestOptions));
|
|
249
|
+
}
|
|
250
|
+
__delete(id, requestOptions) {
|
|
251
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
252
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
253
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
254
|
+
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);
|
|
255
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
256
|
+
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, `client-profiles/${core.url.encodePathParam(id)}`),
|
|
257
|
+
method: "DELETE",
|
|
258
|
+
headers: _headers,
|
|
259
|
+
queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
|
|
260
|
+
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,
|
|
261
|
+
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,
|
|
262
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
263
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
264
|
+
logging: this._options.logging,
|
|
265
|
+
});
|
|
266
|
+
if (_response.ok) {
|
|
267
|
+
return { data: undefined, rawResponse: _response.rawResponse };
|
|
268
|
+
}
|
|
269
|
+
if (_response.error.reason === "status-code") {
|
|
270
|
+
switch (_response.error.statusCode) {
|
|
271
|
+
case 400:
|
|
272
|
+
throw new Management.BadRequestError(_response.error.body, _response.rawResponse);
|
|
273
|
+
case 401:
|
|
274
|
+
throw new Management.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
275
|
+
case 403:
|
|
276
|
+
throw new Management.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
277
|
+
case 429:
|
|
278
|
+
throw new Management.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
279
|
+
default:
|
|
280
|
+
throw new errors.ManagementError({
|
|
281
|
+
statusCode: _response.error.statusCode,
|
|
282
|
+
body: _response.error.body,
|
|
283
|
+
rawResponse: _response.rawResponse,
|
|
284
|
+
});
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "DELETE", "/client-profiles/{id}");
|
|
288
|
+
});
|
|
289
|
+
}
|
|
290
|
+
/**
|
|
291
|
+
* Update a client profile. Supports partial updates at the top level (JSON Merge Patch); omitted top-level fields remain unchanged. Nested objects such as <code>client_configuration</code> must be supplied in full.
|
|
292
|
+
*
|
|
293
|
+
* @param {Management.ClientProfileId} id - ID of the client profile.
|
|
294
|
+
* @param {Management.UpdateClientProfileRequestContent} request
|
|
295
|
+
* @param {ClientProfilesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
296
|
+
*
|
|
297
|
+
* @throws {@link Management.BadRequestError}
|
|
298
|
+
* @throws {@link Management.UnauthorizedError}
|
|
299
|
+
* @throws {@link Management.ForbiddenError}
|
|
300
|
+
* @throws {@link Management.NotFoundError}
|
|
301
|
+
* @throws {@link Management.TooManyRequestsError}
|
|
302
|
+
*
|
|
303
|
+
* @example
|
|
304
|
+
* await client.clientProfiles.update("id")
|
|
305
|
+
*/
|
|
306
|
+
update(id, request = {}, requestOptions) {
|
|
307
|
+
return core.HttpResponsePromise.fromPromise(this.__update(id, request, requestOptions));
|
|
308
|
+
}
|
|
309
|
+
__update(id_1) {
|
|
310
|
+
return __awaiter(this, arguments, void 0, function* (id, request = {}, requestOptions) {
|
|
311
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
312
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
313
|
+
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);
|
|
314
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
315
|
+
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, `client-profiles/${core.url.encodePathParam(id)}`),
|
|
316
|
+
method: "PATCH",
|
|
317
|
+
headers: _headers,
|
|
318
|
+
contentType: "application/json",
|
|
319
|
+
queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
|
|
320
|
+
requestType: "json",
|
|
321
|
+
body: request,
|
|
322
|
+
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,
|
|
323
|
+
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,
|
|
324
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
325
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
326
|
+
logging: this._options.logging,
|
|
327
|
+
});
|
|
328
|
+
if (_response.ok) {
|
|
329
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
330
|
+
}
|
|
331
|
+
if (_response.error.reason === "status-code") {
|
|
332
|
+
switch (_response.error.statusCode) {
|
|
333
|
+
case 400:
|
|
334
|
+
throw new Management.BadRequestError(_response.error.body, _response.rawResponse);
|
|
335
|
+
case 401:
|
|
336
|
+
throw new Management.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
337
|
+
case 403:
|
|
338
|
+
throw new Management.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
339
|
+
case 404:
|
|
340
|
+
throw new Management.NotFoundError(_response.error.body, _response.rawResponse);
|
|
341
|
+
case 429:
|
|
342
|
+
throw new Management.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
343
|
+
default:
|
|
344
|
+
throw new errors.ManagementError({
|
|
345
|
+
statusCode: _response.error.statusCode,
|
|
346
|
+
body: _response.error.body,
|
|
347
|
+
rawResponse: _response.rawResponse,
|
|
348
|
+
});
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "PATCH", "/client-profiles/{id}");
|
|
352
|
+
});
|
|
353
|
+
}
|
|
354
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./client/index.mjs";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./client/index.mjs";
|
|
@@ -4,6 +4,7 @@ export * as anomaly from "./anomaly/index.mjs";
|
|
|
4
4
|
export * as attackProtection from "./attackProtection/index.mjs";
|
|
5
5
|
export * as branding from "./branding/index.mjs";
|
|
6
6
|
export * as clientGrants from "./clientGrants/index.mjs";
|
|
7
|
+
export * as clientProfiles from "./clientProfiles/index.mjs";
|
|
7
8
|
export * as clients from "./clients/index.mjs";
|
|
8
9
|
export * as connectionProfiles from "./connectionProfiles/index.mjs";
|
|
9
10
|
export * as connections from "./connections/index.mjs";
|
|
@@ -4,6 +4,7 @@ export * as anomaly from "./anomaly/index.mjs";
|
|
|
4
4
|
export * as attackProtection from "./attackProtection/index.mjs";
|
|
5
5
|
export * as branding from "./branding/index.mjs";
|
|
6
6
|
export * as clientGrants from "./clientGrants/index.mjs";
|
|
7
|
+
export * as clientProfiles from "./clientProfiles/index.mjs";
|
|
7
8
|
export * as clients from "./clients/index.mjs";
|
|
8
9
|
export * as connectionProfiles from "./connectionProfiles/index.mjs";
|
|
9
10
|
export * as connections from "./connections/index.mjs";
|