@targetprocess/auth-client 3.2.2-ci.4 → 3.2.2-manual-up-node-client-template-1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/client.d.ts +125 -144
- package/bin/client.js +258 -256
- package/bin/client.js.map +1 -1
- package/package.json +5 -6
package/bin/client.js
CHANGED
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
/* tslint:disable */
|
|
3
2
|
//----------------------
|
|
4
3
|
// <auto-generated>
|
|
5
|
-
// Generated using the NSwag toolchain
|
|
4
|
+
// Generated using the NSwag toolchain v13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v13.0.0.0)) (http://NSwag.org)
|
|
6
5
|
// </auto-generated>
|
|
7
6
|
//----------------------
|
|
8
|
-
// ReSharper disable InconsistentNaming
|
|
9
7
|
var __extends = (this && this.__extends) || (function () {
|
|
10
8
|
var extendStatics = Object.setPrototypeOf ||
|
|
11
9
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
@@ -21,7 +19,7 @@ var AuthClient = /** @class */ (function () {
|
|
|
21
19
|
function AuthClient(baseUrl, http) {
|
|
22
20
|
this.jsonParseReviver = undefined;
|
|
23
21
|
this.http = http ? http : window;
|
|
24
|
-
this.baseUrl = baseUrl ? baseUrl : "";
|
|
22
|
+
this.baseUrl = baseUrl !== undefined && baseUrl !== null ? baseUrl : "";
|
|
25
23
|
}
|
|
26
24
|
/**
|
|
27
25
|
* Create new tenant
|
|
@@ -35,10 +33,10 @@ var AuthClient = /** @class */ (function () {
|
|
|
35
33
|
var options_ = {
|
|
36
34
|
body: content_,
|
|
37
35
|
method: "POST",
|
|
38
|
-
headers:
|
|
36
|
+
headers: {
|
|
39
37
|
"Content-Type": "application/json",
|
|
40
38
|
"Accept": "application/json"
|
|
41
|
-
}
|
|
39
|
+
}
|
|
42
40
|
};
|
|
43
41
|
return this.http.fetch(url_, options_).then(function (_response) {
|
|
44
42
|
return _this.processCreateTenant(_response);
|
|
@@ -63,24 +61,24 @@ var AuthClient = /** @class */ (function () {
|
|
|
63
61
|
return response.text().then(function (_responseText) {
|
|
64
62
|
var result400 = null;
|
|
65
63
|
result400 = _responseText === "" ? null : JSON.parse(_responseText, _this.jsonParseReviver);
|
|
66
|
-
return throwException("
|
|
64
|
+
return throwException("Validation failed", status, _responseText, _headers, result400);
|
|
67
65
|
});
|
|
68
66
|
}
|
|
69
67
|
else if (status === 401) {
|
|
70
68
|
return response.text().then(function (_responseText) {
|
|
71
|
-
return throwException("
|
|
69
|
+
return throwException("Unauthorized", status, _responseText, _headers);
|
|
72
70
|
});
|
|
73
71
|
}
|
|
74
72
|
else if (status === 403) {
|
|
75
73
|
return response.text().then(function (_responseText) {
|
|
76
|
-
return throwException("
|
|
74
|
+
return throwException("Forbidden", status, _responseText, _headers);
|
|
77
75
|
});
|
|
78
76
|
}
|
|
79
77
|
else if (status === 500) {
|
|
80
78
|
return response.text().then(function (_responseText) {
|
|
81
79
|
var result500 = null;
|
|
82
80
|
result500 = _responseText === "" ? null : JSON.parse(_responseText, _this.jsonParseReviver);
|
|
83
|
-
return throwException("
|
|
81
|
+
return throwException("General error", status, _responseText, _headers, result500);
|
|
84
82
|
});
|
|
85
83
|
}
|
|
86
84
|
else if (status !== 200 && status !== 204) {
|
|
@@ -92,7 +90,7 @@ var AuthClient = /** @class */ (function () {
|
|
|
92
90
|
};
|
|
93
91
|
/**
|
|
94
92
|
* Update tenant
|
|
95
|
-
* @tenantId Tenant Id
|
|
93
|
+
* @param tenantId Tenant Id
|
|
96
94
|
* @return Updated
|
|
97
95
|
*/
|
|
98
96
|
AuthClient.prototype.updateTenant = function (body, tenantId) {
|
|
@@ -106,9 +104,9 @@ var AuthClient = /** @class */ (function () {
|
|
|
106
104
|
var options_ = {
|
|
107
105
|
body: content_,
|
|
108
106
|
method: "PUT",
|
|
109
|
-
headers:
|
|
107
|
+
headers: {
|
|
110
108
|
"Content-Type": "application/json",
|
|
111
|
-
}
|
|
109
|
+
}
|
|
112
110
|
};
|
|
113
111
|
return this.http.fetch(url_, options_).then(function (_response) {
|
|
114
112
|
return _this.processUpdateTenant(_response);
|
|
@@ -131,29 +129,29 @@ var AuthClient = /** @class */ (function () {
|
|
|
131
129
|
return response.text().then(function (_responseText) {
|
|
132
130
|
var result400 = null;
|
|
133
131
|
result400 = _responseText === "" ? null : JSON.parse(_responseText, _this.jsonParseReviver);
|
|
134
|
-
return throwException("
|
|
132
|
+
return throwException("Validation failed", status, _responseText, _headers, result400);
|
|
135
133
|
});
|
|
136
134
|
}
|
|
137
135
|
else if (status === 401) {
|
|
138
136
|
return response.text().then(function (_responseText) {
|
|
139
|
-
return throwException("
|
|
137
|
+
return throwException("Unauthorized", status, _responseText, _headers);
|
|
140
138
|
});
|
|
141
139
|
}
|
|
142
140
|
else if (status === 403) {
|
|
143
141
|
return response.text().then(function (_responseText) {
|
|
144
|
-
return throwException("
|
|
142
|
+
return throwException("Forbidden", status, _responseText, _headers);
|
|
145
143
|
});
|
|
146
144
|
}
|
|
147
145
|
else if (status === 404) {
|
|
148
146
|
return response.text().then(function (_responseText) {
|
|
149
|
-
return throwException("
|
|
147
|
+
return throwException("NotFound", status, _responseText, _headers);
|
|
150
148
|
});
|
|
151
149
|
}
|
|
152
150
|
else if (status === 500) {
|
|
153
151
|
return response.text().then(function (_responseText) {
|
|
154
152
|
var result500 = null;
|
|
155
153
|
result500 = _responseText === "" ? null : JSON.parse(_responseText, _this.jsonParseReviver);
|
|
156
|
-
return throwException("
|
|
154
|
+
return throwException("General error", status, _responseText, _headers, result500);
|
|
157
155
|
});
|
|
158
156
|
}
|
|
159
157
|
else if (status !== 200 && status !== 204) {
|
|
@@ -165,7 +163,7 @@ var AuthClient = /** @class */ (function () {
|
|
|
165
163
|
};
|
|
166
164
|
/**
|
|
167
165
|
* Get tenant details
|
|
168
|
-
* @tenantId Tenant Id
|
|
166
|
+
* @param tenantId Tenant Id
|
|
169
167
|
* @return OK
|
|
170
168
|
*/
|
|
171
169
|
AuthClient.prototype.getTenant = function (tenantId) {
|
|
@@ -177,10 +175,9 @@ var AuthClient = /** @class */ (function () {
|
|
|
177
175
|
url_ = url_.replace(/[?&]$/, "");
|
|
178
176
|
var options_ = {
|
|
179
177
|
method: "GET",
|
|
180
|
-
headers:
|
|
181
|
-
"Content-Type": "application/json",
|
|
178
|
+
headers: {
|
|
182
179
|
"Accept": "application/json"
|
|
183
|
-
}
|
|
180
|
+
}
|
|
184
181
|
};
|
|
185
182
|
return this.http.fetch(url_, options_).then(function (_response) {
|
|
186
183
|
return _this.processGetTenant(_response);
|
|
@@ -203,24 +200,24 @@ var AuthClient = /** @class */ (function () {
|
|
|
203
200
|
}
|
|
204
201
|
else if (status === 401) {
|
|
205
202
|
return response.text().then(function (_responseText) {
|
|
206
|
-
return throwException("
|
|
203
|
+
return throwException("Unauthorized", status, _responseText, _headers);
|
|
207
204
|
});
|
|
208
205
|
}
|
|
209
206
|
else if (status === 403) {
|
|
210
207
|
return response.text().then(function (_responseText) {
|
|
211
|
-
return throwException("
|
|
208
|
+
return throwException("Forbidden", status, _responseText, _headers);
|
|
212
209
|
});
|
|
213
210
|
}
|
|
214
211
|
else if (status === 404) {
|
|
215
212
|
return response.text().then(function (_responseText) {
|
|
216
|
-
return throwException("
|
|
213
|
+
return throwException("NotFound", status, _responseText, _headers);
|
|
217
214
|
});
|
|
218
215
|
}
|
|
219
216
|
else if (status === 500) {
|
|
220
217
|
return response.text().then(function (_responseText) {
|
|
221
218
|
var result500 = null;
|
|
222
219
|
result500 = _responseText === "" ? null : JSON.parse(_responseText, _this.jsonParseReviver);
|
|
223
|
-
return throwException("
|
|
220
|
+
return throwException("General error", status, _responseText, _headers, result500);
|
|
224
221
|
});
|
|
225
222
|
}
|
|
226
223
|
else if (status !== 200 && status !== 204) {
|
|
@@ -232,7 +229,7 @@ var AuthClient = /** @class */ (function () {
|
|
|
232
229
|
};
|
|
233
230
|
/**
|
|
234
231
|
* Delete tenant
|
|
235
|
-
* @tenantId Tenant Id
|
|
232
|
+
* @param tenantId Tenant Id
|
|
236
233
|
* @return Deleted
|
|
237
234
|
*/
|
|
238
235
|
AuthClient.prototype.deleteTenant = function (tenantId) {
|
|
@@ -244,9 +241,7 @@ var AuthClient = /** @class */ (function () {
|
|
|
244
241
|
url_ = url_.replace(/[?&]$/, "");
|
|
245
242
|
var options_ = {
|
|
246
243
|
method: "DELETE",
|
|
247
|
-
headers:
|
|
248
|
-
"Content-Type": "application/json",
|
|
249
|
-
})
|
|
244
|
+
headers: {}
|
|
250
245
|
};
|
|
251
246
|
return this.http.fetch(url_, options_).then(function (_response) {
|
|
252
247
|
return _this.processDeleteTenant(_response);
|
|
@@ -267,24 +262,24 @@ var AuthClient = /** @class */ (function () {
|
|
|
267
262
|
}
|
|
268
263
|
else if (status === 401) {
|
|
269
264
|
return response.text().then(function (_responseText) {
|
|
270
|
-
return throwException("
|
|
265
|
+
return throwException("Unauthorized", status, _responseText, _headers);
|
|
271
266
|
});
|
|
272
267
|
}
|
|
273
268
|
else if (status === 403) {
|
|
274
269
|
return response.text().then(function (_responseText) {
|
|
275
|
-
return throwException("
|
|
270
|
+
return throwException("Forbidden", status, _responseText, _headers);
|
|
276
271
|
});
|
|
277
272
|
}
|
|
278
273
|
else if (status === 404) {
|
|
279
274
|
return response.text().then(function (_responseText) {
|
|
280
|
-
return throwException("
|
|
275
|
+
return throwException("NotFound", status, _responseText, _headers);
|
|
281
276
|
});
|
|
282
277
|
}
|
|
283
278
|
else if (status === 500) {
|
|
284
279
|
return response.text().then(function (_responseText) {
|
|
285
280
|
var result500 = null;
|
|
286
281
|
result500 = _responseText === "" ? null : JSON.parse(_responseText, _this.jsonParseReviver);
|
|
287
|
-
return throwException("
|
|
282
|
+
return throwException("General error", status, _responseText, _headers, result500);
|
|
288
283
|
});
|
|
289
284
|
}
|
|
290
285
|
else if (status !== 200 && status !== 204) {
|
|
@@ -296,7 +291,7 @@ var AuthClient = /** @class */ (function () {
|
|
|
296
291
|
};
|
|
297
292
|
/**
|
|
298
293
|
* Create new user in tenant
|
|
299
|
-
* @tenantId Tenant Id
|
|
294
|
+
* @param tenantId Tenant Id
|
|
300
295
|
* @return Created
|
|
301
296
|
*/
|
|
302
297
|
AuthClient.prototype.createUserInTenant = function (body, tenantId) {
|
|
@@ -310,10 +305,10 @@ var AuthClient = /** @class */ (function () {
|
|
|
310
305
|
var options_ = {
|
|
311
306
|
body: content_,
|
|
312
307
|
method: "POST",
|
|
313
|
-
headers:
|
|
308
|
+
headers: {
|
|
314
309
|
"Content-Type": "application/json",
|
|
315
310
|
"Accept": "application/json"
|
|
316
|
-
}
|
|
311
|
+
}
|
|
317
312
|
};
|
|
318
313
|
return this.http.fetch(url_, options_).then(function (_response) {
|
|
319
314
|
return _this.processCreateUserInTenant(_response);
|
|
@@ -336,24 +331,24 @@ var AuthClient = /** @class */ (function () {
|
|
|
336
331
|
}
|
|
337
332
|
else if (status === 401) {
|
|
338
333
|
return response.text().then(function (_responseText) {
|
|
339
|
-
return throwException("
|
|
334
|
+
return throwException("Unauthorized", status, _responseText, _headers);
|
|
340
335
|
});
|
|
341
336
|
}
|
|
342
337
|
else if (status === 403) {
|
|
343
338
|
return response.text().then(function (_responseText) {
|
|
344
|
-
return throwException("
|
|
339
|
+
return throwException("Forbidden", status, _responseText, _headers);
|
|
345
340
|
});
|
|
346
341
|
}
|
|
347
342
|
else if (status === 404) {
|
|
348
343
|
return response.text().then(function (_responseText) {
|
|
349
|
-
return throwException("
|
|
344
|
+
return throwException("NotFound", status, _responseText, _headers);
|
|
350
345
|
});
|
|
351
346
|
}
|
|
352
347
|
else if (status === 500) {
|
|
353
348
|
return response.text().then(function (_responseText) {
|
|
354
349
|
var result500 = null;
|
|
355
350
|
result500 = _responseText === "" ? null : JSON.parse(_responseText, _this.jsonParseReviver);
|
|
356
|
-
return throwException("
|
|
351
|
+
return throwException("General error", status, _responseText, _headers, result500);
|
|
357
352
|
});
|
|
358
353
|
}
|
|
359
354
|
else if (status !== 200 && status !== 204) {
|
|
@@ -365,7 +360,7 @@ var AuthClient = /** @class */ (function () {
|
|
|
365
360
|
};
|
|
366
361
|
/**
|
|
367
362
|
* Update users passwords
|
|
368
|
-
* @tenantId Tenant Id
|
|
363
|
+
* @param tenantId Tenant Id
|
|
369
364
|
* @return Imported
|
|
370
365
|
*/
|
|
371
366
|
AuthClient.prototype.updateUsersPasswords = function (body, tenantId) {
|
|
@@ -379,9 +374,9 @@ var AuthClient = /** @class */ (function () {
|
|
|
379
374
|
var options_ = {
|
|
380
375
|
body: content_,
|
|
381
376
|
method: "POST",
|
|
382
|
-
headers:
|
|
377
|
+
headers: {
|
|
383
378
|
"Content-Type": "application/json",
|
|
384
|
-
}
|
|
379
|
+
}
|
|
385
380
|
};
|
|
386
381
|
return this.http.fetch(url_, options_).then(function (_response) {
|
|
387
382
|
return _this.processUpdateUsersPasswords(_response);
|
|
@@ -404,24 +399,24 @@ var AuthClient = /** @class */ (function () {
|
|
|
404
399
|
return response.text().then(function (_responseText) {
|
|
405
400
|
var result400 = null;
|
|
406
401
|
result400 = _responseText === "" ? null : JSON.parse(_responseText, _this.jsonParseReviver);
|
|
407
|
-
return throwException("
|
|
402
|
+
return throwException("Validation failed", status, _responseText, _headers, result400);
|
|
408
403
|
});
|
|
409
404
|
}
|
|
410
405
|
else if (status === 401) {
|
|
411
406
|
return response.text().then(function (_responseText) {
|
|
412
|
-
return throwException("
|
|
407
|
+
return throwException("Unauthorized", status, _responseText, _headers);
|
|
413
408
|
});
|
|
414
409
|
}
|
|
415
410
|
else if (status === 403) {
|
|
416
411
|
return response.text().then(function (_responseText) {
|
|
417
|
-
return throwException("
|
|
412
|
+
return throwException("Forbidden", status, _responseText, _headers);
|
|
418
413
|
});
|
|
419
414
|
}
|
|
420
415
|
else if (status === 500) {
|
|
421
416
|
return response.text().then(function (_responseText) {
|
|
422
417
|
var result500 = null;
|
|
423
418
|
result500 = _responseText === "" ? null : JSON.parse(_responseText, _this.jsonParseReviver);
|
|
424
|
-
return throwException("
|
|
419
|
+
return throwException("General error", status, _responseText, _headers, result500);
|
|
425
420
|
});
|
|
426
421
|
}
|
|
427
422
|
else if (status !== 200 && status !== 204) {
|
|
@@ -433,8 +428,8 @@ var AuthClient = /** @class */ (function () {
|
|
|
433
428
|
};
|
|
434
429
|
/**
|
|
435
430
|
* Set user claim values
|
|
436
|
-
* @tenantId Tenant Id
|
|
437
|
-
* @claimType Claim Type
|
|
431
|
+
* @param tenantId Tenant Id
|
|
432
|
+
* @param claimType Claim Type
|
|
438
433
|
* @return OK
|
|
439
434
|
*/
|
|
440
435
|
AuthClient.prototype.setUserClaims = function (userClaimsBatch, tenantId, claimType) {
|
|
@@ -451,9 +446,9 @@ var AuthClient = /** @class */ (function () {
|
|
|
451
446
|
var options_ = {
|
|
452
447
|
body: content_,
|
|
453
448
|
method: "PUT",
|
|
454
|
-
headers:
|
|
449
|
+
headers: {
|
|
455
450
|
"Content-Type": "application/json",
|
|
456
|
-
}
|
|
451
|
+
}
|
|
457
452
|
};
|
|
458
453
|
return this.http.fetch(url_, options_).then(function (_response) {
|
|
459
454
|
return _this.processSetUserClaims(_response);
|
|
@@ -474,24 +469,24 @@ var AuthClient = /** @class */ (function () {
|
|
|
474
469
|
}
|
|
475
470
|
else if (status === 401) {
|
|
476
471
|
return response.text().then(function (_responseText) {
|
|
477
|
-
return throwException("
|
|
472
|
+
return throwException("Unauthorized", status, _responseText, _headers);
|
|
478
473
|
});
|
|
479
474
|
}
|
|
480
475
|
else if (status === 403) {
|
|
481
476
|
return response.text().then(function (_responseText) {
|
|
482
|
-
return throwException("
|
|
477
|
+
return throwException("Forbidden", status, _responseText, _headers);
|
|
483
478
|
});
|
|
484
479
|
}
|
|
485
480
|
else if (status === 404) {
|
|
486
481
|
return response.text().then(function (_responseText) {
|
|
487
|
-
return throwException("
|
|
482
|
+
return throwException("NotFound", status, _responseText, _headers);
|
|
488
483
|
});
|
|
489
484
|
}
|
|
490
485
|
else if (status === 500) {
|
|
491
486
|
return response.text().then(function (_responseText) {
|
|
492
487
|
var result500 = null;
|
|
493
488
|
result500 = _responseText === "" ? null : JSON.parse(_responseText, _this.jsonParseReviver);
|
|
494
|
-
return throwException("
|
|
489
|
+
return throwException("General error", status, _responseText, _headers, result500);
|
|
495
490
|
});
|
|
496
491
|
}
|
|
497
492
|
else if (status !== 200 && status !== 204) {
|
|
@@ -503,7 +498,7 @@ var AuthClient = /** @class */ (function () {
|
|
|
503
498
|
};
|
|
504
499
|
/**
|
|
505
500
|
* Import users in tenant
|
|
506
|
-
* @tenantId Tenant Id
|
|
501
|
+
* @param tenantId Tenant Id
|
|
507
502
|
* @return Imported
|
|
508
503
|
*/
|
|
509
504
|
AuthClient.prototype.importUsersInTenant = function (body, tenantId) {
|
|
@@ -517,9 +512,9 @@ var AuthClient = /** @class */ (function () {
|
|
|
517
512
|
var options_ = {
|
|
518
513
|
body: content_,
|
|
519
514
|
method: "POST",
|
|
520
|
-
headers:
|
|
515
|
+
headers: {
|
|
521
516
|
"Content-Type": "application/json",
|
|
522
|
-
}
|
|
517
|
+
}
|
|
523
518
|
};
|
|
524
519
|
return this.http.fetch(url_, options_).then(function (_response) {
|
|
525
520
|
return _this.processImportUsersInTenant(_response);
|
|
@@ -542,29 +537,29 @@ var AuthClient = /** @class */ (function () {
|
|
|
542
537
|
return response.text().then(function (_responseText) {
|
|
543
538
|
var result400 = null;
|
|
544
539
|
result400 = _responseText === "" ? null : JSON.parse(_responseText, _this.jsonParseReviver);
|
|
545
|
-
return throwException("
|
|
540
|
+
return throwException("Validation failed", status, _responseText, _headers, result400);
|
|
546
541
|
});
|
|
547
542
|
}
|
|
548
543
|
else if (status === 401) {
|
|
549
544
|
return response.text().then(function (_responseText) {
|
|
550
|
-
return throwException("
|
|
545
|
+
return throwException("Unauthorized", status, _responseText, _headers);
|
|
551
546
|
});
|
|
552
547
|
}
|
|
553
548
|
else if (status === 403) {
|
|
554
549
|
return response.text().then(function (_responseText) {
|
|
555
|
-
return throwException("
|
|
550
|
+
return throwException("Forbidden", status, _responseText, _headers);
|
|
556
551
|
});
|
|
557
552
|
}
|
|
558
553
|
else if (status === 404) {
|
|
559
554
|
return response.text().then(function (_responseText) {
|
|
560
|
-
return throwException("
|
|
555
|
+
return throwException("NotFound", status, _responseText, _headers);
|
|
561
556
|
});
|
|
562
557
|
}
|
|
563
558
|
else if (status === 500) {
|
|
564
559
|
return response.text().then(function (_responseText) {
|
|
565
560
|
var result500 = null;
|
|
566
561
|
result500 = _responseText === "" ? null : JSON.parse(_responseText, _this.jsonParseReviver);
|
|
567
|
-
return throwException("
|
|
562
|
+
return throwException("General error", status, _responseText, _headers, result500);
|
|
568
563
|
});
|
|
569
564
|
}
|
|
570
565
|
else if (status !== 200 && status !== 204) {
|
|
@@ -576,8 +571,8 @@ var AuthClient = /** @class */ (function () {
|
|
|
576
571
|
};
|
|
577
572
|
/**
|
|
578
573
|
* Get user from tenant
|
|
579
|
-
* @tenantId Tenant Id
|
|
580
|
-
* @userId User Id
|
|
574
|
+
* @param tenantId Tenant Id
|
|
575
|
+
* @param userId User Id
|
|
581
576
|
* @return OK
|
|
582
577
|
*/
|
|
583
578
|
AuthClient.prototype.getUserFromTenant = function (tenantId, userId) {
|
|
@@ -592,10 +587,9 @@ var AuthClient = /** @class */ (function () {
|
|
|
592
587
|
url_ = url_.replace(/[?&]$/, "");
|
|
593
588
|
var options_ = {
|
|
594
589
|
method: "GET",
|
|
595
|
-
headers:
|
|
596
|
-
"Content-Type": "application/json",
|
|
590
|
+
headers: {
|
|
597
591
|
"Accept": "application/json"
|
|
598
|
-
}
|
|
592
|
+
}
|
|
599
593
|
};
|
|
600
594
|
return this.http.fetch(url_, options_).then(function (_response) {
|
|
601
595
|
return _this.processGetUserFromTenant(_response);
|
|
@@ -618,24 +612,24 @@ var AuthClient = /** @class */ (function () {
|
|
|
618
612
|
}
|
|
619
613
|
else if (status === 401) {
|
|
620
614
|
return response.text().then(function (_responseText) {
|
|
621
|
-
return throwException("
|
|
615
|
+
return throwException("Unauthorized", status, _responseText, _headers);
|
|
622
616
|
});
|
|
623
617
|
}
|
|
624
618
|
else if (status === 403) {
|
|
625
619
|
return response.text().then(function (_responseText) {
|
|
626
|
-
return throwException("
|
|
620
|
+
return throwException("Forbidden", status, _responseText, _headers);
|
|
627
621
|
});
|
|
628
622
|
}
|
|
629
623
|
else if (status === 404) {
|
|
630
624
|
return response.text().then(function (_responseText) {
|
|
631
|
-
return throwException("
|
|
625
|
+
return throwException("NotFound", status, _responseText, _headers);
|
|
632
626
|
});
|
|
633
627
|
}
|
|
634
628
|
else if (status === 500) {
|
|
635
629
|
return response.text().then(function (_responseText) {
|
|
636
630
|
var result500 = null;
|
|
637
631
|
result500 = _responseText === "" ? null : JSON.parse(_responseText, _this.jsonParseReviver);
|
|
638
|
-
return throwException("
|
|
632
|
+
return throwException("General error", status, _responseText, _headers, result500);
|
|
639
633
|
});
|
|
640
634
|
}
|
|
641
635
|
else if (status !== 200 && status !== 204) {
|
|
@@ -647,8 +641,8 @@ var AuthClient = /** @class */ (function () {
|
|
|
647
641
|
};
|
|
648
642
|
/**
|
|
649
643
|
* Update user in tenant
|
|
650
|
-
* @tenantId Tenant Id
|
|
651
|
-
* @userId User Id
|
|
644
|
+
* @param tenantId Tenant Id
|
|
645
|
+
* @param userId User Id
|
|
652
646
|
* @return Updated
|
|
653
647
|
*/
|
|
654
648
|
AuthClient.prototype.updateUserInTenant = function (body, tenantId, userId) {
|
|
@@ -665,9 +659,9 @@ var AuthClient = /** @class */ (function () {
|
|
|
665
659
|
var options_ = {
|
|
666
660
|
body: content_,
|
|
667
661
|
method: "PUT",
|
|
668
|
-
headers:
|
|
662
|
+
headers: {
|
|
669
663
|
"Content-Type": "application/json",
|
|
670
|
-
}
|
|
664
|
+
}
|
|
671
665
|
};
|
|
672
666
|
return this.http.fetch(url_, options_).then(function (_response) {
|
|
673
667
|
return _this.processUpdateUserInTenant(_response);
|
|
@@ -688,24 +682,24 @@ var AuthClient = /** @class */ (function () {
|
|
|
688
682
|
}
|
|
689
683
|
else if (status === 401) {
|
|
690
684
|
return response.text().then(function (_responseText) {
|
|
691
|
-
return throwException("
|
|
685
|
+
return throwException("Unauthorized", status, _responseText, _headers);
|
|
692
686
|
});
|
|
693
687
|
}
|
|
694
688
|
else if (status === 403) {
|
|
695
689
|
return response.text().then(function (_responseText) {
|
|
696
|
-
return throwException("
|
|
690
|
+
return throwException("Forbidden", status, _responseText, _headers);
|
|
697
691
|
});
|
|
698
692
|
}
|
|
699
693
|
else if (status === 404) {
|
|
700
694
|
return response.text().then(function (_responseText) {
|
|
701
|
-
return throwException("
|
|
695
|
+
return throwException("NotFound", status, _responseText, _headers);
|
|
702
696
|
});
|
|
703
697
|
}
|
|
704
698
|
else if (status === 500) {
|
|
705
699
|
return response.text().then(function (_responseText) {
|
|
706
700
|
var result500 = null;
|
|
707
701
|
result500 = _responseText === "" ? null : JSON.parse(_responseText, _this.jsonParseReviver);
|
|
708
|
-
return throwException("
|
|
702
|
+
return throwException("General error", status, _responseText, _headers, result500);
|
|
709
703
|
});
|
|
710
704
|
}
|
|
711
705
|
else if (status !== 200 && status !== 204) {
|
|
@@ -717,8 +711,8 @@ var AuthClient = /** @class */ (function () {
|
|
|
717
711
|
};
|
|
718
712
|
/**
|
|
719
713
|
* Delete user from tenant
|
|
720
|
-
* @tenantId Tenant Id
|
|
721
|
-
* @userId User Id
|
|
714
|
+
* @param tenantId Tenant Id
|
|
715
|
+
* @param userId User Id
|
|
722
716
|
* @return Deleted
|
|
723
717
|
*/
|
|
724
718
|
AuthClient.prototype.deleteUserFromTenant = function (tenantId, userId) {
|
|
@@ -733,9 +727,7 @@ var AuthClient = /** @class */ (function () {
|
|
|
733
727
|
url_ = url_.replace(/[?&]$/, "");
|
|
734
728
|
var options_ = {
|
|
735
729
|
method: "DELETE",
|
|
736
|
-
headers:
|
|
737
|
-
"Content-Type": "application/json",
|
|
738
|
-
})
|
|
730
|
+
headers: {}
|
|
739
731
|
};
|
|
740
732
|
return this.http.fetch(url_, options_).then(function (_response) {
|
|
741
733
|
return _this.processDeleteUserFromTenant(_response);
|
|
@@ -756,24 +748,24 @@ var AuthClient = /** @class */ (function () {
|
|
|
756
748
|
}
|
|
757
749
|
else if (status === 401) {
|
|
758
750
|
return response.text().then(function (_responseText) {
|
|
759
|
-
return throwException("
|
|
751
|
+
return throwException("Unauthorized", status, _responseText, _headers);
|
|
760
752
|
});
|
|
761
753
|
}
|
|
762
754
|
else if (status === 403) {
|
|
763
755
|
return response.text().then(function (_responseText) {
|
|
764
|
-
return throwException("
|
|
756
|
+
return throwException("Forbidden", status, _responseText, _headers);
|
|
765
757
|
});
|
|
766
758
|
}
|
|
767
759
|
else if (status === 404) {
|
|
768
760
|
return response.text().then(function (_responseText) {
|
|
769
|
-
return throwException("
|
|
761
|
+
return throwException("NotFound", status, _responseText, _headers);
|
|
770
762
|
});
|
|
771
763
|
}
|
|
772
764
|
else if (status === 500) {
|
|
773
765
|
return response.text().then(function (_responseText) {
|
|
774
766
|
var result500 = null;
|
|
775
767
|
result500 = _responseText === "" ? null : JSON.parse(_responseText, _this.jsonParseReviver);
|
|
776
|
-
return throwException("
|
|
768
|
+
return throwException("General error", status, _responseText, _headers, result500);
|
|
777
769
|
});
|
|
778
770
|
}
|
|
779
771
|
else if (status !== 200 && status !== 204) {
|
|
@@ -785,8 +777,8 @@ var AuthClient = /** @class */ (function () {
|
|
|
785
777
|
};
|
|
786
778
|
/**
|
|
787
779
|
* Change user's password
|
|
788
|
-
* @tenantId Tenant Id
|
|
789
|
-
* @userId User Id
|
|
780
|
+
* @param tenantId Tenant Id
|
|
781
|
+
* @param userId User Id
|
|
790
782
|
* @return Updated
|
|
791
783
|
*/
|
|
792
784
|
AuthClient.prototype.changeUserPasswordInTenant = function (body, tenantId, userId) {
|
|
@@ -803,9 +795,9 @@ var AuthClient = /** @class */ (function () {
|
|
|
803
795
|
var options_ = {
|
|
804
796
|
body: content_,
|
|
805
797
|
method: "PUT",
|
|
806
|
-
headers:
|
|
798
|
+
headers: {
|
|
807
799
|
"Content-Type": "application/json",
|
|
808
|
-
}
|
|
800
|
+
}
|
|
809
801
|
};
|
|
810
802
|
return this.http.fetch(url_, options_).then(function (_response) {
|
|
811
803
|
return _this.processChangeUserPasswordInTenant(_response);
|
|
@@ -826,24 +818,24 @@ var AuthClient = /** @class */ (function () {
|
|
|
826
818
|
}
|
|
827
819
|
else if (status === 401) {
|
|
828
820
|
return response.text().then(function (_responseText) {
|
|
829
|
-
return throwException("
|
|
821
|
+
return throwException("Unauthorized", status, _responseText, _headers);
|
|
830
822
|
});
|
|
831
823
|
}
|
|
832
824
|
else if (status === 403) {
|
|
833
825
|
return response.text().then(function (_responseText) {
|
|
834
|
-
return throwException("
|
|
826
|
+
return throwException("Forbidden", status, _responseText, _headers);
|
|
835
827
|
});
|
|
836
828
|
}
|
|
837
829
|
else if (status === 404) {
|
|
838
830
|
return response.text().then(function (_responseText) {
|
|
839
|
-
return throwException("
|
|
831
|
+
return throwException("NotFound", status, _responseText, _headers);
|
|
840
832
|
});
|
|
841
833
|
}
|
|
842
834
|
else if (status === 500) {
|
|
843
835
|
return response.text().then(function (_responseText) {
|
|
844
836
|
var result500 = null;
|
|
845
837
|
result500 = _responseText === "" ? null : JSON.parse(_responseText, _this.jsonParseReviver);
|
|
846
|
-
return throwException("
|
|
838
|
+
return throwException("General error", status, _responseText, _headers, result500);
|
|
847
839
|
});
|
|
848
840
|
}
|
|
849
841
|
else if (status !== 200 && status !== 204) {
|
|
@@ -855,7 +847,7 @@ var AuthClient = /** @class */ (function () {
|
|
|
855
847
|
};
|
|
856
848
|
/**
|
|
857
849
|
* Create new external SAML identity provider in tenant
|
|
858
|
-
* @tenantId Tenant Id
|
|
850
|
+
* @param tenantId Tenant Id
|
|
859
851
|
* @return Created
|
|
860
852
|
*/
|
|
861
853
|
AuthClient.prototype.createSamlProviderInTenant = function (body, tenantId) {
|
|
@@ -869,10 +861,10 @@ var AuthClient = /** @class */ (function () {
|
|
|
869
861
|
var options_ = {
|
|
870
862
|
body: content_,
|
|
871
863
|
method: "POST",
|
|
872
|
-
headers:
|
|
864
|
+
headers: {
|
|
873
865
|
"Content-Type": "application/json",
|
|
874
866
|
"Accept": "application/json"
|
|
875
|
-
}
|
|
867
|
+
}
|
|
876
868
|
};
|
|
877
869
|
return this.http.fetch(url_, options_).then(function (_response) {
|
|
878
870
|
return _this.processCreateSamlProviderInTenant(_response);
|
|
@@ -895,24 +887,24 @@ var AuthClient = /** @class */ (function () {
|
|
|
895
887
|
}
|
|
896
888
|
else if (status === 401) {
|
|
897
889
|
return response.text().then(function (_responseText) {
|
|
898
|
-
return throwException("
|
|
890
|
+
return throwException("Unauthorized", status, _responseText, _headers);
|
|
899
891
|
});
|
|
900
892
|
}
|
|
901
893
|
else if (status === 403) {
|
|
902
894
|
return response.text().then(function (_responseText) {
|
|
903
|
-
return throwException("
|
|
895
|
+
return throwException("Forbidden", status, _responseText, _headers);
|
|
904
896
|
});
|
|
905
897
|
}
|
|
906
898
|
else if (status === 404) {
|
|
907
899
|
return response.text().then(function (_responseText) {
|
|
908
|
-
return throwException("
|
|
900
|
+
return throwException("NotFound", status, _responseText, _headers);
|
|
909
901
|
});
|
|
910
902
|
}
|
|
911
903
|
else if (status === 500) {
|
|
912
904
|
return response.text().then(function (_responseText) {
|
|
913
905
|
var result500 = null;
|
|
914
906
|
result500 = _responseText === "" ? null : JSON.parse(_responseText, _this.jsonParseReviver);
|
|
915
|
-
return throwException("
|
|
907
|
+
return throwException("General error", status, _responseText, _headers, result500);
|
|
916
908
|
});
|
|
917
909
|
}
|
|
918
910
|
else if (status !== 200 && status !== 204) {
|
|
@@ -924,7 +916,7 @@ var AuthClient = /** @class */ (function () {
|
|
|
924
916
|
};
|
|
925
917
|
/**
|
|
926
918
|
* Get all external SAML identity providers in tenant
|
|
927
|
-
* @tenantId Tenant Id
|
|
919
|
+
* @param tenantId Tenant Id
|
|
928
920
|
* @return OK
|
|
929
921
|
*/
|
|
930
922
|
AuthClient.prototype.getSamlProvidersInTenant = function (tenantId) {
|
|
@@ -936,10 +928,9 @@ var AuthClient = /** @class */ (function () {
|
|
|
936
928
|
url_ = url_.replace(/[?&]$/, "");
|
|
937
929
|
var options_ = {
|
|
938
930
|
method: "GET",
|
|
939
|
-
headers:
|
|
940
|
-
"Content-Type": "application/json",
|
|
931
|
+
headers: {
|
|
941
932
|
"Accept": "application/json"
|
|
942
|
-
}
|
|
933
|
+
}
|
|
943
934
|
};
|
|
944
935
|
return this.http.fetch(url_, options_).then(function (_response) {
|
|
945
936
|
return _this.processGetSamlProvidersInTenant(_response);
|
|
@@ -962,24 +953,24 @@ var AuthClient = /** @class */ (function () {
|
|
|
962
953
|
}
|
|
963
954
|
else if (status === 401) {
|
|
964
955
|
return response.text().then(function (_responseText) {
|
|
965
|
-
return throwException("
|
|
956
|
+
return throwException("Unauthorized", status, _responseText, _headers);
|
|
966
957
|
});
|
|
967
958
|
}
|
|
968
959
|
else if (status === 403) {
|
|
969
960
|
return response.text().then(function (_responseText) {
|
|
970
|
-
return throwException("
|
|
961
|
+
return throwException("Forbidden", status, _responseText, _headers);
|
|
971
962
|
});
|
|
972
963
|
}
|
|
973
964
|
else if (status === 404) {
|
|
974
965
|
return response.text().then(function (_responseText) {
|
|
975
|
-
return throwException("
|
|
966
|
+
return throwException("NotFound", status, _responseText, _headers);
|
|
976
967
|
});
|
|
977
968
|
}
|
|
978
969
|
else if (status === 500) {
|
|
979
970
|
return response.text().then(function (_responseText) {
|
|
980
971
|
var result500 = null;
|
|
981
972
|
result500 = _responseText === "" ? null : JSON.parse(_responseText, _this.jsonParseReviver);
|
|
982
|
-
return throwException("
|
|
973
|
+
return throwException("General error", status, _responseText, _headers, result500);
|
|
983
974
|
});
|
|
984
975
|
}
|
|
985
976
|
else if (status !== 200 && status !== 204) {
|
|
@@ -991,22 +982,25 @@ var AuthClient = /** @class */ (function () {
|
|
|
991
982
|
};
|
|
992
983
|
/**
|
|
993
984
|
* Get external SAML identity provider from tenant
|
|
994
|
-
* @tenantId Tenant Id
|
|
985
|
+
* @param tenantId Tenant Id
|
|
986
|
+
* @param samlProviderId SAML Provider Id
|
|
995
987
|
* @return OK
|
|
996
988
|
*/
|
|
997
|
-
AuthClient.prototype.getSamlProviderFromTenant = function (tenantId) {
|
|
989
|
+
AuthClient.prototype.getSamlProviderFromTenant = function (tenantId, samlProviderId) {
|
|
998
990
|
var _this = this;
|
|
999
991
|
var url_ = this.baseUrl + "/tenants/{tenantId}/externalidps/saml/{samlProviderId}";
|
|
1000
992
|
if (tenantId === undefined || tenantId === null)
|
|
1001
993
|
throw new Error("The parameter 'tenantId' must be defined.");
|
|
1002
994
|
url_ = url_.replace("{tenantId}", encodeURIComponent("" + tenantId));
|
|
995
|
+
if (samlProviderId === undefined || samlProviderId === null)
|
|
996
|
+
throw new Error("The parameter 'samlProviderId' must be defined.");
|
|
997
|
+
url_ = url_.replace("{samlProviderId}", encodeURIComponent("" + samlProviderId));
|
|
1003
998
|
url_ = url_.replace(/[?&]$/, "");
|
|
1004
999
|
var options_ = {
|
|
1005
1000
|
method: "GET",
|
|
1006
|
-
headers:
|
|
1007
|
-
"Content-Type": "application/json",
|
|
1001
|
+
headers: {
|
|
1008
1002
|
"Accept": "application/json"
|
|
1009
|
-
}
|
|
1003
|
+
}
|
|
1010
1004
|
};
|
|
1011
1005
|
return this.http.fetch(url_, options_).then(function (_response) {
|
|
1012
1006
|
return _this.processGetSamlProviderFromTenant(_response);
|
|
@@ -1029,24 +1023,24 @@ var AuthClient = /** @class */ (function () {
|
|
|
1029
1023
|
}
|
|
1030
1024
|
else if (status === 401) {
|
|
1031
1025
|
return response.text().then(function (_responseText) {
|
|
1032
|
-
return throwException("
|
|
1026
|
+
return throwException("Unauthorized", status, _responseText, _headers);
|
|
1033
1027
|
});
|
|
1034
1028
|
}
|
|
1035
1029
|
else if (status === 403) {
|
|
1036
1030
|
return response.text().then(function (_responseText) {
|
|
1037
|
-
return throwException("
|
|
1031
|
+
return throwException("Forbidden", status, _responseText, _headers);
|
|
1038
1032
|
});
|
|
1039
1033
|
}
|
|
1040
1034
|
else if (status === 404) {
|
|
1041
1035
|
return response.text().then(function (_responseText) {
|
|
1042
|
-
return throwException("
|
|
1036
|
+
return throwException("NotFound", status, _responseText, _headers);
|
|
1043
1037
|
});
|
|
1044
1038
|
}
|
|
1045
1039
|
else if (status === 500) {
|
|
1046
1040
|
return response.text().then(function (_responseText) {
|
|
1047
1041
|
var result500 = null;
|
|
1048
1042
|
result500 = _responseText === "" ? null : JSON.parse(_responseText, _this.jsonParseReviver);
|
|
1049
|
-
return throwException("
|
|
1043
|
+
return throwException("General error", status, _responseText, _headers, result500);
|
|
1050
1044
|
});
|
|
1051
1045
|
}
|
|
1052
1046
|
else if (status !== 200 && status !== 204) {
|
|
@@ -1058,23 +1052,27 @@ var AuthClient = /** @class */ (function () {
|
|
|
1058
1052
|
};
|
|
1059
1053
|
/**
|
|
1060
1054
|
* Update external SAML identity provider in tenant
|
|
1061
|
-
* @tenantId Tenant Id
|
|
1055
|
+
* @param tenantId Tenant Id
|
|
1056
|
+
* @param samlProviderId SAML Provider Id
|
|
1062
1057
|
* @return Updated
|
|
1063
1058
|
*/
|
|
1064
|
-
AuthClient.prototype.updateSamlProviderInTenant = function (body, tenantId) {
|
|
1059
|
+
AuthClient.prototype.updateSamlProviderInTenant = function (body, tenantId, samlProviderId) {
|
|
1065
1060
|
var _this = this;
|
|
1066
1061
|
var url_ = this.baseUrl + "/tenants/{tenantId}/externalidps/saml/{samlProviderId}";
|
|
1067
1062
|
if (tenantId === undefined || tenantId === null)
|
|
1068
1063
|
throw new Error("The parameter 'tenantId' must be defined.");
|
|
1069
1064
|
url_ = url_.replace("{tenantId}", encodeURIComponent("" + tenantId));
|
|
1065
|
+
if (samlProviderId === undefined || samlProviderId === null)
|
|
1066
|
+
throw new Error("The parameter 'samlProviderId' must be defined.");
|
|
1067
|
+
url_ = url_.replace("{samlProviderId}", encodeURIComponent("" + samlProviderId));
|
|
1070
1068
|
url_ = url_.replace(/[?&]$/, "");
|
|
1071
1069
|
var content_ = JSON.stringify(body);
|
|
1072
1070
|
var options_ = {
|
|
1073
1071
|
body: content_,
|
|
1074
1072
|
method: "PUT",
|
|
1075
|
-
headers:
|
|
1073
|
+
headers: {
|
|
1076
1074
|
"Content-Type": "application/json",
|
|
1077
|
-
}
|
|
1075
|
+
}
|
|
1078
1076
|
};
|
|
1079
1077
|
return this.http.fetch(url_, options_).then(function (_response) {
|
|
1080
1078
|
return _this.processUpdateSamlProviderInTenant(_response);
|
|
@@ -1095,24 +1093,24 @@ var AuthClient = /** @class */ (function () {
|
|
|
1095
1093
|
}
|
|
1096
1094
|
else if (status === 401) {
|
|
1097
1095
|
return response.text().then(function (_responseText) {
|
|
1098
|
-
return throwException("
|
|
1096
|
+
return throwException("Unauthorized", status, _responseText, _headers);
|
|
1099
1097
|
});
|
|
1100
1098
|
}
|
|
1101
1099
|
else if (status === 403) {
|
|
1102
1100
|
return response.text().then(function (_responseText) {
|
|
1103
|
-
return throwException("
|
|
1101
|
+
return throwException("Forbidden", status, _responseText, _headers);
|
|
1104
1102
|
});
|
|
1105
1103
|
}
|
|
1106
1104
|
else if (status === 404) {
|
|
1107
1105
|
return response.text().then(function (_responseText) {
|
|
1108
|
-
return throwException("
|
|
1106
|
+
return throwException("NotFound", status, _responseText, _headers);
|
|
1109
1107
|
});
|
|
1110
1108
|
}
|
|
1111
1109
|
else if (status === 500) {
|
|
1112
1110
|
return response.text().then(function (_responseText) {
|
|
1113
1111
|
var result500 = null;
|
|
1114
1112
|
result500 = _responseText === "" ? null : JSON.parse(_responseText, _this.jsonParseReviver);
|
|
1115
|
-
return throwException("
|
|
1113
|
+
return throwException("General error", status, _responseText, _headers, result500);
|
|
1116
1114
|
});
|
|
1117
1115
|
}
|
|
1118
1116
|
else if (status !== 200 && status !== 204) {
|
|
@@ -1124,21 +1122,23 @@ var AuthClient = /** @class */ (function () {
|
|
|
1124
1122
|
};
|
|
1125
1123
|
/**
|
|
1126
1124
|
* Delete external SAML identity provider from tenant
|
|
1127
|
-
* @tenantId Tenant Id
|
|
1125
|
+
* @param tenantId Tenant Id
|
|
1126
|
+
* @param samlProviderId SAML Provider Id
|
|
1128
1127
|
* @return Deleted
|
|
1129
1128
|
*/
|
|
1130
|
-
AuthClient.prototype.deleteSamlProviderFromTenant = function (tenantId) {
|
|
1129
|
+
AuthClient.prototype.deleteSamlProviderFromTenant = function (tenantId, samlProviderId) {
|
|
1131
1130
|
var _this = this;
|
|
1132
1131
|
var url_ = this.baseUrl + "/tenants/{tenantId}/externalidps/saml/{samlProviderId}";
|
|
1133
1132
|
if (tenantId === undefined || tenantId === null)
|
|
1134
1133
|
throw new Error("The parameter 'tenantId' must be defined.");
|
|
1135
1134
|
url_ = url_.replace("{tenantId}", encodeURIComponent("" + tenantId));
|
|
1135
|
+
if (samlProviderId === undefined || samlProviderId === null)
|
|
1136
|
+
throw new Error("The parameter 'samlProviderId' must be defined.");
|
|
1137
|
+
url_ = url_.replace("{samlProviderId}", encodeURIComponent("" + samlProviderId));
|
|
1136
1138
|
url_ = url_.replace(/[?&]$/, "");
|
|
1137
1139
|
var options_ = {
|
|
1138
1140
|
method: "DELETE",
|
|
1139
|
-
headers:
|
|
1140
|
-
"Content-Type": "application/json",
|
|
1141
|
-
})
|
|
1141
|
+
headers: {}
|
|
1142
1142
|
};
|
|
1143
1143
|
return this.http.fetch(url_, options_).then(function (_response) {
|
|
1144
1144
|
return _this.processDeleteSamlProviderFromTenant(_response);
|
|
@@ -1159,24 +1159,24 @@ var AuthClient = /** @class */ (function () {
|
|
|
1159
1159
|
}
|
|
1160
1160
|
else if (status === 401) {
|
|
1161
1161
|
return response.text().then(function (_responseText) {
|
|
1162
|
-
return throwException("
|
|
1162
|
+
return throwException("Unauthorized", status, _responseText, _headers);
|
|
1163
1163
|
});
|
|
1164
1164
|
}
|
|
1165
1165
|
else if (status === 403) {
|
|
1166
1166
|
return response.text().then(function (_responseText) {
|
|
1167
|
-
return throwException("
|
|
1167
|
+
return throwException("Forbidden", status, _responseText, _headers);
|
|
1168
1168
|
});
|
|
1169
1169
|
}
|
|
1170
1170
|
else if (status === 404) {
|
|
1171
1171
|
return response.text().then(function (_responseText) {
|
|
1172
|
-
return throwException("
|
|
1172
|
+
return throwException("NotFound", status, _responseText, _headers);
|
|
1173
1173
|
});
|
|
1174
1174
|
}
|
|
1175
1175
|
else if (status === 500) {
|
|
1176
1176
|
return response.text().then(function (_responseText) {
|
|
1177
1177
|
var result500 = null;
|
|
1178
1178
|
result500 = _responseText === "" ? null : JSON.parse(_responseText, _this.jsonParseReviver);
|
|
1179
|
-
return throwException("
|
|
1179
|
+
return throwException("General error", status, _responseText, _headers, result500);
|
|
1180
1180
|
});
|
|
1181
1181
|
}
|
|
1182
1182
|
else if (status !== 200 && status !== 204) {
|
|
@@ -1188,7 +1188,7 @@ var AuthClient = /** @class */ (function () {
|
|
|
1188
1188
|
};
|
|
1189
1189
|
/**
|
|
1190
1190
|
* Create new external SSO profile in tenant
|
|
1191
|
-
* @tenantId Tenant Id
|
|
1191
|
+
* @param tenantId Tenant Id
|
|
1192
1192
|
* @return Created
|
|
1193
1193
|
*/
|
|
1194
1194
|
AuthClient.prototype.createSsoProfileInTenant = function (body, tenantId) {
|
|
@@ -1202,10 +1202,10 @@ var AuthClient = /** @class */ (function () {
|
|
|
1202
1202
|
var options_ = {
|
|
1203
1203
|
body: content_,
|
|
1204
1204
|
method: "POST",
|
|
1205
|
-
headers:
|
|
1205
|
+
headers: {
|
|
1206
1206
|
"Content-Type": "application/json",
|
|
1207
1207
|
"Accept": "application/json"
|
|
1208
|
-
}
|
|
1208
|
+
}
|
|
1209
1209
|
};
|
|
1210
1210
|
return this.http.fetch(url_, options_).then(function (_response) {
|
|
1211
1211
|
return _this.processCreateSsoProfileInTenant(_response);
|
|
@@ -1228,24 +1228,24 @@ var AuthClient = /** @class */ (function () {
|
|
|
1228
1228
|
}
|
|
1229
1229
|
else if (status === 401) {
|
|
1230
1230
|
return response.text().then(function (_responseText) {
|
|
1231
|
-
return throwException("
|
|
1231
|
+
return throwException("Unauthorized", status, _responseText, _headers);
|
|
1232
1232
|
});
|
|
1233
1233
|
}
|
|
1234
1234
|
else if (status === 403) {
|
|
1235
1235
|
return response.text().then(function (_responseText) {
|
|
1236
|
-
return throwException("
|
|
1236
|
+
return throwException("Forbidden", status, _responseText, _headers);
|
|
1237
1237
|
});
|
|
1238
1238
|
}
|
|
1239
1239
|
else if (status === 404) {
|
|
1240
1240
|
return response.text().then(function (_responseText) {
|
|
1241
|
-
return throwException("
|
|
1241
|
+
return throwException("NotFound", status, _responseText, _headers);
|
|
1242
1242
|
});
|
|
1243
1243
|
}
|
|
1244
1244
|
else if (status === 500) {
|
|
1245
1245
|
return response.text().then(function (_responseText) {
|
|
1246
1246
|
var result500 = null;
|
|
1247
1247
|
result500 = _responseText === "" ? null : JSON.parse(_responseText, _this.jsonParseReviver);
|
|
1248
|
-
return throwException("
|
|
1248
|
+
return throwException("General error", status, _responseText, _headers, result500);
|
|
1249
1249
|
});
|
|
1250
1250
|
}
|
|
1251
1251
|
else if (status !== 200 && status !== 204) {
|
|
@@ -1257,22 +1257,25 @@ var AuthClient = /** @class */ (function () {
|
|
|
1257
1257
|
};
|
|
1258
1258
|
/**
|
|
1259
1259
|
* Get external SSO profile from tenant
|
|
1260
|
-
* @tenantId Tenant Id
|
|
1260
|
+
* @param tenantId Tenant Id
|
|
1261
|
+
* @param ssoProfileId External SSO Profile Id
|
|
1261
1262
|
* @return OK
|
|
1262
1263
|
*/
|
|
1263
|
-
AuthClient.prototype.getSsoProfileFromTenant = function (tenantId) {
|
|
1264
|
+
AuthClient.prototype.getSsoProfileFromTenant = function (tenantId, ssoProfileId) {
|
|
1264
1265
|
var _this = this;
|
|
1265
1266
|
var url_ = this.baseUrl + "/tenants/{tenantId}/externalssoprofiles/{ssoProfileId}";
|
|
1266
1267
|
if (tenantId === undefined || tenantId === null)
|
|
1267
1268
|
throw new Error("The parameter 'tenantId' must be defined.");
|
|
1268
1269
|
url_ = url_.replace("{tenantId}", encodeURIComponent("" + tenantId));
|
|
1270
|
+
if (ssoProfileId === undefined || ssoProfileId === null)
|
|
1271
|
+
throw new Error("The parameter 'ssoProfileId' must be defined.");
|
|
1272
|
+
url_ = url_.replace("{ssoProfileId}", encodeURIComponent("" + ssoProfileId));
|
|
1269
1273
|
url_ = url_.replace(/[?&]$/, "");
|
|
1270
1274
|
var options_ = {
|
|
1271
1275
|
method: "GET",
|
|
1272
|
-
headers:
|
|
1273
|
-
"Content-Type": "application/json",
|
|
1276
|
+
headers: {
|
|
1274
1277
|
"Accept": "application/json"
|
|
1275
|
-
}
|
|
1278
|
+
}
|
|
1276
1279
|
};
|
|
1277
1280
|
return this.http.fetch(url_, options_).then(function (_response) {
|
|
1278
1281
|
return _this.processGetSsoProfileFromTenant(_response);
|
|
@@ -1295,24 +1298,24 @@ var AuthClient = /** @class */ (function () {
|
|
|
1295
1298
|
}
|
|
1296
1299
|
else if (status === 401) {
|
|
1297
1300
|
return response.text().then(function (_responseText) {
|
|
1298
|
-
return throwException("
|
|
1301
|
+
return throwException("Unauthorized", status, _responseText, _headers);
|
|
1299
1302
|
});
|
|
1300
1303
|
}
|
|
1301
1304
|
else if (status === 403) {
|
|
1302
1305
|
return response.text().then(function (_responseText) {
|
|
1303
|
-
return throwException("
|
|
1306
|
+
return throwException("Forbidden", status, _responseText, _headers);
|
|
1304
1307
|
});
|
|
1305
1308
|
}
|
|
1306
1309
|
else if (status === 404) {
|
|
1307
1310
|
return response.text().then(function (_responseText) {
|
|
1308
|
-
return throwException("
|
|
1311
|
+
return throwException("NotFound", status, _responseText, _headers);
|
|
1309
1312
|
});
|
|
1310
1313
|
}
|
|
1311
1314
|
else if (status === 500) {
|
|
1312
1315
|
return response.text().then(function (_responseText) {
|
|
1313
1316
|
var result500 = null;
|
|
1314
1317
|
result500 = _responseText === "" ? null : JSON.parse(_responseText, _this.jsonParseReviver);
|
|
1315
|
-
return throwException("
|
|
1318
|
+
return throwException("General error", status, _responseText, _headers, result500);
|
|
1316
1319
|
});
|
|
1317
1320
|
}
|
|
1318
1321
|
else if (status !== 200 && status !== 204) {
|
|
@@ -1324,23 +1327,27 @@ var AuthClient = /** @class */ (function () {
|
|
|
1324
1327
|
};
|
|
1325
1328
|
/**
|
|
1326
1329
|
* Update external SSO profile in tenant
|
|
1327
|
-
* @tenantId Tenant Id
|
|
1330
|
+
* @param tenantId Tenant Id
|
|
1331
|
+
* @param ssoProfileId External SSO Profile Id
|
|
1328
1332
|
* @return Updated
|
|
1329
1333
|
*/
|
|
1330
|
-
AuthClient.prototype.updateSsoProfileInTenant = function (body, tenantId) {
|
|
1334
|
+
AuthClient.prototype.updateSsoProfileInTenant = function (body, tenantId, ssoProfileId) {
|
|
1331
1335
|
var _this = this;
|
|
1332
1336
|
var url_ = this.baseUrl + "/tenants/{tenantId}/externalssoprofiles/{ssoProfileId}";
|
|
1333
1337
|
if (tenantId === undefined || tenantId === null)
|
|
1334
1338
|
throw new Error("The parameter 'tenantId' must be defined.");
|
|
1335
1339
|
url_ = url_.replace("{tenantId}", encodeURIComponent("" + tenantId));
|
|
1340
|
+
if (ssoProfileId === undefined || ssoProfileId === null)
|
|
1341
|
+
throw new Error("The parameter 'ssoProfileId' must be defined.");
|
|
1342
|
+
url_ = url_.replace("{ssoProfileId}", encodeURIComponent("" + ssoProfileId));
|
|
1336
1343
|
url_ = url_.replace(/[?&]$/, "");
|
|
1337
1344
|
var content_ = JSON.stringify(body);
|
|
1338
1345
|
var options_ = {
|
|
1339
1346
|
body: content_,
|
|
1340
1347
|
method: "PUT",
|
|
1341
|
-
headers:
|
|
1348
|
+
headers: {
|
|
1342
1349
|
"Content-Type": "application/json",
|
|
1343
|
-
}
|
|
1350
|
+
}
|
|
1344
1351
|
};
|
|
1345
1352
|
return this.http.fetch(url_, options_).then(function (_response) {
|
|
1346
1353
|
return _this.processUpdateSsoProfileInTenant(_response);
|
|
@@ -1361,24 +1368,24 @@ var AuthClient = /** @class */ (function () {
|
|
|
1361
1368
|
}
|
|
1362
1369
|
else if (status === 401) {
|
|
1363
1370
|
return response.text().then(function (_responseText) {
|
|
1364
|
-
return throwException("
|
|
1371
|
+
return throwException("Unauthorized", status, _responseText, _headers);
|
|
1365
1372
|
});
|
|
1366
1373
|
}
|
|
1367
1374
|
else if (status === 403) {
|
|
1368
1375
|
return response.text().then(function (_responseText) {
|
|
1369
|
-
return throwException("
|
|
1376
|
+
return throwException("Forbidden", status, _responseText, _headers);
|
|
1370
1377
|
});
|
|
1371
1378
|
}
|
|
1372
1379
|
else if (status === 404) {
|
|
1373
1380
|
return response.text().then(function (_responseText) {
|
|
1374
|
-
return throwException("
|
|
1381
|
+
return throwException("NotFound", status, _responseText, _headers);
|
|
1375
1382
|
});
|
|
1376
1383
|
}
|
|
1377
1384
|
else if (status === 500) {
|
|
1378
1385
|
return response.text().then(function (_responseText) {
|
|
1379
1386
|
var result500 = null;
|
|
1380
1387
|
result500 = _responseText === "" ? null : JSON.parse(_responseText, _this.jsonParseReviver);
|
|
1381
|
-
return throwException("
|
|
1388
|
+
return throwException("General error", status, _responseText, _headers, result500);
|
|
1382
1389
|
});
|
|
1383
1390
|
}
|
|
1384
1391
|
else if (status !== 200 && status !== 204) {
|
|
@@ -1390,21 +1397,23 @@ var AuthClient = /** @class */ (function () {
|
|
|
1390
1397
|
};
|
|
1391
1398
|
/**
|
|
1392
1399
|
* Delete external SSO profile from tenant
|
|
1393
|
-
* @tenantId Tenant Id
|
|
1400
|
+
* @param tenantId Tenant Id
|
|
1401
|
+
* @param ssoProfileId External SSO Profile Id
|
|
1394
1402
|
* @return Deleted
|
|
1395
1403
|
*/
|
|
1396
|
-
AuthClient.prototype.deleteSsoProfileFromTenant = function (tenantId) {
|
|
1404
|
+
AuthClient.prototype.deleteSsoProfileFromTenant = function (tenantId, ssoProfileId) {
|
|
1397
1405
|
var _this = this;
|
|
1398
1406
|
var url_ = this.baseUrl + "/tenants/{tenantId}/externalssoprofiles/{ssoProfileId}";
|
|
1399
1407
|
if (tenantId === undefined || tenantId === null)
|
|
1400
1408
|
throw new Error("The parameter 'tenantId' must be defined.");
|
|
1401
1409
|
url_ = url_.replace("{tenantId}", encodeURIComponent("" + tenantId));
|
|
1410
|
+
if (ssoProfileId === undefined || ssoProfileId === null)
|
|
1411
|
+
throw new Error("The parameter 'ssoProfileId' must be defined.");
|
|
1412
|
+
url_ = url_.replace("{ssoProfileId}", encodeURIComponent("" + ssoProfileId));
|
|
1402
1413
|
url_ = url_.replace(/[?&]$/, "");
|
|
1403
1414
|
var options_ = {
|
|
1404
1415
|
method: "DELETE",
|
|
1405
|
-
headers:
|
|
1406
|
-
"Content-Type": "application/json",
|
|
1407
|
-
})
|
|
1416
|
+
headers: {}
|
|
1408
1417
|
};
|
|
1409
1418
|
return this.http.fetch(url_, options_).then(function (_response) {
|
|
1410
1419
|
return _this.processDeleteSsoProfileFromTenant(_response);
|
|
@@ -1425,24 +1434,24 @@ var AuthClient = /** @class */ (function () {
|
|
|
1425
1434
|
}
|
|
1426
1435
|
else if (status === 401) {
|
|
1427
1436
|
return response.text().then(function (_responseText) {
|
|
1428
|
-
return throwException("
|
|
1437
|
+
return throwException("Unauthorized", status, _responseText, _headers);
|
|
1429
1438
|
});
|
|
1430
1439
|
}
|
|
1431
1440
|
else if (status === 403) {
|
|
1432
1441
|
return response.text().then(function (_responseText) {
|
|
1433
|
-
return throwException("
|
|
1442
|
+
return throwException("Forbidden", status, _responseText, _headers);
|
|
1434
1443
|
});
|
|
1435
1444
|
}
|
|
1436
1445
|
else if (status === 404) {
|
|
1437
1446
|
return response.text().then(function (_responseText) {
|
|
1438
|
-
return throwException("
|
|
1447
|
+
return throwException("NotFound", status, _responseText, _headers);
|
|
1439
1448
|
});
|
|
1440
1449
|
}
|
|
1441
1450
|
else if (status === 500) {
|
|
1442
1451
|
return response.text().then(function (_responseText) {
|
|
1443
1452
|
var result500 = null;
|
|
1444
1453
|
result500 = _responseText === "" ? null : JSON.parse(_responseText, _this.jsonParseReviver);
|
|
1445
|
-
return throwException("
|
|
1454
|
+
return throwException("General error", status, _responseText, _headers, result500);
|
|
1446
1455
|
});
|
|
1447
1456
|
}
|
|
1448
1457
|
else if (status !== 200 && status !== 204) {
|
|
@@ -1464,10 +1473,10 @@ var AuthClient = /** @class */ (function () {
|
|
|
1464
1473
|
var options_ = {
|
|
1465
1474
|
body: content_,
|
|
1466
1475
|
method: "POST",
|
|
1467
|
-
headers:
|
|
1476
|
+
headers: {
|
|
1468
1477
|
"Content-Type": "application/json",
|
|
1469
1478
|
"Accept": "application/json"
|
|
1470
|
-
}
|
|
1479
|
+
}
|
|
1471
1480
|
};
|
|
1472
1481
|
return this.http.fetch(url_, options_).then(function (_response) {
|
|
1473
1482
|
return _this.processCreateClient(_response);
|
|
@@ -1490,19 +1499,19 @@ var AuthClient = /** @class */ (function () {
|
|
|
1490
1499
|
}
|
|
1491
1500
|
else if (status === 401) {
|
|
1492
1501
|
return response.text().then(function (_responseText) {
|
|
1493
|
-
return throwException("
|
|
1502
|
+
return throwException("Unauthorized", status, _responseText, _headers);
|
|
1494
1503
|
});
|
|
1495
1504
|
}
|
|
1496
1505
|
else if (status === 403) {
|
|
1497
1506
|
return response.text().then(function (_responseText) {
|
|
1498
|
-
return throwException("
|
|
1507
|
+
return throwException("Forbidden", status, _responseText, _headers);
|
|
1499
1508
|
});
|
|
1500
1509
|
}
|
|
1501
1510
|
else if (status === 500) {
|
|
1502
1511
|
return response.text().then(function (_responseText) {
|
|
1503
1512
|
var result500 = null;
|
|
1504
1513
|
result500 = _responseText === "" ? null : JSON.parse(_responseText, _this.jsonParseReviver);
|
|
1505
|
-
return throwException("
|
|
1514
|
+
return throwException("General error", status, _responseText, _headers, result500);
|
|
1506
1515
|
});
|
|
1507
1516
|
}
|
|
1508
1517
|
else if (status !== 200 && status !== 204) {
|
|
@@ -1514,7 +1523,7 @@ var AuthClient = /** @class */ (function () {
|
|
|
1514
1523
|
};
|
|
1515
1524
|
/**
|
|
1516
1525
|
* Update client
|
|
1517
|
-
* @clientId Client Id
|
|
1526
|
+
* @param clientId Client Id
|
|
1518
1527
|
* @return Updated
|
|
1519
1528
|
*/
|
|
1520
1529
|
AuthClient.prototype.updateClient = function (body, clientId) {
|
|
@@ -1528,9 +1537,9 @@ var AuthClient = /** @class */ (function () {
|
|
|
1528
1537
|
var options_ = {
|
|
1529
1538
|
body: content_,
|
|
1530
1539
|
method: "PUT",
|
|
1531
|
-
headers:
|
|
1540
|
+
headers: {
|
|
1532
1541
|
"Content-Type": "application/json",
|
|
1533
|
-
}
|
|
1542
|
+
}
|
|
1534
1543
|
};
|
|
1535
1544
|
return this.http.fetch(url_, options_).then(function (_response) {
|
|
1536
1545
|
return _this.processUpdateClient(_response);
|
|
@@ -1551,24 +1560,24 @@ var AuthClient = /** @class */ (function () {
|
|
|
1551
1560
|
}
|
|
1552
1561
|
else if (status === 401) {
|
|
1553
1562
|
return response.text().then(function (_responseText) {
|
|
1554
|
-
return throwException("
|
|
1563
|
+
return throwException("Unauthorized", status, _responseText, _headers);
|
|
1555
1564
|
});
|
|
1556
1565
|
}
|
|
1557
1566
|
else if (status === 403) {
|
|
1558
1567
|
return response.text().then(function (_responseText) {
|
|
1559
|
-
return throwException("
|
|
1568
|
+
return throwException("Forbidden", status, _responseText, _headers);
|
|
1560
1569
|
});
|
|
1561
1570
|
}
|
|
1562
1571
|
else if (status === 404) {
|
|
1563
1572
|
return response.text().then(function (_responseText) {
|
|
1564
|
-
return throwException("
|
|
1573
|
+
return throwException("NotFound", status, _responseText, _headers);
|
|
1565
1574
|
});
|
|
1566
1575
|
}
|
|
1567
1576
|
else if (status === 500) {
|
|
1568
1577
|
return response.text().then(function (_responseText) {
|
|
1569
1578
|
var result500 = null;
|
|
1570
1579
|
result500 = _responseText === "" ? null : JSON.parse(_responseText, _this.jsonParseReviver);
|
|
1571
|
-
return throwException("
|
|
1580
|
+
return throwException("General error", status, _responseText, _headers, result500);
|
|
1572
1581
|
});
|
|
1573
1582
|
}
|
|
1574
1583
|
else if (status !== 200 && status !== 204) {
|
|
@@ -1580,7 +1589,7 @@ var AuthClient = /** @class */ (function () {
|
|
|
1580
1589
|
};
|
|
1581
1590
|
/**
|
|
1582
1591
|
* Get client
|
|
1583
|
-
* @clientId Client Id
|
|
1592
|
+
* @param clientId Client Id
|
|
1584
1593
|
* @return OK
|
|
1585
1594
|
*/
|
|
1586
1595
|
AuthClient.prototype.getClient = function (clientId) {
|
|
@@ -1592,10 +1601,9 @@ var AuthClient = /** @class */ (function () {
|
|
|
1592
1601
|
url_ = url_.replace(/[?&]$/, "");
|
|
1593
1602
|
var options_ = {
|
|
1594
1603
|
method: "GET",
|
|
1595
|
-
headers:
|
|
1596
|
-
"Content-Type": "application/json",
|
|
1604
|
+
headers: {
|
|
1597
1605
|
"Accept": "application/json"
|
|
1598
|
-
}
|
|
1606
|
+
}
|
|
1599
1607
|
};
|
|
1600
1608
|
return this.http.fetch(url_, options_).then(function (_response) {
|
|
1601
1609
|
return _this.processGetClient(_response);
|
|
@@ -1618,24 +1626,24 @@ var AuthClient = /** @class */ (function () {
|
|
|
1618
1626
|
}
|
|
1619
1627
|
else if (status === 401) {
|
|
1620
1628
|
return response.text().then(function (_responseText) {
|
|
1621
|
-
return throwException("
|
|
1629
|
+
return throwException("Unauthorized", status, _responseText, _headers);
|
|
1622
1630
|
});
|
|
1623
1631
|
}
|
|
1624
1632
|
else if (status === 403) {
|
|
1625
1633
|
return response.text().then(function (_responseText) {
|
|
1626
|
-
return throwException("
|
|
1634
|
+
return throwException("Forbidden", status, _responseText, _headers);
|
|
1627
1635
|
});
|
|
1628
1636
|
}
|
|
1629
1637
|
else if (status === 404) {
|
|
1630
1638
|
return response.text().then(function (_responseText) {
|
|
1631
|
-
return throwException("
|
|
1639
|
+
return throwException("NotFound", status, _responseText, _headers);
|
|
1632
1640
|
});
|
|
1633
1641
|
}
|
|
1634
1642
|
else if (status === 500) {
|
|
1635
1643
|
return response.text().then(function (_responseText) {
|
|
1636
1644
|
var result500 = null;
|
|
1637
1645
|
result500 = _responseText === "" ? null : JSON.parse(_responseText, _this.jsonParseReviver);
|
|
1638
|
-
return throwException("
|
|
1646
|
+
return throwException("General error", status, _responseText, _headers, result500);
|
|
1639
1647
|
});
|
|
1640
1648
|
}
|
|
1641
1649
|
else if (status !== 200 && status !== 204) {
|
|
@@ -1647,7 +1655,7 @@ var AuthClient = /** @class */ (function () {
|
|
|
1647
1655
|
};
|
|
1648
1656
|
/**
|
|
1649
1657
|
* Delete client
|
|
1650
|
-
* @clientId Client Id
|
|
1658
|
+
* @param clientId Client Id
|
|
1651
1659
|
* @return Deleted
|
|
1652
1660
|
*/
|
|
1653
1661
|
AuthClient.prototype.deleteClient = function (clientId) {
|
|
@@ -1659,9 +1667,7 @@ var AuthClient = /** @class */ (function () {
|
|
|
1659
1667
|
url_ = url_.replace(/[?&]$/, "");
|
|
1660
1668
|
var options_ = {
|
|
1661
1669
|
method: "DELETE",
|
|
1662
|
-
headers:
|
|
1663
|
-
"Content-Type": "application/json",
|
|
1664
|
-
})
|
|
1670
|
+
headers: {}
|
|
1665
1671
|
};
|
|
1666
1672
|
return this.http.fetch(url_, options_).then(function (_response) {
|
|
1667
1673
|
return _this.processDeleteClient(_response);
|
|
@@ -1682,24 +1688,24 @@ var AuthClient = /** @class */ (function () {
|
|
|
1682
1688
|
}
|
|
1683
1689
|
else if (status === 401) {
|
|
1684
1690
|
return response.text().then(function (_responseText) {
|
|
1685
|
-
return throwException("
|
|
1691
|
+
return throwException("Unauthorized", status, _responseText, _headers);
|
|
1686
1692
|
});
|
|
1687
1693
|
}
|
|
1688
1694
|
else if (status === 403) {
|
|
1689
1695
|
return response.text().then(function (_responseText) {
|
|
1690
|
-
return throwException("
|
|
1696
|
+
return throwException("Forbidden", status, _responseText, _headers);
|
|
1691
1697
|
});
|
|
1692
1698
|
}
|
|
1693
1699
|
else if (status === 404) {
|
|
1694
1700
|
return response.text().then(function (_responseText) {
|
|
1695
|
-
return throwException("
|
|
1701
|
+
return throwException("NotFound", status, _responseText, _headers);
|
|
1696
1702
|
});
|
|
1697
1703
|
}
|
|
1698
1704
|
else if (status === 500) {
|
|
1699
1705
|
return response.text().then(function (_responseText) {
|
|
1700
1706
|
var result500 = null;
|
|
1701
1707
|
result500 = _responseText === "" ? null : JSON.parse(_responseText, _this.jsonParseReviver);
|
|
1702
|
-
return throwException("
|
|
1708
|
+
return throwException("General error", status, _responseText, _headers, result500);
|
|
1703
1709
|
});
|
|
1704
1710
|
}
|
|
1705
1711
|
else if (status !== 200 && status !== 204) {
|
|
@@ -1719,10 +1725,9 @@ var AuthClient = /** @class */ (function () {
|
|
|
1719
1725
|
url_ = url_.replace(/[?&]$/, "");
|
|
1720
1726
|
var options_ = {
|
|
1721
1727
|
method: "GET",
|
|
1722
|
-
headers:
|
|
1723
|
-
"Content-Type": "application/json",
|
|
1728
|
+
headers: {
|
|
1724
1729
|
"Accept": "application/json"
|
|
1725
|
-
}
|
|
1730
|
+
}
|
|
1726
1731
|
};
|
|
1727
1732
|
return this.http.fetch(url_, options_).then(function (_response) {
|
|
1728
1733
|
return _this.processGetApiResources(_response);
|
|
@@ -1745,19 +1750,19 @@ var AuthClient = /** @class */ (function () {
|
|
|
1745
1750
|
}
|
|
1746
1751
|
else if (status === 401) {
|
|
1747
1752
|
return response.text().then(function (_responseText) {
|
|
1748
|
-
return throwException("
|
|
1753
|
+
return throwException("Unauthorized", status, _responseText, _headers);
|
|
1749
1754
|
});
|
|
1750
1755
|
}
|
|
1751
1756
|
else if (status === 403) {
|
|
1752
1757
|
return response.text().then(function (_responseText) {
|
|
1753
|
-
return throwException("
|
|
1758
|
+
return throwException("Forbidden", status, _responseText, _headers);
|
|
1754
1759
|
});
|
|
1755
1760
|
}
|
|
1756
1761
|
else if (status === 500) {
|
|
1757
1762
|
return response.text().then(function (_responseText) {
|
|
1758
1763
|
var result500 = null;
|
|
1759
1764
|
result500 = _responseText === "" ? null : JSON.parse(_responseText, _this.jsonParseReviver);
|
|
1760
|
-
return throwException("
|
|
1765
|
+
return throwException("General error", status, _responseText, _headers, result500);
|
|
1761
1766
|
});
|
|
1762
1767
|
}
|
|
1763
1768
|
else if (status !== 200 && status !== 204) {
|
|
@@ -1779,10 +1784,10 @@ var AuthClient = /** @class */ (function () {
|
|
|
1779
1784
|
var options_ = {
|
|
1780
1785
|
body: content_,
|
|
1781
1786
|
method: "POST",
|
|
1782
|
-
headers:
|
|
1787
|
+
headers: {
|
|
1783
1788
|
"Content-Type": "application/json",
|
|
1784
1789
|
"Accept": "application/json"
|
|
1785
|
-
}
|
|
1790
|
+
}
|
|
1786
1791
|
};
|
|
1787
1792
|
return this.http.fetch(url_, options_).then(function (_response) {
|
|
1788
1793
|
return _this.processCreateApiResource(_response);
|
|
@@ -1805,19 +1810,19 @@ var AuthClient = /** @class */ (function () {
|
|
|
1805
1810
|
}
|
|
1806
1811
|
else if (status === 401) {
|
|
1807
1812
|
return response.text().then(function (_responseText) {
|
|
1808
|
-
return throwException("
|
|
1813
|
+
return throwException("Unauthorized", status, _responseText, _headers);
|
|
1809
1814
|
});
|
|
1810
1815
|
}
|
|
1811
1816
|
else if (status === 403) {
|
|
1812
1817
|
return response.text().then(function (_responseText) {
|
|
1813
|
-
return throwException("
|
|
1818
|
+
return throwException("Forbidden", status, _responseText, _headers);
|
|
1814
1819
|
});
|
|
1815
1820
|
}
|
|
1816
1821
|
else if (status === 500) {
|
|
1817
1822
|
return response.text().then(function (_responseText) {
|
|
1818
1823
|
var result500 = null;
|
|
1819
1824
|
result500 = _responseText === "" ? null : JSON.parse(_responseText, _this.jsonParseReviver);
|
|
1820
|
-
return throwException("
|
|
1825
|
+
return throwException("General error", status, _responseText, _headers, result500);
|
|
1821
1826
|
});
|
|
1822
1827
|
}
|
|
1823
1828
|
else if (status !== 200 && status !== 204) {
|
|
@@ -1829,7 +1834,7 @@ var AuthClient = /** @class */ (function () {
|
|
|
1829
1834
|
};
|
|
1830
1835
|
/**
|
|
1831
1836
|
* Get api resource
|
|
1832
|
-
* @resourceName Api resource name
|
|
1837
|
+
* @param resourceName Api resource name
|
|
1833
1838
|
* @return OK
|
|
1834
1839
|
*/
|
|
1835
1840
|
AuthClient.prototype.getApiResource = function (resourceName) {
|
|
@@ -1841,10 +1846,9 @@ var AuthClient = /** @class */ (function () {
|
|
|
1841
1846
|
url_ = url_.replace(/[?&]$/, "");
|
|
1842
1847
|
var options_ = {
|
|
1843
1848
|
method: "GET",
|
|
1844
|
-
headers:
|
|
1845
|
-
"Content-Type": "application/json",
|
|
1849
|
+
headers: {
|
|
1846
1850
|
"Accept": "application/json"
|
|
1847
|
-
}
|
|
1851
|
+
}
|
|
1848
1852
|
};
|
|
1849
1853
|
return this.http.fetch(url_, options_).then(function (_response) {
|
|
1850
1854
|
return _this.processGetApiResource(_response);
|
|
@@ -1867,24 +1871,24 @@ var AuthClient = /** @class */ (function () {
|
|
|
1867
1871
|
}
|
|
1868
1872
|
else if (status === 401) {
|
|
1869
1873
|
return response.text().then(function (_responseText) {
|
|
1870
|
-
return throwException("
|
|
1874
|
+
return throwException("Unauthorized", status, _responseText, _headers);
|
|
1871
1875
|
});
|
|
1872
1876
|
}
|
|
1873
1877
|
else if (status === 403) {
|
|
1874
1878
|
return response.text().then(function (_responseText) {
|
|
1875
|
-
return throwException("
|
|
1879
|
+
return throwException("Forbidden", status, _responseText, _headers);
|
|
1876
1880
|
});
|
|
1877
1881
|
}
|
|
1878
1882
|
else if (status === 404) {
|
|
1879
1883
|
return response.text().then(function (_responseText) {
|
|
1880
|
-
return throwException("
|
|
1884
|
+
return throwException("NotFound", status, _responseText, _headers);
|
|
1881
1885
|
});
|
|
1882
1886
|
}
|
|
1883
1887
|
else if (status === 500) {
|
|
1884
1888
|
return response.text().then(function (_responseText) {
|
|
1885
1889
|
var result500 = null;
|
|
1886
1890
|
result500 = _responseText === "" ? null : JSON.parse(_responseText, _this.jsonParseReviver);
|
|
1887
|
-
return throwException("
|
|
1891
|
+
return throwException("General error", status, _responseText, _headers, result500);
|
|
1888
1892
|
});
|
|
1889
1893
|
}
|
|
1890
1894
|
else if (status !== 200 && status !== 204) {
|
|
@@ -1896,7 +1900,7 @@ var AuthClient = /** @class */ (function () {
|
|
|
1896
1900
|
};
|
|
1897
1901
|
/**
|
|
1898
1902
|
* Delete api resources
|
|
1899
|
-
* @resourceName Api resource name
|
|
1903
|
+
* @param resourceName Api resource name
|
|
1900
1904
|
* @return OK
|
|
1901
1905
|
*/
|
|
1902
1906
|
AuthClient.prototype.deleteApiResource = function (resourceName) {
|
|
@@ -1908,9 +1912,7 @@ var AuthClient = /** @class */ (function () {
|
|
|
1908
1912
|
url_ = url_.replace(/[?&]$/, "");
|
|
1909
1913
|
var options_ = {
|
|
1910
1914
|
method: "DELETE",
|
|
1911
|
-
headers:
|
|
1912
|
-
"Content-Type": "application/json",
|
|
1913
|
-
})
|
|
1915
|
+
headers: {}
|
|
1914
1916
|
};
|
|
1915
1917
|
return this.http.fetch(url_, options_).then(function (_response) {
|
|
1916
1918
|
return _this.processDeleteApiResource(_response);
|
|
@@ -1931,19 +1933,19 @@ var AuthClient = /** @class */ (function () {
|
|
|
1931
1933
|
}
|
|
1932
1934
|
else if (status === 401) {
|
|
1933
1935
|
return response.text().then(function (_responseText) {
|
|
1934
|
-
return throwException("
|
|
1936
|
+
return throwException("Unauthorized", status, _responseText, _headers);
|
|
1935
1937
|
});
|
|
1936
1938
|
}
|
|
1937
1939
|
else if (status === 403) {
|
|
1938
1940
|
return response.text().then(function (_responseText) {
|
|
1939
|
-
return throwException("
|
|
1941
|
+
return throwException("Forbidden", status, _responseText, _headers);
|
|
1940
1942
|
});
|
|
1941
1943
|
}
|
|
1942
1944
|
else if (status === 500) {
|
|
1943
1945
|
return response.text().then(function (_responseText) {
|
|
1944
1946
|
var result500 = null;
|
|
1945
1947
|
result500 = _responseText === "" ? null : JSON.parse(_responseText, _this.jsonParseReviver);
|
|
1946
|
-
return throwException("
|
|
1948
|
+
return throwException("General error", status, _responseText, _headers, result500);
|
|
1947
1949
|
});
|
|
1948
1950
|
}
|
|
1949
1951
|
else if (status !== 200 && status !== 204) {
|
|
@@ -1955,7 +1957,7 @@ var AuthClient = /** @class */ (function () {
|
|
|
1955
1957
|
};
|
|
1956
1958
|
/**
|
|
1957
1959
|
* Update api resource
|
|
1958
|
-
* @resourceName Api resource name
|
|
1960
|
+
* @param resourceName Api resource name
|
|
1959
1961
|
* @return OK
|
|
1960
1962
|
*/
|
|
1961
1963
|
AuthClient.prototype.updateApiResource = function (body, resourceName) {
|
|
@@ -1969,9 +1971,9 @@ var AuthClient = /** @class */ (function () {
|
|
|
1969
1971
|
var options_ = {
|
|
1970
1972
|
body: content_,
|
|
1971
1973
|
method: "PUT",
|
|
1972
|
-
headers:
|
|
1974
|
+
headers: {
|
|
1973
1975
|
"Content-Type": "application/json",
|
|
1974
|
-
}
|
|
1976
|
+
}
|
|
1975
1977
|
};
|
|
1976
1978
|
return this.http.fetch(url_, options_).then(function (_response) {
|
|
1977
1979
|
return _this.processUpdateApiResource(_response);
|
|
@@ -1992,19 +1994,19 @@ var AuthClient = /** @class */ (function () {
|
|
|
1992
1994
|
}
|
|
1993
1995
|
else if (status === 401) {
|
|
1994
1996
|
return response.text().then(function (_responseText) {
|
|
1995
|
-
return throwException("
|
|
1997
|
+
return throwException("Unauthorized", status, _responseText, _headers);
|
|
1996
1998
|
});
|
|
1997
1999
|
}
|
|
1998
2000
|
else if (status === 403) {
|
|
1999
2001
|
return response.text().then(function (_responseText) {
|
|
2000
|
-
return throwException("
|
|
2002
|
+
return throwException("Forbidden", status, _responseText, _headers);
|
|
2001
2003
|
});
|
|
2002
2004
|
}
|
|
2003
2005
|
else if (status === 500) {
|
|
2004
2006
|
return response.text().then(function (_responseText) {
|
|
2005
2007
|
var result500 = null;
|
|
2006
2008
|
result500 = _responseText === "" ? null : JSON.parse(_responseText, _this.jsonParseReviver);
|
|
2007
|
-
return throwException("
|
|
2009
|
+
return throwException("General error", status, _responseText, _headers, result500);
|
|
2008
2010
|
});
|
|
2009
2011
|
}
|
|
2010
2012
|
else if (status !== 200 && status !== 204) {
|
|
@@ -2020,39 +2022,39 @@ exports.AuthClient = AuthClient;
|
|
|
2020
2022
|
/** user password hash algorithm */
|
|
2021
2023
|
var PasswordHashAlgorithm;
|
|
2022
2024
|
(function (PasswordHashAlgorithm) {
|
|
2023
|
-
PasswordHashAlgorithm[
|
|
2024
|
-
PasswordHashAlgorithm[
|
|
2025
|
-
PasswordHashAlgorithm[
|
|
2025
|
+
PasswordHashAlgorithm["Unknown"] = "Unknown";
|
|
2026
|
+
PasswordHashAlgorithm["ProprietaryV1"] = "ProprietaryV1";
|
|
2027
|
+
PasswordHashAlgorithm["IdentityV3"] = "IdentityV3";
|
|
2026
2028
|
})(PasswordHashAlgorithm = exports.PasswordHashAlgorithm || (exports.PasswordHashAlgorithm = {}));
|
|
2027
2029
|
var AllowedGrantTypes;
|
|
2028
2030
|
(function (AllowedGrantTypes) {
|
|
2029
|
-
AllowedGrantTypes[
|
|
2030
|
-
AllowedGrantTypes[
|
|
2031
|
-
AllowedGrantTypes[
|
|
2032
|
-
AllowedGrantTypes[
|
|
2033
|
-
AllowedGrantTypes[
|
|
2034
|
-
AllowedGrantTypes[
|
|
2031
|
+
AllowedGrantTypes["Authorization_code"] = "authorization_code";
|
|
2032
|
+
AllowedGrantTypes["Implicit"] = "implicit";
|
|
2033
|
+
AllowedGrantTypes["Hybrid"] = "hybrid";
|
|
2034
|
+
AllowedGrantTypes["Password"] = "password";
|
|
2035
|
+
AllowedGrantTypes["Client_credentials"] = "client_credentials";
|
|
2036
|
+
AllowedGrantTypes["Delegation"] = "delegation";
|
|
2035
2037
|
})(AllowedGrantTypes = exports.AllowedGrantTypes || (exports.AllowedGrantTypes = {}));
|
|
2036
2038
|
var ClientInfoRefreshTokenUsage;
|
|
2037
2039
|
(function (ClientInfoRefreshTokenUsage) {
|
|
2038
|
-
ClientInfoRefreshTokenUsage[
|
|
2039
|
-
ClientInfoRefreshTokenUsage[
|
|
2040
|
+
ClientInfoRefreshTokenUsage["ReUse"] = "reUse";
|
|
2041
|
+
ClientInfoRefreshTokenUsage["OneTimeOnly"] = "oneTimeOnly";
|
|
2040
2042
|
})(ClientInfoRefreshTokenUsage = exports.ClientInfoRefreshTokenUsage || (exports.ClientInfoRefreshTokenUsage = {}));
|
|
2041
2043
|
var ClientInfoRefreshTokenExpiration;
|
|
2042
2044
|
(function (ClientInfoRefreshTokenExpiration) {
|
|
2043
|
-
ClientInfoRefreshTokenExpiration[
|
|
2044
|
-
ClientInfoRefreshTokenExpiration[
|
|
2045
|
+
ClientInfoRefreshTokenExpiration["Absolute"] = "absolute";
|
|
2046
|
+
ClientInfoRefreshTokenExpiration["Sliding"] = "sliding";
|
|
2045
2047
|
})(ClientInfoRefreshTokenExpiration = exports.ClientInfoRefreshTokenExpiration || (exports.ClientInfoRefreshTokenExpiration = {}));
|
|
2046
2048
|
var ClientInfoAccessTokenType;
|
|
2047
2049
|
(function (ClientInfoAccessTokenType) {
|
|
2048
|
-
ClientInfoAccessTokenType[
|
|
2049
|
-
ClientInfoAccessTokenType[
|
|
2050
|
+
ClientInfoAccessTokenType["Jwt"] = "jwt";
|
|
2051
|
+
ClientInfoAccessTokenType["Reference"] = "reference";
|
|
2050
2052
|
})(ClientInfoAccessTokenType = exports.ClientInfoAccessTokenType || (exports.ClientInfoAccessTokenType = {}));
|
|
2051
|
-
var
|
|
2052
|
-
__extends(
|
|
2053
|
-
function
|
|
2053
|
+
var ApiException = /** @class */ (function (_super) {
|
|
2054
|
+
__extends(ApiException, _super);
|
|
2055
|
+
function ApiException(message, status, response, headers, result) {
|
|
2054
2056
|
var _this = _super.call(this) || this;
|
|
2055
|
-
_this.
|
|
2057
|
+
_this.isApiException = true;
|
|
2056
2058
|
_this.message = message;
|
|
2057
2059
|
_this.status = status;
|
|
2058
2060
|
_this.response = response;
|
|
@@ -2060,16 +2062,16 @@ var SwaggerException = /** @class */ (function (_super) {
|
|
|
2060
2062
|
_this.result = result;
|
|
2061
2063
|
return _this;
|
|
2062
2064
|
}
|
|
2063
|
-
|
|
2064
|
-
return obj.
|
|
2065
|
+
ApiException.isApiException = function (obj) {
|
|
2066
|
+
return obj.isApiException === true;
|
|
2065
2067
|
};
|
|
2066
|
-
return
|
|
2068
|
+
return ApiException;
|
|
2067
2069
|
}(Error));
|
|
2068
|
-
exports.
|
|
2070
|
+
exports.ApiException = ApiException;
|
|
2069
2071
|
function throwException(message, status, response, headers, result) {
|
|
2070
2072
|
if (result !== null && result !== undefined)
|
|
2071
2073
|
throw result;
|
|
2072
2074
|
else
|
|
2073
|
-
throw new
|
|
2075
|
+
throw new ApiException(message, status, response, headers, null);
|
|
2074
2076
|
}
|
|
2075
2077
|
//# sourceMappingURL=client.js.map
|