From 62f4e368a6cf175b1b72d8f9a61454d39998cfee Mon Sep 17 00:00:00 2001 From: Jonas Lochmann Date: Mon, 21 Sep 2020 02:00:00 +0200 Subject: [PATCH] Remove unused serialization functions --- src/action/addcategoryapps.ts | 8 +------- src/action/addcategorynetworkid.ts | 7 ------- src/action/addinstalledapps.ts | 7 +------ src/action/addusedtime.ts | 10 +--------- src/action/addusedtime2.ts | 11 ----------- src/action/adduser.ts | 11 +---------- src/action/basetypes.ts | 6 ++---- src/action/changeparentpassword.ts | 11 +---------- src/action/childchangepassword.ts | 7 +------ src/action/childsignin.ts | 6 +----- src/action/createcategory.ts | 9 +-------- src/action/createtimelimitrule.ts | 7 +------ src/action/deletecategory.ts | 7 +------ src/action/deletetimelimitrule.ts | 7 +------ src/action/forcesync.ts | 4 ---- src/action/ignoremanipulation.ts | 16 +--------------- src/action/incrementcategoryextratime.ts | 7 ------- src/action/removecategoryapps.ts | 8 +------- src/action/removeinstalledapps.ts | 7 +------ src/action/removeuser.ts | 8 +------- src/action/renamechild.ts | 8 +------- src/action/resetcategorynetworkids.ts | 5 ----- src/action/resetparentblockedtimes.ts | 7 +------ src/action/setcategoryextratime.ts | 7 ------- src/action/setcategoryforunassignedapps.ts | 8 +------- src/action/setchildpassword.ts | 8 +------- src/action/setconsiderrebootmanipulation.ts | 8 +------- src/action/setdevicedefaultuser.ts | 8 +------- src/action/setdevicedefaultusertimeout.ts | 8 +------- src/action/setdeviceuser.ts | 8 +------- src/action/setkeepsignedin.ts | 8 +------- src/action/setparentcategory.ts | 8 +------- src/action/setrelaxprimarydevice.ts | 8 +------- src/action/setsenddeviceconnected.ts | 8 +------- src/action/setuserdisablelimitsuntil.ts | 8 +------- src/action/setusertimezone.ts | 8 +------- src/action/signoutatdevice.ts | 6 +----- src/action/trieddisablingdeviceadmin.ts | 6 +----- src/action/updateappactivities.ts | 8 +------- src/action/updatecategorybatterylimit.ts | 7 ------- .../updatecategoryblockallnotifications.ts | 6 ------ src/action/updatecategoryblockedtimes.ts | 6 ------ src/action/updatecategorysorting.ts | 5 ----- src/action/updatecategorytemporarilyblocked.ts | 7 ------- src/action/updatecategorytimewarnings.ts | 9 +-------- src/action/updatecategorytitle.ts | 8 +------- src/action/updatedevicename.ts | 8 +------- src/action/updatedevicestatus.ts | 14 +------------- src/action/updateenableactivitylevelblocking.ts | 8 +------- src/action/updatenetworktimeverification.ts | 8 +------- src/action/updateparentblockedtimes.ts | 8 +------- src/action/updateparentnotificationflags.ts | 9 +-------- src/action/updatetimelimitrule.ts | 12 ------------ src/action/updateuserflags.ts | 7 ------- src/action/updateuserlimitlogincategory.ts | 6 ------ 55 files changed, 42 insertions(+), 393 deletions(-) diff --git a/src/action/addcategoryapps.ts b/src/action/addcategoryapps.ts index 6afc978..5c212b8 100644 --- a/src/action/addcategoryapps.ts +++ b/src/action/addcategoryapps.ts @@ -1,6 +1,6 @@ /* * server component for the TimeLimit App - * Copyright (C) 2019 Jonas Lochmann + * Copyright (C) 2019 - 2020 Jonas Lochmann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as @@ -33,12 +33,6 @@ export class AddCategoryAppsAction extends ParentAction { this.packageNames = packageNames } - serialize = (): SerializedAddCategoryAppsAction => ({ - type: 'ADD_CATEGORY_APPS', - categoryId: this.categoryId, - packageNames: this.packageNames - }) - static parse = ({ categoryId, packageNames }: SerializedAddCategoryAppsAction) => ( new AddCategoryAppsAction({ categoryId, packageNames }) ) diff --git a/src/action/addcategorynetworkid.ts b/src/action/addcategorynetworkid.ts index e885640..9d6c87e 100644 --- a/src/action/addcategorynetworkid.ts +++ b/src/action/addcategorynetworkid.ts @@ -42,13 +42,6 @@ export class AddCategoryNetworkIdAction extends ParentAction { this.hashedNetworkId = hashedNetworkId } - serialize = (): SerializedAddCategoryNetworkIdAction => ({ - type: 'ADD_CATEGORY_NETWORK_ID', - categoryId: this.categoryId, - itemId: this.itemId, - hashedNetworkId: this.hashedNetworkId - }) - static parse = ({ categoryId, itemId, hashedNetworkId }: SerializedAddCategoryNetworkIdAction) => ( new AddCategoryNetworkIdAction({ categoryId, diff --git a/src/action/addinstalledapps.ts b/src/action/addinstalledapps.ts index 43bab7a..48f731b 100644 --- a/src/action/addinstalledapps.ts +++ b/src/action/addinstalledapps.ts @@ -1,6 +1,6 @@ /* * server component for the TimeLimit App - * Copyright (C) 2019 Jonas Lochmann + * Copyright (C) 2019 - 2020 Jonas Lochmann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as @@ -30,11 +30,6 @@ export class AddInstalledAppsAction extends AppLogicAction { this.apps = apps } - serialize = (): SerializedAddInstalledAppsAction => ({ - type: 'ADD_INSTALLED_APPS', - apps: this.apps.map((app) => app.serialize()) - }) - static parse = ({ apps }: SerializedAddInstalledAppsAction) => ( new AddInstalledAppsAction({ apps: apps.map((app) => InstalledApp.parse(app)) diff --git a/src/action/addusedtime.ts b/src/action/addusedtime.ts index 442d10e..650db00 100644 --- a/src/action/addusedtime.ts +++ b/src/action/addusedtime.ts @@ -1,6 +1,6 @@ /* * server component for the TimeLimit App - * Copyright (C) 2019 Jonas Lochmann + * Copyright (C) 2019 - 2020 Jonas Lochmann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as @@ -52,14 +52,6 @@ export class AddUsedTimeAction extends AppLogicAction { this.extraTimeToSubtract = extraTimeToSubtract } - serialize = (): SerializedAddUsedTimeAction => ({ - type: 'ADD_USED_TIME', - categoryId: this.categoryId, - day: this.dayOfEpoch, - timeToAdd: this.timeToAdd, - extraTimeToSubtract: this.extraTimeToSubtract - }) - static parse = ({ categoryId, day, timeToAdd, extraTimeToSubtract }: SerializedAddUsedTimeAction) => ( new AddUsedTimeAction({ categoryId, diff --git a/src/action/addusedtime2.ts b/src/action/addusedtime2.ts index 7c6af09..f7a4387 100644 --- a/src/action/addusedtime2.ts +++ b/src/action/addusedtime2.ts @@ -91,17 +91,6 @@ export class AddUsedTimeActionVersion2 extends AppLogicAction { this.trustedTimestamp = trustedTimestamp } - serialize = (): SerializedAddUsedTimeActionVersion2 => ({ - type: 'ADD_USED_TIME_V2', - d: this.dayOfEpoch, - i: this.items.map((item) => ({ - categoryId: item.categoryId, - tta: item.timeToAdd, - etts: item.extraTimeToSubtract - })), - t: this.trustedTimestamp - }) - static parse = ({ d, i, t }: SerializedAddUsedTimeActionVersion2) => ( new AddUsedTimeActionVersion2({ dayOfEpoch: d, diff --git a/src/action/adduser.ts b/src/action/adduser.ts index b621be6..28deca6 100644 --- a/src/action/adduser.ts +++ b/src/action/adduser.ts @@ -1,6 +1,6 @@ /* * server component for the TimeLimit App - * Copyright (C) 2019 Jonas Lochmann + * Copyright (C) 2019 - 2020 Jonas Lochmann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as @@ -54,15 +54,6 @@ export class AddUserAction extends ParentAction { } } - serialize = (): SerializedAddUserAction => ({ - type: 'ADD_USER', - name: this.name, - userType: this.userType, - userId: this.userId, - password: this.password, - timeZone: this.timeZone - }) - static parse = ({ name, userId, userType, password, timeZone }: SerializedAddUserAction) => ( new AddUserAction({ name, diff --git a/src/action/basetypes.ts b/src/action/basetypes.ts index 4eebd62..32872ef 100644 --- a/src/action/basetypes.ts +++ b/src/action/basetypes.ts @@ -1,6 +1,6 @@ /* * server component for the TimeLimit App - * Copyright (C) 2019 Jonas Lochmann + * Copyright (C) 2019 - 2020 Jonas Lochmann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as @@ -15,9 +15,7 @@ * along with this program. If not, see . */ -export abstract class Action { - abstract serialize: () => object -} +export abstract class Action {} export abstract class AppLogicAction extends Action {} diff --git a/src/action/changeparentpassword.ts b/src/action/changeparentpassword.ts index 6c6ef35..4ef63ea 100644 --- a/src/action/changeparentpassword.ts +++ b/src/action/changeparentpassword.ts @@ -1,6 +1,6 @@ /* * server component for the TimeLimit App - * Copyright (C) 2019 Jonas Lochmann + * Copyright (C) 2019 - 2020 Jonas Lochmann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as @@ -62,15 +62,6 @@ export class ChangeParentPasswordAction extends ParentAction { this.integrity = integrity } - serialize = (): SerializedChangeParentPasswordAction => ({ - type: 'CHANGE_PARENT_PASSWORD', - userId: this.parentUserId, - hash: this.newPasswordFirstHash, - secondSalt: this.newPasswordSecondSalt, - secondHashEncrypted: this.newPasswordSecondHashEncrypted, - integrity: this.integrity - }) - static parse = ({ userId, hash, secondSalt, secondHashEncrypted, integrity }: SerializedChangeParentPasswordAction) => ( new ChangeParentPasswordAction({ parentUserId: userId, diff --git a/src/action/childchangepassword.ts b/src/action/childchangepassword.ts index a586666..e5156c7 100644 --- a/src/action/childchangepassword.ts +++ b/src/action/childchangepassword.ts @@ -1,6 +1,6 @@ /* * server component for the TimeLimit App - * Copyright (C) 2019 Jonas Lochmann + * Copyright (C) 2019 - 2020 Jonas Lochmann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as @@ -31,11 +31,6 @@ export class ChildChangePasswordAction extends ChildAction { this.password = password } - serialize = (): SerializedChildChangePasswordAction => ({ - type: 'CHILD_CHANGE_PASSWORD', - password: this.password - }) - static parse = ({ password }: SerializedChildChangePasswordAction) => ( new ChildChangePasswordAction({ password }) ) diff --git a/src/action/childsignin.ts b/src/action/childsignin.ts index 892474d..4b1538a 100644 --- a/src/action/childsignin.ts +++ b/src/action/childsignin.ts @@ -1,6 +1,6 @@ /* * server component for the TimeLimit App - * Copyright (C) 2019 Jonas Lochmann + * Copyright (C) 2019 - 2020 Jonas Lochmann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as @@ -22,10 +22,6 @@ export class ChildSignInAction extends ChildAction { super() } - serialize = (): SerializedChildSignInAction => ({ - type: 'CHILD_SIGN_IN' - }) - static parse = (action: SerializedChildSignInAction) => ( new ChildSignInAction() ) diff --git a/src/action/createcategory.ts b/src/action/createcategory.ts index 314e876..aa57e79 100644 --- a/src/action/createcategory.ts +++ b/src/action/createcategory.ts @@ -1,6 +1,6 @@ /* * server component for the TimeLimit App - * Copyright (C) 2019 Jonas Lochmann + * Copyright (C) 2019 - 2020 Jonas Lochmann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as @@ -34,13 +34,6 @@ export class CreateCategoryAction extends ParentAction { this.title = title } - serialize = (): SerializedCreateCategoryAction => ({ - type: 'CREATE_CATEGORY', - childId: this.childId, - categoryId: this.categoryId, - title: this.title - }) - static parse = ({ childId, categoryId, title }: SerializedCreateCategoryAction) => ( new CreateCategoryAction({ childId, categoryId, title }) ) diff --git a/src/action/createtimelimitrule.ts b/src/action/createtimelimitrule.ts index 50f2413..0a6514d 100644 --- a/src/action/createtimelimitrule.ts +++ b/src/action/createtimelimitrule.ts @@ -1,6 +1,6 @@ /* * server component for the TimeLimit App - * Copyright (C) 2019 Jonas Lochmann + * Copyright (C) 2019 - 2020 Jonas Lochmann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as @@ -27,11 +27,6 @@ export class CreateTimeLimitRuleAction extends ParentAction { this.rule = rule } - serialize = (): SerializedCreateTimelimtRuleAction => ({ - type: 'CREATE_TIMELIMIT_RULE', - rule: this.rule.serialize() - }) - static parse = ({ rule }: SerializedCreateTimelimtRuleAction) => ( new CreateTimeLimitRuleAction({ rule: TimelimitRule.parse(rule) diff --git a/src/action/deletecategory.ts b/src/action/deletecategory.ts index 5e16d10..32ac423 100644 --- a/src/action/deletecategory.ts +++ b/src/action/deletecategory.ts @@ -1,6 +1,6 @@ /* * server component for the TimeLimit App - * Copyright (C) 2019 Jonas Lochmann + * Copyright (C) 2019 - 2020 Jonas Lochmann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as @@ -29,11 +29,6 @@ export class DeleteCategoryAction extends ParentAction { this.categoryId = categoryId } - serialize = (): SerializedDeleteCategoryAction => ({ - type: 'DELETE_CATEGORY', - categoryId: this.categoryId - }) - static parse = ({ categoryId }: SerializedDeleteCategoryAction) => ( new DeleteCategoryAction({ categoryId }) ) diff --git a/src/action/deletetimelimitrule.ts b/src/action/deletetimelimitrule.ts index 78e0272..8bb03c3 100644 --- a/src/action/deletetimelimitrule.ts +++ b/src/action/deletetimelimitrule.ts @@ -1,6 +1,6 @@ /* * server component for the TimeLimit App - * Copyright (C) 2019 Jonas Lochmann + * Copyright (C) 2019 - 2020 Jonas Lochmann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as @@ -29,11 +29,6 @@ export class DeleteTimeLimitRuleAction extends ParentAction { this.ruleId = ruleId } - serialize = (): SerializedDeleteTimeLimitRuleAction => ({ - type: 'DELETE_TIMELIMIT_RULE', - ruleId: this.ruleId - }) - static parse = ({ ruleId }: SerializedDeleteTimeLimitRuleAction) => ( new DeleteTimeLimitRuleAction({ ruleId }) ) diff --git a/src/action/forcesync.ts b/src/action/forcesync.ts index d44b5b7..f0bd48e 100644 --- a/src/action/forcesync.ts +++ b/src/action/forcesync.ts @@ -24,10 +24,6 @@ export class ForceSyncAction extends AppLogicAction { super() } - serialize = (): SerializedForceSyncAction => ({ - type: 'FORCE_SYNC' - }) - static parse = (_: SerializedForceSyncAction) => ForceSyncAction.instance } diff --git a/src/action/ignoremanipulation.ts b/src/action/ignoremanipulation.ts index 0db329a..bd84330 100644 --- a/src/action/ignoremanipulation.ts +++ b/src/action/ignoremanipulation.ts @@ -1,6 +1,6 @@ /* * server component for the TimeLimit App - * Copyright (C) 2019 Jonas Lochmann + * Copyright (C) 2019 - 2020 Jonas Lochmann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as @@ -73,20 +73,6 @@ export class IgnoreManipulationAction extends ParentAction { this.ignoreHadManipulationFlags = ignoreHadManipulationFlags } - serialize = (): SerializedIgnoreManipulationAction => ({ - type: 'IGNORE_MANIPULATION', - deviceId: this.deviceId, - admin: this.ignoreDeviceAdminManipulation, - adminA: this.ignoreDeviceAdminManipulationAttempt, - downgrade: this.ignoreAppDowngrade, - notification: this.ignoreNotificationAccessManipulation, - overlay: this.ignoreOverlayPermissionManipulation, - accessibilityService: this.ignoreAccessibilityServiceManipulation, - usageStats: this.ignoreUsageStatsAccessManipulation, - hadManipulation: this.ignoreHadManipulation, - ignoreHadManipulationFlags: this.ignoreHadManipulationFlags - }) - static parse = ({ deviceId, admin, adminA, downgrade, notification, usageStats, overlay, accessibilityService, reboot, hadManipulation, ignoreHadManipulationFlags }: SerializedIgnoreManipulationAction) => ( new IgnoreManipulationAction({ deviceId, diff --git a/src/action/incrementcategoryextratime.ts b/src/action/incrementcategoryextratime.ts index 0e2e0db..91ade10 100644 --- a/src/action/incrementcategoryextratime.ts +++ b/src/action/incrementcategoryextratime.ts @@ -41,13 +41,6 @@ export class IncrementCategoryExtraTimeAction extends ParentAction { this.day = day } - serialize = (): SerializedIncrementCategoryExtraTimeAction => ({ - type: 'INCREMENT_CATEGORY_EXTRATIME', - categoryId: this.categoryId, - addedExtraTime: this.addedExtraTime, - day: this.day - }) - static parse = ({ categoryId, addedExtraTime, day }: SerializedIncrementCategoryExtraTimeAction) => ( new IncrementCategoryExtraTimeAction({ categoryId, addedExtraTime, day: day ?? -1 }) ) diff --git a/src/action/removecategoryapps.ts b/src/action/removecategoryapps.ts index 9dae5ec..ea6e2a5 100644 --- a/src/action/removecategoryapps.ts +++ b/src/action/removecategoryapps.ts @@ -1,6 +1,6 @@ /* * server component for the TimeLimit App - * Copyright (C) 2019 Jonas Lochmann + * Copyright (C) 2019 - 2020 Jonas Lochmann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as @@ -33,12 +33,6 @@ export class RemoveCategoryAppsAction extends ParentAction { this.packageNames = packageNames } - serialize = (): SerializedRemoveCategoryAppsAction => ({ - type: 'REMOVE_CATEGORY_APPS', - categoryId: this.categoryId, - packageNames: this.packageNames - }) - static parse = ({ categoryId, packageNames }: SerializedRemoveCategoryAppsAction) => ( new RemoveCategoryAppsAction({ categoryId, packageNames }) ) diff --git a/src/action/removeinstalledapps.ts b/src/action/removeinstalledapps.ts index 8b8dabc..84c924e 100644 --- a/src/action/removeinstalledapps.ts +++ b/src/action/removeinstalledapps.ts @@ -1,6 +1,6 @@ /* * server component for the TimeLimit App - * Copyright (C) 2019 Jonas Lochmann + * Copyright (C) 2019 - 2020 Jonas Lochmann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as @@ -29,11 +29,6 @@ export class RemoveInstalledAppsAction extends AppLogicAction { this.packageNames = packageNames } - serialize = (): SerializedRemoveInstalledAppsAction => ({ - type: 'REMOVE_INSTALLED_APPS', - packageNames: this.packageNames - }) - static parse = ({ packageNames }: SerializedRemoveInstalledAppsAction) => ( new RemoveInstalledAppsAction({ packageNames }) ) diff --git a/src/action/removeuser.ts b/src/action/removeuser.ts index c251d15..b64871d 100644 --- a/src/action/removeuser.ts +++ b/src/action/removeuser.ts @@ -1,6 +1,6 @@ /* * server component for the TimeLimit App - * Copyright (C) 2019 Jonas Lochmann + * Copyright (C) 2019 - 2020 Jonas Lochmann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as @@ -37,12 +37,6 @@ export class RemoveUserAction extends ParentAction { this.authentication = authentication } - serialize = (): SerializedRemoveUserAction => ({ - type: 'REMOVE_USER', - userId: this.userId, - authentication: this.authentication - }) - static parse = ({ userId, authentication }: SerializedRemoveUserAction) => ( new RemoveUserAction({ userId, authentication }) ) diff --git a/src/action/renamechild.ts b/src/action/renamechild.ts index 925c58f..88ec04b 100644 --- a/src/action/renamechild.ts +++ b/src/action/renamechild.ts @@ -1,6 +1,6 @@ /* * server component for the TimeLimit App - * Copyright (C) 2019 Jonas Lochmann + * Copyright (C) 2019 - 2020 Jonas Lochmann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as @@ -38,12 +38,6 @@ export class RenameChildAction extends ParentAction { this.newName = newName } - serialize = (): SerializedRenameChildAction => ({ - type: 'RENAME_CHILD', - childId: this.childId, - newName: this.newName - }) - static parse = ({ childId, newName }: SerializedRenameChildAction) => ( new RenameChildAction({ childId, newName }) ) diff --git a/src/action/resetcategorynetworkids.ts b/src/action/resetcategorynetworkids.ts index 707aef8..6c88c2d 100644 --- a/src/action/resetcategorynetworkids.ts +++ b/src/action/resetcategorynetworkids.ts @@ -31,11 +31,6 @@ export class ResetCategoryNetworkIdsAction extends ParentAction { this.categoryId = categoryId } - serialize = (): SerializeResetCategoryNetworkIdsAction => ({ - type: 'RESET_CATEGORY_NETWORK_IDS', - categoryId: this.categoryId - }) - static parse = ({ categoryId }: SerializeResetCategoryNetworkIdsAction) => ( new ResetCategoryNetworkIdsAction({ categoryId diff --git a/src/action/resetparentblockedtimes.ts b/src/action/resetparentblockedtimes.ts index 97de7e5..754975f 100644 --- a/src/action/resetparentblockedtimes.ts +++ b/src/action/resetparentblockedtimes.ts @@ -1,6 +1,6 @@ /* * server component for the TimeLimit App - * Copyright (C) 2019 Jonas Lochmann + * Copyright (C) 2019 - 2020 Jonas Lochmann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as @@ -31,11 +31,6 @@ export class ResetParentBlockedTimesAction extends ParentAction { this.parentId = parentId } - serialize = (): SerializedResetParentBlockedTimesAction => ({ - type: 'RESET_PARENT_BLOCKED_TIMES', - parentId: this.parentId - }) - static parse = ({ parentId }: SerializedResetParentBlockedTimesAction) => ( new ResetParentBlockedTimesAction({ parentId diff --git a/src/action/setcategoryextratime.ts b/src/action/setcategoryextratime.ts index f91f4a7..b3f9ba9 100644 --- a/src/action/setcategoryextratime.ts +++ b/src/action/setcategoryextratime.ts @@ -41,13 +41,6 @@ export class SetCategoryExtraTimeAction extends ParentAction { this.day = day } - serialize = (): SerializedSetCategoryExtraTimeAction => ({ - type: 'SET_CATEGORY_EXTRA_TIME', - categoryId: this.categoryId, - newExtraTime: this.newExtraTime, - day: this.day - }) - static parse = ({ categoryId, newExtraTime, day }: SerializedSetCategoryExtraTimeAction) => ( new SetCategoryExtraTimeAction({ categoryId, newExtraTime, day: day ?? -1 }) ) diff --git a/src/action/setcategoryforunassignedapps.ts b/src/action/setcategoryforunassignedapps.ts index 1ea4e28..81623cd 100644 --- a/src/action/setcategoryforunassignedapps.ts +++ b/src/action/setcategoryforunassignedapps.ts @@ -1,6 +1,6 @@ /* * server component for the TimeLimit App - * Copyright (C) 2019 Jonas Lochmann + * Copyright (C) 2019 - 2020 Jonas Lochmann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as @@ -38,12 +38,6 @@ export class SetCategoryForUnassignedAppsAction extends ParentAction { this.categoryId = categoryId } - serialize = (): SerializedSetCategoryForUnassignedAppsAction => ({ - type: 'SET_CATEGORY_FOR_UNASSIGNED_APPS', - childId: this.childId, - categoryId: this.categoryId - }) - static parse = ({ childId, categoryId }: SerializedSetCategoryForUnassignedAppsAction) => ( new SetCategoryForUnassignedAppsAction({ childId, categoryId }) ) diff --git a/src/action/setchildpassword.ts b/src/action/setchildpassword.ts index 7c6ec46..4196e2f 100644 --- a/src/action/setchildpassword.ts +++ b/src/action/setchildpassword.ts @@ -1,6 +1,6 @@ /* * server component for the TimeLimit App - * Copyright (C) 2019 Jonas Lochmann + * Copyright (C) 2019 - 2020 Jonas Lochmann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as @@ -36,12 +36,6 @@ export class SetChildPasswordAction extends ParentAction { this.newPassword = newPassword } - serialize = (): SerializedSetChildPasswordAction => ({ - type: 'SET_CHILD_PASSWORD', - childId: this.childUserId, - newPassword: this.newPassword - }) - static parse = ({ childId, newPassword }: SerializedSetChildPasswordAction) => ( new SetChildPasswordAction({ childUserId: childId, diff --git a/src/action/setconsiderrebootmanipulation.ts b/src/action/setconsiderrebootmanipulation.ts index 94e3afa..df3480b 100644 --- a/src/action/setconsiderrebootmanipulation.ts +++ b/src/action/setconsiderrebootmanipulation.ts @@ -1,6 +1,6 @@ /* * server component for the TimeLimit App - * Copyright (C) 2019 Jonas Lochmann + * Copyright (C) 2019 - 2020 Jonas Lochmann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as @@ -31,12 +31,6 @@ export class SetConsiderRebootManipulationAction extends ParentAction { this.enable = enable } - serialize = (): SerializedSetConsiderRebootManipulationAction => ({ - type: 'SET_CONSIDER_REBOOT_MANIPULATION', - deviceId: this.deviceId, - enable: this.enable - }) - static parse = ({ deviceId, enable }: SerializedSetConsiderRebootManipulationAction) => ( new SetConsiderRebootManipulationAction({ deviceId, enable }) ) diff --git a/src/action/setdevicedefaultuser.ts b/src/action/setdevicedefaultuser.ts index baa4fc0..333e214 100644 --- a/src/action/setdevicedefaultuser.ts +++ b/src/action/setdevicedefaultuser.ts @@ -1,6 +1,6 @@ /* * server component for the TimeLimit App - * Copyright (C) 2019 Jonas Lochmann + * Copyright (C) 2019 - 2020 Jonas Lochmann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as @@ -38,12 +38,6 @@ export class SetDeviceDefaultUserAction extends ParentAction { this.defaultUserId = defaultUserId } - serialize = (): SerializedSetDeviceDefaultUserAction => ({ - type: 'SET_DEVICE_DEFAULT_USER', - deviceId: this.deviceId, - defaultUserId: this.defaultUserId - }) - static parse = ({ deviceId, defaultUserId }: SerializedSetDeviceDefaultUserAction) => ( new SetDeviceDefaultUserAction({ deviceId, defaultUserId }) ) diff --git a/src/action/setdevicedefaultusertimeout.ts b/src/action/setdevicedefaultusertimeout.ts index cd8dd1e..fbb043f 100644 --- a/src/action/setdevicedefaultusertimeout.ts +++ b/src/action/setdevicedefaultusertimeout.ts @@ -1,6 +1,6 @@ /* * server component for the TimeLimit App - * Copyright (C) 2019 Jonas Lochmann + * Copyright (C) 2019 - 2020 Jonas Lochmann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as @@ -38,12 +38,6 @@ export class SetDeviceDefaultUserTimeoutAction extends ParentAction { this.timeout = timeout } - serialize = (): SerializedSetDeviceDefaultUserTimeoutAction => ({ - type: 'SET_DEVICE_DEFAULT_USER_TIMEOUT', - deviceId: this.deviceId, - timeout: this.timeout - }) - static parse = ({ deviceId, timeout }: SerializedSetDeviceDefaultUserTimeoutAction) => ( new SetDeviceDefaultUserTimeoutAction({ deviceId, timeout }) ) diff --git a/src/action/setdeviceuser.ts b/src/action/setdeviceuser.ts index cd9c886..1a34c0f 100644 --- a/src/action/setdeviceuser.ts +++ b/src/action/setdeviceuser.ts @@ -1,6 +1,6 @@ /* * server component for the TimeLimit App - * Copyright (C) 2019 Jonas Lochmann + * Copyright (C) 2019 - 2020 Jonas Lochmann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as @@ -38,12 +38,6 @@ export class SetDeviceUserAction extends ParentAction { this.userId = userId } - serialize = (): SerializedSetDeviceUserAction => ({ - type: 'SET_DEVICE_USER', - deviceId: this.deviceId, - userId: this.userId - }) - static parse = ({ deviceId, userId }: SerializedSetDeviceUserAction) => ( new SetDeviceUserAction({ deviceId, userId }) ) diff --git a/src/action/setkeepsignedin.ts b/src/action/setkeepsignedin.ts index 8a1067c..bf433ad 100644 --- a/src/action/setkeepsignedin.ts +++ b/src/action/setkeepsignedin.ts @@ -1,6 +1,6 @@ /* * server component for the TimeLimit App - * Copyright (C) 2019 Jonas Lochmann + * Copyright (C) 2019 - 2020 Jonas Lochmann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as @@ -34,12 +34,6 @@ export class SetKeepSignedInAction extends ParentAction { this.keepSignedIn = keepSignedIn } - serialize = (): SerializedSetKeepSignedInAction => ({ - type: 'SET_KEEP_SIGNED_IN', - deviceId: this.deviceId, - keepSignedIn: this.keepSignedIn - }) - static parse = ({ deviceId, keepSignedIn }: SerializedSetKeepSignedInAction) => ( new SetKeepSignedInAction({ deviceId, diff --git a/src/action/setparentcategory.ts b/src/action/setparentcategory.ts index ae7db9c..52ad0dc 100644 --- a/src/action/setparentcategory.ts +++ b/src/action/setparentcategory.ts @@ -1,6 +1,6 @@ /* * server component for the TimeLimit App - * Copyright (C) 2019 Jonas Lochmann + * Copyright (C) 2019 - 2020 Jonas Lochmann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as @@ -38,12 +38,6 @@ export class SetParentCategoryAction extends ParentAction { this.parentCategory = parentCategory } - serialize = (): SerializedSetParentCategoryAction => ({ - type: 'SET_PARENT_CATEGORY', - categoryId: this.categoryId, - parentCategory: this.parentCategory - }) - static parse = ({ categoryId, parentCategory }: SerializedSetParentCategoryAction) => ( new SetParentCategoryAction({ categoryId, diff --git a/src/action/setrelaxprimarydevice.ts b/src/action/setrelaxprimarydevice.ts index 8892220..72f2a27 100644 --- a/src/action/setrelaxprimarydevice.ts +++ b/src/action/setrelaxprimarydevice.ts @@ -1,6 +1,6 @@ /* * server component for the TimeLimit App - * Copyright (C) 2019 Jonas Lochmann + * Copyright (C) 2019 - 2020 Jonas Lochmann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as @@ -34,12 +34,6 @@ export class SetRelaxPrimaryDeviceAction extends ParentAction { this.relax = relax } - serialize = (): SerializedSetRelaxPrimaryDeviceAction => ({ - type: 'SET_RELAX_PRIMARY_DEVICE', - userId: this.userId, - relax: this.relax - }) - static parse = ({ userId, relax }: SerializedSetRelaxPrimaryDeviceAction) => ( new SetRelaxPrimaryDeviceAction({ userId, relax }) ) diff --git a/src/action/setsenddeviceconnected.ts b/src/action/setsenddeviceconnected.ts index 613dbe3..c8dffa7 100644 --- a/src/action/setsenddeviceconnected.ts +++ b/src/action/setsenddeviceconnected.ts @@ -1,6 +1,6 @@ /* * server component for the TimeLimit App - * Copyright (C) 2019 Jonas Lochmann + * Copyright (C) 2019 - 2020 Jonas Lochmann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as @@ -34,12 +34,6 @@ export class SetSendDeviceConnected extends ParentAction { this.enable = enable } - serialize = (): SerializedSetSendDeviceConnected => ({ - type: 'SET_SEND_DEVICE_CONNECTED', - deviceId: this.deviceId, - enable: this.enable - }) - static parse = ({ deviceId, enable }: SerializedSetSendDeviceConnected) => ( new SetSendDeviceConnected({ deviceId, diff --git a/src/action/setuserdisablelimitsuntil.ts b/src/action/setuserdisablelimitsuntil.ts index 5de820f..cd09035 100644 --- a/src/action/setuserdisablelimitsuntil.ts +++ b/src/action/setuserdisablelimitsuntil.ts @@ -1,6 +1,6 @@ /* * server component for the TimeLimit App - * Copyright (C) 2019 Jonas Lochmann + * Copyright (C) 2019 - 2020 Jonas Lochmann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as @@ -38,12 +38,6 @@ export class SetUserDisableLimitsUntilAction extends ParentAction { this.timestamp = timestamp } - serialize = (): SerializedSetUserDisableLimitsUntilAction => ({ - type: 'SET_USER_DISABLE_LIMITS_UNTIL', - childId: this.childId, - time: this.timestamp - }) - static parse = ({ childId, time }: SerializedSetUserDisableLimitsUntilAction) => ( new SetUserDisableLimitsUntilAction({ childId, diff --git a/src/action/setusertimezone.ts b/src/action/setusertimezone.ts index 22a1e12..33690e5 100644 --- a/src/action/setusertimezone.ts +++ b/src/action/setusertimezone.ts @@ -1,6 +1,6 @@ /* * server component for the TimeLimit App - * Copyright (C) 2019 Jonas Lochmann + * Copyright (C) 2019 - 2020 Jonas Lochmann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as @@ -34,12 +34,6 @@ export class SetUserTimezoneAction extends ParentAction { this.timezone = timezone } - serialize = (): SerializedSetUserTimezoneAction => ({ - type: 'SET_USER_TIMEZONE', - userId: this.userId, - timezone: this.timezone - }) - static parse = ({ userId, timezone }: SerializedSetUserTimezoneAction) => ( new SetUserTimezoneAction({ userId, timezone }) ) diff --git a/src/action/signoutatdevice.ts b/src/action/signoutatdevice.ts index b8453a8..05b0820 100644 --- a/src/action/signoutatdevice.ts +++ b/src/action/signoutatdevice.ts @@ -1,6 +1,6 @@ /* * server component for the TimeLimit App - * Copyright (C) 2019 Jonas Lochmann + * Copyright (C) 2019 - 2020 Jonas Lochmann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as @@ -24,10 +24,6 @@ export class SignOutAtDeviceAction extends AppLogicAction { super() } - serialize = (): SerializedSignOutAtDeviceAction => ({ - type: 'SIGN_OUT_AT_DEVICE' - }) - static parse = (action: SerializedSignOutAtDeviceAction) => SignOutAtDeviceAction.instance } diff --git a/src/action/trieddisablingdeviceadmin.ts b/src/action/trieddisablingdeviceadmin.ts index a9469fb..58044c6 100644 --- a/src/action/trieddisablingdeviceadmin.ts +++ b/src/action/trieddisablingdeviceadmin.ts @@ -1,6 +1,6 @@ /* * server component for the TimeLimit App - * Copyright (C) 2019 Jonas Lochmann + * Copyright (C) 2019 - 2020 Jonas Lochmann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as @@ -21,10 +21,6 @@ export class TriedDisablingDeviceAdminAction extends AppLogicAction { constructor () { super() } - - serialize = (): SerialiezdTriedDisablingDeviceAdminAction => ({ - type: 'TRIED_DISABLING_DEVICE_ADMIN' - }) } export interface SerialiezdTriedDisablingDeviceAdminAction { diff --git a/src/action/updateappactivities.ts b/src/action/updateappactivities.ts index 496ba0b..8c761a2 100644 --- a/src/action/updateappactivities.ts +++ b/src/action/updateappactivities.ts @@ -1,6 +1,6 @@ /* * server component for the TimeLimit App - * Copyright (C) 2019 Jonas Lochmann + * Copyright (C) 2019 - 2020 Jonas Lochmann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as @@ -40,12 +40,6 @@ export class UpdateAppActivitiesAction extends AppLogicAction { this.updatedOrAdded = updatedOrAdded } - serialize = (): SerializedUpdateAppActivitiesAction => ({ - type: 'UPDATE_APP_ACTIVITIES', - removed: this.removed.map((item) => item.serialize()), - updatedOrAdded: this.updatedOrAdded.map((item) => item.serialize()) - }) - static parse = ({ removed, updatedOrAdded }: SerializedUpdateAppActivitiesAction) => ( new UpdateAppActivitiesAction({ removed: removed.map((item) => RemovedAppActivityItem.parse(item)), diff --git a/src/action/updatecategorybatterylimit.ts b/src/action/updatecategorybatterylimit.ts index 71cf9f2..a4362ec 100644 --- a/src/action/updatecategorybatterylimit.ts +++ b/src/action/updatecategorybatterylimit.ts @@ -49,13 +49,6 @@ export class UpdateCategoryBatteryLimitAction extends ParentAction { this.mobileLimit = mobileLimit } - serialize = (): SerializedUpdateCategoryBatteryLimitAction => ({ - type: 'UPDATE_CATEGORY_BATTERY_LIMIT', - categoryId: this.categoryId, - mobileLimit: this.mobileLimit, - chargeLimit: this.chargeLimit - }) - static parse = ({ categoryId, chargeLimit, mobileLimit }: SerializedUpdateCategoryBatteryLimitAction) => ( new UpdateCategoryBatteryLimitAction({ categoryId, chargeLimit, mobileLimit }) ) diff --git a/src/action/updatecategoryblockallnotifications.ts b/src/action/updatecategoryblockallnotifications.ts index 3cbb558..eec3a0a 100644 --- a/src/action/updatecategoryblockallnotifications.ts +++ b/src/action/updatecategoryblockallnotifications.ts @@ -31,12 +31,6 @@ export class UpdateCategoryBlockAllNotificationsAction extends ParentAction { this.blocked = blocked } - serialize = (): SerializedUpdateCategoryBlockAllNotificationsAction => ({ - type: 'UPDATE_CATEGORY_BLOCK_ALL_NOTIFICATIONS', - categoryId: this.categoryId, - blocked: this.blocked - }) - static parse = ({ categoryId, blocked }: SerializedUpdateCategoryBlockAllNotificationsAction) => ( new UpdateCategoryBlockAllNotificationsAction({ categoryId, blocked }) ) diff --git a/src/action/updatecategoryblockedtimes.ts b/src/action/updatecategoryblockedtimes.ts index bd351e5..8c79144 100644 --- a/src/action/updatecategoryblockedtimes.ts +++ b/src/action/updatecategoryblockedtimes.ts @@ -38,12 +38,6 @@ export class UpdateCategoryBlockedTimesAction extends ParentAction { this.blockedTimes = blockedTimes } - serialize = (): SerializedUpdateCategoryBlockedTimesAction => ({ - type: 'UPDATE_CATEGORY_BLOCKED_TIMES', - categoryId: this.categoryId, - times: this.blockedTimes - }) - static parse = ({ categoryId, times }: SerializedUpdateCategoryBlockedTimesAction) => ( new UpdateCategoryBlockedTimesAction({ categoryId, diff --git a/src/action/updatecategorysorting.ts b/src/action/updatecategorysorting.ts index 3b58b48..1605ae8 100644 --- a/src/action/updatecategorysorting.ts +++ b/src/action/updatecategorysorting.ts @@ -40,11 +40,6 @@ export class UpdateCategorySortingAction extends ParentAction { this.categoryIds = categoryIds } - serialize = (): SerializedUpdateCategorySortingAction => ({ - type: 'UPDATE_CATEGORY_SORTING', - categoryIds: this.categoryIds - }) - static parse = ({ categoryIds }: SerializedUpdateCategorySortingAction) => ( new UpdateCategorySortingAction({ categoryIds }) ) diff --git a/src/action/updatecategorytemporarilyblocked.ts b/src/action/updatecategorytemporarilyblocked.ts index ae04692..4bd1a53 100644 --- a/src/action/updatecategorytemporarilyblocked.ts +++ b/src/action/updatecategorytemporarilyblocked.ts @@ -47,13 +47,6 @@ export class UpdateCategoryTemporarilyBlockedAction extends ParentAction { this.endTime = endTime } - serialize = (): SerializedUpdateCategoryTemporarilyBlockedAction => ({ - type: 'UPDATE_CATEGORY_TEMPORARILY_BLOCKED', - categoryId: this.categoryId, - blocked: this.blocked, - endTime: this.endTime - }) - static parse = ({ categoryId, blocked, endTime }: SerializedUpdateCategoryTemporarilyBlockedAction) => ( new UpdateCategoryTemporarilyBlockedAction({ categoryId, blocked, endTime }) ) diff --git a/src/action/updatecategorytimewarnings.ts b/src/action/updatecategorytimewarnings.ts index b2e887b..5b4171d 100644 --- a/src/action/updatecategorytimewarnings.ts +++ b/src/action/updatecategorytimewarnings.ts @@ -1,6 +1,6 @@ /* * server component for the TimeLimit App - * Copyright (C) 2019 Jonas Lochmann + * Copyright (C) 2019 - 2020 Jonas Lochmann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as @@ -42,13 +42,6 @@ export class UpdateCategoryTimeWarningsAction extends ParentAction { this.flags = flags } - serialize = (): SerializedUpdateCategoryTimeWarningsAction => ({ - type: 'UPDATE_CATEGORY_TIME_WARNINGS', - categoryId: this.categoryId, - enable: this.enable, - flags: this.flags - }) - static parse = ({ categoryId, enable, flags }: SerializedUpdateCategoryTimeWarningsAction) => ( new UpdateCategoryTimeWarningsAction({ categoryId, enable, flags }) ) diff --git a/src/action/updatecategorytitle.ts b/src/action/updatecategorytitle.ts index 3647fb9..3c46454 100644 --- a/src/action/updatecategorytitle.ts +++ b/src/action/updatecategorytitle.ts @@ -1,6 +1,6 @@ /* * server component for the TimeLimit App - * Copyright (C) 2019 Jonas Lochmann + * Copyright (C) 2019 - 2020 Jonas Lochmann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as @@ -31,12 +31,6 @@ export class UpdateCategoryTitleAction extends ParentAction { this.newTitle = newTitle } - serialize = (): SerializedUpdateCategoryTitleAction => ({ - type: 'UPDATE_CATEGORY_TITLE', - categoryId: this.categoryId, - newTitle: this.newTitle - }) - static parse = ({ categoryId, newTitle }: SerializedUpdateCategoryTitleAction) => ( new UpdateCategoryTitleAction({ categoryId, newTitle }) ) diff --git a/src/action/updatedevicename.ts b/src/action/updatedevicename.ts index a0f2805..d097714 100644 --- a/src/action/updatedevicename.ts +++ b/src/action/updatedevicename.ts @@ -1,6 +1,6 @@ /* * server component for the TimeLimit App - * Copyright (C) 2019 Jonas Lochmann + * Copyright (C) 2019 - 2020 Jonas Lochmann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as @@ -38,12 +38,6 @@ export class UpdateDeviceNameAction extends ParentAction { } } - serialize = (): SerializedUpdateDeviceNameAction => ({ - type: 'UPDATE_DEVICE_NAME', - deviceId: this.deviceId, - name: this.name - }) - static parse = ({ deviceId, name }: SerializedUpdateDeviceNameAction) => ( new UpdateDeviceNameAction({ deviceId, name }) ) diff --git a/src/action/updatedevicestatus.ts b/src/action/updatedevicestatus.ts index 24abafb..a5d9a77 100644 --- a/src/action/updatedevicestatus.ts +++ b/src/action/updatedevicestatus.ts @@ -1,6 +1,6 @@ /* * server component for the TimeLimit App - * Copyright (C) 2019 Jonas Lochmann + * Copyright (C) 2019 - 2020 Jonas Lochmann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as @@ -67,18 +67,6 @@ export class UpdateDeviceStatusAction extends AppLogicAction { this.isQOrLaterNow = isQOrLaterNow } - serialize = (): SerializedUpdateDeviceStatusAction => ({ - type: 'UPDATE_DEVICE_STATUS', - protectionLevel: this.newProtetionLevel, - usageStats: this.newUsageStatsPermissionStatus, - notificationAccess: this.newNotificationAccessPermission, - overlayPermission: this.newOverlayPermission, - accessibilityServiceEnabled: this.newAccessibilityServiceEnabled, - appVersion: this.newAppVersion, - didReboot: this.didReboot, - isQOrLaterNow: this.isQOrLaterNow - }) - static parse = ({ protectionLevel, usageStats, notificationAccess, overlayPermission, accessibilityServiceEnabled, appVersion, didReboot, isQOrLaterNow }: SerializedUpdateDeviceStatusAction) => ( new UpdateDeviceStatusAction({ newProtetionLevel: protectionLevel, diff --git a/src/action/updateenableactivitylevelblocking.ts b/src/action/updateenableactivitylevelblocking.ts index 3879499..93f4626 100644 --- a/src/action/updateenableactivitylevelblocking.ts +++ b/src/action/updateenableactivitylevelblocking.ts @@ -1,6 +1,6 @@ /* * server component for the TimeLimit App - * Copyright (C) 2019 Jonas Lochmann + * Copyright (C) 2019 - 2020 Jonas Lochmann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as @@ -31,12 +31,6 @@ export class UpdateEnableActivityLevelBlockingAction extends ParentAction { this.enable = enable } - serialize = (): SerializedUpdateEnableActivityLevelBlockingAction => ({ - type: 'UPDATE_ENABLE_ACTIVITY_LEVEL_BLOCKING', - deviceId: this.deviceId, - enable: this.enable - }) - static parse = ({ deviceId, enable }: SerializedUpdateEnableActivityLevelBlockingAction) => ( new UpdateEnableActivityLevelBlockingAction({ deviceId, enable }) ) diff --git a/src/action/updatenetworktimeverification.ts b/src/action/updatenetworktimeverification.ts index 17963ec..c50808e 100644 --- a/src/action/updatenetworktimeverification.ts +++ b/src/action/updatenetworktimeverification.ts @@ -1,6 +1,6 @@ /* * server component for the TimeLimit App - * Copyright (C) 2019 Jonas Lochmann + * Copyright (C) 2019 - 2020 Jonas Lochmann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as @@ -34,12 +34,6 @@ export class UpdateNetworkTimeVerificationAction extends ParentAction { this.mode = mode } - serialize = (): SerialiizedUpdateNetworkTimeVerificationAction => ({ - type: 'UPDATE_NETWORK_TIME_VERIFICATION', - deviceId: this.deviceId, - mode: this.mode - }) - static parse = ({ deviceId, mode }: SerialiizedUpdateNetworkTimeVerificationAction) => ( new UpdateNetworkTimeVerificationAction({ deviceId, diff --git a/src/action/updateparentblockedtimes.ts b/src/action/updateparentblockedtimes.ts index e251724..4a346cb 100644 --- a/src/action/updateparentblockedtimes.ts +++ b/src/action/updateparentblockedtimes.ts @@ -1,6 +1,6 @@ /* * server component for the TimeLimit App - * Copyright (C) 2019 Jonas Lochmann + * Copyright (C) 2019 - 2020 Jonas Lochmann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as @@ -53,12 +53,6 @@ export class UpdateParentBlockedTimesAction extends ParentAction { this.blockedTimes = blockedTimes } - serialize = (): SerializedUpdateParentBlockedTimesAction => ({ - type: 'UPDATE_PARENT_BLOCKED_TIMES', - parentId: this.parentId, - times: this.blockedTimes - }) - static parse = ({ parentId, times }: SerializedUpdateParentBlockedTimesAction) => ( new UpdateParentBlockedTimesAction({ parentId, diff --git a/src/action/updateparentnotificationflags.ts b/src/action/updateparentnotificationflags.ts index 60ee9af..8289d3d 100644 --- a/src/action/updateparentnotificationflags.ts +++ b/src/action/updateparentnotificationflags.ts @@ -1,6 +1,6 @@ /* * server component for the TimeLimit App - * Copyright (C) 2019 Jonas Lochmann + * Copyright (C) 2019 - 2020 Jonas Lochmann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as @@ -45,13 +45,6 @@ export class UpdateParentNotificationFlagsAction extends ParentAction { this.set = set } - serialize = (): SerializedUpdateParentNotificationFlagsAction => ({ - type: 'UPDATE_PARENT_NOTIFICATION_FLAGS', - parentId: this.parentId, - flags: this.flags, - set: this.set - }) - static parse = ({ parentId, flags, set }: SerializedUpdateParentNotificationFlagsAction) => ( new UpdateParentNotificationFlagsAction({ parentId, flags, set }) ) diff --git a/src/action/updatetimelimitrule.ts b/src/action/updatetimelimitrule.ts index 6114317..1ebbff9 100644 --- a/src/action/updatetimelimitrule.ts +++ b/src/action/updatetimelimitrule.ts @@ -85,18 +85,6 @@ export class UpdateTimelimitRuleAction extends ParentAction { } } - serialize = (): SerializedUpdateTimelimitRuleAction => ({ - type: 'UPDATE_TIMELIMIT_RULE', - ruleId: this.ruleId, - time: this.maximumTimeInMillis, - days: this.dayMask, - extraTime: this.applyToExtraTimeUsage, - start: this.start, - end: this.end, - pause: this.sessionPauseMilliseconds, - dur: this.sessionDurationMilliseconds - }) - static parse = ({ ruleId, time, days, extraTime, start, end, dur, pause }: SerializedUpdateTimelimitRuleAction) => ( new UpdateTimelimitRuleAction({ ruleId, diff --git a/src/action/updateuserflags.ts b/src/action/updateuserflags.ts index 4a87aea..8c5f3d1 100644 --- a/src/action/updateuserflags.ts +++ b/src/action/updateuserflags.ts @@ -46,13 +46,6 @@ export class UpdateUserFlagsAction extends ParentAction { this.newValues = newValues } - serialize = (): SerializedUpdateUserFlagsAction => ({ - type: 'UPDATE_USER_FLAGS', - userId: this.userId, - modified: this.modifiedBits, - values: this.newValues - }) - static parse = ({ userId, modified, values }: SerializedUpdateUserFlagsAction) => ( new UpdateUserFlagsAction({ userId, diff --git a/src/action/updateuserlimitlogincategory.ts b/src/action/updateuserlimitlogincategory.ts index f155ec4..994f828 100644 --- a/src/action/updateuserlimitlogincategory.ts +++ b/src/action/updateuserlimitlogincategory.ts @@ -38,12 +38,6 @@ export class UpdateUserLimitLoginCategory extends ParentAction { this.categoryId = categoryId } - serialize = (): SerializedUpdateUserLimitLoginCategory => ({ - type: 'UPDATE_USER_LIMIT_LOGIN_CATEGORY', - userId: this.userId, - categoryId: this.categoryId - }) - static parse = ({ userId, categoryId }: SerializedUpdateUserLimitLoginCategory) => ( new UpdateUserLimitLoginCategory({ userId,