@dimrev4/fitness-v3-backend 0.0.43 → 0.0.44
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/api.ts +114 -0
- package/dist/api.d.ts +63 -0
- package/dist/api.js +77 -0
- package/dist/esm/api.d.ts +63 -0
- package/dist/esm/api.js +77 -0
- package/docs/IngredientsV1Api.md +58 -0
- package/package.json +1 -1
package/api.ts
CHANGED
|
@@ -5550,6 +5550,53 @@ export const IngredientsV1ApiAxiosParamCreator = function (configuration?: Confi
|
|
|
5550
5550
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
5551
5551
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
5552
5552
|
|
|
5553
|
+
return {
|
|
5554
|
+
url: toPathString(localVarUrlObj),
|
|
5555
|
+
options: localVarRequestOptions,
|
|
5556
|
+
};
|
|
5557
|
+
},
|
|
5558
|
+
/**
|
|
5559
|
+
*
|
|
5560
|
+
* @summary Update ingredient
|
|
5561
|
+
* @param {string} id
|
|
5562
|
+
* @param {CreateIngredientRequestDto} createIngredientRequestDto
|
|
5563
|
+
* @param {*} [options] Override http request option.
|
|
5564
|
+
* @throws {RequiredError}
|
|
5565
|
+
*/
|
|
5566
|
+
ingredientsV1ControllerUpdateIngredient: async (id: string, createIngredientRequestDto: CreateIngredientRequestDto, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
5567
|
+
// verify required parameter 'id' is not null or undefined
|
|
5568
|
+
assertParamExists('ingredientsV1ControllerUpdateIngredient', 'id', id)
|
|
5569
|
+
// verify required parameter 'createIngredientRequestDto' is not null or undefined
|
|
5570
|
+
assertParamExists('ingredientsV1ControllerUpdateIngredient', 'createIngredientRequestDto', createIngredientRequestDto)
|
|
5571
|
+
const localVarPath = `/api/ingredients/v1/{id}`
|
|
5572
|
+
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
|
5573
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
5574
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
5575
|
+
let baseOptions;
|
|
5576
|
+
if (configuration) {
|
|
5577
|
+
baseOptions = configuration.baseOptions;
|
|
5578
|
+
}
|
|
5579
|
+
|
|
5580
|
+
const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options};
|
|
5581
|
+
const localVarHeaderParameter = {} as any;
|
|
5582
|
+
const localVarQueryParameter = {} as any;
|
|
5583
|
+
|
|
5584
|
+
// authentication apiKey required
|
|
5585
|
+
await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration)
|
|
5586
|
+
|
|
5587
|
+
// authentication bearer required
|
|
5588
|
+
// http bearer authentication required
|
|
5589
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
5590
|
+
|
|
5591
|
+
|
|
5592
|
+
|
|
5593
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
5594
|
+
|
|
5595
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
5596
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
5597
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
5598
|
+
localVarRequestOptions.data = serializeDataIfNeeded(createIngredientRequestDto, localVarRequestOptions, configuration)
|
|
5599
|
+
|
|
5553
5600
|
return {
|
|
5554
5601
|
url: toPathString(localVarUrlObj),
|
|
5555
5602
|
options: localVarRequestOptions,
|
|
@@ -5625,6 +5672,20 @@ export const IngredientsV1ApiFp = function(configuration?: Configuration) {
|
|
|
5625
5672
|
const localVarOperationServerBasePath = operationServerMap['IngredientsV1Api.ingredientsV1ControllerGetIngredients']?.[localVarOperationServerIndex]?.url;
|
|
5626
5673
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
5627
5674
|
},
|
|
5675
|
+
/**
|
|
5676
|
+
*
|
|
5677
|
+
* @summary Update ingredient
|
|
5678
|
+
* @param {string} id
|
|
5679
|
+
* @param {CreateIngredientRequestDto} createIngredientRequestDto
|
|
5680
|
+
* @param {*} [options] Override http request option.
|
|
5681
|
+
* @throws {RequiredError}
|
|
5682
|
+
*/
|
|
5683
|
+
async ingredientsV1ControllerUpdateIngredient(id: string, createIngredientRequestDto: CreateIngredientRequestDto, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<IngredientDto>> {
|
|
5684
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.ingredientsV1ControllerUpdateIngredient(id, createIngredientRequestDto, options);
|
|
5685
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
5686
|
+
const localVarOperationServerBasePath = operationServerMap['IngredientsV1Api.ingredientsV1ControllerUpdateIngredient']?.[localVarOperationServerIndex]?.url;
|
|
5687
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
5688
|
+
},
|
|
5628
5689
|
}
|
|
5629
5690
|
};
|
|
5630
5691
|
|
|
@@ -5675,6 +5736,16 @@ export const IngredientsV1ApiFactory = function (configuration?: Configuration,
|
|
|
5675
5736
|
ingredientsV1ControllerGetIngredients(requestParameters: IngredientsV1ApiIngredientsV1ControllerGetIngredientsRequest = {}, options?: RawAxiosRequestConfig): AxiosPromise<GetIngredientsResponseDto> {
|
|
5676
5737
|
return localVarFp.ingredientsV1ControllerGetIngredients(requestParameters.limit, requestParameters.offset, requestParameters.name, requestParameters.query, requestParameters.orderBy, requestParameters.isAsc, options).then((request) => request(axios, basePath));
|
|
5677
5738
|
},
|
|
5739
|
+
/**
|
|
5740
|
+
*
|
|
5741
|
+
* @summary Update ingredient
|
|
5742
|
+
* @param {IngredientsV1ApiIngredientsV1ControllerUpdateIngredientRequest} requestParameters Request parameters.
|
|
5743
|
+
* @param {*} [options] Override http request option.
|
|
5744
|
+
* @throws {RequiredError}
|
|
5745
|
+
*/
|
|
5746
|
+
ingredientsV1ControllerUpdateIngredient(requestParameters: IngredientsV1ApiIngredientsV1ControllerUpdateIngredientRequest, options?: RawAxiosRequestConfig): AxiosPromise<IngredientDto> {
|
|
5747
|
+
return localVarFp.ingredientsV1ControllerUpdateIngredient(requestParameters.id, requestParameters.createIngredientRequestDto, options).then((request) => request(axios, basePath));
|
|
5748
|
+
},
|
|
5678
5749
|
};
|
|
5679
5750
|
};
|
|
5680
5751
|
|
|
@@ -5724,6 +5795,16 @@ export interface IngredientsV1ApiInterface {
|
|
|
5724
5795
|
*/
|
|
5725
5796
|
ingredientsV1ControllerGetIngredients(requestParameters?: IngredientsV1ApiIngredientsV1ControllerGetIngredientsRequest, options?: RawAxiosRequestConfig): AxiosPromise<GetIngredientsResponseDto>;
|
|
5726
5797
|
|
|
5798
|
+
/**
|
|
5799
|
+
*
|
|
5800
|
+
* @summary Update ingredient
|
|
5801
|
+
* @param {IngredientsV1ApiIngredientsV1ControllerUpdateIngredientRequest} requestParameters Request parameters.
|
|
5802
|
+
* @param {*} [options] Override http request option.
|
|
5803
|
+
* @throws {RequiredError}
|
|
5804
|
+
* @memberof IngredientsV1ApiInterface
|
|
5805
|
+
*/
|
|
5806
|
+
ingredientsV1ControllerUpdateIngredient(requestParameters: IngredientsV1ApiIngredientsV1ControllerUpdateIngredientRequest, options?: RawAxiosRequestConfig): AxiosPromise<IngredientDto>;
|
|
5807
|
+
|
|
5727
5808
|
}
|
|
5728
5809
|
|
|
5729
5810
|
/**
|
|
@@ -5838,6 +5919,27 @@ export interface IngredientsV1ApiIngredientsV1ControllerGetIngredientsRequest {
|
|
|
5838
5919
|
readonly isAsc?: boolean
|
|
5839
5920
|
}
|
|
5840
5921
|
|
|
5922
|
+
/**
|
|
5923
|
+
* Request parameters for ingredientsV1ControllerUpdateIngredient operation in IngredientsV1Api.
|
|
5924
|
+
* @export
|
|
5925
|
+
* @interface IngredientsV1ApiIngredientsV1ControllerUpdateIngredientRequest
|
|
5926
|
+
*/
|
|
5927
|
+
export interface IngredientsV1ApiIngredientsV1ControllerUpdateIngredientRequest {
|
|
5928
|
+
/**
|
|
5929
|
+
*
|
|
5930
|
+
* @type {string}
|
|
5931
|
+
* @memberof IngredientsV1ApiIngredientsV1ControllerUpdateIngredient
|
|
5932
|
+
*/
|
|
5933
|
+
readonly id: string
|
|
5934
|
+
|
|
5935
|
+
/**
|
|
5936
|
+
*
|
|
5937
|
+
* @type {CreateIngredientRequestDto}
|
|
5938
|
+
* @memberof IngredientsV1ApiIngredientsV1ControllerUpdateIngredient
|
|
5939
|
+
*/
|
|
5940
|
+
readonly createIngredientRequestDto: CreateIngredientRequestDto
|
|
5941
|
+
}
|
|
5942
|
+
|
|
5841
5943
|
/**
|
|
5842
5944
|
* IngredientsV1Api - object-oriented interface
|
|
5843
5945
|
* @export
|
|
@@ -5892,6 +5994,18 @@ export class IngredientsV1Api extends BaseAPI implements IngredientsV1ApiInterfa
|
|
|
5892
5994
|
public ingredientsV1ControllerGetIngredients(requestParameters: IngredientsV1ApiIngredientsV1ControllerGetIngredientsRequest = {}, options?: RawAxiosRequestConfig) {
|
|
5893
5995
|
return IngredientsV1ApiFp(this.configuration).ingredientsV1ControllerGetIngredients(requestParameters.limit, requestParameters.offset, requestParameters.name, requestParameters.query, requestParameters.orderBy, requestParameters.isAsc, options).then((request) => request(this.axios, this.basePath));
|
|
5894
5996
|
}
|
|
5997
|
+
|
|
5998
|
+
/**
|
|
5999
|
+
*
|
|
6000
|
+
* @summary Update ingredient
|
|
6001
|
+
* @param {IngredientsV1ApiIngredientsV1ControllerUpdateIngredientRequest} requestParameters Request parameters.
|
|
6002
|
+
* @param {*} [options] Override http request option.
|
|
6003
|
+
* @throws {RequiredError}
|
|
6004
|
+
* @memberof IngredientsV1Api
|
|
6005
|
+
*/
|
|
6006
|
+
public ingredientsV1ControllerUpdateIngredient(requestParameters: IngredientsV1ApiIngredientsV1ControllerUpdateIngredientRequest, options?: RawAxiosRequestConfig) {
|
|
6007
|
+
return IngredientsV1ApiFp(this.configuration).ingredientsV1ControllerUpdateIngredient(requestParameters.id, requestParameters.createIngredientRequestDto, options).then((request) => request(this.axios, this.basePath));
|
|
6008
|
+
}
|
|
5895
6009
|
}
|
|
5896
6010
|
|
|
5897
6011
|
|
package/dist/api.d.ts
CHANGED
|
@@ -4373,6 +4373,15 @@ export declare const IngredientsV1ApiAxiosParamCreator: (configuration?: Configu
|
|
|
4373
4373
|
* @throws {RequiredError}
|
|
4374
4374
|
*/
|
|
4375
4375
|
ingredientsV1ControllerGetIngredients: (limit?: number, offset?: number, name?: string, query?: string, orderBy?: string, isAsc?: boolean, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
4376
|
+
/**
|
|
4377
|
+
*
|
|
4378
|
+
* @summary Update ingredient
|
|
4379
|
+
* @param {string} id
|
|
4380
|
+
* @param {CreateIngredientRequestDto} createIngredientRequestDto
|
|
4381
|
+
* @param {*} [options] Override http request option.
|
|
4382
|
+
* @throws {RequiredError}
|
|
4383
|
+
*/
|
|
4384
|
+
ingredientsV1ControllerUpdateIngredient: (id: string, createIngredientRequestDto: CreateIngredientRequestDto, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
4376
4385
|
};
|
|
4377
4386
|
/**
|
|
4378
4387
|
* IngredientsV1Api - functional programming interface
|
|
@@ -4419,6 +4428,15 @@ export declare const IngredientsV1ApiFp: (configuration?: Configuration) => {
|
|
|
4419
4428
|
* @throws {RequiredError}
|
|
4420
4429
|
*/
|
|
4421
4430
|
ingredientsV1ControllerGetIngredients(limit?: number, offset?: number, name?: string, query?: string, orderBy?: string, isAsc?: boolean, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetIngredientsResponseDto>>;
|
|
4431
|
+
/**
|
|
4432
|
+
*
|
|
4433
|
+
* @summary Update ingredient
|
|
4434
|
+
* @param {string} id
|
|
4435
|
+
* @param {CreateIngredientRequestDto} createIngredientRequestDto
|
|
4436
|
+
* @param {*} [options] Override http request option.
|
|
4437
|
+
* @throws {RequiredError}
|
|
4438
|
+
*/
|
|
4439
|
+
ingredientsV1ControllerUpdateIngredient(id: string, createIngredientRequestDto: CreateIngredientRequestDto, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<IngredientDto>>;
|
|
4422
4440
|
};
|
|
4423
4441
|
/**
|
|
4424
4442
|
* IngredientsV1Api - factory interface
|
|
@@ -4457,6 +4475,14 @@ export declare const IngredientsV1ApiFactory: (configuration?: Configuration, ba
|
|
|
4457
4475
|
* @throws {RequiredError}
|
|
4458
4476
|
*/
|
|
4459
4477
|
ingredientsV1ControllerGetIngredients(requestParameters?: IngredientsV1ApiIngredientsV1ControllerGetIngredientsRequest, options?: RawAxiosRequestConfig): AxiosPromise<GetIngredientsResponseDto>;
|
|
4478
|
+
/**
|
|
4479
|
+
*
|
|
4480
|
+
* @summary Update ingredient
|
|
4481
|
+
* @param {IngredientsV1ApiIngredientsV1ControllerUpdateIngredientRequest} requestParameters Request parameters.
|
|
4482
|
+
* @param {*} [options] Override http request option.
|
|
4483
|
+
* @throws {RequiredError}
|
|
4484
|
+
*/
|
|
4485
|
+
ingredientsV1ControllerUpdateIngredient(requestParameters: IngredientsV1ApiIngredientsV1ControllerUpdateIngredientRequest, options?: RawAxiosRequestConfig): AxiosPromise<IngredientDto>;
|
|
4460
4486
|
};
|
|
4461
4487
|
/**
|
|
4462
4488
|
* IngredientsV1Api - interface
|
|
@@ -4500,6 +4526,15 @@ export interface IngredientsV1ApiInterface {
|
|
|
4500
4526
|
* @memberof IngredientsV1ApiInterface
|
|
4501
4527
|
*/
|
|
4502
4528
|
ingredientsV1ControllerGetIngredients(requestParameters?: IngredientsV1ApiIngredientsV1ControllerGetIngredientsRequest, options?: RawAxiosRequestConfig): AxiosPromise<GetIngredientsResponseDto>;
|
|
4529
|
+
/**
|
|
4530
|
+
*
|
|
4531
|
+
* @summary Update ingredient
|
|
4532
|
+
* @param {IngredientsV1ApiIngredientsV1ControllerUpdateIngredientRequest} requestParameters Request parameters.
|
|
4533
|
+
* @param {*} [options] Override http request option.
|
|
4534
|
+
* @throws {RequiredError}
|
|
4535
|
+
* @memberof IngredientsV1ApiInterface
|
|
4536
|
+
*/
|
|
4537
|
+
ingredientsV1ControllerUpdateIngredient(requestParameters: IngredientsV1ApiIngredientsV1ControllerUpdateIngredientRequest, options?: RawAxiosRequestConfig): AxiosPromise<IngredientDto>;
|
|
4503
4538
|
}
|
|
4504
4539
|
/**
|
|
4505
4540
|
* Request parameters for ingredientsV1ControllerCreateIngredient operation in IngredientsV1Api.
|
|
@@ -4601,6 +4636,25 @@ export interface IngredientsV1ApiIngredientsV1ControllerGetIngredientsRequest {
|
|
|
4601
4636
|
*/
|
|
4602
4637
|
readonly isAsc?: boolean;
|
|
4603
4638
|
}
|
|
4639
|
+
/**
|
|
4640
|
+
* Request parameters for ingredientsV1ControllerUpdateIngredient operation in IngredientsV1Api.
|
|
4641
|
+
* @export
|
|
4642
|
+
* @interface IngredientsV1ApiIngredientsV1ControllerUpdateIngredientRequest
|
|
4643
|
+
*/
|
|
4644
|
+
export interface IngredientsV1ApiIngredientsV1ControllerUpdateIngredientRequest {
|
|
4645
|
+
/**
|
|
4646
|
+
*
|
|
4647
|
+
* @type {string}
|
|
4648
|
+
* @memberof IngredientsV1ApiIngredientsV1ControllerUpdateIngredient
|
|
4649
|
+
*/
|
|
4650
|
+
readonly id: string;
|
|
4651
|
+
/**
|
|
4652
|
+
*
|
|
4653
|
+
* @type {CreateIngredientRequestDto}
|
|
4654
|
+
* @memberof IngredientsV1ApiIngredientsV1ControllerUpdateIngredient
|
|
4655
|
+
*/
|
|
4656
|
+
readonly createIngredientRequestDto: CreateIngredientRequestDto;
|
|
4657
|
+
}
|
|
4604
4658
|
/**
|
|
4605
4659
|
* IngredientsV1Api - object-oriented interface
|
|
4606
4660
|
* @export
|
|
@@ -4644,6 +4698,15 @@ export declare class IngredientsV1Api extends BaseAPI implements IngredientsV1Ap
|
|
|
4644
4698
|
* @memberof IngredientsV1Api
|
|
4645
4699
|
*/
|
|
4646
4700
|
ingredientsV1ControllerGetIngredients(requestParameters?: IngredientsV1ApiIngredientsV1ControllerGetIngredientsRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<GetIngredientsResponseDto, any, {}>>;
|
|
4701
|
+
/**
|
|
4702
|
+
*
|
|
4703
|
+
* @summary Update ingredient
|
|
4704
|
+
* @param {IngredientsV1ApiIngredientsV1ControllerUpdateIngredientRequest} requestParameters Request parameters.
|
|
4705
|
+
* @param {*} [options] Override http request option.
|
|
4706
|
+
* @throws {RequiredError}
|
|
4707
|
+
* @memberof IngredientsV1Api
|
|
4708
|
+
*/
|
|
4709
|
+
ingredientsV1ControllerUpdateIngredient(requestParameters: IngredientsV1ApiIngredientsV1ControllerUpdateIngredientRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<IngredientDto, any, {}>>;
|
|
4647
4710
|
}
|
|
4648
4711
|
/**
|
|
4649
4712
|
* MeasurementsV1Api - axios parameter creator
|
package/dist/api.js
CHANGED
|
@@ -1959,6 +1959,45 @@ const IngredientsV1ApiAxiosParamCreator = function (configuration) {
|
|
|
1959
1959
|
options: localVarRequestOptions,
|
|
1960
1960
|
};
|
|
1961
1961
|
}),
|
|
1962
|
+
/**
|
|
1963
|
+
*
|
|
1964
|
+
* @summary Update ingredient
|
|
1965
|
+
* @param {string} id
|
|
1966
|
+
* @param {CreateIngredientRequestDto} createIngredientRequestDto
|
|
1967
|
+
* @param {*} [options] Override http request option.
|
|
1968
|
+
* @throws {RequiredError}
|
|
1969
|
+
*/
|
|
1970
|
+
ingredientsV1ControllerUpdateIngredient: (id_1, createIngredientRequestDto_1, ...args_1) => __awaiter(this, [id_1, createIngredientRequestDto_1, ...args_1], void 0, function* (id, createIngredientRequestDto, options = {}) {
|
|
1971
|
+
// verify required parameter 'id' is not null or undefined
|
|
1972
|
+
(0, common_1.assertParamExists)('ingredientsV1ControllerUpdateIngredient', 'id', id);
|
|
1973
|
+
// verify required parameter 'createIngredientRequestDto' is not null or undefined
|
|
1974
|
+
(0, common_1.assertParamExists)('ingredientsV1ControllerUpdateIngredient', 'createIngredientRequestDto', createIngredientRequestDto);
|
|
1975
|
+
const localVarPath = `/api/ingredients/v1/{id}`
|
|
1976
|
+
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
|
1977
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1978
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
1979
|
+
let baseOptions;
|
|
1980
|
+
if (configuration) {
|
|
1981
|
+
baseOptions = configuration.baseOptions;
|
|
1982
|
+
}
|
|
1983
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'PUT' }, baseOptions), options);
|
|
1984
|
+
const localVarHeaderParameter = {};
|
|
1985
|
+
const localVarQueryParameter = {};
|
|
1986
|
+
// authentication apiKey required
|
|
1987
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-api-key", configuration);
|
|
1988
|
+
// authentication bearer required
|
|
1989
|
+
// http bearer authentication required
|
|
1990
|
+
yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
|
|
1991
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
1992
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
1993
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1994
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
1995
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(createIngredientRequestDto, localVarRequestOptions, configuration);
|
|
1996
|
+
return {
|
|
1997
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
1998
|
+
options: localVarRequestOptions,
|
|
1999
|
+
};
|
|
2000
|
+
}),
|
|
1962
2001
|
};
|
|
1963
2002
|
};
|
|
1964
2003
|
exports.IngredientsV1ApiAxiosParamCreator = IngredientsV1ApiAxiosParamCreator;
|
|
@@ -2041,6 +2080,23 @@ const IngredientsV1ApiFp = function (configuration) {
|
|
|
2041
2080
|
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
2042
2081
|
});
|
|
2043
2082
|
},
|
|
2083
|
+
/**
|
|
2084
|
+
*
|
|
2085
|
+
* @summary Update ingredient
|
|
2086
|
+
* @param {string} id
|
|
2087
|
+
* @param {CreateIngredientRequestDto} createIngredientRequestDto
|
|
2088
|
+
* @param {*} [options] Override http request option.
|
|
2089
|
+
* @throws {RequiredError}
|
|
2090
|
+
*/
|
|
2091
|
+
ingredientsV1ControllerUpdateIngredient(id, createIngredientRequestDto, options) {
|
|
2092
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2093
|
+
var _a, _b, _c;
|
|
2094
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.ingredientsV1ControllerUpdateIngredient(id, createIngredientRequestDto, options);
|
|
2095
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
2096
|
+
const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['IngredientsV1Api.ingredientsV1ControllerUpdateIngredient']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
2097
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
2098
|
+
});
|
|
2099
|
+
},
|
|
2044
2100
|
};
|
|
2045
2101
|
};
|
|
2046
2102
|
exports.IngredientsV1ApiFp = IngredientsV1ApiFp;
|
|
@@ -2091,6 +2147,16 @@ const IngredientsV1ApiFactory = function (configuration, basePath, axios) {
|
|
|
2091
2147
|
ingredientsV1ControllerGetIngredients(requestParameters = {}, options) {
|
|
2092
2148
|
return localVarFp.ingredientsV1ControllerGetIngredients(requestParameters.limit, requestParameters.offset, requestParameters.name, requestParameters.query, requestParameters.orderBy, requestParameters.isAsc, options).then((request) => request(axios, basePath));
|
|
2093
2149
|
},
|
|
2150
|
+
/**
|
|
2151
|
+
*
|
|
2152
|
+
* @summary Update ingredient
|
|
2153
|
+
* @param {IngredientsV1ApiIngredientsV1ControllerUpdateIngredientRequest} requestParameters Request parameters.
|
|
2154
|
+
* @param {*} [options] Override http request option.
|
|
2155
|
+
* @throws {RequiredError}
|
|
2156
|
+
*/
|
|
2157
|
+
ingredientsV1ControllerUpdateIngredient(requestParameters, options) {
|
|
2158
|
+
return localVarFp.ingredientsV1ControllerUpdateIngredient(requestParameters.id, requestParameters.createIngredientRequestDto, options).then((request) => request(axios, basePath));
|
|
2159
|
+
},
|
|
2094
2160
|
};
|
|
2095
2161
|
};
|
|
2096
2162
|
exports.IngredientsV1ApiFactory = IngredientsV1ApiFactory;
|
|
@@ -2145,6 +2211,17 @@ class IngredientsV1Api extends base_1.BaseAPI {
|
|
|
2145
2211
|
ingredientsV1ControllerGetIngredients(requestParameters = {}, options) {
|
|
2146
2212
|
return (0, exports.IngredientsV1ApiFp)(this.configuration).ingredientsV1ControllerGetIngredients(requestParameters.limit, requestParameters.offset, requestParameters.name, requestParameters.query, requestParameters.orderBy, requestParameters.isAsc, options).then((request) => request(this.axios, this.basePath));
|
|
2147
2213
|
}
|
|
2214
|
+
/**
|
|
2215
|
+
*
|
|
2216
|
+
* @summary Update ingredient
|
|
2217
|
+
* @param {IngredientsV1ApiIngredientsV1ControllerUpdateIngredientRequest} requestParameters Request parameters.
|
|
2218
|
+
* @param {*} [options] Override http request option.
|
|
2219
|
+
* @throws {RequiredError}
|
|
2220
|
+
* @memberof IngredientsV1Api
|
|
2221
|
+
*/
|
|
2222
|
+
ingredientsV1ControllerUpdateIngredient(requestParameters, options) {
|
|
2223
|
+
return (0, exports.IngredientsV1ApiFp)(this.configuration).ingredientsV1ControllerUpdateIngredient(requestParameters.id, requestParameters.createIngredientRequestDto, options).then((request) => request(this.axios, this.basePath));
|
|
2224
|
+
}
|
|
2148
2225
|
}
|
|
2149
2226
|
exports.IngredientsV1Api = IngredientsV1Api;
|
|
2150
2227
|
/**
|
package/dist/esm/api.d.ts
CHANGED
|
@@ -4373,6 +4373,15 @@ export declare const IngredientsV1ApiAxiosParamCreator: (configuration?: Configu
|
|
|
4373
4373
|
* @throws {RequiredError}
|
|
4374
4374
|
*/
|
|
4375
4375
|
ingredientsV1ControllerGetIngredients: (limit?: number, offset?: number, name?: string, query?: string, orderBy?: string, isAsc?: boolean, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
4376
|
+
/**
|
|
4377
|
+
*
|
|
4378
|
+
* @summary Update ingredient
|
|
4379
|
+
* @param {string} id
|
|
4380
|
+
* @param {CreateIngredientRequestDto} createIngredientRequestDto
|
|
4381
|
+
* @param {*} [options] Override http request option.
|
|
4382
|
+
* @throws {RequiredError}
|
|
4383
|
+
*/
|
|
4384
|
+
ingredientsV1ControllerUpdateIngredient: (id: string, createIngredientRequestDto: CreateIngredientRequestDto, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
4376
4385
|
};
|
|
4377
4386
|
/**
|
|
4378
4387
|
* IngredientsV1Api - functional programming interface
|
|
@@ -4419,6 +4428,15 @@ export declare const IngredientsV1ApiFp: (configuration?: Configuration) => {
|
|
|
4419
4428
|
* @throws {RequiredError}
|
|
4420
4429
|
*/
|
|
4421
4430
|
ingredientsV1ControllerGetIngredients(limit?: number, offset?: number, name?: string, query?: string, orderBy?: string, isAsc?: boolean, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetIngredientsResponseDto>>;
|
|
4431
|
+
/**
|
|
4432
|
+
*
|
|
4433
|
+
* @summary Update ingredient
|
|
4434
|
+
* @param {string} id
|
|
4435
|
+
* @param {CreateIngredientRequestDto} createIngredientRequestDto
|
|
4436
|
+
* @param {*} [options] Override http request option.
|
|
4437
|
+
* @throws {RequiredError}
|
|
4438
|
+
*/
|
|
4439
|
+
ingredientsV1ControllerUpdateIngredient(id: string, createIngredientRequestDto: CreateIngredientRequestDto, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<IngredientDto>>;
|
|
4422
4440
|
};
|
|
4423
4441
|
/**
|
|
4424
4442
|
* IngredientsV1Api - factory interface
|
|
@@ -4457,6 +4475,14 @@ export declare const IngredientsV1ApiFactory: (configuration?: Configuration, ba
|
|
|
4457
4475
|
* @throws {RequiredError}
|
|
4458
4476
|
*/
|
|
4459
4477
|
ingredientsV1ControllerGetIngredients(requestParameters?: IngredientsV1ApiIngredientsV1ControllerGetIngredientsRequest, options?: RawAxiosRequestConfig): AxiosPromise<GetIngredientsResponseDto>;
|
|
4478
|
+
/**
|
|
4479
|
+
*
|
|
4480
|
+
* @summary Update ingredient
|
|
4481
|
+
* @param {IngredientsV1ApiIngredientsV1ControllerUpdateIngredientRequest} requestParameters Request parameters.
|
|
4482
|
+
* @param {*} [options] Override http request option.
|
|
4483
|
+
* @throws {RequiredError}
|
|
4484
|
+
*/
|
|
4485
|
+
ingredientsV1ControllerUpdateIngredient(requestParameters: IngredientsV1ApiIngredientsV1ControllerUpdateIngredientRequest, options?: RawAxiosRequestConfig): AxiosPromise<IngredientDto>;
|
|
4460
4486
|
};
|
|
4461
4487
|
/**
|
|
4462
4488
|
* IngredientsV1Api - interface
|
|
@@ -4500,6 +4526,15 @@ export interface IngredientsV1ApiInterface {
|
|
|
4500
4526
|
* @memberof IngredientsV1ApiInterface
|
|
4501
4527
|
*/
|
|
4502
4528
|
ingredientsV1ControllerGetIngredients(requestParameters?: IngredientsV1ApiIngredientsV1ControllerGetIngredientsRequest, options?: RawAxiosRequestConfig): AxiosPromise<GetIngredientsResponseDto>;
|
|
4529
|
+
/**
|
|
4530
|
+
*
|
|
4531
|
+
* @summary Update ingredient
|
|
4532
|
+
* @param {IngredientsV1ApiIngredientsV1ControllerUpdateIngredientRequest} requestParameters Request parameters.
|
|
4533
|
+
* @param {*} [options] Override http request option.
|
|
4534
|
+
* @throws {RequiredError}
|
|
4535
|
+
* @memberof IngredientsV1ApiInterface
|
|
4536
|
+
*/
|
|
4537
|
+
ingredientsV1ControllerUpdateIngredient(requestParameters: IngredientsV1ApiIngredientsV1ControllerUpdateIngredientRequest, options?: RawAxiosRequestConfig): AxiosPromise<IngredientDto>;
|
|
4503
4538
|
}
|
|
4504
4539
|
/**
|
|
4505
4540
|
* Request parameters for ingredientsV1ControllerCreateIngredient operation in IngredientsV1Api.
|
|
@@ -4601,6 +4636,25 @@ export interface IngredientsV1ApiIngredientsV1ControllerGetIngredientsRequest {
|
|
|
4601
4636
|
*/
|
|
4602
4637
|
readonly isAsc?: boolean;
|
|
4603
4638
|
}
|
|
4639
|
+
/**
|
|
4640
|
+
* Request parameters for ingredientsV1ControllerUpdateIngredient operation in IngredientsV1Api.
|
|
4641
|
+
* @export
|
|
4642
|
+
* @interface IngredientsV1ApiIngredientsV1ControllerUpdateIngredientRequest
|
|
4643
|
+
*/
|
|
4644
|
+
export interface IngredientsV1ApiIngredientsV1ControllerUpdateIngredientRequest {
|
|
4645
|
+
/**
|
|
4646
|
+
*
|
|
4647
|
+
* @type {string}
|
|
4648
|
+
* @memberof IngredientsV1ApiIngredientsV1ControllerUpdateIngredient
|
|
4649
|
+
*/
|
|
4650
|
+
readonly id: string;
|
|
4651
|
+
/**
|
|
4652
|
+
*
|
|
4653
|
+
* @type {CreateIngredientRequestDto}
|
|
4654
|
+
* @memberof IngredientsV1ApiIngredientsV1ControllerUpdateIngredient
|
|
4655
|
+
*/
|
|
4656
|
+
readonly createIngredientRequestDto: CreateIngredientRequestDto;
|
|
4657
|
+
}
|
|
4604
4658
|
/**
|
|
4605
4659
|
* IngredientsV1Api - object-oriented interface
|
|
4606
4660
|
* @export
|
|
@@ -4644,6 +4698,15 @@ export declare class IngredientsV1Api extends BaseAPI implements IngredientsV1Ap
|
|
|
4644
4698
|
* @memberof IngredientsV1Api
|
|
4645
4699
|
*/
|
|
4646
4700
|
ingredientsV1ControllerGetIngredients(requestParameters?: IngredientsV1ApiIngredientsV1ControllerGetIngredientsRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<GetIngredientsResponseDto, any, {}>>;
|
|
4701
|
+
/**
|
|
4702
|
+
*
|
|
4703
|
+
* @summary Update ingredient
|
|
4704
|
+
* @param {IngredientsV1ApiIngredientsV1ControllerUpdateIngredientRequest} requestParameters Request parameters.
|
|
4705
|
+
* @param {*} [options] Override http request option.
|
|
4706
|
+
* @throws {RequiredError}
|
|
4707
|
+
* @memberof IngredientsV1Api
|
|
4708
|
+
*/
|
|
4709
|
+
ingredientsV1ControllerUpdateIngredient(requestParameters: IngredientsV1ApiIngredientsV1ControllerUpdateIngredientRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<IngredientDto, any, {}>>;
|
|
4647
4710
|
}
|
|
4648
4711
|
/**
|
|
4649
4712
|
* MeasurementsV1Api - axios parameter creator
|
package/dist/esm/api.js
CHANGED
|
@@ -1943,6 +1943,45 @@ export const IngredientsV1ApiAxiosParamCreator = function (configuration) {
|
|
|
1943
1943
|
options: localVarRequestOptions,
|
|
1944
1944
|
};
|
|
1945
1945
|
}),
|
|
1946
|
+
/**
|
|
1947
|
+
*
|
|
1948
|
+
* @summary Update ingredient
|
|
1949
|
+
* @param {string} id
|
|
1950
|
+
* @param {CreateIngredientRequestDto} createIngredientRequestDto
|
|
1951
|
+
* @param {*} [options] Override http request option.
|
|
1952
|
+
* @throws {RequiredError}
|
|
1953
|
+
*/
|
|
1954
|
+
ingredientsV1ControllerUpdateIngredient: (id_1, createIngredientRequestDto_1, ...args_1) => __awaiter(this, [id_1, createIngredientRequestDto_1, ...args_1], void 0, function* (id, createIngredientRequestDto, options = {}) {
|
|
1955
|
+
// verify required parameter 'id' is not null or undefined
|
|
1956
|
+
assertParamExists('ingredientsV1ControllerUpdateIngredient', 'id', id);
|
|
1957
|
+
// verify required parameter 'createIngredientRequestDto' is not null or undefined
|
|
1958
|
+
assertParamExists('ingredientsV1ControllerUpdateIngredient', 'createIngredientRequestDto', createIngredientRequestDto);
|
|
1959
|
+
const localVarPath = `/api/ingredients/v1/{id}`
|
|
1960
|
+
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
|
1961
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1962
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
1963
|
+
let baseOptions;
|
|
1964
|
+
if (configuration) {
|
|
1965
|
+
baseOptions = configuration.baseOptions;
|
|
1966
|
+
}
|
|
1967
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'PUT' }, baseOptions), options);
|
|
1968
|
+
const localVarHeaderParameter = {};
|
|
1969
|
+
const localVarQueryParameter = {};
|
|
1970
|
+
// authentication apiKey required
|
|
1971
|
+
yield setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration);
|
|
1972
|
+
// authentication bearer required
|
|
1973
|
+
// http bearer authentication required
|
|
1974
|
+
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
1975
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
1976
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
1977
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1978
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
1979
|
+
localVarRequestOptions.data = serializeDataIfNeeded(createIngredientRequestDto, localVarRequestOptions, configuration);
|
|
1980
|
+
return {
|
|
1981
|
+
url: toPathString(localVarUrlObj),
|
|
1982
|
+
options: localVarRequestOptions,
|
|
1983
|
+
};
|
|
1984
|
+
}),
|
|
1946
1985
|
};
|
|
1947
1986
|
};
|
|
1948
1987
|
/**
|
|
@@ -2024,6 +2063,23 @@ export const IngredientsV1ApiFp = function (configuration) {
|
|
|
2024
2063
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
2025
2064
|
});
|
|
2026
2065
|
},
|
|
2066
|
+
/**
|
|
2067
|
+
*
|
|
2068
|
+
* @summary Update ingredient
|
|
2069
|
+
* @param {string} id
|
|
2070
|
+
* @param {CreateIngredientRequestDto} createIngredientRequestDto
|
|
2071
|
+
* @param {*} [options] Override http request option.
|
|
2072
|
+
* @throws {RequiredError}
|
|
2073
|
+
*/
|
|
2074
|
+
ingredientsV1ControllerUpdateIngredient(id, createIngredientRequestDto, options) {
|
|
2075
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2076
|
+
var _a, _b, _c;
|
|
2077
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.ingredientsV1ControllerUpdateIngredient(id, createIngredientRequestDto, options);
|
|
2078
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
2079
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['IngredientsV1Api.ingredientsV1ControllerUpdateIngredient']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
2080
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
2081
|
+
});
|
|
2082
|
+
},
|
|
2027
2083
|
};
|
|
2028
2084
|
};
|
|
2029
2085
|
/**
|
|
@@ -2073,6 +2129,16 @@ export const IngredientsV1ApiFactory = function (configuration, basePath, axios)
|
|
|
2073
2129
|
ingredientsV1ControllerGetIngredients(requestParameters = {}, options) {
|
|
2074
2130
|
return localVarFp.ingredientsV1ControllerGetIngredients(requestParameters.limit, requestParameters.offset, requestParameters.name, requestParameters.query, requestParameters.orderBy, requestParameters.isAsc, options).then((request) => request(axios, basePath));
|
|
2075
2131
|
},
|
|
2132
|
+
/**
|
|
2133
|
+
*
|
|
2134
|
+
* @summary Update ingredient
|
|
2135
|
+
* @param {IngredientsV1ApiIngredientsV1ControllerUpdateIngredientRequest} requestParameters Request parameters.
|
|
2136
|
+
* @param {*} [options] Override http request option.
|
|
2137
|
+
* @throws {RequiredError}
|
|
2138
|
+
*/
|
|
2139
|
+
ingredientsV1ControllerUpdateIngredient(requestParameters, options) {
|
|
2140
|
+
return localVarFp.ingredientsV1ControllerUpdateIngredient(requestParameters.id, requestParameters.createIngredientRequestDto, options).then((request) => request(axios, basePath));
|
|
2141
|
+
},
|
|
2076
2142
|
};
|
|
2077
2143
|
};
|
|
2078
2144
|
/**
|
|
@@ -2126,6 +2192,17 @@ export class IngredientsV1Api extends BaseAPI {
|
|
|
2126
2192
|
ingredientsV1ControllerGetIngredients(requestParameters = {}, options) {
|
|
2127
2193
|
return IngredientsV1ApiFp(this.configuration).ingredientsV1ControllerGetIngredients(requestParameters.limit, requestParameters.offset, requestParameters.name, requestParameters.query, requestParameters.orderBy, requestParameters.isAsc, options).then((request) => request(this.axios, this.basePath));
|
|
2128
2194
|
}
|
|
2195
|
+
/**
|
|
2196
|
+
*
|
|
2197
|
+
* @summary Update ingredient
|
|
2198
|
+
* @param {IngredientsV1ApiIngredientsV1ControllerUpdateIngredientRequest} requestParameters Request parameters.
|
|
2199
|
+
* @param {*} [options] Override http request option.
|
|
2200
|
+
* @throws {RequiredError}
|
|
2201
|
+
* @memberof IngredientsV1Api
|
|
2202
|
+
*/
|
|
2203
|
+
ingredientsV1ControllerUpdateIngredient(requestParameters, options) {
|
|
2204
|
+
return IngredientsV1ApiFp(this.configuration).ingredientsV1ControllerUpdateIngredient(requestParameters.id, requestParameters.createIngredientRequestDto, options).then((request) => request(this.axios, this.basePath));
|
|
2205
|
+
}
|
|
2129
2206
|
}
|
|
2130
2207
|
/**
|
|
2131
2208
|
* MeasurementsV1Api - axios parameter creator
|
package/docs/IngredientsV1Api.md
CHANGED
|
@@ -8,6 +8,7 @@ All URIs are relative to *http://localhost*
|
|
|
8
8
|
|[**ingredientsV1ControllerGetAllIngredients**](#ingredientsv1controllergetallingredients) | **GET** /api/ingredients/v1/all | Get all ingredients|
|
|
9
9
|
|[**ingredientsV1ControllerGetIngredientById**](#ingredientsv1controllergetingredientbyid) | **GET** /api/ingredients/v1/{id} | Get ingredient by id|
|
|
10
10
|
|[**ingredientsV1ControllerGetIngredients**](#ingredientsv1controllergetingredients) | **GET** /api/ingredients/v1 | Get ingredients|
|
|
11
|
+
|[**ingredientsV1ControllerUpdateIngredient**](#ingredientsv1controllerupdateingredient) | **PUT** /api/ingredients/v1/{id} | Update ingredient|
|
|
11
12
|
|
|
12
13
|
# **ingredientsV1ControllerCreateIngredient**
|
|
13
14
|
> IngredientDto ingredientsV1ControllerCreateIngredient(createIngredientRequestDto)
|
|
@@ -246,3 +247,60 @@ const { status, data } = await apiInstance.ingredientsV1ControllerGetIngredients
|
|
|
246
247
|
|
|
247
248
|
[[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)
|
|
248
249
|
|
|
250
|
+
# **ingredientsV1ControllerUpdateIngredient**
|
|
251
|
+
> IngredientDto ingredientsV1ControllerUpdateIngredient(createIngredientRequestDto)
|
|
252
|
+
|
|
253
|
+
|
|
254
|
+
### Example
|
|
255
|
+
|
|
256
|
+
```typescript
|
|
257
|
+
import {
|
|
258
|
+
IngredientsV1Api,
|
|
259
|
+
Configuration,
|
|
260
|
+
CreateIngredientRequestDto
|
|
261
|
+
} from '@dimrev4/fitness-v3-backend-sdk';
|
|
262
|
+
|
|
263
|
+
const configuration = new Configuration();
|
|
264
|
+
const apiInstance = new IngredientsV1Api(configuration);
|
|
265
|
+
|
|
266
|
+
let id: string; // (default to undefined)
|
|
267
|
+
let createIngredientRequestDto: CreateIngredientRequestDto; //
|
|
268
|
+
|
|
269
|
+
const { status, data } = await apiInstance.ingredientsV1ControllerUpdateIngredient(
|
|
270
|
+
id,
|
|
271
|
+
createIngredientRequestDto
|
|
272
|
+
);
|
|
273
|
+
```
|
|
274
|
+
|
|
275
|
+
### Parameters
|
|
276
|
+
|
|
277
|
+
|Name | Type | Description | Notes|
|
|
278
|
+
|------------- | ------------- | ------------- | -------------|
|
|
279
|
+
| **createIngredientRequestDto** | **CreateIngredientRequestDto**| | |
|
|
280
|
+
| **id** | [**string**] | | defaults to undefined|
|
|
281
|
+
|
|
282
|
+
|
|
283
|
+
### Return type
|
|
284
|
+
|
|
285
|
+
**IngredientDto**
|
|
286
|
+
|
|
287
|
+
### Authorization
|
|
288
|
+
|
|
289
|
+
[apiKey](../README.md#apiKey), [bearer](../README.md#bearer)
|
|
290
|
+
|
|
291
|
+
### HTTP request headers
|
|
292
|
+
|
|
293
|
+
- **Content-Type**: application/json
|
|
294
|
+
- **Accept**: application/json
|
|
295
|
+
|
|
296
|
+
|
|
297
|
+
### HTTP response details
|
|
298
|
+
| Status code | Description | Response headers |
|
|
299
|
+
|-------------|-------------|------------------|
|
|
300
|
+
|**200** | | - |
|
|
301
|
+
|**400** | Invalid JWT payload structure or validation failed | - |
|
|
302
|
+
|**401** | JWT token is missing, expired, or invalid | - |
|
|
303
|
+
|**500** | Internal server error during JWT validation | - |
|
|
304
|
+
|
|
305
|
+
[[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)
|
|
306
|
+
|