@emilgroup/auth-sdk 1.3.0 → 1.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 (60) hide show
  1. package/README.md +2 -2
  2. package/package.json +1 -2
  3. package/dist/api/authservice-api.d.ts +0 -613
  4. package/dist/api/authservice-api.js +0 -1065
  5. package/dist/api/default-api.d.ts +0 -66
  6. package/dist/api/default-api.js +0 -196
  7. package/dist/api.d.ts +0 -13
  8. package/dist/api.js +0 -31
  9. package/dist/base.d.ts +0 -74
  10. package/dist/base.js +0 -298
  11. package/dist/common.d.ts +0 -91
  12. package/dist/common.js +0 -276
  13. package/dist/configuration.d.ts +0 -83
  14. package/dist/configuration.js +0 -44
  15. package/dist/index.d.ts +0 -15
  16. package/dist/index.js +0 -36
  17. package/dist/models/create-org-and-user-request-dto.d.ts +0 -84
  18. package/dist/models/create-org-and-user-request-dto.js +0 -15
  19. package/dist/models/create-org-and-user-response-class.d.ts +0 -32
  20. package/dist/models/create-org-and-user-response-class.js +0 -15
  21. package/dist/models/create-user-request-dto.d.ts +0 -54
  22. package/dist/models/create-user-request-dto.js +0 -15
  23. package/dist/models/create-user-response-class.d.ts +0 -25
  24. package/dist/models/create-user-response-class.js +0 -15
  25. package/dist/models/custom-schema-class.d.ts +0 -66
  26. package/dist/models/custom-schema-class.js +0 -15
  27. package/dist/models/forgot-password-request-dto.d.ts +0 -24
  28. package/dist/models/forgot-password-request-dto.js +0 -15
  29. package/dist/models/get-samllogin-link-request-dto.d.ts +0 -24
  30. package/dist/models/get-samllogin-link-request-dto.js +0 -15
  31. package/dist/models/index.d.ts +0 -21
  32. package/dist/models/index.js +0 -37
  33. package/dist/models/inline-response200.d.ts +0 -54
  34. package/dist/models/inline-response200.js +0 -15
  35. package/dist/models/inline-response503.d.ts +0 -54
  36. package/dist/models/inline-response503.js +0 -15
  37. package/dist/models/login-by-samlrequest-dto.d.ts +0 -30
  38. package/dist/models/login-by-samlrequest-dto.js +0 -15
  39. package/dist/models/login-class.d.ts +0 -30
  40. package/dist/models/login-class.js +0 -15
  41. package/dist/models/login-request-dto.d.ts +0 -30
  42. package/dist/models/login-request-dto.js +0 -15
  43. package/dist/models/logout-request-dto.d.ts +0 -24
  44. package/dist/models/logout-request-dto.js +0 -15
  45. package/dist/models/org-invitation-class.d.ts +0 -109
  46. package/dist/models/org-invitation-class.js +0 -15
  47. package/dist/models/organization-class.d.ts +0 -114
  48. package/dist/models/organization-class.js +0 -15
  49. package/dist/models/refresh-token-dto.d.ts +0 -24
  50. package/dist/models/refresh-token-dto.js +0 -15
  51. package/dist/models/reset-password-request-dto.d.ts +0 -36
  52. package/dist/models/reset-password-request-dto.js +0 -15
  53. package/dist/models/role-class.d.ts +0 -54
  54. package/dist/models/role-class.js +0 -15
  55. package/dist/models/user-class.d.ts +0 -85
  56. package/dist/models/user-class.js +0 -15
  57. package/dist/models/verify-org-invitation-request-dto.d.ts +0 -24
  58. package/dist/models/verify-org-invitation-request-dto.js +0 -15
  59. package/dist/models/verify-org-invitation-response-class.d.ts +0 -32
  60. package/dist/models/verify-org-invitation-response-class.js +0 -15
@@ -1,1065 +0,0 @@
1
- "use strict";
2
- /* tslint:disable */
3
- /* eslint-disable */
4
- /**
5
- * EMIL AuthService
6
- * The EMIL AuthService API description
7
- *
8
- * The version of the OpenAPI document: 1.0
9
- * Contact: kontakt@emil.de
10
- *
11
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
- * https://openapi-generator.tech
13
- * Do not edit the class manually.
14
- */
15
- var __extends = (this && this.__extends) || (function () {
16
- var extendStatics = function (d, b) {
17
- extendStatics = Object.setPrototypeOf ||
18
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
19
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
20
- return extendStatics(d, b);
21
- };
22
- return function (d, b) {
23
- if (typeof b !== "function" && b !== null)
24
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
25
- extendStatics(d, b);
26
- function __() { this.constructor = d; }
27
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
28
- };
29
- })();
30
- var __assign = (this && this.__assign) || function () {
31
- __assign = Object.assign || function(t) {
32
- for (var s, i = 1, n = arguments.length; i < n; i++) {
33
- s = arguments[i];
34
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
35
- t[p] = s[p];
36
- }
37
- return t;
38
- };
39
- return __assign.apply(this, arguments);
40
- };
41
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
42
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
43
- return new (P || (P = Promise))(function (resolve, reject) {
44
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
45
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
46
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
47
- step((generator = generator.apply(thisArg, _arguments || [])).next());
48
- });
49
- };
50
- var __generator = (this && this.__generator) || function (thisArg, body) {
51
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
52
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
53
- function verb(n) { return function (v) { return step([n, v]); }; }
54
- function step(op) {
55
- if (f) throw new TypeError("Generator is already executing.");
56
- while (g && (g = 0, op[0] && (_ = 0)), _) try {
57
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
58
- if (y = 0, t) op = [op[0] & 2, t.value];
59
- switch (op[0]) {
60
- case 0: case 1: t = op; break;
61
- case 4: _.label++; return { value: op[1], done: false };
62
- case 5: _.label++; y = op[1]; op = [0]; continue;
63
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
64
- default:
65
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
66
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
67
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
68
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
69
- if (t[2]) _.ops.pop();
70
- _.trys.pop(); continue;
71
- }
72
- op = body.call(thisArg, _);
73
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
74
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
75
- }
76
- };
77
- var __importDefault = (this && this.__importDefault) || function (mod) {
78
- return (mod && mod.__esModule) ? mod : { "default": mod };
79
- };
80
- Object.defineProperty(exports, "__esModule", { value: true });
81
- exports.AuthserviceApi = exports.AuthserviceApiFactory = exports.AuthserviceApiFp = exports.AuthserviceApiAxiosParamCreator = void 0;
82
- var axios_1 = __importDefault(require("axios"));
83
- // Some imports not used depending on template conditions
84
- // @ts-ignore
85
- var common_1 = require("../common");
86
- // @ts-ignore
87
- var base_1 = require("../base");
88
- /**
89
- * AuthserviceApi - axios parameter creator
90
- * @export
91
- */
92
- var AuthserviceApiAxiosParamCreator = function (configuration) {
93
- var _this = this;
94
- return {
95
- /**
96
- * Register a new organization with appropriate hierarchy and create a user for that organization.
97
- * @summary Register Organization and User using invitation token
98
- * @param {CreateOrgAndUserRequestDto} createOrgAndUserRequestDto
99
- * @param {*} [options] Override http request option.
100
- * @throws {RequiredError}
101
- */
102
- createOrgAndUser: function (createOrgAndUserRequestDto, options) {
103
- if (options === void 0) { options = {}; }
104
- return __awaiter(_this, void 0, void 0, function () {
105
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
106
- return __generator(this, function (_a) {
107
- // verify required parameter 'createOrgAndUserRequestDto' is not null or undefined
108
- (0, common_1.assertParamExists)('createOrgAndUser', 'createOrgAndUserRequestDto', createOrgAndUserRequestDto);
109
- localVarPath = "/authservice/v1/create-org-and-user";
110
- localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
111
- if (configuration) {
112
- baseOptions = configuration.baseOptions;
113
- baseAccessToken = configuration.accessToken;
114
- }
115
- localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
116
- localVarHeaderParameter = {};
117
- localVarQueryParameter = {};
118
- localVarHeaderParameter['Content-Type'] = 'application/json';
119
- (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
120
- headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
121
- localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
122
- localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(createOrgAndUserRequestDto, localVarRequestOptions, configuration);
123
- return [2 /*return*/, {
124
- url: (0, common_1.toPathString)(localVarUrlObj),
125
- options: localVarRequestOptions,
126
- }];
127
- });
128
- });
129
- },
130
- /**
131
- * Register a tenant user using the invite token sent to the tenant user\'s email address.
132
- * @summary Register tenant user after invite
133
- * @param {CreateUserRequestDto} createUserRequestDto
134
- * @param {*} [options] Override http request option.
135
- * @throws {RequiredError}
136
- */
137
- createUser: function (createUserRequestDto, options) {
138
- if (options === void 0) { options = {}; }
139
- return __awaiter(_this, void 0, void 0, function () {
140
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
141
- return __generator(this, function (_a) {
142
- // verify required parameter 'createUserRequestDto' is not null or undefined
143
- (0, common_1.assertParamExists)('createUser', 'createUserRequestDto', createUserRequestDto);
144
- localVarPath = "/authservice/v1/create-user";
145
- localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
146
- if (configuration) {
147
- baseOptions = configuration.baseOptions;
148
- baseAccessToken = configuration.accessToken;
149
- }
150
- localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
151
- localVarHeaderParameter = {};
152
- localVarQueryParameter = {};
153
- localVarHeaderParameter['Content-Type'] = 'application/json';
154
- (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
155
- headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
156
- localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
157
- localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(createUserRequestDto, localVarRequestOptions, configuration);
158
- return [2 /*return*/, {
159
- url: (0, common_1.toPathString)(localVarUrlObj),
160
- options: localVarRequestOptions,
161
- }];
162
- });
163
- });
164
- },
165
- /**
166
- * Send a tenant user a reset-password token via email.
167
- * @summary Forgot password by tenant
168
- * @param {ForgotPasswordRequestDto} forgotPasswordRequestDto
169
- * @param {*} [options] Override http request option.
170
- * @throws {RequiredError}
171
- */
172
- forgotPassword: function (forgotPasswordRequestDto, options) {
173
- if (options === void 0) { options = {}; }
174
- return __awaiter(_this, void 0, void 0, function () {
175
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
176
- return __generator(this, function (_a) {
177
- // verify required parameter 'forgotPasswordRequestDto' is not null or undefined
178
- (0, common_1.assertParamExists)('forgotPassword', 'forgotPasswordRequestDto', forgotPasswordRequestDto);
179
- localVarPath = "/authservice/v1/forgot-password";
180
- localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
181
- if (configuration) {
182
- baseOptions = configuration.baseOptions;
183
- baseAccessToken = configuration.accessToken;
184
- }
185
- localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
186
- localVarHeaderParameter = {};
187
- localVarQueryParameter = {};
188
- localVarHeaderParameter['Content-Type'] = 'application/json';
189
- (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
190
- headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
191
- localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
192
- localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(forgotPasswordRequestDto, localVarRequestOptions, configuration);
193
- return [2 /*return*/, {
194
- url: (0, common_1.toPathString)(localVarUrlObj),
195
- options: localVarRequestOptions,
196
- }];
197
- });
198
- });
199
- },
200
- /**
201
- * Get saml login link configured for the tenant in cognito as well as tenant settings
202
- * @summary Get saml login link for tenant
203
- * @param {string} tenantSlug
204
- * @param {*} [options] Override http request option.
205
- * @throws {RequiredError}
206
- */
207
- getSamlLoginLink: function (tenantSlug, options) {
208
- if (options === void 0) { options = {}; }
209
- return __awaiter(_this, void 0, void 0, function () {
210
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
211
- return __generator(this, function (_a) {
212
- // verify required parameter 'tenantSlug' is not null or undefined
213
- (0, common_1.assertParamExists)('getSamlLoginLink', 'tenantSlug', tenantSlug);
214
- localVarPath = "/authservice/v1/saml-login-link";
215
- localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
216
- if (configuration) {
217
- baseOptions = configuration.baseOptions;
218
- baseAccessToken = configuration.accessToken;
219
- }
220
- localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
221
- localVarHeaderParameter = {};
222
- localVarQueryParameter = {};
223
- if (tenantSlug !== undefined) {
224
- localVarQueryParameter['tenantSlug'] = tenantSlug;
225
- }
226
- (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
227
- headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
228
- localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
229
- return [2 /*return*/, {
230
- url: (0, common_1.toPathString)(localVarUrlObj),
231
- options: localVarRequestOptions,
232
- }];
233
- });
234
- });
235
- },
236
- /**
237
- * Get new access token, refresh token after successful login.
238
- * @summary Login by tenant
239
- * @param {LoginRequestDto} loginRequestDto
240
- * @param {*} [options] Override http request option.
241
- * @throws {RequiredError}
242
- */
243
- login: function (loginRequestDto, options) {
244
- if (options === void 0) { options = {}; }
245
- return __awaiter(_this, void 0, void 0, function () {
246
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
247
- return __generator(this, function (_a) {
248
- // verify required parameter 'loginRequestDto' is not null or undefined
249
- (0, common_1.assertParamExists)('login', 'loginRequestDto', loginRequestDto);
250
- localVarPath = "/authservice/v1/login";
251
- localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
252
- if (configuration) {
253
- baseOptions = configuration.baseOptions;
254
- baseAccessToken = configuration.accessToken;
255
- }
256
- localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
257
- localVarHeaderParameter = {};
258
- localVarQueryParameter = {};
259
- localVarHeaderParameter['Content-Type'] = 'application/json';
260
- (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
261
- headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
262
- localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
263
- localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(loginRequestDto, localVarRequestOptions, configuration);
264
- return [2 /*return*/, {
265
- url: (0, common_1.toPathString)(localVarUrlObj),
266
- options: localVarRequestOptions,
267
- }];
268
- });
269
- });
270
- },
271
- /**
272
- * Get new access token, refresh token after successful login. This api also creates a tenant user if user does not exist
273
- * @summary Login by SAML idp provider such as ADFS
274
- * @param {LoginBySAMLRequestDto} loginBySAMLRequestDto
275
- * @param {*} [options] Override http request option.
276
- * @throws {RequiredError}
277
- */
278
- loginBySAML: function (loginBySAMLRequestDto, options) {
279
- if (options === void 0) { options = {}; }
280
- return __awaiter(_this, void 0, void 0, function () {
281
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
282
- return __generator(this, function (_a) {
283
- // verify required parameter 'loginBySAMLRequestDto' is not null or undefined
284
- (0, common_1.assertParamExists)('loginBySAML', 'loginBySAMLRequestDto', loginBySAMLRequestDto);
285
- localVarPath = "/authservice/v1/login/saml";
286
- localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
287
- if (configuration) {
288
- baseOptions = configuration.baseOptions;
289
- baseAccessToken = configuration.accessToken;
290
- }
291
- localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
292
- localVarHeaderParameter = {};
293
- localVarQueryParameter = {};
294
- localVarHeaderParameter['Content-Type'] = 'application/json';
295
- (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
296
- headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
297
- localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
298
- localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(loginBySAMLRequestDto, localVarRequestOptions, configuration);
299
- return [2 /*return*/, {
300
- url: (0, common_1.toPathString)(localVarUrlObj),
301
- options: localVarRequestOptions,
302
- }];
303
- });
304
- });
305
- },
306
- /**
307
- * Sign tenant user out.
308
- * @summary Logout tenant
309
- * @param {LogoutRequestDto} logoutRequestDto
310
- * @param {*} [options] Override http request option.
311
- * @throws {RequiredError}
312
- */
313
- logout: function (logoutRequestDto, options) {
314
- if (options === void 0) { options = {}; }
315
- return __awaiter(_this, void 0, void 0, function () {
316
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
317
- return __generator(this, function (_a) {
318
- // verify required parameter 'logoutRequestDto' is not null or undefined
319
- (0, common_1.assertParamExists)('logout', 'logoutRequestDto', logoutRequestDto);
320
- localVarPath = "/authservice/v1/logout";
321
- localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
322
- if (configuration) {
323
- baseOptions = configuration.baseOptions;
324
- baseAccessToken = configuration.accessToken;
325
- }
326
- localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
327
- localVarHeaderParameter = {};
328
- localVarQueryParameter = {};
329
- localVarHeaderParameter['Content-Type'] = 'application/json';
330
- (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
331
- headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
332
- localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
333
- localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(logoutRequestDto, localVarRequestOptions, configuration);
334
- return [2 /*return*/, {
335
- url: (0, common_1.toPathString)(localVarUrlObj),
336
- options: localVarRequestOptions,
337
- }];
338
- });
339
- });
340
- },
341
- /**
342
- * Get new access token, new refresh token.
343
- * @summary Refresh token by tenant
344
- * @param {RefreshTokenDto} refreshTokenDto
345
- * @param {string} [cookie] HTTP only cookie that was sent during login
346
- * @param {*} [options] Override http request option.
347
- * @throws {RequiredError}
348
- */
349
- refreshToken: function (refreshTokenDto, cookie, options) {
350
- if (options === void 0) { options = {}; }
351
- return __awaiter(_this, void 0, void 0, function () {
352
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
353
- return __generator(this, function (_a) {
354
- // verify required parameter 'refreshTokenDto' is not null or undefined
355
- (0, common_1.assertParamExists)('refreshToken', 'refreshTokenDto', refreshTokenDto);
356
- localVarPath = "/authservice/v1/refresh-token";
357
- localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
358
- if (configuration) {
359
- baseOptions = configuration.baseOptions;
360
- baseAccessToken = configuration.accessToken;
361
- }
362
- localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
363
- localVarHeaderParameter = {};
364
- localVarQueryParameter = {};
365
- if (cookie !== undefined && cookie !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
366
- localVarHeaderParameter['Cookie'] = String(cookie ? cookie : baseAccessToken);
367
- }
368
- localVarHeaderParameter['Content-Type'] = 'application/json';
369
- (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
370
- headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
371
- localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
372
- localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(refreshTokenDto, localVarRequestOptions, configuration);
373
- return [2 /*return*/, {
374
- url: (0, common_1.toPathString)(localVarUrlObj),
375
- options: localVarRequestOptions,
376
- }];
377
- });
378
- });
379
- },
380
- /**
381
- * Change tenant user\'s password using the token provided by the reset password endpoint.
382
- * @summary Change password by tenant
383
- * @param {ResetPasswordRequestDto} resetPasswordRequestDto
384
- * @param {*} [options] Override http request option.
385
- * @throws {RequiredError}
386
- */
387
- resetPassword: function (resetPasswordRequestDto, options) {
388
- if (options === void 0) { options = {}; }
389
- return __awaiter(_this, void 0, void 0, function () {
390
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
391
- return __generator(this, function (_a) {
392
- // verify required parameter 'resetPasswordRequestDto' is not null or undefined
393
- (0, common_1.assertParamExists)('resetPassword', 'resetPasswordRequestDto', resetPasswordRequestDto);
394
- localVarPath = "/authservice/v1/reset-password";
395
- localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
396
- if (configuration) {
397
- baseOptions = configuration.baseOptions;
398
- baseAccessToken = configuration.accessToken;
399
- }
400
- localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
401
- localVarHeaderParameter = {};
402
- localVarQueryParameter = {};
403
- localVarHeaderParameter['Content-Type'] = 'application/json';
404
- (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
405
- headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
406
- localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
407
- localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(resetPasswordRequestDto, localVarRequestOptions, configuration);
408
- return [2 /*return*/, {
409
- url: (0, common_1.toPathString)(localVarUrlObj),
410
- options: localVarRequestOptions,
411
- }];
412
- });
413
- });
414
- },
415
- /**
416
- * Verify the invite sent to the tenant user via email.
417
- * @summary Verify tenant user\'s invite token
418
- * @param {string} token
419
- * @param {*} [options] Override http request option.
420
- * @throws {RequiredError}
421
- */
422
- verifyInvite: function (token, options) {
423
- if (options === void 0) { options = {}; }
424
- return __awaiter(_this, void 0, void 0, function () {
425
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
426
- return __generator(this, function (_a) {
427
- // verify required parameter 'token' is not null or undefined
428
- (0, common_1.assertParamExists)('verifyInvite', 'token', token);
429
- localVarPath = "/authservice/v1/verify-invite";
430
- localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
431
- if (configuration) {
432
- baseOptions = configuration.baseOptions;
433
- baseAccessToken = configuration.accessToken;
434
- }
435
- localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
436
- localVarHeaderParameter = {};
437
- localVarQueryParameter = {};
438
- if (token !== undefined) {
439
- localVarQueryParameter['token'] = token;
440
- }
441
- (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
442
- headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
443
- localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
444
- return [2 /*return*/, {
445
- url: (0, common_1.toPathString)(localVarUrlObj),
446
- options: localVarRequestOptions,
447
- }];
448
- });
449
- });
450
- },
451
- /**
452
- * Verifies token and returns necessary data for signing up as an organization.
453
- * @summary Verify a organization\'s invitation token
454
- * @param {string} invitationToken
455
- * @param {*} [options] Override http request option.
456
- * @throws {RequiredError}
457
- */
458
- verifyOrgInvitation: function (invitationToken, options) {
459
- if (options === void 0) { options = {}; }
460
- return __awaiter(_this, void 0, void 0, function () {
461
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
462
- return __generator(this, function (_a) {
463
- // verify required parameter 'invitationToken' is not null or undefined
464
- (0, common_1.assertParamExists)('verifyOrgInvitation', 'invitationToken', invitationToken);
465
- localVarPath = "/authservice/v1/verify-org-invitation";
466
- localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
467
- if (configuration) {
468
- baseOptions = configuration.baseOptions;
469
- baseAccessToken = configuration.accessToken;
470
- }
471
- localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
472
- localVarHeaderParameter = {};
473
- localVarQueryParameter = {};
474
- if (invitationToken !== undefined) {
475
- localVarQueryParameter['invitationToken'] = invitationToken;
476
- }
477
- (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
478
- headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
479
- localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
480
- return [2 /*return*/, {
481
- url: (0, common_1.toPathString)(localVarUrlObj),
482
- options: localVarRequestOptions,
483
- }];
484
- });
485
- });
486
- },
487
- /**
488
- * Verify the reset password token that is sent by calling the \'forgot password\' endpoint.
489
- * @summary Verify tenant reset password token
490
- * @param {string} resetToken Tenant user\&#39;s reset token. Reset token can be found in the email sent after \&#39;forgot-password\&#39; endpoint was called.
491
- * @param {*} [options] Override http request option.
492
- * @throws {RequiredError}
493
- */
494
- verifyResetPasswordToken: function (resetToken, options) {
495
- if (options === void 0) { options = {}; }
496
- return __awaiter(_this, void 0, void 0, function () {
497
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
498
- return __generator(this, function (_a) {
499
- // verify required parameter 'resetToken' is not null or undefined
500
- (0, common_1.assertParamExists)('verifyResetPasswordToken', 'resetToken', resetToken);
501
- localVarPath = "/authservice/v1/verify-reset-password";
502
- localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
503
- if (configuration) {
504
- baseOptions = configuration.baseOptions;
505
- baseAccessToken = configuration.accessToken;
506
- }
507
- localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
508
- localVarHeaderParameter = {};
509
- localVarQueryParameter = {};
510
- if (resetToken !== undefined) {
511
- localVarQueryParameter['resetToken'] = resetToken;
512
- }
513
- (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
514
- headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
515
- localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
516
- return [2 /*return*/, {
517
- url: (0, common_1.toPathString)(localVarUrlObj),
518
- options: localVarRequestOptions,
519
- }];
520
- });
521
- });
522
- },
523
- };
524
- };
525
- exports.AuthserviceApiAxiosParamCreator = AuthserviceApiAxiosParamCreator;
526
- /**
527
- * AuthserviceApi - functional programming interface
528
- * @export
529
- */
530
- var AuthserviceApiFp = function (configuration) {
531
- var localVarAxiosParamCreator = (0, exports.AuthserviceApiAxiosParamCreator)(configuration);
532
- return {
533
- /**
534
- * Register a new organization with appropriate hierarchy and create a user for that organization.
535
- * @summary Register Organization and User using invitation token
536
- * @param {CreateOrgAndUserRequestDto} createOrgAndUserRequestDto
537
- * @param {*} [options] Override http request option.
538
- * @throws {RequiredError}
539
- */
540
- createOrgAndUser: function (createOrgAndUserRequestDto, options) {
541
- return __awaiter(this, void 0, void 0, function () {
542
- var localVarAxiosArgs;
543
- return __generator(this, function (_a) {
544
- switch (_a.label) {
545
- case 0: return [4 /*yield*/, localVarAxiosParamCreator.createOrgAndUser(createOrgAndUserRequestDto, options)];
546
- case 1:
547
- localVarAxiosArgs = _a.sent();
548
- return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
549
- }
550
- });
551
- });
552
- },
553
- /**
554
- * Register a tenant user using the invite token sent to the tenant user\'s email address.
555
- * @summary Register tenant user after invite
556
- * @param {CreateUserRequestDto} createUserRequestDto
557
- * @param {*} [options] Override http request option.
558
- * @throws {RequiredError}
559
- */
560
- createUser: function (createUserRequestDto, options) {
561
- return __awaiter(this, void 0, void 0, function () {
562
- var localVarAxiosArgs;
563
- return __generator(this, function (_a) {
564
- switch (_a.label) {
565
- case 0: return [4 /*yield*/, localVarAxiosParamCreator.createUser(createUserRequestDto, options)];
566
- case 1:
567
- localVarAxiosArgs = _a.sent();
568
- return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
569
- }
570
- });
571
- });
572
- },
573
- /**
574
- * Send a tenant user a reset-password token via email.
575
- * @summary Forgot password by tenant
576
- * @param {ForgotPasswordRequestDto} forgotPasswordRequestDto
577
- * @param {*} [options] Override http request option.
578
- * @throws {RequiredError}
579
- */
580
- forgotPassword: function (forgotPasswordRequestDto, options) {
581
- return __awaiter(this, void 0, void 0, function () {
582
- var localVarAxiosArgs;
583
- return __generator(this, function (_a) {
584
- switch (_a.label) {
585
- case 0: return [4 /*yield*/, localVarAxiosParamCreator.forgotPassword(forgotPasswordRequestDto, options)];
586
- case 1:
587
- localVarAxiosArgs = _a.sent();
588
- return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
589
- }
590
- });
591
- });
592
- },
593
- /**
594
- * Get saml login link configured for the tenant in cognito as well as tenant settings
595
- * @summary Get saml login link for tenant
596
- * @param {string} tenantSlug
597
- * @param {*} [options] Override http request option.
598
- * @throws {RequiredError}
599
- */
600
- getSamlLoginLink: function (tenantSlug, options) {
601
- return __awaiter(this, void 0, void 0, function () {
602
- var localVarAxiosArgs;
603
- return __generator(this, function (_a) {
604
- switch (_a.label) {
605
- case 0: return [4 /*yield*/, localVarAxiosParamCreator.getSamlLoginLink(tenantSlug, options)];
606
- case 1:
607
- localVarAxiosArgs = _a.sent();
608
- return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
609
- }
610
- });
611
- });
612
- },
613
- /**
614
- * Get new access token, refresh token after successful login.
615
- * @summary Login by tenant
616
- * @param {LoginRequestDto} loginRequestDto
617
- * @param {*} [options] Override http request option.
618
- * @throws {RequiredError}
619
- */
620
- login: function (loginRequestDto, options) {
621
- return __awaiter(this, void 0, void 0, function () {
622
- var localVarAxiosArgs;
623
- return __generator(this, function (_a) {
624
- switch (_a.label) {
625
- case 0: return [4 /*yield*/, localVarAxiosParamCreator.login(loginRequestDto, options)];
626
- case 1:
627
- localVarAxiosArgs = _a.sent();
628
- return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
629
- }
630
- });
631
- });
632
- },
633
- /**
634
- * Get new access token, refresh token after successful login. This api also creates a tenant user if user does not exist
635
- * @summary Login by SAML idp provider such as ADFS
636
- * @param {LoginBySAMLRequestDto} loginBySAMLRequestDto
637
- * @param {*} [options] Override http request option.
638
- * @throws {RequiredError}
639
- */
640
- loginBySAML: function (loginBySAMLRequestDto, options) {
641
- return __awaiter(this, void 0, void 0, function () {
642
- var localVarAxiosArgs;
643
- return __generator(this, function (_a) {
644
- switch (_a.label) {
645
- case 0: return [4 /*yield*/, localVarAxiosParamCreator.loginBySAML(loginBySAMLRequestDto, options)];
646
- case 1:
647
- localVarAxiosArgs = _a.sent();
648
- return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
649
- }
650
- });
651
- });
652
- },
653
- /**
654
- * Sign tenant user out.
655
- * @summary Logout tenant
656
- * @param {LogoutRequestDto} logoutRequestDto
657
- * @param {*} [options] Override http request option.
658
- * @throws {RequiredError}
659
- */
660
- logout: function (logoutRequestDto, options) {
661
- return __awaiter(this, void 0, void 0, function () {
662
- var localVarAxiosArgs;
663
- return __generator(this, function (_a) {
664
- switch (_a.label) {
665
- case 0: return [4 /*yield*/, localVarAxiosParamCreator.logout(logoutRequestDto, options)];
666
- case 1:
667
- localVarAxiosArgs = _a.sent();
668
- return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
669
- }
670
- });
671
- });
672
- },
673
- /**
674
- * Get new access token, new refresh token.
675
- * @summary Refresh token by tenant
676
- * @param {RefreshTokenDto} refreshTokenDto
677
- * @param {string} [cookie] HTTP only cookie that was sent during login
678
- * @param {*} [options] Override http request option.
679
- * @throws {RequiredError}
680
- */
681
- refreshToken: function (refreshTokenDto, cookie, options) {
682
- return __awaiter(this, void 0, void 0, function () {
683
- var localVarAxiosArgs;
684
- return __generator(this, function (_a) {
685
- switch (_a.label) {
686
- case 0: return [4 /*yield*/, localVarAxiosParamCreator.refreshToken(refreshTokenDto, cookie, options)];
687
- case 1:
688
- localVarAxiosArgs = _a.sent();
689
- return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
690
- }
691
- });
692
- });
693
- },
694
- /**
695
- * Change tenant user\'s password using the token provided by the reset password endpoint.
696
- * @summary Change password by tenant
697
- * @param {ResetPasswordRequestDto} resetPasswordRequestDto
698
- * @param {*} [options] Override http request option.
699
- * @throws {RequiredError}
700
- */
701
- resetPassword: function (resetPasswordRequestDto, options) {
702
- return __awaiter(this, void 0, void 0, function () {
703
- var localVarAxiosArgs;
704
- return __generator(this, function (_a) {
705
- switch (_a.label) {
706
- case 0: return [4 /*yield*/, localVarAxiosParamCreator.resetPassword(resetPasswordRequestDto, options)];
707
- case 1:
708
- localVarAxiosArgs = _a.sent();
709
- return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
710
- }
711
- });
712
- });
713
- },
714
- /**
715
- * Verify the invite sent to the tenant user via email.
716
- * @summary Verify tenant user\'s invite token
717
- * @param {string} token
718
- * @param {*} [options] Override http request option.
719
- * @throws {RequiredError}
720
- */
721
- verifyInvite: function (token, options) {
722
- return __awaiter(this, void 0, void 0, function () {
723
- var localVarAxiosArgs;
724
- return __generator(this, function (_a) {
725
- switch (_a.label) {
726
- case 0: return [4 /*yield*/, localVarAxiosParamCreator.verifyInvite(token, options)];
727
- case 1:
728
- localVarAxiosArgs = _a.sent();
729
- return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
730
- }
731
- });
732
- });
733
- },
734
- /**
735
- * Verifies token and returns necessary data for signing up as an organization.
736
- * @summary Verify a organization\'s invitation token
737
- * @param {string} invitationToken
738
- * @param {*} [options] Override http request option.
739
- * @throws {RequiredError}
740
- */
741
- verifyOrgInvitation: function (invitationToken, options) {
742
- return __awaiter(this, void 0, void 0, function () {
743
- var localVarAxiosArgs;
744
- return __generator(this, function (_a) {
745
- switch (_a.label) {
746
- case 0: return [4 /*yield*/, localVarAxiosParamCreator.verifyOrgInvitation(invitationToken, options)];
747
- case 1:
748
- localVarAxiosArgs = _a.sent();
749
- return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
750
- }
751
- });
752
- });
753
- },
754
- /**
755
- * Verify the reset password token that is sent by calling the \'forgot password\' endpoint.
756
- * @summary Verify tenant reset password token
757
- * @param {string} resetToken Tenant user\&#39;s reset token. Reset token can be found in the email sent after \&#39;forgot-password\&#39; endpoint was called.
758
- * @param {*} [options] Override http request option.
759
- * @throws {RequiredError}
760
- */
761
- verifyResetPasswordToken: function (resetToken, options) {
762
- return __awaiter(this, void 0, void 0, function () {
763
- var localVarAxiosArgs;
764
- return __generator(this, function (_a) {
765
- switch (_a.label) {
766
- case 0: return [4 /*yield*/, localVarAxiosParamCreator.verifyResetPasswordToken(resetToken, options)];
767
- case 1:
768
- localVarAxiosArgs = _a.sent();
769
- return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
770
- }
771
- });
772
- });
773
- },
774
- };
775
- };
776
- exports.AuthserviceApiFp = AuthserviceApiFp;
777
- /**
778
- * AuthserviceApi - factory interface
779
- * @export
780
- */
781
- var AuthserviceApiFactory = function (configuration, basePath, axios) {
782
- var localVarFp = (0, exports.AuthserviceApiFp)(configuration);
783
- return {
784
- /**
785
- * Register a new organization with appropriate hierarchy and create a user for that organization.
786
- * @summary Register Organization and User using invitation token
787
- * @param {CreateOrgAndUserRequestDto} createOrgAndUserRequestDto
788
- * @param {*} [options] Override http request option.
789
- * @throws {RequiredError}
790
- */
791
- createOrgAndUser: function (createOrgAndUserRequestDto, options) {
792
- return localVarFp.createOrgAndUser(createOrgAndUserRequestDto, options).then(function (request) { return request(axios, basePath); });
793
- },
794
- /**
795
- * Register a tenant user using the invite token sent to the tenant user\'s email address.
796
- * @summary Register tenant user after invite
797
- * @param {CreateUserRequestDto} createUserRequestDto
798
- * @param {*} [options] Override http request option.
799
- * @throws {RequiredError}
800
- */
801
- createUser: function (createUserRequestDto, options) {
802
- return localVarFp.createUser(createUserRequestDto, options).then(function (request) { return request(axios, basePath); });
803
- },
804
- /**
805
- * Send a tenant user a reset-password token via email.
806
- * @summary Forgot password by tenant
807
- * @param {ForgotPasswordRequestDto} forgotPasswordRequestDto
808
- * @param {*} [options] Override http request option.
809
- * @throws {RequiredError}
810
- */
811
- forgotPassword: function (forgotPasswordRequestDto, options) {
812
- return localVarFp.forgotPassword(forgotPasswordRequestDto, options).then(function (request) { return request(axios, basePath); });
813
- },
814
- /**
815
- * Get saml login link configured for the tenant in cognito as well as tenant settings
816
- * @summary Get saml login link for tenant
817
- * @param {string} tenantSlug
818
- * @param {*} [options] Override http request option.
819
- * @throws {RequiredError}
820
- */
821
- getSamlLoginLink: function (tenantSlug, options) {
822
- return localVarFp.getSamlLoginLink(tenantSlug, options).then(function (request) { return request(axios, basePath); });
823
- },
824
- /**
825
- * Get new access token, refresh token after successful login.
826
- * @summary Login by tenant
827
- * @param {LoginRequestDto} loginRequestDto
828
- * @param {*} [options] Override http request option.
829
- * @throws {RequiredError}
830
- */
831
- login: function (loginRequestDto, options) {
832
- return localVarFp.login(loginRequestDto, options).then(function (request) { return request(axios, basePath); });
833
- },
834
- /**
835
- * Get new access token, refresh token after successful login. This api also creates a tenant user if user does not exist
836
- * @summary Login by SAML idp provider such as ADFS
837
- * @param {LoginBySAMLRequestDto} loginBySAMLRequestDto
838
- * @param {*} [options] Override http request option.
839
- * @throws {RequiredError}
840
- */
841
- loginBySAML: function (loginBySAMLRequestDto, options) {
842
- return localVarFp.loginBySAML(loginBySAMLRequestDto, options).then(function (request) { return request(axios, basePath); });
843
- },
844
- /**
845
- * Sign tenant user out.
846
- * @summary Logout tenant
847
- * @param {LogoutRequestDto} logoutRequestDto
848
- * @param {*} [options] Override http request option.
849
- * @throws {RequiredError}
850
- */
851
- logout: function (logoutRequestDto, options) {
852
- return localVarFp.logout(logoutRequestDto, options).then(function (request) { return request(axios, basePath); });
853
- },
854
- /**
855
- * Get new access token, new refresh token.
856
- * @summary Refresh token by tenant
857
- * @param {RefreshTokenDto} refreshTokenDto
858
- * @param {string} [cookie] HTTP only cookie that was sent during login
859
- * @param {*} [options] Override http request option.
860
- * @throws {RequiredError}
861
- */
862
- refreshToken: function (refreshTokenDto, cookie, options) {
863
- return localVarFp.refreshToken(refreshTokenDto, cookie, options).then(function (request) { return request(axios, basePath); });
864
- },
865
- /**
866
- * Change tenant user\'s password using the token provided by the reset password endpoint.
867
- * @summary Change password by tenant
868
- * @param {ResetPasswordRequestDto} resetPasswordRequestDto
869
- * @param {*} [options] Override http request option.
870
- * @throws {RequiredError}
871
- */
872
- resetPassword: function (resetPasswordRequestDto, options) {
873
- return localVarFp.resetPassword(resetPasswordRequestDto, options).then(function (request) { return request(axios, basePath); });
874
- },
875
- /**
876
- * Verify the invite sent to the tenant user via email.
877
- * @summary Verify tenant user\'s invite token
878
- * @param {string} token
879
- * @param {*} [options] Override http request option.
880
- * @throws {RequiredError}
881
- */
882
- verifyInvite: function (token, options) {
883
- return localVarFp.verifyInvite(token, options).then(function (request) { return request(axios, basePath); });
884
- },
885
- /**
886
- * Verifies token and returns necessary data for signing up as an organization.
887
- * @summary Verify a organization\'s invitation token
888
- * @param {string} invitationToken
889
- * @param {*} [options] Override http request option.
890
- * @throws {RequiredError}
891
- */
892
- verifyOrgInvitation: function (invitationToken, options) {
893
- return localVarFp.verifyOrgInvitation(invitationToken, options).then(function (request) { return request(axios, basePath); });
894
- },
895
- /**
896
- * Verify the reset password token that is sent by calling the \'forgot password\' endpoint.
897
- * @summary Verify tenant reset password token
898
- * @param {string} resetToken Tenant user\&#39;s reset token. Reset token can be found in the email sent after \&#39;forgot-password\&#39; endpoint was called.
899
- * @param {*} [options] Override http request option.
900
- * @throws {RequiredError}
901
- */
902
- verifyResetPasswordToken: function (resetToken, options) {
903
- return localVarFp.verifyResetPasswordToken(resetToken, options).then(function (request) { return request(axios, basePath); });
904
- },
905
- };
906
- };
907
- exports.AuthserviceApiFactory = AuthserviceApiFactory;
908
- /**
909
- * AuthserviceApi - object-oriented interface
910
- * @export
911
- * @class AuthserviceApi
912
- * @extends {BaseAPI}
913
- */
914
- var AuthserviceApi = /** @class */ (function (_super) {
915
- __extends(AuthserviceApi, _super);
916
- function AuthserviceApi() {
917
- return _super !== null && _super.apply(this, arguments) || this;
918
- }
919
- /**
920
- * Register a new organization with appropriate hierarchy and create a user for that organization.
921
- * @summary Register Organization and User using invitation token
922
- * @param {AuthserviceApiCreateOrgAndUserRequest} requestParameters Request parameters.
923
- * @param {*} [options] Override http request option.
924
- * @throws {RequiredError}
925
- * @memberof AuthserviceApi
926
- */
927
- AuthserviceApi.prototype.createOrgAndUser = function (requestParameters, options) {
928
- var _this = this;
929
- return (0, exports.AuthserviceApiFp)(this.configuration).createOrgAndUser(requestParameters.createOrgAndUserRequestDto, options).then(function (request) { return request(_this.axios, _this.basePath); });
930
- };
931
- /**
932
- * Register a tenant user using the invite token sent to the tenant user\'s email address.
933
- * @summary Register tenant user after invite
934
- * @param {AuthserviceApiCreateUserRequest} requestParameters Request parameters.
935
- * @param {*} [options] Override http request option.
936
- * @throws {RequiredError}
937
- * @memberof AuthserviceApi
938
- */
939
- AuthserviceApi.prototype.createUser = function (requestParameters, options) {
940
- var _this = this;
941
- return (0, exports.AuthserviceApiFp)(this.configuration).createUser(requestParameters.createUserRequestDto, options).then(function (request) { return request(_this.axios, _this.basePath); });
942
- };
943
- /**
944
- * Send a tenant user a reset-password token via email.
945
- * @summary Forgot password by tenant
946
- * @param {AuthserviceApiForgotPasswordRequest} requestParameters Request parameters.
947
- * @param {*} [options] Override http request option.
948
- * @throws {RequiredError}
949
- * @memberof AuthserviceApi
950
- */
951
- AuthserviceApi.prototype.forgotPassword = function (requestParameters, options) {
952
- var _this = this;
953
- return (0, exports.AuthserviceApiFp)(this.configuration).forgotPassword(requestParameters.forgotPasswordRequestDto, options).then(function (request) { return request(_this.axios, _this.basePath); });
954
- };
955
- /**
956
- * Get saml login link configured for the tenant in cognito as well as tenant settings
957
- * @summary Get saml login link for tenant
958
- * @param {AuthserviceApiGetSamlLoginLinkRequest} requestParameters Request parameters.
959
- * @param {*} [options] Override http request option.
960
- * @throws {RequiredError}
961
- * @memberof AuthserviceApi
962
- */
963
- AuthserviceApi.prototype.getSamlLoginLink = function (requestParameters, options) {
964
- var _this = this;
965
- return (0, exports.AuthserviceApiFp)(this.configuration).getSamlLoginLink(requestParameters.tenantSlug, options).then(function (request) { return request(_this.axios, _this.basePath); });
966
- };
967
- /**
968
- * Get new access token, refresh token after successful login.
969
- * @summary Login by tenant
970
- * @param {AuthserviceApiLoginRequest} requestParameters Request parameters.
971
- * @param {*} [options] Override http request option.
972
- * @throws {RequiredError}
973
- * @memberof AuthserviceApi
974
- */
975
- AuthserviceApi.prototype.login = function (requestParameters, options) {
976
- var _this = this;
977
- return (0, exports.AuthserviceApiFp)(this.configuration).login(requestParameters.loginRequestDto, options).then(function (request) { return request(_this.axios, _this.basePath); });
978
- };
979
- /**
980
- * Get new access token, refresh token after successful login. This api also creates a tenant user if user does not exist
981
- * @summary Login by SAML idp provider such as ADFS
982
- * @param {AuthserviceApiLoginBySAMLRequest} requestParameters Request parameters.
983
- * @param {*} [options] Override http request option.
984
- * @throws {RequiredError}
985
- * @memberof AuthserviceApi
986
- */
987
- AuthserviceApi.prototype.loginBySAML = function (requestParameters, options) {
988
- var _this = this;
989
- return (0, exports.AuthserviceApiFp)(this.configuration).loginBySAML(requestParameters.loginBySAMLRequestDto, options).then(function (request) { return request(_this.axios, _this.basePath); });
990
- };
991
- /**
992
- * Sign tenant user out.
993
- * @summary Logout tenant
994
- * @param {AuthserviceApiLogoutRequest} requestParameters Request parameters.
995
- * @param {*} [options] Override http request option.
996
- * @throws {RequiredError}
997
- * @memberof AuthserviceApi
998
- */
999
- AuthserviceApi.prototype.logout = function (requestParameters, options) {
1000
- var _this = this;
1001
- return (0, exports.AuthserviceApiFp)(this.configuration).logout(requestParameters.logoutRequestDto, options).then(function (request) { return request(_this.axios, _this.basePath); });
1002
- };
1003
- /**
1004
- * Get new access token, new refresh token.
1005
- * @summary Refresh token by tenant
1006
- * @param {AuthserviceApiRefreshTokenRequest} requestParameters Request parameters.
1007
- * @param {*} [options] Override http request option.
1008
- * @throws {RequiredError}
1009
- * @memberof AuthserviceApi
1010
- */
1011
- AuthserviceApi.prototype.refreshToken = function (requestParameters, options) {
1012
- var _this = this;
1013
- return (0, exports.AuthserviceApiFp)(this.configuration).refreshToken(requestParameters.refreshTokenDto, requestParameters.cookie, options).then(function (request) { return request(_this.axios, _this.basePath); });
1014
- };
1015
- /**
1016
- * Change tenant user\'s password using the token provided by the reset password endpoint.
1017
- * @summary Change password by tenant
1018
- * @param {AuthserviceApiResetPasswordRequest} requestParameters Request parameters.
1019
- * @param {*} [options] Override http request option.
1020
- * @throws {RequiredError}
1021
- * @memberof AuthserviceApi
1022
- */
1023
- AuthserviceApi.prototype.resetPassword = function (requestParameters, options) {
1024
- var _this = this;
1025
- return (0, exports.AuthserviceApiFp)(this.configuration).resetPassword(requestParameters.resetPasswordRequestDto, options).then(function (request) { return request(_this.axios, _this.basePath); });
1026
- };
1027
- /**
1028
- * Verify the invite sent to the tenant user via email.
1029
- * @summary Verify tenant user\'s invite token
1030
- * @param {AuthserviceApiVerifyInviteRequest} requestParameters Request parameters.
1031
- * @param {*} [options] Override http request option.
1032
- * @throws {RequiredError}
1033
- * @memberof AuthserviceApi
1034
- */
1035
- AuthserviceApi.prototype.verifyInvite = function (requestParameters, options) {
1036
- var _this = this;
1037
- return (0, exports.AuthserviceApiFp)(this.configuration).verifyInvite(requestParameters.token, options).then(function (request) { return request(_this.axios, _this.basePath); });
1038
- };
1039
- /**
1040
- * Verifies token and returns necessary data for signing up as an organization.
1041
- * @summary Verify a organization\'s invitation token
1042
- * @param {AuthserviceApiVerifyOrgInvitationRequest} requestParameters Request parameters.
1043
- * @param {*} [options] Override http request option.
1044
- * @throws {RequiredError}
1045
- * @memberof AuthserviceApi
1046
- */
1047
- AuthserviceApi.prototype.verifyOrgInvitation = function (requestParameters, options) {
1048
- var _this = this;
1049
- return (0, exports.AuthserviceApiFp)(this.configuration).verifyOrgInvitation(requestParameters.invitationToken, options).then(function (request) { return request(_this.axios, _this.basePath); });
1050
- };
1051
- /**
1052
- * Verify the reset password token that is sent by calling the \'forgot password\' endpoint.
1053
- * @summary Verify tenant reset password token
1054
- * @param {AuthserviceApiVerifyResetPasswordTokenRequest} requestParameters Request parameters.
1055
- * @param {*} [options] Override http request option.
1056
- * @throws {RequiredError}
1057
- * @memberof AuthserviceApi
1058
- */
1059
- AuthserviceApi.prototype.verifyResetPasswordToken = function (requestParameters, options) {
1060
- var _this = this;
1061
- return (0, exports.AuthserviceApiFp)(this.configuration).verifyResetPasswordToken(requestParameters.resetToken, options).then(function (request) { return request(_this.axios, _this.basePath); });
1062
- };
1063
- return AuthserviceApi;
1064
- }(base_1.BaseAPI));
1065
- exports.AuthserviceApi = AuthserviceApi;