@dimrev4/fitness-v3-backend 0.0.30 → 0.0.32
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.
- package/.openapi-generator/FILES +2 -0
- package/api.ts +576 -0
- package/dist/api.d.ts +372 -0
- package/dist/api.js +352 -2
- package/dist/esm/api.d.ts +372 -0
- package/dist/esm/api.js +350 -0
- package/docs/CreateExerciseRequestDto.md +34 -0
- package/docs/ExercisesV1Api.md +172 -0
- package/docs/GetAllExercisesResponseDto.md +22 -0
- package/docs/IngredientsV1Api.md +54 -0
- package/package.json +1 -1
package/.openapi-generator/FILES
CHANGED
|
@@ -7,6 +7,7 @@ common.ts
|
|
|
7
7
|
configuration.ts
|
|
8
8
|
docs/AuthV1Api.md
|
|
9
9
|
docs/ConfirmOtpRequestDto.md
|
|
10
|
+
docs/CreateExerciseRequestDto.md
|
|
10
11
|
docs/CreateIngredientRequestDto.md
|
|
11
12
|
docs/CreateMealIngredientDto.md
|
|
12
13
|
docs/CreateMealRequestDto.md
|
|
@@ -22,6 +23,7 @@ docs/ExerciseDto.md
|
|
|
22
23
|
docs/ExerciseSetsDto.md
|
|
23
24
|
docs/ExerciseWithSetsDto.md
|
|
24
25
|
docs/ExercisesV1Api.md
|
|
26
|
+
docs/GetAllExercisesResponseDto.md
|
|
25
27
|
docs/GetAllIngredientsResponseDto.md
|
|
26
28
|
docs/GetAllMealsResponseDto.md
|
|
27
29
|
docs/GetAllMeasurementsResponseDto.md
|
package/api.ts
CHANGED
|
@@ -48,6 +48,121 @@ export interface ConfirmOtpRequestDto {
|
|
|
48
48
|
*/
|
|
49
49
|
'metaHash': string;
|
|
50
50
|
}
|
|
51
|
+
/**
|
|
52
|
+
*
|
|
53
|
+
* @export
|
|
54
|
+
* @interface CreateExerciseRequestDto
|
|
55
|
+
*/
|
|
56
|
+
export interface CreateExerciseRequestDto {
|
|
57
|
+
/**
|
|
58
|
+
* Exercise name
|
|
59
|
+
* @type {string}
|
|
60
|
+
* @memberof CreateExerciseRequestDto
|
|
61
|
+
*/
|
|
62
|
+
'name': string;
|
|
63
|
+
/**
|
|
64
|
+
* Exercise description
|
|
65
|
+
* @type {string}
|
|
66
|
+
* @memberof CreateExerciseRequestDto
|
|
67
|
+
*/
|
|
68
|
+
'description': string;
|
|
69
|
+
/**
|
|
70
|
+
* Exercise image URL
|
|
71
|
+
* @type {string}
|
|
72
|
+
* @memberof CreateExerciseRequestDto
|
|
73
|
+
*/
|
|
74
|
+
'imgUrl': string;
|
|
75
|
+
/**
|
|
76
|
+
* Exercise type
|
|
77
|
+
* @type {string}
|
|
78
|
+
* @memberof CreateExerciseRequestDto
|
|
79
|
+
*/
|
|
80
|
+
'type': CreateExerciseRequestDtoTypeEnum;
|
|
81
|
+
/**
|
|
82
|
+
* Exercise body parts
|
|
83
|
+
* @type {Array<string>}
|
|
84
|
+
* @memberof CreateExerciseRequestDto
|
|
85
|
+
*/
|
|
86
|
+
'bodyParts': Array<CreateExerciseRequestDtoBodyPartsEnum>;
|
|
87
|
+
/**
|
|
88
|
+
* Exercise equipment
|
|
89
|
+
* @type {Array<string>}
|
|
90
|
+
* @memberof CreateExerciseRequestDto
|
|
91
|
+
*/
|
|
92
|
+
'equipment': Array<CreateExerciseRequestDtoEquipmentEnum>;
|
|
93
|
+
/**
|
|
94
|
+
* Exercise difficulty
|
|
95
|
+
* @type {string}
|
|
96
|
+
* @memberof CreateExerciseRequestDto
|
|
97
|
+
*/
|
|
98
|
+
'difficulty': CreateExerciseRequestDtoDifficultyEnum;
|
|
99
|
+
/**
|
|
100
|
+
* Exercise instructions
|
|
101
|
+
* @type {string}
|
|
102
|
+
* @memberof CreateExerciseRequestDto
|
|
103
|
+
*/
|
|
104
|
+
'instructions': string;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
export const CreateExerciseRequestDtoTypeEnum = {
|
|
108
|
+
Cardio: 'CARDIO',
|
|
109
|
+
Strength: 'STRENGTH',
|
|
110
|
+
Flexibility: 'FLEXIBILITY',
|
|
111
|
+
BodyWeight: 'BODY_WEIGHT'
|
|
112
|
+
} as const;
|
|
113
|
+
|
|
114
|
+
export type CreateExerciseRequestDtoTypeEnum = typeof CreateExerciseRequestDtoTypeEnum[keyof typeof CreateExerciseRequestDtoTypeEnum];
|
|
115
|
+
export const CreateExerciseRequestDtoBodyPartsEnum = {
|
|
116
|
+
Chest: 'CHEST',
|
|
117
|
+
Back: 'BACK',
|
|
118
|
+
Shoulders: 'SHOULDERS',
|
|
119
|
+
Biceps: 'BICEPS',
|
|
120
|
+
Triceps: 'TRICEPS',
|
|
121
|
+
Forearms: 'FOREARMS',
|
|
122
|
+
Abdomen: 'ABDOMEN',
|
|
123
|
+
Obliques: 'OBLIQUES',
|
|
124
|
+
Quads: 'QUADS',
|
|
125
|
+
Hamstrings: 'HAMSTRINGS',
|
|
126
|
+
Glutes: 'GLUTES',
|
|
127
|
+
Calves: 'CALVES'
|
|
128
|
+
} as const;
|
|
129
|
+
|
|
130
|
+
export type CreateExerciseRequestDtoBodyPartsEnum = typeof CreateExerciseRequestDtoBodyPartsEnum[keyof typeof CreateExerciseRequestDtoBodyPartsEnum];
|
|
131
|
+
export const CreateExerciseRequestDtoEquipmentEnum = {
|
|
132
|
+
Bodyweight: 'BODYWEIGHT',
|
|
133
|
+
Dumbbells: 'DUMBBELLS',
|
|
134
|
+
Barbell: 'BARBELL',
|
|
135
|
+
Plates: 'PLATES',
|
|
136
|
+
Bench: 'BENCH',
|
|
137
|
+
SquatRack: 'SQUAT_RACK',
|
|
138
|
+
SmithMachine: 'SMITH_MACHINE',
|
|
139
|
+
Machine: 'MACHINE',
|
|
140
|
+
CableMachine: 'CABLE_MACHINE',
|
|
141
|
+
PullUpBar: 'PULL_UP_BAR',
|
|
142
|
+
DipStation: 'DIP_STATION',
|
|
143
|
+
ResistanceBands: 'RESISTANCE_BANDS',
|
|
144
|
+
MedicineBall: 'MEDICINE_BALL',
|
|
145
|
+
Kettlebell: 'KETTLEBELL',
|
|
146
|
+
BattleRope: 'BATTLE_ROPE',
|
|
147
|
+
JumpRope: 'JUMP_ROPE',
|
|
148
|
+
Treadmill: 'TREADMILL',
|
|
149
|
+
StationaryBike: 'STATIONARY_BIKE',
|
|
150
|
+
RowingMachine: 'ROWING_MACHINE',
|
|
151
|
+
Elliptical: 'ELLIPTICAL',
|
|
152
|
+
StairClimber: 'STAIR_CLIMBER',
|
|
153
|
+
SwimmingPool: 'SWIMMING_POOL',
|
|
154
|
+
None: 'NONE'
|
|
155
|
+
} as const;
|
|
156
|
+
|
|
157
|
+
export type CreateExerciseRequestDtoEquipmentEnum = typeof CreateExerciseRequestDtoEquipmentEnum[keyof typeof CreateExerciseRequestDtoEquipmentEnum];
|
|
158
|
+
export const CreateExerciseRequestDtoDifficultyEnum = {
|
|
159
|
+
Easy: 'EASY',
|
|
160
|
+
Medium: 'MEDIUM',
|
|
161
|
+
Hard: 'HARD'
|
|
162
|
+
} as const;
|
|
163
|
+
|
|
164
|
+
export type CreateExerciseRequestDtoDifficultyEnum = typeof CreateExerciseRequestDtoDifficultyEnum[keyof typeof CreateExerciseRequestDtoDifficultyEnum];
|
|
165
|
+
|
|
51
166
|
/**
|
|
52
167
|
*
|
|
53
168
|
* @export
|
|
@@ -811,6 +926,25 @@ export const ExerciseWithSetsDtoDifficultyEnum = {
|
|
|
811
926
|
|
|
812
927
|
export type ExerciseWithSetsDtoDifficultyEnum = typeof ExerciseWithSetsDtoDifficultyEnum[keyof typeof ExerciseWithSetsDtoDifficultyEnum];
|
|
813
928
|
|
|
929
|
+
/**
|
|
930
|
+
*
|
|
931
|
+
* @export
|
|
932
|
+
* @interface GetAllExercisesResponseDto
|
|
933
|
+
*/
|
|
934
|
+
export interface GetAllExercisesResponseDto {
|
|
935
|
+
/**
|
|
936
|
+
*
|
|
937
|
+
* @type {Array<ExerciseDto>}
|
|
938
|
+
* @memberof GetAllExercisesResponseDto
|
|
939
|
+
*/
|
|
940
|
+
'items': Array<ExerciseDto>;
|
|
941
|
+
/**
|
|
942
|
+
*
|
|
943
|
+
* @type {number}
|
|
944
|
+
* @memberof GetAllExercisesResponseDto
|
|
945
|
+
*/
|
|
946
|
+
'totalItems': number;
|
|
947
|
+
}
|
|
814
948
|
/**
|
|
815
949
|
*
|
|
816
950
|
* @export
|
|
@@ -3714,6 +3848,147 @@ export class AuthV1Api extends BaseAPI implements AuthV1ApiInterface {
|
|
|
3714
3848
|
*/
|
|
3715
3849
|
export const ExercisesV1ApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
3716
3850
|
return {
|
|
3851
|
+
/**
|
|
3852
|
+
*
|
|
3853
|
+
* @summary Create exercise
|
|
3854
|
+
* @param {CreateExerciseRequestDto} createExerciseRequestDto
|
|
3855
|
+
* @param {*} [options] Override http request option.
|
|
3856
|
+
* @throws {RequiredError}
|
|
3857
|
+
*/
|
|
3858
|
+
exercisesV1ControllerCreateExercise: async (createExerciseRequestDto: CreateExerciseRequestDto, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
3859
|
+
// verify required parameter 'createExerciseRequestDto' is not null or undefined
|
|
3860
|
+
assertParamExists('exercisesV1ControllerCreateExercise', 'createExerciseRequestDto', createExerciseRequestDto)
|
|
3861
|
+
const localVarPath = `/api/exercises/v1`;
|
|
3862
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
3863
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
3864
|
+
let baseOptions;
|
|
3865
|
+
if (configuration) {
|
|
3866
|
+
baseOptions = configuration.baseOptions;
|
|
3867
|
+
}
|
|
3868
|
+
|
|
3869
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
|
|
3870
|
+
const localVarHeaderParameter = {} as any;
|
|
3871
|
+
const localVarQueryParameter = {} as any;
|
|
3872
|
+
|
|
3873
|
+
// authentication apiKey required
|
|
3874
|
+
await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration)
|
|
3875
|
+
|
|
3876
|
+
// authentication bearer required
|
|
3877
|
+
// http bearer authentication required
|
|
3878
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
3879
|
+
|
|
3880
|
+
|
|
3881
|
+
|
|
3882
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
3883
|
+
|
|
3884
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
3885
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
3886
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
3887
|
+
localVarRequestOptions.data = serializeDataIfNeeded(createExerciseRequestDto, localVarRequestOptions, configuration)
|
|
3888
|
+
|
|
3889
|
+
return {
|
|
3890
|
+
url: toPathString(localVarUrlObj),
|
|
3891
|
+
options: localVarRequestOptions,
|
|
3892
|
+
};
|
|
3893
|
+
},
|
|
3894
|
+
/**
|
|
3895
|
+
*
|
|
3896
|
+
* @summary Get all exercises
|
|
3897
|
+
* @param {string} [name] Exercise name
|
|
3898
|
+
* @param {string} [query] Exercise query
|
|
3899
|
+
* @param {string} [orderBy] Order by
|
|
3900
|
+
* @param {boolean} [isAsc] Sort order direction (true for ascending, false for descending)
|
|
3901
|
+
* @param {*} [options] Override http request option.
|
|
3902
|
+
* @throws {RequiredError}
|
|
3903
|
+
*/
|
|
3904
|
+
exercisesV1ControllerGetAllExercises: async (name?: string, query?: string, orderBy?: string, isAsc?: boolean, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
3905
|
+
const localVarPath = `/api/exercises/v1/all`;
|
|
3906
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
3907
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
3908
|
+
let baseOptions;
|
|
3909
|
+
if (configuration) {
|
|
3910
|
+
baseOptions = configuration.baseOptions;
|
|
3911
|
+
}
|
|
3912
|
+
|
|
3913
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
3914
|
+
const localVarHeaderParameter = {} as any;
|
|
3915
|
+
const localVarQueryParameter = {} as any;
|
|
3916
|
+
|
|
3917
|
+
// authentication apiKey required
|
|
3918
|
+
await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration)
|
|
3919
|
+
|
|
3920
|
+
// authentication bearer required
|
|
3921
|
+
// http bearer authentication required
|
|
3922
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
3923
|
+
|
|
3924
|
+
if (name !== undefined) {
|
|
3925
|
+
localVarQueryParameter['name'] = name;
|
|
3926
|
+
}
|
|
3927
|
+
|
|
3928
|
+
if (query !== undefined) {
|
|
3929
|
+
localVarQueryParameter['query'] = query;
|
|
3930
|
+
}
|
|
3931
|
+
|
|
3932
|
+
if (orderBy !== undefined) {
|
|
3933
|
+
localVarQueryParameter['orderBy'] = orderBy;
|
|
3934
|
+
}
|
|
3935
|
+
|
|
3936
|
+
if (isAsc !== undefined) {
|
|
3937
|
+
localVarQueryParameter['isAsc'] = isAsc;
|
|
3938
|
+
}
|
|
3939
|
+
|
|
3940
|
+
|
|
3941
|
+
|
|
3942
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
3943
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
3944
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
3945
|
+
|
|
3946
|
+
return {
|
|
3947
|
+
url: toPathString(localVarUrlObj),
|
|
3948
|
+
options: localVarRequestOptions,
|
|
3949
|
+
};
|
|
3950
|
+
},
|
|
3951
|
+
/**
|
|
3952
|
+
*
|
|
3953
|
+
* @summary Get exercise by id
|
|
3954
|
+
* @param {string} id
|
|
3955
|
+
* @param {*} [options] Override http request option.
|
|
3956
|
+
* @throws {RequiredError}
|
|
3957
|
+
*/
|
|
3958
|
+
exercisesV1ControllerGetExerciseById: async (id: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
3959
|
+
// verify required parameter 'id' is not null or undefined
|
|
3960
|
+
assertParamExists('exercisesV1ControllerGetExerciseById', 'id', id)
|
|
3961
|
+
const localVarPath = `/api/exercises/v1/{id}`
|
|
3962
|
+
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
|
3963
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
3964
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
3965
|
+
let baseOptions;
|
|
3966
|
+
if (configuration) {
|
|
3967
|
+
baseOptions = configuration.baseOptions;
|
|
3968
|
+
}
|
|
3969
|
+
|
|
3970
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
3971
|
+
const localVarHeaderParameter = {} as any;
|
|
3972
|
+
const localVarQueryParameter = {} as any;
|
|
3973
|
+
|
|
3974
|
+
// authentication apiKey required
|
|
3975
|
+
await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration)
|
|
3976
|
+
|
|
3977
|
+
// authentication bearer required
|
|
3978
|
+
// http bearer authentication required
|
|
3979
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
3980
|
+
|
|
3981
|
+
|
|
3982
|
+
|
|
3983
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
3984
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
3985
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
3986
|
+
|
|
3987
|
+
return {
|
|
3988
|
+
url: toPathString(localVarUrlObj),
|
|
3989
|
+
options: localVarRequestOptions,
|
|
3990
|
+
};
|
|
3991
|
+
},
|
|
3717
3992
|
/**
|
|
3718
3993
|
*
|
|
3719
3994
|
* @summary Get exercises
|
|
@@ -3791,6 +4066,48 @@ export const ExercisesV1ApiAxiosParamCreator = function (configuration?: Configu
|
|
|
3791
4066
|
export const ExercisesV1ApiFp = function(configuration?: Configuration) {
|
|
3792
4067
|
const localVarAxiosParamCreator = ExercisesV1ApiAxiosParamCreator(configuration)
|
|
3793
4068
|
return {
|
|
4069
|
+
/**
|
|
4070
|
+
*
|
|
4071
|
+
* @summary Create exercise
|
|
4072
|
+
* @param {CreateExerciseRequestDto} createExerciseRequestDto
|
|
4073
|
+
* @param {*} [options] Override http request option.
|
|
4074
|
+
* @throws {RequiredError}
|
|
4075
|
+
*/
|
|
4076
|
+
async exercisesV1ControllerCreateExercise(createExerciseRequestDto: CreateExerciseRequestDto, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ExerciseDto>> {
|
|
4077
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.exercisesV1ControllerCreateExercise(createExerciseRequestDto, options);
|
|
4078
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
4079
|
+
const localVarOperationServerBasePath = operationServerMap['ExercisesV1Api.exercisesV1ControllerCreateExercise']?.[localVarOperationServerIndex]?.url;
|
|
4080
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
4081
|
+
},
|
|
4082
|
+
/**
|
|
4083
|
+
*
|
|
4084
|
+
* @summary Get all exercises
|
|
4085
|
+
* @param {string} [name] Exercise name
|
|
4086
|
+
* @param {string} [query] Exercise query
|
|
4087
|
+
* @param {string} [orderBy] Order by
|
|
4088
|
+
* @param {boolean} [isAsc] Sort order direction (true for ascending, false for descending)
|
|
4089
|
+
* @param {*} [options] Override http request option.
|
|
4090
|
+
* @throws {RequiredError}
|
|
4091
|
+
*/
|
|
4092
|
+
async exercisesV1ControllerGetAllExercises(name?: string, query?: string, orderBy?: string, isAsc?: boolean, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetAllExercisesResponseDto>> {
|
|
4093
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.exercisesV1ControllerGetAllExercises(name, query, orderBy, isAsc, options);
|
|
4094
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
4095
|
+
const localVarOperationServerBasePath = operationServerMap['ExercisesV1Api.exercisesV1ControllerGetAllExercises']?.[localVarOperationServerIndex]?.url;
|
|
4096
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
4097
|
+
},
|
|
4098
|
+
/**
|
|
4099
|
+
*
|
|
4100
|
+
* @summary Get exercise by id
|
|
4101
|
+
* @param {string} id
|
|
4102
|
+
* @param {*} [options] Override http request option.
|
|
4103
|
+
* @throws {RequiredError}
|
|
4104
|
+
*/
|
|
4105
|
+
async exercisesV1ControllerGetExerciseById(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ExerciseDto>> {
|
|
4106
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.exercisesV1ControllerGetExerciseById(id, options);
|
|
4107
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
4108
|
+
const localVarOperationServerBasePath = operationServerMap['ExercisesV1Api.exercisesV1ControllerGetExerciseById']?.[localVarOperationServerIndex]?.url;
|
|
4109
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
4110
|
+
},
|
|
3794
4111
|
/**
|
|
3795
4112
|
*
|
|
3796
4113
|
* @summary Get exercises
|
|
@@ -3819,6 +4136,36 @@ export const ExercisesV1ApiFp = function(configuration?: Configuration) {
|
|
|
3819
4136
|
export const ExercisesV1ApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
|
3820
4137
|
const localVarFp = ExercisesV1ApiFp(configuration)
|
|
3821
4138
|
return {
|
|
4139
|
+
/**
|
|
4140
|
+
*
|
|
4141
|
+
* @summary Create exercise
|
|
4142
|
+
* @param {ExercisesV1ApiExercisesV1ControllerCreateExerciseRequest} requestParameters Request parameters.
|
|
4143
|
+
* @param {*} [options] Override http request option.
|
|
4144
|
+
* @throws {RequiredError}
|
|
4145
|
+
*/
|
|
4146
|
+
exercisesV1ControllerCreateExercise(requestParameters: ExercisesV1ApiExercisesV1ControllerCreateExerciseRequest, options?: RawAxiosRequestConfig): AxiosPromise<ExerciseDto> {
|
|
4147
|
+
return localVarFp.exercisesV1ControllerCreateExercise(requestParameters.createExerciseRequestDto, options).then((request) => request(axios, basePath));
|
|
4148
|
+
},
|
|
4149
|
+
/**
|
|
4150
|
+
*
|
|
4151
|
+
* @summary Get all exercises
|
|
4152
|
+
* @param {ExercisesV1ApiExercisesV1ControllerGetAllExercisesRequest} requestParameters Request parameters.
|
|
4153
|
+
* @param {*} [options] Override http request option.
|
|
4154
|
+
* @throws {RequiredError}
|
|
4155
|
+
*/
|
|
4156
|
+
exercisesV1ControllerGetAllExercises(requestParameters: ExercisesV1ApiExercisesV1ControllerGetAllExercisesRequest = {}, options?: RawAxiosRequestConfig): AxiosPromise<GetAllExercisesResponseDto> {
|
|
4157
|
+
return localVarFp.exercisesV1ControllerGetAllExercises(requestParameters.name, requestParameters.query, requestParameters.orderBy, requestParameters.isAsc, options).then((request) => request(axios, basePath));
|
|
4158
|
+
},
|
|
4159
|
+
/**
|
|
4160
|
+
*
|
|
4161
|
+
* @summary Get exercise by id
|
|
4162
|
+
* @param {ExercisesV1ApiExercisesV1ControllerGetExerciseByIdRequest} requestParameters Request parameters.
|
|
4163
|
+
* @param {*} [options] Override http request option.
|
|
4164
|
+
* @throws {RequiredError}
|
|
4165
|
+
*/
|
|
4166
|
+
exercisesV1ControllerGetExerciseById(requestParameters: ExercisesV1ApiExercisesV1ControllerGetExerciseByIdRequest, options?: RawAxiosRequestConfig): AxiosPromise<ExerciseDto> {
|
|
4167
|
+
return localVarFp.exercisesV1ControllerGetExerciseById(requestParameters.id, options).then((request) => request(axios, basePath));
|
|
4168
|
+
},
|
|
3822
4169
|
/**
|
|
3823
4170
|
*
|
|
3824
4171
|
* @summary Get exercises
|
|
@@ -3838,6 +4185,36 @@ export const ExercisesV1ApiFactory = function (configuration?: Configuration, ba
|
|
|
3838
4185
|
* @interface ExercisesV1Api
|
|
3839
4186
|
*/
|
|
3840
4187
|
export interface ExercisesV1ApiInterface {
|
|
4188
|
+
/**
|
|
4189
|
+
*
|
|
4190
|
+
* @summary Create exercise
|
|
4191
|
+
* @param {ExercisesV1ApiExercisesV1ControllerCreateExerciseRequest} requestParameters Request parameters.
|
|
4192
|
+
* @param {*} [options] Override http request option.
|
|
4193
|
+
* @throws {RequiredError}
|
|
4194
|
+
* @memberof ExercisesV1ApiInterface
|
|
4195
|
+
*/
|
|
4196
|
+
exercisesV1ControllerCreateExercise(requestParameters: ExercisesV1ApiExercisesV1ControllerCreateExerciseRequest, options?: RawAxiosRequestConfig): AxiosPromise<ExerciseDto>;
|
|
4197
|
+
|
|
4198
|
+
/**
|
|
4199
|
+
*
|
|
4200
|
+
* @summary Get all exercises
|
|
4201
|
+
* @param {ExercisesV1ApiExercisesV1ControllerGetAllExercisesRequest} requestParameters Request parameters.
|
|
4202
|
+
* @param {*} [options] Override http request option.
|
|
4203
|
+
* @throws {RequiredError}
|
|
4204
|
+
* @memberof ExercisesV1ApiInterface
|
|
4205
|
+
*/
|
|
4206
|
+
exercisesV1ControllerGetAllExercises(requestParameters?: ExercisesV1ApiExercisesV1ControllerGetAllExercisesRequest, options?: RawAxiosRequestConfig): AxiosPromise<GetAllExercisesResponseDto>;
|
|
4207
|
+
|
|
4208
|
+
/**
|
|
4209
|
+
*
|
|
4210
|
+
* @summary Get exercise by id
|
|
4211
|
+
* @param {ExercisesV1ApiExercisesV1ControllerGetExerciseByIdRequest} requestParameters Request parameters.
|
|
4212
|
+
* @param {*} [options] Override http request option.
|
|
4213
|
+
* @throws {RequiredError}
|
|
4214
|
+
* @memberof ExercisesV1ApiInterface
|
|
4215
|
+
*/
|
|
4216
|
+
exercisesV1ControllerGetExerciseById(requestParameters: ExercisesV1ApiExercisesV1ControllerGetExerciseByIdRequest, options?: RawAxiosRequestConfig): AxiosPromise<ExerciseDto>;
|
|
4217
|
+
|
|
3841
4218
|
/**
|
|
3842
4219
|
*
|
|
3843
4220
|
* @summary Get exercises
|
|
@@ -3850,6 +4227,69 @@ export interface ExercisesV1ApiInterface {
|
|
|
3850
4227
|
|
|
3851
4228
|
}
|
|
3852
4229
|
|
|
4230
|
+
/**
|
|
4231
|
+
* Request parameters for exercisesV1ControllerCreateExercise operation in ExercisesV1Api.
|
|
4232
|
+
* @export
|
|
4233
|
+
* @interface ExercisesV1ApiExercisesV1ControllerCreateExerciseRequest
|
|
4234
|
+
*/
|
|
4235
|
+
export interface ExercisesV1ApiExercisesV1ControllerCreateExerciseRequest {
|
|
4236
|
+
/**
|
|
4237
|
+
*
|
|
4238
|
+
* @type {CreateExerciseRequestDto}
|
|
4239
|
+
* @memberof ExercisesV1ApiExercisesV1ControllerCreateExercise
|
|
4240
|
+
*/
|
|
4241
|
+
readonly createExerciseRequestDto: CreateExerciseRequestDto
|
|
4242
|
+
}
|
|
4243
|
+
|
|
4244
|
+
/**
|
|
4245
|
+
* Request parameters for exercisesV1ControllerGetAllExercises operation in ExercisesV1Api.
|
|
4246
|
+
* @export
|
|
4247
|
+
* @interface ExercisesV1ApiExercisesV1ControllerGetAllExercisesRequest
|
|
4248
|
+
*/
|
|
4249
|
+
export interface ExercisesV1ApiExercisesV1ControllerGetAllExercisesRequest {
|
|
4250
|
+
/**
|
|
4251
|
+
* Exercise name
|
|
4252
|
+
* @type {string}
|
|
4253
|
+
* @memberof ExercisesV1ApiExercisesV1ControllerGetAllExercises
|
|
4254
|
+
*/
|
|
4255
|
+
readonly name?: string
|
|
4256
|
+
|
|
4257
|
+
/**
|
|
4258
|
+
* Exercise query
|
|
4259
|
+
* @type {string}
|
|
4260
|
+
* @memberof ExercisesV1ApiExercisesV1ControllerGetAllExercises
|
|
4261
|
+
*/
|
|
4262
|
+
readonly query?: string
|
|
4263
|
+
|
|
4264
|
+
/**
|
|
4265
|
+
* Order by
|
|
4266
|
+
* @type {string}
|
|
4267
|
+
* @memberof ExercisesV1ApiExercisesV1ControllerGetAllExercises
|
|
4268
|
+
*/
|
|
4269
|
+
readonly orderBy?: string
|
|
4270
|
+
|
|
4271
|
+
/**
|
|
4272
|
+
* Sort order direction (true for ascending, false for descending)
|
|
4273
|
+
* @type {boolean}
|
|
4274
|
+
* @memberof ExercisesV1ApiExercisesV1ControllerGetAllExercises
|
|
4275
|
+
*/
|
|
4276
|
+
readonly isAsc?: boolean
|
|
4277
|
+
}
|
|
4278
|
+
|
|
4279
|
+
/**
|
|
4280
|
+
* Request parameters for exercisesV1ControllerGetExerciseById operation in ExercisesV1Api.
|
|
4281
|
+
* @export
|
|
4282
|
+
* @interface ExercisesV1ApiExercisesV1ControllerGetExerciseByIdRequest
|
|
4283
|
+
*/
|
|
4284
|
+
export interface ExercisesV1ApiExercisesV1ControllerGetExerciseByIdRequest {
|
|
4285
|
+
/**
|
|
4286
|
+
*
|
|
4287
|
+
* @type {string}
|
|
4288
|
+
* @memberof ExercisesV1ApiExercisesV1ControllerGetExerciseById
|
|
4289
|
+
*/
|
|
4290
|
+
readonly id: string
|
|
4291
|
+
}
|
|
4292
|
+
|
|
3853
4293
|
/**
|
|
3854
4294
|
* Request parameters for exercisesV1ControllerGetExercises operation in ExercisesV1Api.
|
|
3855
4295
|
* @export
|
|
@@ -3906,6 +4346,42 @@ export interface ExercisesV1ApiExercisesV1ControllerGetExercisesRequest {
|
|
|
3906
4346
|
* @extends {BaseAPI}
|
|
3907
4347
|
*/
|
|
3908
4348
|
export class ExercisesV1Api extends BaseAPI implements ExercisesV1ApiInterface {
|
|
4349
|
+
/**
|
|
4350
|
+
*
|
|
4351
|
+
* @summary Create exercise
|
|
4352
|
+
* @param {ExercisesV1ApiExercisesV1ControllerCreateExerciseRequest} requestParameters Request parameters.
|
|
4353
|
+
* @param {*} [options] Override http request option.
|
|
4354
|
+
* @throws {RequiredError}
|
|
4355
|
+
* @memberof ExercisesV1Api
|
|
4356
|
+
*/
|
|
4357
|
+
public exercisesV1ControllerCreateExercise(requestParameters: ExercisesV1ApiExercisesV1ControllerCreateExerciseRequest, options?: RawAxiosRequestConfig) {
|
|
4358
|
+
return ExercisesV1ApiFp(this.configuration).exercisesV1ControllerCreateExercise(requestParameters.createExerciseRequestDto, options).then((request) => request(this.axios, this.basePath));
|
|
4359
|
+
}
|
|
4360
|
+
|
|
4361
|
+
/**
|
|
4362
|
+
*
|
|
4363
|
+
* @summary Get all exercises
|
|
4364
|
+
* @param {ExercisesV1ApiExercisesV1ControllerGetAllExercisesRequest} requestParameters Request parameters.
|
|
4365
|
+
* @param {*} [options] Override http request option.
|
|
4366
|
+
* @throws {RequiredError}
|
|
4367
|
+
* @memberof ExercisesV1Api
|
|
4368
|
+
*/
|
|
4369
|
+
public exercisesV1ControllerGetAllExercises(requestParameters: ExercisesV1ApiExercisesV1ControllerGetAllExercisesRequest = {}, options?: RawAxiosRequestConfig) {
|
|
4370
|
+
return ExercisesV1ApiFp(this.configuration).exercisesV1ControllerGetAllExercises(requestParameters.name, requestParameters.query, requestParameters.orderBy, requestParameters.isAsc, options).then((request) => request(this.axios, this.basePath));
|
|
4371
|
+
}
|
|
4372
|
+
|
|
4373
|
+
/**
|
|
4374
|
+
*
|
|
4375
|
+
* @summary Get exercise by id
|
|
4376
|
+
* @param {ExercisesV1ApiExercisesV1ControllerGetExerciseByIdRequest} requestParameters Request parameters.
|
|
4377
|
+
* @param {*} [options] Override http request option.
|
|
4378
|
+
* @throws {RequiredError}
|
|
4379
|
+
* @memberof ExercisesV1Api
|
|
4380
|
+
*/
|
|
4381
|
+
public exercisesV1ControllerGetExerciseById(requestParameters: ExercisesV1ApiExercisesV1ControllerGetExerciseByIdRequest, options?: RawAxiosRequestConfig) {
|
|
4382
|
+
return ExercisesV1ApiFp(this.configuration).exercisesV1ControllerGetExerciseById(requestParameters.id, options).then((request) => request(this.axios, this.basePath));
|
|
4383
|
+
}
|
|
4384
|
+
|
|
3909
4385
|
/**
|
|
3910
4386
|
*
|
|
3911
4387
|
* @summary Get exercises
|
|
@@ -4018,6 +4494,47 @@ export const IngredientsV1ApiAxiosParamCreator = function (configuration?: Confi
|
|
|
4018
4494
|
|
|
4019
4495
|
|
|
4020
4496
|
|
|
4497
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
4498
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
4499
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
4500
|
+
|
|
4501
|
+
return {
|
|
4502
|
+
url: toPathString(localVarUrlObj),
|
|
4503
|
+
options: localVarRequestOptions,
|
|
4504
|
+
};
|
|
4505
|
+
},
|
|
4506
|
+
/**
|
|
4507
|
+
*
|
|
4508
|
+
* @summary Get ingredient by id
|
|
4509
|
+
* @param {string} id
|
|
4510
|
+
* @param {*} [options] Override http request option.
|
|
4511
|
+
* @throws {RequiredError}
|
|
4512
|
+
*/
|
|
4513
|
+
ingredientsV1ControllerGetIngredientById: async (id: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
4514
|
+
// verify required parameter 'id' is not null or undefined
|
|
4515
|
+
assertParamExists('ingredientsV1ControllerGetIngredientById', 'id', id)
|
|
4516
|
+
const localVarPath = `/api/ingredients/v1/{id}`
|
|
4517
|
+
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
|
4518
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
4519
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
4520
|
+
let baseOptions;
|
|
4521
|
+
if (configuration) {
|
|
4522
|
+
baseOptions = configuration.baseOptions;
|
|
4523
|
+
}
|
|
4524
|
+
|
|
4525
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
4526
|
+
const localVarHeaderParameter = {} as any;
|
|
4527
|
+
const localVarQueryParameter = {} as any;
|
|
4528
|
+
|
|
4529
|
+
// authentication apiKey required
|
|
4530
|
+
await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration)
|
|
4531
|
+
|
|
4532
|
+
// authentication bearer required
|
|
4533
|
+
// http bearer authentication required
|
|
4534
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
4535
|
+
|
|
4536
|
+
|
|
4537
|
+
|
|
4021
4538
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
4022
4539
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
4023
4540
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
@@ -4133,6 +4650,19 @@ export const IngredientsV1ApiFp = function(configuration?: Configuration) {
|
|
|
4133
4650
|
const localVarOperationServerBasePath = operationServerMap['IngredientsV1Api.ingredientsV1ControllerGetAllIngredients']?.[localVarOperationServerIndex]?.url;
|
|
4134
4651
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
4135
4652
|
},
|
|
4653
|
+
/**
|
|
4654
|
+
*
|
|
4655
|
+
* @summary Get ingredient by id
|
|
4656
|
+
* @param {string} id
|
|
4657
|
+
* @param {*} [options] Override http request option.
|
|
4658
|
+
* @throws {RequiredError}
|
|
4659
|
+
*/
|
|
4660
|
+
async ingredientsV1ControllerGetIngredientById(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<IngredientDto>> {
|
|
4661
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.ingredientsV1ControllerGetIngredientById(id, options);
|
|
4662
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
4663
|
+
const localVarOperationServerBasePath = operationServerMap['IngredientsV1Api.ingredientsV1ControllerGetIngredientById']?.[localVarOperationServerIndex]?.url;
|
|
4664
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
4665
|
+
},
|
|
4136
4666
|
/**
|
|
4137
4667
|
*
|
|
4138
4668
|
* @summary Get ingredients
|
|
@@ -4181,6 +4711,16 @@ export const IngredientsV1ApiFactory = function (configuration?: Configuration,
|
|
|
4181
4711
|
ingredientsV1ControllerGetAllIngredients(requestParameters: IngredientsV1ApiIngredientsV1ControllerGetAllIngredientsRequest = {}, options?: RawAxiosRequestConfig): AxiosPromise<GetAllIngredientsResponseDto> {
|
|
4182
4712
|
return localVarFp.ingredientsV1ControllerGetAllIngredients(requestParameters.name, requestParameters.query, requestParameters.orderBy, requestParameters.isAsc, options).then((request) => request(axios, basePath));
|
|
4183
4713
|
},
|
|
4714
|
+
/**
|
|
4715
|
+
*
|
|
4716
|
+
* @summary Get ingredient by id
|
|
4717
|
+
* @param {IngredientsV1ApiIngredientsV1ControllerGetIngredientByIdRequest} requestParameters Request parameters.
|
|
4718
|
+
* @param {*} [options] Override http request option.
|
|
4719
|
+
* @throws {RequiredError}
|
|
4720
|
+
*/
|
|
4721
|
+
ingredientsV1ControllerGetIngredientById(requestParameters: IngredientsV1ApiIngredientsV1ControllerGetIngredientByIdRequest, options?: RawAxiosRequestConfig): AxiosPromise<IngredientDto> {
|
|
4722
|
+
return localVarFp.ingredientsV1ControllerGetIngredientById(requestParameters.id, options).then((request) => request(axios, basePath));
|
|
4723
|
+
},
|
|
4184
4724
|
/**
|
|
4185
4725
|
*
|
|
4186
4726
|
* @summary Get ingredients
|
|
@@ -4220,6 +4760,16 @@ export interface IngredientsV1ApiInterface {
|
|
|
4220
4760
|
*/
|
|
4221
4761
|
ingredientsV1ControllerGetAllIngredients(requestParameters?: IngredientsV1ApiIngredientsV1ControllerGetAllIngredientsRequest, options?: RawAxiosRequestConfig): AxiosPromise<GetAllIngredientsResponseDto>;
|
|
4222
4762
|
|
|
4763
|
+
/**
|
|
4764
|
+
*
|
|
4765
|
+
* @summary Get ingredient by id
|
|
4766
|
+
* @param {IngredientsV1ApiIngredientsV1ControllerGetIngredientByIdRequest} requestParameters Request parameters.
|
|
4767
|
+
* @param {*} [options] Override http request option.
|
|
4768
|
+
* @throws {RequiredError}
|
|
4769
|
+
* @memberof IngredientsV1ApiInterface
|
|
4770
|
+
*/
|
|
4771
|
+
ingredientsV1ControllerGetIngredientById(requestParameters: IngredientsV1ApiIngredientsV1ControllerGetIngredientByIdRequest, options?: RawAxiosRequestConfig): AxiosPromise<IngredientDto>;
|
|
4772
|
+
|
|
4223
4773
|
/**
|
|
4224
4774
|
*
|
|
4225
4775
|
* @summary Get ingredients
|
|
@@ -4281,6 +4831,20 @@ export interface IngredientsV1ApiIngredientsV1ControllerGetAllIngredientsRequest
|
|
|
4281
4831
|
readonly isAsc?: boolean
|
|
4282
4832
|
}
|
|
4283
4833
|
|
|
4834
|
+
/**
|
|
4835
|
+
* Request parameters for ingredientsV1ControllerGetIngredientById operation in IngredientsV1Api.
|
|
4836
|
+
* @export
|
|
4837
|
+
* @interface IngredientsV1ApiIngredientsV1ControllerGetIngredientByIdRequest
|
|
4838
|
+
*/
|
|
4839
|
+
export interface IngredientsV1ApiIngredientsV1ControllerGetIngredientByIdRequest {
|
|
4840
|
+
/**
|
|
4841
|
+
*
|
|
4842
|
+
* @type {string}
|
|
4843
|
+
* @memberof IngredientsV1ApiIngredientsV1ControllerGetIngredientById
|
|
4844
|
+
*/
|
|
4845
|
+
readonly id: string
|
|
4846
|
+
}
|
|
4847
|
+
|
|
4284
4848
|
/**
|
|
4285
4849
|
* Request parameters for ingredientsV1ControllerGetIngredients operation in IngredientsV1Api.
|
|
4286
4850
|
* @export
|
|
@@ -4361,6 +4925,18 @@ export class IngredientsV1Api extends BaseAPI implements IngredientsV1ApiInterfa
|
|
|
4361
4925
|
return IngredientsV1ApiFp(this.configuration).ingredientsV1ControllerGetAllIngredients(requestParameters.name, requestParameters.query, requestParameters.orderBy, requestParameters.isAsc, options).then((request) => request(this.axios, this.basePath));
|
|
4362
4926
|
}
|
|
4363
4927
|
|
|
4928
|
+
/**
|
|
4929
|
+
*
|
|
4930
|
+
* @summary Get ingredient by id
|
|
4931
|
+
* @param {IngredientsV1ApiIngredientsV1ControllerGetIngredientByIdRequest} requestParameters Request parameters.
|
|
4932
|
+
* @param {*} [options] Override http request option.
|
|
4933
|
+
* @throws {RequiredError}
|
|
4934
|
+
* @memberof IngredientsV1Api
|
|
4935
|
+
*/
|
|
4936
|
+
public ingredientsV1ControllerGetIngredientById(requestParameters: IngredientsV1ApiIngredientsV1ControllerGetIngredientByIdRequest, options?: RawAxiosRequestConfig) {
|
|
4937
|
+
return IngredientsV1ApiFp(this.configuration).ingredientsV1ControllerGetIngredientById(requestParameters.id, options).then((request) => request(this.axios, this.basePath));
|
|
4938
|
+
}
|
|
4939
|
+
|
|
4364
4940
|
/**
|
|
4365
4941
|
*
|
|
4366
4942
|
* @summary Get ingredients
|