@ahomevilla-hotel/node-sdk 1.0.1 → 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 +103 -14
  2. package/package.json +1 -1
package/api.ts CHANGED
@@ -471,6 +471,33 @@ export interface RefreshTokenResponseDto {
471
471
  */
472
472
  'refreshToken': string;
473
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
+
474
501
  /**
475
502
  *
476
503
  * @export
@@ -1496,6 +1523,36 @@ export const AuthApiAxiosParamCreator = function (configuration?: Configuration)
1496
1523
 
1497
1524
 
1498
1525
 
1526
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1527
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1528
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
1529
+
1530
+ return {
1531
+ url: toPathString(localVarUrlObj),
1532
+ options: localVarRequestOptions,
1533
+ };
1534
+ },
1535
+ /**
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
+
1499
1556
  setSearchParams(localVarUrlObj, localVarQueryParameter);
1500
1557
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1501
1558
  localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
@@ -1721,13 +1778,13 @@ export const AuthApiAxiosParamCreator = function (configuration?: Configuration)
1721
1778
  },
1722
1779
  /**
1723
1780
  *
1724
- * @param {CreateUserDto} createUserDto
1781
+ * @param {RegisterDto} registerDto
1725
1782
  * @param {*} [options] Override http request option.
1726
1783
  * @throws {RequiredError}
1727
1784
  */
1728
- authControllerRegister: async (createUserDto: CreateUserDto, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
1729
- // verify required parameter 'createUserDto' is not null or undefined
1730
- 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)
1731
1788
  const localVarPath = `/api/auth/register`;
1732
1789
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
1733
1790
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
@@ -1747,7 +1804,7 @@ export const AuthApiAxiosParamCreator = function (configuration?: Configuration)
1747
1804
  setSearchParams(localVarUrlObj, localVarQueryParameter);
1748
1805
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1749
1806
  localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
1750
- localVarRequestOptions.data = serializeDataIfNeeded(createUserDto, localVarRequestOptions, configuration)
1807
+ localVarRequestOptions.data = serializeDataIfNeeded(registerDto, localVarRequestOptions, configuration)
1751
1808
 
1752
1809
  return {
1753
1810
  url: toPathString(localVarUrlObj),
@@ -1882,6 +1939,18 @@ export const AuthApiFp = function(configuration?: Configuration) {
1882
1939
  const localVarOperationServerBasePath = operationServerMap['AuthApi.authControllerGetActiveSessions']?.[localVarOperationServerIndex]?.url;
1883
1940
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1884
1941
  },
1942
+ /**
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
+ },
1885
1954
  /**
1886
1955
  * Get analytics data for user sessions. Requires ADMIN role.
1887
1956
  * @summary Get session analytics
@@ -1961,12 +2030,12 @@ export const AuthApiFp = function(configuration?: Configuration) {
1961
2030
  },
1962
2031
  /**
1963
2032
  *
1964
- * @param {CreateUserDto} createUserDto
2033
+ * @param {RegisterDto} registerDto
1965
2034
  * @param {*} [options] Override http request option.
1966
2035
  * @throws {RequiredError}
1967
2036
  */
1968
- async authControllerRegister(createUserDto: CreateUserDto, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<RegisterResponseDto>> {
1969
- 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);
1970
2039
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1971
2040
  const localVarOperationServerBasePath = operationServerMap['AuthApi.authControllerRegister']?.[localVarOperationServerIndex]?.url;
1972
2041
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
@@ -2029,6 +2098,15 @@ export const AuthApiFactory = function (configuration?: Configuration, basePath?
2029
2098
  authControllerGetActiveSessions(options?: RawAxiosRequestConfig): AxiosPromise<SessionResponseDto> {
2030
2099
  return localVarFp.authControllerGetActiveSessions(options).then((request) => request(axios, basePath));
2031
2100
  },
2101
+ /**
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
+ },
2032
2110
  /**
2033
2111
  * Get analytics data for user sessions. Requires ADMIN role.
2034
2112
  * @summary Get session analytics
@@ -2090,12 +2168,12 @@ export const AuthApiFactory = function (configuration?: Configuration, basePath?
2090
2168
  },
2091
2169
  /**
2092
2170
  *
2093
- * @param {CreateUserDto} createUserDto
2171
+ * @param {RegisterDto} registerDto
2094
2172
  * @param {*} [options] Override http request option.
2095
2173
  * @throws {RequiredError}
2096
2174
  */
2097
- authControllerRegister(createUserDto: CreateUserDto, options?: RawAxiosRequestConfig): AxiosPromise<RegisterResponseDto> {
2098
- 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));
2099
2177
  },
2100
2178
  /**
2101
2179
  *
@@ -2148,6 +2226,17 @@ export class AuthApi extends BaseAPI {
2148
2226
  return AuthApiFp(this.configuration).authControllerGetActiveSessions(options).then((request) => request(this.axios, this.basePath));
2149
2227
  }
2150
2228
 
2229
+ /**
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
+
2151
2240
  /**
2152
2241
  * Get analytics data for user sessions. Requires ADMIN role.
2153
2242
  * @summary Get session analytics
@@ -2221,13 +2310,13 @@ export class AuthApi extends BaseAPI {
2221
2310
 
2222
2311
  /**
2223
2312
  *
2224
- * @param {CreateUserDto} createUserDto
2313
+ * @param {RegisterDto} registerDto
2225
2314
  * @param {*} [options] Override http request option.
2226
2315
  * @throws {RequiredError}
2227
2316
  * @memberof AuthApi
2228
2317
  */
2229
- public authControllerRegister(createUserDto: CreateUserDto, options?: RawAxiosRequestConfig) {
2230
- 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));
2231
2320
  }
2232
2321
 
2233
2322
  /**
package/package.json CHANGED
@@ -10,7 +10,7 @@
10
10
  "openapi-client",
11
11
  "openapi-generator"
12
12
  ],
13
- "version": "1.0.1",
13
+ "version": "1.0.2",
14
14
  "main": "index.js",
15
15
  "scripts": {
16
16
  "test": "echo \"Error: no test specified\" && exit 1"