mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2026-01-02 12:49:02 -05:00
added swagger api view added authentication method to openapi schema added logo to docs/api fixed tree and merge schemas
10301 lines
394 KiB
TypeScript
10301 lines
394 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,
|
|
Automation,
|
|
BookmarkletImport,
|
|
BookmarkletImportList,
|
|
ConnectorConfigConfig,
|
|
CookLog,
|
|
CustomFilter,
|
|
ExportLog,
|
|
Food,
|
|
FoodInheritField,
|
|
FoodShoppingUpdate,
|
|
Group,
|
|
ImportLog,
|
|
Ingredient,
|
|
InviteLink,
|
|
Keyword,
|
|
MealPlan,
|
|
MealType,
|
|
PaginatedAutomationList,
|
|
PaginatedCookLogList,
|
|
PaginatedCustomFilterList,
|
|
PaginatedExportLogList,
|
|
PaginatedFoodList,
|
|
PaginatedImportLogList,
|
|
PaginatedIngredientList,
|
|
PaginatedKeywordList,
|
|
PaginatedRecipeOverviewList,
|
|
PaginatedStepList,
|
|
PaginatedSupermarketCategoryRelationList,
|
|
PaginatedSyncLogList,
|
|
PaginatedUnitList,
|
|
PaginatedUserSpaceList,
|
|
PaginatedViewLogList,
|
|
PatchedAccessToken,
|
|
PatchedAutomation,
|
|
PatchedBookmarkletImport,
|
|
PatchedConnectorConfigConfig,
|
|
PatchedCookLog,
|
|
PatchedCustomFilter,
|
|
PatchedExportLog,
|
|
PatchedFood,
|
|
PatchedImportLog,
|
|
PatchedIngredient,
|
|
PatchedInviteLink,
|
|
PatchedKeyword,
|
|
PatchedMealPlan,
|
|
PatchedMealType,
|
|
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,
|
|
RecipeImage,
|
|
RecipeShoppingUpdate,
|
|
RecipeSimple,
|
|
ShoppingListEntry,
|
|
ShoppingListEntryBulk,
|
|
ShoppingListRecipe,
|
|
Space,
|
|
Step,
|
|
Storage,
|
|
Supermarket,
|
|
SupermarketCategory,
|
|
SupermarketCategoryRelation,
|
|
Sync,
|
|
SyncLog,
|
|
Unit,
|
|
UnitConversion,
|
|
User,
|
|
UserFile,
|
|
UserPreference,
|
|
UserSpace,
|
|
ViewLog,
|
|
} from '../models/index';
|
|
import {
|
|
AccessTokenFromJSON,
|
|
AccessTokenToJSON,
|
|
AutomationFromJSON,
|
|
AutomationToJSON,
|
|
BookmarkletImportFromJSON,
|
|
BookmarkletImportToJSON,
|
|
BookmarkletImportListFromJSON,
|
|
BookmarkletImportListToJSON,
|
|
ConnectorConfigConfigFromJSON,
|
|
ConnectorConfigConfigToJSON,
|
|
CookLogFromJSON,
|
|
CookLogToJSON,
|
|
CustomFilterFromJSON,
|
|
CustomFilterToJSON,
|
|
ExportLogFromJSON,
|
|
ExportLogToJSON,
|
|
FoodFromJSON,
|
|
FoodToJSON,
|
|
FoodInheritFieldFromJSON,
|
|
FoodInheritFieldToJSON,
|
|
FoodShoppingUpdateFromJSON,
|
|
FoodShoppingUpdateToJSON,
|
|
GroupFromJSON,
|
|
GroupToJSON,
|
|
ImportLogFromJSON,
|
|
ImportLogToJSON,
|
|
IngredientFromJSON,
|
|
IngredientToJSON,
|
|
InviteLinkFromJSON,
|
|
InviteLinkToJSON,
|
|
KeywordFromJSON,
|
|
KeywordToJSON,
|
|
MealPlanFromJSON,
|
|
MealPlanToJSON,
|
|
MealTypeFromJSON,
|
|
MealTypeToJSON,
|
|
PaginatedAutomationListFromJSON,
|
|
PaginatedAutomationListToJSON,
|
|
PaginatedCookLogListFromJSON,
|
|
PaginatedCookLogListToJSON,
|
|
PaginatedCustomFilterListFromJSON,
|
|
PaginatedCustomFilterListToJSON,
|
|
PaginatedExportLogListFromJSON,
|
|
PaginatedExportLogListToJSON,
|
|
PaginatedFoodListFromJSON,
|
|
PaginatedFoodListToJSON,
|
|
PaginatedImportLogListFromJSON,
|
|
PaginatedImportLogListToJSON,
|
|
PaginatedIngredientListFromJSON,
|
|
PaginatedIngredientListToJSON,
|
|
PaginatedKeywordListFromJSON,
|
|
PaginatedKeywordListToJSON,
|
|
PaginatedRecipeOverviewListFromJSON,
|
|
PaginatedRecipeOverviewListToJSON,
|
|
PaginatedStepListFromJSON,
|
|
PaginatedStepListToJSON,
|
|
PaginatedSupermarketCategoryRelationListFromJSON,
|
|
PaginatedSupermarketCategoryRelationListToJSON,
|
|
PaginatedSyncLogListFromJSON,
|
|
PaginatedSyncLogListToJSON,
|
|
PaginatedUnitListFromJSON,
|
|
PaginatedUnitListToJSON,
|
|
PaginatedUserSpaceListFromJSON,
|
|
PaginatedUserSpaceListToJSON,
|
|
PaginatedViewLogListFromJSON,
|
|
PaginatedViewLogListToJSON,
|
|
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,
|
|
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,
|
|
RecipeImageFromJSON,
|
|
RecipeImageToJSON,
|
|
RecipeShoppingUpdateFromJSON,
|
|
RecipeShoppingUpdateToJSON,
|
|
RecipeSimpleFromJSON,
|
|
RecipeSimpleToJSON,
|
|
ShoppingListEntryFromJSON,
|
|
ShoppingListEntryToJSON,
|
|
ShoppingListEntryBulkFromJSON,
|
|
ShoppingListEntryBulkToJSON,
|
|
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: AccessToken;
|
|
}
|
|
|
|
export interface ApiAccessTokenDestroyRequest {
|
|
id: number;
|
|
}
|
|
|
|
export interface ApiAccessTokenPartialUpdateRequest {
|
|
id: number;
|
|
patchedAccessToken?: PatchedAccessToken;
|
|
}
|
|
|
|
export interface ApiAccessTokenRetrieveRequest {
|
|
id: number;
|
|
}
|
|
|
|
export interface ApiAccessTokenUpdateRequest {
|
|
id: number;
|
|
accessToken: AccessToken;
|
|
}
|
|
|
|
export interface ApiAutomationCreateRequest {
|
|
automation: Automation;
|
|
}
|
|
|
|
export interface ApiAutomationDestroyRequest {
|
|
id: number;
|
|
}
|
|
|
|
export interface ApiAutomationListRequest {
|
|
automationType?: string;
|
|
page?: number;
|
|
pageSize?: number;
|
|
}
|
|
|
|
export interface ApiAutomationPartialUpdateRequest {
|
|
id: number;
|
|
patchedAutomation?: PatchedAutomation;
|
|
}
|
|
|
|
export interface ApiAutomationRetrieveRequest {
|
|
id: number;
|
|
}
|
|
|
|
export interface ApiAutomationUpdateRequest {
|
|
id: number;
|
|
automation: Automation;
|
|
}
|
|
|
|
export interface ApiBookmarkletImportCreateRequest {
|
|
bookmarkletImport: BookmarkletImport;
|
|
}
|
|
|
|
export interface ApiBookmarkletImportDestroyRequest {
|
|
id: number;
|
|
}
|
|
|
|
export interface ApiBookmarkletImportPartialUpdateRequest {
|
|
id: number;
|
|
patchedBookmarkletImport?: PatchedBookmarkletImport;
|
|
}
|
|
|
|
export interface ApiBookmarkletImportRetrieveRequest {
|
|
id: number;
|
|
}
|
|
|
|
export interface ApiBookmarkletImportUpdateRequest {
|
|
id: number;
|
|
bookmarkletImport: BookmarkletImport;
|
|
}
|
|
|
|
export interface ApiConnectorConfigCreateRequest {
|
|
connectorConfigConfig: ConnectorConfigConfig;
|
|
}
|
|
|
|
export interface ApiConnectorConfigDestroyRequest {
|
|
id: number;
|
|
}
|
|
|
|
export interface ApiConnectorConfigPartialUpdateRequest {
|
|
id: number;
|
|
patchedConnectorConfigConfig?: PatchedConnectorConfigConfig;
|
|
}
|
|
|
|
export interface ApiConnectorConfigRetrieveRequest {
|
|
id: number;
|
|
}
|
|
|
|
export interface ApiConnectorConfigUpdateRequest {
|
|
id: number;
|
|
connectorConfigConfig: ConnectorConfigConfig;
|
|
}
|
|
|
|
export interface ApiCookLogCreateRequest {
|
|
cookLog: CookLog;
|
|
}
|
|
|
|
export interface ApiCookLogDestroyRequest {
|
|
id: number;
|
|
}
|
|
|
|
export interface ApiCookLogListRequest {
|
|
page?: number;
|
|
pageSize?: number;
|
|
recipe?: number;
|
|
}
|
|
|
|
export interface ApiCookLogPartialUpdateRequest {
|
|
id: number;
|
|
patchedCookLog?: PatchedCookLog;
|
|
}
|
|
|
|
export interface ApiCookLogRetrieveRequest {
|
|
id: number;
|
|
}
|
|
|
|
export interface ApiCookLogUpdateRequest {
|
|
id: number;
|
|
cookLog: CookLog;
|
|
}
|
|
|
|
export interface ApiCustomFilterCreateRequest {
|
|
customFilter: CustomFilter;
|
|
}
|
|
|
|
export interface ApiCustomFilterDestroyRequest {
|
|
id: number;
|
|
}
|
|
|
|
export interface ApiCustomFilterListRequest {
|
|
limit?: string;
|
|
page?: number;
|
|
pageSize?: number;
|
|
query?: string;
|
|
random?: string;
|
|
updatedAt?: string;
|
|
}
|
|
|
|
export interface ApiCustomFilterPartialUpdateRequest {
|
|
id: number;
|
|
patchedCustomFilter?: PatchedCustomFilter;
|
|
}
|
|
|
|
export interface ApiCustomFilterRetrieveRequest {
|
|
id: number;
|
|
}
|
|
|
|
export interface ApiCustomFilterUpdateRequest {
|
|
id: number;
|
|
customFilter: CustomFilter;
|
|
}
|
|
|
|
export interface ApiDownloadFileRetrieveRequest {
|
|
fileId: number;
|
|
}
|
|
|
|
export interface ApiExportLogCreateRequest {
|
|
exportLog: ExportLog;
|
|
}
|
|
|
|
export interface ApiExportLogDestroyRequest {
|
|
id: number;
|
|
}
|
|
|
|
export interface ApiExportLogListRequest {
|
|
page?: number;
|
|
pageSize?: number;
|
|
}
|
|
|
|
export interface ApiExportLogPartialUpdateRequest {
|
|
id: number;
|
|
patchedExportLog?: PatchedExportLog;
|
|
}
|
|
|
|
export interface ApiExportLogRetrieveRequest {
|
|
id: number;
|
|
}
|
|
|
|
export interface ApiExportLogUpdateRequest {
|
|
id: number;
|
|
exportLog: ExportLog;
|
|
}
|
|
|
|
export interface ApiFoodCreateRequest {
|
|
food: Food;
|
|
}
|
|
|
|
export interface ApiFoodDestroyRequest {
|
|
id: number;
|
|
}
|
|
|
|
export interface ApiFoodFdcCreateRequest {
|
|
id: number;
|
|
food: Food;
|
|
}
|
|
|
|
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: string;
|
|
food: Food;
|
|
}
|
|
|
|
export interface ApiFoodMoveUpdateRequest {
|
|
id: number;
|
|
parent: string;
|
|
food: Food;
|
|
}
|
|
|
|
export interface ApiFoodPartialUpdateRequest {
|
|
id: number;
|
|
patchedFood?: PatchedFood;
|
|
}
|
|
|
|
export interface ApiFoodPropertyCreateRequest {
|
|
property: Property;
|
|
}
|
|
|
|
export interface ApiFoodPropertyDestroyRequest {
|
|
id: number;
|
|
}
|
|
|
|
export interface ApiFoodPropertyPartialUpdateRequest {
|
|
id: number;
|
|
patchedProperty?: PatchedProperty;
|
|
}
|
|
|
|
export interface ApiFoodPropertyRetrieveRequest {
|
|
id: number;
|
|
}
|
|
|
|
export interface ApiFoodPropertyTypeCreateRequest {
|
|
propertyType: PropertyType;
|
|
}
|
|
|
|
export interface ApiFoodPropertyTypeDestroyRequest {
|
|
id: number;
|
|
}
|
|
|
|
export interface ApiFoodPropertyTypePartialUpdateRequest {
|
|
id: number;
|
|
patchedPropertyType?: PatchedPropertyType;
|
|
}
|
|
|
|
export interface ApiFoodPropertyTypeRetrieveRequest {
|
|
id: number;
|
|
}
|
|
|
|
export interface ApiFoodPropertyTypeUpdateRequest {
|
|
id: number;
|
|
propertyType: PropertyType;
|
|
}
|
|
|
|
export interface ApiFoodPropertyUpdateRequest {
|
|
id: number;
|
|
property: Property;
|
|
}
|
|
|
|
export interface ApiFoodRetrieveRequest {
|
|
id: number;
|
|
}
|
|
|
|
export interface ApiFoodShoppingUpdateRequest {
|
|
id: number;
|
|
foodShoppingUpdate: FoodShoppingUpdate;
|
|
}
|
|
|
|
export interface ApiFoodUpdateRequest {
|
|
id: number;
|
|
food: Food;
|
|
}
|
|
|
|
export interface ApiGroupRetrieveRequest {
|
|
id: number;
|
|
}
|
|
|
|
export interface ApiImportLogCreateRequest {
|
|
importLog: ImportLog;
|
|
}
|
|
|
|
export interface ApiImportLogDestroyRequest {
|
|
id: number;
|
|
}
|
|
|
|
export interface ApiImportLogListRequest {
|
|
page?: number;
|
|
pageSize?: number;
|
|
}
|
|
|
|
export interface ApiImportLogPartialUpdateRequest {
|
|
id: number;
|
|
patchedImportLog?: PatchedImportLog;
|
|
}
|
|
|
|
export interface ApiImportLogRetrieveRequest {
|
|
id: number;
|
|
}
|
|
|
|
export interface ApiImportLogUpdateRequest {
|
|
id: number;
|
|
importLog: ImportLog;
|
|
}
|
|
|
|
export interface ApiIngredientCreateRequest {
|
|
ingredient: Ingredient;
|
|
}
|
|
|
|
export interface ApiIngredientDestroyRequest {
|
|
id: number;
|
|
}
|
|
|
|
export interface ApiIngredientListRequest {
|
|
page?: number;
|
|
pageSize?: number;
|
|
}
|
|
|
|
export interface ApiIngredientPartialUpdateRequest {
|
|
id: number;
|
|
patchedIngredient?: PatchedIngredient;
|
|
}
|
|
|
|
export interface ApiIngredientRetrieveRequest {
|
|
id: number;
|
|
}
|
|
|
|
export interface ApiIngredientUpdateRequest {
|
|
id: number;
|
|
ingredient: Ingredient;
|
|
}
|
|
|
|
export interface ApiInviteLinkCreateRequest {
|
|
inviteLink: InviteLink;
|
|
}
|
|
|
|
export interface ApiInviteLinkDestroyRequest {
|
|
id: number;
|
|
}
|
|
|
|
export interface ApiInviteLinkListRequest {
|
|
limit?: string;
|
|
query?: string;
|
|
random?: string;
|
|
updatedAt?: string;
|
|
}
|
|
|
|
export interface ApiInviteLinkPartialUpdateRequest {
|
|
id: number;
|
|
patchedInviteLink?: PatchedInviteLink;
|
|
}
|
|
|
|
export interface ApiInviteLinkRetrieveRequest {
|
|
id: number;
|
|
}
|
|
|
|
export interface ApiInviteLinkUpdateRequest {
|
|
id: number;
|
|
inviteLink: InviteLink;
|
|
}
|
|
|
|
export interface ApiKeywordCreateRequest {
|
|
keyword: Keyword;
|
|
}
|
|
|
|
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: string;
|
|
keyword: Keyword;
|
|
}
|
|
|
|
export interface ApiKeywordMoveUpdateRequest {
|
|
id: number;
|
|
parent: string;
|
|
keyword: Keyword;
|
|
}
|
|
|
|
export interface ApiKeywordPartialUpdateRequest {
|
|
id: number;
|
|
patchedKeyword?: PatchedKeyword;
|
|
}
|
|
|
|
export interface ApiKeywordRetrieveRequest {
|
|
id: number;
|
|
}
|
|
|
|
export interface ApiKeywordUpdateRequest {
|
|
id: number;
|
|
keyword: Keyword;
|
|
}
|
|
|
|
export interface ApiMealPlanCreateRequest {
|
|
mealPlan: MealPlan;
|
|
}
|
|
|
|
export interface ApiMealPlanDestroyRequest {
|
|
id: number;
|
|
}
|
|
|
|
export interface ApiMealPlanIcalRetrieveRequest {
|
|
fromDate?: string;
|
|
mealType?: string;
|
|
toDate?: string;
|
|
}
|
|
|
|
export interface ApiMealPlanListRequest {
|
|
fromDate?: string;
|
|
mealType?: string;
|
|
toDate?: string;
|
|
}
|
|
|
|
export interface ApiMealPlanPartialUpdateRequest {
|
|
id: number;
|
|
patchedMealPlan?: PatchedMealPlan;
|
|
}
|
|
|
|
export interface ApiMealPlanRetrieveRequest {
|
|
id: number;
|
|
}
|
|
|
|
export interface ApiMealPlanUpdateRequest {
|
|
id: number;
|
|
mealPlan: MealPlan;
|
|
}
|
|
|
|
export interface ApiMealTypeCreateRequest {
|
|
mealType: MealType;
|
|
}
|
|
|
|
export interface ApiMealTypeDestroyRequest {
|
|
id: number;
|
|
}
|
|
|
|
export interface ApiMealTypePartialUpdateRequest {
|
|
id: number;
|
|
patchedMealType?: PatchedMealType;
|
|
}
|
|
|
|
export interface ApiMealTypeRetrieveRequest {
|
|
id: number;
|
|
}
|
|
|
|
export interface ApiMealTypeUpdateRequest {
|
|
id: number;
|
|
mealType: MealType;
|
|
}
|
|
|
|
export interface ApiPlanIcalRetrieveRequest {
|
|
fromDate: string;
|
|
toDate: string;
|
|
}
|
|
|
|
export interface ApiRecipeBookCreateRequest {
|
|
recipeBook: RecipeBook;
|
|
}
|
|
|
|
export interface ApiRecipeBookDestroyRequest {
|
|
id: number;
|
|
}
|
|
|
|
export interface ApiRecipeBookEntryCreateRequest {
|
|
recipeBookEntry: RecipeBookEntry;
|
|
}
|
|
|
|
export interface ApiRecipeBookEntryDestroyRequest {
|
|
id: number;
|
|
}
|
|
|
|
export interface ApiRecipeBookEntryPartialUpdateRequest {
|
|
id: number;
|
|
patchedRecipeBookEntry?: PatchedRecipeBookEntry;
|
|
}
|
|
|
|
export interface ApiRecipeBookEntryRetrieveRequest {
|
|
id: number;
|
|
}
|
|
|
|
export interface ApiRecipeBookEntryUpdateRequest {
|
|
id: number;
|
|
recipeBookEntry: RecipeBookEntry;
|
|
}
|
|
|
|
export interface ApiRecipeBookListRequest {
|
|
limit?: string;
|
|
query?: string;
|
|
random?: string;
|
|
updatedAt?: string;
|
|
}
|
|
|
|
export interface ApiRecipeBookPartialUpdateRequest {
|
|
id: number;
|
|
patchedRecipeBook?: PatchedRecipeBook;
|
|
}
|
|
|
|
export interface ApiRecipeBookRetrieveRequest {
|
|
id: number;
|
|
}
|
|
|
|
export interface ApiRecipeBookUpdateRequest {
|
|
id: number;
|
|
recipeBook: RecipeBook;
|
|
}
|
|
|
|
export interface ApiRecipeCreateRequest {
|
|
recipe: Recipe;
|
|
}
|
|
|
|
export interface ApiRecipeDestroyRequest {
|
|
id: number;
|
|
}
|
|
|
|
export interface ApiRecipeImageUpdateRequest {
|
|
id: number;
|
|
image?: string;
|
|
imageUrl?: string;
|
|
}
|
|
|
|
export interface ApiRecipeListRequest {
|
|
books?: string;
|
|
booksAnd?: number;
|
|
booksAndNot?: number;
|
|
booksOr?: number;
|
|
booksOrNot?: number;
|
|
cookedon?: string;
|
|
createdon?: string;
|
|
foods?: number;
|
|
foodsAnd?: number;
|
|
foodsAndNot?: number;
|
|
foodsOr?: number;
|
|
foodsOrNot?: number;
|
|
internal?: string;
|
|
keywords?: number;
|
|
keywordsAnd?: number;
|
|
keywordsAndNot?: number;
|
|
keywordsOr?: number;
|
|
keywordsOrNot?: number;
|
|
makenow?: string;
|
|
_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?: PatchedRecipe;
|
|
}
|
|
|
|
export interface ApiRecipeRelatedRetrieveRequest {
|
|
id: number;
|
|
}
|
|
|
|
export interface ApiRecipeRetrieveRequest {
|
|
id: number;
|
|
}
|
|
|
|
export interface ApiRecipeShoppingUpdateRequest {
|
|
id: number;
|
|
recipeShoppingUpdate?: RecipeShoppingUpdate;
|
|
}
|
|
|
|
export interface ApiRecipeUpdateRequest {
|
|
id: number;
|
|
recipe: Recipe;
|
|
}
|
|
|
|
export interface ApiShareLinkRetrieveRequest {
|
|
id: number;
|
|
}
|
|
|
|
export interface ApiShoppingListEntryBulkCreateRequest {
|
|
shoppingListEntryBulk: ShoppingListEntryBulk;
|
|
}
|
|
|
|
export interface ApiShoppingListEntryCreateRequest {
|
|
shoppingListEntry: ShoppingListEntry;
|
|
}
|
|
|
|
export interface ApiShoppingListEntryDestroyRequest {
|
|
id: number;
|
|
}
|
|
|
|
export interface ApiShoppingListEntryListRequest {
|
|
checked?: string;
|
|
id?: number;
|
|
supermarket?: number;
|
|
}
|
|
|
|
export interface ApiShoppingListEntryPartialUpdateRequest {
|
|
id: number;
|
|
patchedShoppingListEntry?: PatchedShoppingListEntry;
|
|
}
|
|
|
|
export interface ApiShoppingListEntryRetrieveRequest {
|
|
id: number;
|
|
}
|
|
|
|
export interface ApiShoppingListEntryUpdateRequest {
|
|
id: number;
|
|
shoppingListEntry: ShoppingListEntry;
|
|
}
|
|
|
|
export interface ApiShoppingListRecipeCreateRequest {
|
|
shoppingListRecipe: ShoppingListRecipe;
|
|
}
|
|
|
|
export interface ApiShoppingListRecipeDestroyRequest {
|
|
id: number;
|
|
}
|
|
|
|
export interface ApiShoppingListRecipePartialUpdateRequest {
|
|
id: number;
|
|
patchedShoppingListRecipe?: PatchedShoppingListRecipe;
|
|
}
|
|
|
|
export interface ApiShoppingListRecipeRetrieveRequest {
|
|
id: number;
|
|
}
|
|
|
|
export interface ApiShoppingListRecipeUpdateRequest {
|
|
id: number;
|
|
shoppingListRecipe: ShoppingListRecipe;
|
|
}
|
|
|
|
export interface ApiSpacePartialUpdateRequest {
|
|
id: number;
|
|
patchedSpace?: PatchedSpace;
|
|
}
|
|
|
|
export interface ApiSpaceRetrieveRequest {
|
|
id: number;
|
|
}
|
|
|
|
export interface ApiStepCreateRequest {
|
|
step: Step;
|
|
}
|
|
|
|
export interface ApiStepDestroyRequest {
|
|
id: number;
|
|
}
|
|
|
|
export interface ApiStepListRequest {
|
|
page?: number;
|
|
pageSize?: number;
|
|
query?: string;
|
|
recipe?: number;
|
|
}
|
|
|
|
export interface ApiStepPartialUpdateRequest {
|
|
id: number;
|
|
patchedStep?: PatchedStep;
|
|
}
|
|
|
|
export interface ApiStepRetrieveRequest {
|
|
id: number;
|
|
}
|
|
|
|
export interface ApiStepUpdateRequest {
|
|
id: number;
|
|
step: Step;
|
|
}
|
|
|
|
export interface ApiStorageCreateRequest {
|
|
storage: Storage;
|
|
}
|
|
|
|
export interface ApiStorageDestroyRequest {
|
|
id: number;
|
|
}
|
|
|
|
export interface ApiStoragePartialUpdateRequest {
|
|
id: number;
|
|
patchedStorage?: PatchedStorage;
|
|
}
|
|
|
|
export interface ApiStorageRetrieveRequest {
|
|
id: number;
|
|
}
|
|
|
|
export interface ApiStorageUpdateRequest {
|
|
id: number;
|
|
storage: Storage;
|
|
}
|
|
|
|
export interface ApiSupermarketCategoryCreateRequest {
|
|
supermarketCategory: SupermarketCategory;
|
|
}
|
|
|
|
export interface ApiSupermarketCategoryDestroyRequest {
|
|
id: number;
|
|
}
|
|
|
|
export interface ApiSupermarketCategoryListRequest {
|
|
limit?: string;
|
|
query?: string;
|
|
random?: string;
|
|
updatedAt?: string;
|
|
}
|
|
|
|
export interface ApiSupermarketCategoryMergeUpdateRequest {
|
|
id: number;
|
|
target: string;
|
|
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: Supermarket;
|
|
}
|
|
|
|
export interface ApiSupermarketDestroyRequest {
|
|
id: number;
|
|
}
|
|
|
|
export interface ApiSupermarketListRequest {
|
|
limit?: string;
|
|
query?: string;
|
|
random?: string;
|
|
updatedAt?: string;
|
|
}
|
|
|
|
export interface ApiSupermarketPartialUpdateRequest {
|
|
id: number;
|
|
patchedSupermarket?: PatchedSupermarket;
|
|
}
|
|
|
|
export interface ApiSupermarketRetrieveRequest {
|
|
id: number;
|
|
}
|
|
|
|
export interface ApiSupermarketUpdateRequest {
|
|
id: number;
|
|
supermarket: Supermarket;
|
|
}
|
|
|
|
export interface ApiSwitchActiveSpaceRetrieveRequest {
|
|
spaceId: number;
|
|
}
|
|
|
|
export interface ApiSyncCreateRequest {
|
|
sync: Sync;
|
|
}
|
|
|
|
export interface ApiSyncDestroyRequest {
|
|
id: number;
|
|
}
|
|
|
|
export interface ApiSyncLogListRequest {
|
|
page?: number;
|
|
pageSize?: number;
|
|
}
|
|
|
|
export interface ApiSyncLogRetrieveRequest {
|
|
id: number;
|
|
}
|
|
|
|
export interface ApiSyncPartialUpdateRequest {
|
|
id: number;
|
|
patchedSync?: PatchedSync;
|
|
}
|
|
|
|
export interface ApiSyncRetrieveRequest {
|
|
id: number;
|
|
}
|
|
|
|
export interface ApiSyncUpdateRequest {
|
|
id: number;
|
|
sync: Sync;
|
|
}
|
|
|
|
export interface ApiUnitConversionCreateRequest {
|
|
unitConversion: UnitConversion;
|
|
}
|
|
|
|
export interface ApiUnitConversionDestroyRequest {
|
|
id: number;
|
|
}
|
|
|
|
export interface ApiUnitConversionListRequest {
|
|
foodId?: number;
|
|
}
|
|
|
|
export interface ApiUnitConversionPartialUpdateRequest {
|
|
id: number;
|
|
patchedUnitConversion?: PatchedUnitConversion;
|
|
}
|
|
|
|
export interface ApiUnitConversionRetrieveRequest {
|
|
id: number;
|
|
}
|
|
|
|
export interface ApiUnitConversionUpdateRequest {
|
|
id: number;
|
|
unitConversion: UnitConversion;
|
|
}
|
|
|
|
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: string;
|
|
unit: Unit;
|
|
}
|
|
|
|
export interface ApiUnitPartialUpdateRequest {
|
|
id: number;
|
|
patchedUnit?: PatchedUnit;
|
|
}
|
|
|
|
export interface ApiUnitRetrieveRequest {
|
|
id: number;
|
|
}
|
|
|
|
export interface ApiUnitUpdateRequest {
|
|
id: number;
|
|
unit: Unit;
|
|
}
|
|
|
|
export interface ApiUserFileCreateRequest {
|
|
id: number;
|
|
name: string;
|
|
file: string;
|
|
fileDownload: string;
|
|
preview: string;
|
|
fileSizeKb: number;
|
|
}
|
|
|
|
export interface ApiUserFileDestroyRequest {
|
|
id: number;
|
|
}
|
|
|
|
export interface ApiUserFileListRequest {
|
|
limit?: string;
|
|
query?: string;
|
|
random?: string;
|
|
updatedAt?: string;
|
|
}
|
|
|
|
export interface ApiUserFilePartialUpdateRequest {
|
|
id: number;
|
|
id2?: number;
|
|
name?: string;
|
|
file?: string;
|
|
fileDownload?: string;
|
|
preview?: string;
|
|
fileSizeKb?: number;
|
|
}
|
|
|
|
export interface ApiUserFileRetrieveRequest {
|
|
id: number;
|
|
}
|
|
|
|
export interface ApiUserFileUpdateRequest {
|
|
id: number;
|
|
id2: number;
|
|
name: string;
|
|
file: string;
|
|
fileDownload: string;
|
|
preview: string;
|
|
fileSizeKb: number;
|
|
}
|
|
|
|
export interface ApiUserPartialUpdateRequest {
|
|
id: number;
|
|
patchedUser?: PatchedUser;
|
|
}
|
|
|
|
export interface ApiUserPreferencePartialUpdateRequest {
|
|
user: number;
|
|
patchedUserPreference?: PatchedUserPreference;
|
|
}
|
|
|
|
export interface ApiUserPreferenceRetrieveRequest {
|
|
user: number;
|
|
}
|
|
|
|
export interface ApiUserRetrieveRequest {
|
|
id: number;
|
|
}
|
|
|
|
export interface ApiUserSpaceDestroyRequest {
|
|
id: number;
|
|
}
|
|
|
|
export interface ApiUserSpaceListRequest {
|
|
page?: number;
|
|
pageSize?: number;
|
|
}
|
|
|
|
export interface ApiUserSpacePartialUpdateRequest {
|
|
id: number;
|
|
patchedUserSpace?: PatchedUserSpace;
|
|
}
|
|
|
|
export interface ApiUserSpaceRetrieveRequest {
|
|
id: number;
|
|
}
|
|
|
|
export interface ApiViewLogCreateRequest {
|
|
viewLog: ViewLog;
|
|
}
|
|
|
|
export interface ApiViewLogDestroyRequest {
|
|
id: number;
|
|
}
|
|
|
|
export interface ApiViewLogListRequest {
|
|
page?: number;
|
|
pageSize?: number;
|
|
}
|
|
|
|
export interface ApiViewLogPartialUpdateRequest {
|
|
id: number;
|
|
patchedViewLog?: PatchedViewLog;
|
|
}
|
|
|
|
export interface ApiViewLogRetrieveRequest {
|
|
id: number;
|
|
}
|
|
|
|
export interface ApiViewLogUpdateRequest {
|
|
id: number;
|
|
viewLog: ViewLog;
|
|
}
|
|
|
|
/**
|
|
*
|
|
*/
|
|
export class ApiApi extends runtime.BaseAPI {
|
|
|
|
/**
|
|
*/
|
|
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));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiAccessTokenCreate(requestParameters: ApiAccessTokenCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AccessToken> {
|
|
const response = await this.apiAccessTokenCreateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
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);
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiAccessTokenDestroy(requestParameters: ApiAccessTokenDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
await this.apiAccessTokenDestroyRaw(requestParameters, initOverrides);
|
|
}
|
|
|
|
/**
|
|
*/
|
|
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));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiAccessTokenList(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<AccessToken>> {
|
|
const response = await this.apiAccessTokenListRaw(initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
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));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiAccessTokenPartialUpdate(requestParameters: ApiAccessTokenPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AccessToken> {
|
|
const response = await this.apiAccessTokenPartialUpdateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
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));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiAccessTokenRetrieve(requestParameters: ApiAccessTokenRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AccessToken> {
|
|
const response = await this.apiAccessTokenRetrieveRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
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));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiAccessTokenUpdate(requestParameters: ApiAccessTokenUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AccessToken> {
|
|
const response = await this.apiAccessTokenUpdateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiAutoPlanCreateRaw(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/auto-plan/`,
|
|
method: 'POST',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.VoidApiResponse(response);
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiAutoPlanCreate(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
await this.apiAutoPlanCreateRaw(initOverrides);
|
|
}
|
|
|
|
/**
|
|
* list: optional parameters - **automation_type**: Return the Automations matching the automation type. Multiple values allowed. *Automation Types:* - FS: Food Alias - UA: Unit Alias - KA: Keyword Alias - DR: Description Replace - IR: Instruction Replace - NU: Never Unit - TW: Transpose Words - FR: Food Replace - UR: Unit Replace - NR: Name Replace
|
|
*/
|
|
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));
|
|
}
|
|
|
|
/**
|
|
* list: optional parameters - **automation_type**: Return the Automations matching the automation type. Multiple values allowed. *Automation Types:* - FS: Food Alias - UA: Unit Alias - KA: Keyword Alias - DR: Description Replace - IR: Instruction Replace - NU: Never Unit - TW: Transpose Words - FR: Food Replace - UR: Unit Replace - NR: Name Replace
|
|
*/
|
|
async apiAutomationCreate(requestParameters: ApiAutomationCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Automation> {
|
|
const response = await this.apiAutomationCreateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* list: optional parameters - **automation_type**: Return the Automations matching the automation type. Multiple values allowed. *Automation Types:* - FS: Food Alias - UA: Unit Alias - KA: Keyword Alias - DR: Description Replace - IR: Instruction Replace - NU: Never Unit - TW: Transpose Words - FR: Food Replace - UR: Unit Replace - NR: Name Replace
|
|
*/
|
|
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);
|
|
}
|
|
|
|
/**
|
|
* list: optional parameters - **automation_type**: Return the Automations matching the automation type. Multiple values allowed. *Automation Types:* - FS: Food Alias - UA: Unit Alias - KA: Keyword Alias - DR: Description Replace - IR: Instruction Replace - NU: Never Unit - TW: Transpose Words - FR: Food Replace - UR: Unit Replace - NR: Name Replace
|
|
*/
|
|
async apiAutomationDestroy(requestParameters: ApiAutomationDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
await this.apiAutomationDestroyRaw(requestParameters, initOverrides);
|
|
}
|
|
|
|
/**
|
|
* list: optional parameters - **automation_type**: Return the Automations matching the automation type. Multiple values allowed. *Automation Types:* - FS: Food Alias - UA: Unit Alias - KA: Keyword Alias - DR: Description Replace - IR: Instruction Replace - NU: Never Unit - TW: Transpose Words - FR: Food Replace - UR: Unit Replace - NR: Name Replace
|
|
*/
|
|
async apiAutomationListRaw(requestParameters: ApiAutomationListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PaginatedAutomationList>> {
|
|
const queryParameters: any = {};
|
|
|
|
if (requestParameters['automationType'] != null) {
|
|
queryParameters['automation_type'] = requestParameters['automationType'];
|
|
}
|
|
|
|
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/automation/`,
|
|
method: 'GET',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedAutomationListFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
* list: optional parameters - **automation_type**: Return the Automations matching the automation type. Multiple values allowed. *Automation Types:* - FS: Food Alias - UA: Unit Alias - KA: Keyword Alias - DR: Description Replace - IR: Instruction Replace - NU: Never Unit - TW: Transpose Words - FR: Food Replace - UR: Unit Replace - NR: Name Replace
|
|
*/
|
|
async apiAutomationList(requestParameters: ApiAutomationListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedAutomationList> {
|
|
const response = await this.apiAutomationListRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* list: optional parameters - **automation_type**: Return the Automations matching the automation type. Multiple values allowed. *Automation Types:* - FS: Food Alias - UA: Unit Alias - KA: Keyword Alias - DR: Description Replace - IR: Instruction Replace - NU: Never Unit - TW: Transpose Words - FR: Food Replace - UR: Unit Replace - NR: Name Replace
|
|
*/
|
|
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));
|
|
}
|
|
|
|
/**
|
|
* list: optional parameters - **automation_type**: Return the Automations matching the automation type. Multiple values allowed. *Automation Types:* - FS: Food Alias - UA: Unit Alias - KA: Keyword Alias - DR: Description Replace - IR: Instruction Replace - NU: Never Unit - TW: Transpose Words - FR: Food Replace - UR: Unit Replace - NR: Name Replace
|
|
*/
|
|
async apiAutomationPartialUpdate(requestParameters: ApiAutomationPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Automation> {
|
|
const response = await this.apiAutomationPartialUpdateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* list: optional parameters - **automation_type**: Return the Automations matching the automation type. Multiple values allowed. *Automation Types:* - FS: Food Alias - UA: Unit Alias - KA: Keyword Alias - DR: Description Replace - IR: Instruction Replace - NU: Never Unit - TW: Transpose Words - FR: Food Replace - UR: Unit Replace - NR: Name Replace
|
|
*/
|
|
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));
|
|
}
|
|
|
|
/**
|
|
* list: optional parameters - **automation_type**: Return the Automations matching the automation type. Multiple values allowed. *Automation Types:* - FS: Food Alias - UA: Unit Alias - KA: Keyword Alias - DR: Description Replace - IR: Instruction Replace - NU: Never Unit - TW: Transpose Words - FR: Food Replace - UR: Unit Replace - NR: Name Replace
|
|
*/
|
|
async apiAutomationRetrieve(requestParameters: ApiAutomationRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Automation> {
|
|
const response = await this.apiAutomationRetrieveRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* list: optional parameters - **automation_type**: Return the Automations matching the automation type. Multiple values allowed. *Automation Types:* - FS: Food Alias - UA: Unit Alias - KA: Keyword Alias - DR: Description Replace - IR: Instruction Replace - NU: Never Unit - TW: Transpose Words - FR: Food Replace - UR: Unit Replace - NR: Name Replace
|
|
*/
|
|
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));
|
|
}
|
|
|
|
/**
|
|
* list: optional parameters - **automation_type**: Return the Automations matching the automation type. Multiple values allowed. *Automation Types:* - FS: Food Alias - UA: Unit Alias - KA: Keyword Alias - DR: Description Replace - IR: Instruction Replace - NU: Never Unit - TW: Transpose Words - FR: Food Replace - UR: Unit Replace - NR: Name Replace
|
|
*/
|
|
async apiAutomationUpdate(requestParameters: ApiAutomationUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Automation> {
|
|
const response = await this.apiAutomationUpdateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
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));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiBookmarkletImportCreate(requestParameters: ApiBookmarkletImportCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<BookmarkletImport> {
|
|
const response = await this.apiBookmarkletImportCreateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
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);
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiBookmarkletImportDestroy(requestParameters: ApiBookmarkletImportDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
await this.apiBookmarkletImportDestroyRaw(requestParameters, initOverrides);
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiBookmarkletImportListRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<BookmarkletImportList>>> {
|
|
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/`,
|
|
method: 'GET',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(BookmarkletImportListFromJSON));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiBookmarkletImportList(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<BookmarkletImportList>> {
|
|
const response = await this.apiBookmarkletImportListRaw(initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
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));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiBookmarkletImportPartialUpdate(requestParameters: ApiBookmarkletImportPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<BookmarkletImport> {
|
|
const response = await this.apiBookmarkletImportPartialUpdateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
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));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiBookmarkletImportRetrieve(requestParameters: ApiBookmarkletImportRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<BookmarkletImport> {
|
|
const response = await this.apiBookmarkletImportRetrieveRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
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));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiBookmarkletImportUpdate(requestParameters: ApiBookmarkletImportUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<BookmarkletImport> {
|
|
const response = await this.apiBookmarkletImportUpdateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
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));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiConnectorConfigCreate(requestParameters: ApiConnectorConfigCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ConnectorConfigConfig> {
|
|
const response = await this.apiConnectorConfigCreateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
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);
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiConnectorConfigDestroy(requestParameters: ApiConnectorConfigDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
await this.apiConnectorConfigDestroyRaw(requestParameters, initOverrides);
|
|
}
|
|
|
|
/**
|
|
*/
|
|
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));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiConnectorConfigList(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<ConnectorConfigConfig>> {
|
|
const response = await this.apiConnectorConfigListRaw(initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
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));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiConnectorConfigPartialUpdate(requestParameters: ApiConnectorConfigPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ConnectorConfigConfig> {
|
|
const response = await this.apiConnectorConfigPartialUpdateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
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));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiConnectorConfigRetrieve(requestParameters: ApiConnectorConfigRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ConnectorConfigConfig> {
|
|
const response = await this.apiConnectorConfigRetrieveRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
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));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiConnectorConfigUpdate(requestParameters: ApiConnectorConfigUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ConnectorConfigConfig> {
|
|
const response = await this.apiConnectorConfigUpdateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
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));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiCookLogCreate(requestParameters: ApiCookLogCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CookLog> {
|
|
const response = await this.apiCookLogCreateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
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);
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiCookLogDestroy(requestParameters: ApiCookLogDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
await this.apiCookLogDestroyRaw(requestParameters, initOverrides);
|
|
}
|
|
|
|
/**
|
|
*/
|
|
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));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiCookLogList(requestParameters: ApiCookLogListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedCookLogList> {
|
|
const response = await this.apiCookLogListRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
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));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiCookLogPartialUpdate(requestParameters: ApiCookLogPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CookLog> {
|
|
const response = await this.apiCookLogPartialUpdateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
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));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiCookLogRetrieve(requestParameters: ApiCookLogRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CookLog> {
|
|
const response = await this.apiCookLogRetrieveRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
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));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiCookLogUpdate(requestParameters: ApiCookLogUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CookLog> {
|
|
const response = await this.apiCookLogUpdateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
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));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiCustomFilterCreate(requestParameters: ApiCustomFilterCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CustomFilter> {
|
|
const response = await this.apiCustomFilterCreateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
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);
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiCustomFilterDestroy(requestParameters: ApiCustomFilterDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
await this.apiCustomFilterDestroyRaw(requestParameters, initOverrides);
|
|
}
|
|
|
|
/**
|
|
*/
|
|
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['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));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiCustomFilterList(requestParameters: ApiCustomFilterListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedCustomFilterList> {
|
|
const response = await this.apiCustomFilterListRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
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));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiCustomFilterPartialUpdate(requestParameters: ApiCustomFilterPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CustomFilter> {
|
|
const response = await this.apiCustomFilterPartialUpdateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
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));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiCustomFilterRetrieve(requestParameters: ApiCustomFilterRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CustomFilter> {
|
|
const response = await this.apiCustomFilterRetrieveRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
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));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
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);
|
|
}
|
|
|
|
/**
|
|
*/
|
|
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));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiExportLogCreate(requestParameters: ApiExportLogCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ExportLog> {
|
|
const response = await this.apiExportLogCreateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
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);
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiExportLogDestroy(requestParameters: ApiExportLogDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
await this.apiExportLogDestroyRaw(requestParameters, initOverrides);
|
|
}
|
|
|
|
/**
|
|
*/
|
|
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));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiExportLogList(requestParameters: ApiExportLogListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedExportLogList> {
|
|
const response = await this.apiExportLogListRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
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));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiExportLogPartialUpdate(requestParameters: ApiExportLogPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ExportLog> {
|
|
const response = await this.apiExportLogPartialUpdateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
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));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiExportLogRetrieve(requestParameters: ApiExportLogRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ExportLog> {
|
|
const response = await this.apiExportLogRetrieveRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
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));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiExportLogUpdate(requestParameters: ApiExportLogUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ExportLog> {
|
|
const response = await this.apiExportLogUpdateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
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));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiFoodCreate(requestParameters: ApiFoodCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Food> {
|
|
const response = await this.apiFoodCreateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
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);
|
|
}
|
|
|
|
/**
|
|
*/
|
|
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();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
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));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiFoodInheritFieldList(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<FoodInheritField>> {
|
|
const response = await this.apiFoodInheritFieldListRaw(initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
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));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiFoodInheritFieldRetrieve(requestParameters: ApiFoodInheritFieldRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<FoodInheritField> {
|
|
const response = await this.apiFoodInheritFieldRetrieveRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
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));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiFoodList(requestParameters: ApiFoodListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedFoodList> {
|
|
const response = await this.apiFoodListRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
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));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiFoodMergeUpdate(requestParameters: ApiFoodMergeUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Food> {
|
|
const response = await this.apiFoodMergeUpdateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
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));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiFoodMoveUpdate(requestParameters: ApiFoodMoveUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Food> {
|
|
const response = await this.apiFoodMoveUpdateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
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));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiFoodPartialUpdate(requestParameters: ApiFoodPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Food> {
|
|
const response = await this.apiFoodPartialUpdateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiFoodPropertyCreateRaw(requestParameters: ApiFoodPropertyCreateRequest, 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 apiFoodPropertyCreate().'
|
|
);
|
|
}
|
|
|
|
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-property/`,
|
|
method: 'POST',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
body: PropertyToJSON(requestParameters['property']),
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => PropertyFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiFoodPropertyCreate(requestParameters: ApiFoodPropertyCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Property> {
|
|
const response = await this.apiFoodPropertyCreateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiFoodPropertyDestroyRaw(requestParameters: ApiFoodPropertyDestroyRequest, 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 apiFoodPropertyDestroy().'
|
|
);
|
|
}
|
|
|
|
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-property/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'DELETE',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.VoidApiResponse(response);
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiFoodPropertyDestroy(requestParameters: ApiFoodPropertyDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
await this.apiFoodPropertyDestroyRaw(requestParameters, initOverrides);
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiFoodPropertyListRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<Property>>> {
|
|
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-property/`,
|
|
method: 'GET',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(PropertyFromJSON));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiFoodPropertyList(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<Property>> {
|
|
const response = await this.apiFoodPropertyListRaw(initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiFoodPropertyPartialUpdateRaw(requestParameters: ApiFoodPropertyPartialUpdateRequest, 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 apiFoodPropertyPartialUpdate().'
|
|
);
|
|
}
|
|
|
|
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-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));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiFoodPropertyPartialUpdate(requestParameters: ApiFoodPropertyPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Property> {
|
|
const response = await this.apiFoodPropertyPartialUpdateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiFoodPropertyRetrieveRaw(requestParameters: ApiFoodPropertyRetrieveRequest, 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 apiFoodPropertyRetrieve().'
|
|
);
|
|
}
|
|
|
|
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-property/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'GET',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => PropertyFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiFoodPropertyRetrieve(requestParameters: ApiFoodPropertyRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Property> {
|
|
const response = await this.apiFoodPropertyRetrieveRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiFoodPropertyTypeCreateRaw(requestParameters: ApiFoodPropertyTypeCreateRequest, 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 apiFoodPropertyTypeCreate().'
|
|
);
|
|
}
|
|
|
|
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-property-type/`,
|
|
method: 'POST',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
body: PropertyTypeToJSON(requestParameters['propertyType']),
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => PropertyTypeFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiFoodPropertyTypeCreate(requestParameters: ApiFoodPropertyTypeCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PropertyType> {
|
|
const response = await this.apiFoodPropertyTypeCreateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiFoodPropertyTypeDestroyRaw(requestParameters: ApiFoodPropertyTypeDestroyRequest, 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 apiFoodPropertyTypeDestroy().'
|
|
);
|
|
}
|
|
|
|
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-property-type/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'DELETE',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.VoidApiResponse(response);
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiFoodPropertyTypeDestroy(requestParameters: ApiFoodPropertyTypeDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
await this.apiFoodPropertyTypeDestroyRaw(requestParameters, initOverrides);
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiFoodPropertyTypeListRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<PropertyType>>> {
|
|
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-property-type/`,
|
|
method: 'GET',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(PropertyTypeFromJSON));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiFoodPropertyTypeList(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<PropertyType>> {
|
|
const response = await this.apiFoodPropertyTypeListRaw(initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiFoodPropertyTypePartialUpdateRaw(requestParameters: ApiFoodPropertyTypePartialUpdateRequest, 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 apiFoodPropertyTypePartialUpdate().'
|
|
);
|
|
}
|
|
|
|
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-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));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiFoodPropertyTypePartialUpdate(requestParameters: ApiFoodPropertyTypePartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PropertyType> {
|
|
const response = await this.apiFoodPropertyTypePartialUpdateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiFoodPropertyTypeRetrieveRaw(requestParameters: ApiFoodPropertyTypeRetrieveRequest, 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 apiFoodPropertyTypeRetrieve().'
|
|
);
|
|
}
|
|
|
|
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-property-type/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
method: 'GET',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => PropertyTypeFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiFoodPropertyTypeRetrieve(requestParameters: ApiFoodPropertyTypeRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PropertyType> {
|
|
const response = await this.apiFoodPropertyTypeRetrieveRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiFoodPropertyTypeUpdateRaw(requestParameters: ApiFoodPropertyTypeUpdateRequest, 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 apiFoodPropertyTypeUpdate().'
|
|
);
|
|
}
|
|
|
|
if (requestParameters['propertyType'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'propertyType',
|
|
'Required parameter "propertyType" was null or undefined when calling apiFoodPropertyTypeUpdate().'
|
|
);
|
|
}
|
|
|
|
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-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));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiFoodPropertyTypeUpdate(requestParameters: ApiFoodPropertyTypeUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PropertyType> {
|
|
const response = await this.apiFoodPropertyTypeUpdateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiFoodPropertyUpdateRaw(requestParameters: ApiFoodPropertyUpdateRequest, 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 apiFoodPropertyUpdate().'
|
|
);
|
|
}
|
|
|
|
if (requestParameters['property'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'property',
|
|
'Required parameter "property" was null or undefined when calling apiFoodPropertyUpdate().'
|
|
);
|
|
}
|
|
|
|
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-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));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiFoodPropertyUpdate(requestParameters: ApiFoodPropertyUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Property> {
|
|
const response = await this.apiFoodPropertyUpdateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
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));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiFoodRetrieve(requestParameters: ApiFoodRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Food> {
|
|
const response = await this.apiFoodRetrieveRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
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));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiFoodShoppingUpdate(requestParameters: ApiFoodShoppingUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<FoodShoppingUpdate> {
|
|
const response = await this.apiFoodShoppingUpdateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
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));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiFoodUpdate(requestParameters: ApiFoodUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Food> {
|
|
const response = await this.apiFoodUpdateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
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));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiGroupList(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<Group>> {
|
|
const response = await this.apiGroupListRaw(initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
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));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiGroupRetrieve(requestParameters: ApiGroupRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Group> {
|
|
const response = await this.apiGroupRetrieveRaw(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);
|
|
}
|
|
|
|
/**
|
|
*/
|
|
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));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiImportLogCreate(requestParameters: ApiImportLogCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ImportLog> {
|
|
const response = await this.apiImportLogCreateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
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);
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiImportLogDestroy(requestParameters: ApiImportLogDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
await this.apiImportLogDestroyRaw(requestParameters, initOverrides);
|
|
}
|
|
|
|
/**
|
|
*/
|
|
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));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiImportLogList(requestParameters: ApiImportLogListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedImportLogList> {
|
|
const response = await this.apiImportLogListRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
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));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiImportLogPartialUpdate(requestParameters: ApiImportLogPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ImportLog> {
|
|
const response = await this.apiImportLogPartialUpdateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
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));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiImportLogRetrieve(requestParameters: ApiImportLogRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ImportLog> {
|
|
const response = await this.apiImportLogRetrieveRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
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));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiImportLogUpdate(requestParameters: ApiImportLogUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ImportLog> {
|
|
const response = await this.apiImportLogUpdateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
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));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiIngredientCreate(requestParameters: ApiIngredientCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Ingredient> {
|
|
const response = await this.apiIngredientCreateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
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);
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiIngredientDestroy(requestParameters: ApiIngredientDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
await this.apiIngredientDestroyRaw(requestParameters, initOverrides);
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiIngredientListRaw(requestParameters: ApiIngredientListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PaginatedIngredientList>> {
|
|
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/ingredient/`,
|
|
method: 'GET',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedIngredientListFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiIngredientList(requestParameters: ApiIngredientListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedIngredientList> {
|
|
const response = await this.apiIngredientListRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
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));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiIngredientPartialUpdate(requestParameters: ApiIngredientPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Ingredient> {
|
|
const response = await this.apiIngredientPartialUpdateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
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));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiIngredientRetrieve(requestParameters: ApiIngredientRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Ingredient> {
|
|
const response = await this.apiIngredientRetrieveRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
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));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiIngredientUpdate(requestParameters: ApiIngredientUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Ingredient> {
|
|
const response = await this.apiIngredientUpdateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
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));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiInviteLinkCreate(requestParameters: ApiInviteLinkCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<InviteLink> {
|
|
const response = await this.apiInviteLinkCreateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
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);
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiInviteLinkDestroy(requestParameters: ApiInviteLinkDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
await this.apiInviteLinkDestroyRaw(requestParameters, initOverrides);
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiInviteLinkListRaw(requestParameters: ApiInviteLinkListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<InviteLink>>> {
|
|
const queryParameters: any = {};
|
|
|
|
if (requestParameters['limit'] != null) {
|
|
queryParameters['limit'] = requestParameters['limit'];
|
|
}
|
|
|
|
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) => jsonValue.map(InviteLinkFromJSON));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiInviteLinkList(requestParameters: ApiInviteLinkListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<InviteLink>> {
|
|
const response = await this.apiInviteLinkListRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
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));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiInviteLinkPartialUpdate(requestParameters: ApiInviteLinkPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<InviteLink> {
|
|
const response = await this.apiInviteLinkPartialUpdateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
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));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiInviteLinkRetrieve(requestParameters: ApiInviteLinkRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<InviteLink> {
|
|
const response = await this.apiInviteLinkRetrieveRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
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));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiInviteLinkUpdate(requestParameters: ApiInviteLinkUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<InviteLink> {
|
|
const response = await this.apiInviteLinkUpdateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
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));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiKeywordCreate(requestParameters: ApiKeywordCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Keyword> {
|
|
const response = await this.apiKeywordCreateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
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);
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiKeywordDestroy(requestParameters: ApiKeywordDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
await this.apiKeywordDestroyRaw(requestParameters, initOverrides);
|
|
}
|
|
|
|
/**
|
|
*/
|
|
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));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiKeywordList(requestParameters: ApiKeywordListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedKeywordList> {
|
|
const response = await this.apiKeywordListRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
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));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiKeywordMergeUpdate(requestParameters: ApiKeywordMergeUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Keyword> {
|
|
const response = await this.apiKeywordMergeUpdateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
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));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiKeywordMoveUpdate(requestParameters: ApiKeywordMoveUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Keyword> {
|
|
const response = await this.apiKeywordMoveUpdateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
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));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiKeywordPartialUpdate(requestParameters: ApiKeywordPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Keyword> {
|
|
const response = await this.apiKeywordPartialUpdateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
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));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiKeywordRetrieve(requestParameters: ApiKeywordRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Keyword> {
|
|
const response = await this.apiKeywordRetrieveRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
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));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiKeywordUpdate(requestParameters: ApiKeywordUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Keyword> {
|
|
const response = await this.apiKeywordUpdateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* list: optional parameters - **from_date**: filter from (inclusive) a certain date onward - **to_date**: filter upward to (inclusive) certain date - **meal_type**: filter meal plans based on meal_type ID
|
|
*/
|
|
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));
|
|
}
|
|
|
|
/**
|
|
* list: optional parameters - **from_date**: filter from (inclusive) a certain date onward - **to_date**: filter upward to (inclusive) certain date - **meal_type**: filter meal plans based on meal_type ID
|
|
*/
|
|
async apiMealPlanCreate(requestParameters: ApiMealPlanCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<MealPlan> {
|
|
const response = await this.apiMealPlanCreateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* list: optional parameters - **from_date**: filter from (inclusive) a certain date onward - **to_date**: filter upward to (inclusive) certain date - **meal_type**: filter meal plans based on meal_type ID
|
|
*/
|
|
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);
|
|
}
|
|
|
|
/**
|
|
* list: optional parameters - **from_date**: filter from (inclusive) a certain date onward - **to_date**: filter upward to (inclusive) certain date - **meal_type**: filter meal plans based on meal_type ID
|
|
*/
|
|
async apiMealPlanDestroy(requestParameters: ApiMealPlanDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
await this.apiMealPlanDestroyRaw(requestParameters, initOverrides);
|
|
}
|
|
|
|
/**
|
|
* list: optional parameters - **from_date**: filter from (inclusive) a certain date onward - **to_date**: filter upward to (inclusive) certain date - **meal_type**: filter meal plans based on meal_type ID
|
|
*/
|
|
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;
|
|
}
|
|
}
|
|
|
|
/**
|
|
* list: optional parameters - **from_date**: filter from (inclusive) a certain date onward - **to_date**: filter upward to (inclusive) certain date - **meal_type**: filter meal plans based on meal_type ID
|
|
*/
|
|
async apiMealPlanIcalRetrieve(requestParameters: ApiMealPlanIcalRetrieveRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<string> {
|
|
const response = await this.apiMealPlanIcalRetrieveRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* list: optional parameters - **from_date**: filter from (inclusive) a certain date onward - **to_date**: filter upward to (inclusive) certain date - **meal_type**: filter meal plans based on meal_type ID
|
|
*/
|
|
async apiMealPlanListRaw(requestParameters: ApiMealPlanListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<MealPlan>>> {
|
|
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/`,
|
|
method: 'GET',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(MealPlanFromJSON));
|
|
}
|
|
|
|
/**
|
|
* list: optional parameters - **from_date**: filter from (inclusive) a certain date onward - **to_date**: filter upward to (inclusive) certain date - **meal_type**: filter meal plans based on meal_type ID
|
|
*/
|
|
async apiMealPlanList(requestParameters: ApiMealPlanListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<MealPlan>> {
|
|
const response = await this.apiMealPlanListRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* list: optional parameters - **from_date**: filter from (inclusive) a certain date onward - **to_date**: filter upward to (inclusive) certain date - **meal_type**: filter meal plans based on meal_type ID
|
|
*/
|
|
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));
|
|
}
|
|
|
|
/**
|
|
* list: optional parameters - **from_date**: filter from (inclusive) a certain date onward - **to_date**: filter upward to (inclusive) certain date - **meal_type**: filter meal plans based on meal_type ID
|
|
*/
|
|
async apiMealPlanPartialUpdate(requestParameters: ApiMealPlanPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<MealPlan> {
|
|
const response = await this.apiMealPlanPartialUpdateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* list: optional parameters - **from_date**: filter from (inclusive) a certain date onward - **to_date**: filter upward to (inclusive) certain date - **meal_type**: filter meal plans based on meal_type ID
|
|
*/
|
|
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));
|
|
}
|
|
|
|
/**
|
|
* list: optional parameters - **from_date**: filter from (inclusive) a certain date onward - **to_date**: filter upward to (inclusive) certain date - **meal_type**: filter meal plans based on meal_type ID
|
|
*/
|
|
async apiMealPlanRetrieve(requestParameters: ApiMealPlanRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<MealPlan> {
|
|
const response = await this.apiMealPlanRetrieveRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* list: optional parameters - **from_date**: filter from (inclusive) a certain date onward - **to_date**: filter upward to (inclusive) certain date - **meal_type**: filter meal plans based on meal_type ID
|
|
*/
|
|
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));
|
|
}
|
|
|
|
/**
|
|
* list: optional parameters - **from_date**: filter from (inclusive) a certain date onward - **to_date**: filter upward to (inclusive) certain date - **meal_type**: filter meal plans based on meal_type ID
|
|
*/
|
|
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(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<MealType>>> {
|
|
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/`,
|
|
method: 'GET',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(MealTypeFromJSON));
|
|
}
|
|
|
|
/**
|
|
* returns list of meal types created by the requesting user ordered by the order field.
|
|
*/
|
|
async apiMealTypeList(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<MealType>> {
|
|
const response = await this.apiMealTypeListRaw(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 apiPlanIcalRetrieveRaw(requestParameters: ApiPlanIcalRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
if (requestParameters['fromDate'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'fromDate',
|
|
'Required parameter "fromDate" was null or undefined when calling apiPlanIcalRetrieve().'
|
|
);
|
|
}
|
|
|
|
if (requestParameters['toDate'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'toDate',
|
|
'Required parameter "toDate" was null or undefined when calling apiPlanIcalRetrieve().'
|
|
);
|
|
}
|
|
|
|
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/plan-ical/{fromDate}/{toDate}/`.replace(`{${"fromDate"}}`, encodeURIComponent(String(requestParameters['fromDate']))).replace(`{${"toDate"}}`, encodeURIComponent(String(requestParameters['toDate']))),
|
|
method: 'GET',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.VoidApiResponse(response);
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiPlanIcalRetrieve(requestParameters: ApiPlanIcalRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
await this.apiPlanIcalRetrieveRaw(requestParameters, initOverrides);
|
|
}
|
|
|
|
/**
|
|
*/
|
|
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));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiRecipeBookCreate(requestParameters: ApiRecipeBookCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RecipeBook> {
|
|
const response = await this.apiRecipeBookCreateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
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);
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiRecipeBookDestroy(requestParameters: ApiRecipeBookDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
await this.apiRecipeBookDestroyRaw(requestParameters, initOverrides);
|
|
}
|
|
|
|
/**
|
|
* list: optional parameters - **recipe**: id of recipe - only return books for that recipe - **book**: id of book - only return recipes in that book
|
|
*/
|
|
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));
|
|
}
|
|
|
|
/**
|
|
* list: optional parameters - **recipe**: id of recipe - only return books for that recipe - **book**: id of book - only return recipes in that book
|
|
*/
|
|
async apiRecipeBookEntryCreate(requestParameters: ApiRecipeBookEntryCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RecipeBookEntry> {
|
|
const response = await this.apiRecipeBookEntryCreateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* list: optional parameters - **recipe**: id of recipe - only return books for that recipe - **book**: id of book - only return recipes in that book
|
|
*/
|
|
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);
|
|
}
|
|
|
|
/**
|
|
* list: optional parameters - **recipe**: id of recipe - only return books for that recipe - **book**: id of book - only return recipes in that book
|
|
*/
|
|
async apiRecipeBookEntryDestroy(requestParameters: ApiRecipeBookEntryDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
await this.apiRecipeBookEntryDestroyRaw(requestParameters, initOverrides);
|
|
}
|
|
|
|
/**
|
|
* list: optional parameters - **recipe**: id of recipe - only return books for that recipe - **book**: id of book - only return recipes in that book
|
|
*/
|
|
async apiRecipeBookEntryListRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<RecipeBookEntry>>> {
|
|
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/`,
|
|
method: 'GET',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(RecipeBookEntryFromJSON));
|
|
}
|
|
|
|
/**
|
|
* list: optional parameters - **recipe**: id of recipe - only return books for that recipe - **book**: id of book - only return recipes in that book
|
|
*/
|
|
async apiRecipeBookEntryList(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<RecipeBookEntry>> {
|
|
const response = await this.apiRecipeBookEntryListRaw(initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* list: optional parameters - **recipe**: id of recipe - only return books for that recipe - **book**: id of book - only return recipes in that book
|
|
*/
|
|
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));
|
|
}
|
|
|
|
/**
|
|
* list: optional parameters - **recipe**: id of recipe - only return books for that recipe - **book**: id of book - only return recipes in that book
|
|
*/
|
|
async apiRecipeBookEntryPartialUpdate(requestParameters: ApiRecipeBookEntryPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RecipeBookEntry> {
|
|
const response = await this.apiRecipeBookEntryPartialUpdateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* list: optional parameters - **recipe**: id of recipe - only return books for that recipe - **book**: id of book - only return recipes in that book
|
|
*/
|
|
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));
|
|
}
|
|
|
|
/**
|
|
* list: optional parameters - **recipe**: id of recipe - only return books for that recipe - **book**: id of book - only return recipes in that book
|
|
*/
|
|
async apiRecipeBookEntryRetrieve(requestParameters: ApiRecipeBookEntryRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RecipeBookEntry> {
|
|
const response = await this.apiRecipeBookEntryRetrieveRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* list: optional parameters - **recipe**: id of recipe - only return books for that recipe - **book**: id of book - only return recipes in that book
|
|
*/
|
|
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));
|
|
}
|
|
|
|
/**
|
|
* list: optional parameters - **recipe**: id of recipe - only return books for that recipe - **book**: id of book - only return recipes in that book
|
|
*/
|
|
async apiRecipeBookEntryUpdate(requestParameters: ApiRecipeBookEntryUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RecipeBookEntry> {
|
|
const response = await this.apiRecipeBookEntryUpdateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiRecipeBookListRaw(requestParameters: ApiRecipeBookListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<RecipeBook>>> {
|
|
const queryParameters: any = {};
|
|
|
|
if (requestParameters['limit'] != null) {
|
|
queryParameters['limit'] = requestParameters['limit'];
|
|
}
|
|
|
|
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) => jsonValue.map(RecipeBookFromJSON));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiRecipeBookList(requestParameters: ApiRecipeBookListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<RecipeBook>> {
|
|
const response = await this.apiRecipeBookListRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
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));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiRecipeBookPartialUpdate(requestParameters: ApiRecipeBookPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RecipeBook> {
|
|
const response = await this.apiRecipeBookPartialUpdateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
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));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiRecipeBookRetrieve(requestParameters: ApiRecipeBookRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RecipeBook> {
|
|
const response = await this.apiRecipeBookRetrieveRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
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));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiRecipeBookUpdate(requestParameters: ApiRecipeBookUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RecipeBook> {
|
|
const response = await this.apiRecipeBookUpdateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
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));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiRecipeCreate(requestParameters: ApiRecipeCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Recipe> {
|
|
const response = await this.apiRecipeCreateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
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);
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiRecipeDestroy(requestParameters: ApiRecipeDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
await this.apiRecipeDestroyRaw(requestParameters, initOverrides);
|
|
}
|
|
|
|
/**
|
|
*/
|
|
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));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
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(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/recipe-from-source/`,
|
|
method: 'POST',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.VoidApiResponse(response);
|
|
}
|
|
|
|
/**
|
|
* 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(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
await this.apiRecipeFromSourceCreateRaw(initOverrides);
|
|
}
|
|
|
|
/**
|
|
*/
|
|
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));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiRecipeImageUpdate(requestParameters: ApiRecipeImageUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RecipeImage> {
|
|
const response = await this.apiRecipeImageUpdateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
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));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiRecipeList(requestParameters: ApiRecipeListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedRecipeOverviewList> {
|
|
const response = await this.apiRecipeListRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
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));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiRecipePartialUpdate(requestParameters: ApiRecipePartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Recipe> {
|
|
const response = await this.apiRecipePartialUpdateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiRecipeRelatedRetrieveRaw(requestParameters: ApiRecipeRelatedRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<RecipeSimple>> {
|
|
if (requestParameters['id'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id',
|
|
'Required parameter "id" was null or undefined when calling apiRecipeRelatedRetrieve().'
|
|
);
|
|
}
|
|
|
|
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) => RecipeSimpleFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiRecipeRelatedRetrieve(requestParameters: ApiRecipeRelatedRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RecipeSimple> {
|
|
const response = await this.apiRecipeRelatedRetrieveRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
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));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiRecipeRetrieve(requestParameters: ApiRecipeRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Recipe> {
|
|
const response = await this.apiRecipeRetrieveRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
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().'
|
|
);
|
|
}
|
|
|
|
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));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiRecipeShoppingUpdate(requestParameters: ApiRecipeShoppingUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RecipeShoppingUpdate> {
|
|
const response = await this.apiRecipeShoppingUpdateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
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));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
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 apiResetFoodInheritanceRetrieveRaw(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: 'GET',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.VoidApiResponse(response);
|
|
}
|
|
|
|
/**
|
|
* function to reset inheritance from api, see food method for docs
|
|
*/
|
|
async apiResetFoodInheritanceRetrieve(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
await this.apiResetFoodInheritanceRetrieveRaw(initOverrides);
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiShareLinkRetrieveRaw(requestParameters: ApiShareLinkRetrieveRequest, 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 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.VoidApiResponse(response);
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiShareLinkRetrieve(requestParameters: ApiShareLinkRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
await this.apiShareLinkRetrieveRaw(requestParameters, initOverrides);
|
|
}
|
|
|
|
/**
|
|
*/
|
|
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));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiShoppingListEntryBulkCreate(requestParameters: ApiShoppingListEntryBulkCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ShoppingListEntryBulk> {
|
|
const response = await this.apiShoppingListEntryBulkCreateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
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));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiShoppingListEntryCreate(requestParameters: ApiShoppingListEntryCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ShoppingListEntry> {
|
|
const response = await this.apiShoppingListEntryCreateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
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);
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiShoppingListEntryDestroy(requestParameters: ApiShoppingListEntryDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
await this.apiShoppingListEntryDestroyRaw(requestParameters, initOverrides);
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiShoppingListEntryListRaw(requestParameters: ApiShoppingListEntryListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<ShoppingListEntry>>> {
|
|
const queryParameters: any = {};
|
|
|
|
if (requestParameters['checked'] != null) {
|
|
queryParameters['checked'] = requestParameters['checked'];
|
|
}
|
|
|
|
if (requestParameters['id'] != null) {
|
|
queryParameters['id'] = requestParameters['id'];
|
|
}
|
|
|
|
if (requestParameters['supermarket'] != null) {
|
|
queryParameters['supermarket'] = requestParameters['supermarket'];
|
|
}
|
|
|
|
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) => jsonValue.map(ShoppingListEntryFromJSON));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiShoppingListEntryList(requestParameters: ApiShoppingListEntryListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<ShoppingListEntry>> {
|
|
const response = await this.apiShoppingListEntryListRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
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));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiShoppingListEntryPartialUpdate(requestParameters: ApiShoppingListEntryPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ShoppingListEntry> {
|
|
const response = await this.apiShoppingListEntryPartialUpdateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
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));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiShoppingListEntryRetrieve(requestParameters: ApiShoppingListEntryRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ShoppingListEntry> {
|
|
const response = await this.apiShoppingListEntryRetrieveRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
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));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiShoppingListEntryUpdate(requestParameters: ApiShoppingListEntryUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ShoppingListEntry> {
|
|
const response = await this.apiShoppingListEntryUpdateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
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));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiShoppingListRecipeCreate(requestParameters: ApiShoppingListRecipeCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ShoppingListRecipe> {
|
|
const response = await this.apiShoppingListRecipeCreateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
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);
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiShoppingListRecipeDestroy(requestParameters: ApiShoppingListRecipeDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
await this.apiShoppingListRecipeDestroyRaw(requestParameters, initOverrides);
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiShoppingListRecipeListRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<ShoppingListRecipe>>> {
|
|
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/`,
|
|
method: 'GET',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(ShoppingListRecipeFromJSON));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiShoppingListRecipeList(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<ShoppingListRecipe>> {
|
|
const response = await this.apiShoppingListRecipeListRaw(initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
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));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiShoppingListRecipePartialUpdate(requestParameters: ApiShoppingListRecipePartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ShoppingListRecipe> {
|
|
const response = await this.apiShoppingListRecipePartialUpdateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
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));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiShoppingListRecipeRetrieve(requestParameters: ApiShoppingListRecipeRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ShoppingListRecipe> {
|
|
const response = await this.apiShoppingListRecipeRetrieveRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
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));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiShoppingListRecipeUpdate(requestParameters: ApiShoppingListRecipeUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ShoppingListRecipe> {
|
|
const response = await this.apiShoppingListRecipeUpdateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiSpaceListRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<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/`,
|
|
method: 'GET',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(SpaceFromJSON));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiSpaceList(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<Space>> {
|
|
const response = await this.apiSpaceListRaw(initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
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));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiSpacePartialUpdate(requestParameters: ApiSpacePartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Space> {
|
|
const response = await this.apiSpacePartialUpdateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
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));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiSpaceRetrieve(requestParameters: ApiSpaceRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Space> {
|
|
const response = await this.apiSpaceRetrieveRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
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));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiStepCreate(requestParameters: ApiStepCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Step> {
|
|
const response = await this.apiStepCreateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
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);
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiStepDestroy(requestParameters: ApiStepDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
await this.apiStepDestroyRaw(requestParameters, initOverrides);
|
|
}
|
|
|
|
/**
|
|
*/
|
|
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));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiStepList(requestParameters: ApiStepListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedStepList> {
|
|
const response = await this.apiStepListRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
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));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiStepPartialUpdate(requestParameters: ApiStepPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Step> {
|
|
const response = await this.apiStepPartialUpdateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
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));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiStepRetrieve(requestParameters: ApiStepRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Step> {
|
|
const response = await this.apiStepRetrieveRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
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));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiStepUpdate(requestParameters: ApiStepUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Step> {
|
|
const response = await this.apiStepUpdateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
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));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiStorageCreate(requestParameters: ApiStorageCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Storage> {
|
|
const response = await this.apiStorageCreateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
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);
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiStorageDestroy(requestParameters: ApiStorageDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
await this.apiStorageDestroyRaw(requestParameters, initOverrides);
|
|
}
|
|
|
|
/**
|
|
*/
|
|
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));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiStorageList(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<Storage>> {
|
|
const response = await this.apiStorageListRaw(initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
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));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiStoragePartialUpdate(requestParameters: ApiStoragePartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Storage> {
|
|
const response = await this.apiStoragePartialUpdateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
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));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiStorageRetrieve(requestParameters: ApiStorageRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Storage> {
|
|
const response = await this.apiStorageRetrieveRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
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));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiStorageUpdate(requestParameters: ApiStorageUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Storage> {
|
|
const response = await this.apiStorageUpdateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
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));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiSupermarketCategoryCreate(requestParameters: ApiSupermarketCategoryCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SupermarketCategory> {
|
|
const response = await this.apiSupermarketCategoryCreateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
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);
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiSupermarketCategoryDestroy(requestParameters: ApiSupermarketCategoryDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
await this.apiSupermarketCategoryDestroyRaw(requestParameters, initOverrides);
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiSupermarketCategoryListRaw(requestParameters: ApiSupermarketCategoryListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<SupermarketCategory>>> {
|
|
const queryParameters: any = {};
|
|
|
|
if (requestParameters['limit'] != null) {
|
|
queryParameters['limit'] = requestParameters['limit'];
|
|
}
|
|
|
|
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) => jsonValue.map(SupermarketCategoryFromJSON));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiSupermarketCategoryList(requestParameters: ApiSupermarketCategoryListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<SupermarketCategory>> {
|
|
const response = await this.apiSupermarketCategoryListRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
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));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiSupermarketCategoryMergeUpdate(requestParameters: ApiSupermarketCategoryMergeUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SupermarketCategory> {
|
|
const response = await this.apiSupermarketCategoryMergeUpdateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
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));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiSupermarketCategoryPartialUpdate(requestParameters: ApiSupermarketCategoryPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SupermarketCategory> {
|
|
const response = await this.apiSupermarketCategoryPartialUpdateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
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));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiSupermarketCategoryRelationCreate(requestParameters: ApiSupermarketCategoryRelationCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SupermarketCategoryRelation> {
|
|
const response = await this.apiSupermarketCategoryRelationCreateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
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);
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiSupermarketCategoryRelationDestroy(requestParameters: ApiSupermarketCategoryRelationDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
await this.apiSupermarketCategoryRelationDestroyRaw(requestParameters, initOverrides);
|
|
}
|
|
|
|
/**
|
|
*/
|
|
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));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiSupermarketCategoryRelationList(requestParameters: ApiSupermarketCategoryRelationListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedSupermarketCategoryRelationList> {
|
|
const response = await this.apiSupermarketCategoryRelationListRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
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));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiSupermarketCategoryRelationPartialUpdate(requestParameters: ApiSupermarketCategoryRelationPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SupermarketCategoryRelation> {
|
|
const response = await this.apiSupermarketCategoryRelationPartialUpdateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
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));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiSupermarketCategoryRelationRetrieve(requestParameters: ApiSupermarketCategoryRelationRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SupermarketCategoryRelation> {
|
|
const response = await this.apiSupermarketCategoryRelationRetrieveRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
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));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiSupermarketCategoryRelationUpdate(requestParameters: ApiSupermarketCategoryRelationUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SupermarketCategoryRelation> {
|
|
const response = await this.apiSupermarketCategoryRelationUpdateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
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));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiSupermarketCategoryRetrieve(requestParameters: ApiSupermarketCategoryRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SupermarketCategory> {
|
|
const response = await this.apiSupermarketCategoryRetrieveRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
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));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiSupermarketCategoryUpdate(requestParameters: ApiSupermarketCategoryUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SupermarketCategory> {
|
|
const response = await this.apiSupermarketCategoryUpdateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
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));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiSupermarketCreate(requestParameters: ApiSupermarketCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Supermarket> {
|
|
const response = await this.apiSupermarketCreateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
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);
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiSupermarketDestroy(requestParameters: ApiSupermarketDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
await this.apiSupermarketDestroyRaw(requestParameters, initOverrides);
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiSupermarketListRaw(requestParameters: ApiSupermarketListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<Supermarket>>> {
|
|
const queryParameters: any = {};
|
|
|
|
if (requestParameters['limit'] != null) {
|
|
queryParameters['limit'] = requestParameters['limit'];
|
|
}
|
|
|
|
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) => jsonValue.map(SupermarketFromJSON));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiSupermarketList(requestParameters: ApiSupermarketListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<Supermarket>> {
|
|
const response = await this.apiSupermarketListRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
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));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiSupermarketPartialUpdate(requestParameters: ApiSupermarketPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Supermarket> {
|
|
const response = await this.apiSupermarketPartialUpdateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
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));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiSupermarketRetrieve(requestParameters: ApiSupermarketRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Supermarket> {
|
|
const response = await this.apiSupermarketRetrieveRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
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));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
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);
|
|
}
|
|
|
|
/**
|
|
*/
|
|
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));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiSyncCreate(requestParameters: ApiSyncCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Sync> {
|
|
const response = await this.apiSyncCreateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
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);
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiSyncDestroy(requestParameters: ApiSyncDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
await this.apiSyncDestroyRaw(requestParameters, initOverrides);
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiSyncListRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<Sync>>> {
|
|
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/`,
|
|
method: 'GET',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(SyncFromJSON));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiSyncList(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<Sync>> {
|
|
const response = await this.apiSyncListRaw(initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
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));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiSyncLogList(requestParameters: ApiSyncLogListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedSyncLogList> {
|
|
const response = await this.apiSyncLogListRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
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));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiSyncLogRetrieve(requestParameters: ApiSyncLogRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SyncLog> {
|
|
const response = await this.apiSyncLogRetrieveRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
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));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiSyncPartialUpdate(requestParameters: ApiSyncPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Sync> {
|
|
const response = await this.apiSyncPartialUpdateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
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));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiSyncRetrieve(requestParameters: ApiSyncRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Sync> {
|
|
const response = await this.apiSyncRetrieveRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
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));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiSyncUpdate(requestParameters: ApiSyncUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Sync> {
|
|
const response = await this.apiSyncUpdateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
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));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiUnitConversionCreate(requestParameters: ApiUnitConversionCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UnitConversion> {
|
|
const response = await this.apiUnitConversionCreateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
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);
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiUnitConversionDestroy(requestParameters: ApiUnitConversionDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
await this.apiUnitConversionDestroyRaw(requestParameters, initOverrides);
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiUnitConversionListRaw(requestParameters: ApiUnitConversionListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<UnitConversion>>> {
|
|
const queryParameters: any = {};
|
|
|
|
if (requestParameters['foodId'] != null) {
|
|
queryParameters['food_id'] = requestParameters['foodId'];
|
|
}
|
|
|
|
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) => jsonValue.map(UnitConversionFromJSON));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiUnitConversionList(requestParameters: ApiUnitConversionListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<UnitConversion>> {
|
|
const response = await this.apiUnitConversionListRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
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));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiUnitConversionPartialUpdate(requestParameters: ApiUnitConversionPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UnitConversion> {
|
|
const response = await this.apiUnitConversionPartialUpdateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
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));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiUnitConversionRetrieve(requestParameters: ApiUnitConversionRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UnitConversion> {
|
|
const response = await this.apiUnitConversionRetrieveRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
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));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiUnitConversionUpdate(requestParameters: ApiUnitConversionUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UnitConversion> {
|
|
const response = await this.apiUnitConversionUpdateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
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));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiUnitCreate(requestParameters: ApiUnitCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Unit> {
|
|
const response = await this.apiUnitCreateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
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);
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiUnitDestroy(requestParameters: ApiUnitDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
await this.apiUnitDestroyRaw(requestParameters, initOverrides);
|
|
}
|
|
|
|
/**
|
|
*/
|
|
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));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiUnitList(requestParameters: ApiUnitListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedUnitList> {
|
|
const response = await this.apiUnitListRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
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));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiUnitMergeUpdate(requestParameters: ApiUnitMergeUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Unit> {
|
|
const response = await this.apiUnitMergeUpdateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
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));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiUnitPartialUpdate(requestParameters: ApiUnitPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Unit> {
|
|
const response = await this.apiUnitPartialUpdateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
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));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiUnitRetrieve(requestParameters: ApiUnitRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Unit> {
|
|
const response = await this.apiUnitRetrieveRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
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));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiUnitUpdate(requestParameters: ApiUnitUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Unit> {
|
|
const response = await this.apiUnitUpdateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiUserFileCreateRaw(requestParameters: ApiUserFileCreateRequest, 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 apiUserFileCreate().'
|
|
);
|
|
}
|
|
|
|
if (requestParameters['name'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'name',
|
|
'Required parameter "name" was null or undefined when calling apiUserFileCreate().'
|
|
);
|
|
}
|
|
|
|
if (requestParameters['file'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'file',
|
|
'Required parameter "file" 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().'
|
|
);
|
|
}
|
|
|
|
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);
|
|
}
|
|
|
|
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));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiUserFileCreate(requestParameters: ApiUserFileCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UserFile> {
|
|
const response = await this.apiUserFileCreateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
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);
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiUserFileDestroy(requestParameters: ApiUserFileDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
await this.apiUserFileDestroyRaw(requestParameters, initOverrides);
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiUserFileListRaw(requestParameters: ApiUserFileListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<UserFile>>> {
|
|
const queryParameters: any = {};
|
|
|
|
if (requestParameters['limit'] != null) {
|
|
queryParameters['limit'] = requestParameters['limit'];
|
|
}
|
|
|
|
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) => jsonValue.map(UserFileFromJSON));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiUserFileList(requestParameters: ApiUserFileListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<UserFile>> {
|
|
const response = await this.apiUserFileListRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
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);
|
|
}
|
|
|
|
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));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiUserFilePartialUpdate(requestParameters: ApiUserFilePartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UserFile> {
|
|
const response = await this.apiUserFilePartialUpdateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
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));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiUserFileRetrieve(requestParameters: ApiUserFileRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UserFile> {
|
|
const response = await this.apiUserFileRetrieveRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
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['id2'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'id2',
|
|
'Required parameter "id2" 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['file'] == null) {
|
|
throw new runtime.RequiredError(
|
|
'file',
|
|
'Required parameter "file" 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().'
|
|
);
|
|
}
|
|
|
|
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);
|
|
}
|
|
|
|
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));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiUserFileUpdate(requestParameters: ApiUserFileUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UserFile> {
|
|
const response = await this.apiUserFileUpdateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* list: optional parameters - **filter_list**: array of user id\'s to get names for
|
|
*/
|
|
async apiUserListRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<User>>> {
|
|
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/`,
|
|
method: 'GET',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(UserFromJSON));
|
|
}
|
|
|
|
/**
|
|
* list: optional parameters - **filter_list**: array of user id\'s to get names for
|
|
*/
|
|
async apiUserList(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<User>> {
|
|
const response = await this.apiUserListRaw(initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* list: optional parameters - **filter_list**: array of user id\'s to get names for
|
|
*/
|
|
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));
|
|
}
|
|
|
|
/**
|
|
* list: optional parameters - **filter_list**: array of user id\'s to get names for
|
|
*/
|
|
async apiUserPartialUpdate(requestParameters: ApiUserPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<User> {
|
|
const response = await this.apiUserPartialUpdateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
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));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiUserPreferenceList(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<UserPreference>> {
|
|
const response = await this.apiUserPreferenceListRaw(initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
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));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiUserPreferencePartialUpdate(requestParameters: ApiUserPreferencePartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UserPreference> {
|
|
const response = await this.apiUserPreferencePartialUpdateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
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));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiUserPreferenceRetrieve(requestParameters: ApiUserPreferenceRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UserPreference> {
|
|
const response = await this.apiUserPreferenceRetrieveRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* list: optional parameters - **filter_list**: array of user id\'s to get names for
|
|
*/
|
|
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));
|
|
}
|
|
|
|
/**
|
|
* list: optional parameters - **filter_list**: array of user id\'s to get names for
|
|
*/
|
|
async apiUserRetrieve(requestParameters: ApiUserRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<User> {
|
|
const response = await this.apiUserRetrieveRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
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);
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiUserSpaceDestroy(requestParameters: ApiUserSpaceDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
await this.apiUserSpaceDestroyRaw(requestParameters, initOverrides);
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiUserSpaceListRaw(requestParameters: ApiUserSpaceListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PaginatedUserSpaceList>> {
|
|
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/user-space/`,
|
|
method: 'GET',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedUserSpaceListFromJSON(jsonValue));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiUserSpaceList(requestParameters: ApiUserSpaceListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedUserSpaceList> {
|
|
const response = await this.apiUserSpaceListRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
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));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiUserSpacePartialUpdate(requestParameters: ApiUserSpacePartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UserSpace> {
|
|
const response = await this.apiUserSpacePartialUpdateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
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));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiUserSpaceRetrieve(requestParameters: ApiUserSpaceRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UserSpace> {
|
|
const response = await this.apiUserSpaceRetrieveRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
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));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiViewLogCreate(requestParameters: ApiViewLogCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ViewLog> {
|
|
const response = await this.apiViewLogCreateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
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);
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiViewLogDestroy(requestParameters: ApiViewLogDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
await this.apiViewLogDestroyRaw(requestParameters, initOverrides);
|
|
}
|
|
|
|
/**
|
|
*/
|
|
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));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiViewLogList(requestParameters: ApiViewLogListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedViewLogList> {
|
|
const response = await this.apiViewLogListRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
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));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiViewLogPartialUpdate(requestParameters: ApiViewLogPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ViewLog> {
|
|
const response = await this.apiViewLogPartialUpdateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
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));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiViewLogRetrieve(requestParameters: ApiViewLogRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ViewLog> {
|
|
const response = await this.apiViewLogRetrieveRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
*/
|
|
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));
|
|
}
|
|
|
|
/**
|
|
*/
|
|
async apiViewLogUpdate(requestParameters: ApiViewLogUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ViewLog> {
|
|
const response = await this.apiViewLogUpdateRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
}
|