@gooday_corp/gooday-api-client 1.0.2 → 1.0.4

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 +282 -14
  2. package/package.json +1 -1
package/api.ts CHANGED
@@ -77,7 +77,7 @@ export interface OnBoardingDTO {
77
77
  * @type {Array<string>}
78
78
  * @memberof OnBoardingDTO
79
79
  */
80
- 'recommendations': Array<string>;
80
+ 'goals': Array<string>;
81
81
  /**
82
82
  * Plans
83
83
  * @type {string}
@@ -85,6 +85,25 @@ export interface OnBoardingDTO {
85
85
  */
86
86
  'plan': string;
87
87
  }
88
+ /**
89
+ *
90
+ * @export
91
+ * @interface OnBoardingResponseDTO
92
+ */
93
+ export interface OnBoardingResponseDTO {
94
+ /**
95
+ * statusCode
96
+ * @type {number}
97
+ * @memberof OnBoardingResponseDTO
98
+ */
99
+ 'statusCode': number;
100
+ /**
101
+ * User
102
+ * @type {UserMeResponse}
103
+ * @memberof OnBoardingResponseDTO
104
+ */
105
+ 'data': UserMeResponse;
106
+ }
88
107
  /**
89
108
  *
90
109
  * @export
@@ -123,6 +142,62 @@ export interface SignInDto {
123
142
  */
124
143
  'password': string;
125
144
  }
145
+ /**
146
+ *
147
+ * @export
148
+ * @interface SignInResponse
149
+ */
150
+ export interface SignInResponse {
151
+ /**
152
+ * The unique identifier of the user
153
+ * @type {string}
154
+ * @memberof SignInResponse
155
+ */
156
+ 'id': string;
157
+ /**
158
+ * The name of the user
159
+ * @type {string}
160
+ * @memberof SignInResponse
161
+ */
162
+ 'name': string;
163
+ /**
164
+ * The email of the user
165
+ * @type {string}
166
+ * @memberof SignInResponse
167
+ */
168
+ 'email': string;
169
+ /**
170
+ * The JWT access token for authentication
171
+ * @type {string}
172
+ * @memberof SignInResponse
173
+ */
174
+ 'accessToken': string;
175
+ }
176
+ /**
177
+ *
178
+ * @export
179
+ * @interface SignInResponseDto
180
+ */
181
+ export interface SignInResponseDto {
182
+ /**
183
+ * statuscCode
184
+ * @type {number}
185
+ * @memberof SignInResponseDto
186
+ */
187
+ 'statusCode': number;
188
+ /**
189
+ * message
190
+ * @type {string}
191
+ * @memberof SignInResponseDto
192
+ */
193
+ 'message': string;
194
+ /**
195
+ * User
196
+ * @type {SignInResponse}
197
+ * @memberof SignInResponseDto
198
+ */
199
+ 'data': SignInResponse;
200
+ }
126
201
  /**
127
202
  *
128
203
  * @export
@@ -157,32 +232,167 @@ export interface SignupDto {
157
232
  /**
158
233
  *
159
234
  * @export
160
- * @interface SignupResponseDto
235
+ * @interface SignupResponse
161
236
  */
162
- export interface SignupResponseDto {
237
+ export interface SignupResponse {
163
238
  /**
164
239
  * The unique identifier of the user
165
240
  * @type {string}
166
- * @memberof SignupResponseDto
241
+ * @memberof SignupResponse
167
242
  */
168
243
  'id': string;
169
244
  /**
170
245
  * The name of the user
171
246
  * @type {string}
172
- * @memberof SignupResponseDto
247
+ * @memberof SignupResponse
173
248
  */
174
249
  'name': string;
175
250
  /**
176
251
  * The email of the user
177
252
  * @type {string}
178
- * @memberof SignupResponseDto
253
+ * @memberof SignupResponse
179
254
  */
180
255
  'email': string;
181
256
  /**
182
257
  * The JWT access token for authentication
183
258
  * @type {string}
259
+ * @memberof SignupResponse
260
+ */
261
+ 'accessToken': string;
262
+ }
263
+ /**
264
+ *
265
+ * @export
266
+ * @interface SignupResponseDto
267
+ */
268
+ export interface SignupResponseDto {
269
+ /**
270
+ * statuscCode
271
+ * @type {number}
184
272
  * @memberof SignupResponseDto
185
273
  */
274
+ 'statusCode': number;
275
+ /**
276
+ * message
277
+ * @type {string}
278
+ * @memberof SignupResponseDto
279
+ */
280
+ 'message': string;
281
+ /**
282
+ * User
283
+ * @type {SignupResponse}
284
+ * @memberof SignupResponseDto
285
+ */
286
+ 'data': SignupResponse;
287
+ }
288
+ /**
289
+ *
290
+ * @export
291
+ * @interface UserMeDTO
292
+ */
293
+ export interface UserMeDTO {
294
+ /**
295
+ * statuscCode
296
+ * @type {number}
297
+ * @memberof UserMeDTO
298
+ */
299
+ 'statusCode': number;
300
+ /**
301
+ * User
302
+ * @type {UserMeResponse}
303
+ * @memberof UserMeDTO
304
+ */
305
+ 'data': UserMeResponse;
306
+ }
307
+ /**
308
+ *
309
+ * @export
310
+ * @interface UserMeResponse
311
+ */
312
+ export interface UserMeResponse {
313
+ /**
314
+ * Unique identifier for the user
315
+ * @type {string}
316
+ * @memberof UserMeResponse
317
+ */
318
+ 'id': string;
319
+ /**
320
+ * Name of the user
321
+ * @type {string}
322
+ * @memberof UserMeResponse
323
+ */
324
+ 'name': string;
325
+ /**
326
+ * Email address of the user
327
+ * @type {string}
328
+ * @memberof UserMeResponse
329
+ */
330
+ 'email': string;
331
+ /**
332
+ * Nickname of the user
333
+ * @type {string}
334
+ * @memberof UserMeResponse
335
+ */
336
+ 'nickName': string;
337
+ /**
338
+ * User\'s date of birth
339
+ * @type {string}
340
+ * @memberof UserMeResponse
341
+ */
342
+ 'dob': string;
343
+ /**
344
+ * Gender of the user
345
+ * @type {string}
346
+ * @memberof UserMeResponse
347
+ */
348
+ 'gender': string;
349
+ /**
350
+ * Indicates whether the user\'s email has been verified
351
+ * @type {boolean}
352
+ * @memberof UserMeResponse
353
+ */
354
+ 'isEmailVerified': boolean;
355
+ /**
356
+ * Role of the user in the system
357
+ * @type {string}
358
+ * @memberof UserMeResponse
359
+ */
360
+ 'role': string;
361
+ /**
362
+ * Date when the user was created
363
+ * @type {string}
364
+ * @memberof UserMeResponse
365
+ */
366
+ 'createdAt': string;
367
+ /**
368
+ * Date when the user was last updated
369
+ * @type {string}
370
+ * @memberof UserMeResponse
371
+ */
372
+ 'updatedAt': string;
373
+ /**
374
+ * Reasons why the user is using the product
375
+ * @type {Array<string>}
376
+ * @memberof UserMeResponse
377
+ */
378
+ 'goals': Array<string>;
379
+ /**
380
+ * Push notification tokens associated with the user
381
+ * @type {Array<string>}
382
+ * @memberof UserMeResponse
383
+ */
384
+ 'pushNotificationTokens': Array<string>;
385
+ /**
386
+ * Plan subscribed by the user
387
+ * @type {string}
388
+ * @memberof UserMeResponse
389
+ */
390
+ 'plan': string;
391
+ /**
392
+ * Access token for user authentication
393
+ * @type {string}
394
+ * @memberof UserMeResponse
395
+ */
186
396
  'accessToken': string;
187
397
  }
188
398
 
@@ -216,6 +426,35 @@ export const AuthApiAxiosParamCreator = function (configuration?: Configuration)
216
426
 
217
427
 
218
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
+ *
440
+ * @param {*} [options] Override http request option.
441
+ * @throws {RequiredError}
442
+ */
443
+ authControllerGoogleLogin: async (options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
444
+ const localVarPath = `/auth/google-login`;
445
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
446
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
447
+ let baseOptions;
448
+ if (configuration) {
449
+ baseOptions = configuration.baseOptions;
450
+ }
451
+
452
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
453
+ const localVarHeaderParameter = {} as any;
454
+ const localVarQueryParameter = {} as any;
455
+
456
+
457
+
219
458
  setSearchParams(localVarUrlObj, localVarQueryParameter);
220
459
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
221
460
  localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
@@ -273,7 +512,7 @@ export const AuthApiAxiosParamCreator = function (configuration?: Configuration)
273
512
  authControllerSignIn: async (signInDto: SignInDto, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
274
513
  // verify required parameter 'signInDto' is not null or undefined
275
514
  assertParamExists('authControllerSignIn', 'signInDto', signInDto)
276
- const localVarPath = `/auth/login`;
515
+ const localVarPath = `/auth/user-login`;
277
516
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
278
517
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
279
518
  let baseOptions;
@@ -308,7 +547,7 @@ export const AuthApiAxiosParamCreator = function (configuration?: Configuration)
308
547
  authControllerSignUp: async (signupDto: SignupDto, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
309
548
  // verify required parameter 'signupDto' is not null or undefined
310
549
  assertParamExists('authControllerSignUp', 'signupDto', signupDto)
311
- const localVarPath = `/auth/register`;
550
+ const localVarPath = `/auth/user-register`;
312
551
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
313
552
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
314
553
  let baseOptions;
@@ -355,6 +594,17 @@ export const AuthApiFp = function(configuration?: Configuration) {
355
594
  const localVarOperationServerBasePath = operationServerMap['AuthApi.authControllerForgotPassword']?.[localVarOperationServerIndex]?.url;
356
595
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
357
596
  },
597
+ /**
598
+ *
599
+ * @param {*} [options] Override http request option.
600
+ * @throws {RequiredError}
601
+ */
602
+ async authControllerGoogleLogin(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
603
+ const localVarAxiosArgs = await localVarAxiosParamCreator.authControllerGoogleLogin(options);
604
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
605
+ const localVarOperationServerBasePath = operationServerMap['AuthApi.authControllerGoogleLogin']?.[localVarOperationServerIndex]?.url;
606
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
607
+ },
358
608
  /**
359
609
  *
360
610
  * @param {ResetPasswordDTO} resetPasswordDTO
@@ -373,7 +623,7 @@ export const AuthApiFp = function(configuration?: Configuration) {
373
623
  * @param {*} [options] Override http request option.
374
624
  * @throws {RequiredError}
375
625
  */
376
- async authControllerSignIn(signInDto: SignInDto, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<SignupResponseDto>> {
626
+ async authControllerSignIn(signInDto: SignInDto, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<SignInResponseDto>> {
377
627
  const localVarAxiosArgs = await localVarAxiosParamCreator.authControllerSignIn(signInDto, options);
378
628
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
379
629
  const localVarOperationServerBasePath = operationServerMap['AuthApi.authControllerSignIn']?.[localVarOperationServerIndex]?.url;
@@ -409,6 +659,14 @@ export const AuthApiFactory = function (configuration?: Configuration, basePath?
409
659
  authControllerForgotPassword(options?: RawAxiosRequestConfig): AxiosPromise<ApiResponseDto> {
410
660
  return localVarFp.authControllerForgotPassword(options).then((request) => request(axios, basePath));
411
661
  },
662
+ /**
663
+ *
664
+ * @param {*} [options] Override http request option.
665
+ * @throws {RequiredError}
666
+ */
667
+ authControllerGoogleLogin(options?: RawAxiosRequestConfig): AxiosPromise<void> {
668
+ return localVarFp.authControllerGoogleLogin(options).then((request) => request(axios, basePath));
669
+ },
412
670
  /**
413
671
  *
414
672
  * @param {ResetPasswordDTO} resetPasswordDTO
@@ -424,7 +682,7 @@ export const AuthApiFactory = function (configuration?: Configuration, basePath?
424
682
  * @param {*} [options] Override http request option.
425
683
  * @throws {RequiredError}
426
684
  */
427
- authControllerSignIn(signInDto: SignInDto, options?: RawAxiosRequestConfig): AxiosPromise<SignupResponseDto> {
685
+ authControllerSignIn(signInDto: SignInDto, options?: RawAxiosRequestConfig): AxiosPromise<SignInResponseDto> {
428
686
  return localVarFp.authControllerSignIn(signInDto, options).then((request) => request(axios, basePath));
429
687
  },
430
688
  /**
@@ -456,6 +714,16 @@ export class AuthApi extends BaseAPI {
456
714
  return AuthApiFp(this.configuration).authControllerForgotPassword(options).then((request) => request(this.axios, this.basePath));
457
715
  }
458
716
 
717
+ /**
718
+ *
719
+ * @param {*} [options] Override http request option.
720
+ * @throws {RequiredError}
721
+ * @memberof AuthApi
722
+ */
723
+ public authControllerGoogleLogin(options?: RawAxiosRequestConfig) {
724
+ return AuthApiFp(this.configuration).authControllerGoogleLogin(options).then((request) => request(this.axios, this.basePath));
725
+ }
726
+
459
727
  /**
460
728
  *
461
729
  * @param {ResetPasswordDTO} resetPasswordDTO
@@ -854,7 +1122,7 @@ export const UsersApiFp = function(configuration?: Configuration) {
854
1122
  * @param {*} [options] Override http request option.
855
1123
  * @throws {RequiredError}
856
1124
  */
857
- async usersControllerGetMe(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
1125
+ async usersControllerGetMe(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<UserMeDTO>> {
858
1126
  const localVarAxiosArgs = await localVarAxiosParamCreator.usersControllerGetMe(options);
859
1127
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
860
1128
  const localVarOperationServerBasePath = operationServerMap['UsersApi.usersControllerGetMe']?.[localVarOperationServerIndex]?.url;
@@ -866,7 +1134,7 @@ export const UsersApiFp = function(configuration?: Configuration) {
866
1134
  * @param {*} [options] Override http request option.
867
1135
  * @throws {RequiredError}
868
1136
  */
869
- async usersControllerOnBoarded(onBoardingDTO: OnBoardingDTO, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
1137
+ async usersControllerOnBoarded(onBoardingDTO: OnBoardingDTO, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<OnBoardingResponseDTO>> {
870
1138
  const localVarAxiosArgs = await localVarAxiosParamCreator.usersControllerOnBoarded(onBoardingDTO, options);
871
1139
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
872
1140
  const localVarOperationServerBasePath = operationServerMap['UsersApi.usersControllerOnBoarded']?.[localVarOperationServerIndex]?.url;
@@ -887,7 +1155,7 @@ export const UsersApiFactory = function (configuration?: Configuration, basePath
887
1155
  * @param {*} [options] Override http request option.
888
1156
  * @throws {RequiredError}
889
1157
  */
890
- usersControllerGetMe(options?: RawAxiosRequestConfig): AxiosPromise<void> {
1158
+ usersControllerGetMe(options?: RawAxiosRequestConfig): AxiosPromise<UserMeDTO> {
891
1159
  return localVarFp.usersControllerGetMe(options).then((request) => request(axios, basePath));
892
1160
  },
893
1161
  /**
@@ -896,7 +1164,7 @@ export const UsersApiFactory = function (configuration?: Configuration, basePath
896
1164
  * @param {*} [options] Override http request option.
897
1165
  * @throws {RequiredError}
898
1166
  */
899
- usersControllerOnBoarded(onBoardingDTO: OnBoardingDTO, options?: RawAxiosRequestConfig): AxiosPromise<void> {
1167
+ usersControllerOnBoarded(onBoardingDTO: OnBoardingDTO, options?: RawAxiosRequestConfig): AxiosPromise<OnBoardingResponseDTO> {
900
1168
  return localVarFp.usersControllerOnBoarded(onBoardingDTO, options).then((request) => request(axios, basePath));
901
1169
  },
902
1170
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gooday_corp/gooday-api-client",
3
- "version": "1.0.2",
3
+ "version": "1.0.4",
4
4
  "description": "API client for Gooday",
5
5
  "main": "index.ts",
6
6
  "scripts": {},