mirror of
https://codeberg.org/timelimit/timelimit-server.git
synced 2026-08-31 19:03:45 +02:00
Add support for more limits
This commit is contained in:
@@ -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
|
||||
@@ -20,6 +20,7 @@ export interface ClientDataStatus {
|
||||
apps: {[key: string]: string} // installedAppsVersionsByDeviceId
|
||||
categories: {[key: string]: CategoryDataStatus}
|
||||
users: string // userListVersion
|
||||
clientLevel?: number
|
||||
}
|
||||
|
||||
export interface CategoryDataStatus {
|
||||
|
||||
@@ -121,12 +121,44 @@ export interface ServerUpdatedCategoryAssignedApps {
|
||||
export interface ServerUpdatedCategoryUsedTimes {
|
||||
categoryId: string
|
||||
times: Array<ServerUsedTimeItem>
|
||||
sessionDurations: Array<ServerSessionDurationItem>
|
||||
version: string
|
||||
}
|
||||
|
||||
export interface ServerUsedTimeItem {
|
||||
day: number // day of epoch
|
||||
time: number // in milliseconds
|
||||
start: number
|
||||
end: number
|
||||
}
|
||||
|
||||
export interface ServerSessionDurationItem {
|
||||
/**
|
||||
* the maximum duration of a session (maxSessionDuration)
|
||||
*/
|
||||
md: number
|
||||
/**
|
||||
* the pause duration after a session (sessionPauseDuration)
|
||||
*/
|
||||
spd: number
|
||||
/**
|
||||
* the start minute of the day of the session/ the rule
|
||||
* which created this session (startMinuteOfDay)
|
||||
*/
|
||||
sm: number
|
||||
/**
|
||||
* the end minute of the day of the session/ the rule
|
||||
* which created this session (endMinuteOfDay)
|
||||
*/
|
||||
em: number
|
||||
/**
|
||||
* the timestamp of the last usage of this session (lastUsage)
|
||||
*/
|
||||
l: number
|
||||
/**
|
||||
* the duration of the last/ current session (lastSessionDuration)
|
||||
*/
|
||||
d: number
|
||||
}
|
||||
|
||||
export interface ServerUpdatedTimeLimitRules {
|
||||
@@ -140,6 +172,10 @@ export interface ServerTimeLimitRule {
|
||||
extraTime: boolean // applyToExtraTimeUsage
|
||||
dayMask: number // as binary bitmask
|
||||
maxTime: number // maximumTimeInMillis
|
||||
start: number // startMinuteOfDay
|
||||
end: number // endMinuteOfDay
|
||||
session: number // maximum session duration
|
||||
pause: number // session pause duration
|
||||
}
|
||||
|
||||
export interface ServerInstalledAppsData {
|
||||
|
||||
Reference in New Issue
Block a user