@ahomevilla-hotel/node-sdk 1.0.0 → 1.0.1

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 +228 -68
  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,44 @@ 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
+ }
410
474
  /**
411
475
  *
412
476
  * @export
@@ -440,6 +504,57 @@ export const RegisterResponseDtoIdentifierTypeEnum = {
440
504
 
441
505
  export type RegisterResponseDtoIdentifierTypeEnum = typeof RegisterResponseDtoIdentifierTypeEnum[keyof typeof RegisterResponseDtoIdentifierTypeEnum];
442
506
 
507
+ /**
508
+ *
509
+ * @export
510
+ * @interface ResetPasswordWithOTPEmailDto
511
+ */
512
+ export interface ResetPasswordWithOTPEmailDto {
513
+ /**
514
+ * Email address of the user
515
+ * @type {string}
516
+ * @memberof ResetPasswordWithOTPEmailDto
517
+ */
518
+ 'email': string;
519
+ /**
520
+ * Six digit verification code sent to email
521
+ * @type {string}
522
+ * @memberof ResetPasswordWithOTPEmailDto
523
+ */
524
+ 'code': string;
525
+ /**
526
+ * New password to set
527
+ * @type {string}
528
+ * @memberof ResetPasswordWithOTPEmailDto
529
+ */
530
+ 'newPassword': string;
531
+ }
532
+ /**
533
+ *
534
+ * @export
535
+ * @interface RevokeSessionResponseDto
536
+ */
537
+ export interface RevokeSessionResponseDto {
538
+ /**
539
+ * Success message
540
+ * @type {string}
541
+ * @memberof RevokeSessionResponseDto
542
+ */
543
+ 'message': string;
544
+ }
545
+ /**
546
+ *
547
+ * @export
548
+ * @interface SessionResponseDto
549
+ */
550
+ export interface SessionResponseDto {
551
+ /**
552
+ * List of active user sessions
553
+ * @type {Array<string>}
554
+ * @memberof SessionResponseDto
555
+ */
556
+ 'sessions': Array<string>;
557
+ }
443
558
  /**
444
559
  *
445
560
  * @export
@@ -580,6 +695,12 @@ export interface User {
580
695
  * @memberof User
581
696
  */
582
697
  'verified_phone': boolean;
698
+ /**
699
+ *
700
+ * @type {string}
701
+ * @memberof User
702
+ */
703
+ 'identifier_type': UserIdentifierTypeEnum;
583
704
  /**
584
705
  *
585
706
  * @type {boolean}
@@ -600,6 +721,12 @@ export interface User {
600
721
  'role': UserRoleEnum;
601
722
  }
602
723
 
724
+ export const UserIdentifierTypeEnum = {
725
+ Email: 'EMAIL',
726
+ Phone: 'PHONE'
727
+ } as const;
728
+
729
+ export type UserIdentifierTypeEnum = typeof UserIdentifierTypeEnum[keyof typeof UserIdentifierTypeEnum];
603
730
  export const UserRoleEnum = {
604
731
  User: 'USER',
605
732
  Staff: 'STAFF',
@@ -1349,7 +1476,8 @@ export class AppApi extends BaseAPI {
1349
1476
  export const AuthApiAxiosParamCreator = function (configuration?: Configuration) {
1350
1477
  return {
1351
1478
  /**
1352
- *
1479
+ * Retrieve all active sessions for the current user
1480
+ * @summary Get active sessions
1353
1481
  * @param {*} [options] Override http request option.
1354
1482
  * @throws {RequiredError}
1355
1483
  */
@@ -1378,7 +1506,8 @@ export const AuthApiAxiosParamCreator = function (configuration?: Configuration)
1378
1506
  };
1379
1507
  },
1380
1508
  /**
1381
- *
1509
+ * Get analytics data for user sessions. Requires ADMIN role.
1510
+ * @summary Get session analytics
1382
1511
  * @param {string} userId
1383
1512
  * @param {*} [options] Override http request option.
1384
1513
  * @throws {RequiredError}
@@ -1414,7 +1543,8 @@ export const AuthApiAxiosParamCreator = function (configuration?: Configuration)
1414
1543
  };
1415
1544
  },
1416
1545
  /**
1417
- *
1546
+ * Get suspicious activities for a specific user. Requires ADMIN role.
1547
+ * @summary Get suspicious activities
1418
1548
  * @param {string} userId
1419
1549
  * @param {*} [options] Override http request option.
1420
1550
  * @throws {RequiredError}
@@ -1449,13 +1579,13 @@ export const AuthApiAxiosParamCreator = function (configuration?: Configuration)
1449
1579
  /**
1450
1580
  *
1451
1581
  * @summary Initiate forgot password process
1452
- * @param {object} body
1582
+ * @param {InitiateForgotPasswordEmailDto} initiateForgotPasswordEmailDto
1453
1583
  * @param {*} [options] Override http request option.
1454
1584
  * @throws {RequiredError}
1455
1585
  */
1456
- authControllerInitiateForgotPassword: async (body: object, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
1457
- // verify required parameter 'body' is not null or undefined
1458
- assertParamExists('authControllerInitiateForgotPassword', 'body', body)
1586
+ authControllerInitiateForgotPassword: async (initiateForgotPasswordEmailDto: InitiateForgotPasswordEmailDto, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
1587
+ // verify required parameter 'initiateForgotPasswordEmailDto' is not null or undefined
1588
+ assertParamExists('authControllerInitiateForgotPassword', 'initiateForgotPasswordEmailDto', initiateForgotPasswordEmailDto)
1459
1589
  const localVarPath = `/api/auth/forgot-password/email/initiate`;
1460
1590
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
1461
1591
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
@@ -1475,7 +1605,7 @@ export const AuthApiAxiosParamCreator = function (configuration?: Configuration)
1475
1605
  setSearchParams(localVarUrlObj, localVarQueryParameter);
1476
1606
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1477
1607
  localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
1478
- localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration)
1608
+ localVarRequestOptions.data = serializeDataIfNeeded(initiateForgotPasswordEmailDto, localVarRequestOptions, configuration)
1479
1609
 
1480
1610
  return {
1481
1611
  url: toPathString(localVarUrlObj),
@@ -1524,7 +1654,8 @@ export const AuthApiAxiosParamCreator = function (configuration?: Configuration)
1524
1654
  };
1525
1655
  },
1526
1656
  /**
1527
- *
1657
+ * Revoke the current refresh token, effectively logging out the user
1658
+ * @summary Logout user
1528
1659
  * @param {*} [options] Override http request option.
1529
1660
  * @throws {RequiredError}
1530
1661
  */
@@ -1553,11 +1684,15 @@ export const AuthApiAxiosParamCreator = function (configuration?: Configuration)
1553
1684
  };
1554
1685
  },
1555
1686
  /**
1556
- *
1687
+ * Exchange a valid refresh token for a new access token and refresh token pair
1688
+ * @summary Refresh access token
1689
+ * @param {RefreshTokenDto} refreshTokenDto
1557
1690
  * @param {*} [options] Override http request option.
1558
1691
  * @throws {RequiredError}
1559
1692
  */
1560
- authControllerRefreshTokens: async (options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
1693
+ authControllerRefreshTokens: async (refreshTokenDto: RefreshTokenDto, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
1694
+ // verify required parameter 'refreshTokenDto' is not null or undefined
1695
+ assertParamExists('authControllerRefreshTokens', 'refreshTokenDto', refreshTokenDto)
1561
1696
  const localVarPath = `/api/auth/refresh`;
1562
1697
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
1563
1698
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
@@ -1572,9 +1707,12 @@ export const AuthApiAxiosParamCreator = function (configuration?: Configuration)
1572
1707
 
1573
1708
 
1574
1709
 
1710
+ localVarHeaderParameter['Content-Type'] = 'application/json';
1711
+
1575
1712
  setSearchParams(localVarUrlObj, localVarQueryParameter);
1576
1713
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1577
1714
  localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
1715
+ localVarRequestOptions.data = serializeDataIfNeeded(refreshTokenDto, localVarRequestOptions, configuration)
1578
1716
 
1579
1717
  return {
1580
1718
  url: toPathString(localVarUrlObj),
@@ -1619,13 +1757,13 @@ export const AuthApiAxiosParamCreator = function (configuration?: Configuration)
1619
1757
  /**
1620
1758
  *
1621
1759
  * @summary Reset password using OTP
1622
- * @param {object} body
1760
+ * @param {ResetPasswordWithOTPEmailDto} resetPasswordWithOTPEmailDto
1623
1761
  * @param {*} [options] Override http request option.
1624
1762
  * @throws {RequiredError}
1625
1763
  */
1626
- authControllerResetPasswordWithOTP: async (body: object, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
1627
- // verify required parameter 'body' is not null or undefined
1628
- assertParamExists('authControllerResetPasswordWithOTP', 'body', body)
1764
+ authControllerResetPasswordWithOTP: async (resetPasswordWithOTPEmailDto: ResetPasswordWithOTPEmailDto, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
1765
+ // verify required parameter 'resetPasswordWithOTPEmailDto' is not null or undefined
1766
+ assertParamExists('authControllerResetPasswordWithOTP', 'resetPasswordWithOTPEmailDto', resetPasswordWithOTPEmailDto)
1629
1767
  const localVarPath = `/api/auth/forgot-password/email/reset`;
1630
1768
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
1631
1769
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
@@ -1645,7 +1783,7 @@ export const AuthApiAxiosParamCreator = function (configuration?: Configuration)
1645
1783
  setSearchParams(localVarUrlObj, localVarQueryParameter);
1646
1784
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1647
1785
  localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
1648
- localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration)
1786
+ localVarRequestOptions.data = serializeDataIfNeeded(resetPasswordWithOTPEmailDto, localVarRequestOptions, configuration)
1649
1787
 
1650
1788
  return {
1651
1789
  url: toPathString(localVarUrlObj),
@@ -1653,7 +1791,8 @@ export const AuthApiAxiosParamCreator = function (configuration?: Configuration)
1653
1791
  };
1654
1792
  },
1655
1793
  /**
1656
- *
1794
+ * Revoke a specific session by its ID
1795
+ * @summary Revoke specific session
1657
1796
  * @param {string} sessionId
1658
1797
  * @param {*} [options] Override http request option.
1659
1798
  * @throws {RequiredError}
@@ -1732,18 +1871,20 @@ export const AuthApiFp = function(configuration?: Configuration) {
1732
1871
  const localVarAxiosParamCreator = AuthApiAxiosParamCreator(configuration)
1733
1872
  return {
1734
1873
  /**
1735
- *
1874
+ * Retrieve all active sessions for the current user
1875
+ * @summary Get active sessions
1736
1876
  * @param {*} [options] Override http request option.
1737
1877
  * @throws {RequiredError}
1738
1878
  */
1739
- async authControllerGetActiveSessions(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
1879
+ async authControllerGetActiveSessions(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<SessionResponseDto>> {
1740
1880
  const localVarAxiosArgs = await localVarAxiosParamCreator.authControllerGetActiveSessions(options);
1741
1881
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1742
1882
  const localVarOperationServerBasePath = operationServerMap['AuthApi.authControllerGetActiveSessions']?.[localVarOperationServerIndex]?.url;
1743
1883
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1744
1884
  },
1745
1885
  /**
1746
- *
1886
+ * Get analytics data for user sessions. Requires ADMIN role.
1887
+ * @summary Get session analytics
1747
1888
  * @param {string} userId
1748
1889
  * @param {*} [options] Override http request option.
1749
1890
  * @throws {RequiredError}
@@ -1755,7 +1896,8 @@ export const AuthApiFp = function(configuration?: Configuration) {
1755
1896
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1756
1897
  },
1757
1898
  /**
1758
- *
1899
+ * Get suspicious activities for a specific user. Requires ADMIN role.
1900
+ * @summary Get suspicious activities
1759
1901
  * @param {string} userId
1760
1902
  * @param {*} [options] Override http request option.
1761
1903
  * @throws {RequiredError}
@@ -1769,12 +1911,12 @@ export const AuthApiFp = function(configuration?: Configuration) {
1769
1911
  /**
1770
1912
  *
1771
1913
  * @summary Initiate forgot password process
1772
- * @param {object} body
1914
+ * @param {InitiateForgotPasswordEmailDto} initiateForgotPasswordEmailDto
1773
1915
  * @param {*} [options] Override http request option.
1774
1916
  * @throws {RequiredError}
1775
1917
  */
1776
- async authControllerInitiateForgotPassword(body: object, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
1777
- const localVarAxiosArgs = await localVarAxiosParamCreator.authControllerInitiateForgotPassword(body, options);
1918
+ async authControllerInitiateForgotPassword(initiateForgotPasswordEmailDto: InitiateForgotPasswordEmailDto, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
1919
+ const localVarAxiosArgs = await localVarAxiosParamCreator.authControllerInitiateForgotPassword(initiateForgotPasswordEmailDto, options);
1778
1920
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1779
1921
  const localVarOperationServerBasePath = operationServerMap['AuthApi.authControllerInitiateForgotPassword']?.[localVarOperationServerIndex]?.url;
1780
1922
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
@@ -1793,23 +1935,26 @@ export const AuthApiFp = function(configuration?: Configuration) {
1793
1935
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1794
1936
  },
1795
1937
  /**
1796
- *
1938
+ * Revoke the current refresh token, effectively logging out the user
1939
+ * @summary Logout user
1797
1940
  * @param {*} [options] Override http request option.
1798
1941
  * @throws {RequiredError}
1799
1942
  */
1800
- async authControllerLogout(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
1943
+ async authControllerLogout(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<LogoutResponseDto>> {
1801
1944
  const localVarAxiosArgs = await localVarAxiosParamCreator.authControllerLogout(options);
1802
1945
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1803
1946
  const localVarOperationServerBasePath = operationServerMap['AuthApi.authControllerLogout']?.[localVarOperationServerIndex]?.url;
1804
1947
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1805
1948
  },
1806
1949
  /**
1807
- *
1950
+ * Exchange a valid refresh token for a new access token and refresh token pair
1951
+ * @summary Refresh access token
1952
+ * @param {RefreshTokenDto} refreshTokenDto
1808
1953
  * @param {*} [options] Override http request option.
1809
1954
  * @throws {RequiredError}
1810
1955
  */
1811
- async authControllerRefreshTokens(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
1812
- const localVarAxiosArgs = await localVarAxiosParamCreator.authControllerRefreshTokens(options);
1956
+ async authControllerRefreshTokens(refreshTokenDto: RefreshTokenDto, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<RefreshTokenResponseDto>> {
1957
+ const localVarAxiosArgs = await localVarAxiosParamCreator.authControllerRefreshTokens(refreshTokenDto, options);
1813
1958
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1814
1959
  const localVarOperationServerBasePath = operationServerMap['AuthApi.authControllerRefreshTokens']?.[localVarOperationServerIndex]?.url;
1815
1960
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
@@ -1829,23 +1974,24 @@ export const AuthApiFp = function(configuration?: Configuration) {
1829
1974
  /**
1830
1975
  *
1831
1976
  * @summary Reset password using OTP
1832
- * @param {object} body
1977
+ * @param {ResetPasswordWithOTPEmailDto} resetPasswordWithOTPEmailDto
1833
1978
  * @param {*} [options] Override http request option.
1834
1979
  * @throws {RequiredError}
1835
1980
  */
1836
- async authControllerResetPasswordWithOTP(body: object, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
1837
- const localVarAxiosArgs = await localVarAxiosParamCreator.authControllerResetPasswordWithOTP(body, options);
1981
+ async authControllerResetPasswordWithOTP(resetPasswordWithOTPEmailDto: ResetPasswordWithOTPEmailDto, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
1982
+ const localVarAxiosArgs = await localVarAxiosParamCreator.authControllerResetPasswordWithOTP(resetPasswordWithOTPEmailDto, options);
1838
1983
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1839
1984
  const localVarOperationServerBasePath = operationServerMap['AuthApi.authControllerResetPasswordWithOTP']?.[localVarOperationServerIndex]?.url;
1840
1985
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1841
1986
  },
1842
1987
  /**
1843
- *
1988
+ * Revoke a specific session by its ID
1989
+ * @summary Revoke specific session
1844
1990
  * @param {string} sessionId
1845
1991
  * @param {*} [options] Override http request option.
1846
1992
  * @throws {RequiredError}
1847
1993
  */
1848
- async authControllerRevokeSession(sessionId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
1994
+ async authControllerRevokeSession(sessionId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<RevokeSessionResponseDto>> {
1849
1995
  const localVarAxiosArgs = await localVarAxiosParamCreator.authControllerRevokeSession(sessionId, options);
1850
1996
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1851
1997
  const localVarOperationServerBasePath = operationServerMap['AuthApi.authControllerRevokeSession']?.[localVarOperationServerIndex]?.url;
@@ -1875,15 +2021,17 @@ export const AuthApiFactory = function (configuration?: Configuration, basePath?
1875
2021
  const localVarFp = AuthApiFp(configuration)
1876
2022
  return {
1877
2023
  /**
1878
- *
2024
+ * Retrieve all active sessions for the current user
2025
+ * @summary Get active sessions
1879
2026
  * @param {*} [options] Override http request option.
1880
2027
  * @throws {RequiredError}
1881
2028
  */
1882
- authControllerGetActiveSessions(options?: RawAxiosRequestConfig): AxiosPromise<void> {
2029
+ authControllerGetActiveSessions(options?: RawAxiosRequestConfig): AxiosPromise<SessionResponseDto> {
1883
2030
  return localVarFp.authControllerGetActiveSessions(options).then((request) => request(axios, basePath));
1884
2031
  },
1885
2032
  /**
1886
- *
2033
+ * Get analytics data for user sessions. Requires ADMIN role.
2034
+ * @summary Get session analytics
1887
2035
  * @param {string} userId
1888
2036
  * @param {*} [options] Override http request option.
1889
2037
  * @throws {RequiredError}
@@ -1892,7 +2040,8 @@ export const AuthApiFactory = function (configuration?: Configuration, basePath?
1892
2040
  return localVarFp.authControllerGetSessionAnalytics(userId, options).then((request) => request(axios, basePath));
1893
2041
  },
1894
2042
  /**
1895
- *
2043
+ * Get suspicious activities for a specific user. Requires ADMIN role.
2044
+ * @summary Get suspicious activities
1896
2045
  * @param {string} userId
1897
2046
  * @param {*} [options] Override http request option.
1898
2047
  * @throws {RequiredError}
@@ -1903,12 +2052,12 @@ export const AuthApiFactory = function (configuration?: Configuration, basePath?
1903
2052
  /**
1904
2053
  *
1905
2054
  * @summary Initiate forgot password process
1906
- * @param {object} body
2055
+ * @param {InitiateForgotPasswordEmailDto} initiateForgotPasswordEmailDto
1907
2056
  * @param {*} [options] Override http request option.
1908
2057
  * @throws {RequiredError}
1909
2058
  */
1910
- authControllerInitiateForgotPassword(body: object, options?: RawAxiosRequestConfig): AxiosPromise<void> {
1911
- return localVarFp.authControllerInitiateForgotPassword(body, options).then((request) => request(axios, basePath));
2059
+ authControllerInitiateForgotPassword(initiateForgotPasswordEmailDto: InitiateForgotPasswordEmailDto, options?: RawAxiosRequestConfig): AxiosPromise<void> {
2060
+ return localVarFp.authControllerInitiateForgotPassword(initiateForgotPasswordEmailDto, options).then((request) => request(axios, basePath));
1912
2061
  },
1913
2062
  /**
1914
2063
  *
@@ -1921,20 +2070,23 @@ export const AuthApiFactory = function (configuration?: Configuration, basePath?
1921
2070
  return localVarFp.authControllerLogin(userAgent, loginDto, options).then((request) => request(axios, basePath));
1922
2071
  },
1923
2072
  /**
1924
- *
2073
+ * Revoke the current refresh token, effectively logging out the user
2074
+ * @summary Logout user
1925
2075
  * @param {*} [options] Override http request option.
1926
2076
  * @throws {RequiredError}
1927
2077
  */
1928
- authControllerLogout(options?: RawAxiosRequestConfig): AxiosPromise<void> {
2078
+ authControllerLogout(options?: RawAxiosRequestConfig): AxiosPromise<LogoutResponseDto> {
1929
2079
  return localVarFp.authControllerLogout(options).then((request) => request(axios, basePath));
1930
2080
  },
1931
2081
  /**
1932
- *
2082
+ * Exchange a valid refresh token for a new access token and refresh token pair
2083
+ * @summary Refresh access token
2084
+ * @param {RefreshTokenDto} refreshTokenDto
1933
2085
  * @param {*} [options] Override http request option.
1934
2086
  * @throws {RequiredError}
1935
2087
  */
1936
- authControllerRefreshTokens(options?: RawAxiosRequestConfig): AxiosPromise<void> {
1937
- return localVarFp.authControllerRefreshTokens(options).then((request) => request(axios, basePath));
2088
+ authControllerRefreshTokens(refreshTokenDto: RefreshTokenDto, options?: RawAxiosRequestConfig): AxiosPromise<RefreshTokenResponseDto> {
2089
+ return localVarFp.authControllerRefreshTokens(refreshTokenDto, options).then((request) => request(axios, basePath));
1938
2090
  },
1939
2091
  /**
1940
2092
  *
@@ -1948,20 +2100,21 @@ export const AuthApiFactory = function (configuration?: Configuration, basePath?
1948
2100
  /**
1949
2101
  *
1950
2102
  * @summary Reset password using OTP
1951
- * @param {object} body
2103
+ * @param {ResetPasswordWithOTPEmailDto} resetPasswordWithOTPEmailDto
1952
2104
  * @param {*} [options] Override http request option.
1953
2105
  * @throws {RequiredError}
1954
2106
  */
1955
- authControllerResetPasswordWithOTP(body: object, options?: RawAxiosRequestConfig): AxiosPromise<void> {
1956
- return localVarFp.authControllerResetPasswordWithOTP(body, options).then((request) => request(axios, basePath));
2107
+ authControllerResetPasswordWithOTP(resetPasswordWithOTPEmailDto: ResetPasswordWithOTPEmailDto, options?: RawAxiosRequestConfig): AxiosPromise<void> {
2108
+ return localVarFp.authControllerResetPasswordWithOTP(resetPasswordWithOTPEmailDto, options).then((request) => request(axios, basePath));
1957
2109
  },
1958
2110
  /**
1959
- *
2111
+ * Revoke a specific session by its ID
2112
+ * @summary Revoke specific session
1960
2113
  * @param {string} sessionId
1961
2114
  * @param {*} [options] Override http request option.
1962
2115
  * @throws {RequiredError}
1963
2116
  */
1964
- authControllerRevokeSession(sessionId: string, options?: RawAxiosRequestConfig): AxiosPromise<void> {
2117
+ authControllerRevokeSession(sessionId: string, options?: RawAxiosRequestConfig): AxiosPromise<RevokeSessionResponseDto> {
1965
2118
  return localVarFp.authControllerRevokeSession(sessionId, options).then((request) => request(axios, basePath));
1966
2119
  },
1967
2120
  /**
@@ -1985,7 +2138,8 @@ export const AuthApiFactory = function (configuration?: Configuration, basePath?
1985
2138
  */
1986
2139
  export class AuthApi extends BaseAPI {
1987
2140
  /**
1988
- *
2141
+ * Retrieve all active sessions for the current user
2142
+ * @summary Get active sessions
1989
2143
  * @param {*} [options] Override http request option.
1990
2144
  * @throws {RequiredError}
1991
2145
  * @memberof AuthApi
@@ -1995,7 +2149,8 @@ export class AuthApi extends BaseAPI {
1995
2149
  }
1996
2150
 
1997
2151
  /**
1998
- *
2152
+ * Get analytics data for user sessions. Requires ADMIN role.
2153
+ * @summary Get session analytics
1999
2154
  * @param {string} userId
2000
2155
  * @param {*} [options] Override http request option.
2001
2156
  * @throws {RequiredError}
@@ -2006,7 +2161,8 @@ export class AuthApi extends BaseAPI {
2006
2161
  }
2007
2162
 
2008
2163
  /**
2009
- *
2164
+ * Get suspicious activities for a specific user. Requires ADMIN role.
2165
+ * @summary Get suspicious activities
2010
2166
  * @param {string} userId
2011
2167
  * @param {*} [options] Override http request option.
2012
2168
  * @throws {RequiredError}
@@ -2019,13 +2175,13 @@ export class AuthApi extends BaseAPI {
2019
2175
  /**
2020
2176
  *
2021
2177
  * @summary Initiate forgot password process
2022
- * @param {object} body
2178
+ * @param {InitiateForgotPasswordEmailDto} initiateForgotPasswordEmailDto
2023
2179
  * @param {*} [options] Override http request option.
2024
2180
  * @throws {RequiredError}
2025
2181
  * @memberof AuthApi
2026
2182
  */
2027
- public authControllerInitiateForgotPassword(body: object, options?: RawAxiosRequestConfig) {
2028
- return AuthApiFp(this.configuration).authControllerInitiateForgotPassword(body, options).then((request) => request(this.axios, this.basePath));
2183
+ public authControllerInitiateForgotPassword(initiateForgotPasswordEmailDto: InitiateForgotPasswordEmailDto, options?: RawAxiosRequestConfig) {
2184
+ return AuthApiFp(this.configuration).authControllerInitiateForgotPassword(initiateForgotPasswordEmailDto, options).then((request) => request(this.axios, this.basePath));
2029
2185
  }
2030
2186
 
2031
2187
  /**
@@ -2041,7 +2197,8 @@ export class AuthApi extends BaseAPI {
2041
2197
  }
2042
2198
 
2043
2199
  /**
2044
- *
2200
+ * Revoke the current refresh token, effectively logging out the user
2201
+ * @summary Logout user
2045
2202
  * @param {*} [options] Override http request option.
2046
2203
  * @throws {RequiredError}
2047
2204
  * @memberof AuthApi
@@ -2051,13 +2208,15 @@ export class AuthApi extends BaseAPI {
2051
2208
  }
2052
2209
 
2053
2210
  /**
2054
- *
2211
+ * Exchange a valid refresh token for a new access token and refresh token pair
2212
+ * @summary Refresh access token
2213
+ * @param {RefreshTokenDto} refreshTokenDto
2055
2214
  * @param {*} [options] Override http request option.
2056
2215
  * @throws {RequiredError}
2057
2216
  * @memberof AuthApi
2058
2217
  */
2059
- public authControllerRefreshTokens(options?: RawAxiosRequestConfig) {
2060
- return AuthApiFp(this.configuration).authControllerRefreshTokens(options).then((request) => request(this.axios, this.basePath));
2218
+ public authControllerRefreshTokens(refreshTokenDto: RefreshTokenDto, options?: RawAxiosRequestConfig) {
2219
+ return AuthApiFp(this.configuration).authControllerRefreshTokens(refreshTokenDto, options).then((request) => request(this.axios, this.basePath));
2061
2220
  }
2062
2221
 
2063
2222
  /**
@@ -2074,17 +2233,18 @@ export class AuthApi extends BaseAPI {
2074
2233
  /**
2075
2234
  *
2076
2235
  * @summary Reset password using OTP
2077
- * @param {object} body
2236
+ * @param {ResetPasswordWithOTPEmailDto} resetPasswordWithOTPEmailDto
2078
2237
  * @param {*} [options] Override http request option.
2079
2238
  * @throws {RequiredError}
2080
2239
  * @memberof AuthApi
2081
2240
  */
2082
- public authControllerResetPasswordWithOTP(body: object, options?: RawAxiosRequestConfig) {
2083
- return AuthApiFp(this.configuration).authControllerResetPasswordWithOTP(body, options).then((request) => request(this.axios, this.basePath));
2241
+ public authControllerResetPasswordWithOTP(resetPasswordWithOTPEmailDto: ResetPasswordWithOTPEmailDto, options?: RawAxiosRequestConfig) {
2242
+ return AuthApiFp(this.configuration).authControllerResetPasswordWithOTP(resetPasswordWithOTPEmailDto, options).then((request) => request(this.axios, this.basePath));
2084
2243
  }
2085
2244
 
2086
2245
  /**
2087
- *
2246
+ * Revoke a specific session by its ID
2247
+ * @summary Revoke specific session
2088
2248
  * @param {string} sessionId
2089
2249
  * @param {*} [options] Override http request option.
2090
2250
  * @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.1",
14
14
  "main": "index.js",
15
15
  "scripts": {
16
16
  "test": "echo \"Error: no test specified\" && exit 1"