@gooday_corp/gooday-api-client 1.0.4 → 1.0.6

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 (3) hide show
  1. package/api.ts +219 -347
  2. package/base.ts +1 -1
  3. package/package.json +1 -1
package/api.ts CHANGED
@@ -26,27 +26,40 @@ import { BASE_PATH, COLLECTION_FORMATS, BaseAPI, RequiredError, operationServerM
26
26
  /**
27
27
  *
28
28
  * @export
29
- * @interface ApiResponseDto
29
+ * @interface GoalEntity
30
30
  */
31
- export interface ApiResponseDto {
31
+ export interface GoalEntity {
32
32
  /**
33
- * The HTTP status code
34
- * @type {number}
35
- * @memberof ApiResponseDto
33
+ * Unique identifier for the goal
34
+ * @type {string}
35
+ * @memberof GoalEntity
36
36
  */
37
- 'statusCode': number;
37
+ '_id': string;
38
38
  /**
39
- * A message providing additional details about the response
39
+ * Label or description of the goal
40
40
  * @type {string}
41
- * @memberof ApiResponseDto
41
+ * @memberof GoalEntity
42
42
  */
43
- 'message': string;
43
+ 'label': string;
44
+ }
45
+ /**
46
+ *
47
+ * @export
48
+ * @interface GoalListResponse
49
+ */
50
+ export interface GoalListResponse {
44
51
  /**
45
- * The data payload of the response
46
- * @type {object}
47
- * @memberof ApiResponseDto
52
+ * statuscCode
53
+ * @type {number}
54
+ * @memberof GoalListResponse
48
55
  */
49
- 'data': object;
56
+ 'statusCode': number;
57
+ /**
58
+ * User
59
+ * @type {Array<GoalEntity>}
60
+ * @memberof GoalListResponse
61
+ */
62
+ 'data': Array<GoalEntity>;
50
63
  }
51
64
  /**
52
65
  *
@@ -59,31 +72,31 @@ export interface OnBoardingDTO {
59
72
  * @type {string}
60
73
  * @memberof OnBoardingDTO
61
74
  */
62
- 'nickname': string;
75
+ 'nickname'?: string;
63
76
  /**
64
77
  * Gender
65
78
  * @type {string}
66
79
  * @memberof OnBoardingDTO
67
80
  */
68
- 'gender': string;
81
+ 'gender'?: string;
69
82
  /**
70
- * User Date of Birth
83
+ * Plan
71
84
  * @type {string}
72
85
  * @memberof OnBoardingDTO
73
86
  */
74
- 'dob': string;
87
+ 'plan'?: string;
75
88
  /**
76
- * Recommendation
77
- * @type {Array<string>}
89
+ * Date of Birth
90
+ * @type {string}
78
91
  * @memberof OnBoardingDTO
79
92
  */
80
- 'goals': Array<string>;
93
+ 'dob'?: string;
81
94
  /**
82
- * Plans
83
- * @type {string}
95
+ * Goals
96
+ * @type {Array<string>}
84
97
  * @memberof OnBoardingDTO
85
98
  */
86
- 'plan': string;
99
+ 'goals'?: Array<string>;
87
100
  }
88
101
  /**
89
102
  *
@@ -99,30 +112,133 @@ export interface OnBoardingResponseDTO {
99
112
  'statusCode': number;
100
113
  /**
101
114
  * User
102
- * @type {UserMeResponse}
115
+ * @type {UserEntity}
103
116
  * @memberof OnBoardingResponseDTO
104
117
  */
105
- 'data': UserMeResponse;
118
+ 'data': UserEntity;
106
119
  }
107
120
  /**
108
121
  *
109
122
  * @export
110
- * @interface ResetPasswordDTO
123
+ * @interface PlanEntity
111
124
  */
112
- export interface ResetPasswordDTO {
125
+ export interface PlanEntity {
113
126
  /**
114
- * Email of user
127
+ *
115
128
  * @type {string}
116
- * @memberof ResetPasswordDTO
129
+ * @memberof PlanEntity
117
130
  */
118
- 'currentPasword': string;
131
+ '_id': string;
119
132
  /**
120
- * Email of user
133
+ *
134
+ * @type {string}
135
+ * @memberof PlanEntity
136
+ */
137
+ 'name': string;
138
+ /**
139
+ *
140
+ * @type {string}
141
+ * @memberof PlanEntity
142
+ */
143
+ 'description': string;
144
+ /**
145
+ * Array of features included in the plan
146
+ * @type {Array<PlanFeature>}
147
+ * @memberof PlanEntity
148
+ */
149
+ 'features': Array<PlanFeature>;
150
+ /**
151
+ * Array of price options for the plan
152
+ * @type {Array<PriceEntity>}
153
+ * @memberof PlanEntity
154
+ */
155
+ 'prices': Array<PriceEntity>;
156
+ /**
157
+ * Background Image
158
+ * @type {string}
159
+ * @memberof PlanEntity
160
+ */
161
+ 'image': string;
162
+ }
163
+ /**
164
+ *
165
+ * @export
166
+ * @interface PlanFeature
167
+ */
168
+ export interface PlanFeature {
169
+ /**
170
+ * Description of the feature
121
171
  * @type {string}
122
- * @memberof ResetPasswordDTO
172
+ * @memberof PlanFeature
123
173
  */
124
- 'newPassword': string;
174
+ 'label': string;
175
+ /**
176
+ * Nested child features, if any
177
+ * @type {Array<PlanFeature>}
178
+ * @memberof PlanFeature
179
+ */
180
+ 'children': Array<PlanFeature>;
125
181
  }
182
+ /**
183
+ *
184
+ * @export
185
+ * @interface PlanResponseDTO
186
+ */
187
+ export interface PlanResponseDTO {
188
+ /**
189
+ * Message
190
+ * @type {string}
191
+ * @memberof PlanResponseDTO
192
+ */
193
+ 'message': string;
194
+ /**
195
+ * Message
196
+ * @type {Array<PlanEntity>}
197
+ * @memberof PlanResponseDTO
198
+ */
199
+ 'data': Array<PlanEntity>;
200
+ }
201
+ /**
202
+ *
203
+ * @export
204
+ * @interface PriceEntity
205
+ */
206
+ export interface PriceEntity {
207
+ /**
208
+ *
209
+ * @type {string}
210
+ * @memberof PriceEntity
211
+ */
212
+ '_id': string;
213
+ /**
214
+ * Price amount in the smallest currency unit (e.g., cents for USD)
215
+ * @type {number}
216
+ * @memberof PriceEntity
217
+ */
218
+ 'amount': number;
219
+ /**
220
+ * Currency symbol
221
+ * @type {string}
222
+ * @memberof PriceEntity
223
+ */
224
+ 'currencySymbol': string;
225
+ /**
226
+ *
227
+ * @type {string}
228
+ * @memberof PriceEntity
229
+ */
230
+ 'interval': PriceEntityIntervalEnum;
231
+ }
232
+
233
+ export const PriceEntityIntervalEnum = {
234
+ Day: 'day',
235
+ Month: 'month',
236
+ Week: 'week',
237
+ Year: 'year'
238
+ } as const;
239
+
240
+ export type PriceEntityIntervalEnum = typeof PriceEntityIntervalEnum[keyof typeof PriceEntityIntervalEnum];
241
+
126
242
  /**
127
243
  *
128
244
  * @export
@@ -149,23 +265,11 @@ export interface SignInDto {
149
265
  */
150
266
  export interface SignInResponse {
151
267
  /**
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}
268
+ * User
269
+ * @type {UserEntity}
166
270
  * @memberof SignInResponse
167
271
  */
168
- 'email': string;
272
+ 'user': UserEntity;
169
273
  /**
170
274
  * The JWT access token for authentication
171
275
  * @type {string}
@@ -222,12 +326,6 @@ export interface SignupDto {
222
326
  * @memberof SignupDto
223
327
  */
224
328
  'password': string;
225
- /**
226
- * The confirmation of the password for the user account
227
- * @type {string}
228
- * @memberof SignupDto
229
- */
230
- 'confirmPassword': string;
231
329
  }
232
330
  /**
233
331
  *
@@ -236,23 +334,11 @@ export interface SignupDto {
236
334
  */
237
335
  export interface SignupResponse {
238
336
  /**
239
- * The unique identifier of the user
240
- * @type {string}
241
- * @memberof SignupResponse
242
- */
243
- 'id': string;
244
- /**
245
- * The name of the user
246
- * @type {string}
247
- * @memberof SignupResponse
248
- */
249
- 'name': string;
250
- /**
251
- * The email of the user
252
- * @type {string}
337
+ * User
338
+ * @type {UserEntity}
253
339
  * @memberof SignupResponse
254
340
  */
255
- 'email': string;
341
+ 'user': UserEntity;
256
342
  /**
257
343
  * The JWT access token for authentication
258
344
  * @type {string}
@@ -288,112 +374,106 @@ export interface SignupResponseDto {
288
374
  /**
289
375
  *
290
376
  * @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
377
+ * @interface UserEntity
311
378
  */
312
- export interface UserMeResponse {
379
+ export interface UserEntity {
313
380
  /**
314
381
  * Unique identifier for the user
315
382
  * @type {string}
316
- * @memberof UserMeResponse
383
+ * @memberof UserEntity
317
384
  */
318
- 'id': string;
385
+ '_id': string;
319
386
  /**
320
387
  * Name of the user
321
388
  * @type {string}
322
- * @memberof UserMeResponse
389
+ * @memberof UserEntity
323
390
  */
324
391
  'name': string;
325
392
  /**
326
393
  * Email address of the user
327
394
  * @type {string}
328
- * @memberof UserMeResponse
395
+ * @memberof UserEntity
329
396
  */
330
397
  'email': string;
331
398
  /**
332
399
  * Nickname of the user
333
400
  * @type {string}
334
- * @memberof UserMeResponse
401
+ * @memberof UserEntity
335
402
  */
336
403
  'nickName': string;
337
404
  /**
338
405
  * User\'s date of birth
339
406
  * @type {string}
340
- * @memberof UserMeResponse
407
+ * @memberof UserEntity
341
408
  */
342
409
  'dob': string;
343
410
  /**
344
411
  * Gender of the user
345
412
  * @type {string}
346
- * @memberof UserMeResponse
413
+ * @memberof UserEntity
347
414
  */
348
415
  'gender': string;
349
416
  /**
350
417
  * Indicates whether the user\'s email has been verified
351
418
  * @type {boolean}
352
- * @memberof UserMeResponse
419
+ * @memberof UserEntity
353
420
  */
354
421
  'isEmailVerified': boolean;
355
422
  /**
356
423
  * Role of the user in the system
357
424
  * @type {string}
358
- * @memberof UserMeResponse
425
+ * @memberof UserEntity
359
426
  */
360
427
  'role': string;
361
428
  /**
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
429
+ * Goals why user is using the product
375
430
  * @type {Array<string>}
376
- * @memberof UserMeResponse
431
+ * @memberof UserEntity
377
432
  */
378
433
  '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
434
  /**
386
435
  * Plan subscribed by the user
387
436
  * @type {string}
388
- * @memberof UserMeResponse
437
+ * @memberof UserEntity
389
438
  */
390
439
  'plan': string;
391
440
  /**
392
- * Access token for user authentication
441
+ * Action user has to perform
393
442
  * @type {string}
394
- * @memberof UserMeResponse
443
+ * @memberof UserEntity
395
444
  */
396
- 'accessToken': string;
445
+ 'nextStep': UserEntityNextStepEnum;
446
+ }
447
+
448
+ export const UserEntityNextStepEnum = {
449
+ BasicInfo: 'basic_info',
450
+ NickName: 'nick_name',
451
+ Dob: 'dob',
452
+ Gender: 'gender',
453
+ Goals: 'goals',
454
+ Plan: 'plan'
455
+ } as const;
456
+
457
+ export type UserEntityNextStepEnum = typeof UserEntityNextStepEnum[keyof typeof UserEntityNextStepEnum];
458
+
459
+ /**
460
+ *
461
+ * @export
462
+ * @interface UserMeDTO
463
+ */
464
+ export interface UserMeDTO {
465
+ /**
466
+ * statuscCode
467
+ * @type {number}
468
+ * @memberof UserMeDTO
469
+ */
470
+ 'statusCode': number;
471
+ /**
472
+ * User
473
+ * @type {UserEntity}
474
+ * @memberof UserMeDTO
475
+ */
476
+ 'data': UserEntity;
397
477
  }
398
478
 
399
479
  /**
@@ -402,39 +482,6 @@ export interface UserMeResponse {
402
482
  */
403
483
  export const AuthApiAxiosParamCreator = function (configuration?: Configuration) {
404
484
  return {
405
- /**
406
- *
407
- * @param {*} [options] Override http request option.
408
- * @throws {RequiredError}
409
- */
410
- authControllerForgotPassword: async (options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
411
- const localVarPath = `/auth/forgot-password`;
412
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
413
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
414
- let baseOptions;
415
- if (configuration) {
416
- baseOptions = configuration.baseOptions;
417
- }
418
-
419
- const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
420
- const localVarHeaderParameter = {} as any;
421
- const localVarQueryParameter = {} as any;
422
-
423
- // authentication bearer required
424
- // http bearer authentication required
425
- await setBearerAuthToObject(localVarHeaderParameter, configuration)
426
-
427
-
428
-
429
- setSearchParams(localVarUrlObj, localVarQueryParameter);
430
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
431
- localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
432
-
433
- return {
434
- url: toPathString(localVarUrlObj),
435
- options: localVarRequestOptions,
436
- };
437
- },
438
485
  /**
439
486
  *
440
487
  * @param {*} [options] Override http request option.
@@ -464,45 +511,6 @@ export const AuthApiAxiosParamCreator = function (configuration?: Configuration)
464
511
  options: localVarRequestOptions,
465
512
  };
466
513
  },
467
- /**
468
- *
469
- * @param {ResetPasswordDTO} resetPasswordDTO
470
- * @param {*} [options] Override http request option.
471
- * @throws {RequiredError}
472
- */
473
- authControllerResetPassword: async (resetPasswordDTO: ResetPasswordDTO, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
474
- // verify required parameter 'resetPasswordDTO' is not null or undefined
475
- assertParamExists('authControllerResetPassword', 'resetPasswordDTO', resetPasswordDTO)
476
- const localVarPath = `/auth/reset-password`;
477
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
478
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
479
- let baseOptions;
480
- if (configuration) {
481
- baseOptions = configuration.baseOptions;
482
- }
483
-
484
- const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
485
- const localVarHeaderParameter = {} as any;
486
- const localVarQueryParameter = {} as any;
487
-
488
- // authentication bearer required
489
- // http bearer authentication required
490
- await setBearerAuthToObject(localVarHeaderParameter, configuration)
491
-
492
-
493
-
494
- localVarHeaderParameter['Content-Type'] = 'application/json';
495
-
496
- setSearchParams(localVarUrlObj, localVarQueryParameter);
497
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
498
- localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
499
- localVarRequestOptions.data = serializeDataIfNeeded(resetPasswordDTO, localVarRequestOptions, configuration)
500
-
501
- return {
502
- url: toPathString(localVarUrlObj),
503
- options: localVarRequestOptions,
504
- };
505
- },
506
514
  /**
507
515
  *
508
516
  * @param {SignInDto} signInDto
@@ -512,7 +520,7 @@ export const AuthApiAxiosParamCreator = function (configuration?: Configuration)
512
520
  authControllerSignIn: async (signInDto: SignInDto, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
513
521
  // verify required parameter 'signInDto' is not null or undefined
514
522
  assertParamExists('authControllerSignIn', 'signInDto', signInDto)
515
- const localVarPath = `/auth/user-login`;
523
+ const localVarPath = `/v1/auth/user-login`;
516
524
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
517
525
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
518
526
  let baseOptions;
@@ -547,7 +555,7 @@ export const AuthApiAxiosParamCreator = function (configuration?: Configuration)
547
555
  authControllerSignUp: async (signupDto: SignupDto, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
548
556
  // verify required parameter 'signupDto' is not null or undefined
549
557
  assertParamExists('authControllerSignUp', 'signupDto', signupDto)
550
- const localVarPath = `/auth/user-register`;
558
+ const localVarPath = `/v1/auth/user-register`;
551
559
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
552
560
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
553
561
  let baseOptions;
@@ -583,17 +591,6 @@ export const AuthApiAxiosParamCreator = function (configuration?: Configuration)
583
591
  export const AuthApiFp = function(configuration?: Configuration) {
584
592
  const localVarAxiosParamCreator = AuthApiAxiosParamCreator(configuration)
585
593
  return {
586
- /**
587
- *
588
- * @param {*} [options] Override http request option.
589
- * @throws {RequiredError}
590
- */
591
- async authControllerForgotPassword(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ApiResponseDto>> {
592
- const localVarAxiosArgs = await localVarAxiosParamCreator.authControllerForgotPassword(options);
593
- const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
594
- const localVarOperationServerBasePath = operationServerMap['AuthApi.authControllerForgotPassword']?.[localVarOperationServerIndex]?.url;
595
- return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
596
- },
597
594
  /**
598
595
  *
599
596
  * @param {*} [options] Override http request option.
@@ -605,18 +602,6 @@ export const AuthApiFp = function(configuration?: Configuration) {
605
602
  const localVarOperationServerBasePath = operationServerMap['AuthApi.authControllerGoogleLogin']?.[localVarOperationServerIndex]?.url;
606
603
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
607
604
  },
608
- /**
609
- *
610
- * @param {ResetPasswordDTO} resetPasswordDTO
611
- * @param {*} [options] Override http request option.
612
- * @throws {RequiredError}
613
- */
614
- async authControllerResetPassword(resetPasswordDTO: ResetPasswordDTO, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ApiResponseDto>> {
615
- const localVarAxiosArgs = await localVarAxiosParamCreator.authControllerResetPassword(resetPasswordDTO, options);
616
- const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
617
- const localVarOperationServerBasePath = operationServerMap['AuthApi.authControllerResetPassword']?.[localVarOperationServerIndex]?.url;
618
- return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
619
- },
620
605
  /**
621
606
  *
622
607
  * @param {SignInDto} signInDto
@@ -651,14 +636,6 @@ export const AuthApiFp = function(configuration?: Configuration) {
651
636
  export const AuthApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
652
637
  const localVarFp = AuthApiFp(configuration)
653
638
  return {
654
- /**
655
- *
656
- * @param {*} [options] Override http request option.
657
- * @throws {RequiredError}
658
- */
659
- authControllerForgotPassword(options?: RawAxiosRequestConfig): AxiosPromise<ApiResponseDto> {
660
- return localVarFp.authControllerForgotPassword(options).then((request) => request(axios, basePath));
661
- },
662
639
  /**
663
640
  *
664
641
  * @param {*} [options] Override http request option.
@@ -667,15 +644,6 @@ export const AuthApiFactory = function (configuration?: Configuration, basePath?
667
644
  authControllerGoogleLogin(options?: RawAxiosRequestConfig): AxiosPromise<void> {
668
645
  return localVarFp.authControllerGoogleLogin(options).then((request) => request(axios, basePath));
669
646
  },
670
- /**
671
- *
672
- * @param {ResetPasswordDTO} resetPasswordDTO
673
- * @param {*} [options] Override http request option.
674
- * @throws {RequiredError}
675
- */
676
- authControllerResetPassword(resetPasswordDTO: ResetPasswordDTO, options?: RawAxiosRequestConfig): AxiosPromise<ApiResponseDto> {
677
- return localVarFp.authControllerResetPassword(resetPasswordDTO, options).then((request) => request(axios, basePath));
678
- },
679
647
  /**
680
648
  *
681
649
  * @param {SignInDto} signInDto
@@ -704,16 +672,6 @@ export const AuthApiFactory = function (configuration?: Configuration, basePath?
704
672
  * @extends {BaseAPI}
705
673
  */
706
674
  export class AuthApi extends BaseAPI {
707
- /**
708
- *
709
- * @param {*} [options] Override http request option.
710
- * @throws {RequiredError}
711
- * @memberof AuthApi
712
- */
713
- public authControllerForgotPassword(options?: RawAxiosRequestConfig) {
714
- return AuthApiFp(this.configuration).authControllerForgotPassword(options).then((request) => request(this.axios, this.basePath));
715
- }
716
-
717
675
  /**
718
676
  *
719
677
  * @param {*} [options] Override http request option.
@@ -724,17 +682,6 @@ export class AuthApi extends BaseAPI {
724
682
  return AuthApiFp(this.configuration).authControllerGoogleLogin(options).then((request) => request(this.axios, this.basePath));
725
683
  }
726
684
 
727
- /**
728
- *
729
- * @param {ResetPasswordDTO} resetPasswordDTO
730
- * @param {*} [options] Override http request option.
731
- * @throws {RequiredError}
732
- * @memberof AuthApi
733
- */
734
- public authControllerResetPassword(resetPasswordDTO: ResetPasswordDTO, options?: RawAxiosRequestConfig) {
735
- return AuthApiFp(this.configuration).authControllerResetPassword(resetPasswordDTO, options).then((request) => request(this.axios, this.basePath));
736
- }
737
-
738
685
  /**
739
686
  *
740
687
  * @param {SignInDto} signInDto
@@ -771,8 +718,8 @@ export const GoalsApiAxiosParamCreator = function (configuration?: Configuration
771
718
  * @param {*} [options] Override http request option.
772
719
  * @throws {RequiredError}
773
720
  */
774
- goalControllerGetMe: async (options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
775
- const localVarPath = `/goals`;
721
+ goalControllerListGoals: async (options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
722
+ const localVarPath = `/v1/goals`;
776
723
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
777
724
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
778
725
  let baseOptions;
@@ -790,45 +737,6 @@ export const GoalsApiAxiosParamCreator = function (configuration?: Configuration
790
737
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
791
738
  localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
792
739
 
793
- return {
794
- url: toPathString(localVarUrlObj),
795
- options: localVarRequestOptions,
796
- };
797
- },
798
- /**
799
- *
800
- * @param {Array<string>} requestBody
801
- * @param {*} [options] Override http request option.
802
- * @throws {RequiredError}
803
- */
804
- goalControllerOnBoarded: async (requestBody: Array<string>, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
805
- // verify required parameter 'requestBody' is not null or undefined
806
- assertParamExists('goalControllerOnBoarded', 'requestBody', requestBody)
807
- const localVarPath = `/goals`;
808
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
809
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
810
- let baseOptions;
811
- if (configuration) {
812
- baseOptions = configuration.baseOptions;
813
- }
814
-
815
- const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
816
- const localVarHeaderParameter = {} as any;
817
- const localVarQueryParameter = {} as any;
818
-
819
- // authentication bearer required
820
- // http bearer authentication required
821
- await setBearerAuthToObject(localVarHeaderParameter, configuration)
822
-
823
-
824
-
825
- localVarHeaderParameter['Content-Type'] = 'application/json';
826
-
827
- setSearchParams(localVarUrlObj, localVarQueryParameter);
828
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
829
- localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
830
- localVarRequestOptions.data = serializeDataIfNeeded(requestBody, localVarRequestOptions, configuration)
831
-
832
740
  return {
833
741
  url: toPathString(localVarUrlObj),
834
742
  options: localVarRequestOptions,
@@ -849,22 +757,10 @@ export const GoalsApiFp = function(configuration?: Configuration) {
849
757
  * @param {*} [options] Override http request option.
850
758
  * @throws {RequiredError}
851
759
  */
852
- async goalControllerGetMe(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
853
- const localVarAxiosArgs = await localVarAxiosParamCreator.goalControllerGetMe(options);
760
+ async goalControllerListGoals(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GoalListResponse>> {
761
+ const localVarAxiosArgs = await localVarAxiosParamCreator.goalControllerListGoals(options);
854
762
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
855
- const localVarOperationServerBasePath = operationServerMap['GoalsApi.goalControllerGetMe']?.[localVarOperationServerIndex]?.url;
856
- return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
857
- },
858
- /**
859
- *
860
- * @param {Array<string>} requestBody
861
- * @param {*} [options] Override http request option.
862
- * @throws {RequiredError}
863
- */
864
- async goalControllerOnBoarded(requestBody: Array<string>, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
865
- const localVarAxiosArgs = await localVarAxiosParamCreator.goalControllerOnBoarded(requestBody, options);
866
- const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
867
- const localVarOperationServerBasePath = operationServerMap['GoalsApi.goalControllerOnBoarded']?.[localVarOperationServerIndex]?.url;
763
+ const localVarOperationServerBasePath = operationServerMap['GoalsApi.goalControllerListGoals']?.[localVarOperationServerIndex]?.url;
868
764
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
869
765
  },
870
766
  }
@@ -882,17 +778,8 @@ export const GoalsApiFactory = function (configuration?: Configuration, basePath
882
778
  * @param {*} [options] Override http request option.
883
779
  * @throws {RequiredError}
884
780
  */
885
- goalControllerGetMe(options?: RawAxiosRequestConfig): AxiosPromise<void> {
886
- return localVarFp.goalControllerGetMe(options).then((request) => request(axios, basePath));
887
- },
888
- /**
889
- *
890
- * @param {Array<string>} requestBody
891
- * @param {*} [options] Override http request option.
892
- * @throws {RequiredError}
893
- */
894
- goalControllerOnBoarded(requestBody: Array<string>, options?: RawAxiosRequestConfig): AxiosPromise<void> {
895
- return localVarFp.goalControllerOnBoarded(requestBody, options).then((request) => request(axios, basePath));
781
+ goalControllerListGoals(options?: RawAxiosRequestConfig): AxiosPromise<GoalListResponse> {
782
+ return localVarFp.goalControllerListGoals(options).then((request) => request(axios, basePath));
896
783
  },
897
784
  };
898
785
  };
@@ -910,19 +797,8 @@ export class GoalsApi extends BaseAPI {
910
797
  * @throws {RequiredError}
911
798
  * @memberof GoalsApi
912
799
  */
913
- public goalControllerGetMe(options?: RawAxiosRequestConfig) {
914
- return GoalsApiFp(this.configuration).goalControllerGetMe(options).then((request) => request(this.axios, this.basePath));
915
- }
916
-
917
- /**
918
- *
919
- * @param {Array<string>} requestBody
920
- * @param {*} [options] Override http request option.
921
- * @throws {RequiredError}
922
- * @memberof GoalsApi
923
- */
924
- public goalControllerOnBoarded(requestBody: Array<string>, options?: RawAxiosRequestConfig) {
925
- return GoalsApiFp(this.configuration).goalControllerOnBoarded(requestBody, options).then((request) => request(this.axios, this.basePath));
800
+ public goalControllerListGoals(options?: RawAxiosRequestConfig) {
801
+ return GoalsApiFp(this.configuration).goalControllerListGoals(options).then((request) => request(this.axios, this.basePath));
926
802
  }
927
803
  }
928
804
 
@@ -940,7 +816,7 @@ export const PlansApiAxiosParamCreator = function (configuration?: Configuration
940
816
  * @throws {RequiredError}
941
817
  */
942
818
  paymentControllerGetPlans: async (options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
943
- const localVarPath = `/plans`;
819
+ const localVarPath = `/v1/plans`;
944
820
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
945
821
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
946
822
  let baseOptions;
@@ -952,10 +828,6 @@ export const PlansApiAxiosParamCreator = function (configuration?: Configuration
952
828
  const localVarHeaderParameter = {} as any;
953
829
  const localVarQueryParameter = {} as any;
954
830
 
955
- // authentication bearer required
956
- // http bearer authentication required
957
- await setBearerAuthToObject(localVarHeaderParameter, configuration)
958
-
959
831
 
960
832
 
961
833
  setSearchParams(localVarUrlObj, localVarQueryParameter);
@@ -982,7 +854,7 @@ export const PlansApiFp = function(configuration?: Configuration) {
982
854
  * @param {*} [options] Override http request option.
983
855
  * @throws {RequiredError}
984
856
  */
985
- async paymentControllerGetPlans(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
857
+ async paymentControllerGetPlans(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<PlanResponseDTO>> {
986
858
  const localVarAxiosArgs = await localVarAxiosParamCreator.paymentControllerGetPlans(options);
987
859
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
988
860
  const localVarOperationServerBasePath = operationServerMap['PlansApi.paymentControllerGetPlans']?.[localVarOperationServerIndex]?.url;
@@ -1003,7 +875,7 @@ export const PlansApiFactory = function (configuration?: Configuration, basePath
1003
875
  * @param {*} [options] Override http request option.
1004
876
  * @throws {RequiredError}
1005
877
  */
1006
- paymentControllerGetPlans(options?: RawAxiosRequestConfig): AxiosPromise<void> {
878
+ paymentControllerGetPlans(options?: RawAxiosRequestConfig): AxiosPromise<PlanResponseDTO> {
1007
879
  return localVarFp.paymentControllerGetPlans(options).then((request) => request(axios, basePath));
1008
880
  },
1009
881
  };
@@ -1041,7 +913,7 @@ export const UsersApiAxiosParamCreator = function (configuration?: Configuration
1041
913
  * @throws {RequiredError}
1042
914
  */
1043
915
  usersControllerGetMe: async (options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
1044
- const localVarPath = `/user/me`;
916
+ const localVarPath = `/v1/user/me`;
1045
917
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
1046
918
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1047
919
  let baseOptions;
@@ -1077,7 +949,7 @@ export const UsersApiAxiosParamCreator = function (configuration?: Configuration
1077
949
  usersControllerOnBoarded: async (onBoardingDTO: OnBoardingDTO, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
1078
950
  // verify required parameter 'onBoardingDTO' is not null or undefined
1079
951
  assertParamExists('usersControllerOnBoarded', 'onBoardingDTO', onBoardingDTO)
1080
- const localVarPath = `/user/onboarding`;
952
+ const localVarPath = `/v1/user/onboarding`;
1081
953
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
1082
954
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1083
955
  let baseOptions;
package/base.ts CHANGED
@@ -19,7 +19,7 @@ import type { Configuration } from './configuration';
19
19
  import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';
20
20
  import globalAxios from 'axios';
21
21
 
22
- export const BASE_PATH = "https://localhost:8080".replace(/\/+$/, "");
22
+ export const BASE_PATH = "http://localhost:8080".replace(/\/+$/, "");
23
23
 
24
24
  /**
25
25
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gooday_corp/gooday-api-client",
3
- "version": "1.0.4",
3
+ "version": "1.0.6",
4
4
  "description": "API client for Gooday",
5
5
  "main": "index.ts",
6
6
  "scripts": {},