@dimrev4/fitness-v3-backend 0.0.42 → 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 +141 -3
- package/dist/api.d.ts +87 -0
- package/dist/api.js +86 -3
- package/dist/esm/api.d.ts +87 -0
- package/dist/esm/api.js +86 -3
- package/docs/CreateExerciseRequestDto.md +2 -0
- package/docs/ExerciseDto.md +2 -0
- package/docs/ExerciseWithSetsDto.md +2 -0
- package/docs/IngredientsV1Api.md +58 -0
- package/package.json +1 -1
package/api.ts
CHANGED
|
@@ -96,13 +96,21 @@ export interface CreateExerciseRequestDto {
|
|
|
96
96
|
* @memberof CreateExerciseRequestDto
|
|
97
97
|
*/
|
|
98
98
|
'instructions': string;
|
|
99
|
+
/**
|
|
100
|
+
* Exercise image url
|
|
101
|
+
* @type {string}
|
|
102
|
+
* @memberof CreateExerciseRequestDto
|
|
103
|
+
*/
|
|
104
|
+
'imgUrl': string;
|
|
99
105
|
}
|
|
100
106
|
|
|
101
107
|
export const CreateExerciseRequestDtoTypeEnum = {
|
|
102
108
|
Cardio: 'CARDIO',
|
|
103
109
|
Strength: 'STRENGTH',
|
|
104
110
|
Flexibility: 'FLEXIBILITY',
|
|
105
|
-
BodyWeight: 'BODY_WEIGHT'
|
|
111
|
+
BodyWeight: 'BODY_WEIGHT',
|
|
112
|
+
Compound: 'COMPOUND',
|
|
113
|
+
Isolation: 'ISOLATION'
|
|
106
114
|
} as const;
|
|
107
115
|
|
|
108
116
|
export type CreateExerciseRequestDtoTypeEnum = typeof CreateExerciseRequestDtoTypeEnum[keyof typeof CreateExerciseRequestDtoTypeEnum];
|
|
@@ -650,6 +658,12 @@ export interface ExerciseDto {
|
|
|
650
658
|
* @memberof ExerciseDto
|
|
651
659
|
*/
|
|
652
660
|
'instructions': string;
|
|
661
|
+
/**
|
|
662
|
+
* Exercise image url
|
|
663
|
+
* @type {string}
|
|
664
|
+
* @memberof ExerciseDto
|
|
665
|
+
*/
|
|
666
|
+
'imgUrl': string;
|
|
653
667
|
/**
|
|
654
668
|
* Exercise created at
|
|
655
669
|
* @type {string}
|
|
@@ -674,7 +688,9 @@ export const ExerciseDtoTypeEnum = {
|
|
|
674
688
|
Cardio: 'CARDIO',
|
|
675
689
|
Strength: 'STRENGTH',
|
|
676
690
|
Flexibility: 'FLEXIBILITY',
|
|
677
|
-
BodyWeight: 'BODY_WEIGHT'
|
|
691
|
+
BodyWeight: 'BODY_WEIGHT',
|
|
692
|
+
Compound: 'COMPOUND',
|
|
693
|
+
Isolation: 'ISOLATION'
|
|
678
694
|
} as const;
|
|
679
695
|
|
|
680
696
|
export type ExerciseDtoTypeEnum = typeof ExerciseDtoTypeEnum[keyof typeof ExerciseDtoTypeEnum];
|
|
@@ -811,6 +827,12 @@ export interface ExerciseWithSetsDto {
|
|
|
811
827
|
* @memberof ExerciseWithSetsDto
|
|
812
828
|
*/
|
|
813
829
|
'completedMeta': object;
|
|
830
|
+
/**
|
|
831
|
+
* Exercise image url
|
|
832
|
+
* @type {string}
|
|
833
|
+
* @memberof ExerciseWithSetsDto
|
|
834
|
+
*/
|
|
835
|
+
'imgUrl': string;
|
|
814
836
|
/**
|
|
815
837
|
* Exercise created at
|
|
816
838
|
* @type {string}
|
|
@@ -841,7 +863,9 @@ export const ExerciseWithSetsDtoTypeEnum = {
|
|
|
841
863
|
Cardio: 'CARDIO',
|
|
842
864
|
Strength: 'STRENGTH',
|
|
843
865
|
Flexibility: 'FLEXIBILITY',
|
|
844
|
-
BodyWeight: 'BODY_WEIGHT'
|
|
866
|
+
BodyWeight: 'BODY_WEIGHT',
|
|
867
|
+
Compound: 'COMPOUND',
|
|
868
|
+
Isolation: 'ISOLATION'
|
|
845
869
|
} as const;
|
|
846
870
|
|
|
847
871
|
export type ExerciseWithSetsDtoTypeEnum = typeof ExerciseWithSetsDtoTypeEnum[keyof typeof ExerciseWithSetsDtoTypeEnum];
|
|
@@ -5526,6 +5550,53 @@ export const IngredientsV1ApiAxiosParamCreator = function (configuration?: Confi
|
|
|
5526
5550
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
5527
5551
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
5528
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
|
+
|
|
5529
5600
|
return {
|
|
5530
5601
|
url: toPathString(localVarUrlObj),
|
|
5531
5602
|
options: localVarRequestOptions,
|
|
@@ -5601,6 +5672,20 @@ export const IngredientsV1ApiFp = function(configuration?: Configuration) {
|
|
|
5601
5672
|
const localVarOperationServerBasePath = operationServerMap['IngredientsV1Api.ingredientsV1ControllerGetIngredients']?.[localVarOperationServerIndex]?.url;
|
|
5602
5673
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
5603
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
|
+
},
|
|
5604
5689
|
}
|
|
5605
5690
|
};
|
|
5606
5691
|
|
|
@@ -5651,6 +5736,16 @@ export const IngredientsV1ApiFactory = function (configuration?: Configuration,
|
|
|
5651
5736
|
ingredientsV1ControllerGetIngredients(requestParameters: IngredientsV1ApiIngredientsV1ControllerGetIngredientsRequest = {}, options?: RawAxiosRequestConfig): AxiosPromise<GetIngredientsResponseDto> {
|
|
5652
5737
|
return localVarFp.ingredientsV1ControllerGetIngredients(requestParameters.limit, requestParameters.offset, requestParameters.name, requestParameters.query, requestParameters.orderBy, requestParameters.isAsc, options).then((request) => request(axios, basePath));
|
|
5653
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
|
+
},
|
|
5654
5749
|
};
|
|
5655
5750
|
};
|
|
5656
5751
|
|
|
@@ -5700,6 +5795,16 @@ export interface IngredientsV1ApiInterface {
|
|
|
5700
5795
|
*/
|
|
5701
5796
|
ingredientsV1ControllerGetIngredients(requestParameters?: IngredientsV1ApiIngredientsV1ControllerGetIngredientsRequest, options?: RawAxiosRequestConfig): AxiosPromise<GetIngredientsResponseDto>;
|
|
5702
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
|
+
|
|
5703
5808
|
}
|
|
5704
5809
|
|
|
5705
5810
|
/**
|
|
@@ -5814,6 +5919,27 @@ export interface IngredientsV1ApiIngredientsV1ControllerGetIngredientsRequest {
|
|
|
5814
5919
|
readonly isAsc?: boolean
|
|
5815
5920
|
}
|
|
5816
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
|
+
|
|
5817
5943
|
/**
|
|
5818
5944
|
* IngredientsV1Api - object-oriented interface
|
|
5819
5945
|
* @export
|
|
@@ -5868,6 +5994,18 @@ export class IngredientsV1Api extends BaseAPI implements IngredientsV1ApiInterfa
|
|
|
5868
5994
|
public ingredientsV1ControllerGetIngredients(requestParameters: IngredientsV1ApiIngredientsV1ControllerGetIngredientsRequest = {}, options?: RawAxiosRequestConfig) {
|
|
5869
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));
|
|
5870
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
|
+
}
|
|
5871
6009
|
}
|
|
5872
6010
|
|
|
5873
6011
|
|
package/dist/api.d.ts
CHANGED
|
@@ -86,12 +86,20 @@ export interface CreateExerciseRequestDto {
|
|
|
86
86
|
* @memberof CreateExerciseRequestDto
|
|
87
87
|
*/
|
|
88
88
|
'instructions': string;
|
|
89
|
+
/**
|
|
90
|
+
* Exercise image url
|
|
91
|
+
* @type {string}
|
|
92
|
+
* @memberof CreateExerciseRequestDto
|
|
93
|
+
*/
|
|
94
|
+
'imgUrl': string;
|
|
89
95
|
}
|
|
90
96
|
export declare const CreateExerciseRequestDtoTypeEnum: {
|
|
91
97
|
readonly Cardio: "CARDIO";
|
|
92
98
|
readonly Strength: "STRENGTH";
|
|
93
99
|
readonly Flexibility: "FLEXIBILITY";
|
|
94
100
|
readonly BodyWeight: "BODY_WEIGHT";
|
|
101
|
+
readonly Compound: "COMPOUND";
|
|
102
|
+
readonly Isolation: "ISOLATION";
|
|
95
103
|
};
|
|
96
104
|
export type CreateExerciseRequestDtoTypeEnum = typeof CreateExerciseRequestDtoTypeEnum[keyof typeof CreateExerciseRequestDtoTypeEnum];
|
|
97
105
|
export declare const CreateExerciseRequestDtoBodyPartsEnum: {
|
|
@@ -622,6 +630,12 @@ export interface ExerciseDto {
|
|
|
622
630
|
* @memberof ExerciseDto
|
|
623
631
|
*/
|
|
624
632
|
'instructions': string;
|
|
633
|
+
/**
|
|
634
|
+
* Exercise image url
|
|
635
|
+
* @type {string}
|
|
636
|
+
* @memberof ExerciseDto
|
|
637
|
+
*/
|
|
638
|
+
'imgUrl': string;
|
|
625
639
|
/**
|
|
626
640
|
* Exercise created at
|
|
627
641
|
* @type {string}
|
|
@@ -646,6 +660,8 @@ export declare const ExerciseDtoTypeEnum: {
|
|
|
646
660
|
readonly Strength: "STRENGTH";
|
|
647
661
|
readonly Flexibility: "FLEXIBILITY";
|
|
648
662
|
readonly BodyWeight: "BODY_WEIGHT";
|
|
663
|
+
readonly Compound: "COMPOUND";
|
|
664
|
+
readonly Isolation: "ISOLATION";
|
|
649
665
|
};
|
|
650
666
|
export type ExerciseDtoTypeEnum = typeof ExerciseDtoTypeEnum[keyof typeof ExerciseDtoTypeEnum];
|
|
651
667
|
export declare const ExerciseDtoBodyPartsEnum: {
|
|
@@ -777,6 +793,12 @@ export interface ExerciseWithSetsDto {
|
|
|
777
793
|
* @memberof ExerciseWithSetsDto
|
|
778
794
|
*/
|
|
779
795
|
'completedMeta': object;
|
|
796
|
+
/**
|
|
797
|
+
* Exercise image url
|
|
798
|
+
* @type {string}
|
|
799
|
+
* @memberof ExerciseWithSetsDto
|
|
800
|
+
*/
|
|
801
|
+
'imgUrl': string;
|
|
780
802
|
/**
|
|
781
803
|
* Exercise created at
|
|
782
804
|
* @type {string}
|
|
@@ -807,6 +829,8 @@ export declare const ExerciseWithSetsDtoTypeEnum: {
|
|
|
807
829
|
readonly Strength: "STRENGTH";
|
|
808
830
|
readonly Flexibility: "FLEXIBILITY";
|
|
809
831
|
readonly BodyWeight: "BODY_WEIGHT";
|
|
832
|
+
readonly Compound: "COMPOUND";
|
|
833
|
+
readonly Isolation: "ISOLATION";
|
|
810
834
|
};
|
|
811
835
|
export type ExerciseWithSetsDtoTypeEnum = typeof ExerciseWithSetsDtoTypeEnum[keyof typeof ExerciseWithSetsDtoTypeEnum];
|
|
812
836
|
export declare const ExerciseWithSetsDtoBodyPartsEnum: {
|
|
@@ -4349,6 +4373,15 @@ export declare const IngredientsV1ApiAxiosParamCreator: (configuration?: Configu
|
|
|
4349
4373
|
* @throws {RequiredError}
|
|
4350
4374
|
*/
|
|
4351
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>;
|
|
4352
4385
|
};
|
|
4353
4386
|
/**
|
|
4354
4387
|
* IngredientsV1Api - functional programming interface
|
|
@@ -4395,6 +4428,15 @@ export declare const IngredientsV1ApiFp: (configuration?: Configuration) => {
|
|
|
4395
4428
|
* @throws {RequiredError}
|
|
4396
4429
|
*/
|
|
4397
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>>;
|
|
4398
4440
|
};
|
|
4399
4441
|
/**
|
|
4400
4442
|
* IngredientsV1Api - factory interface
|
|
@@ -4433,6 +4475,14 @@ export declare const IngredientsV1ApiFactory: (configuration?: Configuration, ba
|
|
|
4433
4475
|
* @throws {RequiredError}
|
|
4434
4476
|
*/
|
|
4435
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>;
|
|
4436
4486
|
};
|
|
4437
4487
|
/**
|
|
4438
4488
|
* IngredientsV1Api - interface
|
|
@@ -4476,6 +4526,15 @@ export interface IngredientsV1ApiInterface {
|
|
|
4476
4526
|
* @memberof IngredientsV1ApiInterface
|
|
4477
4527
|
*/
|
|
4478
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>;
|
|
4479
4538
|
}
|
|
4480
4539
|
/**
|
|
4481
4540
|
* Request parameters for ingredientsV1ControllerCreateIngredient operation in IngredientsV1Api.
|
|
@@ -4577,6 +4636,25 @@ export interface IngredientsV1ApiIngredientsV1ControllerGetIngredientsRequest {
|
|
|
4577
4636
|
*/
|
|
4578
4637
|
readonly isAsc?: boolean;
|
|
4579
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
|
+
}
|
|
4580
4658
|
/**
|
|
4581
4659
|
* IngredientsV1Api - object-oriented interface
|
|
4582
4660
|
* @export
|
|
@@ -4620,6 +4698,15 @@ export declare class IngredientsV1Api extends BaseAPI implements IngredientsV1Ap
|
|
|
4620
4698
|
* @memberof IngredientsV1Api
|
|
4621
4699
|
*/
|
|
4622
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, {}>>;
|
|
4623
4710
|
}
|
|
4624
4711
|
/**
|
|
4625
4712
|
* MeasurementsV1Api - axios parameter creator
|
package/dist/api.js
CHANGED
|
@@ -34,7 +34,9 @@ exports.CreateExerciseRequestDtoTypeEnum = {
|
|
|
34
34
|
Cardio: 'CARDIO',
|
|
35
35
|
Strength: 'STRENGTH',
|
|
36
36
|
Flexibility: 'FLEXIBILITY',
|
|
37
|
-
BodyWeight: 'BODY_WEIGHT'
|
|
37
|
+
BodyWeight: 'BODY_WEIGHT',
|
|
38
|
+
Compound: 'COMPOUND',
|
|
39
|
+
Isolation: 'ISOLATION'
|
|
38
40
|
};
|
|
39
41
|
exports.CreateExerciseRequestDtoBodyPartsEnum = {
|
|
40
42
|
Shoulders: 'SHOULDERS',
|
|
@@ -106,7 +108,9 @@ exports.ExerciseDtoTypeEnum = {
|
|
|
106
108
|
Cardio: 'CARDIO',
|
|
107
109
|
Strength: 'STRENGTH',
|
|
108
110
|
Flexibility: 'FLEXIBILITY',
|
|
109
|
-
BodyWeight: 'BODY_WEIGHT'
|
|
111
|
+
BodyWeight: 'BODY_WEIGHT',
|
|
112
|
+
Compound: 'COMPOUND',
|
|
113
|
+
Isolation: 'ISOLATION'
|
|
110
114
|
};
|
|
111
115
|
exports.ExerciseDtoBodyPartsEnum = {
|
|
112
116
|
Shoulders: 'SHOULDERS',
|
|
@@ -153,7 +157,9 @@ exports.ExerciseWithSetsDtoTypeEnum = {
|
|
|
153
157
|
Cardio: 'CARDIO',
|
|
154
158
|
Strength: 'STRENGTH',
|
|
155
159
|
Flexibility: 'FLEXIBILITY',
|
|
156
|
-
BodyWeight: 'BODY_WEIGHT'
|
|
160
|
+
BodyWeight: 'BODY_WEIGHT',
|
|
161
|
+
Compound: 'COMPOUND',
|
|
162
|
+
Isolation: 'ISOLATION'
|
|
157
163
|
};
|
|
158
164
|
exports.ExerciseWithSetsDtoBodyPartsEnum = {
|
|
159
165
|
Shoulders: 'SHOULDERS',
|
|
@@ -1953,6 +1959,45 @@ const IngredientsV1ApiAxiosParamCreator = function (configuration) {
|
|
|
1953
1959
|
options: localVarRequestOptions,
|
|
1954
1960
|
};
|
|
1955
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
|
+
}),
|
|
1956
2001
|
};
|
|
1957
2002
|
};
|
|
1958
2003
|
exports.IngredientsV1ApiAxiosParamCreator = IngredientsV1ApiAxiosParamCreator;
|
|
@@ -2035,6 +2080,23 @@ const IngredientsV1ApiFp = function (configuration) {
|
|
|
2035
2080
|
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
2036
2081
|
});
|
|
2037
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
|
+
},
|
|
2038
2100
|
};
|
|
2039
2101
|
};
|
|
2040
2102
|
exports.IngredientsV1ApiFp = IngredientsV1ApiFp;
|
|
@@ -2085,6 +2147,16 @@ const IngredientsV1ApiFactory = function (configuration, basePath, axios) {
|
|
|
2085
2147
|
ingredientsV1ControllerGetIngredients(requestParameters = {}, options) {
|
|
2086
2148
|
return localVarFp.ingredientsV1ControllerGetIngredients(requestParameters.limit, requestParameters.offset, requestParameters.name, requestParameters.query, requestParameters.orderBy, requestParameters.isAsc, options).then((request) => request(axios, basePath));
|
|
2087
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
|
+
},
|
|
2088
2160
|
};
|
|
2089
2161
|
};
|
|
2090
2162
|
exports.IngredientsV1ApiFactory = IngredientsV1ApiFactory;
|
|
@@ -2139,6 +2211,17 @@ class IngredientsV1Api extends base_1.BaseAPI {
|
|
|
2139
2211
|
ingredientsV1ControllerGetIngredients(requestParameters = {}, options) {
|
|
2140
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));
|
|
2141
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
|
+
}
|
|
2142
2225
|
}
|
|
2143
2226
|
exports.IngredientsV1Api = IngredientsV1Api;
|
|
2144
2227
|
/**
|
package/dist/esm/api.d.ts
CHANGED
|
@@ -86,12 +86,20 @@ export interface CreateExerciseRequestDto {
|
|
|
86
86
|
* @memberof CreateExerciseRequestDto
|
|
87
87
|
*/
|
|
88
88
|
'instructions': string;
|
|
89
|
+
/**
|
|
90
|
+
* Exercise image url
|
|
91
|
+
* @type {string}
|
|
92
|
+
* @memberof CreateExerciseRequestDto
|
|
93
|
+
*/
|
|
94
|
+
'imgUrl': string;
|
|
89
95
|
}
|
|
90
96
|
export declare const CreateExerciseRequestDtoTypeEnum: {
|
|
91
97
|
readonly Cardio: "CARDIO";
|
|
92
98
|
readonly Strength: "STRENGTH";
|
|
93
99
|
readonly Flexibility: "FLEXIBILITY";
|
|
94
100
|
readonly BodyWeight: "BODY_WEIGHT";
|
|
101
|
+
readonly Compound: "COMPOUND";
|
|
102
|
+
readonly Isolation: "ISOLATION";
|
|
95
103
|
};
|
|
96
104
|
export type CreateExerciseRequestDtoTypeEnum = typeof CreateExerciseRequestDtoTypeEnum[keyof typeof CreateExerciseRequestDtoTypeEnum];
|
|
97
105
|
export declare const CreateExerciseRequestDtoBodyPartsEnum: {
|
|
@@ -622,6 +630,12 @@ export interface ExerciseDto {
|
|
|
622
630
|
* @memberof ExerciseDto
|
|
623
631
|
*/
|
|
624
632
|
'instructions': string;
|
|
633
|
+
/**
|
|
634
|
+
* Exercise image url
|
|
635
|
+
* @type {string}
|
|
636
|
+
* @memberof ExerciseDto
|
|
637
|
+
*/
|
|
638
|
+
'imgUrl': string;
|
|
625
639
|
/**
|
|
626
640
|
* Exercise created at
|
|
627
641
|
* @type {string}
|
|
@@ -646,6 +660,8 @@ export declare const ExerciseDtoTypeEnum: {
|
|
|
646
660
|
readonly Strength: "STRENGTH";
|
|
647
661
|
readonly Flexibility: "FLEXIBILITY";
|
|
648
662
|
readonly BodyWeight: "BODY_WEIGHT";
|
|
663
|
+
readonly Compound: "COMPOUND";
|
|
664
|
+
readonly Isolation: "ISOLATION";
|
|
649
665
|
};
|
|
650
666
|
export type ExerciseDtoTypeEnum = typeof ExerciseDtoTypeEnum[keyof typeof ExerciseDtoTypeEnum];
|
|
651
667
|
export declare const ExerciseDtoBodyPartsEnum: {
|
|
@@ -777,6 +793,12 @@ export interface ExerciseWithSetsDto {
|
|
|
777
793
|
* @memberof ExerciseWithSetsDto
|
|
778
794
|
*/
|
|
779
795
|
'completedMeta': object;
|
|
796
|
+
/**
|
|
797
|
+
* Exercise image url
|
|
798
|
+
* @type {string}
|
|
799
|
+
* @memberof ExerciseWithSetsDto
|
|
800
|
+
*/
|
|
801
|
+
'imgUrl': string;
|
|
780
802
|
/**
|
|
781
803
|
* Exercise created at
|
|
782
804
|
* @type {string}
|
|
@@ -807,6 +829,8 @@ export declare const ExerciseWithSetsDtoTypeEnum: {
|
|
|
807
829
|
readonly Strength: "STRENGTH";
|
|
808
830
|
readonly Flexibility: "FLEXIBILITY";
|
|
809
831
|
readonly BodyWeight: "BODY_WEIGHT";
|
|
832
|
+
readonly Compound: "COMPOUND";
|
|
833
|
+
readonly Isolation: "ISOLATION";
|
|
810
834
|
};
|
|
811
835
|
export type ExerciseWithSetsDtoTypeEnum = typeof ExerciseWithSetsDtoTypeEnum[keyof typeof ExerciseWithSetsDtoTypeEnum];
|
|
812
836
|
export declare const ExerciseWithSetsDtoBodyPartsEnum: {
|
|
@@ -4349,6 +4373,15 @@ export declare const IngredientsV1ApiAxiosParamCreator: (configuration?: Configu
|
|
|
4349
4373
|
* @throws {RequiredError}
|
|
4350
4374
|
*/
|
|
4351
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>;
|
|
4352
4385
|
};
|
|
4353
4386
|
/**
|
|
4354
4387
|
* IngredientsV1Api - functional programming interface
|
|
@@ -4395,6 +4428,15 @@ export declare const IngredientsV1ApiFp: (configuration?: Configuration) => {
|
|
|
4395
4428
|
* @throws {RequiredError}
|
|
4396
4429
|
*/
|
|
4397
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>>;
|
|
4398
4440
|
};
|
|
4399
4441
|
/**
|
|
4400
4442
|
* IngredientsV1Api - factory interface
|
|
@@ -4433,6 +4475,14 @@ export declare const IngredientsV1ApiFactory: (configuration?: Configuration, ba
|
|
|
4433
4475
|
* @throws {RequiredError}
|
|
4434
4476
|
*/
|
|
4435
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>;
|
|
4436
4486
|
};
|
|
4437
4487
|
/**
|
|
4438
4488
|
* IngredientsV1Api - interface
|
|
@@ -4476,6 +4526,15 @@ export interface IngredientsV1ApiInterface {
|
|
|
4476
4526
|
* @memberof IngredientsV1ApiInterface
|
|
4477
4527
|
*/
|
|
4478
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>;
|
|
4479
4538
|
}
|
|
4480
4539
|
/**
|
|
4481
4540
|
* Request parameters for ingredientsV1ControllerCreateIngredient operation in IngredientsV1Api.
|
|
@@ -4577,6 +4636,25 @@ export interface IngredientsV1ApiIngredientsV1ControllerGetIngredientsRequest {
|
|
|
4577
4636
|
*/
|
|
4578
4637
|
readonly isAsc?: boolean;
|
|
4579
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
|
+
}
|
|
4580
4658
|
/**
|
|
4581
4659
|
* IngredientsV1Api - object-oriented interface
|
|
4582
4660
|
* @export
|
|
@@ -4620,6 +4698,15 @@ export declare class IngredientsV1Api extends BaseAPI implements IngredientsV1Ap
|
|
|
4620
4698
|
* @memberof IngredientsV1Api
|
|
4621
4699
|
*/
|
|
4622
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, {}>>;
|
|
4623
4710
|
}
|
|
4624
4711
|
/**
|
|
4625
4712
|
* MeasurementsV1Api - axios parameter creator
|
package/dist/esm/api.js
CHANGED
|
@@ -30,7 +30,9 @@ export const CreateExerciseRequestDtoTypeEnum = {
|
|
|
30
30
|
Cardio: 'CARDIO',
|
|
31
31
|
Strength: 'STRENGTH',
|
|
32
32
|
Flexibility: 'FLEXIBILITY',
|
|
33
|
-
BodyWeight: 'BODY_WEIGHT'
|
|
33
|
+
BodyWeight: 'BODY_WEIGHT',
|
|
34
|
+
Compound: 'COMPOUND',
|
|
35
|
+
Isolation: 'ISOLATION'
|
|
34
36
|
};
|
|
35
37
|
export const CreateExerciseRequestDtoBodyPartsEnum = {
|
|
36
38
|
Shoulders: 'SHOULDERS',
|
|
@@ -102,7 +104,9 @@ export const ExerciseDtoTypeEnum = {
|
|
|
102
104
|
Cardio: 'CARDIO',
|
|
103
105
|
Strength: 'STRENGTH',
|
|
104
106
|
Flexibility: 'FLEXIBILITY',
|
|
105
|
-
BodyWeight: 'BODY_WEIGHT'
|
|
107
|
+
BodyWeight: 'BODY_WEIGHT',
|
|
108
|
+
Compound: 'COMPOUND',
|
|
109
|
+
Isolation: 'ISOLATION'
|
|
106
110
|
};
|
|
107
111
|
export const ExerciseDtoBodyPartsEnum = {
|
|
108
112
|
Shoulders: 'SHOULDERS',
|
|
@@ -149,7 +153,9 @@ export const ExerciseWithSetsDtoTypeEnum = {
|
|
|
149
153
|
Cardio: 'CARDIO',
|
|
150
154
|
Strength: 'STRENGTH',
|
|
151
155
|
Flexibility: 'FLEXIBILITY',
|
|
152
|
-
BodyWeight: 'BODY_WEIGHT'
|
|
156
|
+
BodyWeight: 'BODY_WEIGHT',
|
|
157
|
+
Compound: 'COMPOUND',
|
|
158
|
+
Isolation: 'ISOLATION'
|
|
153
159
|
};
|
|
154
160
|
export const ExerciseWithSetsDtoBodyPartsEnum = {
|
|
155
161
|
Shoulders: 'SHOULDERS',
|
|
@@ -1937,6 +1943,45 @@ export const IngredientsV1ApiAxiosParamCreator = function (configuration) {
|
|
|
1937
1943
|
options: localVarRequestOptions,
|
|
1938
1944
|
};
|
|
1939
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
|
+
}),
|
|
1940
1985
|
};
|
|
1941
1986
|
};
|
|
1942
1987
|
/**
|
|
@@ -2018,6 +2063,23 @@ export const IngredientsV1ApiFp = function (configuration) {
|
|
|
2018
2063
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
2019
2064
|
});
|
|
2020
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
|
+
},
|
|
2021
2083
|
};
|
|
2022
2084
|
};
|
|
2023
2085
|
/**
|
|
@@ -2067,6 +2129,16 @@ export const IngredientsV1ApiFactory = function (configuration, basePath, axios)
|
|
|
2067
2129
|
ingredientsV1ControllerGetIngredients(requestParameters = {}, options) {
|
|
2068
2130
|
return localVarFp.ingredientsV1ControllerGetIngredients(requestParameters.limit, requestParameters.offset, requestParameters.name, requestParameters.query, requestParameters.orderBy, requestParameters.isAsc, options).then((request) => request(axios, basePath));
|
|
2069
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
|
+
},
|
|
2070
2142
|
};
|
|
2071
2143
|
};
|
|
2072
2144
|
/**
|
|
@@ -2120,6 +2192,17 @@ export class IngredientsV1Api extends BaseAPI {
|
|
|
2120
2192
|
ingredientsV1ControllerGetIngredients(requestParameters = {}, options) {
|
|
2121
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));
|
|
2122
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
|
+
}
|
|
2123
2206
|
}
|
|
2124
2207
|
/**
|
|
2125
2208
|
* MeasurementsV1Api - axios parameter creator
|
|
@@ -12,6 +12,7 @@ Name | Type | Description | Notes
|
|
|
12
12
|
**equipment** | **Array<string>** | Exercise equipment | [default to undefined]
|
|
13
13
|
**difficulty** | **string** | Exercise difficulty | [default to undefined]
|
|
14
14
|
**instructions** | **string** | Exercise instructions | [default to undefined]
|
|
15
|
+
**imgUrl** | **string** | Exercise image url | [default to undefined]
|
|
15
16
|
|
|
16
17
|
## Example
|
|
17
18
|
|
|
@@ -26,6 +27,7 @@ const instance: CreateExerciseRequestDto = {
|
|
|
26
27
|
equipment,
|
|
27
28
|
difficulty,
|
|
28
29
|
instructions,
|
|
30
|
+
imgUrl,
|
|
29
31
|
};
|
|
30
32
|
```
|
|
31
33
|
|
package/docs/ExerciseDto.md
CHANGED
|
@@ -13,6 +13,7 @@ Name | Type | Description | Notes
|
|
|
13
13
|
**equipment** | **Array<string>** | Exercise equipment | [default to undefined]
|
|
14
14
|
**difficulty** | **string** | Exercise difficulty | [default to undefined]
|
|
15
15
|
**instructions** | **string** | Exercise instructions | [default to undefined]
|
|
16
|
+
**imgUrl** | **string** | Exercise image url | [default to undefined]
|
|
16
17
|
**createdAt** | **string** | Exercise created at | [default to undefined]
|
|
17
18
|
**updatedAt** | **string** | Exercise updated at | [default to undefined]
|
|
18
19
|
**deletedAt** | **string** | Exercise deleted at | [default to undefined]
|
|
@@ -31,6 +32,7 @@ const instance: ExerciseDto = {
|
|
|
31
32
|
equipment,
|
|
32
33
|
difficulty,
|
|
33
34
|
instructions,
|
|
35
|
+
imgUrl,
|
|
34
36
|
createdAt,
|
|
35
37
|
updatedAt,
|
|
36
38
|
deletedAt,
|
|
@@ -14,6 +14,7 @@ Name | Type | Description | Notes
|
|
|
14
14
|
**difficulty** | **string** | Exercise difficulty | [default to undefined]
|
|
15
15
|
**instructions** | **string** | Exercise instructions | [default to undefined]
|
|
16
16
|
**completedMeta** | **object** | Completed workout meta data | [default to undefined]
|
|
17
|
+
**imgUrl** | **string** | Exercise image url | [default to undefined]
|
|
17
18
|
**createdAt** | **string** | Exercise created at | [default to undefined]
|
|
18
19
|
**updatedAt** | **string** | Exercise updated at | [default to undefined]
|
|
19
20
|
**deletedAt** | **string** | Exercise deleted at | [default to undefined]
|
|
@@ -34,6 +35,7 @@ const instance: ExerciseWithSetsDto = {
|
|
|
34
35
|
difficulty,
|
|
35
36
|
instructions,
|
|
36
37
|
completedMeta,
|
|
38
|
+
imgUrl,
|
|
37
39
|
createdAt,
|
|
38
40
|
updatedAt,
|
|
39
41
|
deletedAt,
|
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
|
+
|