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