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.
Files changed (36) 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 +42 -0
  4. package/dist/cjs/management/api/resources/clientProfiles/client/Client.d.ts +106 -0
  5. package/dist/cjs/management/api/resources/clientProfiles/client/Client.js +391 -0
  6. package/dist/cjs/management/api/resources/clientProfiles/client/index.d.ts +1 -0
  7. package/dist/cjs/management/api/resources/clientProfiles/client/index.js +2 -0
  8. package/dist/cjs/management/api/resources/clientProfiles/exports.d.ts +2 -0
  9. package/dist/cjs/management/api/resources/clientProfiles/exports.js +21 -0
  10. package/dist/cjs/management/api/resources/clientProfiles/index.d.ts +1 -0
  11. package/dist/cjs/management/api/resources/clientProfiles/index.js +17 -0
  12. package/dist/cjs/management/api/resources/index.d.ts +1 -0
  13. package/dist/cjs/management/api/resources/index.js +2 -1
  14. package/dist/cjs/management/api/types/types.d.ts +630 -874
  15. package/dist/cjs/management/api/types/types.js +218 -21
  16. package/dist/cjs/management/version.d.ts +1 -1
  17. package/dist/cjs/management/version.js +1 -1
  18. package/dist/esm/management/Client.d.mts +3 -0
  19. package/dist/esm/management/Client.mjs +5 -0
  20. package/dist/esm/management/api/requests/requests.d.mts +42 -0
  21. package/dist/esm/management/api/resources/clientProfiles/client/Client.d.mts +106 -0
  22. package/dist/esm/management/api/resources/clientProfiles/client/Client.mjs +354 -0
  23. package/dist/esm/management/api/resources/clientProfiles/client/index.d.mts +1 -0
  24. package/dist/esm/management/api/resources/clientProfiles/client/index.mjs +1 -0
  25. package/dist/esm/management/api/resources/clientProfiles/exports.d.mts +2 -0
  26. package/dist/esm/management/api/resources/clientProfiles/exports.mjs +3 -0
  27. package/dist/esm/management/api/resources/clientProfiles/index.d.mts +1 -0
  28. package/dist/esm/management/api/resources/clientProfiles/index.mjs +1 -0
  29. package/dist/esm/management/api/resources/index.d.mts +1 -0
  30. package/dist/esm/management/api/resources/index.mjs +1 -0
  31. package/dist/esm/management/api/types/types.d.mts +630 -874
  32. package/dist/esm/management/api/types/types.mjs +197 -0
  33. package/dist/esm/management/version.d.mts +1 -1
  34. package/dist/esm/management/version.mjs +1 -1
  35. package/package.json +12 -1
  36. package/reference.md +350 -0
@@ -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"));