@dimrev4/fitness-v3-backend 0.0.24 → 0.0.26

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.
@@ -14,9 +14,12 @@ docs/CreateMeasurementRequestDto.md
14
14
  docs/CreateUserMealConsumptionRequestDto.md
15
15
  docs/CreateUserMetaRequestDto.md
16
16
  docs/DeleteMeasurementResponseDto.md
17
+ docs/ExerciseDto.md
18
+ docs/ExercisesV1Api.md
17
19
  docs/GetAllMealsResponseDto.md
18
20
  docs/GetAllMeasurementsResponseDto.md
19
21
  docs/GetAllUserMealConsumptionResponseDto.md
22
+ docs/GetExercisesResponseDto.md
20
23
  docs/GetIngredientsResponseDto.md
21
24
  docs/GetMeResponseDto.md
22
25
  docs/GetMealsResponseDto.md
package/api.ts CHANGED
@@ -381,6 +381,145 @@ export interface DeleteMeasurementResponseDto {
381
381
  */
382
382
  'id': string;
383
383
  }
384
+ /**
385
+ *
386
+ * @export
387
+ * @interface ExerciseDto
388
+ */
389
+ export interface ExerciseDto {
390
+ /**
391
+ * Exercise ID
392
+ * @type {string}
393
+ * @memberof ExerciseDto
394
+ */
395
+ 'id': string;
396
+ /**
397
+ * Exercise name
398
+ * @type {string}
399
+ * @memberof ExerciseDto
400
+ */
401
+ 'name': string;
402
+ /**
403
+ * Exercise description
404
+ * @type {string}
405
+ * @memberof ExerciseDto
406
+ */
407
+ 'description': string;
408
+ /**
409
+ * Exercise image URL
410
+ * @type {string}
411
+ * @memberof ExerciseDto
412
+ */
413
+ 'imgUrl': string;
414
+ /**
415
+ * Exercise type
416
+ * @type {string}
417
+ * @memberof ExerciseDto
418
+ */
419
+ 'type': ExerciseDtoTypeEnum;
420
+ /**
421
+ * Exercise body parts
422
+ * @type {Array<string>}
423
+ * @memberof ExerciseDto
424
+ */
425
+ 'bodyParts': Array<ExerciseDtoBodyPartsEnum>;
426
+ /**
427
+ * Exercise equipment
428
+ * @type {Array<string>}
429
+ * @memberof ExerciseDto
430
+ */
431
+ 'equipment': Array<ExerciseDtoEquipmentEnum>;
432
+ /**
433
+ * Exercise difficulty
434
+ * @type {string}
435
+ * @memberof ExerciseDto
436
+ */
437
+ 'difficulty': ExerciseDtoDifficultyEnum;
438
+ /**
439
+ * Exercise instructions
440
+ * @type {string}
441
+ * @memberof ExerciseDto
442
+ */
443
+ 'instructions': string;
444
+ /**
445
+ * Exercise created at
446
+ * @type {string}
447
+ * @memberof ExerciseDto
448
+ */
449
+ 'createdAt': string;
450
+ /**
451
+ * Exercise updated at
452
+ * @type {string}
453
+ * @memberof ExerciseDto
454
+ */
455
+ 'updatedAt': string;
456
+ /**
457
+ * Exercise deleted at
458
+ * @type {string}
459
+ * @memberof ExerciseDto
460
+ */
461
+ 'deletedAt': string | null;
462
+ }
463
+
464
+ export const ExerciseDtoTypeEnum = {
465
+ Cardio: 'CARDIO',
466
+ Strength: 'STRENGTH',
467
+ Flexibility: 'FLEXIBILITY',
468
+ BodyWeight: 'BODY_WEIGHT'
469
+ } as const;
470
+
471
+ export type ExerciseDtoTypeEnum = typeof ExerciseDtoTypeEnum[keyof typeof ExerciseDtoTypeEnum];
472
+ export const ExerciseDtoBodyPartsEnum = {
473
+ Chest: 'CHEST',
474
+ Back: 'BACK',
475
+ Shoulders: 'SHOULDERS',
476
+ Biceps: 'BICEPS',
477
+ Triceps: 'TRICEPS',
478
+ Forearms: 'FOREARMS',
479
+ Abdomen: 'ABDOMEN',
480
+ Obliques: 'OBLIQUES',
481
+ Quads: 'QUADS',
482
+ Hamstrings: 'HAMSTRINGS',
483
+ Glutes: 'GLUTES',
484
+ Calves: 'CALVES'
485
+ } as const;
486
+
487
+ export type ExerciseDtoBodyPartsEnum = typeof ExerciseDtoBodyPartsEnum[keyof typeof ExerciseDtoBodyPartsEnum];
488
+ export const ExerciseDtoEquipmentEnum = {
489
+ Bodyweight: 'BODYWEIGHT',
490
+ Dumbbells: 'DUMBBELLS',
491
+ Barbell: 'BARBELL',
492
+ Plates: 'PLATES',
493
+ Bench: 'BENCH',
494
+ SquatRack: 'SQUAT_RACK',
495
+ SmithMachine: 'SMITH_MACHINE',
496
+ Machine: 'MACHINE',
497
+ CableMachine: 'CABLE_MACHINE',
498
+ PullUpBar: 'PULL_UP_BAR',
499
+ DipStation: 'DIP_STATION',
500
+ ResistanceBands: 'RESISTANCE_BANDS',
501
+ MedicineBall: 'MEDICINE_BALL',
502
+ Kettlebell: 'KETTLEBELL',
503
+ BattleRope: 'BATTLE_ROPE',
504
+ JumpRope: 'JUMP_ROPE',
505
+ Treadmill: 'TREADMILL',
506
+ StationaryBike: 'STATIONARY_BIKE',
507
+ RowingMachine: 'ROWING_MACHINE',
508
+ Elliptical: 'ELLIPTICAL',
509
+ StairClimber: 'STAIR_CLIMBER',
510
+ SwimmingPool: 'SWIMMING_POOL',
511
+ None: 'NONE'
512
+ } as const;
513
+
514
+ export type ExerciseDtoEquipmentEnum = typeof ExerciseDtoEquipmentEnum[keyof typeof ExerciseDtoEquipmentEnum];
515
+ export const ExerciseDtoDifficultyEnum = {
516
+ Easy: 'EASY',
517
+ Medium: 'MEDIUM',
518
+ Hard: 'HARD'
519
+ } as const;
520
+
521
+ export type ExerciseDtoDifficultyEnum = typeof ExerciseDtoDifficultyEnum[keyof typeof ExerciseDtoDifficultyEnum];
522
+
384
523
  /**
385
524
  *
386
525
  * @export
@@ -444,6 +583,49 @@ export interface GetAllUserMealConsumptionResponseDto {
444
583
  */
445
584
  'totalItems': number;
446
585
  }
586
+ /**
587
+ *
588
+ * @export
589
+ * @interface GetExercisesResponseDto
590
+ */
591
+ export interface GetExercisesResponseDto {
592
+ /**
593
+ * Exercises
594
+ * @type {ExerciseDto}
595
+ * @memberof GetExercisesResponseDto
596
+ */
597
+ 'items': ExerciseDto;
598
+ /**
599
+ * Total number of items
600
+ * @type {number}
601
+ * @memberof GetExercisesResponseDto
602
+ */
603
+ 'totalItems': number;
604
+ /**
605
+ * Total number of pages
606
+ * @type {number}
607
+ * @memberof GetExercisesResponseDto
608
+ */
609
+ 'totalPages': number;
610
+ /**
611
+ * Current page
612
+ * @type {number}
613
+ * @memberof GetExercisesResponseDto
614
+ */
615
+ 'currentPage': number;
616
+ /**
617
+ * Has next page
618
+ * @type {boolean}
619
+ * @memberof GetExercisesResponseDto
620
+ */
621
+ 'hasNextPage': boolean;
622
+ /**
623
+ * Has previous page
624
+ * @type {boolean}
625
+ * @memberof GetExercisesResponseDto
626
+ */
627
+ 'hasPreviousPage': boolean;
628
+ }
447
629
  /**
448
630
  *
449
631
  * @export
@@ -2735,6 +2917,219 @@ export class AuthV1Api extends BaseAPI implements AuthV1ApiInterface {
2735
2917
 
2736
2918
 
2737
2919
 
2920
+ /**
2921
+ * ExercisesV1Api - axios parameter creator
2922
+ * @export
2923
+ */
2924
+ export const ExercisesV1ApiAxiosParamCreator = function (configuration?: Configuration) {
2925
+ return {
2926
+ /**
2927
+ *
2928
+ * @summary Get exercises
2929
+ * @param {number} [limit] Limit
2930
+ * @param {number} [offset] Offset
2931
+ * @param {string} [name] Ingredient name
2932
+ * @param {string} [query] Ingredient query
2933
+ * @param {string} [orderBy] Order by
2934
+ * @param {boolean} [isAsc] Ascending order
2935
+ * @param {*} [options] Override http request option.
2936
+ * @throws {RequiredError}
2937
+ */
2938
+ exercisesV1ControllerGetExercises: async (limit?: number, offset?: number, name?: string, query?: string, orderBy?: string, isAsc?: boolean, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
2939
+ const localVarPath = `/api/exercises/v1`;
2940
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2941
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2942
+ let baseOptions;
2943
+ if (configuration) {
2944
+ baseOptions = configuration.baseOptions;
2945
+ }
2946
+
2947
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
2948
+ const localVarHeaderParameter = {} as any;
2949
+ const localVarQueryParameter = {} as any;
2950
+
2951
+ // authentication apiKey required
2952
+ await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration)
2953
+
2954
+ // authentication bearer required
2955
+ // http bearer authentication required
2956
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
2957
+
2958
+ if (limit !== undefined) {
2959
+ localVarQueryParameter['limit'] = limit;
2960
+ }
2961
+
2962
+ if (offset !== undefined) {
2963
+ localVarQueryParameter['offset'] = offset;
2964
+ }
2965
+
2966
+ if (name !== undefined) {
2967
+ localVarQueryParameter['name'] = name;
2968
+ }
2969
+
2970
+ if (query !== undefined) {
2971
+ localVarQueryParameter['query'] = query;
2972
+ }
2973
+
2974
+ if (orderBy !== undefined) {
2975
+ localVarQueryParameter['orderBy'] = orderBy;
2976
+ }
2977
+
2978
+ if (isAsc !== undefined) {
2979
+ localVarQueryParameter['isAsc'] = isAsc;
2980
+ }
2981
+
2982
+
2983
+
2984
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
2985
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2986
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
2987
+
2988
+ return {
2989
+ url: toPathString(localVarUrlObj),
2990
+ options: localVarRequestOptions,
2991
+ };
2992
+ },
2993
+ }
2994
+ };
2995
+
2996
+ /**
2997
+ * ExercisesV1Api - functional programming interface
2998
+ * @export
2999
+ */
3000
+ export const ExercisesV1ApiFp = function(configuration?: Configuration) {
3001
+ const localVarAxiosParamCreator = ExercisesV1ApiAxiosParamCreator(configuration)
3002
+ return {
3003
+ /**
3004
+ *
3005
+ * @summary Get exercises
3006
+ * @param {number} [limit] Limit
3007
+ * @param {number} [offset] Offset
3008
+ * @param {string} [name] Ingredient name
3009
+ * @param {string} [query] Ingredient query
3010
+ * @param {string} [orderBy] Order by
3011
+ * @param {boolean} [isAsc] Ascending order
3012
+ * @param {*} [options] Override http request option.
3013
+ * @throws {RequiredError}
3014
+ */
3015
+ async exercisesV1ControllerGetExercises(limit?: number, offset?: number, name?: string, query?: string, orderBy?: string, isAsc?: boolean, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetExercisesResponseDto>> {
3016
+ const localVarAxiosArgs = await localVarAxiosParamCreator.exercisesV1ControllerGetExercises(limit, offset, name, query, orderBy, isAsc, options);
3017
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
3018
+ const localVarOperationServerBasePath = operationServerMap['ExercisesV1Api.exercisesV1ControllerGetExercises']?.[localVarOperationServerIndex]?.url;
3019
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
3020
+ },
3021
+ }
3022
+ };
3023
+
3024
+ /**
3025
+ * ExercisesV1Api - factory interface
3026
+ * @export
3027
+ */
3028
+ export const ExercisesV1ApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
3029
+ const localVarFp = ExercisesV1ApiFp(configuration)
3030
+ return {
3031
+ /**
3032
+ *
3033
+ * @summary Get exercises
3034
+ * @param {ExercisesV1ApiExercisesV1ControllerGetExercisesRequest} requestParameters Request parameters.
3035
+ * @param {*} [options] Override http request option.
3036
+ * @throws {RequiredError}
3037
+ */
3038
+ exercisesV1ControllerGetExercises(requestParameters: ExercisesV1ApiExercisesV1ControllerGetExercisesRequest = {}, options?: RawAxiosRequestConfig): AxiosPromise<GetExercisesResponseDto> {
3039
+ return localVarFp.exercisesV1ControllerGetExercises(requestParameters.limit, requestParameters.offset, requestParameters.name, requestParameters.query, requestParameters.orderBy, requestParameters.isAsc, options).then((request) => request(axios, basePath));
3040
+ },
3041
+ };
3042
+ };
3043
+
3044
+ /**
3045
+ * ExercisesV1Api - interface
3046
+ * @export
3047
+ * @interface ExercisesV1Api
3048
+ */
3049
+ export interface ExercisesV1ApiInterface {
3050
+ /**
3051
+ *
3052
+ * @summary Get exercises
3053
+ * @param {ExercisesV1ApiExercisesV1ControllerGetExercisesRequest} requestParameters Request parameters.
3054
+ * @param {*} [options] Override http request option.
3055
+ * @throws {RequiredError}
3056
+ * @memberof ExercisesV1ApiInterface
3057
+ */
3058
+ exercisesV1ControllerGetExercises(requestParameters?: ExercisesV1ApiExercisesV1ControllerGetExercisesRequest, options?: RawAxiosRequestConfig): AxiosPromise<GetExercisesResponseDto>;
3059
+
3060
+ }
3061
+
3062
+ /**
3063
+ * Request parameters for exercisesV1ControllerGetExercises operation in ExercisesV1Api.
3064
+ * @export
3065
+ * @interface ExercisesV1ApiExercisesV1ControllerGetExercisesRequest
3066
+ */
3067
+ export interface ExercisesV1ApiExercisesV1ControllerGetExercisesRequest {
3068
+ /**
3069
+ * Limit
3070
+ * @type {number}
3071
+ * @memberof ExercisesV1ApiExercisesV1ControllerGetExercises
3072
+ */
3073
+ readonly limit?: number
3074
+
3075
+ /**
3076
+ * Offset
3077
+ * @type {number}
3078
+ * @memberof ExercisesV1ApiExercisesV1ControllerGetExercises
3079
+ */
3080
+ readonly offset?: number
3081
+
3082
+ /**
3083
+ * Ingredient name
3084
+ * @type {string}
3085
+ * @memberof ExercisesV1ApiExercisesV1ControllerGetExercises
3086
+ */
3087
+ readonly name?: string
3088
+
3089
+ /**
3090
+ * Ingredient query
3091
+ * @type {string}
3092
+ * @memberof ExercisesV1ApiExercisesV1ControllerGetExercises
3093
+ */
3094
+ readonly query?: string
3095
+
3096
+ /**
3097
+ * Order by
3098
+ * @type {string}
3099
+ * @memberof ExercisesV1ApiExercisesV1ControllerGetExercises
3100
+ */
3101
+ readonly orderBy?: string
3102
+
3103
+ /**
3104
+ * Ascending order
3105
+ * @type {boolean}
3106
+ * @memberof ExercisesV1ApiExercisesV1ControllerGetExercises
3107
+ */
3108
+ readonly isAsc?: boolean
3109
+ }
3110
+
3111
+ /**
3112
+ * ExercisesV1Api - object-oriented interface
3113
+ * @export
3114
+ * @class ExercisesV1Api
3115
+ * @extends {BaseAPI}
3116
+ */
3117
+ export class ExercisesV1Api extends BaseAPI implements ExercisesV1ApiInterface {
3118
+ /**
3119
+ *
3120
+ * @summary Get exercises
3121
+ * @param {ExercisesV1ApiExercisesV1ControllerGetExercisesRequest} requestParameters Request parameters.
3122
+ * @param {*} [options] Override http request option.
3123
+ * @throws {RequiredError}
3124
+ * @memberof ExercisesV1Api
3125
+ */
3126
+ public exercisesV1ControllerGetExercises(requestParameters: ExercisesV1ApiExercisesV1ControllerGetExercisesRequest = {}, options?: RawAxiosRequestConfig) {
3127
+ return ExercisesV1ApiFp(this.configuration).exercisesV1ControllerGetExercises(requestParameters.limit, requestParameters.offset, requestParameters.name, requestParameters.query, requestParameters.orderBy, requestParameters.isAsc, options).then((request) => request(this.axios, this.basePath));
3128
+ }
3129
+ }
3130
+
3131
+
3132
+
2738
3133
  /**
2739
3134
  * IngredientsV1Api - axios parameter creator
2740
3135
  * @export