autosync WIP

This commit is contained in:
vabene1111
2024-11-25 18:36:11 +01:00
parent 0485e5192b
commit d91a3080d5
41 changed files with 413 additions and 1876 deletions

View File

@@ -13,12 +13,12 @@
*/
import { mapValues } from '../runtime';
import type { AutomationTypeEnum } from './AutomationTypeEnum';
import type { TypeEnum } from './TypeEnum';
import {
AutomationTypeEnumFromJSON,
AutomationTypeEnumFromJSONTyped,
AutomationTypeEnumToJSON,
} from './AutomationTypeEnum';
TypeEnumFromJSON,
TypeEnumFromJSONTyped,
TypeEnumToJSON,
} from './TypeEnum';
/**
*
@@ -34,10 +34,10 @@ export interface Automation {
id?: number;
/**
*
* @type {AutomationTypeEnum}
* @type {TypeEnum}
* @memberof Automation
*/
type: AutomationTypeEnum;
type: TypeEnum;
/**
*
* @type {string}
@@ -110,7 +110,7 @@ export function AutomationFromJSONTyped(json: any, ignoreDiscriminator: boolean)
return {
'id': json['id'] == null ? undefined : json['id'],
'type': AutomationTypeEnumFromJSON(json['type']),
'type': TypeEnumFromJSON(json['type']),
'name': json['name'] == null ? undefined : json['name'],
'description': json['description'] == null ? undefined : json['description'],
'param1': json['param_1'] == null ? undefined : json['param_1'],
@@ -129,7 +129,7 @@ export function AutomationToJSON(value?: Omit<Automation, 'created_by'> | null):
return {
'id': value['id'],
'type': AutomationTypeEnumToJSON(value['type']),
'type': TypeEnumToJSON(value['type']),
'name': value['name'],
'description': value['description'],
'param_1': value['param1'],

View File

@@ -50,6 +50,12 @@ export interface PaginatedAutomationList {
* @memberof PaginatedAutomationList
*/
results: Array<Automation>;
/**
*
* @type {Date}
* @memberof PaginatedAutomationList
*/
timestamp?: Date;
}
/**
@@ -75,6 +81,7 @@ export function PaginatedAutomationListFromJSONTyped(json: any, ignoreDiscrimina
'next': json['next'] == null ? undefined : json['next'],
'previous': json['previous'] == null ? undefined : json['previous'],
'results': ((json['results'] as Array<any>).map(AutomationFromJSON)),
'timestamp': json['timestamp'] == null ? undefined : (new Date(json['timestamp'])),
};
}
@@ -88,6 +95,7 @@ export function PaginatedAutomationListToJSON(value?: PaginatedAutomationList |
'next': value['next'],
'previous': value['previous'],
'results': ((value['results'] as Array<any>).map(AutomationToJSON)),
'timestamp': value['timestamp'] == null ? undefined : ((value['timestamp']).toISOString()),
};
}
// ----------------------------------------------------------------------

View File

@@ -50,6 +50,12 @@ export interface PaginatedBookmarkletImportListList {
* @memberof PaginatedBookmarkletImportListList
*/
results: Array<BookmarkletImportList>;
/**
*
* @type {Date}
* @memberof PaginatedBookmarkletImportListList
*/
timestamp?: Date;
}
/**
@@ -75,6 +81,7 @@ export function PaginatedBookmarkletImportListListFromJSONTyped(json: any, ignor
'next': json['next'] == null ? undefined : json['next'],
'previous': json['previous'] == null ? undefined : json['previous'],
'results': ((json['results'] as Array<any>).map(BookmarkletImportListFromJSON)),
'timestamp': json['timestamp'] == null ? undefined : (new Date(json['timestamp'])),
};
}
@@ -88,6 +95,7 @@ export function PaginatedBookmarkletImportListListToJSON(value?: PaginatedBookma
'next': value['next'],
'previous': value['previous'],
'results': ((value['results'] as Array<any>).map(BookmarkletImportListToJSON)),
'timestamp': value['timestamp'] == null ? undefined : ((value['timestamp']).toISOString()),
};
}
// ----------------------------------------------------------------------

View File

@@ -50,6 +50,12 @@ export interface PaginatedCookLogList {
* @memberof PaginatedCookLogList
*/
results: Array<CookLog>;
/**
*
* @type {Date}
* @memberof PaginatedCookLogList
*/
timestamp?: Date;
}
/**
@@ -75,6 +81,7 @@ export function PaginatedCookLogListFromJSONTyped(json: any, ignoreDiscriminator
'next': json['next'] == null ? undefined : json['next'],
'previous': json['previous'] == null ? undefined : json['previous'],
'results': ((json['results'] as Array<any>).map(CookLogFromJSON)),
'timestamp': json['timestamp'] == null ? undefined : (new Date(json['timestamp'])),
};
}
@@ -88,6 +95,7 @@ export function PaginatedCookLogListToJSON(value?: PaginatedCookLogList | null):
'next': value['next'],
'previous': value['previous'],
'results': ((value['results'] as Array<any>).map(CookLogToJSON)),
'timestamp': value['timestamp'] == null ? undefined : ((value['timestamp']).toISOString()),
};
}
// ----------------------------------------------------------------------

View File

@@ -50,6 +50,12 @@ export interface PaginatedCustomFilterList {
* @memberof PaginatedCustomFilterList
*/
results: Array<CustomFilter>;
/**
*
* @type {Date}
* @memberof PaginatedCustomFilterList
*/
timestamp?: Date;
}
/**
@@ -75,6 +81,7 @@ export function PaginatedCustomFilterListFromJSONTyped(json: any, ignoreDiscrimi
'next': json['next'] == null ? undefined : json['next'],
'previous': json['previous'] == null ? undefined : json['previous'],
'results': ((json['results'] as Array<any>).map(CustomFilterFromJSON)),
'timestamp': json['timestamp'] == null ? undefined : (new Date(json['timestamp'])),
};
}
@@ -88,6 +95,7 @@ export function PaginatedCustomFilterListToJSON(value?: PaginatedCustomFilterLis
'next': value['next'],
'previous': value['previous'],
'results': ((value['results'] as Array<any>).map(CustomFilterToJSON)),
'timestamp': value['timestamp'] == null ? undefined : ((value['timestamp']).toISOString()),
};
}
// ----------------------------------------------------------------------

View File

@@ -50,6 +50,12 @@ export interface PaginatedExportLogList {
* @memberof PaginatedExportLogList
*/
results: Array<ExportLog>;
/**
*
* @type {Date}
* @memberof PaginatedExportLogList
*/
timestamp?: Date;
}
/**
@@ -75,6 +81,7 @@ export function PaginatedExportLogListFromJSONTyped(json: any, ignoreDiscriminat
'next': json['next'] == null ? undefined : json['next'],
'previous': json['previous'] == null ? undefined : json['previous'],
'results': ((json['results'] as Array<any>).map(ExportLogFromJSON)),
'timestamp': json['timestamp'] == null ? undefined : (new Date(json['timestamp'])),
};
}
@@ -88,6 +95,7 @@ export function PaginatedExportLogListToJSON(value?: PaginatedExportLogList | nu
'next': value['next'],
'previous': value['previous'],
'results': ((value['results'] as Array<any>).map(ExportLogToJSON)),
'timestamp': value['timestamp'] == null ? undefined : ((value['timestamp']).toISOString()),
};
}
// ----------------------------------------------------------------------

View File

@@ -50,6 +50,12 @@ export interface PaginatedFoodList {
* @memberof PaginatedFoodList
*/
results: Array<Food>;
/**
*
* @type {Date}
* @memberof PaginatedFoodList
*/
timestamp?: Date;
}
/**
@@ -75,6 +81,7 @@ export function PaginatedFoodListFromJSONTyped(json: any, ignoreDiscriminator: b
'next': json['next'] == null ? undefined : json['next'],
'previous': json['previous'] == null ? undefined : json['previous'],
'results': ((json['results'] as Array<any>).map(FoodFromJSON)),
'timestamp': json['timestamp'] == null ? undefined : (new Date(json['timestamp'])),
};
}
@@ -88,6 +95,7 @@ export function PaginatedFoodListToJSON(value?: PaginatedFoodList | null): any {
'next': value['next'],
'previous': value['previous'],
'results': ((value['results'] as Array<any>).map(FoodToJSON)),
'timestamp': value['timestamp'] == null ? undefined : ((value['timestamp']).toISOString()),
};
}
// ----------------------------------------------------------------------

View File

@@ -50,6 +50,12 @@ export interface PaginatedImportLogList {
* @memberof PaginatedImportLogList
*/
results: Array<ImportLog>;
/**
*
* @type {Date}
* @memberof PaginatedImportLogList
*/
timestamp?: Date;
}
/**
@@ -75,6 +81,7 @@ export function PaginatedImportLogListFromJSONTyped(json: any, ignoreDiscriminat
'next': json['next'] == null ? undefined : json['next'],
'previous': json['previous'] == null ? undefined : json['previous'],
'results': ((json['results'] as Array<any>).map(ImportLogFromJSON)),
'timestamp': json['timestamp'] == null ? undefined : (new Date(json['timestamp'])),
};
}
@@ -88,6 +95,7 @@ export function PaginatedImportLogListToJSON(value?: PaginatedImportLogList | nu
'next': value['next'],
'previous': value['previous'],
'results': ((value['results'] as Array<any>).map(ImportLogToJSON)),
'timestamp': value['timestamp'] == null ? undefined : ((value['timestamp']).toISOString()),
};
}
// ----------------------------------------------------------------------

View File

@@ -50,6 +50,12 @@ export interface PaginatedIngredientList {
* @memberof PaginatedIngredientList
*/
results: Array<Ingredient>;
/**
*
* @type {Date}
* @memberof PaginatedIngredientList
*/
timestamp?: Date;
}
/**
@@ -75,6 +81,7 @@ export function PaginatedIngredientListFromJSONTyped(json: any, ignoreDiscrimina
'next': json['next'] == null ? undefined : json['next'],
'previous': json['previous'] == null ? undefined : json['previous'],
'results': ((json['results'] as Array<any>).map(IngredientFromJSON)),
'timestamp': json['timestamp'] == null ? undefined : (new Date(json['timestamp'])),
};
}
@@ -88,6 +95,7 @@ export function PaginatedIngredientListToJSON(value?: PaginatedIngredientList |
'next': value['next'],
'previous': value['previous'],
'results': ((value['results'] as Array<any>).map(IngredientToJSON)),
'timestamp': value['timestamp'] == null ? undefined : ((value['timestamp']).toISOString()),
};
}
// ----------------------------------------------------------------------

View File

@@ -50,6 +50,12 @@ export interface PaginatedInviteLinkList {
* @memberof PaginatedInviteLinkList
*/
results: Array<InviteLink>;
/**
*
* @type {Date}
* @memberof PaginatedInviteLinkList
*/
timestamp?: Date;
}
/**
@@ -75,6 +81,7 @@ export function PaginatedInviteLinkListFromJSONTyped(json: any, ignoreDiscrimina
'next': json['next'] == null ? undefined : json['next'],
'previous': json['previous'] == null ? undefined : json['previous'],
'results': ((json['results'] as Array<any>).map(InviteLinkFromJSON)),
'timestamp': json['timestamp'] == null ? undefined : (new Date(json['timestamp'])),
};
}
@@ -88,6 +95,7 @@ export function PaginatedInviteLinkListToJSON(value?: PaginatedInviteLinkList |
'next': value['next'],
'previous': value['previous'],
'results': ((value['results'] as Array<any>).map(InviteLinkToJSON)),
'timestamp': value['timestamp'] == null ? undefined : ((value['timestamp']).toISOString()),
};
}
// ----------------------------------------------------------------------

View File

@@ -50,6 +50,12 @@ export interface PaginatedKeywordList {
* @memberof PaginatedKeywordList
*/
results: Array<Keyword>;
/**
*
* @type {Date}
* @memberof PaginatedKeywordList
*/
timestamp?: Date;
}
/**
@@ -75,6 +81,7 @@ export function PaginatedKeywordListFromJSONTyped(json: any, ignoreDiscriminator
'next': json['next'] == null ? undefined : json['next'],
'previous': json['previous'] == null ? undefined : json['previous'],
'results': ((json['results'] as Array<any>).map(KeywordFromJSON)),
'timestamp': json['timestamp'] == null ? undefined : (new Date(json['timestamp'])),
};
}
@@ -88,6 +95,7 @@ export function PaginatedKeywordListToJSON(value?: PaginatedKeywordList | null):
'next': value['next'],
'previous': value['previous'],
'results': ((value['results'] as Array<any>).map(KeywordToJSON)),
'timestamp': value['timestamp'] == null ? undefined : ((value['timestamp']).toISOString()),
};
}
// ----------------------------------------------------------------------

View File

@@ -50,6 +50,12 @@ export interface PaginatedMealPlanList {
* @memberof PaginatedMealPlanList
*/
results: Array<MealPlan>;
/**
*
* @type {Date}
* @memberof PaginatedMealPlanList
*/
timestamp?: Date;
}
/**
@@ -75,6 +81,7 @@ export function PaginatedMealPlanListFromJSONTyped(json: any, ignoreDiscriminato
'next': json['next'] == null ? undefined : json['next'],
'previous': json['previous'] == null ? undefined : json['previous'],
'results': ((json['results'] as Array<any>).map(MealPlanFromJSON)),
'timestamp': json['timestamp'] == null ? undefined : (new Date(json['timestamp'])),
};
}
@@ -88,6 +95,7 @@ export function PaginatedMealPlanListToJSON(value?: PaginatedMealPlanList | null
'next': value['next'],
'previous': value['previous'],
'results': ((value['results'] as Array<any>).map(MealPlanToJSON)),
'timestamp': value['timestamp'] == null ? undefined : ((value['timestamp']).toISOString()),
};
}
// ----------------------------------------------------------------------

View File

@@ -50,6 +50,12 @@ export interface PaginatedMealTypeList {
* @memberof PaginatedMealTypeList
*/
results: Array<MealType>;
/**
*
* @type {Date}
* @memberof PaginatedMealTypeList
*/
timestamp?: Date;
}
/**
@@ -75,6 +81,7 @@ export function PaginatedMealTypeListFromJSONTyped(json: any, ignoreDiscriminato
'next': json['next'] == null ? undefined : json['next'],
'previous': json['previous'] == null ? undefined : json['previous'],
'results': ((json['results'] as Array<any>).map(MealTypeFromJSON)),
'timestamp': json['timestamp'] == null ? undefined : (new Date(json['timestamp'])),
};
}
@@ -88,6 +95,7 @@ export function PaginatedMealTypeListToJSON(value?: PaginatedMealTypeList | null
'next': value['next'],
'previous': value['previous'],
'results': ((value['results'] as Array<any>).map(MealTypeToJSON)),
'timestamp': value['timestamp'] == null ? undefined : ((value['timestamp']).toISOString()),
};
}
// ----------------------------------------------------------------------

View File

@@ -50,6 +50,12 @@ export interface PaginatedPropertyList {
* @memberof PaginatedPropertyList
*/
results: Array<Property>;
/**
*
* @type {Date}
* @memberof PaginatedPropertyList
*/
timestamp?: Date;
}
/**
@@ -75,6 +81,7 @@ export function PaginatedPropertyListFromJSONTyped(json: any, ignoreDiscriminato
'next': json['next'] == null ? undefined : json['next'],
'previous': json['previous'] == null ? undefined : json['previous'],
'results': ((json['results'] as Array<any>).map(PropertyFromJSON)),
'timestamp': json['timestamp'] == null ? undefined : (new Date(json['timestamp'])),
};
}
@@ -88,6 +95,7 @@ export function PaginatedPropertyListToJSON(value?: PaginatedPropertyList | null
'next': value['next'],
'previous': value['previous'],
'results': ((value['results'] as Array<any>).map(PropertyToJSON)),
'timestamp': value['timestamp'] == null ? undefined : ((value['timestamp']).toISOString()),
};
}
// ----------------------------------------------------------------------

View File

@@ -50,6 +50,12 @@ export interface PaginatedPropertyTypeList {
* @memberof PaginatedPropertyTypeList
*/
results: Array<PropertyType>;
/**
*
* @type {Date}
* @memberof PaginatedPropertyTypeList
*/
timestamp?: Date;
}
/**
@@ -75,6 +81,7 @@ export function PaginatedPropertyTypeListFromJSONTyped(json: any, ignoreDiscrimi
'next': json['next'] == null ? undefined : json['next'],
'previous': json['previous'] == null ? undefined : json['previous'],
'results': ((json['results'] as Array<any>).map(PropertyTypeFromJSON)),
'timestamp': json['timestamp'] == null ? undefined : (new Date(json['timestamp'])),
};
}
@@ -88,6 +95,7 @@ export function PaginatedPropertyTypeListToJSON(value?: PaginatedPropertyTypeLis
'next': value['next'],
'previous': value['previous'],
'results': ((value['results'] as Array<any>).map(PropertyTypeToJSON)),
'timestamp': value['timestamp'] == null ? undefined : ((value['timestamp']).toISOString()),
};
}
// ----------------------------------------------------------------------

View File

@@ -50,6 +50,12 @@ export interface PaginatedRecipeBookEntryList {
* @memberof PaginatedRecipeBookEntryList
*/
results: Array<RecipeBookEntry>;
/**
*
* @type {Date}
* @memberof PaginatedRecipeBookEntryList
*/
timestamp?: Date;
}
/**
@@ -75,6 +81,7 @@ export function PaginatedRecipeBookEntryListFromJSONTyped(json: any, ignoreDiscr
'next': json['next'] == null ? undefined : json['next'],
'previous': json['previous'] == null ? undefined : json['previous'],
'results': ((json['results'] as Array<any>).map(RecipeBookEntryFromJSON)),
'timestamp': json['timestamp'] == null ? undefined : (new Date(json['timestamp'])),
};
}
@@ -88,6 +95,7 @@ export function PaginatedRecipeBookEntryListToJSON(value?: PaginatedRecipeBookEn
'next': value['next'],
'previous': value['previous'],
'results': ((value['results'] as Array<any>).map(RecipeBookEntryToJSON)),
'timestamp': value['timestamp'] == null ? undefined : ((value['timestamp']).toISOString()),
};
}
// ----------------------------------------------------------------------

View File

@@ -50,6 +50,12 @@ export interface PaginatedRecipeBookList {
* @memberof PaginatedRecipeBookList
*/
results: Array<RecipeBook>;
/**
*
* @type {Date}
* @memberof PaginatedRecipeBookList
*/
timestamp?: Date;
}
/**
@@ -75,6 +81,7 @@ export function PaginatedRecipeBookListFromJSONTyped(json: any, ignoreDiscrimina
'next': json['next'] == null ? undefined : json['next'],
'previous': json['previous'] == null ? undefined : json['previous'],
'results': ((json['results'] as Array<any>).map(RecipeBookFromJSON)),
'timestamp': json['timestamp'] == null ? undefined : (new Date(json['timestamp'])),
};
}
@@ -88,6 +95,7 @@ export function PaginatedRecipeBookListToJSON(value?: PaginatedRecipeBookList |
'next': value['next'],
'previous': value['previous'],
'results': ((value['results'] as Array<any>).map(RecipeBookToJSON)),
'timestamp': value['timestamp'] == null ? undefined : ((value['timestamp']).toISOString()),
};
}
// ----------------------------------------------------------------------

View File

@@ -50,6 +50,12 @@ export interface PaginatedShoppingListEntryList {
* @memberof PaginatedShoppingListEntryList
*/
results: Array<ShoppingListEntry>;
/**
*
* @type {Date}
* @memberof PaginatedShoppingListEntryList
*/
timestamp?: Date;
}
/**
@@ -75,6 +81,7 @@ export function PaginatedShoppingListEntryListFromJSONTyped(json: any, ignoreDis
'next': json['next'] == null ? undefined : json['next'],
'previous': json['previous'] == null ? undefined : json['previous'],
'results': ((json['results'] as Array<any>).map(ShoppingListEntryFromJSON)),
'timestamp': json['timestamp'] == null ? undefined : (new Date(json['timestamp'])),
};
}
@@ -88,6 +95,7 @@ export function PaginatedShoppingListEntryListToJSON(value?: PaginatedShoppingLi
'next': value['next'],
'previous': value['previous'],
'results': ((value['results'] as Array<any>).map(ShoppingListEntryToJSON)),
'timestamp': value['timestamp'] == null ? undefined : ((value['timestamp']).toISOString()),
};
}
// ----------------------------------------------------------------------

View File

@@ -50,6 +50,12 @@ export interface PaginatedShoppingListRecipeList {
* @memberof PaginatedShoppingListRecipeList
*/
results: Array<ShoppingListRecipe>;
/**
*
* @type {Date}
* @memberof PaginatedShoppingListRecipeList
*/
timestamp?: Date;
}
/**
@@ -75,6 +81,7 @@ export function PaginatedShoppingListRecipeListFromJSONTyped(json: any, ignoreDi
'next': json['next'] == null ? undefined : json['next'],
'previous': json['previous'] == null ? undefined : json['previous'],
'results': ((json['results'] as Array<any>).map(ShoppingListRecipeFromJSON)),
'timestamp': json['timestamp'] == null ? undefined : (new Date(json['timestamp'])),
};
}
@@ -88,6 +95,7 @@ export function PaginatedShoppingListRecipeListToJSON(value?: PaginatedShoppingL
'next': value['next'],
'previous': value['previous'],
'results': ((value['results'] as Array<any>).map(ShoppingListRecipeToJSON)),
'timestamp': value['timestamp'] == null ? undefined : ((value['timestamp']).toISOString()),
};
}
// ----------------------------------------------------------------------

View File

@@ -50,6 +50,12 @@ export interface PaginatedSpaceList {
* @memberof PaginatedSpaceList
*/
results: Array<Space>;
/**
*
* @type {Date}
* @memberof PaginatedSpaceList
*/
timestamp?: Date;
}
/**
@@ -75,6 +81,7 @@ export function PaginatedSpaceListFromJSONTyped(json: any, ignoreDiscriminator:
'next': json['next'] == null ? undefined : json['next'],
'previous': json['previous'] == null ? undefined : json['previous'],
'results': ((json['results'] as Array<any>).map(SpaceFromJSON)),
'timestamp': json['timestamp'] == null ? undefined : (new Date(json['timestamp'])),
};
}
@@ -88,6 +95,7 @@ export function PaginatedSpaceListToJSON(value?: PaginatedSpaceList | null): any
'next': value['next'],
'previous': value['previous'],
'results': ((value['results'] as Array<any>).map(SpaceToJSON)),
'timestamp': value['timestamp'] == null ? undefined : ((value['timestamp']).toISOString()),
};
}
// ----------------------------------------------------------------------

View File

@@ -50,6 +50,12 @@ export interface PaginatedStepList {
* @memberof PaginatedStepList
*/
results: Array<Step>;
/**
*
* @type {Date}
* @memberof PaginatedStepList
*/
timestamp?: Date;
}
/**
@@ -75,6 +81,7 @@ export function PaginatedStepListFromJSONTyped(json: any, ignoreDiscriminator: b
'next': json['next'] == null ? undefined : json['next'],
'previous': json['previous'] == null ? undefined : json['previous'],
'results': ((json['results'] as Array<any>).map(StepFromJSON)),
'timestamp': json['timestamp'] == null ? undefined : (new Date(json['timestamp'])),
};
}
@@ -88,6 +95,7 @@ export function PaginatedStepListToJSON(value?: PaginatedStepList | null): any {
'next': value['next'],
'previous': value['previous'],
'results': ((value['results'] as Array<any>).map(StepToJSON)),
'timestamp': value['timestamp'] == null ? undefined : ((value['timestamp']).toISOString()),
};
}
// ----------------------------------------------------------------------

View File

@@ -50,6 +50,12 @@ export interface PaginatedSupermarketCategoryList {
* @memberof PaginatedSupermarketCategoryList
*/
results: Array<SupermarketCategory>;
/**
*
* @type {Date}
* @memberof PaginatedSupermarketCategoryList
*/
timestamp?: Date;
}
/**
@@ -75,6 +81,7 @@ export function PaginatedSupermarketCategoryListFromJSONTyped(json: any, ignoreD
'next': json['next'] == null ? undefined : json['next'],
'previous': json['previous'] == null ? undefined : json['previous'],
'results': ((json['results'] as Array<any>).map(SupermarketCategoryFromJSON)),
'timestamp': json['timestamp'] == null ? undefined : (new Date(json['timestamp'])),
};
}
@@ -88,6 +95,7 @@ export function PaginatedSupermarketCategoryListToJSON(value?: PaginatedSupermar
'next': value['next'],
'previous': value['previous'],
'results': ((value['results'] as Array<any>).map(SupermarketCategoryToJSON)),
'timestamp': value['timestamp'] == null ? undefined : ((value['timestamp']).toISOString()),
};
}
// ----------------------------------------------------------------------

View File

@@ -50,6 +50,12 @@ export interface PaginatedSupermarketCategoryRelationList {
* @memberof PaginatedSupermarketCategoryRelationList
*/
results: Array<SupermarketCategoryRelation>;
/**
*
* @type {Date}
* @memberof PaginatedSupermarketCategoryRelationList
*/
timestamp?: Date;
}
/**
@@ -75,6 +81,7 @@ export function PaginatedSupermarketCategoryRelationListFromJSONTyped(json: any,
'next': json['next'] == null ? undefined : json['next'],
'previous': json['previous'] == null ? undefined : json['previous'],
'results': ((json['results'] as Array<any>).map(SupermarketCategoryRelationFromJSON)),
'timestamp': json['timestamp'] == null ? undefined : (new Date(json['timestamp'])),
};
}
@@ -88,6 +95,7 @@ export function PaginatedSupermarketCategoryRelationListToJSON(value?: Paginated
'next': value['next'],
'previous': value['previous'],
'results': ((value['results'] as Array<any>).map(SupermarketCategoryRelationToJSON)),
'timestamp': value['timestamp'] == null ? undefined : ((value['timestamp']).toISOString()),
};
}
// ----------------------------------------------------------------------

View File

@@ -50,6 +50,12 @@ export interface PaginatedSupermarketList {
* @memberof PaginatedSupermarketList
*/
results: Array<Supermarket>;
/**
*
* @type {Date}
* @memberof PaginatedSupermarketList
*/
timestamp?: Date;
}
/**
@@ -75,6 +81,7 @@ export function PaginatedSupermarketListFromJSONTyped(json: any, ignoreDiscrimin
'next': json['next'] == null ? undefined : json['next'],
'previous': json['previous'] == null ? undefined : json['previous'],
'results': ((json['results'] as Array<any>).map(SupermarketFromJSON)),
'timestamp': json['timestamp'] == null ? undefined : (new Date(json['timestamp'])),
};
}
@@ -88,6 +95,7 @@ export function PaginatedSupermarketListToJSON(value?: PaginatedSupermarketList
'next': value['next'],
'previous': value['previous'],
'results': ((value['results'] as Array<any>).map(SupermarketToJSON)),
'timestamp': value['timestamp'] == null ? undefined : ((value['timestamp']).toISOString()),
};
}
// ----------------------------------------------------------------------

View File

@@ -50,6 +50,12 @@ export interface PaginatedSyncList {
* @memberof PaginatedSyncList
*/
results: Array<Sync>;
/**
*
* @type {Date}
* @memberof PaginatedSyncList
*/
timestamp?: Date;
}
/**
@@ -75,6 +81,7 @@ export function PaginatedSyncListFromJSONTyped(json: any, ignoreDiscriminator: b
'next': json['next'] == null ? undefined : json['next'],
'previous': json['previous'] == null ? undefined : json['previous'],
'results': ((json['results'] as Array<any>).map(SyncFromJSON)),
'timestamp': json['timestamp'] == null ? undefined : (new Date(json['timestamp'])),
};
}
@@ -88,6 +95,7 @@ export function PaginatedSyncListToJSON(value?: PaginatedSyncList | null): any {
'next': value['next'],
'previous': value['previous'],
'results': ((value['results'] as Array<any>).map(SyncToJSON)),
'timestamp': value['timestamp'] == null ? undefined : ((value['timestamp']).toISOString()),
};
}
// ----------------------------------------------------------------------

View File

@@ -50,6 +50,12 @@ export interface PaginatedSyncLogList {
* @memberof PaginatedSyncLogList
*/
results: Array<SyncLog>;
/**
*
* @type {Date}
* @memberof PaginatedSyncLogList
*/
timestamp?: Date;
}
/**
@@ -75,6 +81,7 @@ export function PaginatedSyncLogListFromJSONTyped(json: any, ignoreDiscriminator
'next': json['next'] == null ? undefined : json['next'],
'previous': json['previous'] == null ? undefined : json['previous'],
'results': ((json['results'] as Array<any>).map(SyncLogFromJSON)),
'timestamp': json['timestamp'] == null ? undefined : (new Date(json['timestamp'])),
};
}
@@ -88,6 +95,7 @@ export function PaginatedSyncLogListToJSON(value?: PaginatedSyncLogList | null):
'next': value['next'],
'previous': value['previous'],
'results': ((value['results'] as Array<any>).map(SyncLogToJSON)),
'timestamp': value['timestamp'] == null ? undefined : ((value['timestamp']).toISOString()),
};
}
// ----------------------------------------------------------------------

View File

@@ -50,6 +50,12 @@ export interface PaginatedUnitConversionList {
* @memberof PaginatedUnitConversionList
*/
results: Array<UnitConversion>;
/**
*
* @type {Date}
* @memberof PaginatedUnitConversionList
*/
timestamp?: Date;
}
/**
@@ -75,6 +81,7 @@ export function PaginatedUnitConversionListFromJSONTyped(json: any, ignoreDiscri
'next': json['next'] == null ? undefined : json['next'],
'previous': json['previous'] == null ? undefined : json['previous'],
'results': ((json['results'] as Array<any>).map(UnitConversionFromJSON)),
'timestamp': json['timestamp'] == null ? undefined : (new Date(json['timestamp'])),
};
}
@@ -88,6 +95,7 @@ export function PaginatedUnitConversionListToJSON(value?: PaginatedUnitConversio
'next': value['next'],
'previous': value['previous'],
'results': ((value['results'] as Array<any>).map(UnitConversionToJSON)),
'timestamp': value['timestamp'] == null ? undefined : ((value['timestamp']).toISOString()),
};
}
// ----------------------------------------------------------------------

View File

@@ -50,6 +50,12 @@ export interface PaginatedUnitList {
* @memberof PaginatedUnitList
*/
results: Array<Unit>;
/**
*
* @type {Date}
* @memberof PaginatedUnitList
*/
timestamp?: Date;
}
/**
@@ -75,6 +81,7 @@ export function PaginatedUnitListFromJSONTyped(json: any, ignoreDiscriminator: b
'next': json['next'] == null ? undefined : json['next'],
'previous': json['previous'] == null ? undefined : json['previous'],
'results': ((json['results'] as Array<any>).map(UnitFromJSON)),
'timestamp': json['timestamp'] == null ? undefined : (new Date(json['timestamp'])),
};
}
@@ -88,6 +95,7 @@ export function PaginatedUnitListToJSON(value?: PaginatedUnitList | null): any {
'next': value['next'],
'previous': value['previous'],
'results': ((value['results'] as Array<any>).map(UnitToJSON)),
'timestamp': value['timestamp'] == null ? undefined : ((value['timestamp']).toISOString()),
};
}
// ----------------------------------------------------------------------

View File

@@ -50,6 +50,12 @@ export interface PaginatedUserFileList {
* @memberof PaginatedUserFileList
*/
results: Array<UserFile>;
/**
*
* @type {Date}
* @memberof PaginatedUserFileList
*/
timestamp?: Date;
}
/**
@@ -75,6 +81,7 @@ export function PaginatedUserFileListFromJSONTyped(json: any, ignoreDiscriminato
'next': json['next'] == null ? undefined : json['next'],
'previous': json['previous'] == null ? undefined : json['previous'],
'results': ((json['results'] as Array<any>).map(UserFileFromJSON)),
'timestamp': json['timestamp'] == null ? undefined : (new Date(json['timestamp'])),
};
}
@@ -88,6 +95,7 @@ export function PaginatedUserFileListToJSON(value?: PaginatedUserFileList | null
'next': value['next'],
'previous': value['previous'],
'results': ((value['results'] as Array<any>).map(UserFileToJSON)),
'timestamp': value['timestamp'] == null ? undefined : ((value['timestamp']).toISOString()),
};
}
// ----------------------------------------------------------------------

View File

@@ -50,6 +50,12 @@ export interface PaginatedUserSpaceList {
* @memberof PaginatedUserSpaceList
*/
results: Array<UserSpace>;
/**
*
* @type {Date}
* @memberof PaginatedUserSpaceList
*/
timestamp?: Date;
}
/**
@@ -75,6 +81,7 @@ export function PaginatedUserSpaceListFromJSONTyped(json: any, ignoreDiscriminat
'next': json['next'] == null ? undefined : json['next'],
'previous': json['previous'] == null ? undefined : json['previous'],
'results': ((json['results'] as Array<any>).map(UserSpaceFromJSON)),
'timestamp': json['timestamp'] == null ? undefined : (new Date(json['timestamp'])),
};
}
@@ -88,6 +95,7 @@ export function PaginatedUserSpaceListToJSON(value?: PaginatedUserSpaceList | nu
'next': value['next'],
'previous': value['previous'],
'results': ((value['results'] as Array<any>).map(UserSpaceToJSON)),
'timestamp': value['timestamp'] == null ? undefined : ((value['timestamp']).toISOString()),
};
}
// ----------------------------------------------------------------------

View File

@@ -50,6 +50,12 @@ export interface PaginatedViewLogList {
* @memberof PaginatedViewLogList
*/
results: Array<ViewLog>;
/**
*
* @type {Date}
* @memberof PaginatedViewLogList
*/
timestamp?: Date;
}
/**
@@ -75,6 +81,7 @@ export function PaginatedViewLogListFromJSONTyped(json: any, ignoreDiscriminator
'next': json['next'] == null ? undefined : json['next'],
'previous': json['previous'] == null ? undefined : json['previous'],
'results': ((json['results'] as Array<any>).map(ViewLogFromJSON)),
'timestamp': json['timestamp'] == null ? undefined : (new Date(json['timestamp'])),
};
}
@@ -88,6 +95,7 @@ export function PaginatedViewLogListToJSON(value?: PaginatedViewLogList | null):
'next': value['next'],
'previous': value['previous'],
'results': ((value['results'] as Array<any>).map(ViewLogToJSON)),
'timestamp': value['timestamp'] == null ? undefined : ((value['timestamp']).toISOString()),
};
}
// ----------------------------------------------------------------------

View File

@@ -13,12 +13,12 @@
*/
import { mapValues } from '../runtime';
import type { AutomationTypeEnum } from './AutomationTypeEnum';
import type { TypeEnum } from './TypeEnum';
import {
AutomationTypeEnumFromJSON,
AutomationTypeEnumFromJSONTyped,
AutomationTypeEnumToJSON,
} from './AutomationTypeEnum';
TypeEnumFromJSON,
TypeEnumFromJSONTyped,
TypeEnumToJSON,
} from './TypeEnum';
/**
*
@@ -34,10 +34,10 @@ export interface PatchedAutomation {
id?: number;
/**
*
* @type {AutomationTypeEnum}
* @type {TypeEnum}
* @memberof PatchedAutomation
*/
type?: AutomationTypeEnum;
type?: TypeEnum;
/**
*
* @type {string}
@@ -108,7 +108,7 @@ export function PatchedAutomationFromJSONTyped(json: any, ignoreDiscriminator: b
return {
'id': json['id'] == null ? undefined : json['id'],
'type': json['type'] == null ? undefined : AutomationTypeEnumFromJSON(json['type']),
'type': json['type'] == null ? undefined : TypeEnumFromJSON(json['type']),
'name': json['name'] == null ? undefined : json['name'],
'description': json['description'] == null ? undefined : json['description'],
'param1': json['param_1'] == null ? undefined : json['param_1'],
@@ -127,7 +127,7 @@ export function PatchedAutomationToJSON(value?: Omit<PatchedAutomation, 'created
return {
'id': value['id'],
'type': AutomationTypeEnumToJSON(value['type']),
'type': TypeEnumToJSON(value['type']),
'name': value['name'],
'description': value['description'],
'param_1': value['param1'],

View File

@@ -31,6 +31,12 @@ export interface ShoppingListEntryBulk {
* @memberof ShoppingListEntryBulk
*/
checked: boolean;
/**
*
* @type {Date}
* @memberof ShoppingListEntryBulk
*/
readonly timestamp: Date;
}
/**
@@ -39,6 +45,7 @@ export interface ShoppingListEntryBulk {
export function instanceOfShoppingListEntryBulk(value: object): value is ShoppingListEntryBulk {
if (!('ids' in value) || value['ids'] === undefined) return false;
if (!('checked' in value) || value['checked'] === undefined) return false;
if (!('timestamp' in value) || value['timestamp'] === undefined) return false;
return true;
}
@@ -54,10 +61,11 @@ export function ShoppingListEntryBulkFromJSONTyped(json: any, ignoreDiscriminato
'ids': json['ids'],
'checked': json['checked'],
'timestamp': (new Date(json['timestamp'])),
};
}
export function ShoppingListEntryBulkToJSON(value?: ShoppingListEntryBulk | null): any {
export function ShoppingListEntryBulkToJSON(value?: Omit<ShoppingListEntryBulk, 'timestamp'> | null): any {
if (value == null) {
return value;
}

View File

@@ -41,6 +41,17 @@ export const TypeEnum = {
export type TypeEnum = typeof TypeEnum[keyof typeof TypeEnum];
export function instanceOfTypeEnum(value: any): boolean {
for (const key in TypeEnum) {
if (Object.prototype.hasOwnProperty.call(TypeEnum, key)) {
if (TypeEnum[key as keyof typeof TypeEnum] === value) {
return true;
}
}
}
return false;
}
export function TypeEnumFromJSON(json: any): TypeEnum {
return TypeEnumFromJSONTyped(json, false);
}
@@ -53,3 +64,7 @@ export function TypeEnumToJSON(value?: TypeEnum | null): any {
return value as any;
}
export function TypeEnumToJSONTyped(value: any, ignoreDiscriminator: boolean): TypeEnum {
return value as TypeEnum;
}

View File

@@ -4,8 +4,6 @@ export * from './AccessToken';
export * from './AuthToken';
export * from './AutoMealPlan';
export * from './Automation';
export * from './AutomationTypeEnum';
export * from './BaseUnitEnum';
export * from './BookmarkletImport';
export * from './BookmarkletImportList';
export * from './ConnectorConfigConfig';
@@ -31,16 +29,6 @@ export * from './MealPlan';
export * from './MealType';
export * from './MethodEnum';
export * from './NutritionInformation';
export * from './OpenDataCategory';
export * from './OpenDataConversion';
export * from './OpenDataFood';
export * from './OpenDataFoodProperty';
export * from './OpenDataProperty';
export * from './OpenDataStore';
export * from './OpenDataStoreCategory';
export * from './OpenDataUnit';
export * from './OpenDataUnitTypeEnum';
export * from './OpenDataVersion';
export * from './PaginatedAutomationList';
export * from './PaginatedBookmarkletImportListList';
export * from './PaginatedCookLogList';
@@ -87,13 +75,6 @@ export * from './PatchedInviteLink';
export * from './PatchedKeyword';
export * from './PatchedMealPlan';
export * from './PatchedMealType';
export * from './PatchedOpenDataCategory';
export * from './PatchedOpenDataConversion';
export * from './PatchedOpenDataFood';
export * from './PatchedOpenDataProperty';
export * from './PatchedOpenDataStore';
export * from './PatchedOpenDataUnit';
export * from './PatchedOpenDataVersion';
export * from './PatchedProperty';
export * from './PatchedPropertyType';
export * from './PatchedRecipe';
@@ -140,6 +121,7 @@ export * from './SupermarketCategoryRelation';
export * from './Sync';
export * from './SyncLog';
export * from './ThemeEnum';
export * from './TypeEnum';
export * from './Unit';
export * from './UnitConversion';
export * from './User';