@ahomevilla-hotel/node-sdk 1.0.0 → 1.0.2

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 (2) hide show
  1. package/api.ts +327 -78
  2. package/package.json +1 -1
package/api.ts CHANGED
@@ -282,6 +282,19 @@ export interface ImageUploadResponseDto {
282
282
  */
283
283
  'publicId': string;
284
284
  }
285
+ /**
286
+ *
287
+ * @export
288
+ * @interface InitiateForgotPasswordEmailDto
289
+ */
290
+ export interface InitiateForgotPasswordEmailDto {
291
+ /**
292
+ * Email address of the user who forgot their password
293
+ * @type {string}
294
+ * @memberof InitiateForgotPasswordEmailDto
295
+ */
296
+ 'email': string;
297
+ }
285
298
  /**
286
299
  *
287
300
  * @export
@@ -327,24 +340,37 @@ export interface LoginDto {
327
340
  */
328
341
  export interface LoginResponseDto {
329
342
  /**
330
- *
343
+ * New access token
331
344
  * @type {string}
332
345
  * @memberof LoginResponseDto
333
346
  */
334
347
  'accessToken': string;
335
348
  /**
336
- *
349
+ * Timestamp when the access token expires
337
350
  * @type {number}
338
351
  * @memberof LoginResponseDto
339
352
  */
340
353
  'accessTokenExpires': number;
341
354
  /**
342
- *
355
+ * New refresh token
343
356
  * @type {string}
344
357
  * @memberof LoginResponseDto
345
358
  */
346
359
  'refreshToken': string;
347
360
  }
361
+ /**
362
+ *
363
+ * @export
364
+ * @interface LogoutResponseDto
365
+ */
366
+ export interface LogoutResponseDto {
367
+ /**
368
+ * Success message
369
+ * @type {string}
370
+ * @memberof LogoutResponseDto
371
+ */
372
+ 'message': string;
373
+ }
348
374
  /**
349
375
  *
350
376
  * @export
@@ -407,6 +433,71 @@ export interface ProvincePaginationResultDto {
407
433
  */
408
434
  'meta': UsersPaginationResultDtoMeta;
409
435
  }
436
+ /**
437
+ *
438
+ * @export
439
+ * @interface RefreshTokenDto
440
+ */
441
+ export interface RefreshTokenDto {
442
+ /**
443
+ * The refresh token to renew access
444
+ * @type {string}
445
+ * @memberof RefreshTokenDto
446
+ */
447
+ 'refreshToken': string;
448
+ }
449
+ /**
450
+ *
451
+ * @export
452
+ * @interface RefreshTokenResponseDto
453
+ */
454
+ export interface RefreshTokenResponseDto {
455
+ /**
456
+ * New access token
457
+ * @type {string}
458
+ * @memberof RefreshTokenResponseDto
459
+ */
460
+ 'accessToken': string;
461
+ /**
462
+ * Timestamp when the access token expires
463
+ * @type {number}
464
+ * @memberof RefreshTokenResponseDto
465
+ */
466
+ 'accessTokenExpires': number;
467
+ /**
468
+ * New refresh token
469
+ * @type {string}
470
+ * @memberof RefreshTokenResponseDto
471
+ */
472
+ 'refreshToken': string;
473
+ }
474
+ /**
475
+ *
476
+ * @export
477
+ * @interface RegisterDto
478
+ */
479
+ export interface RegisterDto {
480
+ /**
481
+ *
482
+ * @type {CreateUserDto}
483
+ * @memberof RegisterDto
484
+ */
485
+ 'data': CreateUserDto;
486
+ /**
487
+ *
488
+ * @type {string}
489
+ * @memberof RegisterDto
490
+ */
491
+ 'accountIdentifier': RegisterDtoAccountIdentifierEnum;
492
+ }
493
+
494
+ export const RegisterDtoAccountIdentifierEnum = {
495
+ Email: 'EMAIL',
496
+ Phone: 'PHONE'
497
+ } as const;
498
+
499
+ export type RegisterDtoAccountIdentifierEnum = typeof RegisterDtoAccountIdentifierEnum[keyof typeof RegisterDtoAccountIdentifierEnum];
500
+
410
501
  /**
411
502
  *
412
503
  * @export
@@ -440,6 +531,57 @@ export const RegisterResponseDtoIdentifierTypeEnum = {
440
531
 
441
532
  export type RegisterResponseDtoIdentifierTypeEnum = typeof RegisterResponseDtoIdentifierTypeEnum[keyof typeof RegisterResponseDtoIdentifierTypeEnum];
442
533
 
534
+ /**
535
+ *
536
+ * @export
537
+ * @interface ResetPasswordWithOTPEmailDto
538
+ */
539
+ export interface ResetPasswordWithOTPEmailDto {
540
+ /**
541
+ * Email address of the user
542
+ * @type {string}
543
+ * @memberof ResetPasswordWithOTPEmailDto
544
+ */
545
+ 'email': string;
546
+ /**
547
+ * Six digit verification code sent to email
548
+ * @type {string}
549
+ * @memberof ResetPasswordWithOTPEmailDto
550
+ */
551
+ 'code': string;
552
+ /**
553
+ * New password to set
554
+ * @type {string}
555
+ * @memberof ResetPasswordWithOTPEmailDto
556
+ */
557
+ 'newPassword': string;
558
+ }
559
+ /**
560
+ *
561
+ * @export
562
+ * @interface RevokeSessionResponseDto
563
+ */
564
+ export interface RevokeSessionResponseDto {
565
+ /**
566
+ * Success message
567
+ * @type {string}
568
+ * @memberof RevokeSessionResponseDto
569
+ */
570
+ 'message': string;
571
+ }
572
+ /**
573
+ *
574
+ * @export
575
+ * @interface SessionResponseDto
576
+ */
577
+ export interface SessionResponseDto {
578
+ /**
579
+ * List of active user sessions
580
+ * @type {Array<string>}
581
+ * @memberof SessionResponseDto
582
+ */
583
+ 'sessions': Array<string>;
584
+ }
443
585
  /**
444
586
  *
445
587
  * @export
@@ -580,6 +722,12 @@ export interface User {
580
722
  * @memberof User
581
723
  */
582
724
  'verified_phone': boolean;
725
+ /**
726
+ *
727
+ * @type {string}
728
+ * @memberof User
729
+ */
730
+ 'identifier_type': UserIdentifierTypeEnum;
583
731
  /**
584
732
  *
585
733
  * @type {boolean}
@@ -600,6 +748,12 @@ export interface User {
600
748
  'role': UserRoleEnum;
601
749
  }
602
750
 
751
+ export const UserIdentifierTypeEnum = {
752
+ Email: 'EMAIL',
753
+ Phone: 'PHONE'
754
+ } as const;
755
+
756
+ export type UserIdentifierTypeEnum = typeof UserIdentifierTypeEnum[keyof typeof UserIdentifierTypeEnum];
603
757
  export const UserRoleEnum = {
604
758
  User: 'USER',
605
759
  Staff: 'STAFF',
@@ -1349,7 +1503,8 @@ export class AppApi extends BaseAPI {
1349
1503
  export const AuthApiAxiosParamCreator = function (configuration?: Configuration) {
1350
1504
  return {
1351
1505
  /**
1352
- *
1506
+ * Retrieve all active sessions for the current user
1507
+ * @summary Get active sessions
1353
1508
  * @param {*} [options] Override http request option.
1354
1509
  * @throws {RequiredError}
1355
1510
  */
@@ -1379,6 +1534,37 @@ export const AuthApiAxiosParamCreator = function (configuration?: Configuration)
1379
1534
  },
1380
1535
  /**
1381
1536
  *
1537
+ * @summary Get current user profile
1538
+ * @param {*} [options] Override http request option.
1539
+ * @throws {RequiredError}
1540
+ */
1541
+ authControllerGetProfile: async (options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
1542
+ const localVarPath = `/api/auth/profile`;
1543
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1544
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1545
+ let baseOptions;
1546
+ if (configuration) {
1547
+ baseOptions = configuration.baseOptions;
1548
+ }
1549
+
1550
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
1551
+ const localVarHeaderParameter = {} as any;
1552
+ const localVarQueryParameter = {} as any;
1553
+
1554
+
1555
+
1556
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1557
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1558
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
1559
+
1560
+ return {
1561
+ url: toPathString(localVarUrlObj),
1562
+ options: localVarRequestOptions,
1563
+ };
1564
+ },
1565
+ /**
1566
+ * Get analytics data for user sessions. Requires ADMIN role.
1567
+ * @summary Get session analytics
1382
1568
  * @param {string} userId
1383
1569
  * @param {*} [options] Override http request option.
1384
1570
  * @throws {RequiredError}
@@ -1414,7 +1600,8 @@ export const AuthApiAxiosParamCreator = function (configuration?: Configuration)
1414
1600
  };
1415
1601
  },
1416
1602
  /**
1417
- *
1603
+ * Get suspicious activities for a specific user. Requires ADMIN role.
1604
+ * @summary Get suspicious activities
1418
1605
  * @param {string} userId
1419
1606
  * @param {*} [options] Override http request option.
1420
1607
  * @throws {RequiredError}
@@ -1449,13 +1636,13 @@ export const AuthApiAxiosParamCreator = function (configuration?: Configuration)
1449
1636
  /**
1450
1637
  *
1451
1638
  * @summary Initiate forgot password process
1452
- * @param {object} body
1639
+ * @param {InitiateForgotPasswordEmailDto} initiateForgotPasswordEmailDto
1453
1640
  * @param {*} [options] Override http request option.
1454
1641
  * @throws {RequiredError}
1455
1642
  */
1456
- authControllerInitiateForgotPassword: async (body: object, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
1457
- // verify required parameter 'body' is not null or undefined
1458
- assertParamExists('authControllerInitiateForgotPassword', 'body', body)
1643
+ authControllerInitiateForgotPassword: async (initiateForgotPasswordEmailDto: InitiateForgotPasswordEmailDto, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
1644
+ // verify required parameter 'initiateForgotPasswordEmailDto' is not null or undefined
1645
+ assertParamExists('authControllerInitiateForgotPassword', 'initiateForgotPasswordEmailDto', initiateForgotPasswordEmailDto)
1459
1646
  const localVarPath = `/api/auth/forgot-password/email/initiate`;
1460
1647
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
1461
1648
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
@@ -1475,7 +1662,7 @@ export const AuthApiAxiosParamCreator = function (configuration?: Configuration)
1475
1662
  setSearchParams(localVarUrlObj, localVarQueryParameter);
1476
1663
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1477
1664
  localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
1478
- localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration)
1665
+ localVarRequestOptions.data = serializeDataIfNeeded(initiateForgotPasswordEmailDto, localVarRequestOptions, configuration)
1479
1666
 
1480
1667
  return {
1481
1668
  url: toPathString(localVarUrlObj),
@@ -1524,7 +1711,8 @@ export const AuthApiAxiosParamCreator = function (configuration?: Configuration)
1524
1711
  };
1525
1712
  },
1526
1713
  /**
1527
- *
1714
+ * Revoke the current refresh token, effectively logging out the user
1715
+ * @summary Logout user
1528
1716
  * @param {*} [options] Override http request option.
1529
1717
  * @throws {RequiredError}
1530
1718
  */
@@ -1553,11 +1741,15 @@ export const AuthApiAxiosParamCreator = function (configuration?: Configuration)
1553
1741
  };
1554
1742
  },
1555
1743
  /**
1556
- *
1744
+ * Exchange a valid refresh token for a new access token and refresh token pair
1745
+ * @summary Refresh access token
1746
+ * @param {RefreshTokenDto} refreshTokenDto
1557
1747
  * @param {*} [options] Override http request option.
1558
1748
  * @throws {RequiredError}
1559
1749
  */
1560
- authControllerRefreshTokens: async (options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
1750
+ authControllerRefreshTokens: async (refreshTokenDto: RefreshTokenDto, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
1751
+ // verify required parameter 'refreshTokenDto' is not null or undefined
1752
+ assertParamExists('authControllerRefreshTokens', 'refreshTokenDto', refreshTokenDto)
1561
1753
  const localVarPath = `/api/auth/refresh`;
1562
1754
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
1563
1755
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
@@ -1572,9 +1764,12 @@ export const AuthApiAxiosParamCreator = function (configuration?: Configuration)
1572
1764
 
1573
1765
 
1574
1766
 
1767
+ localVarHeaderParameter['Content-Type'] = 'application/json';
1768
+
1575
1769
  setSearchParams(localVarUrlObj, localVarQueryParameter);
1576
1770
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1577
1771
  localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
1772
+ localVarRequestOptions.data = serializeDataIfNeeded(refreshTokenDto, localVarRequestOptions, configuration)
1578
1773
 
1579
1774
  return {
1580
1775
  url: toPathString(localVarUrlObj),
@@ -1583,13 +1778,13 @@ export const AuthApiAxiosParamCreator = function (configuration?: Configuration)
1583
1778
  },
1584
1779
  /**
1585
1780
  *
1586
- * @param {CreateUserDto} createUserDto
1781
+ * @param {RegisterDto} registerDto
1587
1782
  * @param {*} [options] Override http request option.
1588
1783
  * @throws {RequiredError}
1589
1784
  */
1590
- authControllerRegister: async (createUserDto: CreateUserDto, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
1591
- // verify required parameter 'createUserDto' is not null or undefined
1592
- assertParamExists('authControllerRegister', 'createUserDto', createUserDto)
1785
+ authControllerRegister: async (registerDto: RegisterDto, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
1786
+ // verify required parameter 'registerDto' is not null or undefined
1787
+ assertParamExists('authControllerRegister', 'registerDto', registerDto)
1593
1788
  const localVarPath = `/api/auth/register`;
1594
1789
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
1595
1790
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
@@ -1609,7 +1804,7 @@ export const AuthApiAxiosParamCreator = function (configuration?: Configuration)
1609
1804
  setSearchParams(localVarUrlObj, localVarQueryParameter);
1610
1805
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1611
1806
  localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
1612
- localVarRequestOptions.data = serializeDataIfNeeded(createUserDto, localVarRequestOptions, configuration)
1807
+ localVarRequestOptions.data = serializeDataIfNeeded(registerDto, localVarRequestOptions, configuration)
1613
1808
 
1614
1809
  return {
1615
1810
  url: toPathString(localVarUrlObj),
@@ -1619,13 +1814,13 @@ export const AuthApiAxiosParamCreator = function (configuration?: Configuration)
1619
1814
  /**
1620
1815
  *
1621
1816
  * @summary Reset password using OTP
1622
- * @param {object} body
1817
+ * @param {ResetPasswordWithOTPEmailDto} resetPasswordWithOTPEmailDto
1623
1818
  * @param {*} [options] Override http request option.
1624
1819
  * @throws {RequiredError}
1625
1820
  */
1626
- authControllerResetPasswordWithOTP: async (body: object, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
1627
- // verify required parameter 'body' is not null or undefined
1628
- assertParamExists('authControllerResetPasswordWithOTP', 'body', body)
1821
+ authControllerResetPasswordWithOTP: async (resetPasswordWithOTPEmailDto: ResetPasswordWithOTPEmailDto, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
1822
+ // verify required parameter 'resetPasswordWithOTPEmailDto' is not null or undefined
1823
+ assertParamExists('authControllerResetPasswordWithOTP', 'resetPasswordWithOTPEmailDto', resetPasswordWithOTPEmailDto)
1629
1824
  const localVarPath = `/api/auth/forgot-password/email/reset`;
1630
1825
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
1631
1826
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
@@ -1645,7 +1840,7 @@ export const AuthApiAxiosParamCreator = function (configuration?: Configuration)
1645
1840
  setSearchParams(localVarUrlObj, localVarQueryParameter);
1646
1841
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1647
1842
  localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
1648
- localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration)
1843
+ localVarRequestOptions.data = serializeDataIfNeeded(resetPasswordWithOTPEmailDto, localVarRequestOptions, configuration)
1649
1844
 
1650
1845
  return {
1651
1846
  url: toPathString(localVarUrlObj),
@@ -1653,7 +1848,8 @@ export const AuthApiAxiosParamCreator = function (configuration?: Configuration)
1653
1848
  };
1654
1849
  },
1655
1850
  /**
1656
- *
1851
+ * Revoke a specific session by its ID
1852
+ * @summary Revoke specific session
1657
1853
  * @param {string} sessionId
1658
1854
  * @param {*} [options] Override http request option.
1659
1855
  * @throws {RequiredError}
@@ -1732,11 +1928,12 @@ export const AuthApiFp = function(configuration?: Configuration) {
1732
1928
  const localVarAxiosParamCreator = AuthApiAxiosParamCreator(configuration)
1733
1929
  return {
1734
1930
  /**
1735
- *
1931
+ * Retrieve all active sessions for the current user
1932
+ * @summary Get active sessions
1736
1933
  * @param {*} [options] Override http request option.
1737
1934
  * @throws {RequiredError}
1738
1935
  */
1739
- async authControllerGetActiveSessions(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
1936
+ async authControllerGetActiveSessions(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<SessionResponseDto>> {
1740
1937
  const localVarAxiosArgs = await localVarAxiosParamCreator.authControllerGetActiveSessions(options);
1741
1938
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1742
1939
  const localVarOperationServerBasePath = operationServerMap['AuthApi.authControllerGetActiveSessions']?.[localVarOperationServerIndex]?.url;
@@ -1744,6 +1941,19 @@ export const AuthApiFp = function(configuration?: Configuration) {
1744
1941
  },
1745
1942
  /**
1746
1943
  *
1944
+ * @summary Get current user profile
1945
+ * @param {*} [options] Override http request option.
1946
+ * @throws {RequiredError}
1947
+ */
1948
+ async authControllerGetProfile(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<User>> {
1949
+ const localVarAxiosArgs = await localVarAxiosParamCreator.authControllerGetProfile(options);
1950
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1951
+ const localVarOperationServerBasePath = operationServerMap['AuthApi.authControllerGetProfile']?.[localVarOperationServerIndex]?.url;
1952
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1953
+ },
1954
+ /**
1955
+ * Get analytics data for user sessions. Requires ADMIN role.
1956
+ * @summary Get session analytics
1747
1957
  * @param {string} userId
1748
1958
  * @param {*} [options] Override http request option.
1749
1959
  * @throws {RequiredError}
@@ -1755,7 +1965,8 @@ export const AuthApiFp = function(configuration?: Configuration) {
1755
1965
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1756
1966
  },
1757
1967
  /**
1758
- *
1968
+ * Get suspicious activities for a specific user. Requires ADMIN role.
1969
+ * @summary Get suspicious activities
1759
1970
  * @param {string} userId
1760
1971
  * @param {*} [options] Override http request option.
1761
1972
  * @throws {RequiredError}
@@ -1769,12 +1980,12 @@ export const AuthApiFp = function(configuration?: Configuration) {
1769
1980
  /**
1770
1981
  *
1771
1982
  * @summary Initiate forgot password process
1772
- * @param {object} body
1983
+ * @param {InitiateForgotPasswordEmailDto} initiateForgotPasswordEmailDto
1773
1984
  * @param {*} [options] Override http request option.
1774
1985
  * @throws {RequiredError}
1775
1986
  */
1776
- async authControllerInitiateForgotPassword(body: object, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
1777
- const localVarAxiosArgs = await localVarAxiosParamCreator.authControllerInitiateForgotPassword(body, options);
1987
+ async authControllerInitiateForgotPassword(initiateForgotPasswordEmailDto: InitiateForgotPasswordEmailDto, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
1988
+ const localVarAxiosArgs = await localVarAxiosParamCreator.authControllerInitiateForgotPassword(initiateForgotPasswordEmailDto, options);
1778
1989
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1779
1990
  const localVarOperationServerBasePath = operationServerMap['AuthApi.authControllerInitiateForgotPassword']?.[localVarOperationServerIndex]?.url;
1780
1991
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
@@ -1793,35 +2004,38 @@ export const AuthApiFp = function(configuration?: Configuration) {
1793
2004
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1794
2005
  },
1795
2006
  /**
1796
- *
2007
+ * Revoke the current refresh token, effectively logging out the user
2008
+ * @summary Logout user
1797
2009
  * @param {*} [options] Override http request option.
1798
2010
  * @throws {RequiredError}
1799
2011
  */
1800
- async authControllerLogout(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
2012
+ async authControllerLogout(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<LogoutResponseDto>> {
1801
2013
  const localVarAxiosArgs = await localVarAxiosParamCreator.authControllerLogout(options);
1802
2014
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1803
2015
  const localVarOperationServerBasePath = operationServerMap['AuthApi.authControllerLogout']?.[localVarOperationServerIndex]?.url;
1804
2016
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1805
2017
  },
1806
2018
  /**
1807
- *
2019
+ * Exchange a valid refresh token for a new access token and refresh token pair
2020
+ * @summary Refresh access token
2021
+ * @param {RefreshTokenDto} refreshTokenDto
1808
2022
  * @param {*} [options] Override http request option.
1809
2023
  * @throws {RequiredError}
1810
2024
  */
1811
- async authControllerRefreshTokens(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
1812
- const localVarAxiosArgs = await localVarAxiosParamCreator.authControllerRefreshTokens(options);
2025
+ async authControllerRefreshTokens(refreshTokenDto: RefreshTokenDto, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<RefreshTokenResponseDto>> {
2026
+ const localVarAxiosArgs = await localVarAxiosParamCreator.authControllerRefreshTokens(refreshTokenDto, options);
1813
2027
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1814
2028
  const localVarOperationServerBasePath = operationServerMap['AuthApi.authControllerRefreshTokens']?.[localVarOperationServerIndex]?.url;
1815
2029
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1816
2030
  },
1817
2031
  /**
1818
2032
  *
1819
- * @param {CreateUserDto} createUserDto
2033
+ * @param {RegisterDto} registerDto
1820
2034
  * @param {*} [options] Override http request option.
1821
2035
  * @throws {RequiredError}
1822
2036
  */
1823
- async authControllerRegister(createUserDto: CreateUserDto, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<RegisterResponseDto>> {
1824
- const localVarAxiosArgs = await localVarAxiosParamCreator.authControllerRegister(createUserDto, options);
2037
+ async authControllerRegister(registerDto: RegisterDto, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<RegisterResponseDto>> {
2038
+ const localVarAxiosArgs = await localVarAxiosParamCreator.authControllerRegister(registerDto, options);
1825
2039
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1826
2040
  const localVarOperationServerBasePath = operationServerMap['AuthApi.authControllerRegister']?.[localVarOperationServerIndex]?.url;
1827
2041
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
@@ -1829,23 +2043,24 @@ export const AuthApiFp = function(configuration?: Configuration) {
1829
2043
  /**
1830
2044
  *
1831
2045
  * @summary Reset password using OTP
1832
- * @param {object} body
2046
+ * @param {ResetPasswordWithOTPEmailDto} resetPasswordWithOTPEmailDto
1833
2047
  * @param {*} [options] Override http request option.
1834
2048
  * @throws {RequiredError}
1835
2049
  */
1836
- async authControllerResetPasswordWithOTP(body: object, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
1837
- const localVarAxiosArgs = await localVarAxiosParamCreator.authControllerResetPasswordWithOTP(body, options);
2050
+ async authControllerResetPasswordWithOTP(resetPasswordWithOTPEmailDto: ResetPasswordWithOTPEmailDto, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
2051
+ const localVarAxiosArgs = await localVarAxiosParamCreator.authControllerResetPasswordWithOTP(resetPasswordWithOTPEmailDto, options);
1838
2052
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1839
2053
  const localVarOperationServerBasePath = operationServerMap['AuthApi.authControllerResetPasswordWithOTP']?.[localVarOperationServerIndex]?.url;
1840
2054
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1841
2055
  },
1842
2056
  /**
1843
- *
2057
+ * Revoke a specific session by its ID
2058
+ * @summary Revoke specific session
1844
2059
  * @param {string} sessionId
1845
2060
  * @param {*} [options] Override http request option.
1846
2061
  * @throws {RequiredError}
1847
2062
  */
1848
- async authControllerRevokeSession(sessionId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
2063
+ async authControllerRevokeSession(sessionId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<RevokeSessionResponseDto>> {
1849
2064
  const localVarAxiosArgs = await localVarAxiosParamCreator.authControllerRevokeSession(sessionId, options);
1850
2065
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1851
2066
  const localVarOperationServerBasePath = operationServerMap['AuthApi.authControllerRevokeSession']?.[localVarOperationServerIndex]?.url;
@@ -1875,15 +2090,26 @@ export const AuthApiFactory = function (configuration?: Configuration, basePath?
1875
2090
  const localVarFp = AuthApiFp(configuration)
1876
2091
  return {
1877
2092
  /**
1878
- *
2093
+ * Retrieve all active sessions for the current user
2094
+ * @summary Get active sessions
1879
2095
  * @param {*} [options] Override http request option.
1880
2096
  * @throws {RequiredError}
1881
2097
  */
1882
- authControllerGetActiveSessions(options?: RawAxiosRequestConfig): AxiosPromise<void> {
2098
+ authControllerGetActiveSessions(options?: RawAxiosRequestConfig): AxiosPromise<SessionResponseDto> {
1883
2099
  return localVarFp.authControllerGetActiveSessions(options).then((request) => request(axios, basePath));
1884
2100
  },
1885
2101
  /**
1886
2102
  *
2103
+ * @summary Get current user profile
2104
+ * @param {*} [options] Override http request option.
2105
+ * @throws {RequiredError}
2106
+ */
2107
+ authControllerGetProfile(options?: RawAxiosRequestConfig): AxiosPromise<User> {
2108
+ return localVarFp.authControllerGetProfile(options).then((request) => request(axios, basePath));
2109
+ },
2110
+ /**
2111
+ * Get analytics data for user sessions. Requires ADMIN role.
2112
+ * @summary Get session analytics
1887
2113
  * @param {string} userId
1888
2114
  * @param {*} [options] Override http request option.
1889
2115
  * @throws {RequiredError}
@@ -1892,7 +2118,8 @@ export const AuthApiFactory = function (configuration?: Configuration, basePath?
1892
2118
  return localVarFp.authControllerGetSessionAnalytics(userId, options).then((request) => request(axios, basePath));
1893
2119
  },
1894
2120
  /**
1895
- *
2121
+ * Get suspicious activities for a specific user. Requires ADMIN role.
2122
+ * @summary Get suspicious activities
1896
2123
  * @param {string} userId
1897
2124
  * @param {*} [options] Override http request option.
1898
2125
  * @throws {RequiredError}
@@ -1903,12 +2130,12 @@ export const AuthApiFactory = function (configuration?: Configuration, basePath?
1903
2130
  /**
1904
2131
  *
1905
2132
  * @summary Initiate forgot password process
1906
- * @param {object} body
2133
+ * @param {InitiateForgotPasswordEmailDto} initiateForgotPasswordEmailDto
1907
2134
  * @param {*} [options] Override http request option.
1908
2135
  * @throws {RequiredError}
1909
2136
  */
1910
- authControllerInitiateForgotPassword(body: object, options?: RawAxiosRequestConfig): AxiosPromise<void> {
1911
- return localVarFp.authControllerInitiateForgotPassword(body, options).then((request) => request(axios, basePath));
2137
+ authControllerInitiateForgotPassword(initiateForgotPasswordEmailDto: InitiateForgotPasswordEmailDto, options?: RawAxiosRequestConfig): AxiosPromise<void> {
2138
+ return localVarFp.authControllerInitiateForgotPassword(initiateForgotPasswordEmailDto, options).then((request) => request(axios, basePath));
1912
2139
  },
1913
2140
  /**
1914
2141
  *
@@ -1921,47 +2148,51 @@ export const AuthApiFactory = function (configuration?: Configuration, basePath?
1921
2148
  return localVarFp.authControllerLogin(userAgent, loginDto, options).then((request) => request(axios, basePath));
1922
2149
  },
1923
2150
  /**
1924
- *
2151
+ * Revoke the current refresh token, effectively logging out the user
2152
+ * @summary Logout user
1925
2153
  * @param {*} [options] Override http request option.
1926
2154
  * @throws {RequiredError}
1927
2155
  */
1928
- authControllerLogout(options?: RawAxiosRequestConfig): AxiosPromise<void> {
2156
+ authControllerLogout(options?: RawAxiosRequestConfig): AxiosPromise<LogoutResponseDto> {
1929
2157
  return localVarFp.authControllerLogout(options).then((request) => request(axios, basePath));
1930
2158
  },
1931
2159
  /**
1932
- *
2160
+ * Exchange a valid refresh token for a new access token and refresh token pair
2161
+ * @summary Refresh access token
2162
+ * @param {RefreshTokenDto} refreshTokenDto
1933
2163
  * @param {*} [options] Override http request option.
1934
2164
  * @throws {RequiredError}
1935
2165
  */
1936
- authControllerRefreshTokens(options?: RawAxiosRequestConfig): AxiosPromise<void> {
1937
- return localVarFp.authControllerRefreshTokens(options).then((request) => request(axios, basePath));
2166
+ authControllerRefreshTokens(refreshTokenDto: RefreshTokenDto, options?: RawAxiosRequestConfig): AxiosPromise<RefreshTokenResponseDto> {
2167
+ return localVarFp.authControllerRefreshTokens(refreshTokenDto, options).then((request) => request(axios, basePath));
1938
2168
  },
1939
2169
  /**
1940
2170
  *
1941
- * @param {CreateUserDto} createUserDto
2171
+ * @param {RegisterDto} registerDto
1942
2172
  * @param {*} [options] Override http request option.
1943
2173
  * @throws {RequiredError}
1944
2174
  */
1945
- authControllerRegister(createUserDto: CreateUserDto, options?: RawAxiosRequestConfig): AxiosPromise<RegisterResponseDto> {
1946
- return localVarFp.authControllerRegister(createUserDto, options).then((request) => request(axios, basePath));
2175
+ authControllerRegister(registerDto: RegisterDto, options?: RawAxiosRequestConfig): AxiosPromise<RegisterResponseDto> {
2176
+ return localVarFp.authControllerRegister(registerDto, options).then((request) => request(axios, basePath));
1947
2177
  },
1948
2178
  /**
1949
2179
  *
1950
2180
  * @summary Reset password using OTP
1951
- * @param {object} body
2181
+ * @param {ResetPasswordWithOTPEmailDto} resetPasswordWithOTPEmailDto
1952
2182
  * @param {*} [options] Override http request option.
1953
2183
  * @throws {RequiredError}
1954
2184
  */
1955
- authControllerResetPasswordWithOTP(body: object, options?: RawAxiosRequestConfig): AxiosPromise<void> {
1956
- return localVarFp.authControllerResetPasswordWithOTP(body, options).then((request) => request(axios, basePath));
2185
+ authControllerResetPasswordWithOTP(resetPasswordWithOTPEmailDto: ResetPasswordWithOTPEmailDto, options?: RawAxiosRequestConfig): AxiosPromise<void> {
2186
+ return localVarFp.authControllerResetPasswordWithOTP(resetPasswordWithOTPEmailDto, options).then((request) => request(axios, basePath));
1957
2187
  },
1958
2188
  /**
1959
- *
2189
+ * Revoke a specific session by its ID
2190
+ * @summary Revoke specific session
1960
2191
  * @param {string} sessionId
1961
2192
  * @param {*} [options] Override http request option.
1962
2193
  * @throws {RequiredError}
1963
2194
  */
1964
- authControllerRevokeSession(sessionId: string, options?: RawAxiosRequestConfig): AxiosPromise<void> {
2195
+ authControllerRevokeSession(sessionId: string, options?: RawAxiosRequestConfig): AxiosPromise<RevokeSessionResponseDto> {
1965
2196
  return localVarFp.authControllerRevokeSession(sessionId, options).then((request) => request(axios, basePath));
1966
2197
  },
1967
2198
  /**
@@ -1985,7 +2216,8 @@ export const AuthApiFactory = function (configuration?: Configuration, basePath?
1985
2216
  */
1986
2217
  export class AuthApi extends BaseAPI {
1987
2218
  /**
1988
- *
2219
+ * Retrieve all active sessions for the current user
2220
+ * @summary Get active sessions
1989
2221
  * @param {*} [options] Override http request option.
1990
2222
  * @throws {RequiredError}
1991
2223
  * @memberof AuthApi
@@ -1996,6 +2228,18 @@ export class AuthApi extends BaseAPI {
1996
2228
 
1997
2229
  /**
1998
2230
  *
2231
+ * @summary Get current user profile
2232
+ * @param {*} [options] Override http request option.
2233
+ * @throws {RequiredError}
2234
+ * @memberof AuthApi
2235
+ */
2236
+ public authControllerGetProfile(options?: RawAxiosRequestConfig) {
2237
+ return AuthApiFp(this.configuration).authControllerGetProfile(options).then((request) => request(this.axios, this.basePath));
2238
+ }
2239
+
2240
+ /**
2241
+ * Get analytics data for user sessions. Requires ADMIN role.
2242
+ * @summary Get session analytics
1999
2243
  * @param {string} userId
2000
2244
  * @param {*} [options] Override http request option.
2001
2245
  * @throws {RequiredError}
@@ -2006,7 +2250,8 @@ export class AuthApi extends BaseAPI {
2006
2250
  }
2007
2251
 
2008
2252
  /**
2009
- *
2253
+ * Get suspicious activities for a specific user. Requires ADMIN role.
2254
+ * @summary Get suspicious activities
2010
2255
  * @param {string} userId
2011
2256
  * @param {*} [options] Override http request option.
2012
2257
  * @throws {RequiredError}
@@ -2019,13 +2264,13 @@ export class AuthApi extends BaseAPI {
2019
2264
  /**
2020
2265
  *
2021
2266
  * @summary Initiate forgot password process
2022
- * @param {object} body
2267
+ * @param {InitiateForgotPasswordEmailDto} initiateForgotPasswordEmailDto
2023
2268
  * @param {*} [options] Override http request option.
2024
2269
  * @throws {RequiredError}
2025
2270
  * @memberof AuthApi
2026
2271
  */
2027
- public authControllerInitiateForgotPassword(body: object, options?: RawAxiosRequestConfig) {
2028
- return AuthApiFp(this.configuration).authControllerInitiateForgotPassword(body, options).then((request) => request(this.axios, this.basePath));
2272
+ public authControllerInitiateForgotPassword(initiateForgotPasswordEmailDto: InitiateForgotPasswordEmailDto, options?: RawAxiosRequestConfig) {
2273
+ return AuthApiFp(this.configuration).authControllerInitiateForgotPassword(initiateForgotPasswordEmailDto, options).then((request) => request(this.axios, this.basePath));
2029
2274
  }
2030
2275
 
2031
2276
  /**
@@ -2041,7 +2286,8 @@ export class AuthApi extends BaseAPI {
2041
2286
  }
2042
2287
 
2043
2288
  /**
2044
- *
2289
+ * Revoke the current refresh token, effectively logging out the user
2290
+ * @summary Logout user
2045
2291
  * @param {*} [options] Override http request option.
2046
2292
  * @throws {RequiredError}
2047
2293
  * @memberof AuthApi
@@ -2051,40 +2297,43 @@ export class AuthApi extends BaseAPI {
2051
2297
  }
2052
2298
 
2053
2299
  /**
2054
- *
2300
+ * Exchange a valid refresh token for a new access token and refresh token pair
2301
+ * @summary Refresh access token
2302
+ * @param {RefreshTokenDto} refreshTokenDto
2055
2303
  * @param {*} [options] Override http request option.
2056
2304
  * @throws {RequiredError}
2057
2305
  * @memberof AuthApi
2058
2306
  */
2059
- public authControllerRefreshTokens(options?: RawAxiosRequestConfig) {
2060
- return AuthApiFp(this.configuration).authControllerRefreshTokens(options).then((request) => request(this.axios, this.basePath));
2307
+ public authControllerRefreshTokens(refreshTokenDto: RefreshTokenDto, options?: RawAxiosRequestConfig) {
2308
+ return AuthApiFp(this.configuration).authControllerRefreshTokens(refreshTokenDto, options).then((request) => request(this.axios, this.basePath));
2061
2309
  }
2062
2310
 
2063
2311
  /**
2064
2312
  *
2065
- * @param {CreateUserDto} createUserDto
2313
+ * @param {RegisterDto} registerDto
2066
2314
  * @param {*} [options] Override http request option.
2067
2315
  * @throws {RequiredError}
2068
2316
  * @memberof AuthApi
2069
2317
  */
2070
- public authControllerRegister(createUserDto: CreateUserDto, options?: RawAxiosRequestConfig) {
2071
- return AuthApiFp(this.configuration).authControllerRegister(createUserDto, options).then((request) => request(this.axios, this.basePath));
2318
+ public authControllerRegister(registerDto: RegisterDto, options?: RawAxiosRequestConfig) {
2319
+ return AuthApiFp(this.configuration).authControllerRegister(registerDto, options).then((request) => request(this.axios, this.basePath));
2072
2320
  }
2073
2321
 
2074
2322
  /**
2075
2323
  *
2076
2324
  * @summary Reset password using OTP
2077
- * @param {object} body
2325
+ * @param {ResetPasswordWithOTPEmailDto} resetPasswordWithOTPEmailDto
2078
2326
  * @param {*} [options] Override http request option.
2079
2327
  * @throws {RequiredError}
2080
2328
  * @memberof AuthApi
2081
2329
  */
2082
- public authControllerResetPasswordWithOTP(body: object, options?: RawAxiosRequestConfig) {
2083
- return AuthApiFp(this.configuration).authControllerResetPasswordWithOTP(body, options).then((request) => request(this.axios, this.basePath));
2330
+ public authControllerResetPasswordWithOTP(resetPasswordWithOTPEmailDto: ResetPasswordWithOTPEmailDto, options?: RawAxiosRequestConfig) {
2331
+ return AuthApiFp(this.configuration).authControllerResetPasswordWithOTP(resetPasswordWithOTPEmailDto, options).then((request) => request(this.axios, this.basePath));
2084
2332
  }
2085
2333
 
2086
2334
  /**
2087
- *
2335
+ * Revoke a specific session by its ID
2336
+ * @summary Revoke specific session
2088
2337
  * @param {string} sessionId
2089
2338
  * @param {*} [options] Override http request option.
2090
2339
  * @throws {RequiredError}
package/package.json CHANGED
@@ -10,7 +10,7 @@
10
10
  "openapi-client",
11
11
  "openapi-generator"
12
12
  ],
13
- "version": "1.0.0",
13
+ "version": "1.0.2",
14
14
  "main": "index.js",
15
15
  "scripts": {
16
16
  "test": "echo \"Error: no test specified\" && exit 1"