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