mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2026-01-01 12:18:45 -05:00
13206 lines
511 KiB
TypeScript
13206 lines
511 KiB
TypeScript
/* tslint:disable */
|
|
/* eslint-disable */
|
|
/**
|
|
* Tandoor
|
|
* Tandoor API Docs
|
|
*
|
|
* The version of the OpenAPI document: 0.0.0
|
|
*
|
|
*
|
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
* https://openapi-generator.tech
|
|
* Do not edit the class manually.
|
|
*/
|
|
|
|
|
|
import * as runtime from '../runtime';
|
|
import type {
|
|
AccessToken,
|
|
AutoMealPlan,
|
|
Automation,
|
|
BookmarkletImport,
|
|
ConnectorConfigConfig,
|
|
CookLog,
|
|
CustomFilter,
|
|
ExportLog,
|
|
Food,
|
|
FoodInheritField,
|
|
FoodShoppingUpdate,
|
|
Group,
|
|
ImportImage,
|
|
ImportLog,
|
|
Ingredient,
|
|
IngredientString,
|
|
InviteLink,
|
|
Keyword,
|
|
Localization,
|
|
MealPlan,
|
|
MealType,
|
|
OpenDataCategory,
|
|
OpenDataConversion,
|
|
OpenDataFood,
|
|
OpenDataProperty,
|
|
OpenDataStore,
|
|
OpenDataUnit,
|
|
OpenDataVersion,
|
|
PaginatedAutomationList,
|
|
PaginatedBookmarkletImportListList,
|
|
PaginatedCookLogList,
|
|
PaginatedCustomFilterList,
|
|
PaginatedExportLogList,
|
|
PaginatedFoodList,
|
|
PaginatedImportLogList,
|
|
PaginatedIngredientList,
|
|
PaginatedInviteLinkList,
|
|
PaginatedKeywordList,
|
|
PaginatedMealPlanList,
|
|
PaginatedMealTypeList,
|
|
PaginatedPropertyList,
|
|
PaginatedPropertyTypeList,
|
|
PaginatedRecipeBookEntryList,
|
|
PaginatedRecipeBookList,
|
|
PaginatedRecipeOverviewList,
|
|
PaginatedShoppingListEntryList,
|
|
PaginatedShoppingListRecipeList,
|
|
PaginatedSpaceList,
|
|
PaginatedStepList,
|
|
PaginatedSupermarketCategoryList,
|
|
PaginatedSupermarketCategoryRelationList,
|
|
PaginatedSupermarketList,
|
|
PaginatedSyncList,
|
|
PaginatedSyncLogList,
|
|
PaginatedUnitConversionList,
|
|
PaginatedUnitList,
|
|
PaginatedUserFileList,
|
|
PaginatedUserSpaceList,
|
|
PaginatedViewLogList,
|
|
ParsedIngredient,
|
|
PatchedAccessToken,
|
|
PatchedAutomation,
|
|
PatchedBookmarkletImport,
|
|
PatchedConnectorConfigConfig,
|
|
PatchedCookLog,
|
|
PatchedCustomFilter,
|
|
PatchedExportLog,
|
|
PatchedFood,
|
|
PatchedImportLog,
|
|
PatchedIngredient,
|
|
PatchedInviteLink,
|
|
PatchedKeyword,
|
|
PatchedMealPlan,
|
|
PatchedMealType,
|
|
PatchedOpenDataCategory,
|
|
PatchedOpenDataConversion,
|
|
PatchedOpenDataFood,
|
|
PatchedOpenDataProperty,
|
|
PatchedOpenDataStore,
|
|
PatchedOpenDataUnit,
|
|
PatchedOpenDataVersion,
|
|
PatchedProperty,
|
|
PatchedPropertyType,
|
|
PatchedRecipe,
|
|
PatchedRecipeBook,
|
|
PatchedRecipeBookEntry,
|
|
PatchedShoppingListEntry,
|
|
PatchedShoppingListRecipe,
|
|
PatchedSpace,
|
|
PatchedStep,
|
|
PatchedStorage,
|
|
PatchedSupermarket,
|
|
PatchedSupermarketCategory,
|
|
PatchedSupermarketCategoryRelation,
|
|
PatchedSync,
|
|
PatchedUnit,
|
|
PatchedUnitConversion,
|
|
PatchedUser,
|
|
PatchedUserPreference,
|
|
PatchedUserSpace,
|
|
PatchedViewLog,
|
|
Property,
|
|
PropertyType,
|
|
Recipe,
|
|
RecipeBook,
|
|
RecipeBookEntry,
|
|
RecipeFlat,
|
|
RecipeFromSource,
|
|
RecipeFromSourceResponse,
|
|
RecipeImage,
|
|
RecipeShoppingUpdate,
|
|
RecipeSimple,
|
|
ServerSettings,
|
|
ShareLink,
|
|
ShoppingListEntry,
|
|
ShoppingListEntryBulk,
|
|
ShoppingListEntryBulkCreate,
|
|
ShoppingListRecipe,
|
|
Space,
|
|
Step,
|
|
Storage,
|
|
Supermarket,
|
|
SupermarketCategory,
|
|
SupermarketCategoryRelation,
|
|
Sync,
|
|
SyncLog,
|
|
Unit,
|
|
UnitConversion,
|
|
User,
|
|
UserFile,
|
|
UserPreference,
|
|
UserSpace,
|
|
ViewLog,
|
|
} from '../models/index';
|
|
import {
|
|
AccessTokenFromJSON,
|
|
AccessTokenToJSON,
|
|
AutoMealPlanFromJSON,
|
|
AutoMealPlanToJSON,
|
|
AutomationFromJSON,
|
|
AutomationToJSON,
|
|
BookmarkletImportFromJSON,
|
|
BookmarkletImportToJSON,
|
|
ConnectorConfigConfigFromJSON,
|
|
ConnectorConfigConfigToJSON,
|
|
CookLogFromJSON,
|
|
CookLogToJSON,
|
|
CustomFilterFromJSON,
|
|
CustomFilterToJSON,
|
|
ExportLogFromJSON,
|
|
ExportLogToJSON,
|
|
FoodFromJSON,
|
|
FoodToJSON,
|
|
FoodInheritFieldFromJSON,
|
|
FoodInheritFieldToJSON,
|
|
FoodShoppingUpdateFromJSON,
|
|
FoodShoppingUpdateToJSON,
|
|
GroupFromJSON,
|
|
GroupToJSON,
|
|
ImportImageFromJSON,
|
|
ImportImageToJSON,
|
|
ImportLogFromJSON,
|
|
ImportLogToJSON,
|
|
IngredientFromJSON,
|
|
IngredientToJSON,
|
|
IngredientStringFromJSON,
|
|
IngredientStringToJSON,
|
|
InviteLinkFromJSON,
|
|
InviteLinkToJSON,
|
|
KeywordFromJSON,
|
|
KeywordToJSON,
|
|
LocalizationFromJSON,
|
|
LocalizationToJSON,
|
|
MealPlanFromJSON,
|
|
MealPlanToJSON,
|
|
MealTypeFromJSON,
|
|
MealTypeToJSON,
|
|
OpenDataCategoryFromJSON,
|
|
OpenDataCategoryToJSON,
|
|
OpenDataConversionFromJSON,
|
|
OpenDataConversionToJSON,
|
|
OpenDataFoodFromJSON,
|
|
OpenDataFoodToJSON,
|
|
OpenDataPropertyFromJSON,
|
|
OpenDataPropertyToJSON,
|
|
OpenDataStoreFromJSON,
|
|
OpenDataStoreToJSON,
|
|
OpenDataUnitFromJSON,
|
|
OpenDataUnitToJSON,
|
|
OpenDataVersionFromJSON,
|
|
OpenDataVersionToJSON,
|
|
PaginatedAutomationListFromJSON,
|
|
PaginatedAutomationListToJSON,
|
|
PaginatedBookmarkletImportListListFromJSON,
|
|
PaginatedBookmarkletImportListListToJSON,
|
|
PaginatedCookLogListFromJSON,
|
|
PaginatedCookLogListToJSON,
|
|
PaginatedCustomFilterListFromJSON,
|
|
PaginatedCustomFilterListToJSON,
|
|
PaginatedExportLogListFromJSON,
|
|
PaginatedExportLogListToJSON,
|
|
PaginatedFoodListFromJSON,
|
|
PaginatedFoodListToJSON,
|
|
PaginatedImportLogListFromJSON,
|
|
PaginatedImportLogListToJSON,
|
|
PaginatedIngredientListFromJSON,
|
|
PaginatedIngredientListToJSON,
|
|
PaginatedInviteLinkListFromJSON,
|
|
PaginatedInviteLinkListToJSON,
|
|
PaginatedKeywordListFromJSON,
|
|
PaginatedKeywordListToJSON,
|
|
PaginatedMealPlanListFromJSON,
|
|
PaginatedMealPlanListToJSON,
|
|
PaginatedMealTypeListFromJSON,
|
|
PaginatedMealTypeListToJSON,
|
|
PaginatedPropertyListFromJSON,
|
|
PaginatedPropertyListToJSON,
|
|
PaginatedPropertyTypeListFromJSON,
|
|
PaginatedPropertyTypeListToJSON,
|
|
PaginatedRecipeBookEntryListFromJSON,
|
|
PaginatedRecipeBookEntryListToJSON,
|
|
PaginatedRecipeBookListFromJSON,
|
|
PaginatedRecipeBookListToJSON,
|
|
PaginatedRecipeOverviewListFromJSON,
|
|
PaginatedRecipeOverviewListToJSON,
|
|
PaginatedShoppingListEntryListFromJSON,
|
|
PaginatedShoppingListEntryListToJSON,
|
|
PaginatedShoppingListRecipeListFromJSON,
|
|
PaginatedShoppingListRecipeListToJSON,
|
|
PaginatedSpaceListFromJSON,
|
|
PaginatedSpaceListToJSON,
|
|
PaginatedStepListFromJSON,
|
|
PaginatedStepListToJSON,
|
|
PaginatedSupermarketCategoryListFromJSON,
|
|
PaginatedSupermarketCategoryListToJSON,
|
|
PaginatedSupermarketCategoryRelationListFromJSON,
|
|
PaginatedSupermarketCategoryRelationListToJSON,
|
|
PaginatedSupermarketListFromJSON,
|
|
PaginatedSupermarketListToJSON,
|
|
PaginatedSyncListFromJSON,
|
|
PaginatedSyncListToJSON,
|
|
PaginatedSyncLogListFromJSON,
|
|
PaginatedSyncLogListToJSON,
|
|
PaginatedUnitConversionListFromJSON,
|
|
PaginatedUnitConversionListToJSON,
|
|
PaginatedUnitListFromJSON,
|
|
PaginatedUnitListToJSON,
|
|
PaginatedUserFileListFromJSON,
|
|
PaginatedUserFileListToJSON,
|
|
PaginatedUserSpaceListFromJSON,
|
|
PaginatedUserSpaceListToJSON,
|
|
PaginatedViewLogListFromJSON,
|
|
PaginatedViewLogListToJSON,
|
|
ParsedIngredientFromJSON,
|
|
ParsedIngredientToJSON,
|
|
PatchedAccessTokenFromJSON,
|
|
PatchedAccessTokenToJSON,
|
|
PatchedAutomationFromJSON,
|
|
PatchedAutomationToJSON,
|
|
PatchedBookmarkletImportFromJSON,
|
|
PatchedBookmarkletImportToJSON,
|
|
PatchedConnectorConfigConfigFromJSON,
|
|
PatchedConnectorConfigConfigToJSON,
|
|
PatchedCookLogFromJSON,
|
|
PatchedCookLogToJSON,
|
|
PatchedCustomFilterFromJSON,
|
|
PatchedCustomFilterToJSON,
|
|
PatchedExportLogFromJSON,
|
|
PatchedExportLogToJSON,
|
|
PatchedFoodFromJSON,
|
|
PatchedFoodToJSON,
|
|
PatchedImportLogFromJSON,
|
|
PatchedImportLogToJSON,
|
|
PatchedIngredientFromJSON,
|
|
PatchedIngredientToJSON,
|
|
PatchedInviteLinkFromJSON,
|
|
PatchedInviteLinkToJSON,
|
|
PatchedKeywordFromJSON,
|
|
PatchedKeywordToJSON,
|
|
PatchedMealPlanFromJSON,
|
|
PatchedMealPlanToJSON,
|
|
PatchedMealTypeFromJSON,
|
|
PatchedMealTypeToJSON,
|
|
PatchedOpenDataCategoryFromJSON,
|
|
PatchedOpenDataCategoryToJSON,
|
|
PatchedOpenDataConversionFromJSON,
|
|
PatchedOpenDataConversionToJSON,
|
|
PatchedOpenDataFoodFromJSON,
|
|
PatchedOpenDataFoodToJSON,
|
|
PatchedOpenDataPropertyFromJSON,
|
|
PatchedOpenDataPropertyToJSON,
|
|
PatchedOpenDataStoreFromJSON,
|
|
PatchedOpenDataStoreToJSON,
|
|
PatchedOpenDataUnitFromJSON,
|
|
PatchedOpenDataUnitToJSON,
|
|
PatchedOpenDataVersionFromJSON,
|
|
PatchedOpenDataVersionToJSON,
|
|
PatchedPropertyFromJSON,
|
|
PatchedPropertyToJSON,
|
|
PatchedPropertyTypeFromJSON,
|
|
PatchedPropertyTypeToJSON,
|
|
PatchedRecipeFromJSON,
|
|
PatchedRecipeToJSON,
|
|
PatchedRecipeBookFromJSON,
|
|
PatchedRecipeBookToJSON,
|
|
PatchedRecipeBookEntryFromJSON,
|
|
PatchedRecipeBookEntryToJSON,
|
|
PatchedShoppingListEntryFromJSON,
|
|
PatchedShoppingListEntryToJSON,
|
|
PatchedShoppingListRecipeFromJSON,
|
|
PatchedShoppingListRecipeToJSON,
|
|
PatchedSpaceFromJSON,
|
|
PatchedSpaceToJSON,
|
|
PatchedStepFromJSON,
|
|
PatchedStepToJSON,
|
|
PatchedStorageFromJSON,
|
|
PatchedStorageToJSON,
|
|
PatchedSupermarketFromJSON,
|
|
PatchedSupermarketToJSON,
|
|
PatchedSupermarketCategoryFromJSON,
|
|
PatchedSupermarketCategoryToJSON,
|
|
PatchedSupermarketCategoryRelationFromJSON,
|
|
PatchedSupermarketCategoryRelationToJSON,
|
|
PatchedSyncFromJSON,
|
|
PatchedSyncToJSON,
|
|
PatchedUnitFromJSON,
|
|
PatchedUnitToJSON,
|
|
PatchedUnitConversionFromJSON,
|
|
PatchedUnitConversionToJSON,
|
|
PatchedUserFromJSON,
|
|
PatchedUserToJSON,
|
|
PatchedUserPreferenceFromJSON,
|
|
PatchedUserPreferenceToJSON,
|
|
PatchedUserSpaceFromJSON,
|
|
PatchedUserSpaceToJSON,
|
|
PatchedViewLogFromJSON,
|
|
PatchedViewLogToJSON,
|
|
PropertyFromJSON,
|
|
PropertyToJSON,
|
|
PropertyTypeFromJSON,
|
|
PropertyTypeToJSON,
|
|
RecipeFromJSON,
|
|
RecipeToJSON,
|
|
RecipeBookFromJSON,
|
|
RecipeBookToJSON,
|
|
RecipeBookEntryFromJSON,
|
|
RecipeBookEntryToJSON,
|
|
RecipeFlatFromJSON,
|
|
RecipeFlatToJSON,
|
|
RecipeFromSourceFromJSON,
|
|
RecipeFromSourceToJSON,
|
|
RecipeFromSourceResponseFromJSON,
|
|
RecipeFromSourceResponseToJSON,
|
|
RecipeImageFromJSON,
|
|
RecipeImageToJSON,
|
|
RecipeShoppingUpdateFromJSON,
|
|
RecipeShoppingUpdateToJSON,
|
|
RecipeSimpleFromJSON,
|
|
RecipeSimpleToJSON,
|
|
ServerSettingsFromJSON,
|
|
ServerSettingsToJSON,
|
|
ShareLinkFromJSON,
|
|
ShareLinkToJSON,
|
|
ShoppingListEntryFromJSON,
|
|
ShoppingListEntryToJSON,
|
|
ShoppingListEntryBulkFromJSON,
|
|
ShoppingListEntryBulkToJSON,
|
|
ShoppingListEntryBulkCreateFromJSON,
|
|
ShoppingListEntryBulkCreateToJSON,
|
|
ShoppingListRecipeFromJSON,
|
|
ShoppingListRecipeToJSON,
|
|
SpaceFromJSON,
|
|
SpaceToJSON,
|
|
StepFromJSON,
|
|
StepToJSON,
|
|
StorageFromJSON,
|
|
StorageToJSON,
|
|
SupermarketFromJSON,
|
|
SupermarketToJSON,
|
|
SupermarketCategoryFromJSON,
|
|
SupermarketCategoryToJSON,
|
|
SupermarketCategoryRelationFromJSON,
|
|
SupermarketCategoryRelationToJSON,
|
|
SyncFromJSON,
|
|
SyncToJSON,
|
|
SyncLogFromJSON,
|
|
SyncLogToJSON,
|
|
UnitFromJSON,
|
|
UnitToJSON,
|
|
UnitConversionFromJSON,
|
|
UnitConversionToJSON,
|
|
UserFromJSON,
|
|
UserToJSON,
|
|
UserFileFromJSON,
|
|
UserFileToJSON,
|
|
UserPreferenceFromJSON,
|
|
UserPreferenceToJSON,
|
|
UserSpaceFromJSON,
|
|
UserSpaceToJSON,
|
|
ViewLogFromJSON,
|
|
ViewLogToJSON,
|
|
} from '../models/index';
|
|
|
|
export interface ApiAccessTokenCreateRequest {
|
|
accessToken: Omit<AccessToken, 'token'|'created'|'updated'>;
|
|
}
|
|
|
|
export interface ApiAccessTokenDestroyRequest {
|
|
id: number;
|
|
}
|
|
|
|
export interface ApiAccessTokenPartialUpdateRequest {
|
|
id: number;
|
|
patchedAccessToken?: Omit<PatchedAccessToken, 'token'|'created'|'updated'>;
|
|
}
|
|
|
|
export interface ApiAccessTokenRetrieveRequest {
|
|
id: number;
|
|
}
|
|
|
|
export interface ApiAccessTokenUpdateRequest {
|
|
id: number;
|
|
accessToken: Omit<AccessToken, 'token'|'created'|'updated'>;
|
|
}
|
|
|
|
export interface ApiAutoPlanCreateRequest {
|
|
autoMealPlan: AutoMealPlan;
|
|
}
|
|
|
|
export interface ApiAutomationCreateRequest {
|
|
automation: Omit<Automation, 'created_by'>;
|
|
}
|
|
|
|
export interface ApiAutomationDestroyRequest {
|
|
id: number;
|
|
}
|
|
|
|
export interface ApiAutomationListRequest {
|
|
page?: number;
|
|
pageSize?: number;
|
|
type?: Array<ApiAutomationListTypeEnum>;
|
|
}
|
|
|
|
export interface ApiAutomationPartialUpdateRequest {
|
|
id: number;
|
|
patchedAutomation?: Omit<PatchedAutomation, 'created_by'>;
|
|
}
|
|
|
|
export interface ApiAutomationRetrieveRequest {
|
|
id: number;
|
|
}
|
|
|
|
export interface ApiAutomationUpdateRequest {
|
|
id: number;
|
|
automation: Omit<Automation, 'created_by'>;
|
|
}
|
|
|
|
export interface ApiBookmarkletImportCreateRequest {
|
|
bookmarkletImport: Omit<BookmarkletImport, 'created_by'|'created_at'>;
|
|
}
|
|
|
|
export interface ApiBookmarkletImportDestroyRequest {
|
|
id: number;
|
|
}
|
|
|
|
export interface ApiBookmarkletImportListRequest {
|
|
page?: number;
|
|
pageSize?: number;
|
|
}
|
|
|
|
export interface ApiBookmarkletImportPartialUpdateRequest {
|
|
id: number;
|
|
patchedBookmarkletImport?: Omit<PatchedBookmarkletImport, 'created_by'|'created_at'>;
|
|
}
|
|
|
|
export interface ApiBookmarkletImportRetrieveRequest {
|
|
id: number;
|
|
}
|
|
|
|
export interface ApiBookmarkletImportUpdateRequest {
|
|
id: number;
|
|
bookmarkletImport: Omit<BookmarkletImport, 'created_by'|'created_at'>;
|
|
}
|
|
|
|
export interface ApiConnectorConfigCreateRequest {
|
|
connectorConfigConfig: Omit<ConnectorConfigConfig, 'created_by'>;
|
|
}
|
|
|
|
export interface ApiConnectorConfigDestroyRequest {
|
|
id: number;
|
|
}
|
|
|
|
export interface ApiConnectorConfigPartialUpdateRequest {
|
|
id: number;
|
|
patchedConnectorConfigConfig?: Omit<PatchedConnectorConfigConfig, 'created_by'>;
|
|
}
|
|
|
|
export interface ApiConnectorConfigRetrieveRequest {
|
|
id: number;
|
|
}
|
|
|
|
export interface ApiConnectorConfigUpdateRequest {
|
|
id: number;
|
|
connectorConfigConfig: Omit<ConnectorConfigConfig, 'created_by'>;
|
|
}
|
|
|
|
export interface ApiCookLogCreateRequest {
|
|
cookLog: Omit<CookLog, 'created_by'|'updated_at'>;
|
|
}
|
|
|
|
export interface ApiCookLogDestroyRequest {
|
|
id: number;
|
|
}
|
|
|
|
export interface ApiCookLogListRequest {
|
|
page?: number;
|
|
pageSize?: number;
|
|
recipe?: number;
|
|
}
|
|
|
|
export interface ApiCookLogPartialUpdateRequest {
|
|
id: number;
|
|
patchedCookLog?: Omit<PatchedCookLog, 'created_by'|'updated_at'>;
|
|
}
|
|
|
|
export interface ApiCookLogRetrieveRequest {
|
|
id: number;
|
|
}
|
|
|
|
export interface ApiCookLogUpdateRequest {
|
|
id: number;
|
|
cookLog: Omit<CookLog, 'created_by'|'updated_at'>;
|
|
}
|
|
|
|
export interface ApiCustomFilterCreateRequest {
|
|
customFilter: Omit<CustomFilter, 'created_by'>;
|
|
}
|
|
|
|
export interface ApiCustomFilterDestroyRequest {
|
|
id: number;
|
|
}
|
|
|
|
export interface ApiCustomFilterListRequest {
|
|
limit?: string;
|
|
page?: number;
|
|
pageSize?: number;
|
|
query?: string;
|
|
random?: string;
|
|
type?: Array<ApiCustomFilterListTypeEnum>;
|
|
updatedAt?: string;
|
|
}
|
|
|
|
export interface ApiCustomFilterPartialUpdateRequest {
|
|
id: number;
|
|
patchedCustomFilter?: Omit<PatchedCustomFilter, 'created_by'>;
|
|
}
|
|
|
|
export interface ApiCustomFilterRetrieveRequest {
|
|
id: number;
|
|
}
|
|
|
|
export interface ApiCustomFilterUpdateRequest {
|
|
id: number;
|
|
customFilter: Omit<CustomFilter, 'created_by'>;
|
|
}
|
|
|
|
export interface ApiDownloadFileRetrieveRequest {
|
|
fileId: number;
|
|
}
|
|
|
|
export interface ApiExportLogCreateRequest {
|
|
exportLog: Omit<ExportLog, 'created_by'|'created_at'>;
|
|
}
|
|
|
|
export interface ApiExportLogDestroyRequest {
|
|
id: number;
|
|
}
|
|
|
|
export interface ApiExportLogListRequest {
|
|
page?: number;
|
|
pageSize?: number;
|
|
}
|
|
|
|
export interface ApiExportLogPartialUpdateRequest {
|
|
id: number;
|
|
patchedExportLog?: Omit<PatchedExportLog, 'created_by'|'created_at'>;
|
|
}
|
|
|
|
export interface ApiExportLogRetrieveRequest {
|
|
id: number;
|
|
}
|
|
|
|
export interface ApiExportLogUpdateRequest {
|
|
id: number;
|
|
exportLog: Omit<ExportLog, 'created_by'|'created_at'>;
|
|
}
|
|
|
|
export interface ApiFoodCreateRequest {
|
|
food: Omit<Food, 'shopping'|'parent'|'numchild'|'full_name'|'substitute_onhand'>;
|
|
}
|
|
|
|
export interface ApiFoodDestroyRequest {
|
|
id: number;
|
|
}
|
|
|
|
export interface ApiFoodFdcCreateRequest {
|
|
id: number;
|
|
food: Omit<Food, 'shopping'|'parent'|'numchild'|'full_name'|'substitute_onhand'>;
|
|
}
|
|
|
|
export interface ApiFoodInheritFieldRetrieveRequest {
|
|
id: number;
|
|
}
|
|
|
|
export interface ApiFoodListRequest {
|
|
limit?: string;
|
|
page?: number;
|
|
pageSize?: number;
|
|
query?: string;
|
|
random?: string;
|
|
root?: number;
|
|
tree?: number;
|
|
updatedAt?: string;
|
|
}
|
|
|
|
export interface ApiFoodMergeUpdateRequest {
|
|
id: number;
|
|
target: number;
|
|
food: Omit<Food, 'shopping'|'parent'|'numchild'|'full_name'|'substitute_onhand'>;
|
|
}
|
|
|
|
export interface ApiFoodMoveUpdateRequest {
|
|
id: number;
|
|
parent: number;
|
|
food: Omit<Food, 'shopping'|'parent'|'numchild'|'full_name'|'substitute_onhand'>;
|
|
}
|
|
|
|
export interface ApiFoodPartialUpdateRequest {
|
|
id: number;
|
|
patchedFood?: Omit<PatchedFood, 'shopping'|'parent'|'numchild'|'full_name'|'substitute_onhand'>;
|
|
}
|
|
|
|
export interface ApiFoodRetrieveRequest {
|
|
id: number;
|
|
}
|
|
|
|
export interface ApiFoodShoppingUpdateRequest {
|
|
id: number;
|
|
foodShoppingUpdate: FoodShoppingUpdate;
|
|
}
|
|
|
|
export interface ApiFoodUpdateRequest {
|
|
id: number;
|
|
food: Omit<Food, 'shopping'|'parent'|'numchild'|'full_name'|'substitute_onhand'>;
|
|
}
|
|
|
|
export interface ApiGetExternalFileLinkRetrieveRequest {
|
|
recipeId: number;
|
|
}
|
|
|
|
export interface ApiGetRecipeFileRetrieveRequest {
|
|
recipeId: number;
|
|
}
|
|
|
|
export interface ApiGroupRetrieveRequest {
|
|
id: number;
|
|
}
|
|
|
|
export interface ApiImageToRecipeCreateRequest {
|
|
importImage: ImportImage;
|
|
}
|
|
|
|
export interface ApiImportLogCreateRequest {
|
|
importLog: Omit<ImportLog, 'keyword'|'created_by'|'created_at'>;
|
|
}
|
|
|
|
export interface ApiImportLogDestroyRequest {
|
|
id: number;
|
|
}
|
|
|
|
export interface ApiImportLogListRequest {
|
|
page?: number;
|
|
pageSize?: number;
|
|
}
|
|
|
|
export interface ApiImportLogPartialUpdateRequest {
|
|
id: number;
|
|
patchedImportLog?: Omit<PatchedImportLog, 'keyword'|'created_by'|'created_at'>;
|
|
}
|
|
|
|
export interface ApiImportLogRetrieveRequest {
|
|
id: number;
|
|
}
|
|
|
|
export interface ApiImportLogUpdateRequest {
|
|
id: number;
|
|
importLog: Omit<ImportLog, 'keyword'|'created_by'|'created_at'>;
|
|
}
|
|
|
|
export interface ApiIngredientCreateRequest {
|
|
ingredient: Omit<Ingredient, 'conversions'|'used_in_recipes'>;
|
|
}
|
|
|
|
export interface ApiIngredientDestroyRequest {
|
|
id: number;
|
|
}
|
|
|
|
export interface ApiIngredientFromStringCreateRequest {
|
|
ingredientString: IngredientString;
|
|
}
|
|
|
|
export interface ApiIngredientListRequest {
|
|
food?: number;
|
|
page?: number;
|
|
pageSize?: number;
|
|
unit?: number;
|
|
}
|
|
|
|
export interface ApiIngredientPartialUpdateRequest {
|
|
id: number;
|
|
patchedIngredient?: Omit<PatchedIngredient, 'conversions'|'used_in_recipes'>;
|
|
}
|
|
|
|
export interface ApiIngredientRetrieveRequest {
|
|
id: number;
|
|
}
|
|
|
|
export interface ApiIngredientUpdateRequest {
|
|
id: number;
|
|
ingredient: Omit<Ingredient, 'conversions'|'used_in_recipes'>;
|
|
}
|
|
|
|
export interface ApiInviteLinkCreateRequest {
|
|
inviteLink: Omit<InviteLink, 'uuid'|'created_by'|'created_at'>;
|
|
}
|
|
|
|
export interface ApiInviteLinkDestroyRequest {
|
|
id: number;
|
|
}
|
|
|
|
export interface ApiInviteLinkListRequest {
|
|
internalNote?: string;
|
|
limit?: string;
|
|
page?: number;
|
|
pageSize?: number;
|
|
query?: string;
|
|
random?: string;
|
|
updatedAt?: string;
|
|
}
|
|
|
|
export interface ApiInviteLinkPartialUpdateRequest {
|
|
id: number;
|
|
patchedInviteLink?: Omit<PatchedInviteLink, 'uuid'|'created_by'|'created_at'>;
|
|
}
|
|
|
|
export interface ApiInviteLinkRetrieveRequest {
|
|
id: number;
|
|
}
|
|
|
|
export interface ApiInviteLinkUpdateRequest {
|
|
id: number;
|
|
inviteLink: Omit<InviteLink, 'uuid'|'created_by'|'created_at'>;
|
|
}
|
|
|
|
export interface ApiKeywordCreateRequest {
|
|
keyword: Omit<Keyword, 'label'|'parent'|'numchild'|'created_at'|'updated_at'|'full_name'>;
|
|
}
|
|
|
|
export interface ApiKeywordDestroyRequest {
|
|
id: number;
|
|
}
|
|
|
|
export interface ApiKeywordListRequest {
|
|
limit?: string;
|
|
page?: number;
|
|
pageSize?: number;
|
|
query?: string;
|
|
random?: string;
|
|
root?: number;
|
|
tree?: number;
|
|
updatedAt?: string;
|
|
}
|
|
|
|
export interface ApiKeywordMergeUpdateRequest {
|
|
id: number;
|
|
target: number;
|
|
keyword: Omit<Keyword, 'label'|'parent'|'numchild'|'created_at'|'updated_at'|'full_name'>;
|
|
}
|
|
|
|
export interface ApiKeywordMoveUpdateRequest {
|
|
id: number;
|
|
parent: number;
|
|
keyword: Omit<Keyword, 'label'|'parent'|'numchild'|'created_at'|'updated_at'|'full_name'>;
|
|
}
|
|
|
|
export interface ApiKeywordPartialUpdateRequest {
|
|
id: number;
|
|
patchedKeyword?: Omit<PatchedKeyword, 'label'|'parent'|'numchild'|'created_at'|'updated_at'|'full_name'>;
|
|
}
|
|
|
|
export interface ApiKeywordRetrieveRequest {
|
|
id: number;
|
|
}
|
|
|
|
export interface ApiKeywordUpdateRequest {
|
|
id: number;
|
|
keyword: Omit<Keyword, 'label'|'parent'|'numchild'|'created_at'|'updated_at'|'full_name'>;
|
|
}
|
|
|
|
export interface ApiMealPlanCreateRequest {
|
|
mealPlan: Omit<MealPlan, 'note_markdown'|'created_by'|'recipe_name'|'meal_type_name'|'shopping'>;
|
|
}
|
|
|
|
export interface ApiMealPlanDestroyRequest {
|
|
id: number;
|
|
}
|
|
|
|
export interface ApiMealPlanIcalRetrieveRequest {
|
|
fromDate?: string;
|
|
mealType?: Array<string>;
|
|
toDate?: string;
|
|
}
|
|
|
|
export interface ApiMealPlanListRequest {
|
|
fromDate?: string;
|
|
mealType?: Array<string>;
|
|
page?: number;
|
|
pageSize?: number;
|
|
toDate?: string;
|
|
}
|
|
|
|
export interface ApiMealPlanPartialUpdateRequest {
|
|
id: number;
|
|
patchedMealPlan?: Omit<PatchedMealPlan, 'note_markdown'|'created_by'|'recipe_name'|'meal_type_name'|'shopping'>;
|
|
}
|
|
|
|
export interface ApiMealPlanRetrieveRequest {
|
|
id: number;
|
|
}
|
|
|
|
export interface ApiMealPlanUpdateRequest {
|
|
id: number;
|
|
mealPlan: Omit<MealPlan, 'note_markdown'|'created_by'|'recipe_name'|'meal_type_name'|'shopping'>;
|
|
}
|
|
|
|
export interface ApiMealTypeCreateRequest {
|
|
mealType: Omit<MealType, 'created_by'>;
|
|
}
|
|
|
|
export interface ApiMealTypeDestroyRequest {
|
|
id: number;
|
|
}
|
|
|
|
export interface ApiMealTypeListRequest {
|
|
page?: number;
|
|
pageSize?: number;
|
|
}
|
|
|
|
export interface ApiMealTypePartialUpdateRequest {
|
|
id: number;
|
|
patchedMealType?: Omit<PatchedMealType, 'created_by'>;
|
|
}
|
|
|
|
export interface ApiMealTypeRetrieveRequest {
|
|
id: number;
|
|
}
|
|
|
|
export interface ApiMealTypeUpdateRequest {
|
|
id: number;
|
|
mealType: Omit<MealType, 'created_by'>;
|
|
}
|
|
|
|
export interface ApiOpenDataCategoryCreateRequest {
|
|
openDataCategory: Omit<OpenDataCategory, 'created_by'>;
|
|
}
|
|
|
|
export interface ApiOpenDataCategoryDestroyRequest {
|
|
id: number;
|
|
}
|
|
|
|
export interface ApiOpenDataCategoryPartialUpdateRequest {
|
|
id: number;
|
|
patchedOpenDataCategory?: Omit<PatchedOpenDataCategory, 'created_by'>;
|
|
}
|
|
|
|
export interface ApiOpenDataCategoryRetrieveRequest {
|
|
id: number;
|
|
}
|
|
|
|
export interface ApiOpenDataCategoryUpdateRequest {
|
|
id: number;
|
|
openDataCategory: Omit<OpenDataCategory, 'created_by'>;
|
|
}
|
|
|
|
export interface ApiOpenDataConversionCreateRequest {
|
|
openDataConversion: Omit<OpenDataConversion, 'created_by'>;
|
|
}
|
|
|
|
export interface ApiOpenDataConversionDestroyRequest {
|
|
id: number;
|
|
}
|
|
|
|
export interface ApiOpenDataConversionPartialUpdateRequest {
|
|
id: number;
|
|
patchedOpenDataConversion?: Omit<PatchedOpenDataConversion, 'created_by'>;
|
|
}
|
|
|
|
export interface ApiOpenDataConversionRetrieveRequest {
|
|
id: number;
|
|
}
|
|
|
|
export interface ApiOpenDataConversionUpdateRequest {
|
|
id: number;
|
|
openDataConversion: Omit<OpenDataConversion, 'created_by'>;
|
|
}
|
|
|
|
export interface ApiOpenDataFDCRetrieveRequest {
|
|
id: string;
|
|
}
|
|
|
|
export interface ApiOpenDataFoodCreateRequest {
|
|
openDataFood: Omit<OpenDataFood, 'created_by'>;
|
|
}
|
|
|
|
export interface ApiOpenDataFoodDestroyRequest {
|
|
id: number;
|
|
}
|
|
|
|
export interface ApiOpenDataFoodPartialUpdateRequest {
|
|
id: number;
|
|
patchedOpenDataFood?: Omit<PatchedOpenDataFood, 'created_by'>;
|
|
}
|
|
|
|
export interface ApiOpenDataFoodRetrieveRequest {
|
|
id: number;
|
|
}
|
|
|
|
export interface ApiOpenDataFoodUpdateRequest {
|
|
id: number;
|
|
openDataFood: Omit<OpenDataFood, 'created_by'>;
|
|
}
|
|
|
|
export interface ApiOpenDataPropertyCreateRequest {
|
|
openDataProperty: Omit<OpenDataProperty, 'created_by'>;
|
|
}
|
|
|
|
export interface ApiOpenDataPropertyDestroyRequest {
|
|
id: number;
|
|
}
|
|
|
|
export interface ApiOpenDataPropertyPartialUpdateRequest {
|
|
id: number;
|
|
patchedOpenDataProperty?: Omit<PatchedOpenDataProperty, 'created_by'>;
|
|
}
|
|
|
|
export interface ApiOpenDataPropertyRetrieveRequest {
|
|
id: number;
|
|
}
|
|
|
|
export interface ApiOpenDataPropertyUpdateRequest {
|
|
id: number;
|
|
openDataProperty: Omit<OpenDataProperty, 'created_by'>;
|
|
}
|
|
|
|
export interface ApiOpenDataStoreCreateRequest {
|
|
openDataStore: Omit<OpenDataStore, 'created_by'>;
|
|
}
|
|
|
|
export interface ApiOpenDataStoreDestroyRequest {
|
|
id: number;
|
|
}
|
|
|
|
export interface ApiOpenDataStorePartialUpdateRequest {
|
|
id: number;
|
|
patchedOpenDataStore?: Omit<PatchedOpenDataStore, 'created_by'>;
|
|
}
|
|
|
|
export interface ApiOpenDataStoreRetrieveRequest {
|
|
id: number;
|
|
}
|
|
|
|
export interface ApiOpenDataStoreUpdateRequest {
|
|
id: number;
|
|
openDataStore: Omit<OpenDataStore, 'created_by'>;
|
|
}
|
|
|
|
export interface ApiOpenDataUnitCreateRequest {
|
|
openDataUnit: Omit<OpenDataUnit, 'created_by'>;
|
|
}
|
|
|
|
export interface ApiOpenDataUnitDestroyRequest {
|
|
id: number;
|
|
}
|
|
|
|
export interface ApiOpenDataUnitPartialUpdateRequest {
|
|
id: number;
|
|
patchedOpenDataUnit?: Omit<PatchedOpenDataUnit, 'created_by'>;
|
|
}
|
|
|
|
export interface ApiOpenDataUnitRetrieveRequest {
|
|
id: number;
|
|
}
|
|
|
|
export interface ApiOpenDataUnitUpdateRequest {
|
|
id: number;
|
|
openDataUnit: Omit<OpenDataUnit, 'created_by'>;
|
|
}
|
|
|
|
export interface ApiOpenDataVersionCreateRequest {
|
|
openDataVersion: OpenDataVersion;
|
|
}
|
|
|
|
export interface ApiOpenDataVersionDestroyRequest {
|
|
id: number;
|
|
}
|
|
|
|
export interface ApiOpenDataVersionPartialUpdateRequest {
|
|
id: number;
|
|
patchedOpenDataVersion?: PatchedOpenDataVersion;
|
|
}
|
|
|
|
export interface ApiOpenDataVersionRetrieveRequest {
|
|
id: number;
|
|
}
|
|
|
|
export interface ApiOpenDataVersionUpdateRequest {
|
|
id: number;
|
|
openDataVersion: OpenDataVersion;
|
|
}
|
|
|
|
export interface ApiPropertyCreateRequest {
|
|
property: Property;
|
|
}
|
|
|
|
export interface ApiPropertyDestroyRequest {
|
|
id: number;
|
|
}
|
|
|
|
export interface ApiPropertyListRequest {
|
|
page?: number;
|
|
pageSize?: number;
|
|
}
|
|
|
|
export interface ApiPropertyPartialUpdateRequest {
|
|
id: number;
|
|
patchedProperty?: PatchedProperty;
|
|
}
|
|
|
|
export interface ApiPropertyRetrieveRequest {
|
|
id: number;
|
|
}
|
|
|
|
export interface ApiPropertyTypeCreateRequest {
|
|
propertyType: PropertyType;
|
|
}
|
|
|
|
export interface ApiPropertyTypeDestroyRequest {
|
|
id: number;
|
|
}
|
|
|
|
export interface ApiPropertyTypeListRequest {
|
|
category?: Array<ApiPropertyTypeListCategoryEnum>;
|
|
page?: number;
|
|
pageSize?: number;
|
|
}
|
|
|
|
export interface ApiPropertyTypePartialUpdateRequest {
|
|
id: number;
|
|
patchedPropertyType?: PatchedPropertyType;
|
|
}
|
|
|
|
export interface ApiPropertyTypeRetrieveRequest {
|
|
id: number;
|
|
}
|
|
|
|
export interface ApiPropertyTypeUpdateRequest {
|
|
id: number;
|
|
propertyType: PropertyType;
|
|
}
|
|
|
|
export interface ApiPropertyUpdateRequest {
|
|
id: number;
|
|
property: Property;
|
|
}
|
|
|
|
export interface ApiRecipeBookCreateRequest {
|
|
recipeBook: Omit<RecipeBook, 'created_by'>;
|
|
}
|
|
|
|
export interface ApiRecipeBookDestroyRequest {
|
|
id: number;
|
|
}
|
|
|
|
export interface ApiRecipeBookEntryCreateRequest {
|
|
recipeBookEntry: Omit<RecipeBookEntry, 'book_content'|'recipe_content'>;
|
|
}
|
|
|
|
export interface ApiRecipeBookEntryDestroyRequest {
|
|
id: number;
|
|
}
|
|
|
|
export interface ApiRecipeBookEntryListRequest {
|
|
book?: number;
|
|
page?: number;
|
|
pageSize?: number;
|
|
recipe?: number;
|
|
}
|
|
|
|
export interface ApiRecipeBookEntryPartialUpdateRequest {
|
|
id: number;
|
|
patchedRecipeBookEntry?: Omit<PatchedRecipeBookEntry, 'book_content'|'recipe_content'>;
|
|
}
|
|
|
|
export interface ApiRecipeBookEntryRetrieveRequest {
|
|
id: number;
|
|
}
|
|
|
|
export interface ApiRecipeBookEntryUpdateRequest {
|
|
id: number;
|
|
recipeBookEntry: Omit<RecipeBookEntry, 'book_content'|'recipe_content'>;
|
|
}
|
|
|
|
export interface ApiRecipeBookListRequest {
|
|
limit?: string;
|
|
orderDirection?: ApiRecipeBookListOrderDirectionEnum;
|
|
orderField?: ApiRecipeBookListOrderFieldEnum;
|
|
page?: number;
|
|
pageSize?: number;
|
|
query?: string;
|
|
random?: string;
|
|
updatedAt?: string;
|
|
}
|
|
|
|
export interface ApiRecipeBookPartialUpdateRequest {
|
|
id: number;
|
|
patchedRecipeBook?: Omit<PatchedRecipeBook, 'created_by'>;
|
|
}
|
|
|
|
export interface ApiRecipeBookRetrieveRequest {
|
|
id: number;
|
|
}
|
|
|
|
export interface ApiRecipeBookUpdateRequest {
|
|
id: number;
|
|
recipeBook: Omit<RecipeBook, 'created_by'>;
|
|
}
|
|
|
|
export interface ApiRecipeCreateRequest {
|
|
recipe: Omit<Recipe, 'image'|'created_by'|'created_at'|'updated_at'|'food_properties'|'rating'|'last_cooked'>;
|
|
}
|
|
|
|
export interface ApiRecipeDestroyRequest {
|
|
id: number;
|
|
}
|
|
|
|
export interface ApiRecipeFromSourceCreateRequest {
|
|
recipeFromSource?: RecipeFromSource;
|
|
}
|
|
|
|
export interface ApiRecipeImageUpdateRequest {
|
|
id: number;
|
|
image?: string | null;
|
|
imageUrl?: string | null;
|
|
}
|
|
|
|
export interface ApiRecipeListRequest {
|
|
books?: Array<number>;
|
|
booksAnd?: Array<number>;
|
|
booksAndNot?: Array<number>;
|
|
booksOr?: Array<number>;
|
|
booksOrNot?: Array<number>;
|
|
cookedon?: string;
|
|
createdon?: string;
|
|
foods?: Array<number>;
|
|
foodsAnd?: Array<number>;
|
|
foodsAndNot?: Array<number>;
|
|
foodsOr?: Array<number>;
|
|
foodsOrNot?: Array<number>;
|
|
internal?: boolean;
|
|
keywords?: Array<number>;
|
|
keywordsAnd?: Array<number>;
|
|
keywordsAndNot?: Array<number>;
|
|
keywordsOr?: Array<number>;
|
|
keywordsOrNot?: Array<number>;
|
|
makenow?: boolean;
|
|
_new?: string;
|
|
page?: number;
|
|
pageSize?: number;
|
|
query?: string;
|
|
random?: string;
|
|
rating?: number;
|
|
timescooked?: number;
|
|
units?: number;
|
|
updatedon?: string;
|
|
viewedon?: string;
|
|
}
|
|
|
|
export interface ApiRecipePartialUpdateRequest {
|
|
id: number;
|
|
patchedRecipe?: Omit<PatchedRecipe, 'image'|'created_by'|'created_at'|'updated_at'|'food_properties'|'rating'|'last_cooked'>;
|
|
}
|
|
|
|
export interface ApiRecipeRelatedListRequest {
|
|
id: number;
|
|
}
|
|
|
|
export interface ApiRecipeRetrieveRequest {
|
|
id: number;
|
|
}
|
|
|
|
export interface ApiRecipeShoppingUpdateRequest {
|
|
id: number;
|
|
recipeShoppingUpdate: RecipeShoppingUpdate;
|
|
}
|
|
|
|
export interface ApiRecipeUpdateRequest {
|
|
id: number;
|
|
recipe: Omit<Recipe, 'image'|'created_by'|'created_at'|'updated_at'|'food_properties'|'rating'|'last_cooked'>;
|
|
}
|
|
|
|
export interface ApiShareLinkRetrieveRequest {
|
|
id: number;
|
|
}
|
|
|
|
export interface ApiShoppingListEntryBulkCreateRequest {
|
|
shoppingListEntryBulk: Omit<ShoppingListEntryBulk, 'timestamp'>;
|
|
}
|
|
|
|
export interface ApiShoppingListEntryCreateRequest {
|
|
shoppingListEntry: Omit<ShoppingListEntry, 'recipe_mealplan'|'created_by'|'created_at'|'updated_at'>;
|
|
}
|
|
|
|
export interface ApiShoppingListEntryDestroyRequest {
|
|
id: number;
|
|
}
|
|
|
|
export interface ApiShoppingListEntryListRequest {
|
|
mealplan?: number;
|
|
page?: number;
|
|
pageSize?: number;
|
|
updatedAfter?: Date;
|
|
}
|
|
|
|
export interface ApiShoppingListEntryPartialUpdateRequest {
|
|
id: number;
|
|
patchedShoppingListEntry?: Omit<PatchedShoppingListEntry, 'recipe_mealplan'|'created_by'|'created_at'|'updated_at'>;
|
|
}
|
|
|
|
export interface ApiShoppingListEntryRetrieveRequest {
|
|
id: number;
|
|
}
|
|
|
|
export interface ApiShoppingListEntryUpdateRequest {
|
|
id: number;
|
|
shoppingListEntry: Omit<ShoppingListEntry, 'recipe_mealplan'|'created_by'|'created_at'|'updated_at'>;
|
|
}
|
|
|
|
export interface ApiShoppingListRecipeBulkCreateEntriesCreateRequest {
|
|
id: number;
|
|
shoppingListEntryBulkCreate: ShoppingListEntryBulkCreate;
|
|
}
|
|
|
|
export interface ApiShoppingListRecipeCreateRequest {
|
|
shoppingListRecipe: Omit<ShoppingListRecipe, 'recipe_name'|'mealplan_note'|'mealplan_from_date'|'mealplan_type'>;
|
|
}
|
|
|
|
export interface ApiShoppingListRecipeDestroyRequest {
|
|
id: number;
|
|
}
|
|
|
|
export interface ApiShoppingListRecipeListRequest {
|
|
mealplan?: number;
|
|
page?: number;
|
|
pageSize?: number;
|
|
}
|
|
|
|
export interface ApiShoppingListRecipePartialUpdateRequest {
|
|
id: number;
|
|
patchedShoppingListRecipe?: Omit<PatchedShoppingListRecipe, 'recipe_name'|'mealplan_note'|'mealplan_from_date'|'mealplan_type'>;
|
|
}
|
|
|
|
export interface ApiShoppingListRecipeRetrieveRequest {
|
|
id: number;
|
|
}
|
|
|
|
export interface ApiShoppingListRecipeUpdateRequest {
|
|
id: number;
|
|
shoppingListRecipe: Omit<ShoppingListRecipe, 'recipe_name'|'mealplan_note'|'mealplan_from_date'|'mealplan_type'>;
|
|
}
|
|
|
|
export interface ApiSpaceListRequest {
|
|
page?: number;
|
|
pageSize?: number;
|
|
}
|
|
|
|
export interface ApiSpacePartialUpdateRequest {
|
|
id: number;
|
|
patchedSpace?: Omit<PatchedSpace, 'created_by'|'created_at'|'max_recipes'|'max_file_storage_mb'|'max_users'|'allow_sharing'|'demo'|'user_count'|'recipe_count'|'file_size_mb'>;
|
|
}
|
|
|
|
export interface ApiSpaceRetrieveRequest {
|
|
id: number;
|
|
}
|
|
|
|
export interface ApiStepCreateRequest {
|
|
step: Omit<Step, 'instructions_markdown'|'step_recipe_data'|'numrecipe'>;
|
|
}
|
|
|
|
export interface ApiStepDestroyRequest {
|
|
id: number;
|
|
}
|
|
|
|
export interface ApiStepListRequest {
|
|
page?: number;
|
|
pageSize?: number;
|
|
query?: string;
|
|
recipe?: Array<number>;
|
|
}
|
|
|
|
export interface ApiStepPartialUpdateRequest {
|
|
id: number;
|
|
patchedStep?: Omit<PatchedStep, 'instructions_markdown'|'step_recipe_data'|'numrecipe'>;
|
|
}
|
|
|
|
export interface ApiStepRetrieveRequest {
|
|
id: number;
|
|
}
|
|
|
|
export interface ApiStepUpdateRequest {
|
|
id: number;
|
|
step: Omit<Step, 'instructions_markdown'|'step_recipe_data'|'numrecipe'>;
|
|
}
|
|
|
|
export interface ApiStorageCreateRequest {
|
|
storage: Omit<Storage, 'created_by'>;
|
|
}
|
|
|
|
export interface ApiStorageDestroyRequest {
|
|
id: number;
|
|
}
|
|
|
|
export interface ApiStoragePartialUpdateRequest {
|
|
id: number;
|
|
patchedStorage?: Omit<PatchedStorage, 'created_by'>;
|
|
}
|
|
|
|
export interface ApiStorageRetrieveRequest {
|
|
id: number;
|
|
}
|
|
|
|
export interface ApiStorageUpdateRequest {
|
|
id: number;
|
|
storage: Omit<Storage, 'created_by'>;
|
|
}
|
|
|
|
export interface ApiSupermarketCategoryCreateRequest {
|
|
supermarketCategory: SupermarketCategory;
|
|
}
|
|
|
|
export interface ApiSupermarketCategoryDestroyRequest {
|
|
id: number;
|
|
}
|
|
|
|
export interface ApiSupermarketCategoryListRequest {
|
|
limit?: string;
|
|
page?: number;
|
|
pageSize?: number;
|
|
query?: string;
|
|
random?: string;
|
|
updatedAt?: string;
|
|
}
|
|
|
|
export interface ApiSupermarketCategoryMergeUpdateRequest {
|
|
id: number;
|
|
target: number;
|
|
supermarketCategory: SupermarketCategory;
|
|
}
|
|
|
|
export interface ApiSupermarketCategoryPartialUpdateRequest {
|
|
id: number;
|
|
patchedSupermarketCategory?: PatchedSupermarketCategory;
|
|
}
|
|
|
|
export interface ApiSupermarketCategoryRelationCreateRequest {
|
|
supermarketCategoryRelation: SupermarketCategoryRelation;
|
|
}
|
|
|
|
export interface ApiSupermarketCategoryRelationDestroyRequest {
|
|
id: number;
|
|
}
|
|
|
|
export interface ApiSupermarketCategoryRelationListRequest {
|
|
limit?: string;
|
|
page?: number;
|
|
pageSize?: number;
|
|
query?: string;
|
|
random?: string;
|
|
updatedAt?: string;
|
|
}
|
|
|
|
export interface ApiSupermarketCategoryRelationPartialUpdateRequest {
|
|
id: number;
|
|
patchedSupermarketCategoryRelation?: PatchedSupermarketCategoryRelation;
|
|
}
|
|
|
|
export interface ApiSupermarketCategoryRelationRetrieveRequest {
|
|
id: number;
|
|
}
|
|
|
|
export interface ApiSupermarketCategoryRelationUpdateRequest {
|
|
id: number;
|
|
supermarketCategoryRelation: SupermarketCategoryRelation;
|
|
}
|
|
|
|
export interface ApiSupermarketCategoryRetrieveRequest {
|
|
id: number;
|
|
}
|
|
|
|
export interface ApiSupermarketCategoryUpdateRequest {
|
|
id: number;
|
|
supermarketCategory: SupermarketCategory;
|
|
}
|
|
|
|
export interface ApiSupermarketCreateRequest {
|
|
supermarket: Omit<Supermarket, 'category_to_supermarket'>;
|
|
}
|
|
|
|
export interface ApiSupermarketDestroyRequest {
|
|
id: number;
|
|
}
|
|
|
|
export interface ApiSupermarketListRequest {
|
|
limit?: string;
|
|
page?: number;
|
|
pageSize?: number;
|
|
query?: string;
|
|
random?: string;
|
|
updatedAt?: string;
|
|
}
|
|
|
|
export interface ApiSupermarketPartialUpdateRequest {
|
|
id: number;
|
|
patchedSupermarket?: Omit<PatchedSupermarket, 'category_to_supermarket'>;
|
|
}
|
|
|
|
export interface ApiSupermarketRetrieveRequest {
|
|
id: number;
|
|
}
|
|
|
|
export interface ApiSupermarketUpdateRequest {
|
|
id: number;
|
|
supermarket: Omit<Supermarket, 'category_to_supermarket'>;
|
|
}
|
|
|
|
export interface ApiSwitchActiveSpaceRetrieveRequest {
|
|
spaceId: number;
|
|
}
|
|
|
|
export interface ApiSyncCreateRequest {
|
|
sync: Omit<Sync, 'created_at'|'updated_at'>;
|
|
}
|
|
|
|
export interface ApiSyncDestroyRequest {
|
|
id: number;
|
|
}
|
|
|
|
export interface ApiSyncListRequest {
|
|
page?: number;
|
|
pageSize?: number;
|
|
}
|
|
|
|
export interface ApiSyncLogListRequest {
|
|
page?: number;
|
|
pageSize?: number;
|
|
}
|
|
|
|
export interface ApiSyncLogRetrieveRequest {
|
|
id: number;
|
|
}
|
|
|
|
export interface ApiSyncPartialUpdateRequest {
|
|
id: number;
|
|
patchedSync?: Omit<PatchedSync, 'created_at'|'updated_at'>;
|
|
}
|
|
|
|
export interface ApiSyncRetrieveRequest {
|
|
id: number;
|
|
}
|
|
|
|
export interface ApiSyncUpdateRequest {
|
|
id: number;
|
|
sync: Omit<Sync, 'created_at'|'updated_at'>;
|
|
}
|
|
|
|
export interface ApiUnitConversionCreateRequest {
|
|
unitConversion: Omit<UnitConversion, 'name'>;
|
|
}
|
|
|
|
export interface ApiUnitConversionDestroyRequest {
|
|
id: number;
|
|
}
|
|
|
|
export interface ApiUnitConversionListRequest {
|
|
foodId?: number;
|
|
page?: number;
|
|
pageSize?: number;
|
|
}
|
|
|
|
export interface ApiUnitConversionPartialUpdateRequest {
|
|
id: number;
|
|
patchedUnitConversion?: Omit<PatchedUnitConversion, 'name'>;
|
|
}
|
|
|
|
export interface ApiUnitConversionRetrieveRequest {
|
|
id: number;
|
|
}
|
|
|
|
export interface ApiUnitConversionUpdateRequest {
|
|
id: number;
|
|
unitConversion: Omit<UnitConversion, 'name'>;
|
|
}
|
|
|
|
export interface ApiUnitCreateRequest {
|
|
unit: Unit;
|
|
}
|
|
|
|
export interface ApiUnitDestroyRequest {
|
|
id: number;
|
|
}
|
|
|
|
export interface ApiUnitListRequest {
|
|
limit?: string;
|
|
page?: number;
|
|
pageSize?: number;
|
|
query?: string;
|
|
random?: string;
|
|
updatedAt?: string;
|
|
}
|
|
|
|
export interface ApiUnitMergeUpdateRequest {
|
|
id: number;
|
|
target: number;
|
|
unit: Unit;
|
|
}
|
|
|
|
export interface ApiUnitPartialUpdateRequest {
|
|
id: number;
|
|
patchedUnit?: PatchedUnit;
|
|
}
|
|
|
|
export interface ApiUnitRetrieveRequest {
|
|
id: number;
|
|
}
|
|
|
|
export interface ApiUnitUpdateRequest {
|
|
id: number;
|
|
unit: Unit;
|
|
}
|
|
|
|
export interface ApiUserFileCreateRequest {
|
|
name: string;
|
|
fileDownload: string;
|
|
preview: string;
|
|
fileSizeKb: number;
|
|
createdBy: User;
|
|
createdAt: Date;
|
|
id?: number;
|
|
file?: string;
|
|
}
|
|
|
|
export interface ApiUserFileDestroyRequest {
|
|
id: number;
|
|
}
|
|
|
|
export interface ApiUserFileListRequest {
|
|
limit?: string;
|
|
page?: number;
|
|
pageSize?: number;
|
|
query?: string;
|
|
random?: string;
|
|
updatedAt?: string;
|
|
}
|
|
|
|
export interface ApiUserFilePartialUpdateRequest {
|
|
id: number;
|
|
id2?: number;
|
|
name?: string;
|
|
file?: string;
|
|
fileDownload?: string;
|
|
preview?: string;
|
|
fileSizeKb?: number;
|
|
createdBy?: User;
|
|
createdAt?: Date;
|
|
}
|
|
|
|
export interface ApiUserFileRetrieveRequest {
|
|
id: number;
|
|
}
|
|
|
|
export interface ApiUserFileUpdateRequest {
|
|
id: number;
|
|
name: string;
|
|
fileDownload: string;
|
|
preview: string;
|
|
fileSizeKb: number;
|
|
createdBy: User;
|
|
createdAt: Date;
|
|
id2?: number;
|
|
file?: string;
|
|
}
|
|
|
|
export interface ApiUserListRequest {
|
|
filterList?: Array<string>;
|
|
}
|
|
|
|
export interface ApiUserPartialUpdateRequest {
|
|
id: number;
|
|
patchedUser?: Omit<PatchedUser, 'username'|'display_name'>;
|
|
}
|
|
|
|
export interface ApiUserPreferencePartialUpdateRequest {
|
|
user: number;
|
|
patchedUserPreference?: Omit<PatchedUserPreference, 'user'|'food_inherit_default'|'food_children_exist'>;
|
|
}
|
|
|
|
export interface ApiUserPreferenceRetrieveRequest {
|
|
user: number;
|
|
}
|
|
|
|
export interface ApiUserRetrieveRequest {
|
|
id: number;
|
|
}
|
|
|
|
export interface ApiUserSpaceDestroyRequest {
|
|
id: number;
|
|
}
|
|
|
|
export interface ApiUserSpaceListRequest {
|
|
internalNote?: string;
|
|
page?: number;
|
|
pageSize?: number;
|
|
}
|
|
|
|
export interface ApiUserSpacePartialUpdateRequest {
|
|
id: number;
|
|
patchedUserSpace?: Omit<PatchedUserSpace, 'user'|'space'|'invite_link'|'created_at'|'updated_at'>;
|
|
}
|
|
|
|
export interface ApiUserSpaceRetrieveRequest {
|
|
id: number;
|
|
}
|
|
|
|
export interface ApiUserSpaceUpdateRequest {
|
|
id: number;
|
|
userSpace: Omit<UserSpace, 'user'|'space'|'invite_link'|'created_at'|'updated_at'>;
|
|
}
|
|
|
|
export interface ApiViewLogCreateRequest {
|
|
viewLog: Omit<ViewLog, 'created_by'|'created_at'>;
|
|
}
|
|
|
|
export interface ApiViewLogDestroyRequest {
|
|
id: number;
|
|
}
|
|
|
|
export interface ApiViewLogListRequest {
|
|
page?: number;
|
|
pageSize?: number;
|
|
}
|
|
|
|
export interface ApiViewLogPartialUpdateRequest {
|
|
id: number;
|
|
patchedViewLog?: Omit<PatchedViewLog, 'created_by'|'created_at'>;
|
|
}
|
|
|
|
export interface ApiViewLogRetrieveRequest {
|
|
id: number;
|
|
}
|
|
|
|
export interface ApiViewLogUpdateRequest {
|
|
id: number;
|
|
viewLog: Omit<ViewLog, 'created_by'|'created_at'>;
|
|
}
|
|
|
|
/**
|
|
*
|
|
*/
|
|
export class ApiApi extends runtime.BaseAPI {
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiAccessTokenCreateRaw(requestParameters: ApiAccessTokenCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AccessToken>> {
|
|
if (requestParameters['accessToken'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'accessToken',
|
|
'Required parameter "accessToken" was null or undefined when calling apiAccessTokenCreate().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
headerParameters['Content-Type'] = 'application/json';
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/access-token/`,
|
|
method: 'POST',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
body: AccessTokenToJSON(requestParameters['accessToken']),
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => AccessTokenFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiAccessTokenCreate(requestParameters: ApiAccessTokenCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AccessToken> {
|
|
const response = await this.apiAccessTokenCreateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiAccessTokenDestroyRaw(requestParameters: ApiAccessTokenDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiAccessTokenDestroy().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/access-token/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'DELETE',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.VoidApiResponse(response);
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiAccessTokenDestroy(requestParameters: ApiAccessTokenDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
await this.apiAccessTokenDestroyRaw(requestParameters, initOverrides);
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiAccessTokenListRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<AccessToken>>> {
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/access-token/`,
|
|
method: 'GET',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(AccessTokenFromJSON));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiAccessTokenList(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<AccessToken>> {
|
|
const response = await this.apiAccessTokenListRaw(initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiAccessTokenPartialUpdateRaw(requestParameters: ApiAccessTokenPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AccessToken>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiAccessTokenPartialUpdate().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
headerParameters['Content-Type'] = 'application/json';
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/access-token/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'PATCH',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
body: PatchedAccessTokenToJSON(requestParameters['patchedAccessToken']),
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => AccessTokenFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiAccessTokenPartialUpdate(requestParameters: ApiAccessTokenPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AccessToken> {
|
|
const response = await this.apiAccessTokenPartialUpdateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiAccessTokenRetrieveRaw(requestParameters: ApiAccessTokenRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AccessToken>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiAccessTokenRetrieve().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/access-token/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'GET',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => AccessTokenFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiAccessTokenRetrieve(requestParameters: ApiAccessTokenRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AccessToken> {
|
|
const response = await this.apiAccessTokenRetrieveRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiAccessTokenUpdateRaw(requestParameters: ApiAccessTokenUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AccessToken>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiAccessTokenUpdate().'
|
|
);
|
|
}
|
|
|
|
if (requestParameters['accessToken'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'accessToken',
|
|
'Required parameter "accessToken" was null or undefined when calling apiAccessTokenUpdate().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
headerParameters['Content-Type'] = 'application/json';
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/access-token/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'PUT',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
body: AccessTokenToJSON(requestParameters['accessToken']),
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => AccessTokenFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiAccessTokenUpdate(requestParameters: ApiAccessTokenUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AccessToken> {
|
|
const response = await this.apiAccessTokenUpdateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiAutoPlanCreateRaw(requestParameters: ApiAutoPlanCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AutoMealPlan>> {
|
|
if (requestParameters['autoMealPlan'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'autoMealPlan',
|
|
'Required parameter "autoMealPlan" was null or undefined when calling apiAutoPlanCreate().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
headerParameters['Content-Type'] = 'application/json';
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/auto-plan/`,
|
|
method: 'POST',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
body: AutoMealPlanToJSON(requestParameters['autoMealPlan']),
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => AutoMealPlanFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiAutoPlanCreate(requestParameters: ApiAutoPlanCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AutoMealPlan> {
|
|
const response = await this.apiAutoPlanCreateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiAutomationCreateRaw(requestParameters: ApiAutomationCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Automation>> {
|
|
if (requestParameters['automation'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'automation',
|
|
'Required parameter "automation" was null or undefined when calling apiAutomationCreate().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
headerParameters['Content-Type'] = 'application/json';
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/automation/`,
|
|
method: 'POST',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
body: AutomationToJSON(requestParameters['automation']),
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => AutomationFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiAutomationCreate(requestParameters: ApiAutomationCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Automation> {
|
|
const response = await this.apiAutomationCreateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiAutomationDestroyRaw(requestParameters: ApiAutomationDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiAutomationDestroy().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/automation/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'DELETE',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.VoidApiResponse(response);
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiAutomationDestroy(requestParameters: ApiAutomationDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
await this.apiAutomationDestroyRaw(requestParameters, initOverrides);
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiAutomationListRaw(requestParameters: ApiAutomationListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PaginatedAutomationList>> {
|
|
const queryParameters: any = {};
|
|
|
|
if (requestParameters['page'] != null) {
|
|
queryParameters['page'] = requestParameters['page'];
|
|
}
|
|
|
|
if (requestParameters['pageSize'] != null) {
|
|
queryParameters['page_size'] = requestParameters['pageSize'];
|
|
}
|
|
|
|
if (requestParameters['type'] != null) {
|
|
queryParameters['type'] = requestParameters['type'];
|
|
}
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/automation/`,
|
|
method: 'GET',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedAutomationListFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiAutomationList(requestParameters: ApiAutomationListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedAutomationList> {
|
|
const response = await this.apiAutomationListRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiAutomationPartialUpdateRaw(requestParameters: ApiAutomationPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Automation>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiAutomationPartialUpdate().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
headerParameters['Content-Type'] = 'application/json';
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/automation/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'PATCH',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
body: PatchedAutomationToJSON(requestParameters['patchedAutomation']),
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => AutomationFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiAutomationPartialUpdate(requestParameters: ApiAutomationPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Automation> {
|
|
const response = await this.apiAutomationPartialUpdateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiAutomationRetrieveRaw(requestParameters: ApiAutomationRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Automation>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiAutomationRetrieve().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/automation/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'GET',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => AutomationFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiAutomationRetrieve(requestParameters: ApiAutomationRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Automation> {
|
|
const response = await this.apiAutomationRetrieveRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiAutomationUpdateRaw(requestParameters: ApiAutomationUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Automation>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiAutomationUpdate().'
|
|
);
|
|
}
|
|
|
|
if (requestParameters['automation'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'automation',
|
|
'Required parameter "automation" was null or undefined when calling apiAutomationUpdate().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
headerParameters['Content-Type'] = 'application/json';
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/automation/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'PUT',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
body: AutomationToJSON(requestParameters['automation']),
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => AutomationFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiAutomationUpdate(requestParameters: ApiAutomationUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Automation> {
|
|
const response = await this.apiAutomationUpdateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiBookmarkletImportCreateRaw(requestParameters: ApiBookmarkletImportCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<BookmarkletImport>> {
|
|
if (requestParameters['bookmarkletImport'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'bookmarkletImport',
|
|
'Required parameter "bookmarkletImport" was null or undefined when calling apiBookmarkletImportCreate().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
headerParameters['Content-Type'] = 'application/json';
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/bookmarklet-import/`,
|
|
method: 'POST',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
body: BookmarkletImportToJSON(requestParameters['bookmarkletImport']),
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => BookmarkletImportFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiBookmarkletImportCreate(requestParameters: ApiBookmarkletImportCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<BookmarkletImport> {
|
|
const response = await this.apiBookmarkletImportCreateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiBookmarkletImportDestroyRaw(requestParameters: ApiBookmarkletImportDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiBookmarkletImportDestroy().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/bookmarklet-import/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'DELETE',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.VoidApiResponse(response);
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiBookmarkletImportDestroy(requestParameters: ApiBookmarkletImportDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
await this.apiBookmarkletImportDestroyRaw(requestParameters, initOverrides);
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiBookmarkletImportListRaw(requestParameters: ApiBookmarkletImportListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PaginatedBookmarkletImportListList>> {
|
|
const queryParameters: any = {};
|
|
|
|
if (requestParameters['page'] != null) {
|
|
queryParameters['page'] = requestParameters['page'];
|
|
}
|
|
|
|
if (requestParameters['pageSize'] != null) {
|
|
queryParameters['page_size'] = requestParameters['pageSize'];
|
|
}
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/bookmarklet-import/`,
|
|
method: 'GET',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedBookmarkletImportListListFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiBookmarkletImportList(requestParameters: ApiBookmarkletImportListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedBookmarkletImportListList> {
|
|
const response = await this.apiBookmarkletImportListRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiBookmarkletImportPartialUpdateRaw(requestParameters: ApiBookmarkletImportPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<BookmarkletImport>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiBookmarkletImportPartialUpdate().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
headerParameters['Content-Type'] = 'application/json';
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/bookmarklet-import/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'PATCH',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
body: PatchedBookmarkletImportToJSON(requestParameters['patchedBookmarkletImport']),
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => BookmarkletImportFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiBookmarkletImportPartialUpdate(requestParameters: ApiBookmarkletImportPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<BookmarkletImport> {
|
|
const response = await this.apiBookmarkletImportPartialUpdateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiBookmarkletImportRetrieveRaw(requestParameters: ApiBookmarkletImportRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<BookmarkletImport>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiBookmarkletImportRetrieve().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/bookmarklet-import/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'GET',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => BookmarkletImportFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiBookmarkletImportRetrieve(requestParameters: ApiBookmarkletImportRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<BookmarkletImport> {
|
|
const response = await this.apiBookmarkletImportRetrieveRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiBookmarkletImportUpdateRaw(requestParameters: ApiBookmarkletImportUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<BookmarkletImport>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiBookmarkletImportUpdate().'
|
|
);
|
|
}
|
|
|
|
if (requestParameters['bookmarkletImport'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'bookmarkletImport',
|
|
'Required parameter "bookmarkletImport" was null or undefined when calling apiBookmarkletImportUpdate().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
headerParameters['Content-Type'] = 'application/json';
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/bookmarklet-import/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'PUT',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
body: BookmarkletImportToJSON(requestParameters['bookmarkletImport']),
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => BookmarkletImportFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiBookmarkletImportUpdate(requestParameters: ApiBookmarkletImportUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<BookmarkletImport> {
|
|
const response = await this.apiBookmarkletImportUpdateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiConnectorConfigCreateRaw(requestParameters: ApiConnectorConfigCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ConnectorConfigConfig>> {
|
|
if (requestParameters['connectorConfigConfig'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'connectorConfigConfig',
|
|
'Required parameter "connectorConfigConfig" was null or undefined when calling apiConnectorConfigCreate().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
headerParameters['Content-Type'] = 'application/json';
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/connector-config/`,
|
|
method: 'POST',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
body: ConnectorConfigConfigToJSON(requestParameters['connectorConfigConfig']),
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => ConnectorConfigConfigFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiConnectorConfigCreate(requestParameters: ApiConnectorConfigCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ConnectorConfigConfig> {
|
|
const response = await this.apiConnectorConfigCreateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiConnectorConfigDestroyRaw(requestParameters: ApiConnectorConfigDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiConnectorConfigDestroy().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/connector-config/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'DELETE',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.VoidApiResponse(response);
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiConnectorConfigDestroy(requestParameters: ApiConnectorConfigDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
await this.apiConnectorConfigDestroyRaw(requestParameters, initOverrides);
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiConnectorConfigListRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<ConnectorConfigConfig>>> {
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/connector-config/`,
|
|
method: 'GET',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(ConnectorConfigConfigFromJSON));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiConnectorConfigList(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<ConnectorConfigConfig>> {
|
|
const response = await this.apiConnectorConfigListRaw(initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiConnectorConfigPartialUpdateRaw(requestParameters: ApiConnectorConfigPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ConnectorConfigConfig>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiConnectorConfigPartialUpdate().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
headerParameters['Content-Type'] = 'application/json';
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/connector-config/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'PATCH',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
body: PatchedConnectorConfigConfigToJSON(requestParameters['patchedConnectorConfigConfig']),
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => ConnectorConfigConfigFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiConnectorConfigPartialUpdate(requestParameters: ApiConnectorConfigPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ConnectorConfigConfig> {
|
|
const response = await this.apiConnectorConfigPartialUpdateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiConnectorConfigRetrieveRaw(requestParameters: ApiConnectorConfigRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ConnectorConfigConfig>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiConnectorConfigRetrieve().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/connector-config/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'GET',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => ConnectorConfigConfigFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiConnectorConfigRetrieve(requestParameters: ApiConnectorConfigRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ConnectorConfigConfig> {
|
|
const response = await this.apiConnectorConfigRetrieveRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiConnectorConfigUpdateRaw(requestParameters: ApiConnectorConfigUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ConnectorConfigConfig>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiConnectorConfigUpdate().'
|
|
);
|
|
}
|
|
|
|
if (requestParameters['connectorConfigConfig'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'connectorConfigConfig',
|
|
'Required parameter "connectorConfigConfig" was null or undefined when calling apiConnectorConfigUpdate().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
headerParameters['Content-Type'] = 'application/json';
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/connector-config/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'PUT',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
body: ConnectorConfigConfigToJSON(requestParameters['connectorConfigConfig']),
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => ConnectorConfigConfigFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiConnectorConfigUpdate(requestParameters: ApiConnectorConfigUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ConnectorConfigConfig> {
|
|
const response = await this.apiConnectorConfigUpdateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiCookLogCreateRaw(requestParameters: ApiCookLogCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CookLog>> {
|
|
if (requestParameters['cookLog'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'cookLog',
|
|
'Required parameter "cookLog" was null or undefined when calling apiCookLogCreate().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
headerParameters['Content-Type'] = 'application/json';
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/cook-log/`,
|
|
method: 'POST',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
body: CookLogToJSON(requestParameters['cookLog']),
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => CookLogFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiCookLogCreate(requestParameters: ApiCookLogCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CookLog> {
|
|
const response = await this.apiCookLogCreateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiCookLogDestroyRaw(requestParameters: ApiCookLogDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiCookLogDestroy().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/cook-log/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'DELETE',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.VoidApiResponse(response);
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiCookLogDestroy(requestParameters: ApiCookLogDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
await this.apiCookLogDestroyRaw(requestParameters, initOverrides);
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiCookLogListRaw(requestParameters: ApiCookLogListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PaginatedCookLogList>> {
|
|
const queryParameters: any = {};
|
|
|
|
if (requestParameters['page'] != null) {
|
|
queryParameters['page'] = requestParameters['page'];
|
|
}
|
|
|
|
if (requestParameters['pageSize'] != null) {
|
|
queryParameters['page_size'] = requestParameters['pageSize'];
|
|
}
|
|
|
|
if (requestParameters['recipe'] != null) {
|
|
queryParameters['recipe'] = requestParameters['recipe'];
|
|
}
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/cook-log/`,
|
|
method: 'GET',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedCookLogListFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiCookLogList(requestParameters: ApiCookLogListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedCookLogList> {
|
|
const response = await this.apiCookLogListRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiCookLogPartialUpdateRaw(requestParameters: ApiCookLogPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CookLog>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiCookLogPartialUpdate().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
headerParameters['Content-Type'] = 'application/json';
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/cook-log/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'PATCH',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
body: PatchedCookLogToJSON(requestParameters['patchedCookLog']),
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => CookLogFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiCookLogPartialUpdate(requestParameters: ApiCookLogPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CookLog> {
|
|
const response = await this.apiCookLogPartialUpdateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiCookLogRetrieveRaw(requestParameters: ApiCookLogRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CookLog>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiCookLogRetrieve().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/cook-log/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'GET',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => CookLogFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiCookLogRetrieve(requestParameters: ApiCookLogRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CookLog> {
|
|
const response = await this.apiCookLogRetrieveRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiCookLogUpdateRaw(requestParameters: ApiCookLogUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CookLog>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiCookLogUpdate().'
|
|
);
|
|
}
|
|
|
|
if (requestParameters['cookLog'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'cookLog',
|
|
'Required parameter "cookLog" was null or undefined when calling apiCookLogUpdate().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
headerParameters['Content-Type'] = 'application/json';
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/cook-log/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'PUT',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
body: CookLogToJSON(requestParameters['cookLog']),
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => CookLogFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiCookLogUpdate(requestParameters: ApiCookLogUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CookLog> {
|
|
const response = await this.apiCookLogUpdateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiCustomFilterCreateRaw(requestParameters: ApiCustomFilterCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CustomFilter>> {
|
|
if (requestParameters['customFilter'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'customFilter',
|
|
'Required parameter "customFilter" was null or undefined when calling apiCustomFilterCreate().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
headerParameters['Content-Type'] = 'application/json';
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/custom-filter/`,
|
|
method: 'POST',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
body: CustomFilterToJSON(requestParameters['customFilter']),
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => CustomFilterFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiCustomFilterCreate(requestParameters: ApiCustomFilterCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CustomFilter> {
|
|
const response = await this.apiCustomFilterCreateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiCustomFilterDestroyRaw(requestParameters: ApiCustomFilterDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiCustomFilterDestroy().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/custom-filter/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'DELETE',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.VoidApiResponse(response);
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiCustomFilterDestroy(requestParameters: ApiCustomFilterDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
await this.apiCustomFilterDestroyRaw(requestParameters, initOverrides);
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiCustomFilterListRaw(requestParameters: ApiCustomFilterListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PaginatedCustomFilterList>> {
|
|
const queryParameters: any = {};
|
|
|
|
if (requestParameters['limit'] != null) {
|
|
queryParameters['limit'] = requestParameters['limit'];
|
|
}
|
|
|
|
if (requestParameters['page'] != null) {
|
|
queryParameters['page'] = requestParameters['page'];
|
|
}
|
|
|
|
if (requestParameters['pageSize'] != null) {
|
|
queryParameters['page_size'] = requestParameters['pageSize'];
|
|
}
|
|
|
|
if (requestParameters['query'] != null) {
|
|
queryParameters['query'] = requestParameters['query'];
|
|
}
|
|
|
|
if (requestParameters['random'] != null) {
|
|
queryParameters['random'] = requestParameters['random'];
|
|
}
|
|
|
|
if (requestParameters['type'] != null) {
|
|
queryParameters['type'] = requestParameters['type'];
|
|
}
|
|
|
|
if (requestParameters['updatedAt'] != null) {
|
|
queryParameters['updated_at'] = requestParameters['updatedAt'];
|
|
}
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/custom-filter/`,
|
|
method: 'GET',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedCustomFilterListFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiCustomFilterList(requestParameters: ApiCustomFilterListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedCustomFilterList> {
|
|
const response = await this.apiCustomFilterListRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiCustomFilterPartialUpdateRaw(requestParameters: ApiCustomFilterPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CustomFilter>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiCustomFilterPartialUpdate().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
headerParameters['Content-Type'] = 'application/json';
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/custom-filter/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'PATCH',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
body: PatchedCustomFilterToJSON(requestParameters['patchedCustomFilter']),
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => CustomFilterFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiCustomFilterPartialUpdate(requestParameters: ApiCustomFilterPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CustomFilter> {
|
|
const response = await this.apiCustomFilterPartialUpdateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiCustomFilterRetrieveRaw(requestParameters: ApiCustomFilterRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CustomFilter>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiCustomFilterRetrieve().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/custom-filter/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'GET',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => CustomFilterFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiCustomFilterRetrieve(requestParameters: ApiCustomFilterRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CustomFilter> {
|
|
const response = await this.apiCustomFilterRetrieveRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiCustomFilterUpdateRaw(requestParameters: ApiCustomFilterUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CustomFilter>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiCustomFilterUpdate().'
|
|
);
|
|
}
|
|
|
|
if (requestParameters['customFilter'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'customFilter',
|
|
'Required parameter "customFilter" was null or undefined when calling apiCustomFilterUpdate().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
headerParameters['Content-Type'] = 'application/json';
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/custom-filter/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'PUT',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
body: CustomFilterToJSON(requestParameters['customFilter']),
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => CustomFilterFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiCustomFilterUpdate(requestParameters: ApiCustomFilterUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CustomFilter> {
|
|
const response = await this.apiCustomFilterUpdateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* function to download a user file securely (wrapping as zip to prevent any context based XSS problems) temporary solution until a real file manager is implemented
|
|
*/
|
|
async apiDownloadFileRetrieveRaw(requestParameters: ApiDownloadFileRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
if (requestParameters['fileId'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'fileId',
|
|
'Required parameter "fileId" was null or undefined when calling apiDownloadFileRetrieve().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/download-file/{fileId}/`.replace(`{${"fileId"}}`, encodeURIComponent(String(requestParameters['fileId']))),
|
|
method: 'GET',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.VoidApiResponse(response);
|
|
}
|
|
|
|
/**
|
|
* function to download a user file securely (wrapping as zip to prevent any context based XSS problems) temporary solution until a real file manager is implemented
|
|
*/
|
|
async apiDownloadFileRetrieve(requestParameters: ApiDownloadFileRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
await this.apiDownloadFileRetrieveRaw(requestParameters, initOverrides);
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiExportLogCreateRaw(requestParameters: ApiExportLogCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ExportLog>> {
|
|
if (requestParameters['exportLog'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'exportLog',
|
|
'Required parameter "exportLog" was null or undefined when calling apiExportLogCreate().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
headerParameters['Content-Type'] = 'application/json';
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/export-log/`,
|
|
method: 'POST',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
body: ExportLogToJSON(requestParameters['exportLog']),
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => ExportLogFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiExportLogCreate(requestParameters: ApiExportLogCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ExportLog> {
|
|
const response = await this.apiExportLogCreateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiExportLogDestroyRaw(requestParameters: ApiExportLogDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiExportLogDestroy().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/export-log/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'DELETE',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.VoidApiResponse(response);
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiExportLogDestroy(requestParameters: ApiExportLogDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
await this.apiExportLogDestroyRaw(requestParameters, initOverrides);
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiExportLogListRaw(requestParameters: ApiExportLogListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PaginatedExportLogList>> {
|
|
const queryParameters: any = {};
|
|
|
|
if (requestParameters['page'] != null) {
|
|
queryParameters['page'] = requestParameters['page'];
|
|
}
|
|
|
|
if (requestParameters['pageSize'] != null) {
|
|
queryParameters['page_size'] = requestParameters['pageSize'];
|
|
}
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/export-log/`,
|
|
method: 'GET',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedExportLogListFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiExportLogList(requestParameters: ApiExportLogListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedExportLogList> {
|
|
const response = await this.apiExportLogListRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiExportLogPartialUpdateRaw(requestParameters: ApiExportLogPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ExportLog>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiExportLogPartialUpdate().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
headerParameters['Content-Type'] = 'application/json';
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/export-log/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'PATCH',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
body: PatchedExportLogToJSON(requestParameters['patchedExportLog']),
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => ExportLogFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiExportLogPartialUpdate(requestParameters: ApiExportLogPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ExportLog> {
|
|
const response = await this.apiExportLogPartialUpdateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiExportLogRetrieveRaw(requestParameters: ApiExportLogRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ExportLog>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiExportLogRetrieve().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/export-log/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'GET',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => ExportLogFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiExportLogRetrieve(requestParameters: ApiExportLogRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ExportLog> {
|
|
const response = await this.apiExportLogRetrieveRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiExportLogUpdateRaw(requestParameters: ApiExportLogUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ExportLog>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiExportLogUpdate().'
|
|
);
|
|
}
|
|
|
|
if (requestParameters['exportLog'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'exportLog',
|
|
'Required parameter "exportLog" was null or undefined when calling apiExportLogUpdate().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
headerParameters['Content-Type'] = 'application/json';
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/export-log/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'PUT',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
body: ExportLogToJSON(requestParameters['exportLog']),
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => ExportLogFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiExportLogUpdate(requestParameters: ApiExportLogUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ExportLog> {
|
|
const response = await this.apiExportLogUpdateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiFoodCreateRaw(requestParameters: ApiFoodCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Food>> {
|
|
if (requestParameters['food'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'food',
|
|
'Required parameter "food" was null or undefined when calling apiFoodCreate().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
headerParameters['Content-Type'] = 'application/json';
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/food/`,
|
|
method: 'POST',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
body: FoodToJSON(requestParameters['food']),
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => FoodFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiFoodCreate(requestParameters: ApiFoodCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Food> {
|
|
const response = await this.apiFoodCreateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiFoodDestroyRaw(requestParameters: ApiFoodDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiFoodDestroy().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/food/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'DELETE',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.VoidApiResponse(response);
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiFoodDestroy(requestParameters: ApiFoodDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
await this.apiFoodDestroyRaw(requestParameters, initOverrides);
|
|
}
|
|
|
|
/**
|
|
* updates the food with all possible data from the FDC Api if properties with a fdc_id already exist they will be overridden, if existing properties don\'t have a fdc_id they won\'t be changed
|
|
*/
|
|
async apiFoodFdcCreateRaw(requestParameters: ApiFoodFdcCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Food>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiFoodFdcCreate().'
|
|
);
|
|
}
|
|
|
|
if (requestParameters['food'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'food',
|
|
'Required parameter "food" was null or undefined when calling apiFoodFdcCreate().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
headerParameters['Content-Type'] = 'application/json';
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/food/{id}/fdc/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'POST',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
body: FoodToJSON(requestParameters['food']),
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => FoodFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* updates the food with all possible data from the FDC Api if properties with a fdc_id already exist they will be overridden, if existing properties don\'t have a fdc_id they won\'t be changed
|
|
*/
|
|
async apiFoodFdcCreate(requestParameters: ApiFoodFdcCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Food> {
|
|
const response = await this.apiFoodFdcCreateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiFoodInheritFieldListRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<FoodInheritField>>> {
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/food-inherit-field/`,
|
|
method: 'GET',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(FoodInheritFieldFromJSON));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiFoodInheritFieldList(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<FoodInheritField>> {
|
|
const response = await this.apiFoodInheritFieldListRaw(initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiFoodInheritFieldRetrieveRaw(requestParameters: ApiFoodInheritFieldRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<FoodInheritField>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiFoodInheritFieldRetrieve().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/food-inherit-field/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'GET',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => FoodInheritFieldFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiFoodInheritFieldRetrieve(requestParameters: ApiFoodInheritFieldRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<FoodInheritField> {
|
|
const response = await this.apiFoodInheritFieldRetrieveRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiFoodListRaw(requestParameters: ApiFoodListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PaginatedFoodList>> {
|
|
const queryParameters: any = {};
|
|
|
|
if (requestParameters['limit'] != null) {
|
|
queryParameters['limit'] = requestParameters['limit'];
|
|
}
|
|
|
|
if (requestParameters['page'] != null) {
|
|
queryParameters['page'] = requestParameters['page'];
|
|
}
|
|
|
|
if (requestParameters['pageSize'] != null) {
|
|
queryParameters['page_size'] = requestParameters['pageSize'];
|
|
}
|
|
|
|
if (requestParameters['query'] != null) {
|
|
queryParameters['query'] = requestParameters['query'];
|
|
}
|
|
|
|
if (requestParameters['random'] != null) {
|
|
queryParameters['random'] = requestParameters['random'];
|
|
}
|
|
|
|
if (requestParameters['root'] != null) {
|
|
queryParameters['root'] = requestParameters['root'];
|
|
}
|
|
|
|
if (requestParameters['tree'] != null) {
|
|
queryParameters['tree'] = requestParameters['tree'];
|
|
}
|
|
|
|
if (requestParameters['updatedAt'] != null) {
|
|
queryParameters['updated_at'] = requestParameters['updatedAt'];
|
|
}
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/food/`,
|
|
method: 'GET',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedFoodListFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiFoodList(requestParameters: ApiFoodListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedFoodList> {
|
|
const response = await this.apiFoodListRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiFoodMergeUpdateRaw(requestParameters: ApiFoodMergeUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Food>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiFoodMergeUpdate().'
|
|
);
|
|
}
|
|
|
|
if (requestParameters['target'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'target',
|
|
'Required parameter "target" was null or undefined when calling apiFoodMergeUpdate().'
|
|
);
|
|
}
|
|
|
|
if (requestParameters['food'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'food',
|
|
'Required parameter "food" was null or undefined when calling apiFoodMergeUpdate().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
headerParameters['Content-Type'] = 'application/json';
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/food/{id}/merge/{target}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))).replace(`{${"target"}}`, encodeURIComponent(String(requestParameters['target']))),
|
|
method: 'PUT',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
body: FoodToJSON(requestParameters['food']),
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => FoodFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiFoodMergeUpdate(requestParameters: ApiFoodMergeUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Food> {
|
|
const response = await this.apiFoodMergeUpdateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiFoodMoveUpdateRaw(requestParameters: ApiFoodMoveUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Food>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiFoodMoveUpdate().'
|
|
);
|
|
}
|
|
|
|
if (requestParameters['parent'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'parent',
|
|
'Required parameter "parent" was null or undefined when calling apiFoodMoveUpdate().'
|
|
);
|
|
}
|
|
|
|
if (requestParameters['food'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'food',
|
|
'Required parameter "food" was null or undefined when calling apiFoodMoveUpdate().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
headerParameters['Content-Type'] = 'application/json';
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/food/{id}/move/{parent}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))).replace(`{${"parent"}}`, encodeURIComponent(String(requestParameters['parent']))),
|
|
method: 'PUT',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
body: FoodToJSON(requestParameters['food']),
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => FoodFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiFoodMoveUpdate(requestParameters: ApiFoodMoveUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Food> {
|
|
const response = await this.apiFoodMoveUpdateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiFoodPartialUpdateRaw(requestParameters: ApiFoodPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Food>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiFoodPartialUpdate().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
headerParameters['Content-Type'] = 'application/json';
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/food/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'PATCH',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
body: PatchedFoodToJSON(requestParameters['patchedFood']),
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => FoodFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiFoodPartialUpdate(requestParameters: ApiFoodPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Food> {
|
|
const response = await this.apiFoodPartialUpdateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiFoodRetrieveRaw(requestParameters: ApiFoodRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Food>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiFoodRetrieve().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/food/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'GET',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => FoodFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiFoodRetrieve(requestParameters: ApiFoodRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Food> {
|
|
const response = await this.apiFoodRetrieveRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiFoodShoppingUpdateRaw(requestParameters: ApiFoodShoppingUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<FoodShoppingUpdate>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiFoodShoppingUpdate().'
|
|
);
|
|
}
|
|
|
|
if (requestParameters['foodShoppingUpdate'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'foodShoppingUpdate',
|
|
'Required parameter "foodShoppingUpdate" was null or undefined when calling apiFoodShoppingUpdate().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
headerParameters['Content-Type'] = 'application/json';
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/food/{id}/shopping/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'PUT',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
body: FoodShoppingUpdateToJSON(requestParameters['foodShoppingUpdate']),
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => FoodShoppingUpdateFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiFoodShoppingUpdate(requestParameters: ApiFoodShoppingUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<FoodShoppingUpdate> {
|
|
const response = await this.apiFoodShoppingUpdateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiFoodUpdateRaw(requestParameters: ApiFoodUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Food>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiFoodUpdate().'
|
|
);
|
|
}
|
|
|
|
if (requestParameters['food'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'food',
|
|
'Required parameter "food" was null or undefined when calling apiFoodUpdate().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
headerParameters['Content-Type'] = 'application/json';
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/food/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'PUT',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
body: FoodToJSON(requestParameters['food']),
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => FoodFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiFoodUpdate(requestParameters: ApiFoodUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Food> {
|
|
const response = await this.apiFoodUpdateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiGetExternalFileLinkRetrieveRaw(requestParameters: ApiGetExternalFileLinkRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
if (requestParameters['recipeId'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'recipeId',
|
|
'Required parameter "recipeId" was null or undefined when calling apiGetExternalFileLinkRetrieve().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/get_external_file_link/{recipeId}/`.replace(`{${"recipeId"}}`, encodeURIComponent(String(requestParameters['recipeId']))),
|
|
method: 'GET',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.VoidApiResponse(response);
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiGetExternalFileLinkRetrieve(requestParameters: ApiGetExternalFileLinkRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
await this.apiGetExternalFileLinkRetrieveRaw(requestParameters, initOverrides);
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiGetRecipeFileRetrieveRaw(requestParameters: ApiGetRecipeFileRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
if (requestParameters['recipeId'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'recipeId',
|
|
'Required parameter "recipeId" was null or undefined when calling apiGetRecipeFileRetrieve().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/get_recipe_file/{recipeId}/`.replace(`{${"recipeId"}}`, encodeURIComponent(String(requestParameters['recipeId']))),
|
|
method: 'GET',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.VoidApiResponse(response);
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiGetRecipeFileRetrieve(requestParameters: ApiGetRecipeFileRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
await this.apiGetRecipeFileRetrieveRaw(requestParameters, initOverrides);
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiGroupListRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<Group>>> {
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/group/`,
|
|
method: 'GET',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(GroupFromJSON));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiGroupList(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<Group>> {
|
|
const response = await this.apiGroupListRaw(initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiGroupRetrieveRaw(requestParameters: ApiGroupRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Group>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiGroupRetrieve().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/group/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'GET',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => GroupFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiGroupRetrieve(requestParameters: ApiGroupRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Group> {
|
|
const response = await this.apiGroupRetrieveRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiImageToRecipeCreateRaw(requestParameters: ApiImageToRecipeCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ImportImage>> {
|
|
if (requestParameters['importImage'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'importImage',
|
|
'Required parameter "importImage" was null or undefined when calling apiImageToRecipeCreate().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
headerParameters['Content-Type'] = 'application/json';
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/image-to-recipe`,
|
|
method: 'POST',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
body: ImportImageToJSON(requestParameters['importImage']),
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => ImportImageFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiImageToRecipeCreate(requestParameters: ApiImageToRecipeCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ImportImage> {
|
|
const response = await this.apiImageToRecipeCreateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* function to handle files passed by application importer
|
|
*/
|
|
async apiImportCreateRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/import/`,
|
|
method: 'POST',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.VoidApiResponse(response);
|
|
}
|
|
|
|
/**
|
|
* function to handle files passed by application importer
|
|
*/
|
|
async apiImportCreate(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
await this.apiImportCreateRaw(initOverrides);
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiImportLogCreateRaw(requestParameters: ApiImportLogCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ImportLog>> {
|
|
if (requestParameters['importLog'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'importLog',
|
|
'Required parameter "importLog" was null or undefined when calling apiImportLogCreate().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
headerParameters['Content-Type'] = 'application/json';
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/import-log/`,
|
|
method: 'POST',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
body: ImportLogToJSON(requestParameters['importLog']),
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => ImportLogFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiImportLogCreate(requestParameters: ApiImportLogCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ImportLog> {
|
|
const response = await this.apiImportLogCreateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiImportLogDestroyRaw(requestParameters: ApiImportLogDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiImportLogDestroy().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/import-log/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'DELETE',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.VoidApiResponse(response);
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiImportLogDestroy(requestParameters: ApiImportLogDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
await this.apiImportLogDestroyRaw(requestParameters, initOverrides);
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiImportLogListRaw(requestParameters: ApiImportLogListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PaginatedImportLogList>> {
|
|
const queryParameters: any = {};
|
|
|
|
if (requestParameters['page'] != null) {
|
|
queryParameters['page'] = requestParameters['page'];
|
|
}
|
|
|
|
if (requestParameters['pageSize'] != null) {
|
|
queryParameters['page_size'] = requestParameters['pageSize'];
|
|
}
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/import-log/`,
|
|
method: 'GET',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedImportLogListFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiImportLogList(requestParameters: ApiImportLogListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedImportLogList> {
|
|
const response = await this.apiImportLogListRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiImportLogPartialUpdateRaw(requestParameters: ApiImportLogPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ImportLog>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiImportLogPartialUpdate().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
headerParameters['Content-Type'] = 'application/json';
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/import-log/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'PATCH',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
body: PatchedImportLogToJSON(requestParameters['patchedImportLog']),
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => ImportLogFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiImportLogPartialUpdate(requestParameters: ApiImportLogPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ImportLog> {
|
|
const response = await this.apiImportLogPartialUpdateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiImportLogRetrieveRaw(requestParameters: ApiImportLogRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ImportLog>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiImportLogRetrieve().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/import-log/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'GET',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => ImportLogFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiImportLogRetrieve(requestParameters: ApiImportLogRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ImportLog> {
|
|
const response = await this.apiImportLogRetrieveRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiImportLogUpdateRaw(requestParameters: ApiImportLogUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ImportLog>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiImportLogUpdate().'
|
|
);
|
|
}
|
|
|
|
if (requestParameters['importLog'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'importLog',
|
|
'Required parameter "importLog" was null or undefined when calling apiImportLogUpdate().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
headerParameters['Content-Type'] = 'application/json';
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/import-log/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'PUT',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
body: ImportLogToJSON(requestParameters['importLog']),
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => ImportLogFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiImportLogUpdate(requestParameters: ApiImportLogUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ImportLog> {
|
|
const response = await this.apiImportLogUpdateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiIngredientCreateRaw(requestParameters: ApiIngredientCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Ingredient>> {
|
|
if (requestParameters['ingredient'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'ingredient',
|
|
'Required parameter "ingredient" was null or undefined when calling apiIngredientCreate().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
headerParameters['Content-Type'] = 'application/json';
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/ingredient/`,
|
|
method: 'POST',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
body: IngredientToJSON(requestParameters['ingredient']),
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => IngredientFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiIngredientCreate(requestParameters: ApiIngredientCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Ingredient> {
|
|
const response = await this.apiIngredientCreateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiIngredientDestroyRaw(requestParameters: ApiIngredientDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiIngredientDestroy().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/ingredient/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'DELETE',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.VoidApiResponse(response);
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiIngredientDestroy(requestParameters: ApiIngredientDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
await this.apiIngredientDestroyRaw(requestParameters, initOverrides);
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiIngredientFromStringCreateRaw(requestParameters: ApiIngredientFromStringCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ParsedIngredient>> {
|
|
if (requestParameters['ingredientString'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'ingredientString',
|
|
'Required parameter "ingredientString" was null or undefined when calling apiIngredientFromStringCreate().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
headerParameters['Content-Type'] = 'application/json';
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/ingredient-from-string/`,
|
|
method: 'POST',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
body: IngredientStringToJSON(requestParameters['ingredientString']),
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => ParsedIngredientFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiIngredientFromStringCreate(requestParameters: ApiIngredientFromStringCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ParsedIngredient> {
|
|
const response = await this.apiIngredientFromStringCreateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiIngredientListRaw(requestParameters: ApiIngredientListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PaginatedIngredientList>> {
|
|
const queryParameters: any = {};
|
|
|
|
if (requestParameters['food'] != null) {
|
|
queryParameters['food'] = requestParameters['food'];
|
|
}
|
|
|
|
if (requestParameters['page'] != null) {
|
|
queryParameters['page'] = requestParameters['page'];
|
|
}
|
|
|
|
if (requestParameters['pageSize'] != null) {
|
|
queryParameters['page_size'] = requestParameters['pageSize'];
|
|
}
|
|
|
|
if (requestParameters['unit'] != null) {
|
|
queryParameters['unit'] = requestParameters['unit'];
|
|
}
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/ingredient/`,
|
|
method: 'GET',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedIngredientListFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiIngredientList(requestParameters: ApiIngredientListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedIngredientList> {
|
|
const response = await this.apiIngredientListRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiIngredientPartialUpdateRaw(requestParameters: ApiIngredientPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Ingredient>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiIngredientPartialUpdate().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
headerParameters['Content-Type'] = 'application/json';
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/ingredient/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'PATCH',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
body: PatchedIngredientToJSON(requestParameters['patchedIngredient']),
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => IngredientFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiIngredientPartialUpdate(requestParameters: ApiIngredientPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Ingredient> {
|
|
const response = await this.apiIngredientPartialUpdateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiIngredientRetrieveRaw(requestParameters: ApiIngredientRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Ingredient>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiIngredientRetrieve().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/ingredient/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'GET',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => IngredientFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiIngredientRetrieve(requestParameters: ApiIngredientRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Ingredient> {
|
|
const response = await this.apiIngredientRetrieveRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiIngredientUpdateRaw(requestParameters: ApiIngredientUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Ingredient>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiIngredientUpdate().'
|
|
);
|
|
}
|
|
|
|
if (requestParameters['ingredient'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'ingredient',
|
|
'Required parameter "ingredient" was null or undefined when calling apiIngredientUpdate().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
headerParameters['Content-Type'] = 'application/json';
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/ingredient/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'PUT',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
body: IngredientToJSON(requestParameters['ingredient']),
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => IngredientFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiIngredientUpdate(requestParameters: ApiIngredientUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Ingredient> {
|
|
const response = await this.apiIngredientUpdateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiInviteLinkCreateRaw(requestParameters: ApiInviteLinkCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<InviteLink>> {
|
|
if (requestParameters['inviteLink'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'inviteLink',
|
|
'Required parameter "inviteLink" was null or undefined when calling apiInviteLinkCreate().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
headerParameters['Content-Type'] = 'application/json';
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/invite-link/`,
|
|
method: 'POST',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
body: InviteLinkToJSON(requestParameters['inviteLink']),
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => InviteLinkFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiInviteLinkCreate(requestParameters: ApiInviteLinkCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<InviteLink> {
|
|
const response = await this.apiInviteLinkCreateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiInviteLinkDestroyRaw(requestParameters: ApiInviteLinkDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiInviteLinkDestroy().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/invite-link/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'DELETE',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.VoidApiResponse(response);
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiInviteLinkDestroy(requestParameters: ApiInviteLinkDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
await this.apiInviteLinkDestroyRaw(requestParameters, initOverrides);
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiInviteLinkListRaw(requestParameters: ApiInviteLinkListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PaginatedInviteLinkList>> {
|
|
const queryParameters: any = {};
|
|
|
|
if (requestParameters['internalNote'] != null) {
|
|
queryParameters['internal_note'] = requestParameters['internalNote'];
|
|
}
|
|
|
|
if (requestParameters['limit'] != null) {
|
|
queryParameters['limit'] = requestParameters['limit'];
|
|
}
|
|
|
|
if (requestParameters['page'] != null) {
|
|
queryParameters['page'] = requestParameters['page'];
|
|
}
|
|
|
|
if (requestParameters['pageSize'] != null) {
|
|
queryParameters['page_size'] = requestParameters['pageSize'];
|
|
}
|
|
|
|
if (requestParameters['query'] != null) {
|
|
queryParameters['query'] = requestParameters['query'];
|
|
}
|
|
|
|
if (requestParameters['random'] != null) {
|
|
queryParameters['random'] = requestParameters['random'];
|
|
}
|
|
|
|
if (requestParameters['updatedAt'] != null) {
|
|
queryParameters['updated_at'] = requestParameters['updatedAt'];
|
|
}
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/invite-link/`,
|
|
method: 'GET',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedInviteLinkListFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiInviteLinkList(requestParameters: ApiInviteLinkListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedInviteLinkList> {
|
|
const response = await this.apiInviteLinkListRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiInviteLinkPartialUpdateRaw(requestParameters: ApiInviteLinkPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<InviteLink>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiInviteLinkPartialUpdate().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
headerParameters['Content-Type'] = 'application/json';
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/invite-link/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'PATCH',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
body: PatchedInviteLinkToJSON(requestParameters['patchedInviteLink']),
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => InviteLinkFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiInviteLinkPartialUpdate(requestParameters: ApiInviteLinkPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<InviteLink> {
|
|
const response = await this.apiInviteLinkPartialUpdateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiInviteLinkRetrieveRaw(requestParameters: ApiInviteLinkRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<InviteLink>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiInviteLinkRetrieve().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/invite-link/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'GET',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => InviteLinkFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiInviteLinkRetrieve(requestParameters: ApiInviteLinkRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<InviteLink> {
|
|
const response = await this.apiInviteLinkRetrieveRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiInviteLinkUpdateRaw(requestParameters: ApiInviteLinkUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<InviteLink>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiInviteLinkUpdate().'
|
|
);
|
|
}
|
|
|
|
if (requestParameters['inviteLink'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'inviteLink',
|
|
'Required parameter "inviteLink" was null or undefined when calling apiInviteLinkUpdate().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
headerParameters['Content-Type'] = 'application/json';
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/invite-link/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'PUT',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
body: InviteLinkToJSON(requestParameters['inviteLink']),
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => InviteLinkFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiInviteLinkUpdate(requestParameters: ApiInviteLinkUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<InviteLink> {
|
|
const response = await this.apiInviteLinkUpdateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiKeywordCreateRaw(requestParameters: ApiKeywordCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Keyword>> {
|
|
if (requestParameters['keyword'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'keyword',
|
|
'Required parameter "keyword" was null or undefined when calling apiKeywordCreate().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
headerParameters['Content-Type'] = 'application/json';
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/keyword/`,
|
|
method: 'POST',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
body: KeywordToJSON(requestParameters['keyword']),
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => KeywordFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiKeywordCreate(requestParameters: ApiKeywordCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Keyword> {
|
|
const response = await this.apiKeywordCreateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiKeywordDestroyRaw(requestParameters: ApiKeywordDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiKeywordDestroy().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/keyword/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'DELETE',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.VoidApiResponse(response);
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiKeywordDestroy(requestParameters: ApiKeywordDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
await this.apiKeywordDestroyRaw(requestParameters, initOverrides);
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiKeywordListRaw(requestParameters: ApiKeywordListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PaginatedKeywordList>> {
|
|
const queryParameters: any = {};
|
|
|
|
if (requestParameters['limit'] != null) {
|
|
queryParameters['limit'] = requestParameters['limit'];
|
|
}
|
|
|
|
if (requestParameters['page'] != null) {
|
|
queryParameters['page'] = requestParameters['page'];
|
|
}
|
|
|
|
if (requestParameters['pageSize'] != null) {
|
|
queryParameters['page_size'] = requestParameters['pageSize'];
|
|
}
|
|
|
|
if (requestParameters['query'] != null) {
|
|
queryParameters['query'] = requestParameters['query'];
|
|
}
|
|
|
|
if (requestParameters['random'] != null) {
|
|
queryParameters['random'] = requestParameters['random'];
|
|
}
|
|
|
|
if (requestParameters['root'] != null) {
|
|
queryParameters['root'] = requestParameters['root'];
|
|
}
|
|
|
|
if (requestParameters['tree'] != null) {
|
|
queryParameters['tree'] = requestParameters['tree'];
|
|
}
|
|
|
|
if (requestParameters['updatedAt'] != null) {
|
|
queryParameters['updated_at'] = requestParameters['updatedAt'];
|
|
}
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/keyword/`,
|
|
method: 'GET',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedKeywordListFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiKeywordList(requestParameters: ApiKeywordListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedKeywordList> {
|
|
const response = await this.apiKeywordListRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiKeywordMergeUpdateRaw(requestParameters: ApiKeywordMergeUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Keyword>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiKeywordMergeUpdate().'
|
|
);
|
|
}
|
|
|
|
if (requestParameters['target'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'target',
|
|
'Required parameter "target" was null or undefined when calling apiKeywordMergeUpdate().'
|
|
);
|
|
}
|
|
|
|
if (requestParameters['keyword'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'keyword',
|
|
'Required parameter "keyword" was null or undefined when calling apiKeywordMergeUpdate().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
headerParameters['Content-Type'] = 'application/json';
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/keyword/{id}/merge/{target}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))).replace(`{${"target"}}`, encodeURIComponent(String(requestParameters['target']))),
|
|
method: 'PUT',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
body: KeywordToJSON(requestParameters['keyword']),
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => KeywordFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiKeywordMergeUpdate(requestParameters: ApiKeywordMergeUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Keyword> {
|
|
const response = await this.apiKeywordMergeUpdateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiKeywordMoveUpdateRaw(requestParameters: ApiKeywordMoveUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Keyword>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiKeywordMoveUpdate().'
|
|
);
|
|
}
|
|
|
|
if (requestParameters['parent'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'parent',
|
|
'Required parameter "parent" was null or undefined when calling apiKeywordMoveUpdate().'
|
|
);
|
|
}
|
|
|
|
if (requestParameters['keyword'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'keyword',
|
|
'Required parameter "keyword" was null or undefined when calling apiKeywordMoveUpdate().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
headerParameters['Content-Type'] = 'application/json';
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/keyword/{id}/move/{parent}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))).replace(`{${"parent"}}`, encodeURIComponent(String(requestParameters['parent']))),
|
|
method: 'PUT',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
body: KeywordToJSON(requestParameters['keyword']),
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => KeywordFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiKeywordMoveUpdate(requestParameters: ApiKeywordMoveUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Keyword> {
|
|
const response = await this.apiKeywordMoveUpdateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiKeywordPartialUpdateRaw(requestParameters: ApiKeywordPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Keyword>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiKeywordPartialUpdate().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
headerParameters['Content-Type'] = 'application/json';
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/keyword/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'PATCH',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
body: PatchedKeywordToJSON(requestParameters['patchedKeyword']),
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => KeywordFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiKeywordPartialUpdate(requestParameters: ApiKeywordPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Keyword> {
|
|
const response = await this.apiKeywordPartialUpdateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiKeywordRetrieveRaw(requestParameters: ApiKeywordRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Keyword>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiKeywordRetrieve().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/keyword/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'GET',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => KeywordFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiKeywordRetrieve(requestParameters: ApiKeywordRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Keyword> {
|
|
const response = await this.apiKeywordRetrieveRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiKeywordUpdateRaw(requestParameters: ApiKeywordUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Keyword>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiKeywordUpdate().'
|
|
);
|
|
}
|
|
|
|
if (requestParameters['keyword'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'keyword',
|
|
'Required parameter "keyword" was null or undefined when calling apiKeywordUpdate().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
headerParameters['Content-Type'] = 'application/json';
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/keyword/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'PUT',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
body: KeywordToJSON(requestParameters['keyword']),
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => KeywordFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiKeywordUpdate(requestParameters: ApiKeywordUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Keyword> {
|
|
const response = await this.apiKeywordUpdateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiLocalizationListRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<Localization>>> {
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/localization/`,
|
|
method: 'GET',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(LocalizationFromJSON));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiLocalizationList(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<Localization>> {
|
|
const response = await this.apiLocalizationListRaw(initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiMealPlanCreateRaw(requestParameters: ApiMealPlanCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<MealPlan>> {
|
|
if (requestParameters['mealPlan'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'mealPlan',
|
|
'Required parameter "mealPlan" was null or undefined when calling apiMealPlanCreate().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
headerParameters['Content-Type'] = 'application/json';
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/meal-plan/`,
|
|
method: 'POST',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
body: MealPlanToJSON(requestParameters['mealPlan']),
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => MealPlanFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiMealPlanCreate(requestParameters: ApiMealPlanCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<MealPlan> {
|
|
const response = await this.apiMealPlanCreateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiMealPlanDestroyRaw(requestParameters: ApiMealPlanDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiMealPlanDestroy().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/meal-plan/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'DELETE',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.VoidApiResponse(response);
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiMealPlanDestroy(requestParameters: ApiMealPlanDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
await this.apiMealPlanDestroyRaw(requestParameters, initOverrides);
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiMealPlanIcalRetrieveRaw(requestParameters: ApiMealPlanIcalRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<string>> {
|
|
const queryParameters: any = {};
|
|
|
|
if (requestParameters['fromDate'] != null) {
|
|
queryParameters['from_date'] = requestParameters['fromDate'];
|
|
}
|
|
|
|
if (requestParameters['mealType'] != null) {
|
|
queryParameters['meal_type'] = requestParameters['mealType'];
|
|
}
|
|
|
|
if (requestParameters['toDate'] != null) {
|
|
queryParameters['to_date'] = requestParameters['toDate'];
|
|
}
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/meal-plan/ical/`,
|
|
method: 'GET',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
if (this.isJsonMime(response.headers.get('content-type'))) {
|
|
return new runtime.JSONApiResponse<string>(response);
|
|
} else {
|
|
return new runtime.TextApiResponse(response) as any;
|
|
}
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiMealPlanIcalRetrieve(requestParameters: ApiMealPlanIcalRetrieveRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<string> {
|
|
const response = await this.apiMealPlanIcalRetrieveRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiMealPlanListRaw(requestParameters: ApiMealPlanListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PaginatedMealPlanList>> {
|
|
const queryParameters: any = {};
|
|
|
|
if (requestParameters['fromDate'] != null) {
|
|
queryParameters['from_date'] = requestParameters['fromDate'];
|
|
}
|
|
|
|
if (requestParameters['mealType'] != null) {
|
|
queryParameters['meal_type'] = requestParameters['mealType'];
|
|
}
|
|
|
|
if (requestParameters['page'] != null) {
|
|
queryParameters['page'] = requestParameters['page'];
|
|
}
|
|
|
|
if (requestParameters['pageSize'] != null) {
|
|
queryParameters['page_size'] = requestParameters['pageSize'];
|
|
}
|
|
|
|
if (requestParameters['toDate'] != null) {
|
|
queryParameters['to_date'] = requestParameters['toDate'];
|
|
}
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/meal-plan/`,
|
|
method: 'GET',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedMealPlanListFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiMealPlanList(requestParameters: ApiMealPlanListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedMealPlanList> {
|
|
const response = await this.apiMealPlanListRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiMealPlanPartialUpdateRaw(requestParameters: ApiMealPlanPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<MealPlan>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiMealPlanPartialUpdate().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
headerParameters['Content-Type'] = 'application/json';
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/meal-plan/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'PATCH',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
body: PatchedMealPlanToJSON(requestParameters['patchedMealPlan']),
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => MealPlanFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiMealPlanPartialUpdate(requestParameters: ApiMealPlanPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<MealPlan> {
|
|
const response = await this.apiMealPlanPartialUpdateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiMealPlanRetrieveRaw(requestParameters: ApiMealPlanRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<MealPlan>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiMealPlanRetrieve().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/meal-plan/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'GET',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => MealPlanFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiMealPlanRetrieve(requestParameters: ApiMealPlanRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<MealPlan> {
|
|
const response = await this.apiMealPlanRetrieveRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiMealPlanUpdateRaw(requestParameters: ApiMealPlanUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<MealPlan>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiMealPlanUpdate().'
|
|
);
|
|
}
|
|
|
|
if (requestParameters['mealPlan'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'mealPlan',
|
|
'Required parameter "mealPlan" was null or undefined when calling apiMealPlanUpdate().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
headerParameters['Content-Type'] = 'application/json';
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/meal-plan/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'PUT',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
body: MealPlanToJSON(requestParameters['mealPlan']),
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => MealPlanFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiMealPlanUpdate(requestParameters: ApiMealPlanUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<MealPlan> {
|
|
const response = await this.apiMealPlanUpdateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* returns list of meal types created by the requesting user ordered by the order field.
|
|
*/
|
|
async apiMealTypeCreateRaw(requestParameters: ApiMealTypeCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<MealType>> {
|
|
if (requestParameters['mealType'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'mealType',
|
|
'Required parameter "mealType" was null or undefined when calling apiMealTypeCreate().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
headerParameters['Content-Type'] = 'application/json';
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/meal-type/`,
|
|
method: 'POST',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
body: MealTypeToJSON(requestParameters['mealType']),
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => MealTypeFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* returns list of meal types created by the requesting user ordered by the order field.
|
|
*/
|
|
async apiMealTypeCreate(requestParameters: ApiMealTypeCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<MealType> {
|
|
const response = await this.apiMealTypeCreateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* returns list of meal types created by the requesting user ordered by the order field.
|
|
*/
|
|
async apiMealTypeDestroyRaw(requestParameters: ApiMealTypeDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiMealTypeDestroy().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/meal-type/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'DELETE',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.VoidApiResponse(response);
|
|
}
|
|
|
|
/**
|
|
* returns list of meal types created by the requesting user ordered by the order field.
|
|
*/
|
|
async apiMealTypeDestroy(requestParameters: ApiMealTypeDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
await this.apiMealTypeDestroyRaw(requestParameters, initOverrides);
|
|
}
|
|
|
|
/**
|
|
* returns list of meal types created by the requesting user ordered by the order field.
|
|
*/
|
|
async apiMealTypeListRaw(requestParameters: ApiMealTypeListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PaginatedMealTypeList>> {
|
|
const queryParameters: any = {};
|
|
|
|
if (requestParameters['page'] != null) {
|
|
queryParameters['page'] = requestParameters['page'];
|
|
}
|
|
|
|
if (requestParameters['pageSize'] != null) {
|
|
queryParameters['page_size'] = requestParameters['pageSize'];
|
|
}
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/meal-type/`,
|
|
method: 'GET',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedMealTypeListFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* returns list of meal types created by the requesting user ordered by the order field.
|
|
*/
|
|
async apiMealTypeList(requestParameters: ApiMealTypeListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedMealTypeList> {
|
|
const response = await this.apiMealTypeListRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* returns list of meal types created by the requesting user ordered by the order field.
|
|
*/
|
|
async apiMealTypePartialUpdateRaw(requestParameters: ApiMealTypePartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<MealType>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiMealTypePartialUpdate().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
headerParameters['Content-Type'] = 'application/json';
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/meal-type/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'PATCH',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
body: PatchedMealTypeToJSON(requestParameters['patchedMealType']),
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => MealTypeFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* returns list of meal types created by the requesting user ordered by the order field.
|
|
*/
|
|
async apiMealTypePartialUpdate(requestParameters: ApiMealTypePartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<MealType> {
|
|
const response = await this.apiMealTypePartialUpdateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* returns list of meal types created by the requesting user ordered by the order field.
|
|
*/
|
|
async apiMealTypeRetrieveRaw(requestParameters: ApiMealTypeRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<MealType>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiMealTypeRetrieve().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/meal-type/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'GET',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => MealTypeFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* returns list of meal types created by the requesting user ordered by the order field.
|
|
*/
|
|
async apiMealTypeRetrieve(requestParameters: ApiMealTypeRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<MealType> {
|
|
const response = await this.apiMealTypeRetrieveRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* returns list of meal types created by the requesting user ordered by the order field.
|
|
*/
|
|
async apiMealTypeUpdateRaw(requestParameters: ApiMealTypeUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<MealType>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiMealTypeUpdate().'
|
|
);
|
|
}
|
|
|
|
if (requestParameters['mealType'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'mealType',
|
|
'Required parameter "mealType" was null or undefined when calling apiMealTypeUpdate().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
headerParameters['Content-Type'] = 'application/json';
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/meal-type/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'PUT',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
body: MealTypeToJSON(requestParameters['mealType']),
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => MealTypeFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* returns list of meal types created by the requesting user ordered by the order field.
|
|
*/
|
|
async apiMealTypeUpdate(requestParameters: ApiMealTypeUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<MealType> {
|
|
const response = await this.apiMealTypeUpdateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiOpenDataCategoryCreateRaw(requestParameters: ApiOpenDataCategoryCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<OpenDataCategory>> {
|
|
if (requestParameters['openDataCategory'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'openDataCategory',
|
|
'Required parameter "openDataCategory" was null or undefined when calling apiOpenDataCategoryCreate().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
headerParameters['Content-Type'] = 'application/json';
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/open-data-category/`,
|
|
method: 'POST',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
body: OpenDataCategoryToJSON(requestParameters['openDataCategory']),
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => OpenDataCategoryFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiOpenDataCategoryCreate(requestParameters: ApiOpenDataCategoryCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<OpenDataCategory> {
|
|
const response = await this.apiOpenDataCategoryCreateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiOpenDataCategoryDestroyRaw(requestParameters: ApiOpenDataCategoryDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiOpenDataCategoryDestroy().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/open-data-category/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'DELETE',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.VoidApiResponse(response);
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiOpenDataCategoryDestroy(requestParameters: ApiOpenDataCategoryDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
await this.apiOpenDataCategoryDestroyRaw(requestParameters, initOverrides);
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiOpenDataCategoryListRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<OpenDataCategory>>> {
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/open-data-category/`,
|
|
method: 'GET',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(OpenDataCategoryFromJSON));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiOpenDataCategoryList(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<OpenDataCategory>> {
|
|
const response = await this.apiOpenDataCategoryListRaw(initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiOpenDataCategoryPartialUpdateRaw(requestParameters: ApiOpenDataCategoryPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<OpenDataCategory>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiOpenDataCategoryPartialUpdate().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
headerParameters['Content-Type'] = 'application/json';
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/open-data-category/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'PATCH',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
body: PatchedOpenDataCategoryToJSON(requestParameters['patchedOpenDataCategory']),
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => OpenDataCategoryFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiOpenDataCategoryPartialUpdate(requestParameters: ApiOpenDataCategoryPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<OpenDataCategory> {
|
|
const response = await this.apiOpenDataCategoryPartialUpdateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiOpenDataCategoryRetrieveRaw(requestParameters: ApiOpenDataCategoryRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<OpenDataCategory>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiOpenDataCategoryRetrieve().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/open-data-category/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'GET',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => OpenDataCategoryFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiOpenDataCategoryRetrieve(requestParameters: ApiOpenDataCategoryRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<OpenDataCategory> {
|
|
const response = await this.apiOpenDataCategoryRetrieveRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiOpenDataCategoryUpdateRaw(requestParameters: ApiOpenDataCategoryUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<OpenDataCategory>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiOpenDataCategoryUpdate().'
|
|
);
|
|
}
|
|
|
|
if (requestParameters['openDataCategory'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'openDataCategory',
|
|
'Required parameter "openDataCategory" was null or undefined when calling apiOpenDataCategoryUpdate().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
headerParameters['Content-Type'] = 'application/json';
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/open-data-category/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'PUT',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
body: OpenDataCategoryToJSON(requestParameters['openDataCategory']),
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => OpenDataCategoryFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiOpenDataCategoryUpdate(requestParameters: ApiOpenDataCategoryUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<OpenDataCategory> {
|
|
const response = await this.apiOpenDataCategoryUpdateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiOpenDataConversionCreateRaw(requestParameters: ApiOpenDataConversionCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<OpenDataConversion>> {
|
|
if (requestParameters['openDataConversion'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'openDataConversion',
|
|
'Required parameter "openDataConversion" was null or undefined when calling apiOpenDataConversionCreate().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
headerParameters['Content-Type'] = 'application/json';
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/open-data-conversion/`,
|
|
method: 'POST',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
body: OpenDataConversionToJSON(requestParameters['openDataConversion']),
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => OpenDataConversionFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiOpenDataConversionCreate(requestParameters: ApiOpenDataConversionCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<OpenDataConversion> {
|
|
const response = await this.apiOpenDataConversionCreateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiOpenDataConversionDestroyRaw(requestParameters: ApiOpenDataConversionDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiOpenDataConversionDestroy().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/open-data-conversion/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'DELETE',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.VoidApiResponse(response);
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiOpenDataConversionDestroy(requestParameters: ApiOpenDataConversionDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
await this.apiOpenDataConversionDestroyRaw(requestParameters, initOverrides);
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiOpenDataConversionListRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<OpenDataConversion>>> {
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/open-data-conversion/`,
|
|
method: 'GET',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(OpenDataConversionFromJSON));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiOpenDataConversionList(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<OpenDataConversion>> {
|
|
const response = await this.apiOpenDataConversionListRaw(initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiOpenDataConversionPartialUpdateRaw(requestParameters: ApiOpenDataConversionPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<OpenDataConversion>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiOpenDataConversionPartialUpdate().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
headerParameters['Content-Type'] = 'application/json';
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/open-data-conversion/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'PATCH',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
body: PatchedOpenDataConversionToJSON(requestParameters['patchedOpenDataConversion']),
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => OpenDataConversionFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiOpenDataConversionPartialUpdate(requestParameters: ApiOpenDataConversionPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<OpenDataConversion> {
|
|
const response = await this.apiOpenDataConversionPartialUpdateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiOpenDataConversionRetrieveRaw(requestParameters: ApiOpenDataConversionRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<OpenDataConversion>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiOpenDataConversionRetrieve().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/open-data-conversion/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'GET',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => OpenDataConversionFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiOpenDataConversionRetrieve(requestParameters: ApiOpenDataConversionRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<OpenDataConversion> {
|
|
const response = await this.apiOpenDataConversionRetrieveRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiOpenDataConversionUpdateRaw(requestParameters: ApiOpenDataConversionUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<OpenDataConversion>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiOpenDataConversionUpdate().'
|
|
);
|
|
}
|
|
|
|
if (requestParameters['openDataConversion'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'openDataConversion',
|
|
'Required parameter "openDataConversion" was null or undefined when calling apiOpenDataConversionUpdate().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
headerParameters['Content-Type'] = 'application/json';
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/open-data-conversion/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'PUT',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
body: OpenDataConversionToJSON(requestParameters['openDataConversion']),
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => OpenDataConversionFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiOpenDataConversionUpdate(requestParameters: ApiOpenDataConversionUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<OpenDataConversion> {
|
|
const response = await this.apiOpenDataConversionUpdateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiOpenDataFDCRetrieveRaw(requestParameters: ApiOpenDataFDCRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiOpenDataFDCRetrieve().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/open-data-FDC/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'GET',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.VoidApiResponse(response);
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiOpenDataFDCRetrieve(requestParameters: ApiOpenDataFDCRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
await this.apiOpenDataFDCRetrieveRaw(requestParameters, initOverrides);
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiOpenDataFoodCreateRaw(requestParameters: ApiOpenDataFoodCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<OpenDataFood>> {
|
|
if (requestParameters['openDataFood'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'openDataFood',
|
|
'Required parameter "openDataFood" was null or undefined when calling apiOpenDataFoodCreate().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
headerParameters['Content-Type'] = 'application/json';
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/open-data-food/`,
|
|
method: 'POST',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
body: OpenDataFoodToJSON(requestParameters['openDataFood']),
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => OpenDataFoodFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiOpenDataFoodCreate(requestParameters: ApiOpenDataFoodCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<OpenDataFood> {
|
|
const response = await this.apiOpenDataFoodCreateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiOpenDataFoodDestroyRaw(requestParameters: ApiOpenDataFoodDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiOpenDataFoodDestroy().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/open-data-food/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'DELETE',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.VoidApiResponse(response);
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiOpenDataFoodDestroy(requestParameters: ApiOpenDataFoodDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
await this.apiOpenDataFoodDestroyRaw(requestParameters, initOverrides);
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiOpenDataFoodListRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<OpenDataFood>>> {
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/open-data-food/`,
|
|
method: 'GET',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(OpenDataFoodFromJSON));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiOpenDataFoodList(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<OpenDataFood>> {
|
|
const response = await this.apiOpenDataFoodListRaw(initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiOpenDataFoodPartialUpdateRaw(requestParameters: ApiOpenDataFoodPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<OpenDataFood>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiOpenDataFoodPartialUpdate().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
headerParameters['Content-Type'] = 'application/json';
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/open-data-food/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'PATCH',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
body: PatchedOpenDataFoodToJSON(requestParameters['patchedOpenDataFood']),
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => OpenDataFoodFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiOpenDataFoodPartialUpdate(requestParameters: ApiOpenDataFoodPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<OpenDataFood> {
|
|
const response = await this.apiOpenDataFoodPartialUpdateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiOpenDataFoodRetrieveRaw(requestParameters: ApiOpenDataFoodRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<OpenDataFood>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiOpenDataFoodRetrieve().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/open-data-food/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'GET',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => OpenDataFoodFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiOpenDataFoodRetrieve(requestParameters: ApiOpenDataFoodRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<OpenDataFood> {
|
|
const response = await this.apiOpenDataFoodRetrieveRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiOpenDataFoodUpdateRaw(requestParameters: ApiOpenDataFoodUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<OpenDataFood>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiOpenDataFoodUpdate().'
|
|
);
|
|
}
|
|
|
|
if (requestParameters['openDataFood'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'openDataFood',
|
|
'Required parameter "openDataFood" was null or undefined when calling apiOpenDataFoodUpdate().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
headerParameters['Content-Type'] = 'application/json';
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/open-data-food/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'PUT',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
body: OpenDataFoodToJSON(requestParameters['openDataFood']),
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => OpenDataFoodFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiOpenDataFoodUpdate(requestParameters: ApiOpenDataFoodUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<OpenDataFood> {
|
|
const response = await this.apiOpenDataFoodUpdateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiOpenDataPropertyCreateRaw(requestParameters: ApiOpenDataPropertyCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<OpenDataProperty>> {
|
|
if (requestParameters['openDataProperty'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'openDataProperty',
|
|
'Required parameter "openDataProperty" was null or undefined when calling apiOpenDataPropertyCreate().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
headerParameters['Content-Type'] = 'application/json';
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/open-data-property/`,
|
|
method: 'POST',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
body: OpenDataPropertyToJSON(requestParameters['openDataProperty']),
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => OpenDataPropertyFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiOpenDataPropertyCreate(requestParameters: ApiOpenDataPropertyCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<OpenDataProperty> {
|
|
const response = await this.apiOpenDataPropertyCreateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiOpenDataPropertyDestroyRaw(requestParameters: ApiOpenDataPropertyDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiOpenDataPropertyDestroy().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/open-data-property/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'DELETE',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.VoidApiResponse(response);
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiOpenDataPropertyDestroy(requestParameters: ApiOpenDataPropertyDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
await this.apiOpenDataPropertyDestroyRaw(requestParameters, initOverrides);
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiOpenDataPropertyListRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<OpenDataProperty>>> {
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/open-data-property/`,
|
|
method: 'GET',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(OpenDataPropertyFromJSON));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiOpenDataPropertyList(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<OpenDataProperty>> {
|
|
const response = await this.apiOpenDataPropertyListRaw(initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiOpenDataPropertyPartialUpdateRaw(requestParameters: ApiOpenDataPropertyPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<OpenDataProperty>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiOpenDataPropertyPartialUpdate().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
headerParameters['Content-Type'] = 'application/json';
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/open-data-property/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'PATCH',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
body: PatchedOpenDataPropertyToJSON(requestParameters['patchedOpenDataProperty']),
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => OpenDataPropertyFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiOpenDataPropertyPartialUpdate(requestParameters: ApiOpenDataPropertyPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<OpenDataProperty> {
|
|
const response = await this.apiOpenDataPropertyPartialUpdateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiOpenDataPropertyRetrieveRaw(requestParameters: ApiOpenDataPropertyRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<OpenDataProperty>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiOpenDataPropertyRetrieve().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/open-data-property/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'GET',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => OpenDataPropertyFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiOpenDataPropertyRetrieve(requestParameters: ApiOpenDataPropertyRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<OpenDataProperty> {
|
|
const response = await this.apiOpenDataPropertyRetrieveRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiOpenDataPropertyUpdateRaw(requestParameters: ApiOpenDataPropertyUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<OpenDataProperty>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiOpenDataPropertyUpdate().'
|
|
);
|
|
}
|
|
|
|
if (requestParameters['openDataProperty'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'openDataProperty',
|
|
'Required parameter "openDataProperty" was null or undefined when calling apiOpenDataPropertyUpdate().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
headerParameters['Content-Type'] = 'application/json';
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/open-data-property/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'PUT',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
body: OpenDataPropertyToJSON(requestParameters['openDataProperty']),
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => OpenDataPropertyFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiOpenDataPropertyUpdate(requestParameters: ApiOpenDataPropertyUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<OpenDataProperty> {
|
|
const response = await this.apiOpenDataPropertyUpdateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiOpenDataStatsRetrieveRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/open-data-stats/`,
|
|
method: 'GET',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.VoidApiResponse(response);
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiOpenDataStatsRetrieve(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
await this.apiOpenDataStatsRetrieveRaw(initOverrides);
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiOpenDataStoreCreateRaw(requestParameters: ApiOpenDataStoreCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<OpenDataStore>> {
|
|
if (requestParameters['openDataStore'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'openDataStore',
|
|
'Required parameter "openDataStore" was null or undefined when calling apiOpenDataStoreCreate().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
headerParameters['Content-Type'] = 'application/json';
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/open-data-store/`,
|
|
method: 'POST',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
body: OpenDataStoreToJSON(requestParameters['openDataStore']),
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => OpenDataStoreFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiOpenDataStoreCreate(requestParameters: ApiOpenDataStoreCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<OpenDataStore> {
|
|
const response = await this.apiOpenDataStoreCreateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiOpenDataStoreDestroyRaw(requestParameters: ApiOpenDataStoreDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiOpenDataStoreDestroy().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/open-data-store/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'DELETE',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.VoidApiResponse(response);
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiOpenDataStoreDestroy(requestParameters: ApiOpenDataStoreDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
await this.apiOpenDataStoreDestroyRaw(requestParameters, initOverrides);
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiOpenDataStoreListRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<OpenDataStore>>> {
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/open-data-store/`,
|
|
method: 'GET',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(OpenDataStoreFromJSON));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiOpenDataStoreList(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<OpenDataStore>> {
|
|
const response = await this.apiOpenDataStoreListRaw(initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiOpenDataStorePartialUpdateRaw(requestParameters: ApiOpenDataStorePartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<OpenDataStore>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiOpenDataStorePartialUpdate().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
headerParameters['Content-Type'] = 'application/json';
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/open-data-store/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'PATCH',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
body: PatchedOpenDataStoreToJSON(requestParameters['patchedOpenDataStore']),
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => OpenDataStoreFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiOpenDataStorePartialUpdate(requestParameters: ApiOpenDataStorePartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<OpenDataStore> {
|
|
const response = await this.apiOpenDataStorePartialUpdateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiOpenDataStoreRetrieveRaw(requestParameters: ApiOpenDataStoreRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<OpenDataStore>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiOpenDataStoreRetrieve().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/open-data-store/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'GET',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => OpenDataStoreFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiOpenDataStoreRetrieve(requestParameters: ApiOpenDataStoreRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<OpenDataStore> {
|
|
const response = await this.apiOpenDataStoreRetrieveRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiOpenDataStoreUpdateRaw(requestParameters: ApiOpenDataStoreUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<OpenDataStore>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiOpenDataStoreUpdate().'
|
|
);
|
|
}
|
|
|
|
if (requestParameters['openDataStore'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'openDataStore',
|
|
'Required parameter "openDataStore" was null or undefined when calling apiOpenDataStoreUpdate().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
headerParameters['Content-Type'] = 'application/json';
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/open-data-store/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'PUT',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
body: OpenDataStoreToJSON(requestParameters['openDataStore']),
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => OpenDataStoreFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiOpenDataStoreUpdate(requestParameters: ApiOpenDataStoreUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<OpenDataStore> {
|
|
const response = await this.apiOpenDataStoreUpdateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiOpenDataUnitCreateRaw(requestParameters: ApiOpenDataUnitCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<OpenDataUnit>> {
|
|
if (requestParameters['openDataUnit'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'openDataUnit',
|
|
'Required parameter "openDataUnit" was null or undefined when calling apiOpenDataUnitCreate().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
headerParameters['Content-Type'] = 'application/json';
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/open-data-unit/`,
|
|
method: 'POST',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
body: OpenDataUnitToJSON(requestParameters['openDataUnit']),
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => OpenDataUnitFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiOpenDataUnitCreate(requestParameters: ApiOpenDataUnitCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<OpenDataUnit> {
|
|
const response = await this.apiOpenDataUnitCreateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiOpenDataUnitDestroyRaw(requestParameters: ApiOpenDataUnitDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiOpenDataUnitDestroy().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/open-data-unit/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'DELETE',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.VoidApiResponse(response);
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiOpenDataUnitDestroy(requestParameters: ApiOpenDataUnitDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
await this.apiOpenDataUnitDestroyRaw(requestParameters, initOverrides);
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiOpenDataUnitListRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<OpenDataUnit>>> {
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/open-data-unit/`,
|
|
method: 'GET',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(OpenDataUnitFromJSON));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiOpenDataUnitList(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<OpenDataUnit>> {
|
|
const response = await this.apiOpenDataUnitListRaw(initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiOpenDataUnitPartialUpdateRaw(requestParameters: ApiOpenDataUnitPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<OpenDataUnit>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiOpenDataUnitPartialUpdate().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
headerParameters['Content-Type'] = 'application/json';
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/open-data-unit/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'PATCH',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
body: PatchedOpenDataUnitToJSON(requestParameters['patchedOpenDataUnit']),
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => OpenDataUnitFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiOpenDataUnitPartialUpdate(requestParameters: ApiOpenDataUnitPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<OpenDataUnit> {
|
|
const response = await this.apiOpenDataUnitPartialUpdateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiOpenDataUnitRetrieveRaw(requestParameters: ApiOpenDataUnitRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<OpenDataUnit>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiOpenDataUnitRetrieve().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/open-data-unit/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'GET',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => OpenDataUnitFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiOpenDataUnitRetrieve(requestParameters: ApiOpenDataUnitRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<OpenDataUnit> {
|
|
const response = await this.apiOpenDataUnitRetrieveRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiOpenDataUnitUpdateRaw(requestParameters: ApiOpenDataUnitUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<OpenDataUnit>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiOpenDataUnitUpdate().'
|
|
);
|
|
}
|
|
|
|
if (requestParameters['openDataUnit'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'openDataUnit',
|
|
'Required parameter "openDataUnit" was null or undefined when calling apiOpenDataUnitUpdate().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
headerParameters['Content-Type'] = 'application/json';
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/open-data-unit/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'PUT',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
body: OpenDataUnitToJSON(requestParameters['openDataUnit']),
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => OpenDataUnitFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiOpenDataUnitUpdate(requestParameters: ApiOpenDataUnitUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<OpenDataUnit> {
|
|
const response = await this.apiOpenDataUnitUpdateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiOpenDataVersionCreateRaw(requestParameters: ApiOpenDataVersionCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<OpenDataVersion>> {
|
|
if (requestParameters['openDataVersion'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'openDataVersion',
|
|
'Required parameter "openDataVersion" was null or undefined when calling apiOpenDataVersionCreate().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
headerParameters['Content-Type'] = 'application/json';
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/open-data-version/`,
|
|
method: 'POST',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
body: OpenDataVersionToJSON(requestParameters['openDataVersion']),
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => OpenDataVersionFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiOpenDataVersionCreate(requestParameters: ApiOpenDataVersionCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<OpenDataVersion> {
|
|
const response = await this.apiOpenDataVersionCreateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiOpenDataVersionDestroyRaw(requestParameters: ApiOpenDataVersionDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiOpenDataVersionDestroy().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/open-data-version/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'DELETE',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.VoidApiResponse(response);
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiOpenDataVersionDestroy(requestParameters: ApiOpenDataVersionDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
await this.apiOpenDataVersionDestroyRaw(requestParameters, initOverrides);
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiOpenDataVersionListRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<OpenDataVersion>>> {
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/open-data-version/`,
|
|
method: 'GET',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(OpenDataVersionFromJSON));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiOpenDataVersionList(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<OpenDataVersion>> {
|
|
const response = await this.apiOpenDataVersionListRaw(initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiOpenDataVersionPartialUpdateRaw(requestParameters: ApiOpenDataVersionPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<OpenDataVersion>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiOpenDataVersionPartialUpdate().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
headerParameters['Content-Type'] = 'application/json';
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/open-data-version/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'PATCH',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
body: PatchedOpenDataVersionToJSON(requestParameters['patchedOpenDataVersion']),
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => OpenDataVersionFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiOpenDataVersionPartialUpdate(requestParameters: ApiOpenDataVersionPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<OpenDataVersion> {
|
|
const response = await this.apiOpenDataVersionPartialUpdateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiOpenDataVersionRetrieveRaw(requestParameters: ApiOpenDataVersionRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<OpenDataVersion>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiOpenDataVersionRetrieve().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/open-data-version/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'GET',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => OpenDataVersionFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiOpenDataVersionRetrieve(requestParameters: ApiOpenDataVersionRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<OpenDataVersion> {
|
|
const response = await this.apiOpenDataVersionRetrieveRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiOpenDataVersionUpdateRaw(requestParameters: ApiOpenDataVersionUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<OpenDataVersion>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiOpenDataVersionUpdate().'
|
|
);
|
|
}
|
|
|
|
if (requestParameters['openDataVersion'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'openDataVersion',
|
|
'Required parameter "openDataVersion" was null or undefined when calling apiOpenDataVersionUpdate().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
headerParameters['Content-Type'] = 'application/json';
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/open-data-version/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'PUT',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
body: OpenDataVersionToJSON(requestParameters['openDataVersion']),
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => OpenDataVersionFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiOpenDataVersionUpdate(requestParameters: ApiOpenDataVersionUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<OpenDataVersion> {
|
|
const response = await this.apiOpenDataVersionUpdateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiPropertyCreateRaw(requestParameters: ApiPropertyCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Property>> {
|
|
if (requestParameters['property'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'property',
|
|
'Required parameter "property" was null or undefined when calling apiPropertyCreate().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
headerParameters['Content-Type'] = 'application/json';
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/property/`,
|
|
method: 'POST',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
body: PropertyToJSON(requestParameters['property']),
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => PropertyFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiPropertyCreate(requestParameters: ApiPropertyCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Property> {
|
|
const response = await this.apiPropertyCreateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiPropertyDestroyRaw(requestParameters: ApiPropertyDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiPropertyDestroy().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/property/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'DELETE',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.VoidApiResponse(response);
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiPropertyDestroy(requestParameters: ApiPropertyDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
await this.apiPropertyDestroyRaw(requestParameters, initOverrides);
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiPropertyListRaw(requestParameters: ApiPropertyListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PaginatedPropertyList>> {
|
|
const queryParameters: any = {};
|
|
|
|
if (requestParameters['page'] != null) {
|
|
queryParameters['page'] = requestParameters['page'];
|
|
}
|
|
|
|
if (requestParameters['pageSize'] != null) {
|
|
queryParameters['page_size'] = requestParameters['pageSize'];
|
|
}
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/property/`,
|
|
method: 'GET',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedPropertyListFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiPropertyList(requestParameters: ApiPropertyListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedPropertyList> {
|
|
const response = await this.apiPropertyListRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiPropertyPartialUpdateRaw(requestParameters: ApiPropertyPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Property>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiPropertyPartialUpdate().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
headerParameters['Content-Type'] = 'application/json';
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/property/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'PATCH',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
body: PatchedPropertyToJSON(requestParameters['patchedProperty']),
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => PropertyFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiPropertyPartialUpdate(requestParameters: ApiPropertyPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Property> {
|
|
const response = await this.apiPropertyPartialUpdateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiPropertyRetrieveRaw(requestParameters: ApiPropertyRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Property>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiPropertyRetrieve().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/property/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'GET',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => PropertyFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiPropertyRetrieve(requestParameters: ApiPropertyRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Property> {
|
|
const response = await this.apiPropertyRetrieveRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiPropertyTypeCreateRaw(requestParameters: ApiPropertyTypeCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PropertyType>> {
|
|
if (requestParameters['propertyType'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'propertyType',
|
|
'Required parameter "propertyType" was null or undefined when calling apiPropertyTypeCreate().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
headerParameters['Content-Type'] = 'application/json';
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/property-type/`,
|
|
method: 'POST',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
body: PropertyTypeToJSON(requestParameters['propertyType']),
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => PropertyTypeFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiPropertyTypeCreate(requestParameters: ApiPropertyTypeCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PropertyType> {
|
|
const response = await this.apiPropertyTypeCreateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiPropertyTypeDestroyRaw(requestParameters: ApiPropertyTypeDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiPropertyTypeDestroy().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/property-type/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'DELETE',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.VoidApiResponse(response);
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiPropertyTypeDestroy(requestParameters: ApiPropertyTypeDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
await this.apiPropertyTypeDestroyRaw(requestParameters, initOverrides);
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiPropertyTypeListRaw(requestParameters: ApiPropertyTypeListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PaginatedPropertyTypeList>> {
|
|
const queryParameters: any = {};
|
|
|
|
if (requestParameters['category'] != null) {
|
|
queryParameters['category'] = requestParameters['category'];
|
|
}
|
|
|
|
if (requestParameters['page'] != null) {
|
|
queryParameters['page'] = requestParameters['page'];
|
|
}
|
|
|
|
if (requestParameters['pageSize'] != null) {
|
|
queryParameters['page_size'] = requestParameters['pageSize'];
|
|
}
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/property-type/`,
|
|
method: 'GET',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedPropertyTypeListFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiPropertyTypeList(requestParameters: ApiPropertyTypeListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedPropertyTypeList> {
|
|
const response = await this.apiPropertyTypeListRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiPropertyTypePartialUpdateRaw(requestParameters: ApiPropertyTypePartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PropertyType>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiPropertyTypePartialUpdate().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
headerParameters['Content-Type'] = 'application/json';
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/property-type/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'PATCH',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
body: PatchedPropertyTypeToJSON(requestParameters['patchedPropertyType']),
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => PropertyTypeFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiPropertyTypePartialUpdate(requestParameters: ApiPropertyTypePartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PropertyType> {
|
|
const response = await this.apiPropertyTypePartialUpdateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiPropertyTypeRetrieveRaw(requestParameters: ApiPropertyTypeRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PropertyType>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiPropertyTypeRetrieve().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/property-type/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'GET',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => PropertyTypeFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiPropertyTypeRetrieve(requestParameters: ApiPropertyTypeRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PropertyType> {
|
|
const response = await this.apiPropertyTypeRetrieveRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiPropertyTypeUpdateRaw(requestParameters: ApiPropertyTypeUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PropertyType>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiPropertyTypeUpdate().'
|
|
);
|
|
}
|
|
|
|
if (requestParameters['propertyType'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'propertyType',
|
|
'Required parameter "propertyType" was null or undefined when calling apiPropertyTypeUpdate().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
headerParameters['Content-Type'] = 'application/json';
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/property-type/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'PUT',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
body: PropertyTypeToJSON(requestParameters['propertyType']),
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => PropertyTypeFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiPropertyTypeUpdate(requestParameters: ApiPropertyTypeUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PropertyType> {
|
|
const response = await this.apiPropertyTypeUpdateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiPropertyUpdateRaw(requestParameters: ApiPropertyUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Property>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiPropertyUpdate().'
|
|
);
|
|
}
|
|
|
|
if (requestParameters['property'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'property',
|
|
'Required parameter "property" was null or undefined when calling apiPropertyUpdate().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
headerParameters['Content-Type'] = 'application/json';
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/property/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'PUT',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
body: PropertyToJSON(requestParameters['property']),
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => PropertyFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiPropertyUpdate(requestParameters: ApiPropertyUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Property> {
|
|
const response = await this.apiPropertyUpdateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiRecipeBookCreateRaw(requestParameters: ApiRecipeBookCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<RecipeBook>> {
|
|
if (requestParameters['recipeBook'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'recipeBook',
|
|
'Required parameter "recipeBook" was null or undefined when calling apiRecipeBookCreate().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
headerParameters['Content-Type'] = 'application/json';
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/recipe-book/`,
|
|
method: 'POST',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
body: RecipeBookToJSON(requestParameters['recipeBook']),
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => RecipeBookFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiRecipeBookCreate(requestParameters: ApiRecipeBookCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RecipeBook> {
|
|
const response = await this.apiRecipeBookCreateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiRecipeBookDestroyRaw(requestParameters: ApiRecipeBookDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiRecipeBookDestroy().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/recipe-book/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'DELETE',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.VoidApiResponse(response);
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiRecipeBookDestroy(requestParameters: ApiRecipeBookDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
await this.apiRecipeBookDestroyRaw(requestParameters, initOverrides);
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiRecipeBookEntryCreateRaw(requestParameters: ApiRecipeBookEntryCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<RecipeBookEntry>> {
|
|
if (requestParameters['recipeBookEntry'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'recipeBookEntry',
|
|
'Required parameter "recipeBookEntry" was null or undefined when calling apiRecipeBookEntryCreate().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
headerParameters['Content-Type'] = 'application/json';
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/recipe-book-entry/`,
|
|
method: 'POST',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
body: RecipeBookEntryToJSON(requestParameters['recipeBookEntry']),
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => RecipeBookEntryFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiRecipeBookEntryCreate(requestParameters: ApiRecipeBookEntryCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RecipeBookEntry> {
|
|
const response = await this.apiRecipeBookEntryCreateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiRecipeBookEntryDestroyRaw(requestParameters: ApiRecipeBookEntryDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiRecipeBookEntryDestroy().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/recipe-book-entry/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'DELETE',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.VoidApiResponse(response);
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiRecipeBookEntryDestroy(requestParameters: ApiRecipeBookEntryDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
await this.apiRecipeBookEntryDestroyRaw(requestParameters, initOverrides);
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiRecipeBookEntryListRaw(requestParameters: ApiRecipeBookEntryListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PaginatedRecipeBookEntryList>> {
|
|
const queryParameters: any = {};
|
|
|
|
if (requestParameters['book'] != null) {
|
|
queryParameters['book'] = requestParameters['book'];
|
|
}
|
|
|
|
if (requestParameters['page'] != null) {
|
|
queryParameters['page'] = requestParameters['page'];
|
|
}
|
|
|
|
if (requestParameters['pageSize'] != null) {
|
|
queryParameters['page_size'] = requestParameters['pageSize'];
|
|
}
|
|
|
|
if (requestParameters['recipe'] != null) {
|
|
queryParameters['recipe'] = requestParameters['recipe'];
|
|
}
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/recipe-book-entry/`,
|
|
method: 'GET',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedRecipeBookEntryListFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiRecipeBookEntryList(requestParameters: ApiRecipeBookEntryListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedRecipeBookEntryList> {
|
|
const response = await this.apiRecipeBookEntryListRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiRecipeBookEntryPartialUpdateRaw(requestParameters: ApiRecipeBookEntryPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<RecipeBookEntry>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiRecipeBookEntryPartialUpdate().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
headerParameters['Content-Type'] = 'application/json';
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/recipe-book-entry/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'PATCH',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
body: PatchedRecipeBookEntryToJSON(requestParameters['patchedRecipeBookEntry']),
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => RecipeBookEntryFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiRecipeBookEntryPartialUpdate(requestParameters: ApiRecipeBookEntryPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RecipeBookEntry> {
|
|
const response = await this.apiRecipeBookEntryPartialUpdateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiRecipeBookEntryRetrieveRaw(requestParameters: ApiRecipeBookEntryRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<RecipeBookEntry>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiRecipeBookEntryRetrieve().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/recipe-book-entry/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'GET',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => RecipeBookEntryFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiRecipeBookEntryRetrieve(requestParameters: ApiRecipeBookEntryRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RecipeBookEntry> {
|
|
const response = await this.apiRecipeBookEntryRetrieveRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiRecipeBookEntryUpdateRaw(requestParameters: ApiRecipeBookEntryUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<RecipeBookEntry>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiRecipeBookEntryUpdate().'
|
|
);
|
|
}
|
|
|
|
if (requestParameters['recipeBookEntry'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'recipeBookEntry',
|
|
'Required parameter "recipeBookEntry" was null or undefined when calling apiRecipeBookEntryUpdate().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
headerParameters['Content-Type'] = 'application/json';
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/recipe-book-entry/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'PUT',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
body: RecipeBookEntryToJSON(requestParameters['recipeBookEntry']),
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => RecipeBookEntryFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiRecipeBookEntryUpdate(requestParameters: ApiRecipeBookEntryUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RecipeBookEntry> {
|
|
const response = await this.apiRecipeBookEntryUpdateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiRecipeBookListRaw(requestParameters: ApiRecipeBookListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PaginatedRecipeBookList>> {
|
|
const queryParameters: any = {};
|
|
|
|
if (requestParameters['limit'] != null) {
|
|
queryParameters['limit'] = requestParameters['limit'];
|
|
}
|
|
|
|
if (requestParameters['orderDirection'] != null) {
|
|
queryParameters['order_direction'] = requestParameters['orderDirection'];
|
|
}
|
|
|
|
if (requestParameters['orderField'] != null) {
|
|
queryParameters['order_field'] = requestParameters['orderField'];
|
|
}
|
|
|
|
if (requestParameters['page'] != null) {
|
|
queryParameters['page'] = requestParameters['page'];
|
|
}
|
|
|
|
if (requestParameters['pageSize'] != null) {
|
|
queryParameters['page_size'] = requestParameters['pageSize'];
|
|
}
|
|
|
|
if (requestParameters['query'] != null) {
|
|
queryParameters['query'] = requestParameters['query'];
|
|
}
|
|
|
|
if (requestParameters['random'] != null) {
|
|
queryParameters['random'] = requestParameters['random'];
|
|
}
|
|
|
|
if (requestParameters['updatedAt'] != null) {
|
|
queryParameters['updated_at'] = requestParameters['updatedAt'];
|
|
}
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/recipe-book/`,
|
|
method: 'GET',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedRecipeBookListFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiRecipeBookList(requestParameters: ApiRecipeBookListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedRecipeBookList> {
|
|
const response = await this.apiRecipeBookListRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiRecipeBookPartialUpdateRaw(requestParameters: ApiRecipeBookPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<RecipeBook>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiRecipeBookPartialUpdate().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
headerParameters['Content-Type'] = 'application/json';
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/recipe-book/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'PATCH',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
body: PatchedRecipeBookToJSON(requestParameters['patchedRecipeBook']),
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => RecipeBookFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiRecipeBookPartialUpdate(requestParameters: ApiRecipeBookPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RecipeBook> {
|
|
const response = await this.apiRecipeBookPartialUpdateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiRecipeBookRetrieveRaw(requestParameters: ApiRecipeBookRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<RecipeBook>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiRecipeBookRetrieve().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/recipe-book/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'GET',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => RecipeBookFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiRecipeBookRetrieve(requestParameters: ApiRecipeBookRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RecipeBook> {
|
|
const response = await this.apiRecipeBookRetrieveRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiRecipeBookUpdateRaw(requestParameters: ApiRecipeBookUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<RecipeBook>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiRecipeBookUpdate().'
|
|
);
|
|
}
|
|
|
|
if (requestParameters['recipeBook'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'recipeBook',
|
|
'Required parameter "recipeBook" was null or undefined when calling apiRecipeBookUpdate().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
headerParameters['Content-Type'] = 'application/json';
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/recipe-book/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'PUT',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
body: RecipeBookToJSON(requestParameters['recipeBook']),
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => RecipeBookFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiRecipeBookUpdate(requestParameters: ApiRecipeBookUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RecipeBook> {
|
|
const response = await this.apiRecipeBookUpdateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiRecipeCreateRaw(requestParameters: ApiRecipeCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Recipe>> {
|
|
if (requestParameters['recipe'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'recipe',
|
|
'Required parameter "recipe" was null or undefined when calling apiRecipeCreate().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
headerParameters['Content-Type'] = 'application/json';
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/recipe/`,
|
|
method: 'POST',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
body: RecipeToJSON(requestParameters['recipe']),
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => RecipeFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiRecipeCreate(requestParameters: ApiRecipeCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Recipe> {
|
|
const response = await this.apiRecipeCreateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiRecipeDestroyRaw(requestParameters: ApiRecipeDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiRecipeDestroy().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/recipe/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'DELETE',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.VoidApiResponse(response);
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiRecipeDestroy(requestParameters: ApiRecipeDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
await this.apiRecipeDestroyRaw(requestParameters, initOverrides);
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiRecipeFlatListRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<RecipeFlat>>> {
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/recipe/flat/`,
|
|
method: 'GET',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(RecipeFlatFromJSON));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiRecipeFlatList(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<RecipeFlat>> {
|
|
const response = await this.apiRecipeFlatListRaw(initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* function to retrieve a recipe from a given url or source string :param request: standard request with additional post parameters - url: url to use for importing recipe - data: if no url is given recipe is imported from provided source data - (optional) bookmarklet: id of bookmarklet import to use, overrides URL and data attributes :return: JsonResponse containing the parsed json and images
|
|
*/
|
|
async apiRecipeFromSourceCreateRaw(requestParameters: ApiRecipeFromSourceCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<RecipeFromSourceResponse>> {
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
headerParameters['Content-Type'] = 'application/json';
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/recipe-from-source/`,
|
|
method: 'POST',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
body: RecipeFromSourceToJSON(requestParameters['recipeFromSource']),
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => RecipeFromSourceResponseFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* function to retrieve a recipe from a given url or source string :param request: standard request with additional post parameters - url: url to use for importing recipe - data: if no url is given recipe is imported from provided source data - (optional) bookmarklet: id of bookmarklet import to use, overrides URL and data attributes :return: JsonResponse containing the parsed json and images
|
|
*/
|
|
async apiRecipeFromSourceCreate(requestParameters: ApiRecipeFromSourceCreateRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RecipeFromSourceResponse> {
|
|
const response = await this.apiRecipeFromSourceCreateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiRecipeImageUpdateRaw(requestParameters: ApiRecipeImageUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<RecipeImage>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiRecipeImageUpdate().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const consumes: runtime.Consume[] = [
|
|
{ contentType: 'multipart/form-data' },
|
|
];
|
|
// @ts-ignore: canConsumeForm may be unused
|
|
const canConsumeForm = runtime.canConsumeForm(consumes);
|
|
|
|
let formParams: { append(param: string, value: any): any };
|
|
let useForm = false;
|
|
if (useForm) {
|
|
formParams = new FormData();
|
|
} else {
|
|
formParams = new URLSearchParams();
|
|
}
|
|
|
|
if (requestParameters['image'] != null) {
|
|
formParams.append('image', requestParameters['image'] as any);
|
|
}
|
|
|
|
if (requestParameters['imageUrl'] != null) {
|
|
formParams.append('image_url', requestParameters['imageUrl'] as any);
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/recipe/{id}/image/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'PUT',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
body: formParams,
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => RecipeImageFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiRecipeImageUpdate(requestParameters: ApiRecipeImageUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RecipeImage> {
|
|
const response = await this.apiRecipeImageUpdateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiRecipeListRaw(requestParameters: ApiRecipeListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PaginatedRecipeOverviewList>> {
|
|
const queryParameters: any = {};
|
|
|
|
if (requestParameters['books'] != null) {
|
|
queryParameters['books'] = requestParameters['books'];
|
|
}
|
|
|
|
if (requestParameters['booksAnd'] != null) {
|
|
queryParameters['books_and'] = requestParameters['booksAnd'];
|
|
}
|
|
|
|
if (requestParameters['booksAndNot'] != null) {
|
|
queryParameters['books_and_not'] = requestParameters['booksAndNot'];
|
|
}
|
|
|
|
if (requestParameters['booksOr'] != null) {
|
|
queryParameters['books_or'] = requestParameters['booksOr'];
|
|
}
|
|
|
|
if (requestParameters['booksOrNot'] != null) {
|
|
queryParameters['books_or_not'] = requestParameters['booksOrNot'];
|
|
}
|
|
|
|
if (requestParameters['cookedon'] != null) {
|
|
queryParameters['cookedon'] = requestParameters['cookedon'];
|
|
}
|
|
|
|
if (requestParameters['createdon'] != null) {
|
|
queryParameters['createdon'] = requestParameters['createdon'];
|
|
}
|
|
|
|
if (requestParameters['foods'] != null) {
|
|
queryParameters['foods'] = requestParameters['foods'];
|
|
}
|
|
|
|
if (requestParameters['foodsAnd'] != null) {
|
|
queryParameters['foods_and'] = requestParameters['foodsAnd'];
|
|
}
|
|
|
|
if (requestParameters['foodsAndNot'] != null) {
|
|
queryParameters['foods_and_not'] = requestParameters['foodsAndNot'];
|
|
}
|
|
|
|
if (requestParameters['foodsOr'] != null) {
|
|
queryParameters['foods_or'] = requestParameters['foodsOr'];
|
|
}
|
|
|
|
if (requestParameters['foodsOrNot'] != null) {
|
|
queryParameters['foods_or_not'] = requestParameters['foodsOrNot'];
|
|
}
|
|
|
|
if (requestParameters['internal'] != null) {
|
|
queryParameters['internal'] = requestParameters['internal'];
|
|
}
|
|
|
|
if (requestParameters['keywords'] != null) {
|
|
queryParameters['keywords'] = requestParameters['keywords'];
|
|
}
|
|
|
|
if (requestParameters['keywordsAnd'] != null) {
|
|
queryParameters['keywords_and'] = requestParameters['keywordsAnd'];
|
|
}
|
|
|
|
if (requestParameters['keywordsAndNot'] != null) {
|
|
queryParameters['keywords_and_not'] = requestParameters['keywordsAndNot'];
|
|
}
|
|
|
|
if (requestParameters['keywordsOr'] != null) {
|
|
queryParameters['keywords_or'] = requestParameters['keywordsOr'];
|
|
}
|
|
|
|
if (requestParameters['keywordsOrNot'] != null) {
|
|
queryParameters['keywords_or_not'] = requestParameters['keywordsOrNot'];
|
|
}
|
|
|
|
if (requestParameters['makenow'] != null) {
|
|
queryParameters['makenow'] = requestParameters['makenow'];
|
|
}
|
|
|
|
if (requestParameters['_new'] != null) {
|
|
queryParameters['new'] = requestParameters['_new'];
|
|
}
|
|
|
|
if (requestParameters['page'] != null) {
|
|
queryParameters['page'] = requestParameters['page'];
|
|
}
|
|
|
|
if (requestParameters['pageSize'] != null) {
|
|
queryParameters['page_size'] = requestParameters['pageSize'];
|
|
}
|
|
|
|
if (requestParameters['query'] != null) {
|
|
queryParameters['query'] = requestParameters['query'];
|
|
}
|
|
|
|
if (requestParameters['random'] != null) {
|
|
queryParameters['random'] = requestParameters['random'];
|
|
}
|
|
|
|
if (requestParameters['rating'] != null) {
|
|
queryParameters['rating'] = requestParameters['rating'];
|
|
}
|
|
|
|
if (requestParameters['timescooked'] != null) {
|
|
queryParameters['timescooked'] = requestParameters['timescooked'];
|
|
}
|
|
|
|
if (requestParameters['units'] != null) {
|
|
queryParameters['units'] = requestParameters['units'];
|
|
}
|
|
|
|
if (requestParameters['updatedon'] != null) {
|
|
queryParameters['updatedon'] = requestParameters['updatedon'];
|
|
}
|
|
|
|
if (requestParameters['viewedon'] != null) {
|
|
queryParameters['viewedon'] = requestParameters['viewedon'];
|
|
}
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/recipe/`,
|
|
method: 'GET',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedRecipeOverviewListFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiRecipeList(requestParameters: ApiRecipeListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedRecipeOverviewList> {
|
|
const response = await this.apiRecipeListRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiRecipePartialUpdateRaw(requestParameters: ApiRecipePartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Recipe>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiRecipePartialUpdate().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
headerParameters['Content-Type'] = 'application/json';
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/recipe/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'PATCH',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
body: PatchedRecipeToJSON(requestParameters['patchedRecipe']),
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => RecipeFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiRecipePartialUpdate(requestParameters: ApiRecipePartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Recipe> {
|
|
const response = await this.apiRecipePartialUpdateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiRecipeRelatedListRaw(requestParameters: ApiRecipeRelatedListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<RecipeSimple>>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiRecipeRelatedList().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/recipe/{id}/related/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'GET',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(RecipeSimpleFromJSON));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiRecipeRelatedList(requestParameters: ApiRecipeRelatedListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<RecipeSimple>> {
|
|
const response = await this.apiRecipeRelatedListRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiRecipeRetrieveRaw(requestParameters: ApiRecipeRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Recipe>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiRecipeRetrieve().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/recipe/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'GET',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => RecipeFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiRecipeRetrieve(requestParameters: ApiRecipeRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Recipe> {
|
|
const response = await this.apiRecipeRetrieveRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiRecipeShoppingUpdateRaw(requestParameters: ApiRecipeShoppingUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<RecipeShoppingUpdate>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiRecipeShoppingUpdate().'
|
|
);
|
|
}
|
|
|
|
if (requestParameters['recipeShoppingUpdate'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'recipeShoppingUpdate',
|
|
'Required parameter "recipeShoppingUpdate" was null or undefined when calling apiRecipeShoppingUpdate().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
headerParameters['Content-Type'] = 'application/json';
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/recipe/{id}/shopping/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'PUT',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
body: RecipeShoppingUpdateToJSON(requestParameters['recipeShoppingUpdate']),
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => RecipeShoppingUpdateFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiRecipeShoppingUpdate(requestParameters: ApiRecipeShoppingUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RecipeShoppingUpdate> {
|
|
const response = await this.apiRecipeShoppingUpdateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiRecipeUpdateRaw(requestParameters: ApiRecipeUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Recipe>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiRecipeUpdate().'
|
|
);
|
|
}
|
|
|
|
if (requestParameters['recipe'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'recipe',
|
|
'Required parameter "recipe" was null or undefined when calling apiRecipeUpdate().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
headerParameters['Content-Type'] = 'application/json';
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/recipe/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'PUT',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
body: RecipeToJSON(requestParameters['recipe']),
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => RecipeFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiRecipeUpdate(requestParameters: ApiRecipeUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Recipe> {
|
|
const response = await this.apiRecipeUpdateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* function to reset inheritance from api, see food method for docs
|
|
*/
|
|
async apiResetFoodInheritanceCreateRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/reset-food-inheritance/`,
|
|
method: 'POST',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.VoidApiResponse(response);
|
|
}
|
|
|
|
/**
|
|
* function to reset inheritance from api, see food method for docs
|
|
*/
|
|
async apiResetFoodInheritanceCreate(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
await this.apiResetFoodInheritanceCreateRaw(initOverrides);
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiServerSettingsCurrentRetrieveRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ServerSettings>> {
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/server-settings/current/`,
|
|
method: 'GET',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => ServerSettingsFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiServerSettingsCurrentRetrieve(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ServerSettings> {
|
|
const response = await this.apiServerSettingsCurrentRetrieveRaw(initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiShareLinkRetrieveRaw(requestParameters: ApiShareLinkRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ShareLink>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiShareLinkRetrieve().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/share-link/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'GET',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => ShareLinkFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiShareLinkRetrieve(requestParameters: ApiShareLinkRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ShareLink> {
|
|
const response = await this.apiShareLinkRetrieveRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* individual entries of a shopping list automatically filtered to only contain unchecked items that are not older than the shopping recent days setting to not bloat endpoint
|
|
*/
|
|
async apiShoppingListEntryBulkCreateRaw(requestParameters: ApiShoppingListEntryBulkCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ShoppingListEntryBulk>> {
|
|
if (requestParameters['shoppingListEntryBulk'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'shoppingListEntryBulk',
|
|
'Required parameter "shoppingListEntryBulk" was null or undefined when calling apiShoppingListEntryBulkCreate().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
headerParameters['Content-Type'] = 'application/json';
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/shopping-list-entry/bulk/`,
|
|
method: 'POST',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
body: ShoppingListEntryBulkToJSON(requestParameters['shoppingListEntryBulk']),
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => ShoppingListEntryBulkFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* individual entries of a shopping list automatically filtered to only contain unchecked items that are not older than the shopping recent days setting to not bloat endpoint
|
|
*/
|
|
async apiShoppingListEntryBulkCreate(requestParameters: ApiShoppingListEntryBulkCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ShoppingListEntryBulk> {
|
|
const response = await this.apiShoppingListEntryBulkCreateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* individual entries of a shopping list automatically filtered to only contain unchecked items that are not older than the shopping recent days setting to not bloat endpoint
|
|
*/
|
|
async apiShoppingListEntryCreateRaw(requestParameters: ApiShoppingListEntryCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ShoppingListEntry>> {
|
|
if (requestParameters['shoppingListEntry'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'shoppingListEntry',
|
|
'Required parameter "shoppingListEntry" was null or undefined when calling apiShoppingListEntryCreate().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
headerParameters['Content-Type'] = 'application/json';
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/shopping-list-entry/`,
|
|
method: 'POST',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
body: ShoppingListEntryToJSON(requestParameters['shoppingListEntry']),
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => ShoppingListEntryFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* individual entries of a shopping list automatically filtered to only contain unchecked items that are not older than the shopping recent days setting to not bloat endpoint
|
|
*/
|
|
async apiShoppingListEntryCreate(requestParameters: ApiShoppingListEntryCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ShoppingListEntry> {
|
|
const response = await this.apiShoppingListEntryCreateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* individual entries of a shopping list automatically filtered to only contain unchecked items that are not older than the shopping recent days setting to not bloat endpoint
|
|
*/
|
|
async apiShoppingListEntryDestroyRaw(requestParameters: ApiShoppingListEntryDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiShoppingListEntryDestroy().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/shopping-list-entry/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'DELETE',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.VoidApiResponse(response);
|
|
}
|
|
|
|
/**
|
|
* individual entries of a shopping list automatically filtered to only contain unchecked items that are not older than the shopping recent days setting to not bloat endpoint
|
|
*/
|
|
async apiShoppingListEntryDestroy(requestParameters: ApiShoppingListEntryDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
await this.apiShoppingListEntryDestroyRaw(requestParameters, initOverrides);
|
|
}
|
|
|
|
/**
|
|
* individual entries of a shopping list automatically filtered to only contain unchecked items that are not older than the shopping recent days setting to not bloat endpoint
|
|
*/
|
|
async apiShoppingListEntryListRaw(requestParameters: ApiShoppingListEntryListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PaginatedShoppingListEntryList>> {
|
|
const queryParameters: any = {};
|
|
|
|
if (requestParameters['mealplan'] != null) {
|
|
queryParameters['mealplan'] = requestParameters['mealplan'];
|
|
}
|
|
|
|
if (requestParameters['page'] != null) {
|
|
queryParameters['page'] = requestParameters['page'];
|
|
}
|
|
|
|
if (requestParameters['pageSize'] != null) {
|
|
queryParameters['page_size'] = requestParameters['pageSize'];
|
|
}
|
|
|
|
if (requestParameters['updatedAfter'] != null) {
|
|
queryParameters['updated_after'] = (requestParameters['updatedAfter'] as any).toISOString();
|
|
}
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/shopping-list-entry/`,
|
|
method: 'GET',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedShoppingListEntryListFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* individual entries of a shopping list automatically filtered to only contain unchecked items that are not older than the shopping recent days setting to not bloat endpoint
|
|
*/
|
|
async apiShoppingListEntryList(requestParameters: ApiShoppingListEntryListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedShoppingListEntryList> {
|
|
const response = await this.apiShoppingListEntryListRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* individual entries of a shopping list automatically filtered to only contain unchecked items that are not older than the shopping recent days setting to not bloat endpoint
|
|
*/
|
|
async apiShoppingListEntryPartialUpdateRaw(requestParameters: ApiShoppingListEntryPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ShoppingListEntry>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiShoppingListEntryPartialUpdate().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
headerParameters['Content-Type'] = 'application/json';
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/shopping-list-entry/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'PATCH',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
body: PatchedShoppingListEntryToJSON(requestParameters['patchedShoppingListEntry']),
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => ShoppingListEntryFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* individual entries of a shopping list automatically filtered to only contain unchecked items that are not older than the shopping recent days setting to not bloat endpoint
|
|
*/
|
|
async apiShoppingListEntryPartialUpdate(requestParameters: ApiShoppingListEntryPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ShoppingListEntry> {
|
|
const response = await this.apiShoppingListEntryPartialUpdateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* individual entries of a shopping list automatically filtered to only contain unchecked items that are not older than the shopping recent days setting to not bloat endpoint
|
|
*/
|
|
async apiShoppingListEntryRetrieveRaw(requestParameters: ApiShoppingListEntryRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ShoppingListEntry>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiShoppingListEntryRetrieve().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/shopping-list-entry/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'GET',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => ShoppingListEntryFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* individual entries of a shopping list automatically filtered to only contain unchecked items that are not older than the shopping recent days setting to not bloat endpoint
|
|
*/
|
|
async apiShoppingListEntryRetrieve(requestParameters: ApiShoppingListEntryRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ShoppingListEntry> {
|
|
const response = await this.apiShoppingListEntryRetrieveRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* individual entries of a shopping list automatically filtered to only contain unchecked items that are not older than the shopping recent days setting to not bloat endpoint
|
|
*/
|
|
async apiShoppingListEntryUpdateRaw(requestParameters: ApiShoppingListEntryUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ShoppingListEntry>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiShoppingListEntryUpdate().'
|
|
);
|
|
}
|
|
|
|
if (requestParameters['shoppingListEntry'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'shoppingListEntry',
|
|
'Required parameter "shoppingListEntry" was null or undefined when calling apiShoppingListEntryUpdate().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
headerParameters['Content-Type'] = 'application/json';
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/shopping-list-entry/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'PUT',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
body: ShoppingListEntryToJSON(requestParameters['shoppingListEntry']),
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => ShoppingListEntryFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* individual entries of a shopping list automatically filtered to only contain unchecked items that are not older than the shopping recent days setting to not bloat endpoint
|
|
*/
|
|
async apiShoppingListEntryUpdate(requestParameters: ApiShoppingListEntryUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ShoppingListEntry> {
|
|
const response = await this.apiShoppingListEntryUpdateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiShoppingListRecipeBulkCreateEntriesCreateRaw(requestParameters: ApiShoppingListRecipeBulkCreateEntriesCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ShoppingListEntryBulkCreate>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiShoppingListRecipeBulkCreateEntriesCreate().'
|
|
);
|
|
}
|
|
|
|
if (requestParameters['shoppingListEntryBulkCreate'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'shoppingListEntryBulkCreate',
|
|
'Required parameter "shoppingListEntryBulkCreate" was null or undefined when calling apiShoppingListRecipeBulkCreateEntriesCreate().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
headerParameters['Content-Type'] = 'application/json';
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/shopping-list-recipe/{id}/bulk_create_entries/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'POST',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
body: ShoppingListEntryBulkCreateToJSON(requestParameters['shoppingListEntryBulkCreate']),
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => ShoppingListEntryBulkCreateFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiShoppingListRecipeBulkCreateEntriesCreate(requestParameters: ApiShoppingListRecipeBulkCreateEntriesCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ShoppingListEntryBulkCreate> {
|
|
const response = await this.apiShoppingListRecipeBulkCreateEntriesCreateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiShoppingListRecipeCreateRaw(requestParameters: ApiShoppingListRecipeCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ShoppingListRecipe>> {
|
|
if (requestParameters['shoppingListRecipe'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'shoppingListRecipe',
|
|
'Required parameter "shoppingListRecipe" was null or undefined when calling apiShoppingListRecipeCreate().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
headerParameters['Content-Type'] = 'application/json';
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/shopping-list-recipe/`,
|
|
method: 'POST',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
body: ShoppingListRecipeToJSON(requestParameters['shoppingListRecipe']),
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => ShoppingListRecipeFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiShoppingListRecipeCreate(requestParameters: ApiShoppingListRecipeCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ShoppingListRecipe> {
|
|
const response = await this.apiShoppingListRecipeCreateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiShoppingListRecipeDestroyRaw(requestParameters: ApiShoppingListRecipeDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiShoppingListRecipeDestroy().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/shopping-list-recipe/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'DELETE',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.VoidApiResponse(response);
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiShoppingListRecipeDestroy(requestParameters: ApiShoppingListRecipeDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
await this.apiShoppingListRecipeDestroyRaw(requestParameters, initOverrides);
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiShoppingListRecipeListRaw(requestParameters: ApiShoppingListRecipeListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PaginatedShoppingListRecipeList>> {
|
|
const queryParameters: any = {};
|
|
|
|
if (requestParameters['mealplan'] != null) {
|
|
queryParameters['mealplan'] = requestParameters['mealplan'];
|
|
}
|
|
|
|
if (requestParameters['page'] != null) {
|
|
queryParameters['page'] = requestParameters['page'];
|
|
}
|
|
|
|
if (requestParameters['pageSize'] != null) {
|
|
queryParameters['page_size'] = requestParameters['pageSize'];
|
|
}
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/shopping-list-recipe/`,
|
|
method: 'GET',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedShoppingListRecipeListFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiShoppingListRecipeList(requestParameters: ApiShoppingListRecipeListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedShoppingListRecipeList> {
|
|
const response = await this.apiShoppingListRecipeListRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiShoppingListRecipePartialUpdateRaw(requestParameters: ApiShoppingListRecipePartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ShoppingListRecipe>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiShoppingListRecipePartialUpdate().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
headerParameters['Content-Type'] = 'application/json';
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/shopping-list-recipe/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'PATCH',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
body: PatchedShoppingListRecipeToJSON(requestParameters['patchedShoppingListRecipe']),
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => ShoppingListRecipeFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiShoppingListRecipePartialUpdate(requestParameters: ApiShoppingListRecipePartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ShoppingListRecipe> {
|
|
const response = await this.apiShoppingListRecipePartialUpdateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiShoppingListRecipeRetrieveRaw(requestParameters: ApiShoppingListRecipeRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ShoppingListRecipe>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiShoppingListRecipeRetrieve().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/shopping-list-recipe/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'GET',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => ShoppingListRecipeFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiShoppingListRecipeRetrieve(requestParameters: ApiShoppingListRecipeRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ShoppingListRecipe> {
|
|
const response = await this.apiShoppingListRecipeRetrieveRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiShoppingListRecipeUpdateRaw(requestParameters: ApiShoppingListRecipeUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ShoppingListRecipe>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiShoppingListRecipeUpdate().'
|
|
);
|
|
}
|
|
|
|
if (requestParameters['shoppingListRecipe'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'shoppingListRecipe',
|
|
'Required parameter "shoppingListRecipe" was null or undefined when calling apiShoppingListRecipeUpdate().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
headerParameters['Content-Type'] = 'application/json';
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/shopping-list-recipe/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'PUT',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
body: ShoppingListRecipeToJSON(requestParameters['shoppingListRecipe']),
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => ShoppingListRecipeFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiShoppingListRecipeUpdate(requestParameters: ApiShoppingListRecipeUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ShoppingListRecipe> {
|
|
const response = await this.apiShoppingListRecipeUpdateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiSpaceCurrentRetrieveRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Space>> {
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/space/current/`,
|
|
method: 'GET',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => SpaceFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiSpaceCurrentRetrieve(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Space> {
|
|
const response = await this.apiSpaceCurrentRetrieveRaw(initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiSpaceListRaw(requestParameters: ApiSpaceListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PaginatedSpaceList>> {
|
|
const queryParameters: any = {};
|
|
|
|
if (requestParameters['page'] != null) {
|
|
queryParameters['page'] = requestParameters['page'];
|
|
}
|
|
|
|
if (requestParameters['pageSize'] != null) {
|
|
queryParameters['page_size'] = requestParameters['pageSize'];
|
|
}
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/space/`,
|
|
method: 'GET',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedSpaceListFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiSpaceList(requestParameters: ApiSpaceListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedSpaceList> {
|
|
const response = await this.apiSpaceListRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiSpacePartialUpdateRaw(requestParameters: ApiSpacePartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Space>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiSpacePartialUpdate().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
headerParameters['Content-Type'] = 'application/json';
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/space/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'PATCH',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
body: PatchedSpaceToJSON(requestParameters['patchedSpace']),
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => SpaceFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiSpacePartialUpdate(requestParameters: ApiSpacePartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Space> {
|
|
const response = await this.apiSpacePartialUpdateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiSpaceRetrieveRaw(requestParameters: ApiSpaceRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Space>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiSpaceRetrieve().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/space/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'GET',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => SpaceFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiSpaceRetrieve(requestParameters: ApiSpaceRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Space> {
|
|
const response = await this.apiSpaceRetrieveRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiStepCreateRaw(requestParameters: ApiStepCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Step>> {
|
|
if (requestParameters['step'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'step',
|
|
'Required parameter "step" was null or undefined when calling apiStepCreate().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
headerParameters['Content-Type'] = 'application/json';
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/step/`,
|
|
method: 'POST',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
body: StepToJSON(requestParameters['step']),
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => StepFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiStepCreate(requestParameters: ApiStepCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Step> {
|
|
const response = await this.apiStepCreateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiStepDestroyRaw(requestParameters: ApiStepDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiStepDestroy().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/step/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'DELETE',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.VoidApiResponse(response);
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiStepDestroy(requestParameters: ApiStepDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
await this.apiStepDestroyRaw(requestParameters, initOverrides);
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiStepListRaw(requestParameters: ApiStepListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PaginatedStepList>> {
|
|
const queryParameters: any = {};
|
|
|
|
if (requestParameters['page'] != null) {
|
|
queryParameters['page'] = requestParameters['page'];
|
|
}
|
|
|
|
if (requestParameters['pageSize'] != null) {
|
|
queryParameters['page_size'] = requestParameters['pageSize'];
|
|
}
|
|
|
|
if (requestParameters['query'] != null) {
|
|
queryParameters['query'] = requestParameters['query'];
|
|
}
|
|
|
|
if (requestParameters['recipe'] != null) {
|
|
queryParameters['recipe'] = requestParameters['recipe'];
|
|
}
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/step/`,
|
|
method: 'GET',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedStepListFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiStepList(requestParameters: ApiStepListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedStepList> {
|
|
const response = await this.apiStepListRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiStepPartialUpdateRaw(requestParameters: ApiStepPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Step>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiStepPartialUpdate().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
headerParameters['Content-Type'] = 'application/json';
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/step/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'PATCH',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
body: PatchedStepToJSON(requestParameters['patchedStep']),
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => StepFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiStepPartialUpdate(requestParameters: ApiStepPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Step> {
|
|
const response = await this.apiStepPartialUpdateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiStepRetrieveRaw(requestParameters: ApiStepRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Step>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiStepRetrieve().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/step/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'GET',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => StepFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiStepRetrieve(requestParameters: ApiStepRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Step> {
|
|
const response = await this.apiStepRetrieveRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiStepUpdateRaw(requestParameters: ApiStepUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Step>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiStepUpdate().'
|
|
);
|
|
}
|
|
|
|
if (requestParameters['step'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'step',
|
|
'Required parameter "step" was null or undefined when calling apiStepUpdate().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
headerParameters['Content-Type'] = 'application/json';
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/step/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'PUT',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
body: StepToJSON(requestParameters['step']),
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => StepFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiStepUpdate(requestParameters: ApiStepUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Step> {
|
|
const response = await this.apiStepUpdateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiStorageCreateRaw(requestParameters: ApiStorageCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Storage>> {
|
|
if (requestParameters['storage'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'storage',
|
|
'Required parameter "storage" was null or undefined when calling apiStorageCreate().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
headerParameters['Content-Type'] = 'application/json';
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/storage/`,
|
|
method: 'POST',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
body: StorageToJSON(requestParameters['storage']),
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => StorageFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiStorageCreate(requestParameters: ApiStorageCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Storage> {
|
|
const response = await this.apiStorageCreateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiStorageDestroyRaw(requestParameters: ApiStorageDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiStorageDestroy().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/storage/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'DELETE',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.VoidApiResponse(response);
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiStorageDestroy(requestParameters: ApiStorageDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
await this.apiStorageDestroyRaw(requestParameters, initOverrides);
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiStorageListRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<Storage>>> {
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/storage/`,
|
|
method: 'GET',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(StorageFromJSON));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiStorageList(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<Storage>> {
|
|
const response = await this.apiStorageListRaw(initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiStoragePartialUpdateRaw(requestParameters: ApiStoragePartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Storage>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiStoragePartialUpdate().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
headerParameters['Content-Type'] = 'application/json';
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/storage/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'PATCH',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
body: PatchedStorageToJSON(requestParameters['patchedStorage']),
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => StorageFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiStoragePartialUpdate(requestParameters: ApiStoragePartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Storage> {
|
|
const response = await this.apiStoragePartialUpdateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiStorageRetrieveRaw(requestParameters: ApiStorageRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Storage>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiStorageRetrieve().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/storage/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'GET',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => StorageFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiStorageRetrieve(requestParameters: ApiStorageRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Storage> {
|
|
const response = await this.apiStorageRetrieveRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiStorageUpdateRaw(requestParameters: ApiStorageUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Storage>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiStorageUpdate().'
|
|
);
|
|
}
|
|
|
|
if (requestParameters['storage'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'storage',
|
|
'Required parameter "storage" was null or undefined when calling apiStorageUpdate().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
headerParameters['Content-Type'] = 'application/json';
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/storage/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'PUT',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
body: StorageToJSON(requestParameters['storage']),
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => StorageFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiStorageUpdate(requestParameters: ApiStorageUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Storage> {
|
|
const response = await this.apiStorageUpdateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiSupermarketCategoryCreateRaw(requestParameters: ApiSupermarketCategoryCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SupermarketCategory>> {
|
|
if (requestParameters['supermarketCategory'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'supermarketCategory',
|
|
'Required parameter "supermarketCategory" was null or undefined when calling apiSupermarketCategoryCreate().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
headerParameters['Content-Type'] = 'application/json';
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/supermarket-category/`,
|
|
method: 'POST',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
body: SupermarketCategoryToJSON(requestParameters['supermarketCategory']),
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => SupermarketCategoryFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiSupermarketCategoryCreate(requestParameters: ApiSupermarketCategoryCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SupermarketCategory> {
|
|
const response = await this.apiSupermarketCategoryCreateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiSupermarketCategoryDestroyRaw(requestParameters: ApiSupermarketCategoryDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiSupermarketCategoryDestroy().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/supermarket-category/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'DELETE',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.VoidApiResponse(response);
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiSupermarketCategoryDestroy(requestParameters: ApiSupermarketCategoryDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
await this.apiSupermarketCategoryDestroyRaw(requestParameters, initOverrides);
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiSupermarketCategoryListRaw(requestParameters: ApiSupermarketCategoryListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PaginatedSupermarketCategoryList>> {
|
|
const queryParameters: any = {};
|
|
|
|
if (requestParameters['limit'] != null) {
|
|
queryParameters['limit'] = requestParameters['limit'];
|
|
}
|
|
|
|
if (requestParameters['page'] != null) {
|
|
queryParameters['page'] = requestParameters['page'];
|
|
}
|
|
|
|
if (requestParameters['pageSize'] != null) {
|
|
queryParameters['page_size'] = requestParameters['pageSize'];
|
|
}
|
|
|
|
if (requestParameters['query'] != null) {
|
|
queryParameters['query'] = requestParameters['query'];
|
|
}
|
|
|
|
if (requestParameters['random'] != null) {
|
|
queryParameters['random'] = requestParameters['random'];
|
|
}
|
|
|
|
if (requestParameters['updatedAt'] != null) {
|
|
queryParameters['updated_at'] = requestParameters['updatedAt'];
|
|
}
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/supermarket-category/`,
|
|
method: 'GET',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedSupermarketCategoryListFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiSupermarketCategoryList(requestParameters: ApiSupermarketCategoryListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedSupermarketCategoryList> {
|
|
const response = await this.apiSupermarketCategoryListRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiSupermarketCategoryMergeUpdateRaw(requestParameters: ApiSupermarketCategoryMergeUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SupermarketCategory>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiSupermarketCategoryMergeUpdate().'
|
|
);
|
|
}
|
|
|
|
if (requestParameters['target'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'target',
|
|
'Required parameter "target" was null or undefined when calling apiSupermarketCategoryMergeUpdate().'
|
|
);
|
|
}
|
|
|
|
if (requestParameters['supermarketCategory'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'supermarketCategory',
|
|
'Required parameter "supermarketCategory" was null or undefined when calling apiSupermarketCategoryMergeUpdate().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
headerParameters['Content-Type'] = 'application/json';
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/supermarket-category/{id}/merge/{target}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))).replace(`{${"target"}}`, encodeURIComponent(String(requestParameters['target']))),
|
|
method: 'PUT',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
body: SupermarketCategoryToJSON(requestParameters['supermarketCategory']),
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => SupermarketCategoryFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiSupermarketCategoryMergeUpdate(requestParameters: ApiSupermarketCategoryMergeUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SupermarketCategory> {
|
|
const response = await this.apiSupermarketCategoryMergeUpdateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiSupermarketCategoryPartialUpdateRaw(requestParameters: ApiSupermarketCategoryPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SupermarketCategory>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiSupermarketCategoryPartialUpdate().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
headerParameters['Content-Type'] = 'application/json';
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/supermarket-category/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'PATCH',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
body: PatchedSupermarketCategoryToJSON(requestParameters['patchedSupermarketCategory']),
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => SupermarketCategoryFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiSupermarketCategoryPartialUpdate(requestParameters: ApiSupermarketCategoryPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SupermarketCategory> {
|
|
const response = await this.apiSupermarketCategoryPartialUpdateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiSupermarketCategoryRelationCreateRaw(requestParameters: ApiSupermarketCategoryRelationCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SupermarketCategoryRelation>> {
|
|
if (requestParameters['supermarketCategoryRelation'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'supermarketCategoryRelation',
|
|
'Required parameter "supermarketCategoryRelation" was null or undefined when calling apiSupermarketCategoryRelationCreate().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
headerParameters['Content-Type'] = 'application/json';
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/supermarket-category-relation/`,
|
|
method: 'POST',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
body: SupermarketCategoryRelationToJSON(requestParameters['supermarketCategoryRelation']),
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => SupermarketCategoryRelationFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiSupermarketCategoryRelationCreate(requestParameters: ApiSupermarketCategoryRelationCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SupermarketCategoryRelation> {
|
|
const response = await this.apiSupermarketCategoryRelationCreateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiSupermarketCategoryRelationDestroyRaw(requestParameters: ApiSupermarketCategoryRelationDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiSupermarketCategoryRelationDestroy().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/supermarket-category-relation/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'DELETE',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.VoidApiResponse(response);
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiSupermarketCategoryRelationDestroy(requestParameters: ApiSupermarketCategoryRelationDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
await this.apiSupermarketCategoryRelationDestroyRaw(requestParameters, initOverrides);
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiSupermarketCategoryRelationListRaw(requestParameters: ApiSupermarketCategoryRelationListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PaginatedSupermarketCategoryRelationList>> {
|
|
const queryParameters: any = {};
|
|
|
|
if (requestParameters['limit'] != null) {
|
|
queryParameters['limit'] = requestParameters['limit'];
|
|
}
|
|
|
|
if (requestParameters['page'] != null) {
|
|
queryParameters['page'] = requestParameters['page'];
|
|
}
|
|
|
|
if (requestParameters['pageSize'] != null) {
|
|
queryParameters['page_size'] = requestParameters['pageSize'];
|
|
}
|
|
|
|
if (requestParameters['query'] != null) {
|
|
queryParameters['query'] = requestParameters['query'];
|
|
}
|
|
|
|
if (requestParameters['random'] != null) {
|
|
queryParameters['random'] = requestParameters['random'];
|
|
}
|
|
|
|
if (requestParameters['updatedAt'] != null) {
|
|
queryParameters['updated_at'] = requestParameters['updatedAt'];
|
|
}
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/supermarket-category-relation/`,
|
|
method: 'GET',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedSupermarketCategoryRelationListFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiSupermarketCategoryRelationList(requestParameters: ApiSupermarketCategoryRelationListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedSupermarketCategoryRelationList> {
|
|
const response = await this.apiSupermarketCategoryRelationListRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiSupermarketCategoryRelationPartialUpdateRaw(requestParameters: ApiSupermarketCategoryRelationPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SupermarketCategoryRelation>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiSupermarketCategoryRelationPartialUpdate().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
headerParameters['Content-Type'] = 'application/json';
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/supermarket-category-relation/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'PATCH',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
body: PatchedSupermarketCategoryRelationToJSON(requestParameters['patchedSupermarketCategoryRelation']),
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => SupermarketCategoryRelationFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiSupermarketCategoryRelationPartialUpdate(requestParameters: ApiSupermarketCategoryRelationPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SupermarketCategoryRelation> {
|
|
const response = await this.apiSupermarketCategoryRelationPartialUpdateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiSupermarketCategoryRelationRetrieveRaw(requestParameters: ApiSupermarketCategoryRelationRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SupermarketCategoryRelation>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiSupermarketCategoryRelationRetrieve().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/supermarket-category-relation/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'GET',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => SupermarketCategoryRelationFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiSupermarketCategoryRelationRetrieve(requestParameters: ApiSupermarketCategoryRelationRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SupermarketCategoryRelation> {
|
|
const response = await this.apiSupermarketCategoryRelationRetrieveRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiSupermarketCategoryRelationUpdateRaw(requestParameters: ApiSupermarketCategoryRelationUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SupermarketCategoryRelation>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiSupermarketCategoryRelationUpdate().'
|
|
);
|
|
}
|
|
|
|
if (requestParameters['supermarketCategoryRelation'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'supermarketCategoryRelation',
|
|
'Required parameter "supermarketCategoryRelation" was null or undefined when calling apiSupermarketCategoryRelationUpdate().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
headerParameters['Content-Type'] = 'application/json';
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/supermarket-category-relation/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'PUT',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
body: SupermarketCategoryRelationToJSON(requestParameters['supermarketCategoryRelation']),
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => SupermarketCategoryRelationFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiSupermarketCategoryRelationUpdate(requestParameters: ApiSupermarketCategoryRelationUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SupermarketCategoryRelation> {
|
|
const response = await this.apiSupermarketCategoryRelationUpdateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiSupermarketCategoryRetrieveRaw(requestParameters: ApiSupermarketCategoryRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SupermarketCategory>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiSupermarketCategoryRetrieve().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/supermarket-category/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'GET',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => SupermarketCategoryFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiSupermarketCategoryRetrieve(requestParameters: ApiSupermarketCategoryRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SupermarketCategory> {
|
|
const response = await this.apiSupermarketCategoryRetrieveRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiSupermarketCategoryUpdateRaw(requestParameters: ApiSupermarketCategoryUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SupermarketCategory>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiSupermarketCategoryUpdate().'
|
|
);
|
|
}
|
|
|
|
if (requestParameters['supermarketCategory'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'supermarketCategory',
|
|
'Required parameter "supermarketCategory" was null or undefined when calling apiSupermarketCategoryUpdate().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
headerParameters['Content-Type'] = 'application/json';
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/supermarket-category/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'PUT',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
body: SupermarketCategoryToJSON(requestParameters['supermarketCategory']),
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => SupermarketCategoryFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiSupermarketCategoryUpdate(requestParameters: ApiSupermarketCategoryUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SupermarketCategory> {
|
|
const response = await this.apiSupermarketCategoryUpdateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiSupermarketCreateRaw(requestParameters: ApiSupermarketCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Supermarket>> {
|
|
if (requestParameters['supermarket'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'supermarket',
|
|
'Required parameter "supermarket" was null or undefined when calling apiSupermarketCreate().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
headerParameters['Content-Type'] = 'application/json';
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/supermarket/`,
|
|
method: 'POST',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
body: SupermarketToJSON(requestParameters['supermarket']),
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => SupermarketFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiSupermarketCreate(requestParameters: ApiSupermarketCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Supermarket> {
|
|
const response = await this.apiSupermarketCreateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiSupermarketDestroyRaw(requestParameters: ApiSupermarketDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiSupermarketDestroy().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/supermarket/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'DELETE',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.VoidApiResponse(response);
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiSupermarketDestroy(requestParameters: ApiSupermarketDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
await this.apiSupermarketDestroyRaw(requestParameters, initOverrides);
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiSupermarketListRaw(requestParameters: ApiSupermarketListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PaginatedSupermarketList>> {
|
|
const queryParameters: any = {};
|
|
|
|
if (requestParameters['limit'] != null) {
|
|
queryParameters['limit'] = requestParameters['limit'];
|
|
}
|
|
|
|
if (requestParameters['page'] != null) {
|
|
queryParameters['page'] = requestParameters['page'];
|
|
}
|
|
|
|
if (requestParameters['pageSize'] != null) {
|
|
queryParameters['page_size'] = requestParameters['pageSize'];
|
|
}
|
|
|
|
if (requestParameters['query'] != null) {
|
|
queryParameters['query'] = requestParameters['query'];
|
|
}
|
|
|
|
if (requestParameters['random'] != null) {
|
|
queryParameters['random'] = requestParameters['random'];
|
|
}
|
|
|
|
if (requestParameters['updatedAt'] != null) {
|
|
queryParameters['updated_at'] = requestParameters['updatedAt'];
|
|
}
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/supermarket/`,
|
|
method: 'GET',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedSupermarketListFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiSupermarketList(requestParameters: ApiSupermarketListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedSupermarketList> {
|
|
const response = await this.apiSupermarketListRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiSupermarketPartialUpdateRaw(requestParameters: ApiSupermarketPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Supermarket>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiSupermarketPartialUpdate().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
headerParameters['Content-Type'] = 'application/json';
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/supermarket/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'PATCH',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
body: PatchedSupermarketToJSON(requestParameters['patchedSupermarket']),
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => SupermarketFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiSupermarketPartialUpdate(requestParameters: ApiSupermarketPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Supermarket> {
|
|
const response = await this.apiSupermarketPartialUpdateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiSupermarketRetrieveRaw(requestParameters: ApiSupermarketRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Supermarket>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiSupermarketRetrieve().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/supermarket/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'GET',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => SupermarketFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiSupermarketRetrieve(requestParameters: ApiSupermarketRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Supermarket> {
|
|
const response = await this.apiSupermarketRetrieveRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiSupermarketUpdateRaw(requestParameters: ApiSupermarketUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Supermarket>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiSupermarketUpdate().'
|
|
);
|
|
}
|
|
|
|
if (requestParameters['supermarket'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'supermarket',
|
|
'Required parameter "supermarket" was null or undefined when calling apiSupermarketUpdate().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
headerParameters['Content-Type'] = 'application/json';
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/supermarket/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'PUT',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
body: SupermarketToJSON(requestParameters['supermarket']),
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => SupermarketFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiSupermarketUpdate(requestParameters: ApiSupermarketUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Supermarket> {
|
|
const response = await this.apiSupermarketUpdateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* api endpoint to switch space function
|
|
*/
|
|
async apiSwitchActiveSpaceRetrieveRaw(requestParameters: ApiSwitchActiveSpaceRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
if (requestParameters['spaceId'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'spaceId',
|
|
'Required parameter "spaceId" was null or undefined when calling apiSwitchActiveSpaceRetrieve().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/switch-active-space/{spaceId}/`.replace(`{${"spaceId"}}`, encodeURIComponent(String(requestParameters['spaceId']))),
|
|
method: 'GET',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.VoidApiResponse(response);
|
|
}
|
|
|
|
/**
|
|
* api endpoint to switch space function
|
|
*/
|
|
async apiSwitchActiveSpaceRetrieve(requestParameters: ApiSwitchActiveSpaceRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
await this.apiSwitchActiveSpaceRetrieveRaw(requestParameters, initOverrides);
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiSyncCreateRaw(requestParameters: ApiSyncCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Sync>> {
|
|
if (requestParameters['sync'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'sync',
|
|
'Required parameter "sync" was null or undefined when calling apiSyncCreate().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
headerParameters['Content-Type'] = 'application/json';
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/sync/`,
|
|
method: 'POST',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
body: SyncToJSON(requestParameters['sync']),
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => SyncFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiSyncCreate(requestParameters: ApiSyncCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Sync> {
|
|
const response = await this.apiSyncCreateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiSyncDestroyRaw(requestParameters: ApiSyncDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiSyncDestroy().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/sync/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'DELETE',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.VoidApiResponse(response);
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiSyncDestroy(requestParameters: ApiSyncDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
await this.apiSyncDestroyRaw(requestParameters, initOverrides);
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiSyncListRaw(requestParameters: ApiSyncListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PaginatedSyncList>> {
|
|
const queryParameters: any = {};
|
|
|
|
if (requestParameters['page'] != null) {
|
|
queryParameters['page'] = requestParameters['page'];
|
|
}
|
|
|
|
if (requestParameters['pageSize'] != null) {
|
|
queryParameters['page_size'] = requestParameters['pageSize'];
|
|
}
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/sync/`,
|
|
method: 'GET',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedSyncListFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiSyncList(requestParameters: ApiSyncListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedSyncList> {
|
|
const response = await this.apiSyncListRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiSyncLogListRaw(requestParameters: ApiSyncLogListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PaginatedSyncLogList>> {
|
|
const queryParameters: any = {};
|
|
|
|
if (requestParameters['page'] != null) {
|
|
queryParameters['page'] = requestParameters['page'];
|
|
}
|
|
|
|
if (requestParameters['pageSize'] != null) {
|
|
queryParameters['page_size'] = requestParameters['pageSize'];
|
|
}
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/sync-log/`,
|
|
method: 'GET',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedSyncLogListFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiSyncLogList(requestParameters: ApiSyncLogListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedSyncLogList> {
|
|
const response = await this.apiSyncLogListRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiSyncLogRetrieveRaw(requestParameters: ApiSyncLogRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SyncLog>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiSyncLogRetrieve().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/sync-log/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'GET',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => SyncLogFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiSyncLogRetrieve(requestParameters: ApiSyncLogRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SyncLog> {
|
|
const response = await this.apiSyncLogRetrieveRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiSyncPartialUpdateRaw(requestParameters: ApiSyncPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Sync>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiSyncPartialUpdate().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
headerParameters['Content-Type'] = 'application/json';
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/sync/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'PATCH',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
body: PatchedSyncToJSON(requestParameters['patchedSync']),
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => SyncFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiSyncPartialUpdate(requestParameters: ApiSyncPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Sync> {
|
|
const response = await this.apiSyncPartialUpdateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiSyncRetrieveRaw(requestParameters: ApiSyncRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Sync>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiSyncRetrieve().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/sync/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'GET',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => SyncFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiSyncRetrieve(requestParameters: ApiSyncRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Sync> {
|
|
const response = await this.apiSyncRetrieveRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiSyncUpdateRaw(requestParameters: ApiSyncUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Sync>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiSyncUpdate().'
|
|
);
|
|
}
|
|
|
|
if (requestParameters['sync'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'sync',
|
|
'Required parameter "sync" was null or undefined when calling apiSyncUpdate().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
headerParameters['Content-Type'] = 'application/json';
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/sync/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'PUT',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
body: SyncToJSON(requestParameters['sync']),
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => SyncFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiSyncUpdate(requestParameters: ApiSyncUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Sync> {
|
|
const response = await this.apiSyncUpdateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiUnitConversionCreateRaw(requestParameters: ApiUnitConversionCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UnitConversion>> {
|
|
if (requestParameters['unitConversion'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'unitConversion',
|
|
'Required parameter "unitConversion" was null or undefined when calling apiUnitConversionCreate().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
headerParameters['Content-Type'] = 'application/json';
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/unit-conversion/`,
|
|
method: 'POST',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
body: UnitConversionToJSON(requestParameters['unitConversion']),
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => UnitConversionFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiUnitConversionCreate(requestParameters: ApiUnitConversionCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UnitConversion> {
|
|
const response = await this.apiUnitConversionCreateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiUnitConversionDestroyRaw(requestParameters: ApiUnitConversionDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiUnitConversionDestroy().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/unit-conversion/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'DELETE',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.VoidApiResponse(response);
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiUnitConversionDestroy(requestParameters: ApiUnitConversionDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
await this.apiUnitConversionDestroyRaw(requestParameters, initOverrides);
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiUnitConversionListRaw(requestParameters: ApiUnitConversionListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PaginatedUnitConversionList>> {
|
|
const queryParameters: any = {};
|
|
|
|
if (requestParameters['foodId'] != null) {
|
|
queryParameters['food_id'] = requestParameters['foodId'];
|
|
}
|
|
|
|
if (requestParameters['page'] != null) {
|
|
queryParameters['page'] = requestParameters['page'];
|
|
}
|
|
|
|
if (requestParameters['pageSize'] != null) {
|
|
queryParameters['page_size'] = requestParameters['pageSize'];
|
|
}
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/unit-conversion/`,
|
|
method: 'GET',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedUnitConversionListFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiUnitConversionList(requestParameters: ApiUnitConversionListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedUnitConversionList> {
|
|
const response = await this.apiUnitConversionListRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiUnitConversionPartialUpdateRaw(requestParameters: ApiUnitConversionPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UnitConversion>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiUnitConversionPartialUpdate().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
headerParameters['Content-Type'] = 'application/json';
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/unit-conversion/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'PATCH',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
body: PatchedUnitConversionToJSON(requestParameters['patchedUnitConversion']),
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => UnitConversionFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiUnitConversionPartialUpdate(requestParameters: ApiUnitConversionPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UnitConversion> {
|
|
const response = await this.apiUnitConversionPartialUpdateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiUnitConversionRetrieveRaw(requestParameters: ApiUnitConversionRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UnitConversion>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiUnitConversionRetrieve().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/unit-conversion/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'GET',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => UnitConversionFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiUnitConversionRetrieve(requestParameters: ApiUnitConversionRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UnitConversion> {
|
|
const response = await this.apiUnitConversionRetrieveRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiUnitConversionUpdateRaw(requestParameters: ApiUnitConversionUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UnitConversion>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiUnitConversionUpdate().'
|
|
);
|
|
}
|
|
|
|
if (requestParameters['unitConversion'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'unitConversion',
|
|
'Required parameter "unitConversion" was null or undefined when calling apiUnitConversionUpdate().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
headerParameters['Content-Type'] = 'application/json';
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/unit-conversion/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'PUT',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
body: UnitConversionToJSON(requestParameters['unitConversion']),
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => UnitConversionFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiUnitConversionUpdate(requestParameters: ApiUnitConversionUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UnitConversion> {
|
|
const response = await this.apiUnitConversionUpdateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiUnitCreateRaw(requestParameters: ApiUnitCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Unit>> {
|
|
if (requestParameters['unit'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'unit',
|
|
'Required parameter "unit" was null or undefined when calling apiUnitCreate().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
headerParameters['Content-Type'] = 'application/json';
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/unit/`,
|
|
method: 'POST',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
body: UnitToJSON(requestParameters['unit']),
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => UnitFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiUnitCreate(requestParameters: ApiUnitCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Unit> {
|
|
const response = await this.apiUnitCreateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiUnitDestroyRaw(requestParameters: ApiUnitDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiUnitDestroy().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/unit/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'DELETE',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.VoidApiResponse(response);
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiUnitDestroy(requestParameters: ApiUnitDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
await this.apiUnitDestroyRaw(requestParameters, initOverrides);
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiUnitListRaw(requestParameters: ApiUnitListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PaginatedUnitList>> {
|
|
const queryParameters: any = {};
|
|
|
|
if (requestParameters['limit'] != null) {
|
|
queryParameters['limit'] = requestParameters['limit'];
|
|
}
|
|
|
|
if (requestParameters['page'] != null) {
|
|
queryParameters['page'] = requestParameters['page'];
|
|
}
|
|
|
|
if (requestParameters['pageSize'] != null) {
|
|
queryParameters['page_size'] = requestParameters['pageSize'];
|
|
}
|
|
|
|
if (requestParameters['query'] != null) {
|
|
queryParameters['query'] = requestParameters['query'];
|
|
}
|
|
|
|
if (requestParameters['random'] != null) {
|
|
queryParameters['random'] = requestParameters['random'];
|
|
}
|
|
|
|
if (requestParameters['updatedAt'] != null) {
|
|
queryParameters['updated_at'] = requestParameters['updatedAt'];
|
|
}
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/unit/`,
|
|
method: 'GET',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedUnitListFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiUnitList(requestParameters: ApiUnitListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedUnitList> {
|
|
const response = await this.apiUnitListRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiUnitMergeUpdateRaw(requestParameters: ApiUnitMergeUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Unit>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiUnitMergeUpdate().'
|
|
);
|
|
}
|
|
|
|
if (requestParameters['target'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'target',
|
|
'Required parameter "target" was null or undefined when calling apiUnitMergeUpdate().'
|
|
);
|
|
}
|
|
|
|
if (requestParameters['unit'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'unit',
|
|
'Required parameter "unit" was null or undefined when calling apiUnitMergeUpdate().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
headerParameters['Content-Type'] = 'application/json';
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/unit/{id}/merge/{target}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))).replace(`{${"target"}}`, encodeURIComponent(String(requestParameters['target']))),
|
|
method: 'PUT',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
body: UnitToJSON(requestParameters['unit']),
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => UnitFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiUnitMergeUpdate(requestParameters: ApiUnitMergeUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Unit> {
|
|
const response = await this.apiUnitMergeUpdateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiUnitPartialUpdateRaw(requestParameters: ApiUnitPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Unit>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiUnitPartialUpdate().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
headerParameters['Content-Type'] = 'application/json';
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/unit/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'PATCH',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
body: PatchedUnitToJSON(requestParameters['patchedUnit']),
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => UnitFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiUnitPartialUpdate(requestParameters: ApiUnitPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Unit> {
|
|
const response = await this.apiUnitPartialUpdateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiUnitRetrieveRaw(requestParameters: ApiUnitRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Unit>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiUnitRetrieve().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/unit/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'GET',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => UnitFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiUnitRetrieve(requestParameters: ApiUnitRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Unit> {
|
|
const response = await this.apiUnitRetrieveRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiUnitUpdateRaw(requestParameters: ApiUnitUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Unit>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiUnitUpdate().'
|
|
);
|
|
}
|
|
|
|
if (requestParameters['unit'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'unit',
|
|
'Required parameter "unit" was null or undefined when calling apiUnitUpdate().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
headerParameters['Content-Type'] = 'application/json';
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/unit/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'PUT',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
body: UnitToJSON(requestParameters['unit']),
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => UnitFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiUnitUpdate(requestParameters: ApiUnitUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Unit> {
|
|
const response = await this.apiUnitUpdateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiUserFileCreateRaw(requestParameters: ApiUserFileCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UserFile>> {
|
|
if (requestParameters['name'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'name',
|
|
'Required parameter "name" was null or undefined when calling apiUserFileCreate().'
|
|
);
|
|
}
|
|
|
|
if (requestParameters['fileDownload'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'fileDownload',
|
|
'Required parameter "fileDownload" was null or undefined when calling apiUserFileCreate().'
|
|
);
|
|
}
|
|
|
|
if (requestParameters['preview'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'preview',
|
|
'Required parameter "preview" was null or undefined when calling apiUserFileCreate().'
|
|
);
|
|
}
|
|
|
|
if (requestParameters['fileSizeKb'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'fileSizeKb',
|
|
'Required parameter "fileSizeKb" was null or undefined when calling apiUserFileCreate().'
|
|
);
|
|
}
|
|
|
|
if (requestParameters['createdBy'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'createdBy',
|
|
'Required parameter "createdBy" was null or undefined when calling apiUserFileCreate().'
|
|
);
|
|
}
|
|
|
|
if (requestParameters['createdAt'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'createdAt',
|
|
'Required parameter "createdAt" was null or undefined when calling apiUserFileCreate().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const consumes: runtime.Consume[] = [
|
|
{ contentType: 'multipart/form-data' },
|
|
];
|
|
// @ts-ignore: canConsumeForm may be unused
|
|
const canConsumeForm = runtime.canConsumeForm(consumes);
|
|
|
|
let formParams: { append(param: string, value: any): any };
|
|
let useForm = false;
|
|
if (useForm) {
|
|
formParams = new FormData();
|
|
} else {
|
|
formParams = new URLSearchParams();
|
|
}
|
|
|
|
if (requestParameters['id'] != null) {
|
|
formParams.append('id', requestParameters['id'] as any);
|
|
}
|
|
|
|
if (requestParameters['name'] != null) {
|
|
formParams.append('name', requestParameters['name'] as any);
|
|
}
|
|
|
|
if (requestParameters['file'] != null) {
|
|
formParams.append('file', requestParameters['file'] as any);
|
|
}
|
|
|
|
if (requestParameters['fileDownload'] != null) {
|
|
formParams.append('file_download', requestParameters['fileDownload'] as any);
|
|
}
|
|
|
|
if (requestParameters['preview'] != null) {
|
|
formParams.append('preview', requestParameters['preview'] as any);
|
|
}
|
|
|
|
if (requestParameters['fileSizeKb'] != null) {
|
|
formParams.append('file_size_kb', requestParameters['fileSizeKb'] as any);
|
|
}
|
|
|
|
if (requestParameters['createdBy'] != null) {
|
|
formParams.append('created_by', new Blob([JSON.stringify(UserToJSON(requestParameters['createdBy']))], { type: "application/json", }));
|
|
}
|
|
|
|
if (requestParameters['createdAt'] != null) {
|
|
formParams.append('created_at', (requestParameters['createdAt'] as any).toISOString());
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/user-file/`,
|
|
method: 'POST',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
body: formParams,
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => UserFileFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiUserFileCreate(requestParameters: ApiUserFileCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UserFile> {
|
|
const response = await this.apiUserFileCreateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiUserFileDestroyRaw(requestParameters: ApiUserFileDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiUserFileDestroy().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/user-file/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'DELETE',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.VoidApiResponse(response);
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiUserFileDestroy(requestParameters: ApiUserFileDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
await this.apiUserFileDestroyRaw(requestParameters, initOverrides);
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiUserFileListRaw(requestParameters: ApiUserFileListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PaginatedUserFileList>> {
|
|
const queryParameters: any = {};
|
|
|
|
if (requestParameters['limit'] != null) {
|
|
queryParameters['limit'] = requestParameters['limit'];
|
|
}
|
|
|
|
if (requestParameters['page'] != null) {
|
|
queryParameters['page'] = requestParameters['page'];
|
|
}
|
|
|
|
if (requestParameters['pageSize'] != null) {
|
|
queryParameters['page_size'] = requestParameters['pageSize'];
|
|
}
|
|
|
|
if (requestParameters['query'] != null) {
|
|
queryParameters['query'] = requestParameters['query'];
|
|
}
|
|
|
|
if (requestParameters['random'] != null) {
|
|
queryParameters['random'] = requestParameters['random'];
|
|
}
|
|
|
|
if (requestParameters['updatedAt'] != null) {
|
|
queryParameters['updated_at'] = requestParameters['updatedAt'];
|
|
}
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/user-file/`,
|
|
method: 'GET',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedUserFileListFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiUserFileList(requestParameters: ApiUserFileListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedUserFileList> {
|
|
const response = await this.apiUserFileListRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiUserFilePartialUpdateRaw(requestParameters: ApiUserFilePartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UserFile>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiUserFilePartialUpdate().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const consumes: runtime.Consume[] = [
|
|
{ contentType: 'multipart/form-data' },
|
|
];
|
|
// @ts-ignore: canConsumeForm may be unused
|
|
const canConsumeForm = runtime.canConsumeForm(consumes);
|
|
|
|
let formParams: { append(param: string, value: any): any };
|
|
let useForm = false;
|
|
if (useForm) {
|
|
formParams = new FormData();
|
|
} else {
|
|
formParams = new URLSearchParams();
|
|
}
|
|
|
|
if (requestParameters['id2'] != null) {
|
|
formParams.append('id', requestParameters['id2'] as any);
|
|
}
|
|
|
|
if (requestParameters['name'] != null) {
|
|
formParams.append('name', requestParameters['name'] as any);
|
|
}
|
|
|
|
if (requestParameters['file'] != null) {
|
|
formParams.append('file', requestParameters['file'] as any);
|
|
}
|
|
|
|
if (requestParameters['fileDownload'] != null) {
|
|
formParams.append('file_download', requestParameters['fileDownload'] as any);
|
|
}
|
|
|
|
if (requestParameters['preview'] != null) {
|
|
formParams.append('preview', requestParameters['preview'] as any);
|
|
}
|
|
|
|
if (requestParameters['fileSizeKb'] != null) {
|
|
formParams.append('file_size_kb', requestParameters['fileSizeKb'] as any);
|
|
}
|
|
|
|
if (requestParameters['createdBy'] != null) {
|
|
formParams.append('created_by', new Blob([JSON.stringify(UserToJSON(requestParameters['createdBy']))], { type: "application/json", }));
|
|
}
|
|
|
|
if (requestParameters['createdAt'] != null) {
|
|
formParams.append('created_at', (requestParameters['createdAt'] as any).toISOString());
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/user-file/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'PATCH',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
body: formParams,
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => UserFileFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiUserFilePartialUpdate(requestParameters: ApiUserFilePartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UserFile> {
|
|
const response = await this.apiUserFilePartialUpdateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiUserFileRetrieveRaw(requestParameters: ApiUserFileRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UserFile>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiUserFileRetrieve().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/user-file/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'GET',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => UserFileFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiUserFileRetrieve(requestParameters: ApiUserFileRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UserFile> {
|
|
const response = await this.apiUserFileRetrieveRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiUserFileUpdateRaw(requestParameters: ApiUserFileUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UserFile>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiUserFileUpdate().'
|
|
);
|
|
}
|
|
|
|
if (requestParameters['name'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'name',
|
|
'Required parameter "name" was null or undefined when calling apiUserFileUpdate().'
|
|
);
|
|
}
|
|
|
|
if (requestParameters['fileDownload'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'fileDownload',
|
|
'Required parameter "fileDownload" was null or undefined when calling apiUserFileUpdate().'
|
|
);
|
|
}
|
|
|
|
if (requestParameters['preview'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'preview',
|
|
'Required parameter "preview" was null or undefined when calling apiUserFileUpdate().'
|
|
);
|
|
}
|
|
|
|
if (requestParameters['fileSizeKb'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'fileSizeKb',
|
|
'Required parameter "fileSizeKb" was null or undefined when calling apiUserFileUpdate().'
|
|
);
|
|
}
|
|
|
|
if (requestParameters['createdBy'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'createdBy',
|
|
'Required parameter "createdBy" was null or undefined when calling apiUserFileUpdate().'
|
|
);
|
|
}
|
|
|
|
if (requestParameters['createdAt'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'createdAt',
|
|
'Required parameter "createdAt" was null or undefined when calling apiUserFileUpdate().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const consumes: runtime.Consume[] = [
|
|
{ contentType: 'multipart/form-data' },
|
|
];
|
|
// @ts-ignore: canConsumeForm may be unused
|
|
const canConsumeForm = runtime.canConsumeForm(consumes);
|
|
|
|
let formParams: { append(param: string, value: any): any };
|
|
let useForm = false;
|
|
if (useForm) {
|
|
formParams = new FormData();
|
|
} else {
|
|
formParams = new URLSearchParams();
|
|
}
|
|
|
|
if (requestParameters['id2'] != null) {
|
|
formParams.append('id', requestParameters['id2'] as any);
|
|
}
|
|
|
|
if (requestParameters['name'] != null) {
|
|
formParams.append('name', requestParameters['name'] as any);
|
|
}
|
|
|
|
if (requestParameters['file'] != null) {
|
|
formParams.append('file', requestParameters['file'] as any);
|
|
}
|
|
|
|
if (requestParameters['fileDownload'] != null) {
|
|
formParams.append('file_download', requestParameters['fileDownload'] as any);
|
|
}
|
|
|
|
if (requestParameters['preview'] != null) {
|
|
formParams.append('preview', requestParameters['preview'] as any);
|
|
}
|
|
|
|
if (requestParameters['fileSizeKb'] != null) {
|
|
formParams.append('file_size_kb', requestParameters['fileSizeKb'] as any);
|
|
}
|
|
|
|
if (requestParameters['createdBy'] != null) {
|
|
formParams.append('created_by', new Blob([JSON.stringify(UserToJSON(requestParameters['createdBy']))], { type: "application/json", }));
|
|
}
|
|
|
|
if (requestParameters['createdAt'] != null) {
|
|
formParams.append('created_at', (requestParameters['createdAt'] as any).toISOString());
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/user-file/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'PUT',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
body: formParams,
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => UserFileFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiUserFileUpdate(requestParameters: ApiUserFileUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UserFile> {
|
|
const response = await this.apiUserFileUpdateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiUserListRaw(requestParameters: ApiUserListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<User>>> {
|
|
const queryParameters: any = {};
|
|
|
|
if (requestParameters['filterList'] != null) {
|
|
queryParameters['filter_list'] = requestParameters['filterList'];
|
|
}
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/user/`,
|
|
method: 'GET',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(UserFromJSON));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiUserList(requestParameters: ApiUserListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<User>> {
|
|
const response = await this.apiUserListRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiUserPartialUpdateRaw(requestParameters: ApiUserPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<User>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiUserPartialUpdate().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
headerParameters['Content-Type'] = 'application/json';
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/user/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'PATCH',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
body: PatchedUserToJSON(requestParameters['patchedUser']),
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => UserFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiUserPartialUpdate(requestParameters: ApiUserPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<User> {
|
|
const response = await this.apiUserPartialUpdateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiUserPreferenceListRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<UserPreference>>> {
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/user-preference/`,
|
|
method: 'GET',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(UserPreferenceFromJSON));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiUserPreferenceList(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<UserPreference>> {
|
|
const response = await this.apiUserPreferenceListRaw(initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiUserPreferencePartialUpdateRaw(requestParameters: ApiUserPreferencePartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UserPreference>> {
|
|
if (requestParameters['user'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'user',
|
|
'Required parameter "user" was null or undefined when calling apiUserPreferencePartialUpdate().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
headerParameters['Content-Type'] = 'application/json';
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/user-preference/{user}/`.replace(`{${"user"}}`, encodeURIComponent(String(requestParameters['user']))),
|
|
method: 'PATCH',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
body: PatchedUserPreferenceToJSON(requestParameters['patchedUserPreference']),
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => UserPreferenceFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiUserPreferencePartialUpdate(requestParameters: ApiUserPreferencePartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UserPreference> {
|
|
const response = await this.apiUserPreferencePartialUpdateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiUserPreferenceRetrieveRaw(requestParameters: ApiUserPreferenceRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UserPreference>> {
|
|
if (requestParameters['user'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'user',
|
|
'Required parameter "user" was null or undefined when calling apiUserPreferenceRetrieve().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/user-preference/{user}/`.replace(`{${"user"}}`, encodeURIComponent(String(requestParameters['user']))),
|
|
method: 'GET',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => UserPreferenceFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiUserPreferenceRetrieve(requestParameters: ApiUserPreferenceRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UserPreference> {
|
|
const response = await this.apiUserPreferenceRetrieveRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiUserRetrieveRaw(requestParameters: ApiUserRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<User>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiUserRetrieve().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/user/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'GET',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => UserFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiUserRetrieve(requestParameters: ApiUserRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<User> {
|
|
const response = await this.apiUserRetrieveRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiUserSpaceDestroyRaw(requestParameters: ApiUserSpaceDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiUserSpaceDestroy().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/user-space/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'DELETE',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.VoidApiResponse(response);
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiUserSpaceDestroy(requestParameters: ApiUserSpaceDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
await this.apiUserSpaceDestroyRaw(requestParameters, initOverrides);
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiUserSpaceListRaw(requestParameters: ApiUserSpaceListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PaginatedUserSpaceList>> {
|
|
const queryParameters: any = {};
|
|
|
|
if (requestParameters['internalNote'] != null) {
|
|
queryParameters['internal_note'] = requestParameters['internalNote'];
|
|
}
|
|
|
|
if (requestParameters['page'] != null) {
|
|
queryParameters['page'] = requestParameters['page'];
|
|
}
|
|
|
|
if (requestParameters['pageSize'] != null) {
|
|
queryParameters['page_size'] = requestParameters['pageSize'];
|
|
}
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/user-space/`,
|
|
method: 'GET',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedUserSpaceListFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiUserSpaceList(requestParameters: ApiUserSpaceListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedUserSpaceList> {
|
|
const response = await this.apiUserSpaceListRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiUserSpacePartialUpdateRaw(requestParameters: ApiUserSpacePartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UserSpace>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiUserSpacePartialUpdate().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
headerParameters['Content-Type'] = 'application/json';
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/user-space/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'PATCH',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
body: PatchedUserSpaceToJSON(requestParameters['patchedUserSpace']),
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => UserSpaceFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiUserSpacePartialUpdate(requestParameters: ApiUserSpacePartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UserSpace> {
|
|
const response = await this.apiUserSpacePartialUpdateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiUserSpaceRetrieveRaw(requestParameters: ApiUserSpaceRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UserSpace>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiUserSpaceRetrieve().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/user-space/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'GET',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => UserSpaceFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiUserSpaceRetrieve(requestParameters: ApiUserSpaceRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UserSpace> {
|
|
const response = await this.apiUserSpaceRetrieveRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiUserSpaceUpdateRaw(requestParameters: ApiUserSpaceUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UserSpace>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiUserSpaceUpdate().'
|
|
);
|
|
}
|
|
|
|
if (requestParameters['userSpace'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'userSpace',
|
|
'Required parameter "userSpace" was null or undefined when calling apiUserSpaceUpdate().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
headerParameters['Content-Type'] = 'application/json';
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/user-space/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'PUT',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
body: UserSpaceToJSON(requestParameters['userSpace']),
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => UserSpaceFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiUserSpaceUpdate(requestParameters: ApiUserSpaceUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UserSpace> {
|
|
const response = await this.apiUserSpaceUpdateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiViewLogCreateRaw(requestParameters: ApiViewLogCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ViewLog>> {
|
|
if (requestParameters['viewLog'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'viewLog',
|
|
'Required parameter "viewLog" was null or undefined when calling apiViewLogCreate().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
headerParameters['Content-Type'] = 'application/json';
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/view-log/`,
|
|
method: 'POST',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
body: ViewLogToJSON(requestParameters['viewLog']),
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => ViewLogFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiViewLogCreate(requestParameters: ApiViewLogCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ViewLog> {
|
|
const response = await this.apiViewLogCreateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiViewLogDestroyRaw(requestParameters: ApiViewLogDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiViewLogDestroy().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/view-log/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'DELETE',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.VoidApiResponse(response);
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiViewLogDestroy(requestParameters: ApiViewLogDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
await this.apiViewLogDestroyRaw(requestParameters, initOverrides);
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiViewLogListRaw(requestParameters: ApiViewLogListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PaginatedViewLogList>> {
|
|
const queryParameters: any = {};
|
|
|
|
if (requestParameters['page'] != null) {
|
|
queryParameters['page'] = requestParameters['page'];
|
|
}
|
|
|
|
if (requestParameters['pageSize'] != null) {
|
|
queryParameters['page_size'] = requestParameters['pageSize'];
|
|
}
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/view-log/`,
|
|
method: 'GET',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedViewLogListFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiViewLogList(requestParameters: ApiViewLogListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedViewLogList> {
|
|
const response = await this.apiViewLogListRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiViewLogPartialUpdateRaw(requestParameters: ApiViewLogPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ViewLog>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiViewLogPartialUpdate().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
headerParameters['Content-Type'] = 'application/json';
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/view-log/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'PATCH',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
body: PatchedViewLogToJSON(requestParameters['patchedViewLog']),
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => ViewLogFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiViewLogPartialUpdate(requestParameters: ApiViewLogPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ViewLog> {
|
|
const response = await this.apiViewLogPartialUpdateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiViewLogRetrieveRaw(requestParameters: ApiViewLogRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ViewLog>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiViewLogRetrieve().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/view-log/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'GET',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => ViewLogFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiViewLogRetrieve(requestParameters: ApiViewLogRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ViewLog> {
|
|
const response = await this.apiViewLogRetrieveRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiViewLogUpdateRaw(requestParameters: ApiViewLogUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ViewLog>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiViewLogUpdate().'
|
|
);
|
|
}
|
|
|
|
if (requestParameters['viewLog'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'viewLog',
|
|
'Required parameter "viewLog" was null or undefined when calling apiViewLogUpdate().'
|
|
);
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
headerParameters['Content-Type'] = 'application/json';
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/api/view-log/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'PUT',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
body: ViewLogToJSON(requestParameters['viewLog']),
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => ViewLogFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* logs request counts to redis cache total/per user/
|
|
*/
|
|
async apiViewLogUpdate(requestParameters: ApiViewLogUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ViewLog> {
|
|
const response = await this.apiViewLogUpdateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
}
|
|
|
|
/**
|
|
* @export
|
|
*/
|
|
export const ApiAutomationListTypeEnum = {
|
|
DescriptionReplace: 'DESCRIPTION_REPLACE',
|
|
FoodAlias: 'FOOD_ALIAS',
|
|
FoodReplace: 'FOOD_REPLACE',
|
|
InstructionReplace: 'INSTRUCTION_REPLACE',
|
|
KeywordAlias: 'KEYWORD_ALIAS',
|
|
NameReplace: 'NAME_REPLACE',
|
|
NeverUnit: 'NEVER_UNIT',
|
|
TransposeWords: 'TRANSPOSE_WORDS',
|
|
UnitAlias: 'UNIT_ALIAS',
|
|
UnitReplace: 'UNIT_REPLACE'
|
|
} as const;
|
|
export type ApiAutomationListTypeEnum = typeof ApiAutomationListTypeEnum[keyof typeof ApiAutomationListTypeEnum];
|
|
/**
|
|
* @export
|
|
*/
|
|
export const ApiCustomFilterListTypeEnum = {
|
|
Food: 'FOOD',
|
|
Keyword: 'KEYWORD',
|
|
Recipe: 'RECIPE'
|
|
} as const;
|
|
export type ApiCustomFilterListTypeEnum = typeof ApiCustomFilterListTypeEnum[keyof typeof ApiCustomFilterListTypeEnum];
|
|
/**
|
|
* @export
|
|
*/
|
|
export const ApiPropertyTypeListCategoryEnum = {
|
|
Allergen: 'ALLERGEN',
|
|
Goal: 'GOAL',
|
|
Nutrition: 'NUTRITION',
|
|
Other: 'OTHER',
|
|
Price: 'PRICE'
|
|
} as const;
|
|
export type ApiPropertyTypeListCategoryEnum = typeof ApiPropertyTypeListCategoryEnum[keyof typeof ApiPropertyTypeListCategoryEnum];
|
|
/**
|
|
* @export
|
|
*/
|
|
export const ApiRecipeBookListOrderDirectionEnum = {
|
|
Asc: 'asc',
|
|
Desc: 'desc'
|
|
} as const;
|
|
export type ApiRecipeBookListOrderDirectionEnum = typeof ApiRecipeBookListOrderDirectionEnum[keyof typeof ApiRecipeBookListOrderDirectionEnum];
|
|
/**
|
|
* @export
|
|
*/
|
|
export const ApiRecipeBookListOrderFieldEnum = {
|
|
Id: 'id',
|
|
Name: 'name',
|
|
Order: 'order'
|
|
} as const;
|
|
export type ApiRecipeBookListOrderFieldEnum = typeof ApiRecipeBookListOrderFieldEnum[keyof typeof ApiRecipeBookListOrderFieldEnum];
|