auth0 7.4.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.
Files changed (64) hide show
  1. package/dist/cjs/management/Client.d.ts +3 -0
  2. package/dist/cjs/management/Client.js +87 -82
  3. package/dist/cjs/management/api/requests/requests.d.ts +103 -0
  4. package/dist/cjs/management/api/resources/attackProtection/client/Client.d.ts +3 -0
  5. package/dist/cjs/management/api/resources/attackProtection/client/Client.js +9 -4
  6. package/dist/cjs/management/api/resources/attackProtection/resources/captchaPolicies/client/Client.d.ts +105 -0
  7. package/dist/cjs/management/api/resources/attackProtection/resources/captchaPolicies/client/Client.js +388 -0
  8. package/dist/cjs/management/api/resources/attackProtection/resources/captchaPolicies/client/index.d.ts +1 -0
  9. package/dist/cjs/management/api/resources/attackProtection/resources/captchaPolicies/client/index.js +2 -0
  10. package/dist/cjs/management/api/resources/attackProtection/resources/captchaPolicies/exports.d.ts +2 -0
  11. package/dist/cjs/management/api/resources/attackProtection/resources/captchaPolicies/exports.js +21 -0
  12. package/dist/cjs/management/api/resources/attackProtection/resources/captchaPolicies/index.d.ts +1 -0
  13. package/dist/cjs/management/api/resources/attackProtection/resources/captchaPolicies/index.js +17 -0
  14. package/dist/cjs/management/api/resources/attackProtection/resources/index.d.ts +1 -0
  15. package/dist/cjs/management/api/resources/attackProtection/resources/index.js +2 -1
  16. package/dist/cjs/management/api/resources/clientGrants/client/Client.d.ts +27 -0
  17. package/dist/cjs/management/api/resources/clientGrants/client/Client.js +101 -0
  18. package/dist/cjs/management/api/resources/clientProfiles/client/Client.d.ts +106 -0
  19. package/dist/cjs/management/api/resources/clientProfiles/client/Client.js +391 -0
  20. package/dist/cjs/management/api/resources/clientProfiles/client/index.d.ts +1 -0
  21. package/dist/cjs/management/api/resources/clientProfiles/client/index.js +2 -0
  22. package/dist/cjs/management/api/resources/clientProfiles/exports.d.ts +2 -0
  23. package/dist/cjs/management/api/resources/clientProfiles/exports.js +21 -0
  24. package/dist/cjs/management/api/resources/clientProfiles/index.d.ts +1 -0
  25. package/dist/cjs/management/api/resources/clientProfiles/index.js +17 -0
  26. package/dist/cjs/management/api/resources/index.d.ts +1 -0
  27. package/dist/cjs/management/api/resources/index.js +2 -1
  28. package/dist/cjs/management/api/types/types.d.ts +352 -0
  29. package/dist/cjs/management/api/types/types.js +83 -21
  30. package/dist/cjs/management/version.d.ts +1 -1
  31. package/dist/cjs/management/version.js +1 -1
  32. package/dist/esm/management/Client.d.mts +3 -0
  33. package/dist/esm/management/Client.mjs +5 -0
  34. package/dist/esm/management/api/requests/requests.d.mts +103 -0
  35. package/dist/esm/management/api/resources/attackProtection/client/Client.d.mts +3 -0
  36. package/dist/esm/management/api/resources/attackProtection/client/Client.mjs +5 -0
  37. package/dist/esm/management/api/resources/attackProtection/resources/captchaPolicies/client/Client.d.mts +105 -0
  38. package/dist/esm/management/api/resources/attackProtection/resources/captchaPolicies/client/Client.mjs +351 -0
  39. package/dist/esm/management/api/resources/attackProtection/resources/captchaPolicies/client/index.d.mts +1 -0
  40. package/dist/esm/management/api/resources/attackProtection/resources/captchaPolicies/client/index.mjs +1 -0
  41. package/dist/esm/management/api/resources/attackProtection/resources/captchaPolicies/exports.d.mts +2 -0
  42. package/dist/esm/management/api/resources/attackProtection/resources/captchaPolicies/exports.mjs +3 -0
  43. package/dist/esm/management/api/resources/attackProtection/resources/captchaPolicies/index.d.mts +1 -0
  44. package/dist/esm/management/api/resources/attackProtection/resources/captchaPolicies/index.mjs +1 -0
  45. package/dist/esm/management/api/resources/attackProtection/resources/index.d.mts +1 -0
  46. package/dist/esm/management/api/resources/attackProtection/resources/index.mjs +1 -0
  47. package/dist/esm/management/api/resources/clientGrants/client/Client.d.mts +27 -0
  48. package/dist/esm/management/api/resources/clientGrants/client/Client.mjs +101 -0
  49. package/dist/esm/management/api/resources/clientProfiles/client/Client.d.mts +106 -0
  50. package/dist/esm/management/api/resources/clientProfiles/client/Client.mjs +354 -0
  51. package/dist/esm/management/api/resources/clientProfiles/client/index.d.mts +1 -0
  52. package/dist/esm/management/api/resources/clientProfiles/client/index.mjs +1 -0
  53. package/dist/esm/management/api/resources/clientProfiles/exports.d.mts +2 -0
  54. package/dist/esm/management/api/resources/clientProfiles/exports.mjs +3 -0
  55. package/dist/esm/management/api/resources/clientProfiles/index.d.mts +1 -0
  56. package/dist/esm/management/api/resources/clientProfiles/index.mjs +1 -0
  57. package/dist/esm/management/api/resources/index.d.mts +1 -0
  58. package/dist/esm/management/api/resources/index.mjs +1 -0
  59. package/dist/esm/management/api/types/types.d.mts +352 -0
  60. package/dist/esm/management/api/types/types.mjs +62 -0
  61. package/dist/esm/management/version.d.mts +1 -1
  62. package/dist/esm/management/version.mjs +1 -1
  63. package/package.json +23 -1
  64. package/reference.md +981 -217
@@ -0,0 +1,106 @@
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 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,391 @@
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.ClientProfilesClient = 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 ClientProfilesClient {
55
+ constructor(options) {
56
+ this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
57
+ }
58
+ /**
59
+ * 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.
60
+ *
61
+ * @param {Management.ListClientProfilesRequestParameters} request
62
+ * @param {ClientProfilesClient.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.clientProfiles.list({
71
+ * from: "from",
72
+ * take: 1
73
+ * })
74
+ */
75
+ list() {
76
+ return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
77
+ const list = core.HttpResponsePromise.interceptFunction((request) => __awaiter(this, void 0, void 0, function* () {
78
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
79
+ const { from: from_, take = 50 } = request;
80
+ const _queryParams = {
81
+ from: from_,
82
+ take,
83
+ };
84
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
85
+ 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);
86
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
87
+ 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"),
88
+ method: "GET",
89
+ headers: _headers,
90
+ queryString: core.url
91
+ .queryBuilder()
92
+ .addMany(_queryParams)
93
+ .mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams)
94
+ .build(),
95
+ 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,
96
+ 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,
97
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
98
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
99
+ logging: this._options.logging,
100
+ });
101
+ if (_response.ok) {
102
+ return {
103
+ data: _response.body,
104
+ rawResponse: _response.rawResponse,
105
+ };
106
+ }
107
+ if (_response.error.reason === "status-code") {
108
+ switch (_response.error.statusCode) {
109
+ case 400:
110
+ throw new Management.BadRequestError(_response.error.body, _response.rawResponse);
111
+ case 401:
112
+ throw new Management.UnauthorizedError(_response.error.body, _response.rawResponse);
113
+ case 403:
114
+ throw new Management.ForbiddenError(_response.error.body, _response.rawResponse);
115
+ case 429:
116
+ throw new Management.TooManyRequestsError(_response.error.body, _response.rawResponse);
117
+ default:
118
+ throw new errors.ManagementError({
119
+ statusCode: _response.error.statusCode,
120
+ body: _response.error.body,
121
+ rawResponse: _response.rawResponse,
122
+ });
123
+ }
124
+ }
125
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/client-profiles");
126
+ }));
127
+ const dataWithRawResponse = yield list(request).withRawResponse();
128
+ return new core.Page({
129
+ response: dataWithRawResponse.data,
130
+ rawResponse: dataWithRawResponse.rawResponse,
131
+ 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) === ""),
132
+ getItems: (response) => { var _a; return (_a = response === null || response === void 0 ? void 0 : response.client_profiles) !== null && _a !== void 0 ? _a : []; },
133
+ loadPage: (response) => {
134
+ return list(core.setObjectProperty(request, "from", response === null || response === void 0 ? void 0 : response.next));
135
+ },
136
+ });
137
+ });
138
+ }
139
+ /**
140
+ * 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.
141
+ *
142
+ * @param {Management.CreateClientProfileRequestContent} request
143
+ * @param {ClientProfilesClient.RequestOptions} requestOptions - Request-specific configuration.
144
+ *
145
+ * @throws {@link Management.BadRequestError}
146
+ * @throws {@link Management.UnauthorizedError}
147
+ * @throws {@link Management.ForbiddenError}
148
+ * @throws {@link Management.ConflictError}
149
+ * @throws {@link Management.TooManyRequestsError}
150
+ *
151
+ * @example
152
+ * await client.clientProfiles.create({
153
+ * name: "name",
154
+ * client_configuration: {},
155
+ * apply_policy: {
156
+ * external_metadata_type: "cimd",
157
+ * external_metadata_created_by: "client"
158
+ * }
159
+ * })
160
+ */
161
+ create(request, requestOptions) {
162
+ return core.HttpResponsePromise.fromPromise(this.__create(request, requestOptions));
163
+ }
164
+ __create(request, requestOptions) {
165
+ return __awaiter(this, void 0, void 0, function* () {
166
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
167
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
168
+ 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);
169
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
170
+ 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"),
171
+ method: "POST",
172
+ headers: _headers,
173
+ contentType: "application/json",
174
+ queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
175
+ requestType: "json",
176
+ body: request,
177
+ 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,
178
+ 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,
179
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
180
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
181
+ logging: this._options.logging,
182
+ });
183
+ if (_response.ok) {
184
+ return { data: _response.body, rawResponse: _response.rawResponse };
185
+ }
186
+ if (_response.error.reason === "status-code") {
187
+ switch (_response.error.statusCode) {
188
+ case 400:
189
+ throw new Management.BadRequestError(_response.error.body, _response.rawResponse);
190
+ case 401:
191
+ throw new Management.UnauthorizedError(_response.error.body, _response.rawResponse);
192
+ case 403:
193
+ throw new Management.ForbiddenError(_response.error.body, _response.rawResponse);
194
+ case 409:
195
+ throw new Management.ConflictError(_response.error.body, _response.rawResponse);
196
+ case 429:
197
+ throw new Management.TooManyRequestsError(_response.error.body, _response.rawResponse);
198
+ default:
199
+ throw new errors.ManagementError({
200
+ statusCode: _response.error.statusCode,
201
+ body: _response.error.body,
202
+ rawResponse: _response.rawResponse,
203
+ });
204
+ }
205
+ }
206
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/client-profiles");
207
+ });
208
+ }
209
+ /**
210
+ * Retrieve a single client profile by its identifier. Returns <code>404</code> if no profile with the given ID exists for the tenant.
211
+ *
212
+ * @param {Management.ClientProfileId} id - ID of the client profile.
213
+ * @param {ClientProfilesClient.RequestOptions} requestOptions - Request-specific configuration.
214
+ *
215
+ * @throws {@link Management.BadRequestError}
216
+ * @throws {@link Management.UnauthorizedError}
217
+ * @throws {@link Management.ForbiddenError}
218
+ * @throws {@link Management.NotFoundError}
219
+ * @throws {@link Management.TooManyRequestsError}
220
+ *
221
+ * @example
222
+ * await client.clientProfiles.get("id")
223
+ */
224
+ get(id, requestOptions) {
225
+ return core.HttpResponsePromise.fromPromise(this.__get(id, requestOptions));
226
+ }
227
+ __get(id, requestOptions) {
228
+ return __awaiter(this, void 0, void 0, function* () {
229
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
230
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
231
+ 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);
232
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
233
+ 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)}`),
234
+ method: "GET",
235
+ headers: _headers,
236
+ queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
237
+ 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,
238
+ 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,
239
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
240
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
241
+ logging: this._options.logging,
242
+ });
243
+ if (_response.ok) {
244
+ return { data: _response.body, rawResponse: _response.rawResponse };
245
+ }
246
+ if (_response.error.reason === "status-code") {
247
+ switch (_response.error.statusCode) {
248
+ case 400:
249
+ throw new Management.BadRequestError(_response.error.body, _response.rawResponse);
250
+ case 401:
251
+ throw new Management.UnauthorizedError(_response.error.body, _response.rawResponse);
252
+ case 403:
253
+ throw new Management.ForbiddenError(_response.error.body, _response.rawResponse);
254
+ case 404:
255
+ throw new Management.NotFoundError(_response.error.body, _response.rawResponse);
256
+ case 429:
257
+ throw new Management.TooManyRequestsError(_response.error.body, _response.rawResponse);
258
+ default:
259
+ throw new errors.ManagementError({
260
+ statusCode: _response.error.statusCode,
261
+ body: _response.error.body,
262
+ rawResponse: _response.rawResponse,
263
+ });
264
+ }
265
+ }
266
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/client-profiles/{id}");
267
+ });
268
+ }
269
+ /**
270
+ * 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.
271
+ *
272
+ * @param {Management.ClientProfileId} id - ID of the client profile.
273
+ * @param {ClientProfilesClient.RequestOptions} requestOptions - Request-specific configuration.
274
+ *
275
+ * @throws {@link Management.BadRequestError}
276
+ * @throws {@link Management.UnauthorizedError}
277
+ * @throws {@link Management.ForbiddenError}
278
+ * @throws {@link Management.TooManyRequestsError}
279
+ *
280
+ * @example
281
+ * await client.clientProfiles.delete("id")
282
+ */
283
+ delete(id, requestOptions) {
284
+ return core.HttpResponsePromise.fromPromise(this.__delete(id, requestOptions));
285
+ }
286
+ __delete(id, requestOptions) {
287
+ return __awaiter(this, void 0, void 0, function* () {
288
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
289
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
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);
291
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
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, `client-profiles/${core.url.encodePathParam(id)}`),
293
+ method: "DELETE",
294
+ headers: _headers,
295
+ queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
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,
297
+ 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,
298
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
299
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
300
+ logging: this._options.logging,
301
+ });
302
+ if (_response.ok) {
303
+ return { data: undefined, rawResponse: _response.rawResponse };
304
+ }
305
+ if (_response.error.reason === "status-code") {
306
+ switch (_response.error.statusCode) {
307
+ case 400:
308
+ throw new Management.BadRequestError(_response.error.body, _response.rawResponse);
309
+ case 401:
310
+ throw new Management.UnauthorizedError(_response.error.body, _response.rawResponse);
311
+ case 403:
312
+ throw new Management.ForbiddenError(_response.error.body, _response.rawResponse);
313
+ case 429:
314
+ throw new Management.TooManyRequestsError(_response.error.body, _response.rawResponse);
315
+ default:
316
+ throw new errors.ManagementError({
317
+ statusCode: _response.error.statusCode,
318
+ body: _response.error.body,
319
+ rawResponse: _response.rawResponse,
320
+ });
321
+ }
322
+ }
323
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "DELETE", "/client-profiles/{id}");
324
+ });
325
+ }
326
+ /**
327
+ * 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.
328
+ *
329
+ * @param {Management.ClientProfileId} id - ID of the client profile.
330
+ * @param {Management.UpdateClientProfileRequestContent} request
331
+ * @param {ClientProfilesClient.RequestOptions} requestOptions - Request-specific configuration.
332
+ *
333
+ * @throws {@link Management.BadRequestError}
334
+ * @throws {@link Management.UnauthorizedError}
335
+ * @throws {@link Management.ForbiddenError}
336
+ * @throws {@link Management.NotFoundError}
337
+ * @throws {@link Management.TooManyRequestsError}
338
+ *
339
+ * @example
340
+ * await client.clientProfiles.update("id")
341
+ */
342
+ update(id, request = {}, requestOptions) {
343
+ return core.HttpResponsePromise.fromPromise(this.__update(id, request, requestOptions));
344
+ }
345
+ __update(id_1) {
346
+ return __awaiter(this, arguments, void 0, function* (id, request = {}, requestOptions) {
347
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
348
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
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);
350
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
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, `client-profiles/${core.url.encodePathParam(id)}`),
352
+ method: "PATCH",
353
+ headers: _headers,
354
+ contentType: "application/json",
355
+ queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
356
+ requestType: "json",
357
+ body: request,
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,
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,
360
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
361
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
362
+ logging: this._options.logging,
363
+ });
364
+ if (_response.ok) {
365
+ return { data: _response.body, rawResponse: _response.rawResponse };
366
+ }
367
+ if (_response.error.reason === "status-code") {
368
+ switch (_response.error.statusCode) {
369
+ case 400:
370
+ throw new Management.BadRequestError(_response.error.body, _response.rawResponse);
371
+ case 401:
372
+ throw new Management.UnauthorizedError(_response.error.body, _response.rawResponse);
373
+ case 403:
374
+ throw new Management.ForbiddenError(_response.error.body, _response.rawResponse);
375
+ case 404:
376
+ throw new Management.NotFoundError(_response.error.body, _response.rawResponse);
377
+ case 429:
378
+ throw new Management.TooManyRequestsError(_response.error.body, _response.rawResponse);
379
+ default:
380
+ throw new errors.ManagementError({
381
+ statusCode: _response.error.statusCode,
382
+ body: _response.error.body,
383
+ rawResponse: _response.rawResponse,
384
+ });
385
+ }
386
+ }
387
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "PATCH", "/client-profiles/{id}");
388
+ });
389
+ }
390
+ }
391
+ exports.ClientProfilesClient = ClientProfilesClient;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ export { ClientProfilesClient } from "./client/Client.js";
2
+ export * from "./client/index.js";
@@ -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.ClientProfilesClient = void 0;
19
+ var Client_js_1 = require("./client/Client.js");
20
+ Object.defineProperty(exports, "ClientProfilesClient", { enumerable: true, get: function () { return Client_js_1.ClientProfilesClient; } });
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);
@@ -4,6 +4,7 @@ export * as anomaly from "./anomaly/index.js";
4
4
  export * as attackProtection from "./attackProtection/index.js";
5
5
  export * as branding from "./branding/index.js";
6
6
  export * as clientGrants from "./clientGrants/index.js";
7
+ export * as clientProfiles from "./clientProfiles/index.js";
7
8
  export * as clients from "./clients/index.js";
8
9
  export * as connectionProfiles from "./connectionProfiles/index.js";
9
10
  export * as connections from "./connections/index.js";
@@ -36,13 +36,14 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
36
36
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
37
37
  };
38
38
  Object.defineProperty(exports, "__esModule", { value: true });
39
- exports.verifiableCredentials = exports.users = exports.userGrants = exports.userBlocks = exports.userAttributeProfiles = exports.tokenExchangeProfiles = exports.tickets = exports.tenants = exports.supplementalSignals = exports.stats = exports.sessions = exports.selfServiceProfiles = exports.rulesConfigs = exports.rules = exports.roles = exports.riskAssessments = exports.resourceServers = exports.refreshTokens = exports.rateLimitPolicies = exports.prompts = exports.organizations = exports.networkAcls = exports.logStreams = exports.logs = exports.keys = exports.jobs = exports.hooks = exports.guardian = exports.groups = exports.forms = exports.flows = exports.experimentation = exports.eventStreams = exports.events = exports.emailTemplates = exports.emails = exports.deviceCredentials = exports.customDomains = exports.connections = exports.connectionProfiles = exports.clients = exports.clientGrants = exports.branding = exports.attackProtection = exports.anomaly = exports.agents = exports.actions = void 0;
39
+ exports.verifiableCredentials = exports.users = exports.userGrants = exports.userBlocks = exports.userAttributeProfiles = exports.tokenExchangeProfiles = exports.tickets = exports.tenants = exports.supplementalSignals = exports.stats = exports.sessions = exports.selfServiceProfiles = exports.rulesConfigs = exports.rules = exports.roles = exports.riskAssessments = exports.resourceServers = exports.refreshTokens = exports.rateLimitPolicies = exports.prompts = exports.organizations = exports.networkAcls = exports.logStreams = exports.logs = exports.keys = exports.jobs = exports.hooks = exports.guardian = exports.groups = exports.forms = exports.flows = exports.experimentation = exports.eventStreams = exports.events = exports.emailTemplates = exports.emails = exports.deviceCredentials = exports.customDomains = exports.connections = exports.connectionProfiles = exports.clients = exports.clientProfiles = exports.clientGrants = exports.branding = exports.attackProtection = exports.anomaly = exports.agents = exports.actions = void 0;
40
40
  exports.actions = __importStar(require("./actions/index.js"));
41
41
  exports.agents = __importStar(require("./agents/index.js"));
42
42
  exports.anomaly = __importStar(require("./anomaly/index.js"));
43
43
  exports.attackProtection = __importStar(require("./attackProtection/index.js"));
44
44
  exports.branding = __importStar(require("./branding/index.js"));
45
45
  exports.clientGrants = __importStar(require("./clientGrants/index.js"));
46
+ exports.clientProfiles = __importStar(require("./clientProfiles/index.js"));
46
47
  exports.clients = __importStar(require("./clients/index.js"));
47
48
  exports.connectionProfiles = __importStar(require("./connectionProfiles/index.js"));
48
49
  exports.connections = __importStar(require("./connections/index.js"));