@dimrev4/fitness-v3-backend 0.0.54 → 0.0.56

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.
@@ -5,10 +5,6 @@ api.ts
5
5
  base.ts
6
6
  common.ts
7
7
  configuration.ts
8
- docs/AdminContentStatsDto.md
9
- docs/AdminRecentUserDto.md
10
- docs/AdminStatsResponseDto.md
11
- docs/AdminV1Api.md
12
8
  docs/AuthV1Api.md
13
9
  docs/ConfirmOtpRequestDto.md
14
10
  docs/CreateExerciseRequestDto.md
@@ -43,6 +39,7 @@ docs/GetIngredientsResponseDto.md
43
39
  docs/GetMeResponseDto.md
44
40
  docs/GetMealsResponseDto.md
45
41
  docs/GetMeasurementsResponseDto.md
42
+ docs/GetUserStatsResponseDto.md
46
43
  docs/GetWorkoutsResponseDto.md
47
44
  docs/GroupDto.md
48
45
  docs/GroupGetPresignedPostUrlRequestDto.md
@@ -57,6 +54,7 @@ docs/MeasurementDto.md
57
54
  docs/MeasurementsV1Api.md
58
55
  docs/PresignedGetDataDto.md
59
56
  docs/PresignedPostDataDto.md
57
+ docs/PrivilegedV1Api.md
60
58
  docs/PublicGetPresignedPostUrlRequestDto.md
61
59
  docs/RefreshRequestDto.md
62
60
  docs/RegisterRequestDto.md
@@ -78,6 +76,7 @@ docs/UserMealConsumptionDailySummeryDto.md
78
76
  docs/UserMealConsumptionDetailsDto.md
79
77
  docs/UserMealsConsumptionV1Api.md
80
78
  docs/UserMetaDto.md
79
+ docs/UserStatsSummaryDto.md
81
80
  docs/UserToGroupDetailsDto.md
82
81
  docs/UserWorkoutCompletedDetailsDto.md
83
82
  docs/UserWorkoutCompletedV1Api.md
package/api.ts CHANGED
@@ -23,93 +23,6 @@ import type { RequestArgs } from './base';
23
23
  // @ts-ignore
24
24
  import { BASE_PATH, COLLECTION_FORMATS, BaseAPI, RequiredError, operationServerMap } from './base';
25
25
 
26
- /**
27
- *
28
- * @export
29
- * @interface AdminContentStatsDto
30
- */
31
- export interface AdminContentStatsDto {
32
- /**
33
- *
34
- * @type {number}
35
- * @memberof AdminContentStatsDto
36
- */
37
- 'totalExercises': number;
38
- /**
39
- *
40
- * @type {number}
41
- * @memberof AdminContentStatsDto
42
- */
43
- 'totalIngredients': number;
44
- /**
45
- *
46
- * @type {number}
47
- * @memberof AdminContentStatsDto
48
- */
49
- 'totalMeals': number;
50
- }
51
- /**
52
- *
53
- * @export
54
- * @interface AdminRecentUserDto
55
- */
56
- export interface AdminRecentUserDto {
57
- /**
58
- *
59
- * @type {string}
60
- * @memberof AdminRecentUserDto
61
- */
62
- 'id': string;
63
- /**
64
- *
65
- * @type {string}
66
- * @memberof AdminRecentUserDto
67
- */
68
- 'email': string;
69
- /**
70
- *
71
- * @type {string}
72
- * @memberof AdminRecentUserDto
73
- */
74
- 'firstName': string;
75
- /**
76
- *
77
- * @type {string}
78
- * @memberof AdminRecentUserDto
79
- */
80
- 'lastName': string;
81
- /**
82
- *
83
- * @type {string}
84
- * @memberof AdminRecentUserDto
85
- */
86
- 'createdAt': string;
87
- }
88
- /**
89
- *
90
- * @export
91
- * @interface AdminStatsResponseDto
92
- */
93
- export interface AdminStatsResponseDto {
94
- /**
95
- *
96
- * @type {number}
97
- * @memberof AdminStatsResponseDto
98
- */
99
- 'totalUsers': number;
100
- /**
101
- *
102
- * @type {Array<AdminRecentUserDto>}
103
- * @memberof AdminStatsResponseDto
104
- */
105
- 'recentUsers': Array<AdminRecentUserDto>;
106
- /**
107
- *
108
- * @type {AdminContentStatsDto}
109
- * @memberof AdminStatsResponseDto
110
- */
111
- 'contentStats': AdminContentStatsDto;
112
- }
113
26
  /**
114
27
  *
115
28
  * @export
@@ -1391,6 +1304,25 @@ export interface GetMeasurementsResponseDto {
1391
1304
  */
1392
1305
  'hasPreviousPage': boolean;
1393
1306
  }
1307
+ /**
1308
+ *
1309
+ * @export
1310
+ * @interface GetUserStatsResponseDto
1311
+ */
1312
+ export interface GetUserStatsResponseDto {
1313
+ /**
1314
+ * Total number of active users
1315
+ * @type {number}
1316
+ * @memberof GetUserStatsResponseDto
1317
+ */
1318
+ 'count': number;
1319
+ /**
1320
+ * Last 5 registered users (by createdAt, descending)
1321
+ * @type {Array<UserStatsSummaryDto>}
1322
+ * @memberof GetUserStatsResponseDto
1323
+ */
1324
+ 'lastRegisteredUsers': Array<UserStatsSummaryDto>;
1325
+ }
1394
1326
  /**
1395
1327
  *
1396
1328
  * @export
@@ -3284,6 +3216,37 @@ export const UserMetaDtoGenderEnum = {
3284
3216
 
3285
3217
  export type UserMetaDtoGenderEnum = typeof UserMetaDtoGenderEnum[keyof typeof UserMetaDtoGenderEnum];
3286
3218
 
3219
+ /**
3220
+ *
3221
+ * @export
3222
+ * @interface UserStatsSummaryDto
3223
+ */
3224
+ export interface UserStatsSummaryDto {
3225
+ /**
3226
+ * User ID
3227
+ * @type {string}
3228
+ * @memberof UserStatsSummaryDto
3229
+ */
3230
+ 'id': string;
3231
+ /**
3232
+ * Username
3233
+ * @type {string}
3234
+ * @memberof UserStatsSummaryDto
3235
+ */
3236
+ 'username': string;
3237
+ /**
3238
+ * Email address
3239
+ * @type {string}
3240
+ * @memberof UserStatsSummaryDto
3241
+ */
3242
+ 'email': string;
3243
+ /**
3244
+ * Registration timestamp
3245
+ * @type {string}
3246
+ * @memberof UserStatsSummaryDto
3247
+ */
3248
+ 'createdAt': string;
3249
+ }
3287
3250
  /**
3288
3251
  *
3289
3252
  * @export
@@ -3444,131 +3407,6 @@ export interface WorkoutMetaDto {
3444
3407
  'sets': Array<ExerciseSetsDto>;
3445
3408
  }
3446
3409
 
3447
- /**
3448
- * AdminV1Api - axios parameter creator
3449
- * @export
3450
- */
3451
- export const AdminV1ApiAxiosParamCreator = function (configuration?: Configuration) {
3452
- return {
3453
- /**
3454
- *
3455
- * @summary Get admin stats
3456
- * @param {*} [options] Override http request option.
3457
- * @throws {RequiredError}
3458
- */
3459
- adminV1ControllerGetAdminStats: async (options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
3460
- const localVarPath = `/api/admin/v1/stats`;
3461
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
3462
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
3463
- let baseOptions;
3464
- if (configuration) {
3465
- baseOptions = configuration.baseOptions;
3466
- }
3467
-
3468
- const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
3469
- const localVarHeaderParameter = {} as any;
3470
- const localVarQueryParameter = {} as any;
3471
-
3472
- // authentication apiKey required
3473
- await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration)
3474
-
3475
- // authentication bearer required
3476
- // http bearer authentication required
3477
- await setBearerAuthToObject(localVarHeaderParameter, configuration)
3478
-
3479
-
3480
-
3481
- setSearchParams(localVarUrlObj, localVarQueryParameter);
3482
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
3483
- localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
3484
-
3485
- return {
3486
- url: toPathString(localVarUrlObj),
3487
- options: localVarRequestOptions,
3488
- };
3489
- },
3490
- }
3491
- };
3492
-
3493
- /**
3494
- * AdminV1Api - functional programming interface
3495
- * @export
3496
- */
3497
- export const AdminV1ApiFp = function(configuration?: Configuration) {
3498
- const localVarAxiosParamCreator = AdminV1ApiAxiosParamCreator(configuration)
3499
- return {
3500
- /**
3501
- *
3502
- * @summary Get admin stats
3503
- * @param {*} [options] Override http request option.
3504
- * @throws {RequiredError}
3505
- */
3506
- async adminV1ControllerGetAdminStats(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AdminStatsResponseDto>> {
3507
- const localVarAxiosArgs = await localVarAxiosParamCreator.adminV1ControllerGetAdminStats(options);
3508
- const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
3509
- const localVarOperationServerBasePath = operationServerMap['AdminV1Api.adminV1ControllerGetAdminStats']?.[localVarOperationServerIndex]?.url;
3510
- return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
3511
- },
3512
- }
3513
- };
3514
-
3515
- /**
3516
- * AdminV1Api - factory interface
3517
- * @export
3518
- */
3519
- export const AdminV1ApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
3520
- const localVarFp = AdminV1ApiFp(configuration)
3521
- return {
3522
- /**
3523
- *
3524
- * @summary Get admin stats
3525
- * @param {*} [options] Override http request option.
3526
- * @throws {RequiredError}
3527
- */
3528
- adminV1ControllerGetAdminStats(options?: RawAxiosRequestConfig): AxiosPromise<AdminStatsResponseDto> {
3529
- return localVarFp.adminV1ControllerGetAdminStats(options).then((request) => request(axios, basePath));
3530
- },
3531
- };
3532
- };
3533
-
3534
- /**
3535
- * AdminV1Api - interface
3536
- * @export
3537
- * @interface AdminV1Api
3538
- */
3539
- export interface AdminV1ApiInterface {
3540
- /**
3541
- *
3542
- * @summary Get admin stats
3543
- * @param {*} [options] Override http request option.
3544
- * @throws {RequiredError}
3545
- * @memberof AdminV1ApiInterface
3546
- */
3547
- adminV1ControllerGetAdminStats(options?: RawAxiosRequestConfig): AxiosPromise<AdminStatsResponseDto>;
3548
-
3549
- }
3550
-
3551
- /**
3552
- * AdminV1Api - object-oriented interface
3553
- * @export
3554
- * @class AdminV1Api
3555
- * @extends {BaseAPI}
3556
- */
3557
- export class AdminV1Api extends BaseAPI implements AdminV1ApiInterface {
3558
- /**
3559
- *
3560
- * @summary Get admin stats
3561
- * @param {*} [options] Override http request option.
3562
- * @throws {RequiredError}
3563
- * @memberof AdminV1Api
3564
- */
3565
- public adminV1ControllerGetAdminStats(options?: RawAxiosRequestConfig) {
3566
- return AdminV1ApiFp(this.configuration).adminV1ControllerGetAdminStats(options).then((request) => request(this.axios, this.basePath));
3567
- }
3568
- }
3569
-
3570
-
3571
-
3572
3410
  /**
3573
3411
  * AuthV1Api - axios parameter creator
3574
3412
  * @export
@@ -7791,6 +7629,131 @@ export class MeasurementsV1Api extends BaseAPI implements MeasurementsV1ApiInter
7791
7629
 
7792
7630
 
7793
7631
 
7632
+ /**
7633
+ * PrivilegedV1Api - axios parameter creator
7634
+ * @export
7635
+ */
7636
+ export const PrivilegedV1ApiAxiosParamCreator = function (configuration?: Configuration) {
7637
+ return {
7638
+ /**
7639
+ *
7640
+ * @summary Get user stats (privileged users only)
7641
+ * @param {*} [options] Override http request option.
7642
+ * @throws {RequiredError}
7643
+ */
7644
+ privilegedV1ControllerGetUserStats: async (options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
7645
+ const localVarPath = `/api/privileged/v1/users/stats`;
7646
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
7647
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
7648
+ let baseOptions;
7649
+ if (configuration) {
7650
+ baseOptions = configuration.baseOptions;
7651
+ }
7652
+
7653
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
7654
+ const localVarHeaderParameter = {} as any;
7655
+ const localVarQueryParameter = {} as any;
7656
+
7657
+ // authentication apiKey required
7658
+ await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration)
7659
+
7660
+ // authentication bearer required
7661
+ // http bearer authentication required
7662
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
7663
+
7664
+
7665
+
7666
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
7667
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
7668
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
7669
+
7670
+ return {
7671
+ url: toPathString(localVarUrlObj),
7672
+ options: localVarRequestOptions,
7673
+ };
7674
+ },
7675
+ }
7676
+ };
7677
+
7678
+ /**
7679
+ * PrivilegedV1Api - functional programming interface
7680
+ * @export
7681
+ */
7682
+ export const PrivilegedV1ApiFp = function(configuration?: Configuration) {
7683
+ const localVarAxiosParamCreator = PrivilegedV1ApiAxiosParamCreator(configuration)
7684
+ return {
7685
+ /**
7686
+ *
7687
+ * @summary Get user stats (privileged users only)
7688
+ * @param {*} [options] Override http request option.
7689
+ * @throws {RequiredError}
7690
+ */
7691
+ async privilegedV1ControllerGetUserStats(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetUserStatsResponseDto>> {
7692
+ const localVarAxiosArgs = await localVarAxiosParamCreator.privilegedV1ControllerGetUserStats(options);
7693
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
7694
+ const localVarOperationServerBasePath = operationServerMap['PrivilegedV1Api.privilegedV1ControllerGetUserStats']?.[localVarOperationServerIndex]?.url;
7695
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
7696
+ },
7697
+ }
7698
+ };
7699
+
7700
+ /**
7701
+ * PrivilegedV1Api - factory interface
7702
+ * @export
7703
+ */
7704
+ export const PrivilegedV1ApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
7705
+ const localVarFp = PrivilegedV1ApiFp(configuration)
7706
+ return {
7707
+ /**
7708
+ *
7709
+ * @summary Get user stats (privileged users only)
7710
+ * @param {*} [options] Override http request option.
7711
+ * @throws {RequiredError}
7712
+ */
7713
+ privilegedV1ControllerGetUserStats(options?: RawAxiosRequestConfig): AxiosPromise<GetUserStatsResponseDto> {
7714
+ return localVarFp.privilegedV1ControllerGetUserStats(options).then((request) => request(axios, basePath));
7715
+ },
7716
+ };
7717
+ };
7718
+
7719
+ /**
7720
+ * PrivilegedV1Api - interface
7721
+ * @export
7722
+ * @interface PrivilegedV1Api
7723
+ */
7724
+ export interface PrivilegedV1ApiInterface {
7725
+ /**
7726
+ *
7727
+ * @summary Get user stats (privileged users only)
7728
+ * @param {*} [options] Override http request option.
7729
+ * @throws {RequiredError}
7730
+ * @memberof PrivilegedV1ApiInterface
7731
+ */
7732
+ privilegedV1ControllerGetUserStats(options?: RawAxiosRequestConfig): AxiosPromise<GetUserStatsResponseDto>;
7733
+
7734
+ }
7735
+
7736
+ /**
7737
+ * PrivilegedV1Api - object-oriented interface
7738
+ * @export
7739
+ * @class PrivilegedV1Api
7740
+ * @extends {BaseAPI}
7741
+ */
7742
+ export class PrivilegedV1Api extends BaseAPI implements PrivilegedV1ApiInterface {
7743
+ /**
7744
+ *
7745
+ * @summary Get user stats (privileged users only)
7746
+ * @param {*} [options] Override http request option.
7747
+ * @throws {RequiredError}
7748
+ * @memberof PrivilegedV1Api
7749
+ */
7750
+ public privilegedV1ControllerGetUserStats(options?: RawAxiosRequestConfig) {
7751
+ return PrivilegedV1ApiFp(this.configuration).privilegedV1ControllerGetUserStats(options).then((request) => request(this.axios, this.basePath));
7752
+ }
7753
+ }
7754
+
7755
+
7756
+
7794
7757
  /**
7795
7758
  * SavedMealsV1Api - axios parameter creator
7796
7759
  * @export