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