@dimrev4/fitness-v3-backend 0.0.29 → 0.0.31
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 +1 -0
- package/api.ts +259 -0
- package/dist/api.d.ts +153 -0
- package/dist/api.js +157 -0
- package/dist/esm/api.d.ts +153 -0
- package/dist/esm/api.js +157 -0
- package/docs/GetAllIngredientsResponseDto.md +22 -0
- package/docs/IngredientsV1Api.md +117 -0
- package/package.json +1 -1
package/.openapi-generator/FILES
CHANGED
|
@@ -22,6 +22,7 @@ docs/ExerciseDto.md
|
|
|
22
22
|
docs/ExerciseSetsDto.md
|
|
23
23
|
docs/ExerciseWithSetsDto.md
|
|
24
24
|
docs/ExercisesV1Api.md
|
|
25
|
+
docs/GetAllIngredientsResponseDto.md
|
|
25
26
|
docs/GetAllMealsResponseDto.md
|
|
26
27
|
docs/GetAllMeasurementsResponseDto.md
|
|
27
28
|
docs/GetAllUserMealConsumptionResponseDto.md
|
package/api.ts
CHANGED
|
@@ -811,6 +811,25 @@ export const ExerciseWithSetsDtoDifficultyEnum = {
|
|
|
811
811
|
|
|
812
812
|
export type ExerciseWithSetsDtoDifficultyEnum = typeof ExerciseWithSetsDtoDifficultyEnum[keyof typeof ExerciseWithSetsDtoDifficultyEnum];
|
|
813
813
|
|
|
814
|
+
/**
|
|
815
|
+
*
|
|
816
|
+
* @export
|
|
817
|
+
* @interface GetAllIngredientsResponseDto
|
|
818
|
+
*/
|
|
819
|
+
export interface GetAllIngredientsResponseDto {
|
|
820
|
+
/**
|
|
821
|
+
*
|
|
822
|
+
* @type {Array<IngredientDto>}
|
|
823
|
+
* @memberof GetAllIngredientsResponseDto
|
|
824
|
+
*/
|
|
825
|
+
'items': Array<IngredientDto>;
|
|
826
|
+
/**
|
|
827
|
+
*
|
|
828
|
+
* @type {number}
|
|
829
|
+
* @memberof GetAllIngredientsResponseDto
|
|
830
|
+
*/
|
|
831
|
+
'totalItems': number;
|
|
832
|
+
}
|
|
814
833
|
/**
|
|
815
834
|
*
|
|
816
835
|
* @export
|
|
@@ -3951,6 +3970,104 @@ export const IngredientsV1ApiAxiosParamCreator = function (configuration?: Confi
|
|
|
3951
3970
|
options: localVarRequestOptions,
|
|
3952
3971
|
};
|
|
3953
3972
|
},
|
|
3973
|
+
/**
|
|
3974
|
+
*
|
|
3975
|
+
* @summary Get all ingredients
|
|
3976
|
+
* @param {string} [name] Ingredient name
|
|
3977
|
+
* @param {string} [query] Ingredient query
|
|
3978
|
+
* @param {string} [orderBy] Order by
|
|
3979
|
+
* @param {boolean} [isAsc] Sort order direction (true for ascending, false for descending)
|
|
3980
|
+
* @param {*} [options] Override http request option.
|
|
3981
|
+
* @throws {RequiredError}
|
|
3982
|
+
*/
|
|
3983
|
+
ingredientsV1ControllerGetAllIngredients: async (name?: string, query?: string, orderBy?: string, isAsc?: boolean, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
3984
|
+
const localVarPath = `/api/ingredients/v1/all`;
|
|
3985
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
3986
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
3987
|
+
let baseOptions;
|
|
3988
|
+
if (configuration) {
|
|
3989
|
+
baseOptions = configuration.baseOptions;
|
|
3990
|
+
}
|
|
3991
|
+
|
|
3992
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
3993
|
+
const localVarHeaderParameter = {} as any;
|
|
3994
|
+
const localVarQueryParameter = {} as any;
|
|
3995
|
+
|
|
3996
|
+
// authentication apiKey required
|
|
3997
|
+
await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration)
|
|
3998
|
+
|
|
3999
|
+
// authentication bearer required
|
|
4000
|
+
// http bearer authentication required
|
|
4001
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
4002
|
+
|
|
4003
|
+
if (name !== undefined) {
|
|
4004
|
+
localVarQueryParameter['name'] = name;
|
|
4005
|
+
}
|
|
4006
|
+
|
|
4007
|
+
if (query !== undefined) {
|
|
4008
|
+
localVarQueryParameter['query'] = query;
|
|
4009
|
+
}
|
|
4010
|
+
|
|
4011
|
+
if (orderBy !== undefined) {
|
|
4012
|
+
localVarQueryParameter['orderBy'] = orderBy;
|
|
4013
|
+
}
|
|
4014
|
+
|
|
4015
|
+
if (isAsc !== undefined) {
|
|
4016
|
+
localVarQueryParameter['isAsc'] = isAsc;
|
|
4017
|
+
}
|
|
4018
|
+
|
|
4019
|
+
|
|
4020
|
+
|
|
4021
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
4022
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
4023
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
4024
|
+
|
|
4025
|
+
return {
|
|
4026
|
+
url: toPathString(localVarUrlObj),
|
|
4027
|
+
options: localVarRequestOptions,
|
|
4028
|
+
};
|
|
4029
|
+
},
|
|
4030
|
+
/**
|
|
4031
|
+
*
|
|
4032
|
+
* @summary Get ingredient by id
|
|
4033
|
+
* @param {string} id
|
|
4034
|
+
* @param {*} [options] Override http request option.
|
|
4035
|
+
* @throws {RequiredError}
|
|
4036
|
+
*/
|
|
4037
|
+
ingredientsV1ControllerGetIngredientById: async (id: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
4038
|
+
// verify required parameter 'id' is not null or undefined
|
|
4039
|
+
assertParamExists('ingredientsV1ControllerGetIngredientById', 'id', id)
|
|
4040
|
+
const localVarPath = `/api/ingredients/v1/{id}`
|
|
4041
|
+
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
|
4042
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
4043
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
4044
|
+
let baseOptions;
|
|
4045
|
+
if (configuration) {
|
|
4046
|
+
baseOptions = configuration.baseOptions;
|
|
4047
|
+
}
|
|
4048
|
+
|
|
4049
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
4050
|
+
const localVarHeaderParameter = {} as any;
|
|
4051
|
+
const localVarQueryParameter = {} as any;
|
|
4052
|
+
|
|
4053
|
+
// authentication apiKey required
|
|
4054
|
+
await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration)
|
|
4055
|
+
|
|
4056
|
+
// authentication bearer required
|
|
4057
|
+
// http bearer authentication required
|
|
4058
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
4059
|
+
|
|
4060
|
+
|
|
4061
|
+
|
|
4062
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
4063
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
4064
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
4065
|
+
|
|
4066
|
+
return {
|
|
4067
|
+
url: toPathString(localVarUrlObj),
|
|
4068
|
+
options: localVarRequestOptions,
|
|
4069
|
+
};
|
|
4070
|
+
},
|
|
3954
4071
|
/**
|
|
3955
4072
|
*
|
|
3956
4073
|
* @summary Get ingredients
|
|
@@ -4041,6 +4158,35 @@ export const IngredientsV1ApiFp = function(configuration?: Configuration) {
|
|
|
4041
4158
|
const localVarOperationServerBasePath = operationServerMap['IngredientsV1Api.ingredientsV1ControllerCreateIngredient']?.[localVarOperationServerIndex]?.url;
|
|
4042
4159
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
4043
4160
|
},
|
|
4161
|
+
/**
|
|
4162
|
+
*
|
|
4163
|
+
* @summary Get all ingredients
|
|
4164
|
+
* @param {string} [name] Ingredient name
|
|
4165
|
+
* @param {string} [query] Ingredient query
|
|
4166
|
+
* @param {string} [orderBy] Order by
|
|
4167
|
+
* @param {boolean} [isAsc] Sort order direction (true for ascending, false for descending)
|
|
4168
|
+
* @param {*} [options] Override http request option.
|
|
4169
|
+
* @throws {RequiredError}
|
|
4170
|
+
*/
|
|
4171
|
+
async ingredientsV1ControllerGetAllIngredients(name?: string, query?: string, orderBy?: string, isAsc?: boolean, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetAllIngredientsResponseDto>> {
|
|
4172
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.ingredientsV1ControllerGetAllIngredients(name, query, orderBy, isAsc, options);
|
|
4173
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
4174
|
+
const localVarOperationServerBasePath = operationServerMap['IngredientsV1Api.ingredientsV1ControllerGetAllIngredients']?.[localVarOperationServerIndex]?.url;
|
|
4175
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
4176
|
+
},
|
|
4177
|
+
/**
|
|
4178
|
+
*
|
|
4179
|
+
* @summary Get ingredient by id
|
|
4180
|
+
* @param {string} id
|
|
4181
|
+
* @param {*} [options] Override http request option.
|
|
4182
|
+
* @throws {RequiredError}
|
|
4183
|
+
*/
|
|
4184
|
+
async ingredientsV1ControllerGetIngredientById(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<IngredientDto>> {
|
|
4185
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.ingredientsV1ControllerGetIngredientById(id, options);
|
|
4186
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
4187
|
+
const localVarOperationServerBasePath = operationServerMap['IngredientsV1Api.ingredientsV1ControllerGetIngredientById']?.[localVarOperationServerIndex]?.url;
|
|
4188
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
4189
|
+
},
|
|
4044
4190
|
/**
|
|
4045
4191
|
*
|
|
4046
4192
|
* @summary Get ingredients
|
|
@@ -4079,6 +4225,26 @@ export const IngredientsV1ApiFactory = function (configuration?: Configuration,
|
|
|
4079
4225
|
ingredientsV1ControllerCreateIngredient(requestParameters: IngredientsV1ApiIngredientsV1ControllerCreateIngredientRequest, options?: RawAxiosRequestConfig): AxiosPromise<IngredientDto> {
|
|
4080
4226
|
return localVarFp.ingredientsV1ControllerCreateIngredient(requestParameters.createIngredientRequestDto, options).then((request) => request(axios, basePath));
|
|
4081
4227
|
},
|
|
4228
|
+
/**
|
|
4229
|
+
*
|
|
4230
|
+
* @summary Get all ingredients
|
|
4231
|
+
* @param {IngredientsV1ApiIngredientsV1ControllerGetAllIngredientsRequest} requestParameters Request parameters.
|
|
4232
|
+
* @param {*} [options] Override http request option.
|
|
4233
|
+
* @throws {RequiredError}
|
|
4234
|
+
*/
|
|
4235
|
+
ingredientsV1ControllerGetAllIngredients(requestParameters: IngredientsV1ApiIngredientsV1ControllerGetAllIngredientsRequest = {}, options?: RawAxiosRequestConfig): AxiosPromise<GetAllIngredientsResponseDto> {
|
|
4236
|
+
return localVarFp.ingredientsV1ControllerGetAllIngredients(requestParameters.name, requestParameters.query, requestParameters.orderBy, requestParameters.isAsc, options).then((request) => request(axios, basePath));
|
|
4237
|
+
},
|
|
4238
|
+
/**
|
|
4239
|
+
*
|
|
4240
|
+
* @summary Get ingredient by id
|
|
4241
|
+
* @param {IngredientsV1ApiIngredientsV1ControllerGetIngredientByIdRequest} requestParameters Request parameters.
|
|
4242
|
+
* @param {*} [options] Override http request option.
|
|
4243
|
+
* @throws {RequiredError}
|
|
4244
|
+
*/
|
|
4245
|
+
ingredientsV1ControllerGetIngredientById(requestParameters: IngredientsV1ApiIngredientsV1ControllerGetIngredientByIdRequest, options?: RawAxiosRequestConfig): AxiosPromise<IngredientDto> {
|
|
4246
|
+
return localVarFp.ingredientsV1ControllerGetIngredientById(requestParameters.id, options).then((request) => request(axios, basePath));
|
|
4247
|
+
},
|
|
4082
4248
|
/**
|
|
4083
4249
|
*
|
|
4084
4250
|
* @summary Get ingredients
|
|
@@ -4108,6 +4274,26 @@ export interface IngredientsV1ApiInterface {
|
|
|
4108
4274
|
*/
|
|
4109
4275
|
ingredientsV1ControllerCreateIngredient(requestParameters: IngredientsV1ApiIngredientsV1ControllerCreateIngredientRequest, options?: RawAxiosRequestConfig): AxiosPromise<IngredientDto>;
|
|
4110
4276
|
|
|
4277
|
+
/**
|
|
4278
|
+
*
|
|
4279
|
+
* @summary Get all ingredients
|
|
4280
|
+
* @param {IngredientsV1ApiIngredientsV1ControllerGetAllIngredientsRequest} requestParameters Request parameters.
|
|
4281
|
+
* @param {*} [options] Override http request option.
|
|
4282
|
+
* @throws {RequiredError}
|
|
4283
|
+
* @memberof IngredientsV1ApiInterface
|
|
4284
|
+
*/
|
|
4285
|
+
ingredientsV1ControllerGetAllIngredients(requestParameters?: IngredientsV1ApiIngredientsV1ControllerGetAllIngredientsRequest, options?: RawAxiosRequestConfig): AxiosPromise<GetAllIngredientsResponseDto>;
|
|
4286
|
+
|
|
4287
|
+
/**
|
|
4288
|
+
*
|
|
4289
|
+
* @summary Get ingredient by id
|
|
4290
|
+
* @param {IngredientsV1ApiIngredientsV1ControllerGetIngredientByIdRequest} requestParameters Request parameters.
|
|
4291
|
+
* @param {*} [options] Override http request option.
|
|
4292
|
+
* @throws {RequiredError}
|
|
4293
|
+
* @memberof IngredientsV1ApiInterface
|
|
4294
|
+
*/
|
|
4295
|
+
ingredientsV1ControllerGetIngredientById(requestParameters: IngredientsV1ApiIngredientsV1ControllerGetIngredientByIdRequest, options?: RawAxiosRequestConfig): AxiosPromise<IngredientDto>;
|
|
4296
|
+
|
|
4111
4297
|
/**
|
|
4112
4298
|
*
|
|
4113
4299
|
* @summary Get ingredients
|
|
@@ -4134,6 +4320,55 @@ export interface IngredientsV1ApiIngredientsV1ControllerCreateIngredientRequest
|
|
|
4134
4320
|
readonly createIngredientRequestDto: CreateIngredientRequestDto
|
|
4135
4321
|
}
|
|
4136
4322
|
|
|
4323
|
+
/**
|
|
4324
|
+
* Request parameters for ingredientsV1ControllerGetAllIngredients operation in IngredientsV1Api.
|
|
4325
|
+
* @export
|
|
4326
|
+
* @interface IngredientsV1ApiIngredientsV1ControllerGetAllIngredientsRequest
|
|
4327
|
+
*/
|
|
4328
|
+
export interface IngredientsV1ApiIngredientsV1ControllerGetAllIngredientsRequest {
|
|
4329
|
+
/**
|
|
4330
|
+
* Ingredient name
|
|
4331
|
+
* @type {string}
|
|
4332
|
+
* @memberof IngredientsV1ApiIngredientsV1ControllerGetAllIngredients
|
|
4333
|
+
*/
|
|
4334
|
+
readonly name?: string
|
|
4335
|
+
|
|
4336
|
+
/**
|
|
4337
|
+
* Ingredient query
|
|
4338
|
+
* @type {string}
|
|
4339
|
+
* @memberof IngredientsV1ApiIngredientsV1ControllerGetAllIngredients
|
|
4340
|
+
*/
|
|
4341
|
+
readonly query?: string
|
|
4342
|
+
|
|
4343
|
+
/**
|
|
4344
|
+
* Order by
|
|
4345
|
+
* @type {string}
|
|
4346
|
+
* @memberof IngredientsV1ApiIngredientsV1ControllerGetAllIngredients
|
|
4347
|
+
*/
|
|
4348
|
+
readonly orderBy?: string
|
|
4349
|
+
|
|
4350
|
+
/**
|
|
4351
|
+
* Sort order direction (true for ascending, false for descending)
|
|
4352
|
+
* @type {boolean}
|
|
4353
|
+
* @memberof IngredientsV1ApiIngredientsV1ControllerGetAllIngredients
|
|
4354
|
+
*/
|
|
4355
|
+
readonly isAsc?: boolean
|
|
4356
|
+
}
|
|
4357
|
+
|
|
4358
|
+
/**
|
|
4359
|
+
* Request parameters for ingredientsV1ControllerGetIngredientById operation in IngredientsV1Api.
|
|
4360
|
+
* @export
|
|
4361
|
+
* @interface IngredientsV1ApiIngredientsV1ControllerGetIngredientByIdRequest
|
|
4362
|
+
*/
|
|
4363
|
+
export interface IngredientsV1ApiIngredientsV1ControllerGetIngredientByIdRequest {
|
|
4364
|
+
/**
|
|
4365
|
+
*
|
|
4366
|
+
* @type {string}
|
|
4367
|
+
* @memberof IngredientsV1ApiIngredientsV1ControllerGetIngredientById
|
|
4368
|
+
*/
|
|
4369
|
+
readonly id: string
|
|
4370
|
+
}
|
|
4371
|
+
|
|
4137
4372
|
/**
|
|
4138
4373
|
* Request parameters for ingredientsV1ControllerGetIngredients operation in IngredientsV1Api.
|
|
4139
4374
|
* @export
|
|
@@ -4202,6 +4437,30 @@ export class IngredientsV1Api extends BaseAPI implements IngredientsV1ApiInterfa
|
|
|
4202
4437
|
return IngredientsV1ApiFp(this.configuration).ingredientsV1ControllerCreateIngredient(requestParameters.createIngredientRequestDto, options).then((request) => request(this.axios, this.basePath));
|
|
4203
4438
|
}
|
|
4204
4439
|
|
|
4440
|
+
/**
|
|
4441
|
+
*
|
|
4442
|
+
* @summary Get all ingredients
|
|
4443
|
+
* @param {IngredientsV1ApiIngredientsV1ControllerGetAllIngredientsRequest} requestParameters Request parameters.
|
|
4444
|
+
* @param {*} [options] Override http request option.
|
|
4445
|
+
* @throws {RequiredError}
|
|
4446
|
+
* @memberof IngredientsV1Api
|
|
4447
|
+
*/
|
|
4448
|
+
public ingredientsV1ControllerGetAllIngredients(requestParameters: IngredientsV1ApiIngredientsV1ControllerGetAllIngredientsRequest = {}, options?: RawAxiosRequestConfig) {
|
|
4449
|
+
return IngredientsV1ApiFp(this.configuration).ingredientsV1ControllerGetAllIngredients(requestParameters.name, requestParameters.query, requestParameters.orderBy, requestParameters.isAsc, options).then((request) => request(this.axios, this.basePath));
|
|
4450
|
+
}
|
|
4451
|
+
|
|
4452
|
+
/**
|
|
4453
|
+
*
|
|
4454
|
+
* @summary Get ingredient by id
|
|
4455
|
+
* @param {IngredientsV1ApiIngredientsV1ControllerGetIngredientByIdRequest} requestParameters Request parameters.
|
|
4456
|
+
* @param {*} [options] Override http request option.
|
|
4457
|
+
* @throws {RequiredError}
|
|
4458
|
+
* @memberof IngredientsV1Api
|
|
4459
|
+
*/
|
|
4460
|
+
public ingredientsV1ControllerGetIngredientById(requestParameters: IngredientsV1ApiIngredientsV1ControllerGetIngredientByIdRequest, options?: RawAxiosRequestConfig) {
|
|
4461
|
+
return IngredientsV1ApiFp(this.configuration).ingredientsV1ControllerGetIngredientById(requestParameters.id, options).then((request) => request(this.axios, this.basePath));
|
|
4462
|
+
}
|
|
4463
|
+
|
|
4205
4464
|
/**
|
|
4206
4465
|
*
|
|
4207
4466
|
* @summary Get ingredients
|
package/dist/api.d.ts
CHANGED
|
@@ -777,6 +777,25 @@ export declare const ExerciseWithSetsDtoDifficultyEnum: {
|
|
|
777
777
|
readonly Hard: "HARD";
|
|
778
778
|
};
|
|
779
779
|
export type ExerciseWithSetsDtoDifficultyEnum = typeof ExerciseWithSetsDtoDifficultyEnum[keyof typeof ExerciseWithSetsDtoDifficultyEnum];
|
|
780
|
+
/**
|
|
781
|
+
*
|
|
782
|
+
* @export
|
|
783
|
+
* @interface GetAllIngredientsResponseDto
|
|
784
|
+
*/
|
|
785
|
+
export interface GetAllIngredientsResponseDto {
|
|
786
|
+
/**
|
|
787
|
+
*
|
|
788
|
+
* @type {Array<IngredientDto>}
|
|
789
|
+
* @memberof GetAllIngredientsResponseDto
|
|
790
|
+
*/
|
|
791
|
+
'items': Array<IngredientDto>;
|
|
792
|
+
/**
|
|
793
|
+
*
|
|
794
|
+
* @type {number}
|
|
795
|
+
* @memberof GetAllIngredientsResponseDto
|
|
796
|
+
*/
|
|
797
|
+
'totalItems': number;
|
|
798
|
+
}
|
|
780
799
|
/**
|
|
781
800
|
*
|
|
782
801
|
* @export
|
|
@@ -3408,6 +3427,25 @@ export declare const IngredientsV1ApiAxiosParamCreator: (configuration?: Configu
|
|
|
3408
3427
|
* @throws {RequiredError}
|
|
3409
3428
|
*/
|
|
3410
3429
|
ingredientsV1ControllerCreateIngredient: (createIngredientRequestDto: CreateIngredientRequestDto, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
3430
|
+
/**
|
|
3431
|
+
*
|
|
3432
|
+
* @summary Get all ingredients
|
|
3433
|
+
* @param {string} [name] Ingredient name
|
|
3434
|
+
* @param {string} [query] Ingredient query
|
|
3435
|
+
* @param {string} [orderBy] Order by
|
|
3436
|
+
* @param {boolean} [isAsc] Sort order direction (true for ascending, false for descending)
|
|
3437
|
+
* @param {*} [options] Override http request option.
|
|
3438
|
+
* @throws {RequiredError}
|
|
3439
|
+
*/
|
|
3440
|
+
ingredientsV1ControllerGetAllIngredients: (name?: string, query?: string, orderBy?: string, isAsc?: boolean, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
3441
|
+
/**
|
|
3442
|
+
*
|
|
3443
|
+
* @summary Get ingredient by id
|
|
3444
|
+
* @param {string} id
|
|
3445
|
+
* @param {*} [options] Override http request option.
|
|
3446
|
+
* @throws {RequiredError}
|
|
3447
|
+
*/
|
|
3448
|
+
ingredientsV1ControllerGetIngredientById: (id: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
3411
3449
|
/**
|
|
3412
3450
|
*
|
|
3413
3451
|
* @summary Get ingredients
|
|
@@ -3435,6 +3473,25 @@ export declare const IngredientsV1ApiFp: (configuration?: Configuration) => {
|
|
|
3435
3473
|
* @throws {RequiredError}
|
|
3436
3474
|
*/
|
|
3437
3475
|
ingredientsV1ControllerCreateIngredient(createIngredientRequestDto: CreateIngredientRequestDto, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<IngredientDto>>;
|
|
3476
|
+
/**
|
|
3477
|
+
*
|
|
3478
|
+
* @summary Get all ingredients
|
|
3479
|
+
* @param {string} [name] Ingredient name
|
|
3480
|
+
* @param {string} [query] Ingredient query
|
|
3481
|
+
* @param {string} [orderBy] Order by
|
|
3482
|
+
* @param {boolean} [isAsc] Sort order direction (true for ascending, false for descending)
|
|
3483
|
+
* @param {*} [options] Override http request option.
|
|
3484
|
+
* @throws {RequiredError}
|
|
3485
|
+
*/
|
|
3486
|
+
ingredientsV1ControllerGetAllIngredients(name?: string, query?: string, orderBy?: string, isAsc?: boolean, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetAllIngredientsResponseDto>>;
|
|
3487
|
+
/**
|
|
3488
|
+
*
|
|
3489
|
+
* @summary Get ingredient by id
|
|
3490
|
+
* @param {string} id
|
|
3491
|
+
* @param {*} [options] Override http request option.
|
|
3492
|
+
* @throws {RequiredError}
|
|
3493
|
+
*/
|
|
3494
|
+
ingredientsV1ControllerGetIngredientById(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<IngredientDto>>;
|
|
3438
3495
|
/**
|
|
3439
3496
|
*
|
|
3440
3497
|
* @summary Get ingredients
|
|
@@ -3462,6 +3519,22 @@ export declare const IngredientsV1ApiFactory: (configuration?: Configuration, ba
|
|
|
3462
3519
|
* @throws {RequiredError}
|
|
3463
3520
|
*/
|
|
3464
3521
|
ingredientsV1ControllerCreateIngredient(requestParameters: IngredientsV1ApiIngredientsV1ControllerCreateIngredientRequest, options?: RawAxiosRequestConfig): AxiosPromise<IngredientDto>;
|
|
3522
|
+
/**
|
|
3523
|
+
*
|
|
3524
|
+
* @summary Get all ingredients
|
|
3525
|
+
* @param {IngredientsV1ApiIngredientsV1ControllerGetAllIngredientsRequest} requestParameters Request parameters.
|
|
3526
|
+
* @param {*} [options] Override http request option.
|
|
3527
|
+
* @throws {RequiredError}
|
|
3528
|
+
*/
|
|
3529
|
+
ingredientsV1ControllerGetAllIngredients(requestParameters?: IngredientsV1ApiIngredientsV1ControllerGetAllIngredientsRequest, options?: RawAxiosRequestConfig): AxiosPromise<GetAllIngredientsResponseDto>;
|
|
3530
|
+
/**
|
|
3531
|
+
*
|
|
3532
|
+
* @summary Get ingredient by id
|
|
3533
|
+
* @param {IngredientsV1ApiIngredientsV1ControllerGetIngredientByIdRequest} requestParameters Request parameters.
|
|
3534
|
+
* @param {*} [options] Override http request option.
|
|
3535
|
+
* @throws {RequiredError}
|
|
3536
|
+
*/
|
|
3537
|
+
ingredientsV1ControllerGetIngredientById(requestParameters: IngredientsV1ApiIngredientsV1ControllerGetIngredientByIdRequest, options?: RawAxiosRequestConfig): AxiosPromise<IngredientDto>;
|
|
3465
3538
|
/**
|
|
3466
3539
|
*
|
|
3467
3540
|
* @summary Get ingredients
|
|
@@ -3486,6 +3559,24 @@ export interface IngredientsV1ApiInterface {
|
|
|
3486
3559
|
* @memberof IngredientsV1ApiInterface
|
|
3487
3560
|
*/
|
|
3488
3561
|
ingredientsV1ControllerCreateIngredient(requestParameters: IngredientsV1ApiIngredientsV1ControllerCreateIngredientRequest, options?: RawAxiosRequestConfig): AxiosPromise<IngredientDto>;
|
|
3562
|
+
/**
|
|
3563
|
+
*
|
|
3564
|
+
* @summary Get all ingredients
|
|
3565
|
+
* @param {IngredientsV1ApiIngredientsV1ControllerGetAllIngredientsRequest} requestParameters Request parameters.
|
|
3566
|
+
* @param {*} [options] Override http request option.
|
|
3567
|
+
* @throws {RequiredError}
|
|
3568
|
+
* @memberof IngredientsV1ApiInterface
|
|
3569
|
+
*/
|
|
3570
|
+
ingredientsV1ControllerGetAllIngredients(requestParameters?: IngredientsV1ApiIngredientsV1ControllerGetAllIngredientsRequest, options?: RawAxiosRequestConfig): AxiosPromise<GetAllIngredientsResponseDto>;
|
|
3571
|
+
/**
|
|
3572
|
+
*
|
|
3573
|
+
* @summary Get ingredient by id
|
|
3574
|
+
* @param {IngredientsV1ApiIngredientsV1ControllerGetIngredientByIdRequest} requestParameters Request parameters.
|
|
3575
|
+
* @param {*} [options] Override http request option.
|
|
3576
|
+
* @throws {RequiredError}
|
|
3577
|
+
* @memberof IngredientsV1ApiInterface
|
|
3578
|
+
*/
|
|
3579
|
+
ingredientsV1ControllerGetIngredientById(requestParameters: IngredientsV1ApiIngredientsV1ControllerGetIngredientByIdRequest, options?: RawAxiosRequestConfig): AxiosPromise<IngredientDto>;
|
|
3489
3580
|
/**
|
|
3490
3581
|
*
|
|
3491
3582
|
* @summary Get ingredients
|
|
@@ -3509,6 +3600,50 @@ export interface IngredientsV1ApiIngredientsV1ControllerCreateIngredientRequest
|
|
|
3509
3600
|
*/
|
|
3510
3601
|
readonly createIngredientRequestDto: CreateIngredientRequestDto;
|
|
3511
3602
|
}
|
|
3603
|
+
/**
|
|
3604
|
+
* Request parameters for ingredientsV1ControllerGetAllIngredients operation in IngredientsV1Api.
|
|
3605
|
+
* @export
|
|
3606
|
+
* @interface IngredientsV1ApiIngredientsV1ControllerGetAllIngredientsRequest
|
|
3607
|
+
*/
|
|
3608
|
+
export interface IngredientsV1ApiIngredientsV1ControllerGetAllIngredientsRequest {
|
|
3609
|
+
/**
|
|
3610
|
+
* Ingredient name
|
|
3611
|
+
* @type {string}
|
|
3612
|
+
* @memberof IngredientsV1ApiIngredientsV1ControllerGetAllIngredients
|
|
3613
|
+
*/
|
|
3614
|
+
readonly name?: string;
|
|
3615
|
+
/**
|
|
3616
|
+
* Ingredient query
|
|
3617
|
+
* @type {string}
|
|
3618
|
+
* @memberof IngredientsV1ApiIngredientsV1ControllerGetAllIngredients
|
|
3619
|
+
*/
|
|
3620
|
+
readonly query?: string;
|
|
3621
|
+
/**
|
|
3622
|
+
* Order by
|
|
3623
|
+
* @type {string}
|
|
3624
|
+
* @memberof IngredientsV1ApiIngredientsV1ControllerGetAllIngredients
|
|
3625
|
+
*/
|
|
3626
|
+
readonly orderBy?: string;
|
|
3627
|
+
/**
|
|
3628
|
+
* Sort order direction (true for ascending, false for descending)
|
|
3629
|
+
* @type {boolean}
|
|
3630
|
+
* @memberof IngredientsV1ApiIngredientsV1ControllerGetAllIngredients
|
|
3631
|
+
*/
|
|
3632
|
+
readonly isAsc?: boolean;
|
|
3633
|
+
}
|
|
3634
|
+
/**
|
|
3635
|
+
* Request parameters for ingredientsV1ControllerGetIngredientById operation in IngredientsV1Api.
|
|
3636
|
+
* @export
|
|
3637
|
+
* @interface IngredientsV1ApiIngredientsV1ControllerGetIngredientByIdRequest
|
|
3638
|
+
*/
|
|
3639
|
+
export interface IngredientsV1ApiIngredientsV1ControllerGetIngredientByIdRequest {
|
|
3640
|
+
/**
|
|
3641
|
+
*
|
|
3642
|
+
* @type {string}
|
|
3643
|
+
* @memberof IngredientsV1ApiIngredientsV1ControllerGetIngredientById
|
|
3644
|
+
*/
|
|
3645
|
+
readonly id: string;
|
|
3646
|
+
}
|
|
3512
3647
|
/**
|
|
3513
3648
|
* Request parameters for ingredientsV1ControllerGetIngredients operation in IngredientsV1Api.
|
|
3514
3649
|
* @export
|
|
@@ -3568,6 +3703,24 @@ export declare class IngredientsV1Api extends BaseAPI implements IngredientsV1Ap
|
|
|
3568
3703
|
* @memberof IngredientsV1Api
|
|
3569
3704
|
*/
|
|
3570
3705
|
ingredientsV1ControllerCreateIngredient(requestParameters: IngredientsV1ApiIngredientsV1ControllerCreateIngredientRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<IngredientDto, any, {}>>;
|
|
3706
|
+
/**
|
|
3707
|
+
*
|
|
3708
|
+
* @summary Get all ingredients
|
|
3709
|
+
* @param {IngredientsV1ApiIngredientsV1ControllerGetAllIngredientsRequest} requestParameters Request parameters.
|
|
3710
|
+
* @param {*} [options] Override http request option.
|
|
3711
|
+
* @throws {RequiredError}
|
|
3712
|
+
* @memberof IngredientsV1Api
|
|
3713
|
+
*/
|
|
3714
|
+
ingredientsV1ControllerGetAllIngredients(requestParameters?: IngredientsV1ApiIngredientsV1ControllerGetAllIngredientsRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<GetAllIngredientsResponseDto, any, {}>>;
|
|
3715
|
+
/**
|
|
3716
|
+
*
|
|
3717
|
+
* @summary Get ingredient by id
|
|
3718
|
+
* @param {IngredientsV1ApiIngredientsV1ControllerGetIngredientByIdRequest} requestParameters Request parameters.
|
|
3719
|
+
* @param {*} [options] Override http request option.
|
|
3720
|
+
* @throws {RequiredError}
|
|
3721
|
+
* @memberof IngredientsV1Api
|
|
3722
|
+
*/
|
|
3723
|
+
ingredientsV1ControllerGetIngredientById(requestParameters: IngredientsV1ApiIngredientsV1ControllerGetIngredientByIdRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<IngredientDto, any, {}>>;
|
|
3571
3724
|
/**
|
|
3572
3725
|
*
|
|
3573
3726
|
* @summary Get ingredients
|
package/dist/api.js
CHANGED
|
@@ -998,6 +998,86 @@ const IngredientsV1ApiAxiosParamCreator = function (configuration) {
|
|
|
998
998
|
options: localVarRequestOptions,
|
|
999
999
|
};
|
|
1000
1000
|
}),
|
|
1001
|
+
/**
|
|
1002
|
+
*
|
|
1003
|
+
* @summary Get all ingredients
|
|
1004
|
+
* @param {string} [name] Ingredient name
|
|
1005
|
+
* @param {string} [query] Ingredient query
|
|
1006
|
+
* @param {string} [orderBy] Order by
|
|
1007
|
+
* @param {boolean} [isAsc] Sort order direction (true for ascending, false for descending)
|
|
1008
|
+
* @param {*} [options] Override http request option.
|
|
1009
|
+
* @throws {RequiredError}
|
|
1010
|
+
*/
|
|
1011
|
+
ingredientsV1ControllerGetAllIngredients: (name_1, query_1, orderBy_1, isAsc_1, ...args_1) => __awaiter(this, [name_1, query_1, orderBy_1, isAsc_1, ...args_1], void 0, function* (name, query, orderBy, isAsc, options = {}) {
|
|
1012
|
+
const localVarPath = `/api/ingredients/v1/all`;
|
|
1013
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1014
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
1015
|
+
let baseOptions;
|
|
1016
|
+
if (configuration) {
|
|
1017
|
+
baseOptions = configuration.baseOptions;
|
|
1018
|
+
}
|
|
1019
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
1020
|
+
const localVarHeaderParameter = {};
|
|
1021
|
+
const localVarQueryParameter = {};
|
|
1022
|
+
// authentication apiKey required
|
|
1023
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-api-key", configuration);
|
|
1024
|
+
// authentication bearer required
|
|
1025
|
+
// http bearer authentication required
|
|
1026
|
+
yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
|
|
1027
|
+
if (name !== undefined) {
|
|
1028
|
+
localVarQueryParameter['name'] = name;
|
|
1029
|
+
}
|
|
1030
|
+
if (query !== undefined) {
|
|
1031
|
+
localVarQueryParameter['query'] = query;
|
|
1032
|
+
}
|
|
1033
|
+
if (orderBy !== undefined) {
|
|
1034
|
+
localVarQueryParameter['orderBy'] = orderBy;
|
|
1035
|
+
}
|
|
1036
|
+
if (isAsc !== undefined) {
|
|
1037
|
+
localVarQueryParameter['isAsc'] = isAsc;
|
|
1038
|
+
}
|
|
1039
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
1040
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1041
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
1042
|
+
return {
|
|
1043
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
1044
|
+
options: localVarRequestOptions,
|
|
1045
|
+
};
|
|
1046
|
+
}),
|
|
1047
|
+
/**
|
|
1048
|
+
*
|
|
1049
|
+
* @summary Get ingredient by id
|
|
1050
|
+
* @param {string} id
|
|
1051
|
+
* @param {*} [options] Override http request option.
|
|
1052
|
+
* @throws {RequiredError}
|
|
1053
|
+
*/
|
|
1054
|
+
ingredientsV1ControllerGetIngredientById: (id_1, ...args_1) => __awaiter(this, [id_1, ...args_1], void 0, function* (id, options = {}) {
|
|
1055
|
+
// verify required parameter 'id' is not null or undefined
|
|
1056
|
+
(0, common_1.assertParamExists)('ingredientsV1ControllerGetIngredientById', 'id', id);
|
|
1057
|
+
const localVarPath = `/api/ingredients/v1/{id}`
|
|
1058
|
+
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
|
1059
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1060
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
1061
|
+
let baseOptions;
|
|
1062
|
+
if (configuration) {
|
|
1063
|
+
baseOptions = configuration.baseOptions;
|
|
1064
|
+
}
|
|
1065
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
1066
|
+
const localVarHeaderParameter = {};
|
|
1067
|
+
const localVarQueryParameter = {};
|
|
1068
|
+
// authentication apiKey required
|
|
1069
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-api-key", configuration);
|
|
1070
|
+
// authentication bearer required
|
|
1071
|
+
// http bearer authentication required
|
|
1072
|
+
yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
|
|
1073
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
1074
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1075
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
1076
|
+
return {
|
|
1077
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
1078
|
+
options: localVarRequestOptions,
|
|
1079
|
+
};
|
|
1080
|
+
}),
|
|
1001
1081
|
/**
|
|
1002
1082
|
*
|
|
1003
1083
|
* @summary Get ingredients
|
|
@@ -1078,6 +1158,41 @@ const IngredientsV1ApiFp = function (configuration) {
|
|
|
1078
1158
|
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1079
1159
|
});
|
|
1080
1160
|
},
|
|
1161
|
+
/**
|
|
1162
|
+
*
|
|
1163
|
+
* @summary Get all ingredients
|
|
1164
|
+
* @param {string} [name] Ingredient name
|
|
1165
|
+
* @param {string} [query] Ingredient query
|
|
1166
|
+
* @param {string} [orderBy] Order by
|
|
1167
|
+
* @param {boolean} [isAsc] Sort order direction (true for ascending, false for descending)
|
|
1168
|
+
* @param {*} [options] Override http request option.
|
|
1169
|
+
* @throws {RequiredError}
|
|
1170
|
+
*/
|
|
1171
|
+
ingredientsV1ControllerGetAllIngredients(name, query, orderBy, isAsc, options) {
|
|
1172
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1173
|
+
var _a, _b, _c;
|
|
1174
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.ingredientsV1ControllerGetAllIngredients(name, query, orderBy, isAsc, options);
|
|
1175
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
1176
|
+
const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['IngredientsV1Api.ingredientsV1ControllerGetAllIngredients']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
1177
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1178
|
+
});
|
|
1179
|
+
},
|
|
1180
|
+
/**
|
|
1181
|
+
*
|
|
1182
|
+
* @summary Get ingredient by id
|
|
1183
|
+
* @param {string} id
|
|
1184
|
+
* @param {*} [options] Override http request option.
|
|
1185
|
+
* @throws {RequiredError}
|
|
1186
|
+
*/
|
|
1187
|
+
ingredientsV1ControllerGetIngredientById(id, options) {
|
|
1188
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1189
|
+
var _a, _b, _c;
|
|
1190
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.ingredientsV1ControllerGetIngredientById(id, options);
|
|
1191
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
1192
|
+
const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['IngredientsV1Api.ingredientsV1ControllerGetIngredientById']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
1193
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1194
|
+
});
|
|
1195
|
+
},
|
|
1081
1196
|
/**
|
|
1082
1197
|
*
|
|
1083
1198
|
* @summary Get ingredients
|
|
@@ -1119,6 +1234,26 @@ const IngredientsV1ApiFactory = function (configuration, basePath, axios) {
|
|
|
1119
1234
|
ingredientsV1ControllerCreateIngredient(requestParameters, options) {
|
|
1120
1235
|
return localVarFp.ingredientsV1ControllerCreateIngredient(requestParameters.createIngredientRequestDto, options).then((request) => request(axios, basePath));
|
|
1121
1236
|
},
|
|
1237
|
+
/**
|
|
1238
|
+
*
|
|
1239
|
+
* @summary Get all ingredients
|
|
1240
|
+
* @param {IngredientsV1ApiIngredientsV1ControllerGetAllIngredientsRequest} requestParameters Request parameters.
|
|
1241
|
+
* @param {*} [options] Override http request option.
|
|
1242
|
+
* @throws {RequiredError}
|
|
1243
|
+
*/
|
|
1244
|
+
ingredientsV1ControllerGetAllIngredients(requestParameters = {}, options) {
|
|
1245
|
+
return localVarFp.ingredientsV1ControllerGetAllIngredients(requestParameters.name, requestParameters.query, requestParameters.orderBy, requestParameters.isAsc, options).then((request) => request(axios, basePath));
|
|
1246
|
+
},
|
|
1247
|
+
/**
|
|
1248
|
+
*
|
|
1249
|
+
* @summary Get ingredient by id
|
|
1250
|
+
* @param {IngredientsV1ApiIngredientsV1ControllerGetIngredientByIdRequest} requestParameters Request parameters.
|
|
1251
|
+
* @param {*} [options] Override http request option.
|
|
1252
|
+
* @throws {RequiredError}
|
|
1253
|
+
*/
|
|
1254
|
+
ingredientsV1ControllerGetIngredientById(requestParameters, options) {
|
|
1255
|
+
return localVarFp.ingredientsV1ControllerGetIngredientById(requestParameters.id, options).then((request) => request(axios, basePath));
|
|
1256
|
+
},
|
|
1122
1257
|
/**
|
|
1123
1258
|
*
|
|
1124
1259
|
* @summary Get ingredients
|
|
@@ -1150,6 +1285,28 @@ class IngredientsV1Api extends base_1.BaseAPI {
|
|
|
1150
1285
|
ingredientsV1ControllerCreateIngredient(requestParameters, options) {
|
|
1151
1286
|
return (0, exports.IngredientsV1ApiFp)(this.configuration).ingredientsV1ControllerCreateIngredient(requestParameters.createIngredientRequestDto, options).then((request) => request(this.axios, this.basePath));
|
|
1152
1287
|
}
|
|
1288
|
+
/**
|
|
1289
|
+
*
|
|
1290
|
+
* @summary Get all ingredients
|
|
1291
|
+
* @param {IngredientsV1ApiIngredientsV1ControllerGetAllIngredientsRequest} requestParameters Request parameters.
|
|
1292
|
+
* @param {*} [options] Override http request option.
|
|
1293
|
+
* @throws {RequiredError}
|
|
1294
|
+
* @memberof IngredientsV1Api
|
|
1295
|
+
*/
|
|
1296
|
+
ingredientsV1ControllerGetAllIngredients(requestParameters = {}, options) {
|
|
1297
|
+
return (0, exports.IngredientsV1ApiFp)(this.configuration).ingredientsV1ControllerGetAllIngredients(requestParameters.name, requestParameters.query, requestParameters.orderBy, requestParameters.isAsc, options).then((request) => request(this.axios, this.basePath));
|
|
1298
|
+
}
|
|
1299
|
+
/**
|
|
1300
|
+
*
|
|
1301
|
+
* @summary Get ingredient by id
|
|
1302
|
+
* @param {IngredientsV1ApiIngredientsV1ControllerGetIngredientByIdRequest} requestParameters Request parameters.
|
|
1303
|
+
* @param {*} [options] Override http request option.
|
|
1304
|
+
* @throws {RequiredError}
|
|
1305
|
+
* @memberof IngredientsV1Api
|
|
1306
|
+
*/
|
|
1307
|
+
ingredientsV1ControllerGetIngredientById(requestParameters, options) {
|
|
1308
|
+
return (0, exports.IngredientsV1ApiFp)(this.configuration).ingredientsV1ControllerGetIngredientById(requestParameters.id, options).then((request) => request(this.axios, this.basePath));
|
|
1309
|
+
}
|
|
1153
1310
|
/**
|
|
1154
1311
|
*
|
|
1155
1312
|
* @summary Get ingredients
|
package/dist/esm/api.d.ts
CHANGED
|
@@ -777,6 +777,25 @@ export declare const ExerciseWithSetsDtoDifficultyEnum: {
|
|
|
777
777
|
readonly Hard: "HARD";
|
|
778
778
|
};
|
|
779
779
|
export type ExerciseWithSetsDtoDifficultyEnum = typeof ExerciseWithSetsDtoDifficultyEnum[keyof typeof ExerciseWithSetsDtoDifficultyEnum];
|
|
780
|
+
/**
|
|
781
|
+
*
|
|
782
|
+
* @export
|
|
783
|
+
* @interface GetAllIngredientsResponseDto
|
|
784
|
+
*/
|
|
785
|
+
export interface GetAllIngredientsResponseDto {
|
|
786
|
+
/**
|
|
787
|
+
*
|
|
788
|
+
* @type {Array<IngredientDto>}
|
|
789
|
+
* @memberof GetAllIngredientsResponseDto
|
|
790
|
+
*/
|
|
791
|
+
'items': Array<IngredientDto>;
|
|
792
|
+
/**
|
|
793
|
+
*
|
|
794
|
+
* @type {number}
|
|
795
|
+
* @memberof GetAllIngredientsResponseDto
|
|
796
|
+
*/
|
|
797
|
+
'totalItems': number;
|
|
798
|
+
}
|
|
780
799
|
/**
|
|
781
800
|
*
|
|
782
801
|
* @export
|
|
@@ -3408,6 +3427,25 @@ export declare const IngredientsV1ApiAxiosParamCreator: (configuration?: Configu
|
|
|
3408
3427
|
* @throws {RequiredError}
|
|
3409
3428
|
*/
|
|
3410
3429
|
ingredientsV1ControllerCreateIngredient: (createIngredientRequestDto: CreateIngredientRequestDto, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
3430
|
+
/**
|
|
3431
|
+
*
|
|
3432
|
+
* @summary Get all ingredients
|
|
3433
|
+
* @param {string} [name] Ingredient name
|
|
3434
|
+
* @param {string} [query] Ingredient query
|
|
3435
|
+
* @param {string} [orderBy] Order by
|
|
3436
|
+
* @param {boolean} [isAsc] Sort order direction (true for ascending, false for descending)
|
|
3437
|
+
* @param {*} [options] Override http request option.
|
|
3438
|
+
* @throws {RequiredError}
|
|
3439
|
+
*/
|
|
3440
|
+
ingredientsV1ControllerGetAllIngredients: (name?: string, query?: string, orderBy?: string, isAsc?: boolean, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
3441
|
+
/**
|
|
3442
|
+
*
|
|
3443
|
+
* @summary Get ingredient by id
|
|
3444
|
+
* @param {string} id
|
|
3445
|
+
* @param {*} [options] Override http request option.
|
|
3446
|
+
* @throws {RequiredError}
|
|
3447
|
+
*/
|
|
3448
|
+
ingredientsV1ControllerGetIngredientById: (id: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
3411
3449
|
/**
|
|
3412
3450
|
*
|
|
3413
3451
|
* @summary Get ingredients
|
|
@@ -3435,6 +3473,25 @@ export declare const IngredientsV1ApiFp: (configuration?: Configuration) => {
|
|
|
3435
3473
|
* @throws {RequiredError}
|
|
3436
3474
|
*/
|
|
3437
3475
|
ingredientsV1ControllerCreateIngredient(createIngredientRequestDto: CreateIngredientRequestDto, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<IngredientDto>>;
|
|
3476
|
+
/**
|
|
3477
|
+
*
|
|
3478
|
+
* @summary Get all ingredients
|
|
3479
|
+
* @param {string} [name] Ingredient name
|
|
3480
|
+
* @param {string} [query] Ingredient query
|
|
3481
|
+
* @param {string} [orderBy] Order by
|
|
3482
|
+
* @param {boolean} [isAsc] Sort order direction (true for ascending, false for descending)
|
|
3483
|
+
* @param {*} [options] Override http request option.
|
|
3484
|
+
* @throws {RequiredError}
|
|
3485
|
+
*/
|
|
3486
|
+
ingredientsV1ControllerGetAllIngredients(name?: string, query?: string, orderBy?: string, isAsc?: boolean, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetAllIngredientsResponseDto>>;
|
|
3487
|
+
/**
|
|
3488
|
+
*
|
|
3489
|
+
* @summary Get ingredient by id
|
|
3490
|
+
* @param {string} id
|
|
3491
|
+
* @param {*} [options] Override http request option.
|
|
3492
|
+
* @throws {RequiredError}
|
|
3493
|
+
*/
|
|
3494
|
+
ingredientsV1ControllerGetIngredientById(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<IngredientDto>>;
|
|
3438
3495
|
/**
|
|
3439
3496
|
*
|
|
3440
3497
|
* @summary Get ingredients
|
|
@@ -3462,6 +3519,22 @@ export declare const IngredientsV1ApiFactory: (configuration?: Configuration, ba
|
|
|
3462
3519
|
* @throws {RequiredError}
|
|
3463
3520
|
*/
|
|
3464
3521
|
ingredientsV1ControllerCreateIngredient(requestParameters: IngredientsV1ApiIngredientsV1ControllerCreateIngredientRequest, options?: RawAxiosRequestConfig): AxiosPromise<IngredientDto>;
|
|
3522
|
+
/**
|
|
3523
|
+
*
|
|
3524
|
+
* @summary Get all ingredients
|
|
3525
|
+
* @param {IngredientsV1ApiIngredientsV1ControllerGetAllIngredientsRequest} requestParameters Request parameters.
|
|
3526
|
+
* @param {*} [options] Override http request option.
|
|
3527
|
+
* @throws {RequiredError}
|
|
3528
|
+
*/
|
|
3529
|
+
ingredientsV1ControllerGetAllIngredients(requestParameters?: IngredientsV1ApiIngredientsV1ControllerGetAllIngredientsRequest, options?: RawAxiosRequestConfig): AxiosPromise<GetAllIngredientsResponseDto>;
|
|
3530
|
+
/**
|
|
3531
|
+
*
|
|
3532
|
+
* @summary Get ingredient by id
|
|
3533
|
+
* @param {IngredientsV1ApiIngredientsV1ControllerGetIngredientByIdRequest} requestParameters Request parameters.
|
|
3534
|
+
* @param {*} [options] Override http request option.
|
|
3535
|
+
* @throws {RequiredError}
|
|
3536
|
+
*/
|
|
3537
|
+
ingredientsV1ControllerGetIngredientById(requestParameters: IngredientsV1ApiIngredientsV1ControllerGetIngredientByIdRequest, options?: RawAxiosRequestConfig): AxiosPromise<IngredientDto>;
|
|
3465
3538
|
/**
|
|
3466
3539
|
*
|
|
3467
3540
|
* @summary Get ingredients
|
|
@@ -3486,6 +3559,24 @@ export interface IngredientsV1ApiInterface {
|
|
|
3486
3559
|
* @memberof IngredientsV1ApiInterface
|
|
3487
3560
|
*/
|
|
3488
3561
|
ingredientsV1ControllerCreateIngredient(requestParameters: IngredientsV1ApiIngredientsV1ControllerCreateIngredientRequest, options?: RawAxiosRequestConfig): AxiosPromise<IngredientDto>;
|
|
3562
|
+
/**
|
|
3563
|
+
*
|
|
3564
|
+
* @summary Get all ingredients
|
|
3565
|
+
* @param {IngredientsV1ApiIngredientsV1ControllerGetAllIngredientsRequest} requestParameters Request parameters.
|
|
3566
|
+
* @param {*} [options] Override http request option.
|
|
3567
|
+
* @throws {RequiredError}
|
|
3568
|
+
* @memberof IngredientsV1ApiInterface
|
|
3569
|
+
*/
|
|
3570
|
+
ingredientsV1ControllerGetAllIngredients(requestParameters?: IngredientsV1ApiIngredientsV1ControllerGetAllIngredientsRequest, options?: RawAxiosRequestConfig): AxiosPromise<GetAllIngredientsResponseDto>;
|
|
3571
|
+
/**
|
|
3572
|
+
*
|
|
3573
|
+
* @summary Get ingredient by id
|
|
3574
|
+
* @param {IngredientsV1ApiIngredientsV1ControllerGetIngredientByIdRequest} requestParameters Request parameters.
|
|
3575
|
+
* @param {*} [options] Override http request option.
|
|
3576
|
+
* @throws {RequiredError}
|
|
3577
|
+
* @memberof IngredientsV1ApiInterface
|
|
3578
|
+
*/
|
|
3579
|
+
ingredientsV1ControllerGetIngredientById(requestParameters: IngredientsV1ApiIngredientsV1ControllerGetIngredientByIdRequest, options?: RawAxiosRequestConfig): AxiosPromise<IngredientDto>;
|
|
3489
3580
|
/**
|
|
3490
3581
|
*
|
|
3491
3582
|
* @summary Get ingredients
|
|
@@ -3509,6 +3600,50 @@ export interface IngredientsV1ApiIngredientsV1ControllerCreateIngredientRequest
|
|
|
3509
3600
|
*/
|
|
3510
3601
|
readonly createIngredientRequestDto: CreateIngredientRequestDto;
|
|
3511
3602
|
}
|
|
3603
|
+
/**
|
|
3604
|
+
* Request parameters for ingredientsV1ControllerGetAllIngredients operation in IngredientsV1Api.
|
|
3605
|
+
* @export
|
|
3606
|
+
* @interface IngredientsV1ApiIngredientsV1ControllerGetAllIngredientsRequest
|
|
3607
|
+
*/
|
|
3608
|
+
export interface IngredientsV1ApiIngredientsV1ControllerGetAllIngredientsRequest {
|
|
3609
|
+
/**
|
|
3610
|
+
* Ingredient name
|
|
3611
|
+
* @type {string}
|
|
3612
|
+
* @memberof IngredientsV1ApiIngredientsV1ControllerGetAllIngredients
|
|
3613
|
+
*/
|
|
3614
|
+
readonly name?: string;
|
|
3615
|
+
/**
|
|
3616
|
+
* Ingredient query
|
|
3617
|
+
* @type {string}
|
|
3618
|
+
* @memberof IngredientsV1ApiIngredientsV1ControllerGetAllIngredients
|
|
3619
|
+
*/
|
|
3620
|
+
readonly query?: string;
|
|
3621
|
+
/**
|
|
3622
|
+
* Order by
|
|
3623
|
+
* @type {string}
|
|
3624
|
+
* @memberof IngredientsV1ApiIngredientsV1ControllerGetAllIngredients
|
|
3625
|
+
*/
|
|
3626
|
+
readonly orderBy?: string;
|
|
3627
|
+
/**
|
|
3628
|
+
* Sort order direction (true for ascending, false for descending)
|
|
3629
|
+
* @type {boolean}
|
|
3630
|
+
* @memberof IngredientsV1ApiIngredientsV1ControllerGetAllIngredients
|
|
3631
|
+
*/
|
|
3632
|
+
readonly isAsc?: boolean;
|
|
3633
|
+
}
|
|
3634
|
+
/**
|
|
3635
|
+
* Request parameters for ingredientsV1ControllerGetIngredientById operation in IngredientsV1Api.
|
|
3636
|
+
* @export
|
|
3637
|
+
* @interface IngredientsV1ApiIngredientsV1ControllerGetIngredientByIdRequest
|
|
3638
|
+
*/
|
|
3639
|
+
export interface IngredientsV1ApiIngredientsV1ControllerGetIngredientByIdRequest {
|
|
3640
|
+
/**
|
|
3641
|
+
*
|
|
3642
|
+
* @type {string}
|
|
3643
|
+
* @memberof IngredientsV1ApiIngredientsV1ControllerGetIngredientById
|
|
3644
|
+
*/
|
|
3645
|
+
readonly id: string;
|
|
3646
|
+
}
|
|
3512
3647
|
/**
|
|
3513
3648
|
* Request parameters for ingredientsV1ControllerGetIngredients operation in IngredientsV1Api.
|
|
3514
3649
|
* @export
|
|
@@ -3568,6 +3703,24 @@ export declare class IngredientsV1Api extends BaseAPI implements IngredientsV1Ap
|
|
|
3568
3703
|
* @memberof IngredientsV1Api
|
|
3569
3704
|
*/
|
|
3570
3705
|
ingredientsV1ControllerCreateIngredient(requestParameters: IngredientsV1ApiIngredientsV1ControllerCreateIngredientRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<IngredientDto, any, {}>>;
|
|
3706
|
+
/**
|
|
3707
|
+
*
|
|
3708
|
+
* @summary Get all ingredients
|
|
3709
|
+
* @param {IngredientsV1ApiIngredientsV1ControllerGetAllIngredientsRequest} requestParameters Request parameters.
|
|
3710
|
+
* @param {*} [options] Override http request option.
|
|
3711
|
+
* @throws {RequiredError}
|
|
3712
|
+
* @memberof IngredientsV1Api
|
|
3713
|
+
*/
|
|
3714
|
+
ingredientsV1ControllerGetAllIngredients(requestParameters?: IngredientsV1ApiIngredientsV1ControllerGetAllIngredientsRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<GetAllIngredientsResponseDto, any, {}>>;
|
|
3715
|
+
/**
|
|
3716
|
+
*
|
|
3717
|
+
* @summary Get ingredient by id
|
|
3718
|
+
* @param {IngredientsV1ApiIngredientsV1ControllerGetIngredientByIdRequest} requestParameters Request parameters.
|
|
3719
|
+
* @param {*} [options] Override http request option.
|
|
3720
|
+
* @throws {RequiredError}
|
|
3721
|
+
* @memberof IngredientsV1Api
|
|
3722
|
+
*/
|
|
3723
|
+
ingredientsV1ControllerGetIngredientById(requestParameters: IngredientsV1ApiIngredientsV1ControllerGetIngredientByIdRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<IngredientDto, any, {}>>;
|
|
3571
3724
|
/**
|
|
3572
3725
|
*
|
|
3573
3726
|
* @summary Get ingredients
|
package/dist/esm/api.js
CHANGED
|
@@ -986,6 +986,86 @@ export const IngredientsV1ApiAxiosParamCreator = function (configuration) {
|
|
|
986
986
|
options: localVarRequestOptions,
|
|
987
987
|
};
|
|
988
988
|
}),
|
|
989
|
+
/**
|
|
990
|
+
*
|
|
991
|
+
* @summary Get all ingredients
|
|
992
|
+
* @param {string} [name] Ingredient name
|
|
993
|
+
* @param {string} [query] Ingredient query
|
|
994
|
+
* @param {string} [orderBy] Order by
|
|
995
|
+
* @param {boolean} [isAsc] Sort order direction (true for ascending, false for descending)
|
|
996
|
+
* @param {*} [options] Override http request option.
|
|
997
|
+
* @throws {RequiredError}
|
|
998
|
+
*/
|
|
999
|
+
ingredientsV1ControllerGetAllIngredients: (name_1, query_1, orderBy_1, isAsc_1, ...args_1) => __awaiter(this, [name_1, query_1, orderBy_1, isAsc_1, ...args_1], void 0, function* (name, query, orderBy, isAsc, options = {}) {
|
|
1000
|
+
const localVarPath = `/api/ingredients/v1/all`;
|
|
1001
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1002
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
1003
|
+
let baseOptions;
|
|
1004
|
+
if (configuration) {
|
|
1005
|
+
baseOptions = configuration.baseOptions;
|
|
1006
|
+
}
|
|
1007
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
1008
|
+
const localVarHeaderParameter = {};
|
|
1009
|
+
const localVarQueryParameter = {};
|
|
1010
|
+
// authentication apiKey required
|
|
1011
|
+
yield setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration);
|
|
1012
|
+
// authentication bearer required
|
|
1013
|
+
// http bearer authentication required
|
|
1014
|
+
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
1015
|
+
if (name !== undefined) {
|
|
1016
|
+
localVarQueryParameter['name'] = name;
|
|
1017
|
+
}
|
|
1018
|
+
if (query !== undefined) {
|
|
1019
|
+
localVarQueryParameter['query'] = query;
|
|
1020
|
+
}
|
|
1021
|
+
if (orderBy !== undefined) {
|
|
1022
|
+
localVarQueryParameter['orderBy'] = orderBy;
|
|
1023
|
+
}
|
|
1024
|
+
if (isAsc !== undefined) {
|
|
1025
|
+
localVarQueryParameter['isAsc'] = isAsc;
|
|
1026
|
+
}
|
|
1027
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
1028
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1029
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
1030
|
+
return {
|
|
1031
|
+
url: toPathString(localVarUrlObj),
|
|
1032
|
+
options: localVarRequestOptions,
|
|
1033
|
+
};
|
|
1034
|
+
}),
|
|
1035
|
+
/**
|
|
1036
|
+
*
|
|
1037
|
+
* @summary Get ingredient by id
|
|
1038
|
+
* @param {string} id
|
|
1039
|
+
* @param {*} [options] Override http request option.
|
|
1040
|
+
* @throws {RequiredError}
|
|
1041
|
+
*/
|
|
1042
|
+
ingredientsV1ControllerGetIngredientById: (id_1, ...args_1) => __awaiter(this, [id_1, ...args_1], void 0, function* (id, options = {}) {
|
|
1043
|
+
// verify required parameter 'id' is not null or undefined
|
|
1044
|
+
assertParamExists('ingredientsV1ControllerGetIngredientById', 'id', id);
|
|
1045
|
+
const localVarPath = `/api/ingredients/v1/{id}`
|
|
1046
|
+
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
|
1047
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1048
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
1049
|
+
let baseOptions;
|
|
1050
|
+
if (configuration) {
|
|
1051
|
+
baseOptions = configuration.baseOptions;
|
|
1052
|
+
}
|
|
1053
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
1054
|
+
const localVarHeaderParameter = {};
|
|
1055
|
+
const localVarQueryParameter = {};
|
|
1056
|
+
// authentication apiKey required
|
|
1057
|
+
yield setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration);
|
|
1058
|
+
// authentication bearer required
|
|
1059
|
+
// http bearer authentication required
|
|
1060
|
+
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
1061
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
1062
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1063
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
1064
|
+
return {
|
|
1065
|
+
url: toPathString(localVarUrlObj),
|
|
1066
|
+
options: localVarRequestOptions,
|
|
1067
|
+
};
|
|
1068
|
+
}),
|
|
989
1069
|
/**
|
|
990
1070
|
*
|
|
991
1071
|
* @summary Get ingredients
|
|
@@ -1065,6 +1145,41 @@ export const IngredientsV1ApiFp = function (configuration) {
|
|
|
1065
1145
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1066
1146
|
});
|
|
1067
1147
|
},
|
|
1148
|
+
/**
|
|
1149
|
+
*
|
|
1150
|
+
* @summary Get all ingredients
|
|
1151
|
+
* @param {string} [name] Ingredient name
|
|
1152
|
+
* @param {string} [query] Ingredient query
|
|
1153
|
+
* @param {string} [orderBy] Order by
|
|
1154
|
+
* @param {boolean} [isAsc] Sort order direction (true for ascending, false for descending)
|
|
1155
|
+
* @param {*} [options] Override http request option.
|
|
1156
|
+
* @throws {RequiredError}
|
|
1157
|
+
*/
|
|
1158
|
+
ingredientsV1ControllerGetAllIngredients(name, query, orderBy, isAsc, options) {
|
|
1159
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1160
|
+
var _a, _b, _c;
|
|
1161
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.ingredientsV1ControllerGetAllIngredients(name, query, orderBy, isAsc, options);
|
|
1162
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
1163
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['IngredientsV1Api.ingredientsV1ControllerGetAllIngredients']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
1164
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1165
|
+
});
|
|
1166
|
+
},
|
|
1167
|
+
/**
|
|
1168
|
+
*
|
|
1169
|
+
* @summary Get ingredient by id
|
|
1170
|
+
* @param {string} id
|
|
1171
|
+
* @param {*} [options] Override http request option.
|
|
1172
|
+
* @throws {RequiredError}
|
|
1173
|
+
*/
|
|
1174
|
+
ingredientsV1ControllerGetIngredientById(id, options) {
|
|
1175
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1176
|
+
var _a, _b, _c;
|
|
1177
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.ingredientsV1ControllerGetIngredientById(id, options);
|
|
1178
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
1179
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['IngredientsV1Api.ingredientsV1ControllerGetIngredientById']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
1180
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1181
|
+
});
|
|
1182
|
+
},
|
|
1068
1183
|
/**
|
|
1069
1184
|
*
|
|
1070
1185
|
* @summary Get ingredients
|
|
@@ -1105,6 +1220,26 @@ export const IngredientsV1ApiFactory = function (configuration, basePath, axios)
|
|
|
1105
1220
|
ingredientsV1ControllerCreateIngredient(requestParameters, options) {
|
|
1106
1221
|
return localVarFp.ingredientsV1ControllerCreateIngredient(requestParameters.createIngredientRequestDto, options).then((request) => request(axios, basePath));
|
|
1107
1222
|
},
|
|
1223
|
+
/**
|
|
1224
|
+
*
|
|
1225
|
+
* @summary Get all ingredients
|
|
1226
|
+
* @param {IngredientsV1ApiIngredientsV1ControllerGetAllIngredientsRequest} requestParameters Request parameters.
|
|
1227
|
+
* @param {*} [options] Override http request option.
|
|
1228
|
+
* @throws {RequiredError}
|
|
1229
|
+
*/
|
|
1230
|
+
ingredientsV1ControllerGetAllIngredients(requestParameters = {}, options) {
|
|
1231
|
+
return localVarFp.ingredientsV1ControllerGetAllIngredients(requestParameters.name, requestParameters.query, requestParameters.orderBy, requestParameters.isAsc, options).then((request) => request(axios, basePath));
|
|
1232
|
+
},
|
|
1233
|
+
/**
|
|
1234
|
+
*
|
|
1235
|
+
* @summary Get ingredient by id
|
|
1236
|
+
* @param {IngredientsV1ApiIngredientsV1ControllerGetIngredientByIdRequest} requestParameters Request parameters.
|
|
1237
|
+
* @param {*} [options] Override http request option.
|
|
1238
|
+
* @throws {RequiredError}
|
|
1239
|
+
*/
|
|
1240
|
+
ingredientsV1ControllerGetIngredientById(requestParameters, options) {
|
|
1241
|
+
return localVarFp.ingredientsV1ControllerGetIngredientById(requestParameters.id, options).then((request) => request(axios, basePath));
|
|
1242
|
+
},
|
|
1108
1243
|
/**
|
|
1109
1244
|
*
|
|
1110
1245
|
* @summary Get ingredients
|
|
@@ -1135,6 +1270,28 @@ export class IngredientsV1Api extends BaseAPI {
|
|
|
1135
1270
|
ingredientsV1ControllerCreateIngredient(requestParameters, options) {
|
|
1136
1271
|
return IngredientsV1ApiFp(this.configuration).ingredientsV1ControllerCreateIngredient(requestParameters.createIngredientRequestDto, options).then((request) => request(this.axios, this.basePath));
|
|
1137
1272
|
}
|
|
1273
|
+
/**
|
|
1274
|
+
*
|
|
1275
|
+
* @summary Get all ingredients
|
|
1276
|
+
* @param {IngredientsV1ApiIngredientsV1ControllerGetAllIngredientsRequest} requestParameters Request parameters.
|
|
1277
|
+
* @param {*} [options] Override http request option.
|
|
1278
|
+
* @throws {RequiredError}
|
|
1279
|
+
* @memberof IngredientsV1Api
|
|
1280
|
+
*/
|
|
1281
|
+
ingredientsV1ControllerGetAllIngredients(requestParameters = {}, options) {
|
|
1282
|
+
return IngredientsV1ApiFp(this.configuration).ingredientsV1ControllerGetAllIngredients(requestParameters.name, requestParameters.query, requestParameters.orderBy, requestParameters.isAsc, options).then((request) => request(this.axios, this.basePath));
|
|
1283
|
+
}
|
|
1284
|
+
/**
|
|
1285
|
+
*
|
|
1286
|
+
* @summary Get ingredient by id
|
|
1287
|
+
* @param {IngredientsV1ApiIngredientsV1ControllerGetIngredientByIdRequest} requestParameters Request parameters.
|
|
1288
|
+
* @param {*} [options] Override http request option.
|
|
1289
|
+
* @throws {RequiredError}
|
|
1290
|
+
* @memberof IngredientsV1Api
|
|
1291
|
+
*/
|
|
1292
|
+
ingredientsV1ControllerGetIngredientById(requestParameters, options) {
|
|
1293
|
+
return IngredientsV1ApiFp(this.configuration).ingredientsV1ControllerGetIngredientById(requestParameters.id, options).then((request) => request(this.axios, this.basePath));
|
|
1294
|
+
}
|
|
1138
1295
|
/**
|
|
1139
1296
|
*
|
|
1140
1297
|
* @summary Get ingredients
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# GetAllIngredientsResponseDto
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
## Properties
|
|
5
|
+
|
|
6
|
+
Name | Type | Description | Notes
|
|
7
|
+
------------ | ------------- | ------------- | -------------
|
|
8
|
+
**items** | [**Array<IngredientDto>**](IngredientDto.md) | | [default to undefined]
|
|
9
|
+
**totalItems** | **number** | | [default to undefined]
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import { GetAllIngredientsResponseDto } from '@dimrev4/fitness-v3-backend-sdk';
|
|
15
|
+
|
|
16
|
+
const instance: GetAllIngredientsResponseDto = {
|
|
17
|
+
items,
|
|
18
|
+
totalItems,
|
|
19
|
+
};
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
package/docs/IngredientsV1Api.md
CHANGED
|
@@ -5,6 +5,8 @@ All URIs are relative to *http://localhost*
|
|
|
5
5
|
|Method | HTTP request | Description|
|
|
6
6
|
|------------- | ------------- | -------------|
|
|
7
7
|
|[**ingredientsV1ControllerCreateIngredient**](#ingredientsv1controllercreateingredient) | **POST** /api/ingredients/v1 | Create ingredient|
|
|
8
|
+
|[**ingredientsV1ControllerGetAllIngredients**](#ingredientsv1controllergetallingredients) | **GET** /api/ingredients/v1/all | Get all ingredients|
|
|
9
|
+
|[**ingredientsV1ControllerGetIngredientById**](#ingredientsv1controllergetingredientbyid) | **GET** /api/ingredients/v1/{id} | Get ingredient by id|
|
|
8
10
|
|[**ingredientsV1ControllerGetIngredients**](#ingredientsv1controllergetingredients) | **GET** /api/ingredients/v1 | Get ingredients|
|
|
9
11
|
|
|
10
12
|
# **ingredientsV1ControllerCreateIngredient**
|
|
@@ -61,6 +63,121 @@ const { status, data } = await apiInstance.ingredientsV1ControllerCreateIngredie
|
|
|
61
63
|
|
|
62
64
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
63
65
|
|
|
66
|
+
# **ingredientsV1ControllerGetAllIngredients**
|
|
67
|
+
> GetAllIngredientsResponseDto ingredientsV1ControllerGetAllIngredients()
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
### Example
|
|
71
|
+
|
|
72
|
+
```typescript
|
|
73
|
+
import {
|
|
74
|
+
IngredientsV1Api,
|
|
75
|
+
Configuration
|
|
76
|
+
} from '@dimrev4/fitness-v3-backend-sdk';
|
|
77
|
+
|
|
78
|
+
const configuration = new Configuration();
|
|
79
|
+
const apiInstance = new IngredientsV1Api(configuration);
|
|
80
|
+
|
|
81
|
+
let name: string; //Ingredient name (optional) (default to undefined)
|
|
82
|
+
let query: string; //Ingredient query (optional) (default to undefined)
|
|
83
|
+
let orderBy: string; //Order by (optional) (default to undefined)
|
|
84
|
+
let isAsc: boolean; //Sort order direction (true for ascending, false for descending) (optional) (default to undefined)
|
|
85
|
+
|
|
86
|
+
const { status, data } = await apiInstance.ingredientsV1ControllerGetAllIngredients(
|
|
87
|
+
name,
|
|
88
|
+
query,
|
|
89
|
+
orderBy,
|
|
90
|
+
isAsc
|
|
91
|
+
);
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
### Parameters
|
|
95
|
+
|
|
96
|
+
|Name | Type | Description | Notes|
|
|
97
|
+
|------------- | ------------- | ------------- | -------------|
|
|
98
|
+
| **name** | [**string**] | Ingredient name | (optional) defaults to undefined|
|
|
99
|
+
| **query** | [**string**] | Ingredient query | (optional) defaults to undefined|
|
|
100
|
+
| **orderBy** | [**string**] | Order by | (optional) defaults to undefined|
|
|
101
|
+
| **isAsc** | [**boolean**] | Sort order direction (true for ascending, false for descending) | (optional) defaults to undefined|
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
### Return type
|
|
105
|
+
|
|
106
|
+
**GetAllIngredientsResponseDto**
|
|
107
|
+
|
|
108
|
+
### Authorization
|
|
109
|
+
|
|
110
|
+
[apiKey](../README.md#apiKey), [bearer](../README.md#bearer)
|
|
111
|
+
|
|
112
|
+
### HTTP request headers
|
|
113
|
+
|
|
114
|
+
- **Content-Type**: Not defined
|
|
115
|
+
- **Accept**: application/json
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
### HTTP response details
|
|
119
|
+
| Status code | Description | Response headers |
|
|
120
|
+
|-------------|-------------|------------------|
|
|
121
|
+
|**200** | | - |
|
|
122
|
+
|**400** | Invalid JWT payload structure or validation failed | - |
|
|
123
|
+
|**401** | JWT token is missing, expired, or invalid | - |
|
|
124
|
+
|**500** | Internal server error during JWT validation | - |
|
|
125
|
+
|
|
126
|
+
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
127
|
+
|
|
128
|
+
# **ingredientsV1ControllerGetIngredientById**
|
|
129
|
+
> IngredientDto ingredientsV1ControllerGetIngredientById()
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
### Example
|
|
133
|
+
|
|
134
|
+
```typescript
|
|
135
|
+
import {
|
|
136
|
+
IngredientsV1Api,
|
|
137
|
+
Configuration
|
|
138
|
+
} from '@dimrev4/fitness-v3-backend-sdk';
|
|
139
|
+
|
|
140
|
+
const configuration = new Configuration();
|
|
141
|
+
const apiInstance = new IngredientsV1Api(configuration);
|
|
142
|
+
|
|
143
|
+
let id: string; // (default to undefined)
|
|
144
|
+
|
|
145
|
+
const { status, data } = await apiInstance.ingredientsV1ControllerGetIngredientById(
|
|
146
|
+
id
|
|
147
|
+
);
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
### Parameters
|
|
151
|
+
|
|
152
|
+
|Name | Type | Description | Notes|
|
|
153
|
+
|------------- | ------------- | ------------- | -------------|
|
|
154
|
+
| **id** | [**string**] | | defaults to undefined|
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
### Return type
|
|
158
|
+
|
|
159
|
+
**IngredientDto**
|
|
160
|
+
|
|
161
|
+
### Authorization
|
|
162
|
+
|
|
163
|
+
[apiKey](../README.md#apiKey), [bearer](../README.md#bearer)
|
|
164
|
+
|
|
165
|
+
### HTTP request headers
|
|
166
|
+
|
|
167
|
+
- **Content-Type**: Not defined
|
|
168
|
+
- **Accept**: application/json
|
|
169
|
+
|
|
170
|
+
|
|
171
|
+
### HTTP response details
|
|
172
|
+
| Status code | Description | Response headers |
|
|
173
|
+
|-------------|-------------|------------------|
|
|
174
|
+
|**200** | | - |
|
|
175
|
+
|**400** | Invalid JWT payload structure or validation failed | - |
|
|
176
|
+
|**401** | JWT token is missing, expired, or invalid | - |
|
|
177
|
+
|**500** | Internal server error during JWT validation | - |
|
|
178
|
+
|
|
179
|
+
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
180
|
+
|
|
64
181
|
# **ingredientsV1ControllerGetIngredients**
|
|
65
182
|
> GetIngredientsResponseDto ingredientsV1ControllerGetIngredients()
|
|
66
183
|
|