mirror of
https://codeberg.org/timelimit/timelimit-server.git
synced 2026-08-31 19:03:45 +02:00
Compare commits
23
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a767a94430 | ||
|
|
ba3bb50113 | ||
|
|
b4fd177afe | ||
|
|
b17bc42a1e | ||
|
|
8ebeadad5a | ||
|
|
8d65c5d777 | ||
|
|
d68b425e0e | ||
|
|
abc2102da5 | ||
|
|
62f4e368a6 | ||
|
|
32d35dda22 | ||
|
|
d5ddca0032 | ||
|
|
bdc4879806 | ||
|
|
e8cc9fd5e6 | ||
|
|
6518159069 | ||
|
|
a6723430ca | ||
|
|
eb6f668b43 | ||
|
|
9730d13b2e | ||
|
|
15b576a2d7 | ||
|
|
477e2f3bd3 | ||
|
|
007b1f2ec9 | ||
|
|
a73af1338e | ||
|
|
f8b4fc77a5 | ||
|
|
4bbf2a65f7 |
@@ -2,219 +2,4 @@
|
||||
|
||||
This is the server for the connected mode in TimeLimit.
|
||||
|
||||
## Clustering
|
||||
|
||||
This application only supports running a single instance of it.
|
||||
When clustering, push messages do not work anymore between devices
|
||||
connected to different devices and the rate limiting is per instance.
|
||||
|
||||
## Running
|
||||
|
||||
Option 1: Build (run ``sudo docker build -t timelimit-server .`` in this directory) and use a docker image
|
||||
Option 2: Install Node.JS (see below for detailed usage)
|
||||
|
||||
To test it, open ``http://server/time``, it should show a timestamp
|
||||
|
||||
## Commands
|
||||
|
||||
### npm start
|
||||
|
||||
This runs all pending migrations and starts the server.
|
||||
|
||||
### npm run build
|
||||
|
||||
This "compiles" the application.
|
||||
|
||||
### npm run lint:fix
|
||||
|
||||
This fixes the causes of lint warnings (where possible).
|
||||
|
||||
## Configuration (environment variables)
|
||||
|
||||
- DATABASE_URL
|
||||
- this specifies the database to use
|
||||
- default value: ``sqlite://test.db`` (sqlite database in the source code directory)
|
||||
- supports mysql, postgresql and sqlite (sqlite in development builds only because it's declared as dev dependency)
|
||||
- looks like ``postgres://user:pass@example.com:5432/dbname``
|
||||
- no extra setup needed
|
||||
- when starting the application, the database tables are created/ migrated
|
||||
- this only works for upgrading; if you intend to eventually downgrade, make a backup first (you should make backups in all cases before an upgrade)
|
||||
- PORT
|
||||
- the port at which the server should listen
|
||||
- default value: 8080
|
||||
- NODE_ENV
|
||||
- should be set to ``production`` in production
|
||||
- when using ``development``, then mails are not sent; instead they are written to a html file which is opened
|
||||
- GOOGLE_PLAY_PUBLIC_KEY
|
||||
- key for validating purchases
|
||||
- purchases using google play don't work without it/ when it is not set
|
||||
- MAIL_SENDER
|
||||
- sender (for the from-field) for sent mails
|
||||
- MAIL_TRANSPORT
|
||||
- a JSON encoded configuration for nodemailer
|
||||
- supports setting a smtp server configuration, see <https://nodemailer.com/smtp/>
|
||||
- allows easier configuration in case of a [well known services](https://nodemailer.com/smtp/well-known/)
|
||||
- default value is ``null``
|
||||
- examples
|
||||
- ``{"host": "localhost", "port": 25}`` (using a local mail server which does not require any authentication)
|
||||
- ``{"service": "1und1", "auth": {"user": "me@my.timelimit.server", "pass": "my password"}}`` (using a well known service)
|
||||
- ``{"host": "my.mail.server", "secure": true, "auth": {"user": "me@my.timelimit.server", "pass": "my password"}}`` (using a external smtp server)
|
||||
- in case of a docker-compose file, you should escape this, e.g. sourround it with ``'`` single quotes
|
||||
- MAIL_IMPRINT
|
||||
- a string which is added to the footer of the sent mails
|
||||
- default value: ``not defined``
|
||||
- ADMIN_TOKEN
|
||||
- a password which allows to use some APIs
|
||||
- admin APIs are disabled when this is not set
|
||||
- MAIL_SERVER_BLACKLIST
|
||||
- list of domains, separated by comma
|
||||
- if the user tries to use such a mail service, then he will get the notification that this provider is not supported
|
||||
- the blacklist is empty if this is not set
|
||||
- MAIL_WHITELIST
|
||||
- list of mail addresses (``someone@somewhere.com``) or domains (``mailbox.org``), separated by comma
|
||||
- if a user requests signing in with a mail address which is not in this list, then the request is rejected
|
||||
- if the list is empty/ the variable is not set, then any mail address (except with domains from the blacklist) is allowed
|
||||
- note: this allows a third party who knows the server url to check if a certain mail address is allowed by trying to sign in with it
|
||||
- DISABLE_SIGNUP
|
||||
- ``yes`` or ``no`` (default: no)
|
||||
- disables creating new families if ``yes`` is selected
|
||||
- the default value is ``no``
|
||||
- PING_INTERVAL_SEC
|
||||
- ping interval at the websocket in seconds
|
||||
- the default value is ``25``
|
||||
|
||||
## HTTPS
|
||||
|
||||
This server application itself does not support HTTPS. You have to use
|
||||
an other tool to use HTTPS. One options for this is to use nginx with the
|
||||
following site config:
|
||||
|
||||
```
|
||||
# don't forget to update the port for your local configuration
|
||||
#
|
||||
# the max_fails is important - otherwise nginx
|
||||
# marks the server sometimes as unreachable if it is restarted
|
||||
# or starts after nginx
|
||||
upstream timelimitbackend {
|
||||
server localhost:8080 max_fails=0;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 443 ssl;
|
||||
listen [::]:443 ssl;
|
||||
|
||||
# don't forget to update the domain
|
||||
server_name my.domain;
|
||||
|
||||
# don't forget to update the paths
|
||||
ssl_certificate /my/fullchain.pem;
|
||||
ssl_certificate_key /my/privkey.pem;
|
||||
|
||||
# eventually configure the SSL parameters here
|
||||
|
||||
location / {
|
||||
proxy_pass http://timelimitbackend/;
|
||||
|
||||
client_max_body_size 10m;
|
||||
# the following is required for websocket support
|
||||
#
|
||||
# without websockets, the client will not detect
|
||||
# that there is a connection and it will not sync
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
proxy_http_version 1.1;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Admin API
|
||||
|
||||
When the ``ADMIN_TOKEN`` environment variable was set, then there is a admin API available
|
||||
at ``http(s)://server/admin``. It can be used by the [TimeLimit Server Admin UI](https://codeberg.org/timelimit/timelimit-server-ui).
|
||||
|
||||
## Purchases
|
||||
|
||||
To enable the automated purchase feature, set the ``GOOGLE_PLAY_PUBLIC_KEY`` environment variable.
|
||||
The value for the official builds which are distributed using the Play Store can
|
||||
be found at <https://codeberg.org/timelimit/timelimit-android/src/commit/3da677877f4dde0b1b01523daae33745f14e08ac/app/build.gradle#L49>.
|
||||
|
||||
Additionally, there is the admin API which allows one to unlock the
|
||||
premium features.
|
||||
|
||||
## example docker-compose.yml with included database
|
||||
|
||||
(don't forget to build the docker image first)
|
||||
|
||||
```
|
||||
version: '3'
|
||||
services:
|
||||
api:
|
||||
image: 'timelimit-server:latest'
|
||||
environment:
|
||||
NODE_ENV: production
|
||||
DATABASE_URL: mariadb://timelimit:timelimitpassword@database:3306/timelimit
|
||||
PORT: 8080
|
||||
MAIL_SENDER: me@my.timelimit.server
|
||||
MAIL_TRANSPORT: '{"host": "localhost", "port": 25}'
|
||||
# put additional config variables here
|
||||
ports:
|
||||
- "8080:8080"
|
||||
restart: always
|
||||
# you can enable logging during testing by commenting this out,
|
||||
# but logging is not needed when everything works
|
||||
logging:
|
||||
driver: none
|
||||
links:
|
||||
- database
|
||||
database:
|
||||
image: 'mariadb:10'
|
||||
environment:
|
||||
MYSQL_ROOT_PASSWORD: rootpassword
|
||||
MYSQL_DATABASE: timelimit
|
||||
MYSQL_USER: timelimit
|
||||
MYSQL_PASSWORD: timelimitpassword
|
||||
volumes:
|
||||
- ./database:/var/lib/mysql
|
||||
# you can enable logging during testing by commenting this out,
|
||||
# but logging is not needed when everything works
|
||||
logging:
|
||||
driver: none
|
||||
```
|
||||
|
||||
The database files will be saved at the folder which contains the docker-compose.yml.
|
||||
You should change the passwords.
|
||||
|
||||
Docker starts both (TimeLimit and the database) at the same time,
|
||||
so the TimeLimit server will crash a few times due to the missing database
|
||||
before it starts working.
|
||||
|
||||
## example docker-compose.yml with external databases
|
||||
|
||||
(don't forget to build the docker image first)
|
||||
|
||||
```
|
||||
version: '2'
|
||||
services:
|
||||
api:
|
||||
image: 'timelimit-server:latest'
|
||||
environment:
|
||||
NODE_ENV: production
|
||||
DATABASE_URL: postgres://user:pass@example.com:5432/dbname
|
||||
PORT: 8080
|
||||
MAIL_SENDER: me@my.timelimit.server
|
||||
MAIL_TRANSPORT: '{"host": "localhost", "port": 25}'
|
||||
# put additional config variables here
|
||||
restart: always
|
||||
# you can enable logging during testing by commenting this out,
|
||||
# but logging is not needed when everything works
|
||||
logging:
|
||||
driver: none
|
||||
# easy solution to use a database which does not run within docker
|
||||
network_mode: "host"
|
||||
# otherwise:
|
||||
# redirect host port 9000 to guest port 8080 (to allow access to the API)
|
||||
# ports:
|
||||
# - "9000:8080"
|
||||
# in case the database runs outside of docker and you don't want to use the host network mode, see
|
||||
# https://forums.docker.com/t/accessing-host-machine-from-within-docker-container/14248
|
||||
```
|
||||
This Readme became too long. Due to that, it was split into [mutliple files](https://codeberg.org/timelimit/timelimit-server/src/branch/master/docs/usage).
|
||||
|
||||
+6
-3
@@ -14,8 +14,8 @@ Use this to get the server status.
|
||||
## Response
|
||||
|
||||
This returns a JSON object with ``websocketClients`` (of the type number,
|
||||
the number of clients connected using the websocket) and the map ``counters``
|
||||
which maps values to numbers. You should not make any assumptions about the counter names
|
||||
the number of clients connected using the websocket) and the maps ``counters`` and ``maxValues``
|
||||
which map values to numbers. You should not make any assumptions about the key names
|
||||
and their availability.
|
||||
|
||||
### example response
|
||||
@@ -25,13 +25,16 @@ and their availability.
|
||||
"websocketClients": 3,
|
||||
"counters": {
|
||||
"testCounter": 1
|
||||
},
|
||||
"maxValues": {
|
||||
"testMax": 3
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## POST /admin/reset-counters
|
||||
|
||||
Use this to reset the counters included in the server status.
|
||||
Use this to reset the counters and maxValues included in the server status.
|
||||
|
||||
Although this uses POST, it does not take any request body
|
||||
|
||||
|
||||
+3
-2
@@ -20,12 +20,13 @@ On a invalid request body: HTTP status code 400 Bad Request
|
||||
|
||||
If the mail auth token is invalid/ expired: HTTP status code 401 Unauthorized
|
||||
|
||||
On success: a object with the properties ``status`` (string), ``mail`` (string) and
|
||||
``canCreateFamily`` (boolean)
|
||||
On success: a object with the properties ``status`` (string), ``mail`` (string),
|
||||
``canCreateFamily`` (boolean) and ``alwaysPro`` (boolean)
|
||||
|
||||
- ``status`` is ``with family`` or ``without family``
|
||||
- ``mail`` is the mail address for which the auth token was created
|
||||
- ``canCreateFamily`` is false if the sign up of new families was disabled and otherwise true
|
||||
- ``alwaysPro`` is true if the premium version is always unlocked
|
||||
|
||||
## POST /parent/create-family
|
||||
|
||||
|
||||
@@ -44,6 +44,7 @@ The integrity field of a action may have got one of the following values:
|
||||
- an empty string when no user authentication is required/ for app logic actions (e.g. incrementing the used time)
|
||||
- the string ``device`` in case of parent actions if a parent is assigned to the device and asking for the password was disabled
|
||||
- ``sha512(sequence number as string with the base 10 + the device id as string + the hash of the user password using the second salt as string + the encoded action as string)`` for parent and child actions
|
||||
- the string ``childDevice`` in case the child wants to add limits for itself using parent actions; this feature must be enabled for the child and this allows only some actions with some parameters
|
||||
|
||||
In case of a invalid integrity value, the action is ignored and the client is told to do a full sync
|
||||
|
||||
|
||||
@@ -7,37 +7,7 @@
|
||||
"actions": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"encodedAction": {
|
||||
"type": "string"
|
||||
},
|
||||
"sequenceNumber": {
|
||||
"type": "number"
|
||||
},
|
||||
"integrity": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": {
|
||||
"enum": [
|
||||
"appLogic",
|
||||
"child",
|
||||
"parent"
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
"userId": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"encodedAction",
|
||||
"integrity",
|
||||
"sequenceNumber",
|
||||
"type",
|
||||
"userId"
|
||||
]
|
||||
"$ref": "#/definitions/ClientPushChangesRequestAction"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -46,6 +16,42 @@
|
||||
"actions",
|
||||
"deviceAuthToken"
|
||||
],
|
||||
"definitions": {
|
||||
"ClientPushChangesRequestAction": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"encodedAction": {
|
||||
"type": "string"
|
||||
},
|
||||
"sequenceNumber": {
|
||||
"type": "number"
|
||||
},
|
||||
"integrity": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": {
|
||||
"enum": [
|
||||
"appLogic",
|
||||
"child",
|
||||
"parent"
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
"userId": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"encodedAction",
|
||||
"integrity",
|
||||
"sequenceNumber",
|
||||
"type",
|
||||
"userId"
|
||||
],
|
||||
"title": "ClientPushChangesRequestAction"
|
||||
}
|
||||
},
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"title": "ClientPushChangesRequest",
|
||||
"$id": "https://timelimit.io/ClientPushChangesRequest"
|
||||
|
||||
+86
-74
@@ -33,156 +33,167 @@
|
||||
- [CategoryDataStatus](./clientpullchangesrequest-definitions-categorydatastatus.md) – `https://timelimit.io/ClientPullChangesRequest#/definitions/CategoryDataStatus`
|
||||
- [ClientDataStatus](./clientpullchangesrequest-properties-clientdatastatus.md) – `https://timelimit.io/ClientPullChangesRequest#/properties/status`
|
||||
- [ClientDataStatus](./clientpullchangesrequest-definitions-clientdatastatus.md) – `https://timelimit.io/ClientPullChangesRequest#/definitions/ClientDataStatus`
|
||||
- [NewDeviceInfo](./registerchilddevicerequest-definitions-newdeviceinfo.md) – `https://timelimit.io/RegisterChildDeviceRequest#/definitions/NewDeviceInfo`
|
||||
- [NewDeviceInfo](./registerchilddevicerequest-properties-newdeviceinfo.md) – `https://timelimit.io/RegisterChildDeviceRequest#/properties/childDevice`
|
||||
- [ClientPushChangesRequestAction](./clientpushchangesrequest-properties-actions-clientpushchangesrequestaction.md) – `https://timelimit.io/ClientPushChangesRequest#/properties/actions/items`
|
||||
- [ClientPushChangesRequestAction](./clientpushchangesrequest-definitions-clientpushchangesrequestaction.md) – `https://timelimit.io/ClientPushChangesRequest#/definitions/ClientPushChangesRequestAction`
|
||||
- [NewDeviceInfo](./signintofamilyrequest-definitions-newdeviceinfo.md) – `https://timelimit.io/SignIntoFamilyRequest#/definitions/NewDeviceInfo`
|
||||
- [NewDeviceInfo](./signintofamilyrequest-properties-newdeviceinfo.md) – `https://timelimit.io/SignIntoFamilyRequest#/properties/parentDevice`
|
||||
- [NewDeviceInfo](./registerchilddevicerequest-definitions-newdeviceinfo.md) – `https://timelimit.io/RegisterChildDeviceRequest#/definitions/NewDeviceInfo`
|
||||
- [NewDeviceInfo](./registerchilddevicerequest-properties-newdeviceinfo.md) – `https://timelimit.io/RegisterChildDeviceRequest#/properties/childDevice`
|
||||
- [NewDeviceInfo](./createfamilybymailtokenrequest-definitions-newdeviceinfo.md) – `https://timelimit.io/CreateFamilyByMailTokenRequest#/definitions/NewDeviceInfo`
|
||||
- [NewDeviceInfo](./createfamilybymailtokenrequest-properties-newdeviceinfo.md) – `https://timelimit.io/CreateFamilyByMailTokenRequest#/properties/parentDevice`
|
||||
- [ParentPassword](./serializedparentaction-definitions-serializedadduseraction-properties-parentpassword.md) – `https://timelimit.io/SerializedParentAction#/definitions/SerializedAddUserAction/properties/password`
|
||||
- [ParentPassword](./createfamilybymailtokenrequest-definitions-parentpassword.md) – `https://timelimit.io/CreateFamilyByMailTokenRequest#/definitions/ParentPassword`
|
||||
- [ParentPassword](./createfamilybymailtokenrequest-properties-parentpassword.md) – `https://timelimit.io/CreateFamilyByMailTokenRequest#/properties/parentPassword`
|
||||
- [ParentPassword](./recoverparentpasswordrequest-definitions-parentpassword.md) – `https://timelimit.io/RecoverParentPasswordRequest#/definitions/ParentPassword`
|
||||
- [ParentPassword](./serializedchildaction-definitions-serializedchildchangepasswordaction-properties-parentpassword.md) – `https://timelimit.io/SerializedChildAction#/definitions/SerializedChildChangePasswordAction/properties/password`
|
||||
- [ParentPassword](./serializedparentaction-definitions-serializedsetchildpasswordaction-properties-parentpassword.md) – `https://timelimit.io/SerializedParentAction#/definitions/SerializedSetChildPasswordAction/properties/newPassword`
|
||||
- [ParentPassword](./serializedchildaction-definitions-serializedchildchangepasswordaction-properties-parentpassword.md) – `https://timelimit.io/SerializedChildAction#/definitions/SerializedChildChangePasswordAction/properties/password`
|
||||
- [ParentPassword](./serializedparentaction-definitions-parentpassword.md) – `https://timelimit.io/SerializedParentAction#/definitions/ParentPassword`
|
||||
- [ParentPassword](./serializedparentaction-definitions-serializedadduseraction-properties-parentpassword.md) – `https://timelimit.io/SerializedParentAction#/definitions/SerializedAddUserAction/properties/password`
|
||||
- [ParentPassword](./recoverparentpasswordrequest-definitions-parentpassword.md) – `https://timelimit.io/RecoverParentPasswordRequest#/definitions/ParentPassword`
|
||||
- [ParentPassword](./createfamilybymailtokenrequest-properties-parentpassword.md) – `https://timelimit.io/CreateFamilyByMailTokenRequest#/properties/parentPassword`
|
||||
- [ParentPassword](./serializedchildaction-definitions-parentpassword.md) – `https://timelimit.io/SerializedChildAction#/definitions/ParentPassword`
|
||||
- [ParentPassword](./recoverparentpasswordrequest-properties-parentpassword.md) – `https://timelimit.io/RecoverParentPasswordRequest#/properties/password`
|
||||
- [ParentPassword](./serializedchildaction-definitions-serializedchildchangepasswordaction-properties-parentpassword.md) – `https://timelimit.io/SerializedChildAction#/definitions/SerializedChildChangePasswordAction/properties/password`
|
||||
- [ParentPassword](./serializedparentaction-definitions-serializedsetchildpasswordaction-properties-parentpassword.md) – `https://timelimit.io/SerializedParentAction#/definitions/SerializedSetChildPasswordAction/properties/newPassword`
|
||||
- [ParentPassword](./serializedparentaction-definitions-serializedadduseraction-properties-parentpassword.md) – `https://timelimit.io/SerializedParentAction#/definitions/SerializedAddUserAction/properties/password`
|
||||
- [ParentPassword](./serializedchildaction-definitions-parentpassword.md) – `https://timelimit.io/SerializedChildAction#/definitions/ParentPassword`
|
||||
- [ParentPassword](./serializedchildaction-definitions-serializedchildchangepasswordaction-properties-parentpassword.md) – `https://timelimit.io/SerializedChildAction#/definitions/SerializedChildChangePasswordAction/properties/password`
|
||||
- [SerialiezdTriedDisablingDeviceAdminAction](./serializedapplogicaction-anyof-serialiezdtrieddisablingdeviceadminaction.md) – `https://timelimit.io/SerializedAppLogicAction#/anyOf/5`
|
||||
- [SerialiezdTriedDisablingDeviceAdminAction](./serializedapplogicaction-definitions-serialiezdtrieddisablingdeviceadminaction.md) – `https://timelimit.io/SerializedAppLogicAction#/definitions/SerialiezdTriedDisablingDeviceAdminAction`
|
||||
- [SerialiezdTriedDisablingDeviceAdminAction](./serializedapplogicaction-anyof-serialiezdtrieddisablingdeviceadminaction.md) – `https://timelimit.io/SerializedAppLogicAction#/anyOf/6`
|
||||
- [SerialiizedUpdateNetworkTimeVerificationAction](./serializedparentaction-definitions-serialiizedupdatenetworktimeverificationaction.md) – `https://timelimit.io/SerializedParentAction#/definitions/SerialiizedUpdateNetworkTimeVerificationAction`
|
||||
- [SerialiizedUpdateNetworkTimeVerificationAction](./serializedparentaction-anyof-serialiizedupdatenetworktimeverificationaction.md) – `https://timelimit.io/SerializedParentAction#/anyOf/35`
|
||||
- [SerialiizedUpdateNetworkTimeVerificationAction](./serializedparentaction-anyof-serialiizedupdatenetworktimeverificationaction.md) – `https://timelimit.io/SerializedParentAction#/anyOf/37`
|
||||
- [SerializeResetCategoryNetworkIdsAction](./serializedparentaction-anyof-serializeresetcategorynetworkidsaction.md) – `https://timelimit.io/SerializedParentAction#/anyOf/13`
|
||||
- [SerializeResetCategoryNetworkIdsAction](./serializedparentaction-definitions-serializeresetcategorynetworkidsaction.md) – `https://timelimit.io/SerializedParentAction#/definitions/SerializeResetCategoryNetworkIdsAction`
|
||||
- [SerializedAddCategoryAppsAction](./serializedparentaction-anyof-serializedaddcategoryappsaction.md) – `https://timelimit.io/SerializedParentAction#/anyOf/0`
|
||||
- [SerializedAddCategoryAppsAction](./serializedparentaction-definitions-serializedaddcategoryappsaction.md) – `https://timelimit.io/SerializedParentAction#/definitions/SerializedAddCategoryAppsAction`
|
||||
- [SerializedAddCategoryNetworkIdAction](./serializedparentaction-anyof-serializedaddcategorynetworkidaction.md) – `https://timelimit.io/SerializedParentAction#/anyOf/1`
|
||||
- [SerializedAddCategoryNetworkIdAction](./serializedparentaction-definitions-serializedaddcategorynetworkidaction.md) – `https://timelimit.io/SerializedParentAction#/definitions/SerializedAddCategoryNetworkIdAction`
|
||||
- [SerializedAddInstalledAppsAction](./serializedapplogicaction-definitions-serializedaddinstalledappsaction.md) – `https://timelimit.io/SerializedAppLogicAction#/definitions/SerializedAddInstalledAppsAction`
|
||||
- [SerializedAddInstalledAppsAction](./serializedapplogicaction-anyof-serializedaddinstalledappsaction.md) – `https://timelimit.io/SerializedAppLogicAction#/anyOf/0`
|
||||
- [SerializedAddUsedTimeAction](./serializedapplogicaction-anyof-serializedaddusedtimeaction.md) – `https://timelimit.io/SerializedAppLogicAction#/anyOf/1`
|
||||
- [SerializedAddUsedTimeAction](./serializedapplogicaction-definitions-serializedaddusedtimeaction.md) – `https://timelimit.io/SerializedAppLogicAction#/definitions/SerializedAddUsedTimeAction`
|
||||
- [SerializedAddUsedTimeActionVersion2](./serializedapplogicaction-definitions-serializedaddusedtimeactionversion2.md) – `https://timelimit.io/SerializedAppLogicAction#/definitions/SerializedAddUsedTimeActionVersion2`
|
||||
- [SerializedAddUsedTimeActionVersion2](./serializedapplogicaction-anyof-serializedaddusedtimeactionversion2.md) – `https://timelimit.io/SerializedAppLogicAction#/anyOf/2`
|
||||
- [SerializedAddUserAction](./serializedparentaction-anyof-serializedadduseraction.md) – `https://timelimit.io/SerializedParentAction#/anyOf/1`
|
||||
- [SerializedAddUsedTimeActionVersion2](./serializedapplogicaction-definitions-serializedaddusedtimeactionversion2.md) – `https://timelimit.io/SerializedAppLogicAction#/definitions/SerializedAddUsedTimeActionVersion2`
|
||||
- [SerializedAddUserAction](./serializedparentaction-anyof-serializedadduseraction.md) – `https://timelimit.io/SerializedParentAction#/anyOf/2`
|
||||
- [SerializedAddUserAction](./serializedparentaction-definitions-serializedadduseraction.md) – `https://timelimit.io/SerializedParentAction#/definitions/SerializedAddUserAction`
|
||||
- [SerializedAppActivityItem](./serverdatastatus-definitions-serverinstalledappsdata-properties-activities-serializedappactivityitem.md) – `https://timelimit.io/ServerDataStatus#/definitions/ServerInstalledAppsData/properties/activities/items`
|
||||
- [SerializedAppActivityItem](./serializedapplogicaction-definitions-serializedappactivityitem.md) – `https://timelimit.io/SerializedAppLogicAction#/definitions/SerializedAppActivityItem`
|
||||
- [SerializedAppActivityItem](./serverdatastatus-definitions-serverinstalledappsdata-properties-activities-serializedappactivityitem.md) – `https://timelimit.io/ServerDataStatus#/definitions/ServerInstalledAppsData/properties/activities/items`
|
||||
- [SerializedAppActivityItem](./serverdatastatus-definitions-serializedappactivityitem.md) – `https://timelimit.io/ServerDataStatus#/definitions/SerializedAppActivityItem`
|
||||
- [SerializedAppActivityItem](./serializedapplogicaction-definitions-serializedupdateappactivitiesaction-properties-updatedoradded-serializedappactivityitem.md) – `https://timelimit.io/SerializedAppLogicAction#/definitions/SerializedUpdateAppActivitiesAction/properties/updatedOrAdded/items`
|
||||
- [SerializedAppActivityItem](./serializedapplogicaction-definitions-serializedappactivityitem.md) – `https://timelimit.io/SerializedAppLogicAction#/definitions/SerializedAppActivityItem`
|
||||
- [SerializedAppActivityItem](./serializedapplogicaction-definitions-serializedupdateappactivitiesaction-properties-updatedoradded-serializedappactivityitem.md) – `https://timelimit.io/SerializedAppLogicAction#/definitions/SerializedUpdateAppActivitiesAction/properties/updatedOrAdded/items`
|
||||
- [SerializedChangeParentPasswordAction](./serializedparentaction-anyof-serializedchangeparentpasswordaction.md) – `https://timelimit.io/SerializedParentAction#/anyOf/2`
|
||||
- [SerializedAppActivityItem](./serverdatastatus-definitions-serverinstalledappsdata-properties-activities-serializedappactivityitem.md) – `https://timelimit.io/ServerDataStatus#/definitions/ServerInstalledAppsData/properties/activities/items`
|
||||
- [SerializedChangeParentPasswordAction](./serializedparentaction-definitions-serializedchangeparentpasswordaction.md) – `https://timelimit.io/SerializedParentAction#/definitions/SerializedChangeParentPasswordAction`
|
||||
- [SerializedChildChangePasswordAction](./serializedchildaction-anyof-serializedchildchangepasswordaction.md) – `https://timelimit.io/SerializedChildAction#/anyOf/0`
|
||||
- [SerializedChangeParentPasswordAction](./serializedparentaction-anyof-serializedchangeparentpasswordaction.md) – `https://timelimit.io/SerializedParentAction#/anyOf/3`
|
||||
- [SerializedChildChangePasswordAction](./serializedchildaction-definitions-serializedchildchangepasswordaction.md) – `https://timelimit.io/SerializedChildAction#/definitions/SerializedChildChangePasswordAction`
|
||||
- [SerializedChildChangePasswordAction](./serializedchildaction-anyof-serializedchildchangepasswordaction.md) – `https://timelimit.io/SerializedChildAction#/anyOf/0`
|
||||
- [SerializedChildSignInAction](./serializedchildaction-definitions-serializedchildsigninaction.md) – `https://timelimit.io/SerializedChildAction#/definitions/SerializedChildSignInAction`
|
||||
- [SerializedChildSignInAction](./serializedchildaction-anyof-serializedchildsigninaction.md) – `https://timelimit.io/SerializedChildAction#/anyOf/1`
|
||||
- [SerializedCreateCategoryAction](./serializedparentaction-definitions-serializedcreatecategoryaction.md) – `https://timelimit.io/SerializedParentAction#/definitions/SerializedCreateCategoryAction`
|
||||
- [SerializedCreateCategoryAction](./serializedparentaction-anyof-serializedcreatecategoryaction.md) – `https://timelimit.io/SerializedParentAction#/anyOf/3`
|
||||
- [SerializedCreateCategoryAction](./serializedparentaction-anyof-serializedcreatecategoryaction.md) – `https://timelimit.io/SerializedParentAction#/anyOf/4`
|
||||
- [SerializedCreateTimelimtRuleAction](./serializedparentaction-anyof-serializedcreatetimelimtruleaction.md) – `https://timelimit.io/SerializedParentAction#/anyOf/5`
|
||||
- [SerializedCreateTimelimtRuleAction](./serializedparentaction-definitions-serializedcreatetimelimtruleaction.md) – `https://timelimit.io/SerializedParentAction#/definitions/SerializedCreateTimelimtRuleAction`
|
||||
- [SerializedCreateTimelimtRuleAction](./serializedparentaction-anyof-serializedcreatetimelimtruleaction.md) – `https://timelimit.io/SerializedParentAction#/anyOf/4`
|
||||
- [SerializedDeleteCategoryAction](./serializedparentaction-anyof-serializeddeletecategoryaction.md) – `https://timelimit.io/SerializedParentAction#/anyOf/5`
|
||||
- [SerializedDeleteCategoryAction](./serializedparentaction-anyof-serializeddeletecategoryaction.md) – `https://timelimit.io/SerializedParentAction#/anyOf/6`
|
||||
- [SerializedDeleteCategoryAction](./serializedparentaction-definitions-serializeddeletecategoryaction.md) – `https://timelimit.io/SerializedParentAction#/definitions/SerializedDeleteCategoryAction`
|
||||
- [SerializedDeleteTimeLimitRuleAction](./serializedparentaction-anyof-serializeddeletetimelimitruleaction.md) – `https://timelimit.io/SerializedParentAction#/anyOf/7`
|
||||
- [SerializedDeleteTimeLimitRuleAction](./serializedparentaction-definitions-serializeddeletetimelimitruleaction.md) – `https://timelimit.io/SerializedParentAction#/definitions/SerializedDeleteTimeLimitRuleAction`
|
||||
- [SerializedDeleteTimeLimitRuleAction](./serializedparentaction-anyof-serializeddeletetimelimitruleaction.md) – `https://timelimit.io/SerializedParentAction#/anyOf/6`
|
||||
- [SerializedForceSyncAction](./serializedapplogicaction-definitions-serializedforcesyncaction.md) – `https://timelimit.io/SerializedAppLogicAction#/definitions/SerializedForceSyncAction`
|
||||
- [SerializedForceSyncAction](./serializedapplogicaction-anyof-serializedforcesyncaction.md) – `https://timelimit.io/SerializedAppLogicAction#/anyOf/3`
|
||||
- [SerializedIgnoreManipulationAction](./serializedparentaction-definitions-serializedignoremanipulationaction.md) – `https://timelimit.io/SerializedParentAction#/definitions/SerializedIgnoreManipulationAction`
|
||||
- [SerializedIgnoreManipulationAction](./serializedparentaction-anyof-serializedignoremanipulationaction.md) – `https://timelimit.io/SerializedParentAction#/anyOf/7`
|
||||
- [SerializedIncrementCategoryExtraTimeAction](./serializedparentaction-anyof-serializedincrementcategoryextratimeaction.md) – `https://timelimit.io/SerializedParentAction#/anyOf/8`
|
||||
- [SerializedIgnoreManipulationAction](./serializedparentaction-anyof-serializedignoremanipulationaction.md) – `https://timelimit.io/SerializedParentAction#/anyOf/8`
|
||||
- [SerializedIncrementCategoryExtraTimeAction](./serializedparentaction-definitions-serializedincrementcategoryextratimeaction.md) – `https://timelimit.io/SerializedParentAction#/definitions/SerializedIncrementCategoryExtraTimeAction`
|
||||
- [SerializedInstalledApp](./serializedapplogicaction-definitions-serializedaddinstalledappsaction-properties-apps-serializedinstalledapp.md) – `https://timelimit.io/SerializedAppLogicAction#/definitions/SerializedAddInstalledAppsAction/properties/apps/items`
|
||||
- [SerializedInstalledApp](./serverdatastatus-definitions-serverinstalledappsdata-properties-apps-serializedinstalledapp.md) – `https://timelimit.io/ServerDataStatus#/definitions/ServerInstalledAppsData/properties/apps/items`
|
||||
- [SerializedInstalledApp](./serializedapplogicaction-definitions-serializedinstalledapp.md) – `https://timelimit.io/SerializedAppLogicAction#/definitions/SerializedInstalledApp`
|
||||
- [SerializedIncrementCategoryExtraTimeAction](./serializedparentaction-anyof-serializedincrementcategoryextratimeaction.md) – `https://timelimit.io/SerializedParentAction#/anyOf/9`
|
||||
- [SerializedInstalledApp](./serverdatastatus-definitions-serializedinstalledapp.md) – `https://timelimit.io/ServerDataStatus#/definitions/SerializedInstalledApp`
|
||||
- [SerializedInstalledApp](./serializedapplogicaction-definitions-serializedaddinstalledappsaction-properties-apps-serializedinstalledapp.md) – `https://timelimit.io/SerializedAppLogicAction#/definitions/SerializedAddInstalledAppsAction/properties/apps/items`
|
||||
- [SerializedInstalledApp](./serverdatastatus-definitions-serverinstalledappsdata-properties-apps-serializedinstalledapp.md) – `https://timelimit.io/ServerDataStatus#/definitions/ServerInstalledAppsData/properties/apps/items`
|
||||
- [SerializedInstalledApp](./serializedapplogicaction-definitions-serializedaddinstalledappsaction-properties-apps-serializedinstalledapp.md) – `https://timelimit.io/SerializedAppLogicAction#/definitions/SerializedAddInstalledAppsAction/properties/apps/items`
|
||||
- [SerializedInstalledApp](./serializedapplogicaction-definitions-serializedinstalledapp.md) – `https://timelimit.io/SerializedAppLogicAction#/definitions/SerializedInstalledApp`
|
||||
- [SerializedInstalledApp](./serverdatastatus-definitions-serverinstalledappsdata-properties-apps-serializedinstalledapp.md) – `https://timelimit.io/ServerDataStatus#/definitions/ServerInstalledAppsData/properties/apps/items`
|
||||
- [SerializedInstalledApp](./serializedapplogicaction-definitions-serializedaddinstalledappsaction-properties-apps-serializedinstalledapp.md) – `https://timelimit.io/SerializedAppLogicAction#/definitions/SerializedAddInstalledAppsAction/properties/apps/items`
|
||||
- [SerializedRemoveCategoryAppsAction](./serializedparentaction-anyof-serializedremovecategoryappsaction.md) – `https://timelimit.io/SerializedParentAction#/anyOf/10`
|
||||
- [SerializedRemoveCategoryAppsAction](./serializedparentaction-definitions-serializedremovecategoryappsaction.md) – `https://timelimit.io/SerializedParentAction#/definitions/SerializedRemoveCategoryAppsAction`
|
||||
- [SerializedRemoveCategoryAppsAction](./serializedparentaction-anyof-serializedremovecategoryappsaction.md) – `https://timelimit.io/SerializedParentAction#/anyOf/9`
|
||||
- [SerializedRemoveInstalledAppsAction](./serializedapplogicaction-anyof-serializedremoveinstalledappsaction.md) – `https://timelimit.io/SerializedAppLogicAction#/anyOf/3`
|
||||
- [SerializedRemoveInstalledAppsAction](./serializedapplogicaction-definitions-serializedremoveinstalledappsaction.md) – `https://timelimit.io/SerializedAppLogicAction#/definitions/SerializedRemoveInstalledAppsAction`
|
||||
- [SerializedRemoveInstalledAppsAction](./serializedapplogicaction-anyof-serializedremoveinstalledappsaction.md) – `https://timelimit.io/SerializedAppLogicAction#/anyOf/4`
|
||||
- [SerializedRemoveUserAction](./serializedparentaction-definitions-serializedremoveuseraction.md) – `https://timelimit.io/SerializedParentAction#/definitions/SerializedRemoveUserAction`
|
||||
- [SerializedRemoveUserAction](./serializedparentaction-anyof-serializedremoveuseraction.md) – `https://timelimit.io/SerializedParentAction#/anyOf/10`
|
||||
- [SerializedRenameChildAction](./serializedparentaction-anyof-serializedrenamechildaction.md) – `https://timelimit.io/SerializedParentAction#/anyOf/11`
|
||||
- [SerializedRemoveUserAction](./serializedparentaction-anyof-serializedremoveuseraction.md) – `https://timelimit.io/SerializedParentAction#/anyOf/11`
|
||||
- [SerializedRenameChildAction](./serializedparentaction-definitions-serializedrenamechildaction.md) – `https://timelimit.io/SerializedParentAction#/definitions/SerializedRenameChildAction`
|
||||
- [SerializedResetParentBlockedTimesAction](./serializedparentaction-anyof-serializedresetparentblockedtimesaction.md) – `https://timelimit.io/SerializedParentAction#/anyOf/12`
|
||||
- [SerializedRenameChildAction](./serializedparentaction-anyof-serializedrenamechildaction.md) – `https://timelimit.io/SerializedParentAction#/anyOf/12`
|
||||
- [SerializedResetParentBlockedTimesAction](./serializedparentaction-anyof-serializedresetparentblockedtimesaction.md) – `https://timelimit.io/SerializedParentAction#/anyOf/14`
|
||||
- [SerializedResetParentBlockedTimesAction](./serializedparentaction-definitions-serializedresetparentblockedtimesaction.md) – `https://timelimit.io/SerializedParentAction#/definitions/SerializedResetParentBlockedTimesAction`
|
||||
- [SerializedSetCategoryExtraTimeAction](./serializedparentaction-anyof-serializedsetcategoryextratimeaction.md) – `https://timelimit.io/SerializedParentAction#/anyOf/13`
|
||||
- [SerializedSetCategoryExtraTimeAction](./serializedparentaction-definitions-serializedsetcategoryextratimeaction.md) – `https://timelimit.io/SerializedParentAction#/definitions/SerializedSetCategoryExtraTimeAction`
|
||||
- [SerializedSetCategoryForUnassignedAppsAction](./serializedparentaction-anyof-serializedsetcategoryforunassignedappsaction.md) – `https://timelimit.io/SerializedParentAction#/anyOf/14`
|
||||
- [SerializedSetCategoryExtraTimeAction](./serializedparentaction-anyof-serializedsetcategoryextratimeaction.md) – `https://timelimit.io/SerializedParentAction#/anyOf/15`
|
||||
- [SerializedSetCategoryForUnassignedAppsAction](./serializedparentaction-definitions-serializedsetcategoryforunassignedappsaction.md) – `https://timelimit.io/SerializedParentAction#/definitions/SerializedSetCategoryForUnassignedAppsAction`
|
||||
- [SerializedSetChildPasswordAction](./serializedparentaction-anyof-serializedsetchildpasswordaction.md) – `https://timelimit.io/SerializedParentAction#/anyOf/15`
|
||||
- [SerializedSetCategoryForUnassignedAppsAction](./serializedparentaction-anyof-serializedsetcategoryforunassignedappsaction.md) – `https://timelimit.io/SerializedParentAction#/anyOf/16`
|
||||
- [SerializedSetChildPasswordAction](./serializedparentaction-definitions-serializedsetchildpasswordaction.md) – `https://timelimit.io/SerializedParentAction#/definitions/SerializedSetChildPasswordAction`
|
||||
- [SerializedSetChildPasswordAction](./serializedparentaction-anyof-serializedsetchildpasswordaction.md) – `https://timelimit.io/SerializedParentAction#/anyOf/17`
|
||||
- [SerializedSetConsiderRebootManipulationAction](./serializedparentaction-anyof-serializedsetconsiderrebootmanipulationaction.md) – `https://timelimit.io/SerializedParentAction#/anyOf/18`
|
||||
- [SerializedSetConsiderRebootManipulationAction](./serializedparentaction-definitions-serializedsetconsiderrebootmanipulationaction.md) – `https://timelimit.io/SerializedParentAction#/definitions/SerializedSetConsiderRebootManipulationAction`
|
||||
- [SerializedSetConsiderRebootManipulationAction](./serializedparentaction-anyof-serializedsetconsiderrebootmanipulationaction.md) – `https://timelimit.io/SerializedParentAction#/anyOf/16`
|
||||
- [SerializedSetDeviceDefaultUserAction](./serializedparentaction-anyof-serializedsetdevicedefaultuseraction.md) – `https://timelimit.io/SerializedParentAction#/anyOf/17`
|
||||
- [SerializedSetDeviceDefaultUserAction](./serializedparentaction-definitions-serializedsetdevicedefaultuseraction.md) – `https://timelimit.io/SerializedParentAction#/definitions/SerializedSetDeviceDefaultUserAction`
|
||||
- [SerializedSetDeviceDefaultUserTimeoutAction](./serializedparentaction-anyof-serializedsetdevicedefaultusertimeoutaction.md) – `https://timelimit.io/SerializedParentAction#/anyOf/18`
|
||||
- [SerializedSetDeviceDefaultUserAction](./serializedparentaction-anyof-serializedsetdevicedefaultuseraction.md) – `https://timelimit.io/SerializedParentAction#/anyOf/19`
|
||||
- [SerializedSetDeviceDefaultUserTimeoutAction](./serializedparentaction-anyof-serializedsetdevicedefaultusertimeoutaction.md) – `https://timelimit.io/SerializedParentAction#/anyOf/20`
|
||||
- [SerializedSetDeviceDefaultUserTimeoutAction](./serializedparentaction-definitions-serializedsetdevicedefaultusertimeoutaction.md) – `https://timelimit.io/SerializedParentAction#/definitions/SerializedSetDeviceDefaultUserTimeoutAction`
|
||||
- [SerializedSetDeviceUserAction](./serializedparentaction-anyof-serializedsetdeviceuseraction.md) – `https://timelimit.io/SerializedParentAction#/anyOf/19`
|
||||
- [SerializedSetDeviceUserAction](./serializedparentaction-definitions-serializedsetdeviceuseraction.md) – `https://timelimit.io/SerializedParentAction#/definitions/SerializedSetDeviceUserAction`
|
||||
- [SerializedSetKeepSignedInAction](./serializedparentaction-anyof-serializedsetkeepsignedinaction.md) – `https://timelimit.io/SerializedParentAction#/anyOf/20`
|
||||
- [SerializedSetDeviceUserAction](./serializedparentaction-anyof-serializedsetdeviceuseraction.md) – `https://timelimit.io/SerializedParentAction#/anyOf/21`
|
||||
- [SerializedSetKeepSignedInAction](./serializedparentaction-definitions-serializedsetkeepsignedinaction.md) – `https://timelimit.io/SerializedParentAction#/definitions/SerializedSetKeepSignedInAction`
|
||||
- [SerializedSetKeepSignedInAction](./serializedparentaction-anyof-serializedsetkeepsignedinaction.md) – `https://timelimit.io/SerializedParentAction#/anyOf/22`
|
||||
- [SerializedSetParentCategoryAction](./serializedparentaction-anyof-serializedsetparentcategoryaction.md) – `https://timelimit.io/SerializedParentAction#/anyOf/23`
|
||||
- [SerializedSetParentCategoryAction](./serializedparentaction-definitions-serializedsetparentcategoryaction.md) – `https://timelimit.io/SerializedParentAction#/definitions/SerializedSetParentCategoryAction`
|
||||
- [SerializedSetParentCategoryAction](./serializedparentaction-anyof-serializedsetparentcategoryaction.md) – `https://timelimit.io/SerializedParentAction#/anyOf/21`
|
||||
- [SerializedSetRelaxPrimaryDeviceAction](./serializedparentaction-anyof-serializedsetrelaxprimarydeviceaction.md) – `https://timelimit.io/SerializedParentAction#/anyOf/22`
|
||||
- [SerializedSetRelaxPrimaryDeviceAction](./serializedparentaction-anyof-serializedsetrelaxprimarydeviceaction.md) – `https://timelimit.io/SerializedParentAction#/anyOf/24`
|
||||
- [SerializedSetRelaxPrimaryDeviceAction](./serializedparentaction-definitions-serializedsetrelaxprimarydeviceaction.md) – `https://timelimit.io/SerializedParentAction#/definitions/SerializedSetRelaxPrimaryDeviceAction`
|
||||
- [SerializedSetSendDeviceConnected](./serializedparentaction-anyof-serializedsetsenddeviceconnected.md) – `https://timelimit.io/SerializedParentAction#/anyOf/23`
|
||||
- [SerializedSetSendDeviceConnected](./serializedparentaction-definitions-serializedsetsenddeviceconnected.md) – `https://timelimit.io/SerializedParentAction#/definitions/SerializedSetSendDeviceConnected`
|
||||
- [SerializedSetSendDeviceConnected](./serializedparentaction-anyof-serializedsetsenddeviceconnected.md) – `https://timelimit.io/SerializedParentAction#/anyOf/25`
|
||||
- [SerializedSetUserDisableLimitsUntilAction](./serializedparentaction-definitions-serializedsetuserdisablelimitsuntilaction.md) – `https://timelimit.io/SerializedParentAction#/definitions/SerializedSetUserDisableLimitsUntilAction`
|
||||
- [SerializedSetUserDisableLimitsUntilAction](./serializedparentaction-anyof-serializedsetuserdisablelimitsuntilaction.md) – `https://timelimit.io/SerializedParentAction#/anyOf/24`
|
||||
- [SerializedSetUserDisableLimitsUntilAction](./serializedparentaction-anyof-serializedsetuserdisablelimitsuntilaction.md) – `https://timelimit.io/SerializedParentAction#/anyOf/26`
|
||||
- [SerializedSetUserTimezoneAction](./serializedparentaction-definitions-serializedsetusertimezoneaction.md) – `https://timelimit.io/SerializedParentAction#/definitions/SerializedSetUserTimezoneAction`
|
||||
- [SerializedSetUserTimezoneAction](./serializedparentaction-anyof-serializedsetusertimezoneaction.md) – `https://timelimit.io/SerializedParentAction#/anyOf/25`
|
||||
- [SerializedSignOutAtDeviceAction](./serializedapplogicaction-anyof-serializedsignoutatdeviceaction.md) – `https://timelimit.io/SerializedAppLogicAction#/anyOf/4`
|
||||
- [SerializedSetUserTimezoneAction](./serializedparentaction-anyof-serializedsetusertimezoneaction.md) – `https://timelimit.io/SerializedParentAction#/anyOf/27`
|
||||
- [SerializedSignOutAtDeviceAction](./serializedapplogicaction-definitions-serializedsignoutatdeviceaction.md) – `https://timelimit.io/SerializedAppLogicAction#/definitions/SerializedSignOutAtDeviceAction`
|
||||
- [SerializedTimeLimitRule](./serializedparentaction-definitions-serializedcreatetimelimtruleaction-properties-serializedtimelimitrule.md) – `https://timelimit.io/SerializedParentAction#/definitions/SerializedCreateTimelimtRuleAction/properties/rule`
|
||||
- [SerializedTimeLimitRule](./serializedparentaction-definitions-serializedcreatetimelimtruleaction-properties-serializedtimelimitrule.md) – `https://timelimit.io/SerializedParentAction#/definitions/SerializedCreateTimelimtRuleAction/properties/rule`
|
||||
- [SerializedSignOutAtDeviceAction](./serializedapplogicaction-anyof-serializedsignoutatdeviceaction.md) – `https://timelimit.io/SerializedAppLogicAction#/anyOf/5`
|
||||
- [SerializedTimeLimitRule](./serializedparentaction-definitions-serializedtimelimitrule.md) – `https://timelimit.io/SerializedParentAction#/definitions/SerializedTimeLimitRule`
|
||||
- [SerializedUpdateAppActivitiesAction](./serializedapplogicaction-anyof-serializedupdateappactivitiesaction.md) – `https://timelimit.io/SerializedAppLogicAction#/anyOf/6`
|
||||
- [SerializedTimeLimitRule](./serializedparentaction-definitions-serializedcreatetimelimtruleaction-properties-serializedtimelimitrule.md) – `https://timelimit.io/SerializedParentAction#/definitions/SerializedCreateTimelimtRuleAction/properties/rule`
|
||||
- [SerializedTimeLimitRule](./serializedparentaction-definitions-serializedcreatetimelimtruleaction-properties-serializedtimelimitrule.md) – `https://timelimit.io/SerializedParentAction#/definitions/SerializedCreateTimelimtRuleAction/properties/rule`
|
||||
- [SerializedUpdateAppActivitiesAction](./serializedapplogicaction-anyof-serializedupdateappactivitiesaction.md) – `https://timelimit.io/SerializedAppLogicAction#/anyOf/7`
|
||||
- [SerializedUpdateAppActivitiesAction](./serializedapplogicaction-definitions-serializedupdateappactivitiesaction.md) – `https://timelimit.io/SerializedAppLogicAction#/definitions/SerializedUpdateAppActivitiesAction`
|
||||
- [SerializedUpdateCategoryBatteryLimitAction](./serializedparentaction-anyof-serializedupdatecategorybatterylimitaction.md) – `https://timelimit.io/SerializedParentAction#/anyOf/26`
|
||||
- [SerializedUpdateCategoryBatteryLimitAction](./serializedparentaction-anyof-serializedupdatecategorybatterylimitaction.md) – `https://timelimit.io/SerializedParentAction#/anyOf/28`
|
||||
- [SerializedUpdateCategoryBatteryLimitAction](./serializedparentaction-definitions-serializedupdatecategorybatterylimitaction.md) – `https://timelimit.io/SerializedParentAction#/definitions/SerializedUpdateCategoryBatteryLimitAction`
|
||||
- [SerializedUpdateCategoryBlockAllNotificationsAction](./serializedparentaction-anyof-serializedupdatecategoryblockallnotificationsaction.md) – `https://timelimit.io/SerializedParentAction#/anyOf/27`
|
||||
- [SerializedUpdateCategoryBlockAllNotificationsAction](./serializedparentaction-definitions-serializedupdatecategoryblockallnotificationsaction.md) – `https://timelimit.io/SerializedParentAction#/definitions/SerializedUpdateCategoryBlockAllNotificationsAction`
|
||||
- [SerializedUpdateCategoryBlockedTimesAction](./serializedparentaction-anyof-serializedupdatecategoryblockedtimesaction.md) – `https://timelimit.io/SerializedParentAction#/anyOf/28`
|
||||
- [SerializedUpdateCategoryBlockAllNotificationsAction](./serializedparentaction-anyof-serializedupdatecategoryblockallnotificationsaction.md) – `https://timelimit.io/SerializedParentAction#/anyOf/29`
|
||||
- [SerializedUpdateCategoryBlockedTimesAction](./serializedparentaction-definitions-serializedupdatecategoryblockedtimesaction.md) – `https://timelimit.io/SerializedParentAction#/definitions/SerializedUpdateCategoryBlockedTimesAction`
|
||||
- [SerializedUpdateCategoryBlockedTimesAction](./serializedparentaction-anyof-serializedupdatecategoryblockedtimesaction.md) – `https://timelimit.io/SerializedParentAction#/anyOf/30`
|
||||
- [SerializedUpdateCategorySortingAction](./serializedparentaction-definitions-serializedupdatecategorysortingaction.md) – `https://timelimit.io/SerializedParentAction#/definitions/SerializedUpdateCategorySortingAction`
|
||||
- [SerializedUpdateCategorySortingAction](./serializedparentaction-anyof-serializedupdatecategorysortingaction.md) – `https://timelimit.io/SerializedParentAction#/anyOf/29`
|
||||
- [SerializedUpdateCategorySortingAction](./serializedparentaction-anyof-serializedupdatecategorysortingaction.md) – `https://timelimit.io/SerializedParentAction#/anyOf/31`
|
||||
- [SerializedUpdateCategoryTemporarilyBlockedAction](./serializedparentaction-definitions-serializedupdatecategorytemporarilyblockedaction.md) – `https://timelimit.io/SerializedParentAction#/definitions/SerializedUpdateCategoryTemporarilyBlockedAction`
|
||||
- [SerializedUpdateCategoryTemporarilyBlockedAction](./serializedparentaction-anyof-serializedupdatecategorytemporarilyblockedaction.md) – `https://timelimit.io/SerializedParentAction#/anyOf/30`
|
||||
- [SerializedUpdateCategoryTimeWarningsAction](./serializedparentaction-anyof-serializedupdatecategorytimewarningsaction.md) – `https://timelimit.io/SerializedParentAction#/anyOf/31`
|
||||
- [SerializedUpdateCategoryTemporarilyBlockedAction](./serializedparentaction-anyof-serializedupdatecategorytemporarilyblockedaction.md) – `https://timelimit.io/SerializedParentAction#/anyOf/32`
|
||||
- [SerializedUpdateCategoryTimeWarningsAction](./serializedparentaction-anyof-serializedupdatecategorytimewarningsaction.md) – `https://timelimit.io/SerializedParentAction#/anyOf/33`
|
||||
- [SerializedUpdateCategoryTimeWarningsAction](./serializedparentaction-definitions-serializedupdatecategorytimewarningsaction.md) – `https://timelimit.io/SerializedParentAction#/definitions/SerializedUpdateCategoryTimeWarningsAction`
|
||||
- [SerializedUpdateCategoryTitleAction](./serializedparentaction-anyof-serializedupdatecategorytitleaction.md) – `https://timelimit.io/SerializedParentAction#/anyOf/32`
|
||||
- [SerializedUpdateCategoryTitleAction](./serializedparentaction-anyof-serializedupdatecategorytitleaction.md) – `https://timelimit.io/SerializedParentAction#/anyOf/34`
|
||||
- [SerializedUpdateCategoryTitleAction](./serializedparentaction-definitions-serializedupdatecategorytitleaction.md) – `https://timelimit.io/SerializedParentAction#/definitions/SerializedUpdateCategoryTitleAction`
|
||||
- [SerializedUpdateDeviceNameAction](./serializedparentaction-anyof-serializedupdatedevicenameaction.md) – `https://timelimit.io/SerializedParentAction#/anyOf/33`
|
||||
- [SerializedUpdateDeviceNameAction](./serializedparentaction-definitions-serializedupdatedevicenameaction.md) – `https://timelimit.io/SerializedParentAction#/definitions/SerializedUpdateDeviceNameAction`
|
||||
- [SerializedUpdateDeviceStatusAction](./serializedapplogicaction-anyof-serializedupdatedevicestatusaction.md) – `https://timelimit.io/SerializedAppLogicAction#/anyOf/7`
|
||||
- [SerializedUpdateDeviceNameAction](./serializedparentaction-anyof-serializedupdatedevicenameaction.md) – `https://timelimit.io/SerializedParentAction#/anyOf/35`
|
||||
- [SerializedUpdateDeviceStatusAction](./serializedapplogicaction-anyof-serializedupdatedevicestatusaction.md) – `https://timelimit.io/SerializedAppLogicAction#/anyOf/8`
|
||||
- [SerializedUpdateDeviceStatusAction](./serializedapplogicaction-definitions-serializedupdatedevicestatusaction.md) – `https://timelimit.io/SerializedAppLogicAction#/definitions/SerializedUpdateDeviceStatusAction`
|
||||
- [SerializedUpdateEnableActivityLevelBlockingAction](./serializedparentaction-anyof-serializedupdateenableactivitylevelblockingaction.md) – `https://timelimit.io/SerializedParentAction#/anyOf/34`
|
||||
- [SerializedUpdateEnableActivityLevelBlockingAction](./serializedparentaction-definitions-serializedupdateenableactivitylevelblockingaction.md) – `https://timelimit.io/SerializedParentAction#/definitions/SerializedUpdateEnableActivityLevelBlockingAction`
|
||||
- [SerializedUpdateEnableActivityLevelBlockingAction](./serializedparentaction-anyof-serializedupdateenableactivitylevelblockingaction.md) – `https://timelimit.io/SerializedParentAction#/anyOf/36`
|
||||
- [SerializedUpdateParentBlockedTimesAction](./serializedparentaction-definitions-serializedupdateparentblockedtimesaction.md) – `https://timelimit.io/SerializedParentAction#/definitions/SerializedUpdateParentBlockedTimesAction`
|
||||
- [SerializedUpdateParentBlockedTimesAction](./serializedparentaction-anyof-serializedupdateparentblockedtimesaction.md) – `https://timelimit.io/SerializedParentAction#/anyOf/36`
|
||||
- [SerializedUpdateParentNotificationFlagsAction](./serializedparentaction-anyof-serializedupdateparentnotificationflagsaction.md) – `https://timelimit.io/SerializedParentAction#/anyOf/37`
|
||||
- [SerializedUpdateParentBlockedTimesAction](./serializedparentaction-anyof-serializedupdateparentblockedtimesaction.md) – `https://timelimit.io/SerializedParentAction#/anyOf/38`
|
||||
- [SerializedUpdateParentNotificationFlagsAction](./serializedparentaction-definitions-serializedupdateparentnotificationflagsaction.md) – `https://timelimit.io/SerializedParentAction#/definitions/SerializedUpdateParentNotificationFlagsAction`
|
||||
- [SerializedUpdateTimelimitRuleAction](./serializedparentaction-anyof-serializedupdatetimelimitruleaction.md) – `https://timelimit.io/SerializedParentAction#/anyOf/38`
|
||||
- [SerializedUpdateParentNotificationFlagsAction](./serializedparentaction-anyof-serializedupdateparentnotificationflagsaction.md) – `https://timelimit.io/SerializedParentAction#/anyOf/39`
|
||||
- [SerializedUpdateTimelimitRuleAction](./serializedparentaction-definitions-serializedupdatetimelimitruleaction.md) – `https://timelimit.io/SerializedParentAction#/definitions/SerializedUpdateTimelimitRuleAction`
|
||||
- [SerializedUpdateTimelimitRuleAction](./serializedparentaction-anyof-serializedupdatetimelimitruleaction.md) – `https://timelimit.io/SerializedParentAction#/anyOf/40`
|
||||
- [SerializedUpdateUserFlagsAction](./serializedparentaction-definitions-serializedupdateuserflagsaction.md) – `https://timelimit.io/SerializedParentAction#/definitions/SerializedUpdateUserFlagsAction`
|
||||
- [SerializedUpdateUserFlagsAction](./serializedparentaction-anyof-serializedupdateuserflagsaction.md) – `https://timelimit.io/SerializedParentAction#/anyOf/39`
|
||||
- [SerializedUpdateUserFlagsAction](./serializedparentaction-anyof-serializedupdateuserflagsaction.md) – `https://timelimit.io/SerializedParentAction#/anyOf/41`
|
||||
- [SerializedUpdateUserLimitLoginCategory](./serializedparentaction-definitions-serializedupdateuserlimitlogincategory.md) – `https://timelimit.io/SerializedParentAction#/definitions/SerializedUpdateUserLimitLoginCategory`
|
||||
- [SerializedUpdateUserLimitLoginCategory](./serializedparentaction-anyof-serializedupdateuserlimitlogincategory.md) – `https://timelimit.io/SerializedParentAction#/anyOf/40`
|
||||
- [SerializedUpdateUserLimitLoginCategory](./serializedparentaction-anyof-serializedupdateuserlimitlogincategory.md) – `https://timelimit.io/SerializedParentAction#/anyOf/42`
|
||||
- [ServerCategoryNetworkId](./serverdatastatus-definitions-servercategorynetworkid.md) – `https://timelimit.io/ServerDataStatus#/definitions/ServerCategoryNetworkId`
|
||||
- [ServerCategoryNetworkId](./serverdatastatus-definitions-serverupdatedcategorybasedata-properties-networks-servercategorynetworkid.md) – `https://timelimit.io/ServerDataStatus#/definitions/ServerUpdatedCategoryBaseData/properties/networks/items`
|
||||
- [ServerCategoryNetworkId](./serverdatastatus-definitions-serverupdatedcategorybasedata-properties-networks-servercategorynetworkid.md) – `https://timelimit.io/ServerDataStatus#/definitions/ServerUpdatedCategoryBaseData/properties/networks/items`
|
||||
- [ServerDeviceData](./serverdatastatus-definitions-serverdevicelist-properties-data-serverdevicedata.md) – `https://timelimit.io/ServerDataStatus#/definitions/ServerDeviceList/properties/data/items`
|
||||
- [ServerDeviceData](./serverdatastatus-definitions-serverdevicelist-properties-data-serverdevicedata.md) – `https://timelimit.io/ServerDataStatus#/definitions/ServerDeviceList/properties/data/items`
|
||||
- [ServerDeviceData](./serverdatastatus-definitions-serverdevicedata.md) – `https://timelimit.io/ServerDataStatus#/definitions/ServerDeviceData`
|
||||
- [ServerDeviceData](./serverdatastatus-definitions-serverdevicelist-properties-data-serverdevicedata.md) – `https://timelimit.io/ServerDataStatus#/definitions/ServerDeviceList/properties/data/items`
|
||||
- [ServerDeviceList](./serverdatastatus-properties-serverdevicelist.md) – `https://timelimit.io/ServerDataStatus#/properties/devices`
|
||||
- [ServerDeviceList](./serverdatastatus-definitions-serverdevicelist.md) – `https://timelimit.io/ServerDataStatus#/definitions/ServerDeviceList`
|
||||
- [ServerInstalledAppsData](./serverdatastatus-properties-apps-serverinstalledappsdata.md) – `https://timelimit.io/ServerDataStatus#/properties/apps/items`
|
||||
- [ServerDeviceList](./serverdatastatus-properties-serverdevicelist.md) – `https://timelimit.io/ServerDataStatus#/properties/devices`
|
||||
- [ServerInstalledAppsData](./serverdatastatus-definitions-serverinstalledappsdata.md) – `https://timelimit.io/ServerDataStatus#/definitions/ServerInstalledAppsData`
|
||||
- [ServerInstalledAppsData](./serverdatastatus-properties-apps-serverinstalledappsdata.md) – `https://timelimit.io/ServerDataStatus#/properties/apps/items`
|
||||
- [ServerSessionDurationItem](./serverdatastatus-definitions-serverupdatedcategoryusedtimes-properties-sessiondurations-serversessiondurationitem.md) – `https://timelimit.io/ServerDataStatus#/definitions/ServerUpdatedCategoryUsedTimes/properties/sessionDurations/items`
|
||||
- [ServerSessionDurationItem](./serverdatastatus-definitions-serverupdatedcategoryusedtimes-properties-sessiondurations-serversessiondurationitem.md) – `https://timelimit.io/ServerDataStatus#/definitions/ServerUpdatedCategoryUsedTimes/properties/sessionDurations/items`
|
||||
- [ServerSessionDurationItem](./serverdatastatus-definitions-serversessiondurationitem.md) – `https://timelimit.io/ServerDataStatus#/definitions/ServerSessionDurationItem`
|
||||
- [ServerSessionDurationItem](./serverdatastatus-definitions-serverupdatedcategoryusedtimes-properties-sessiondurations-serversessiondurationitem.md) – `https://timelimit.io/ServerDataStatus#/definitions/ServerUpdatedCategoryUsedTimes/properties/sessionDurations/items`
|
||||
- [ServerSessionDurationItem](./serverdatastatus-definitions-serverupdatedcategoryusedtimes-properties-sessiondurations-serversessiondurationitem.md) – `https://timelimit.io/ServerDataStatus#/definitions/ServerUpdatedCategoryUsedTimes/properties/sessionDurations/items`
|
||||
- [ServerTimeLimitRule](./serverdatastatus-definitions-serverupdatedtimelimitrules-properties-rules-servertimelimitrule.md) – `https://timelimit.io/ServerDataStatus#/definitions/ServerUpdatedTimeLimitRules/properties/rules/items`
|
||||
- [ServerTimeLimitRule](./serverdatastatus-definitions-serverupdatedtimelimitrules-properties-rules-servertimelimitrule.md) – `https://timelimit.io/ServerDataStatus#/definitions/ServerUpdatedTimeLimitRules/properties/rules/items`
|
||||
- [ServerTimeLimitRule](./serverdatastatus-definitions-servertimelimitrule.md) – `https://timelimit.io/ServerDataStatus#/definitions/ServerTimeLimitRule`
|
||||
- [ServerUpdatedCategoryAssignedApps](./serverdatastatus-definitions-serverupdatedcategoryassignedapps.md) – `https://timelimit.io/ServerDataStatus#/definitions/ServerUpdatedCategoryAssignedApps`
|
||||
- [ServerTimeLimitRule](./serverdatastatus-definitions-serverupdatedtimelimitrules-properties-rules-servertimelimitrule.md) – `https://timelimit.io/ServerDataStatus#/definitions/ServerUpdatedTimeLimitRules/properties/rules/items`
|
||||
- [ServerUpdatedCategoryAssignedApps](./serverdatastatus-properties-categoryapp-serverupdatedcategoryassignedapps.md) – `https://timelimit.io/ServerDataStatus#/properties/categoryApp/items`
|
||||
- [ServerUpdatedCategoryAssignedApps](./serverdatastatus-definitions-serverupdatedcategoryassignedapps.md) – `https://timelimit.io/ServerDataStatus#/definitions/ServerUpdatedCategoryAssignedApps`
|
||||
- [ServerUpdatedCategoryBaseData](./serverdatastatus-properties-categorybase-serverupdatedcategorybasedata.md) – `https://timelimit.io/ServerDataStatus#/properties/categoryBase/items`
|
||||
- [ServerUpdatedCategoryBaseData](./serverdatastatus-definitions-serverupdatedcategorybasedata.md) – `https://timelimit.io/ServerDataStatus#/definitions/ServerUpdatedCategoryBaseData`
|
||||
- [ServerUpdatedCategoryUsedTimes](./serverdatastatus-definitions-serverupdatedcategoryusedtimes.md) – `https://timelimit.io/ServerDataStatus#/definitions/ServerUpdatedCategoryUsedTimes`
|
||||
@@ -193,15 +204,14 @@
|
||||
- [ServerUsedTimeItem](./serverdatastatus-definitions-serverupdatedcategoryusedtimes-properties-times-serverusedtimeitem.md) – `https://timelimit.io/ServerDataStatus#/definitions/ServerUpdatedCategoryUsedTimes/properties/times/items`
|
||||
- [ServerUsedTimeItem](./serverdatastatus-definitions-serverupdatedcategoryusedtimes-properties-times-serverusedtimeitem.md) – `https://timelimit.io/ServerDataStatus#/definitions/ServerUpdatedCategoryUsedTimes/properties/times/items`
|
||||
- [ServerUserEntry](./serverdatastatus-definitions-serveruserlist-properties-data-serveruserentry.md) – `https://timelimit.io/ServerDataStatus#/definitions/ServerUserList/properties/data/items`
|
||||
- [ServerUserEntry](./serverdatastatus-definitions-serveruserentry.md) – `https://timelimit.io/ServerDataStatus#/definitions/ServerUserEntry`
|
||||
- [ServerUserEntry](./serverdatastatus-definitions-serveruserlist-properties-data-serveruserentry.md) – `https://timelimit.io/ServerDataStatus#/definitions/ServerUserList/properties/data/items`
|
||||
- [ServerUserEntry](./serverdatastatus-definitions-serveruserentry.md) – `https://timelimit.io/ServerDataStatus#/definitions/ServerUserEntry`
|
||||
- [ServerUserList](./serverdatastatus-properties-serveruserlist.md) – `https://timelimit.io/ServerDataStatus#/properties/users`
|
||||
- [ServerUserList](./serverdatastatus-definitions-serveruserlist.md) – `https://timelimit.io/ServerDataStatus#/definitions/ServerUserList`
|
||||
- [Untitled object in ClientPullChangesRequest](./clientpullchangesrequest-definitions-clientdatastatus-properties-categories.md) – `https://timelimit.io/ClientPullChangesRequest#/definitions/ClientDataStatus/properties/categories`
|
||||
- [Untitled object in ClientPullChangesRequest](./clientpullchangesrequest-definitions-clientdatastatus-properties-apps.md) – `https://timelimit.io/ClientPullChangesRequest#/definitions/ClientDataStatus/properties/apps`
|
||||
- [Untitled object in ClientPullChangesRequest](./clientpullchangesrequest-definitions-clientdatastatus-properties-apps.md) – `https://timelimit.io/ClientPullChangesRequest#/definitions/ClientDataStatus/properties/apps`
|
||||
- [Untitled object in ClientPullChangesRequest](./clientpullchangesrequest-definitions-clientdatastatus-properties-categories.md) – `https://timelimit.io/ClientPullChangesRequest#/definitions/ClientDataStatus/properties/categories`
|
||||
- [Untitled object in ClientPullChangesRequest](./clientpullchangesrequest-definitions-clientdatastatus-properties-apps.md) – `https://timelimit.io/ClientPullChangesRequest#/definitions/ClientDataStatus/properties/apps`
|
||||
- [Untitled object in ClientPushChangesRequest](./clientpushchangesrequest-properties-actions-items.md) – `https://timelimit.io/ClientPushChangesRequest#/properties/actions/items`
|
||||
- [Untitled object in ClientPullChangesRequest](./clientpullchangesrequest-definitions-clientdatastatus-properties-categories.md) – `https://timelimit.io/ClientPullChangesRequest#/definitions/ClientDataStatus/properties/categories`
|
||||
- [Untitled object in SerializedAppLogicAction](./serializedapplogicaction-definitions-serializedaddusedtimeactionversion2-properties-i-items.md) – `https://timelimit.io/SerializedAppLogicAction#/definitions/SerializedAddUsedTimeActionVersion2/properties/i/items`
|
||||
- [Untitled object in SerializedAppLogicAction](./serializedapplogicaction-definitions-serializedaddusedtimeactionversion2-properties-i-items.md) – `https://timelimit.io/SerializedAppLogicAction#/definitions/SerializedAddUsedTimeActionVersion2/properties/i/items`
|
||||
|
||||
@@ -240,6 +250,7 @@
|
||||
- [Untitled array in ServerDataStatus](./serverdatastatus-definitions-serverinstalledappsdata-properties-activities.md) – `https://timelimit.io/ServerDataStatus#/definitions/ServerInstalledAppsData/properties/activities`
|
||||
- [Untitled array in ServerDataStatus](./serverdatastatus-properties-rmcategories.md) – `https://timelimit.io/ServerDataStatus#/properties/rmCategories`
|
||||
- [Untitled array in ServerDataStatus](./serverdatastatus-properties-categorybase.md) – `https://timelimit.io/ServerDataStatus#/properties/categoryBase`
|
||||
- [Untitled array in ServerDataStatus](./serverdatastatus-definitions-serverupdatedcategorybasedata-properties-networks.md) – `https://timelimit.io/ServerDataStatus#/definitions/ServerUpdatedCategoryBaseData/properties/networks`
|
||||
- [Untitled array in ServerDataStatus](./serverdatastatus-properties-categoryapp.md) – `https://timelimit.io/ServerDataStatus#/properties/categoryApp`
|
||||
- [Untitled array in ServerDataStatus](./serverdatastatus-definitions-serverupdatedcategoryassignedapps-properties-apps.md) – `https://timelimit.io/ServerDataStatus#/definitions/ServerUpdatedCategoryAssignedApps/properties/apps`
|
||||
- [Untitled array in ServerDataStatus](./serverdatastatus-properties-usedtimes.md) – `https://timelimit.io/ServerDataStatus#/properties/usedTimes`
|
||||
@@ -251,6 +262,7 @@
|
||||
- [Untitled array in ServerDataStatus](./serverdatastatus-definitions-serverdevicelist-properties-data.md) – `https://timelimit.io/ServerDataStatus#/definitions/ServerDeviceList/properties/data`
|
||||
- [Untitled array in ServerDataStatus](./serverdatastatus-definitions-serverinstalledappsdata-properties-apps.md) – `https://timelimit.io/ServerDataStatus#/definitions/ServerInstalledAppsData/properties/apps`
|
||||
- [Untitled array in ServerDataStatus](./serverdatastatus-definitions-serverinstalledappsdata-properties-activities.md) – `https://timelimit.io/ServerDataStatus#/definitions/ServerInstalledAppsData/properties/activities`
|
||||
- [Untitled array in ServerDataStatus](./serverdatastatus-definitions-serverupdatedcategorybasedata-properties-networks.md) – `https://timelimit.io/ServerDataStatus#/definitions/ServerUpdatedCategoryBaseData/properties/networks`
|
||||
- [Untitled array in ServerDataStatus](./serverdatastatus-definitions-serverupdatedcategoryassignedapps-properties-apps.md) – `https://timelimit.io/ServerDataStatus#/definitions/ServerUpdatedCategoryAssignedApps/properties/apps`
|
||||
- [Untitled array in ServerDataStatus](./serverdatastatus-definitions-serverupdatedcategoryusedtimes-properties-times.md) – `https://timelimit.io/ServerDataStatus#/definitions/ServerUpdatedCategoryUsedTimes/properties/times`
|
||||
- [Untitled array in ServerDataStatus](./serverdatastatus-definitions-serverupdatedcategoryusedtimes-properties-sessiondurations.md) – `https://timelimit.io/ServerDataStatus#/definitions/ServerUpdatedCategoryUsedTimes/properties/sessionDurations`
|
||||
|
||||
@@ -9,6 +9,9 @@
|
||||
{
|
||||
"$ref": "#/definitions/SerializedAddUsedTimeActionVersion2"
|
||||
},
|
||||
{
|
||||
"$ref": "#/definitions/SerializedForceSyncAction"
|
||||
},
|
||||
{
|
||||
"$ref": "#/definitions/SerializedRemoveInstalledAppsAction"
|
||||
},
|
||||
@@ -224,6 +227,22 @@
|
||||
],
|
||||
"title": "SerializedAddUsedTimeActionVersion2"
|
||||
},
|
||||
"SerializedForceSyncAction": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"FORCE_SYNC"
|
||||
]
|
||||
}
|
||||
},
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"type"
|
||||
],
|
||||
"title": "SerializedForceSyncAction"
|
||||
},
|
||||
"SerializedRemoveInstalledAppsAction": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
||||
@@ -3,6 +3,9 @@
|
||||
{
|
||||
"$ref": "#/definitions/SerializedAddCategoryAppsAction"
|
||||
},
|
||||
{
|
||||
"$ref": "#/definitions/SerializedAddCategoryNetworkIdAction"
|
||||
},
|
||||
{
|
||||
"$ref": "#/definitions/SerializedAddUserAction"
|
||||
},
|
||||
@@ -36,6 +39,9 @@
|
||||
{
|
||||
"$ref": "#/definitions/SerializedRenameChildAction"
|
||||
},
|
||||
{
|
||||
"$ref": "#/definitions/SerializeResetCategoryNetworkIdsAction"
|
||||
},
|
||||
{
|
||||
"$ref": "#/definitions/SerializedResetParentBlockedTimesAction"
|
||||
},
|
||||
@@ -152,6 +158,34 @@
|
||||
],
|
||||
"title": "SerializedAddCategoryAppsAction"
|
||||
},
|
||||
"SerializedAddCategoryNetworkIdAction": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"ADD_CATEGORY_NETWORK_ID"
|
||||
]
|
||||
},
|
||||
"categoryId": {
|
||||
"type": "string"
|
||||
},
|
||||
"itemId": {
|
||||
"type": "string"
|
||||
},
|
||||
"hashedNetworkId": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"categoryId",
|
||||
"hashedNetworkId",
|
||||
"itemId",
|
||||
"type"
|
||||
],
|
||||
"title": "SerializedAddCategoryNetworkIdAction"
|
||||
},
|
||||
"SerializedAddUserAction": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -534,6 +568,26 @@
|
||||
],
|
||||
"title": "SerializedRenameChildAction"
|
||||
},
|
||||
"SerializeResetCategoryNetworkIdsAction": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"RESET_CATEGORY_NETWORK_IDS"
|
||||
]
|
||||
},
|
||||
"categoryId": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"categoryId",
|
||||
"type"
|
||||
],
|
||||
"title": "SerializeResetCategoryNetworkIdsAction"
|
||||
},
|
||||
"SerializedResetParentBlockedTimesAction": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
||||
@@ -370,6 +370,12 @@
|
||||
},
|
||||
"sort": {
|
||||
"type": "number"
|
||||
},
|
||||
"networks": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/ServerCategoryNetworkId"
|
||||
}
|
||||
}
|
||||
},
|
||||
"additionalProperties": false,
|
||||
@@ -382,6 +388,7 @@
|
||||
"extraTimeDay",
|
||||
"mblCharging",
|
||||
"mblMobile",
|
||||
"networks",
|
||||
"parentCategoryId",
|
||||
"sort",
|
||||
"tempBlockTime",
|
||||
@@ -392,6 +399,23 @@
|
||||
],
|
||||
"title": "ServerUpdatedCategoryBaseData"
|
||||
},
|
||||
"ServerCategoryNetworkId": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"itemId": {
|
||||
"type": "string"
|
||||
},
|
||||
"hashedNetworkId": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"hashedNetworkId",
|
||||
"itemId"
|
||||
],
|
||||
"title": "ServerCategoryNetworkId"
|
||||
},
|
||||
"ServerUpdatedCategoryAssignedApps": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
# Untitled string in ClientPushChangesRequest Schema
|
||||
|
||||
```txt
|
||||
https://timelimit.io/ClientPushChangesRequest#/definitions/ClientPushChangesRequestAction/properties/encodedAction
|
||||
```
|
||||
|
||||
|
||||
|
||||
|
||||
| Abstract | Extensible | Status | Identifiable | Custom Properties | Additional Properties | Access Restrictions | Defined In |
|
||||
| :------------------ | ---------- | -------------- | ----------------------- | :---------------- | --------------------- | ------------------- | ----------------------------------------------------------------------------------------------------- |
|
||||
| Can be instantiated | No | Unknown status | Unknown identifiability | Forbidden | Allowed | none | [ClientPushChangesRequest.schema.json\*](ClientPushChangesRequest.schema.json "open original schema") |
|
||||
|
||||
## encodedAction Type
|
||||
|
||||
`string`
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
# Untitled string in ClientPushChangesRequest Schema
|
||||
|
||||
```txt
|
||||
https://timelimit.io/ClientPushChangesRequest#/definitions/ClientPushChangesRequestAction/properties/integrity
|
||||
```
|
||||
|
||||
|
||||
|
||||
|
||||
| Abstract | Extensible | Status | Identifiable | Custom Properties | Additional Properties | Access Restrictions | Defined In |
|
||||
| :------------------ | ---------- | -------------- | ----------------------- | :---------------- | --------------------- | ------------------- | ----------------------------------------------------------------------------------------------------- |
|
||||
| Can be instantiated | No | Unknown status | Unknown identifiability | Forbidden | Allowed | none | [ClientPushChangesRequest.schema.json\*](ClientPushChangesRequest.schema.json "open original schema") |
|
||||
|
||||
## integrity Type
|
||||
|
||||
`string`
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
# Untitled number in ClientPushChangesRequest Schema
|
||||
|
||||
```txt
|
||||
https://timelimit.io/ClientPushChangesRequest#/definitions/ClientPushChangesRequestAction/properties/sequenceNumber
|
||||
```
|
||||
|
||||
|
||||
|
||||
|
||||
| Abstract | Extensible | Status | Identifiable | Custom Properties | Additional Properties | Access Restrictions | Defined In |
|
||||
| :------------------ | ---------- | -------------- | ----------------------- | :---------------- | --------------------- | ------------------- | ----------------------------------------------------------------------------------------------------- |
|
||||
| Can be instantiated | No | Unknown status | Unknown identifiability | Forbidden | Allowed | none | [ClientPushChangesRequest.schema.json\*](ClientPushChangesRequest.schema.json "open original schema") |
|
||||
|
||||
## sequenceNumber Type
|
||||
|
||||
`number`
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
# Untitled string in ClientPushChangesRequest Schema
|
||||
|
||||
```txt
|
||||
https://timelimit.io/ClientPushChangesRequest#/definitions/ClientPushChangesRequestAction/properties/type
|
||||
```
|
||||
|
||||
|
||||
|
||||
|
||||
| Abstract | Extensible | Status | Identifiable | Custom Properties | Additional Properties | Access Restrictions | Defined In |
|
||||
| :------------------ | ---------- | -------------- | ----------------------- | :---------------- | --------------------- | ------------------- | ----------------------------------------------------------------------------------------------------- |
|
||||
| Can be instantiated | No | Unknown status | Unknown identifiability | Forbidden | Allowed | none | [ClientPushChangesRequest.schema.json\*](ClientPushChangesRequest.schema.json "open original schema") |
|
||||
|
||||
## type Type
|
||||
|
||||
`string`
|
||||
|
||||
## type Constraints
|
||||
|
||||
**enum**: the value of this property must be equal to one of the following values:
|
||||
|
||||
| Value | Explanation |
|
||||
| :----------- | ----------- |
|
||||
| `"appLogic"` | |
|
||||
| `"child"` | |
|
||||
| `"parent"` | |
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
# Untitled string in ClientPushChangesRequest Schema
|
||||
|
||||
```txt
|
||||
https://timelimit.io/ClientPushChangesRequest#/definitions/ClientPushChangesRequestAction/properties/userId
|
||||
```
|
||||
|
||||
|
||||
|
||||
|
||||
| Abstract | Extensible | Status | Identifiable | Custom Properties | Additional Properties | Access Restrictions | Defined In |
|
||||
| :------------------ | ---------- | -------------- | ----------------------- | :---------------- | --------------------- | ------------------- | ----------------------------------------------------------------------------------------------------- |
|
||||
| Can be instantiated | No | Unknown status | Unknown identifiability | Forbidden | Allowed | none | [ClientPushChangesRequest.schema.json\*](ClientPushChangesRequest.schema.json "open original schema") |
|
||||
|
||||
## userId Type
|
||||
|
||||
`string`
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
# Untitled undefined type in ClientPushChangesRequest Schema
|
||||
|
||||
```txt
|
||||
https://timelimit.io/ClientPushChangesRequest#/definitions/ClientPushChangesRequestAction/properties
|
||||
```
|
||||
|
||||
|
||||
|
||||
|
||||
| Abstract | Extensible | Status | Identifiable | Custom Properties | Additional Properties | Access Restrictions | Defined In |
|
||||
| :------------------ | ---------- | -------------- | ----------------------- | :---------------- | --------------------- | ------------------- | ----------------------------------------------------------------------------------------------------- |
|
||||
| Can be instantiated | No | Unknown status | Unknown identifiability | Forbidden | Allowed | none | [ClientPushChangesRequest.schema.json\*](ClientPushChangesRequest.schema.json "open original schema") |
|
||||
|
||||
## properties Type
|
||||
|
||||
unknown
|
||||
@@ -0,0 +1,116 @@
|
||||
# ClientPushChangesRequestAction Schema
|
||||
|
||||
```txt
|
||||
https://timelimit.io/ClientPushChangesRequest#/definitions/ClientPushChangesRequestAction
|
||||
```
|
||||
|
||||
|
||||
|
||||
|
||||
| Abstract | Extensible | Status | Identifiable | Custom Properties | Additional Properties | Access Restrictions | Defined In |
|
||||
| :------------------ | ---------- | -------------- | ------------ | :---------------- | --------------------- | ------------------- | ----------------------------------------------------------------------------------------------------- |
|
||||
| Can be instantiated | No | Unknown status | No | Forbidden | Forbidden | none | [ClientPushChangesRequest.schema.json\*](ClientPushChangesRequest.schema.json "open original schema") |
|
||||
|
||||
## ClientPushChangesRequestAction Type
|
||||
|
||||
`object` ([ClientPushChangesRequestAction](clientpushchangesrequest-definitions-clientpushchangesrequestaction.md))
|
||||
|
||||
# ClientPushChangesRequestAction Properties
|
||||
|
||||
| Property | Type | Required | Nullable | Defined by |
|
||||
| :-------------------------------- | -------- | -------- | -------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
||||
| [encodedAction](#encodedAction) | `string` | Required | cannot be null | [ClientPushChangesRequest](clientpushchangesrequest-definitions-clientpushchangesrequestaction-properties-encodedaction.md "https://timelimit.io/ClientPushChangesRequest#/definitions/ClientPushChangesRequestAction/properties/encodedAction") |
|
||||
| [sequenceNumber](#sequenceNumber) | `number` | Required | cannot be null | [ClientPushChangesRequest](clientpushchangesrequest-definitions-clientpushchangesrequestaction-properties-sequencenumber.md "https://timelimit.io/ClientPushChangesRequest#/definitions/ClientPushChangesRequestAction/properties/sequenceNumber") |
|
||||
| [integrity](#integrity) | `string` | Required | cannot be null | [ClientPushChangesRequest](clientpushchangesrequest-definitions-clientpushchangesrequestaction-properties-integrity.md "https://timelimit.io/ClientPushChangesRequest#/definitions/ClientPushChangesRequestAction/properties/integrity") |
|
||||
| [type](#type) | `string` | Required | cannot be null | [ClientPushChangesRequest](clientpushchangesrequest-definitions-clientpushchangesrequestaction-properties-type.md "https://timelimit.io/ClientPushChangesRequest#/definitions/ClientPushChangesRequestAction/properties/type") |
|
||||
| [userId](#userId) | `string` | Required | cannot be null | [ClientPushChangesRequest](clientpushchangesrequest-definitions-clientpushchangesrequestaction-properties-userid.md "https://timelimit.io/ClientPushChangesRequest#/definitions/ClientPushChangesRequestAction/properties/userId") |
|
||||
|
||||
## encodedAction
|
||||
|
||||
|
||||
|
||||
|
||||
`encodedAction`
|
||||
|
||||
- is required
|
||||
- Type: `string`
|
||||
- cannot be null
|
||||
- defined in: [ClientPushChangesRequest](clientpushchangesrequest-definitions-clientpushchangesrequestaction-properties-encodedaction.md "https://timelimit.io/ClientPushChangesRequest#/definitions/ClientPushChangesRequestAction/properties/encodedAction")
|
||||
|
||||
### encodedAction Type
|
||||
|
||||
`string`
|
||||
|
||||
## sequenceNumber
|
||||
|
||||
|
||||
|
||||
|
||||
`sequenceNumber`
|
||||
|
||||
- is required
|
||||
- Type: `number`
|
||||
- cannot be null
|
||||
- defined in: [ClientPushChangesRequest](clientpushchangesrequest-definitions-clientpushchangesrequestaction-properties-sequencenumber.md "https://timelimit.io/ClientPushChangesRequest#/definitions/ClientPushChangesRequestAction/properties/sequenceNumber")
|
||||
|
||||
### sequenceNumber Type
|
||||
|
||||
`number`
|
||||
|
||||
## integrity
|
||||
|
||||
|
||||
|
||||
|
||||
`integrity`
|
||||
|
||||
- is required
|
||||
- Type: `string`
|
||||
- cannot be null
|
||||
- defined in: [ClientPushChangesRequest](clientpushchangesrequest-definitions-clientpushchangesrequestaction-properties-integrity.md "https://timelimit.io/ClientPushChangesRequest#/definitions/ClientPushChangesRequestAction/properties/integrity")
|
||||
|
||||
### integrity Type
|
||||
|
||||
`string`
|
||||
|
||||
## type
|
||||
|
||||
|
||||
|
||||
|
||||
`type`
|
||||
|
||||
- is required
|
||||
- Type: `string`
|
||||
- cannot be null
|
||||
- defined in: [ClientPushChangesRequest](clientpushchangesrequest-definitions-clientpushchangesrequestaction-properties-type.md "https://timelimit.io/ClientPushChangesRequest#/definitions/ClientPushChangesRequestAction/properties/type")
|
||||
|
||||
### type Type
|
||||
|
||||
`string`
|
||||
|
||||
### type Constraints
|
||||
|
||||
**enum**: the value of this property must be equal to one of the following values:
|
||||
|
||||
| Value | Explanation |
|
||||
| :----------- | ----------- |
|
||||
| `"appLogic"` | |
|
||||
| `"child"` | |
|
||||
| `"parent"` | |
|
||||
|
||||
## userId
|
||||
|
||||
|
||||
|
||||
|
||||
`userId`
|
||||
|
||||
- is required
|
||||
- Type: `string`
|
||||
- cannot be null
|
||||
- defined in: [ClientPushChangesRequest](clientpushchangesrequest-definitions-clientpushchangesrequestaction-properties-userid.md "https://timelimit.io/ClientPushChangesRequest#/definitions/ClientPushChangesRequestAction/properties/userId")
|
||||
|
||||
### userId Type
|
||||
|
||||
`string`
|
||||
@@ -0,0 +1,16 @@
|
||||
# Untitled undefined type in ClientPushChangesRequest Schema
|
||||
|
||||
```txt
|
||||
https://timelimit.io/ClientPushChangesRequest#/definitions
|
||||
```
|
||||
|
||||
|
||||
|
||||
|
||||
| Abstract | Extensible | Status | Identifiable | Custom Properties | Additional Properties | Access Restrictions | Defined In |
|
||||
| :------------------ | ---------- | -------------- | ----------------------- | :---------------- | --------------------- | ------------------- | ----------------------------------------------------------------------------------------------------- |
|
||||
| Can be instantiated | No | Unknown status | Unknown identifiability | Forbidden | Allowed | none | [ClientPushChangesRequest.schema.json\*](ClientPushChangesRequest.schema.json "open original schema") |
|
||||
|
||||
## definitions Type
|
||||
|
||||
unknown
|
||||
@@ -13,4 +13,4 @@ https://timelimit.io/ClientPushChangesRequest#/properties/actions
|
||||
|
||||
## actions Type
|
||||
|
||||
`object[]` ([Details](clientpushchangesrequest-properties-actions-items.md))
|
||||
`object[]` ([ClientPushChangesRequestAction](clientpushchangesrequest-definitions-clientpushchangesrequestaction.md))
|
||||
|
||||
@@ -9,12 +9,120 @@ https://timelimit.io/ClientPushChangesRequest
|
||||
|
||||
| Abstract | Extensible | Status | Identifiable | Custom Properties | Additional Properties | Access Restrictions | Defined In |
|
||||
| :------------------ | ---------- | -------------- | ------------ | :---------------- | --------------------- | ------------------- | --------------------------------------------------------------------------------------------------- |
|
||||
| Can be instantiated | No | Unknown status | No | Forbidden | Forbidden | none | [ClientPushChangesRequest.schema.json](ClientPushChangesRequest.schema.json "open original schema") |
|
||||
| Can be instantiated | Yes | Unknown status | No | Forbidden | Forbidden | none | [ClientPushChangesRequest.schema.json](ClientPushChangesRequest.schema.json "open original schema") |
|
||||
|
||||
## ClientPushChangesRequest Type
|
||||
|
||||
`object` ([ClientPushChangesRequest](clientpushchangesrequest.md))
|
||||
|
||||
# ClientPushChangesRequest Definitions
|
||||
|
||||
## Definitions group ClientPushChangesRequestAction
|
||||
|
||||
Reference this group by using
|
||||
|
||||
```json
|
||||
{"$ref":"https://timelimit.io/ClientPushChangesRequest#/definitions/ClientPushChangesRequestAction"}
|
||||
```
|
||||
|
||||
| Property | Type | Required | Nullable | Defined by |
|
||||
| :-------------------------------- | -------- | -------- | -------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
||||
| [encodedAction](#encodedAction) | `string` | Required | cannot be null | [ClientPushChangesRequest](clientpushchangesrequest-definitions-clientpushchangesrequestaction-properties-encodedaction.md "https://timelimit.io/ClientPushChangesRequest#/definitions/ClientPushChangesRequestAction/properties/encodedAction") |
|
||||
| [sequenceNumber](#sequenceNumber) | `number` | Required | cannot be null | [ClientPushChangesRequest](clientpushchangesrequest-definitions-clientpushchangesrequestaction-properties-sequencenumber.md "https://timelimit.io/ClientPushChangesRequest#/definitions/ClientPushChangesRequestAction/properties/sequenceNumber") |
|
||||
| [integrity](#integrity) | `string` | Required | cannot be null | [ClientPushChangesRequest](clientpushchangesrequest-definitions-clientpushchangesrequestaction-properties-integrity.md "https://timelimit.io/ClientPushChangesRequest#/definitions/ClientPushChangesRequestAction/properties/integrity") |
|
||||
| [type](#type) | `string` | Required | cannot be null | [ClientPushChangesRequest](clientpushchangesrequest-definitions-clientpushchangesrequestaction-properties-type.md "https://timelimit.io/ClientPushChangesRequest#/definitions/ClientPushChangesRequestAction/properties/type") |
|
||||
| [userId](#userId) | `string` | Required | cannot be null | [ClientPushChangesRequest](clientpushchangesrequest-definitions-clientpushchangesrequestaction-properties-userid.md "https://timelimit.io/ClientPushChangesRequest#/definitions/ClientPushChangesRequestAction/properties/userId") |
|
||||
|
||||
### encodedAction
|
||||
|
||||
|
||||
|
||||
|
||||
`encodedAction`
|
||||
|
||||
- is required
|
||||
- Type: `string`
|
||||
- cannot be null
|
||||
- defined in: [ClientPushChangesRequest](clientpushchangesrequest-definitions-clientpushchangesrequestaction-properties-encodedaction.md "https://timelimit.io/ClientPushChangesRequest#/definitions/ClientPushChangesRequestAction/properties/encodedAction")
|
||||
|
||||
#### encodedAction Type
|
||||
|
||||
`string`
|
||||
|
||||
### sequenceNumber
|
||||
|
||||
|
||||
|
||||
|
||||
`sequenceNumber`
|
||||
|
||||
- is required
|
||||
- Type: `number`
|
||||
- cannot be null
|
||||
- defined in: [ClientPushChangesRequest](clientpushchangesrequest-definitions-clientpushchangesrequestaction-properties-sequencenumber.md "https://timelimit.io/ClientPushChangesRequest#/definitions/ClientPushChangesRequestAction/properties/sequenceNumber")
|
||||
|
||||
#### sequenceNumber Type
|
||||
|
||||
`number`
|
||||
|
||||
### integrity
|
||||
|
||||
|
||||
|
||||
|
||||
`integrity`
|
||||
|
||||
- is required
|
||||
- Type: `string`
|
||||
- cannot be null
|
||||
- defined in: [ClientPushChangesRequest](clientpushchangesrequest-definitions-clientpushchangesrequestaction-properties-integrity.md "https://timelimit.io/ClientPushChangesRequest#/definitions/ClientPushChangesRequestAction/properties/integrity")
|
||||
|
||||
#### integrity Type
|
||||
|
||||
`string`
|
||||
|
||||
### type
|
||||
|
||||
|
||||
|
||||
|
||||
`type`
|
||||
|
||||
- is required
|
||||
- Type: `string`
|
||||
- cannot be null
|
||||
- defined in: [ClientPushChangesRequest](clientpushchangesrequest-definitions-clientpushchangesrequestaction-properties-type.md "https://timelimit.io/ClientPushChangesRequest#/definitions/ClientPushChangesRequestAction/properties/type")
|
||||
|
||||
#### type Type
|
||||
|
||||
`string`
|
||||
|
||||
#### type Constraints
|
||||
|
||||
**enum**: the value of this property must be equal to one of the following values:
|
||||
|
||||
| Value | Explanation |
|
||||
| :----------- | ----------- |
|
||||
| `"appLogic"` | |
|
||||
| `"child"` | |
|
||||
| `"parent"` | |
|
||||
|
||||
### userId
|
||||
|
||||
|
||||
|
||||
|
||||
`userId`
|
||||
|
||||
- is required
|
||||
- Type: `string`
|
||||
- cannot be null
|
||||
- defined in: [ClientPushChangesRequest](clientpushchangesrequest-definitions-clientpushchangesrequestaction-properties-userid.md "https://timelimit.io/ClientPushChangesRequest#/definitions/ClientPushChangesRequestAction/properties/userId")
|
||||
|
||||
#### userId Type
|
||||
|
||||
`string`
|
||||
|
||||
# ClientPushChangesRequest Properties
|
||||
|
||||
| Property | Type | Required | Nullable | Defined by |
|
||||
@@ -46,10 +154,10 @@ https://timelimit.io/ClientPushChangesRequest
|
||||
`actions`
|
||||
|
||||
- is required
|
||||
- Type: `object[]` ([Details](clientpushchangesrequest-properties-actions-items.md))
|
||||
- Type: `object[]` ([ClientPushChangesRequestAction](clientpushchangesrequest-definitions-clientpushchangesrequestaction.md))
|
||||
- cannot be null
|
||||
- defined in: [ClientPushChangesRequest](clientpushchangesrequest-properties-actions.md "https://timelimit.io/ClientPushChangesRequest#/properties/actions")
|
||||
|
||||
### actions Type
|
||||
|
||||
`object[]` ([Details](clientpushchangesrequest-properties-actions-items.md))
|
||||
`object[]` ([ClientPushChangesRequestAction](clientpushchangesrequest-definitions-clientpushchangesrequestaction.md))
|
||||
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
# Untitled string in SerializedAppLogicAction Schema
|
||||
|
||||
```txt
|
||||
https://timelimit.io/SerializedAppLogicAction#/definitions/SerializedForceSyncAction/properties/type
|
||||
```
|
||||
|
||||
|
||||
|
||||
|
||||
| Abstract | Extensible | Status | Identifiable | Custom Properties | Additional Properties | Access Restrictions | Defined In |
|
||||
| :------------------ | ---------- | -------------- | ----------------------- | :---------------- | --------------------- | ------------------- | ----------------------------------------------------------------------------------------------------- |
|
||||
| Can be instantiated | No | Unknown status | Unknown identifiability | Forbidden | Allowed | none | [SerializedAppLogicAction.schema.json\*](SerializedAppLogicAction.schema.json "open original schema") |
|
||||
|
||||
## type Type
|
||||
|
||||
`string`
|
||||
|
||||
## type Constraints
|
||||
|
||||
**enum**: the value of this property must be equal to one of the following values:
|
||||
|
||||
| Value | Explanation |
|
||||
| :------------- | ----------- |
|
||||
| `"FORCE_SYNC"` | |
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
# Untitled undefined type in SerializedAppLogicAction Schema
|
||||
|
||||
```txt
|
||||
https://timelimit.io/SerializedAppLogicAction#/definitions/SerializedForceSyncAction/properties
|
||||
```
|
||||
|
||||
|
||||
|
||||
|
||||
| Abstract | Extensible | Status | Identifiable | Custom Properties | Additional Properties | Access Restrictions | Defined In |
|
||||
| :------------------ | ---------- | -------------- | ----------------------- | :---------------- | --------------------- | ------------------- | ----------------------------------------------------------------------------------------------------- |
|
||||
| Can be instantiated | No | Unknown status | Unknown identifiability | Forbidden | Allowed | none | [SerializedAppLogicAction.schema.json\*](SerializedAppLogicAction.schema.json "open original schema") |
|
||||
|
||||
## properties Type
|
||||
|
||||
unknown
|
||||
@@ -0,0 +1,46 @@
|
||||
# SerializedForceSyncAction Schema
|
||||
|
||||
```txt
|
||||
https://timelimit.io/SerializedAppLogicAction#/definitions/SerializedForceSyncAction
|
||||
```
|
||||
|
||||
|
||||
|
||||
|
||||
| Abstract | Extensible | Status | Identifiable | Custom Properties | Additional Properties | Access Restrictions | Defined In |
|
||||
| :------------------ | ---------- | -------------- | ------------ | :---------------- | --------------------- | ------------------- | ----------------------------------------------------------------------------------------------------- |
|
||||
| Can be instantiated | No | Unknown status | No | Forbidden | Forbidden | none | [SerializedAppLogicAction.schema.json\*](SerializedAppLogicAction.schema.json "open original schema") |
|
||||
|
||||
## SerializedForceSyncAction Type
|
||||
|
||||
`object` ([SerializedForceSyncAction](serializedapplogicaction-definitions-serializedforcesyncaction.md))
|
||||
|
||||
# SerializedForceSyncAction Properties
|
||||
|
||||
| Property | Type | Required | Nullable | Defined by |
|
||||
| :------------ | -------- | -------- | -------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
||||
| [type](#type) | `string` | Required | cannot be null | [SerializedAppLogicAction](serializedapplogicaction-definitions-serializedforcesyncaction-properties-type.md "https://timelimit.io/SerializedAppLogicAction#/definitions/SerializedForceSyncAction/properties/type") |
|
||||
|
||||
## type
|
||||
|
||||
|
||||
|
||||
|
||||
`type`
|
||||
|
||||
- is required
|
||||
- Type: `string`
|
||||
- cannot be null
|
||||
- defined in: [SerializedAppLogicAction](serializedapplogicaction-definitions-serializedforcesyncaction-properties-type.md "https://timelimit.io/SerializedAppLogicAction#/definitions/SerializedForceSyncAction/properties/type")
|
||||
|
||||
### type Type
|
||||
|
||||
`string`
|
||||
|
||||
### type Constraints
|
||||
|
||||
**enum**: the value of this property must be equal to one of the following values:
|
||||
|
||||
| Value | Explanation |
|
||||
| :------------- | ----------- |
|
||||
| `"FORCE_SYNC"` | |
|
||||
@@ -20,6 +20,7 @@ any of
|
||||
- [SerializedAddInstalledAppsAction](serializedapplogicaction-definitions-serializedaddinstalledappsaction.md "check type definition")
|
||||
- [SerializedAddUsedTimeAction](serializedapplogicaction-definitions-serializedaddusedtimeaction.md "check type definition")
|
||||
- [SerializedAddUsedTimeActionVersion2](serializedapplogicaction-definitions-serializedaddusedtimeactionversion2.md "check type definition")
|
||||
- [SerializedForceSyncAction](serializedapplogicaction-definitions-serializedforcesyncaction.md "check type definition")
|
||||
- [SerializedRemoveInstalledAppsAction](serializedapplogicaction-definitions-serializedremoveinstalledappsaction.md "check type definition")
|
||||
- [SerializedSignOutAtDeviceAction](serializedapplogicaction-definitions-serializedsignoutatdeviceaction.md "check type definition")
|
||||
- [SerialiezdTriedDisablingDeviceAdminAction](serializedapplogicaction-definitions-serialiezdtrieddisablingdeviceadminaction.md "check type definition")
|
||||
@@ -372,6 +373,42 @@ Reference this group by using
|
||||
|
||||
`number`
|
||||
|
||||
## Definitions group SerializedForceSyncAction
|
||||
|
||||
Reference this group by using
|
||||
|
||||
```json
|
||||
{"$ref":"https://timelimit.io/SerializedAppLogicAction#/definitions/SerializedForceSyncAction"}
|
||||
```
|
||||
|
||||
| Property | Type | Required | Nullable | Defined by |
|
||||
| :------------ | -------- | -------- | -------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
||||
| [type](#type) | `string` | Required | cannot be null | [SerializedAppLogicAction](serializedapplogicaction-definitions-serializedforcesyncaction-properties-type.md "https://timelimit.io/SerializedAppLogicAction#/definitions/SerializedForceSyncAction/properties/type") |
|
||||
|
||||
### type
|
||||
|
||||
|
||||
|
||||
|
||||
`type`
|
||||
|
||||
- is required
|
||||
- Type: `string`
|
||||
- cannot be null
|
||||
- defined in: [SerializedAppLogicAction](serializedapplogicaction-definitions-serializedforcesyncaction-properties-type.md "https://timelimit.io/SerializedAppLogicAction#/definitions/SerializedForceSyncAction/properties/type")
|
||||
|
||||
#### type Type
|
||||
|
||||
`string`
|
||||
|
||||
#### type Constraints
|
||||
|
||||
**enum**: the value of this property must be equal to one of the following values:
|
||||
|
||||
| Value | Explanation |
|
||||
| :------------- | ----------- |
|
||||
| `"FORCE_SYNC"` | |
|
||||
|
||||
## Definitions group SerializedRemoveInstalledAppsAction
|
||||
|
||||
Reference this group by using
|
||||
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
# Untitled string in SerializedParentAction Schema
|
||||
|
||||
```txt
|
||||
https://timelimit.io/SerializedParentAction#/definitions/SerializedAddCategoryNetworkIdAction/properties/categoryId
|
||||
```
|
||||
|
||||
|
||||
|
||||
|
||||
| Abstract | Extensible | Status | Identifiable | Custom Properties | Additional Properties | Access Restrictions | Defined In |
|
||||
| :------------------ | ---------- | -------------- | ----------------------- | :---------------- | --------------------- | ------------------- | ------------------------------------------------------------------------------------------------- |
|
||||
| Can be instantiated | No | Unknown status | Unknown identifiability | Forbidden | Allowed | none | [SerializedParentAction.schema.json\*](SerializedParentAction.schema.json "open original schema") |
|
||||
|
||||
## categoryId Type
|
||||
|
||||
`string`
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
# Untitled string in SerializedParentAction Schema
|
||||
|
||||
```txt
|
||||
https://timelimit.io/SerializedParentAction#/definitions/SerializedAddCategoryNetworkIdAction/properties/hashedNetworkId
|
||||
```
|
||||
|
||||
|
||||
|
||||
|
||||
| Abstract | Extensible | Status | Identifiable | Custom Properties | Additional Properties | Access Restrictions | Defined In |
|
||||
| :------------------ | ---------- | -------------- | ----------------------- | :---------------- | --------------------- | ------------------- | ------------------------------------------------------------------------------------------------- |
|
||||
| Can be instantiated | No | Unknown status | Unknown identifiability | Forbidden | Allowed | none | [SerializedParentAction.schema.json\*](SerializedParentAction.schema.json "open original schema") |
|
||||
|
||||
## hashedNetworkId Type
|
||||
|
||||
`string`
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
# Untitled string in SerializedParentAction Schema
|
||||
|
||||
```txt
|
||||
https://timelimit.io/SerializedParentAction#/definitions/SerializedAddCategoryNetworkIdAction/properties/itemId
|
||||
```
|
||||
|
||||
|
||||
|
||||
|
||||
| Abstract | Extensible | Status | Identifiable | Custom Properties | Additional Properties | Access Restrictions | Defined In |
|
||||
| :------------------ | ---------- | -------------- | ----------------------- | :---------------- | --------------------- | ------------------- | ------------------------------------------------------------------------------------------------- |
|
||||
| Can be instantiated | No | Unknown status | Unknown identifiability | Forbidden | Allowed | none | [SerializedParentAction.schema.json\*](SerializedParentAction.schema.json "open original schema") |
|
||||
|
||||
## itemId Type
|
||||
|
||||
`string`
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
# Untitled string in SerializedParentAction Schema
|
||||
|
||||
```txt
|
||||
https://timelimit.io/SerializedParentAction#/definitions/SerializedAddCategoryNetworkIdAction/properties/type
|
||||
```
|
||||
|
||||
|
||||
|
||||
|
||||
| Abstract | Extensible | Status | Identifiable | Custom Properties | Additional Properties | Access Restrictions | Defined In |
|
||||
| :------------------ | ---------- | -------------- | ----------------------- | :---------------- | --------------------- | ------------------- | ------------------------------------------------------------------------------------------------- |
|
||||
| Can be instantiated | No | Unknown status | Unknown identifiability | Forbidden | Allowed | none | [SerializedParentAction.schema.json\*](SerializedParentAction.schema.json "open original schema") |
|
||||
|
||||
## type Type
|
||||
|
||||
`string`
|
||||
|
||||
## type Constraints
|
||||
|
||||
**enum**: the value of this property must be equal to one of the following values:
|
||||
|
||||
| Value | Explanation |
|
||||
| :-------------------------- | ----------- |
|
||||
| `"ADD_CATEGORY_NETWORK_ID"` | |
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
# Untitled undefined type in SerializedParentAction Schema
|
||||
|
||||
```txt
|
||||
https://timelimit.io/SerializedParentAction#/definitions/SerializedAddCategoryNetworkIdAction/properties
|
||||
```
|
||||
|
||||
|
||||
|
||||
|
||||
| Abstract | Extensible | Status | Identifiable | Custom Properties | Additional Properties | Access Restrictions | Defined In |
|
||||
| :------------------ | ---------- | -------------- | ----------------------- | :---------------- | --------------------- | ------------------- | ------------------------------------------------------------------------------------------------- |
|
||||
| Can be instantiated | No | Unknown status | Unknown identifiability | Forbidden | Allowed | none | [SerializedParentAction.schema.json\*](SerializedParentAction.schema.json "open original schema") |
|
||||
|
||||
## properties Type
|
||||
|
||||
unknown
|
||||
+97
@@ -0,0 +1,97 @@
|
||||
# SerializedAddCategoryNetworkIdAction Schema
|
||||
|
||||
```txt
|
||||
https://timelimit.io/SerializedParentAction#/definitions/SerializedAddCategoryNetworkIdAction
|
||||
```
|
||||
|
||||
|
||||
|
||||
|
||||
| Abstract | Extensible | Status | Identifiable | Custom Properties | Additional Properties | Access Restrictions | Defined In |
|
||||
| :------------------ | ---------- | -------------- | ------------ | :---------------- | --------------------- | ------------------- | ------------------------------------------------------------------------------------------------- |
|
||||
| Can be instantiated | No | Unknown status | No | Forbidden | Forbidden | none | [SerializedParentAction.schema.json\*](SerializedParentAction.schema.json "open original schema") |
|
||||
|
||||
## SerializedAddCategoryNetworkIdAction Type
|
||||
|
||||
`object` ([SerializedAddCategoryNetworkIdAction](serializedparentaction-definitions-serializedaddcategorynetworkidaction.md))
|
||||
|
||||
# SerializedAddCategoryNetworkIdAction Properties
|
||||
|
||||
| Property | Type | Required | Nullable | Defined by |
|
||||
| :---------------------------------- | -------- | -------- | -------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| [type](#type) | `string` | Required | cannot be null | [SerializedParentAction](serializedparentaction-definitions-serializedaddcategorynetworkidaction-properties-type.md "https://timelimit.io/SerializedParentAction#/definitions/SerializedAddCategoryNetworkIdAction/properties/type") |
|
||||
| [categoryId](#categoryId) | `string` | Required | cannot be null | [SerializedParentAction](serializedparentaction-definitions-serializedaddcategorynetworkidaction-properties-categoryid.md "https://timelimit.io/SerializedParentAction#/definitions/SerializedAddCategoryNetworkIdAction/properties/categoryId") |
|
||||
| [itemId](#itemId) | `string` | Required | cannot be null | [SerializedParentAction](serializedparentaction-definitions-serializedaddcategorynetworkidaction-properties-itemid.md "https://timelimit.io/SerializedParentAction#/definitions/SerializedAddCategoryNetworkIdAction/properties/itemId") |
|
||||
| [hashedNetworkId](#hashedNetworkId) | `string` | Required | cannot be null | [SerializedParentAction](serializedparentaction-definitions-serializedaddcategorynetworkidaction-properties-hashednetworkid.md "https://timelimit.io/SerializedParentAction#/definitions/SerializedAddCategoryNetworkIdAction/properties/hashedNetworkId") |
|
||||
|
||||
## type
|
||||
|
||||
|
||||
|
||||
|
||||
`type`
|
||||
|
||||
- is required
|
||||
- Type: `string`
|
||||
- cannot be null
|
||||
- defined in: [SerializedParentAction](serializedparentaction-definitions-serializedaddcategorynetworkidaction-properties-type.md "https://timelimit.io/SerializedParentAction#/definitions/SerializedAddCategoryNetworkIdAction/properties/type")
|
||||
|
||||
### type Type
|
||||
|
||||
`string`
|
||||
|
||||
### type Constraints
|
||||
|
||||
**enum**: the value of this property must be equal to one of the following values:
|
||||
|
||||
| Value | Explanation |
|
||||
| :-------------------------- | ----------- |
|
||||
| `"ADD_CATEGORY_NETWORK_ID"` | |
|
||||
|
||||
## categoryId
|
||||
|
||||
|
||||
|
||||
|
||||
`categoryId`
|
||||
|
||||
- is required
|
||||
- Type: `string`
|
||||
- cannot be null
|
||||
- defined in: [SerializedParentAction](serializedparentaction-definitions-serializedaddcategorynetworkidaction-properties-categoryid.md "https://timelimit.io/SerializedParentAction#/definitions/SerializedAddCategoryNetworkIdAction/properties/categoryId")
|
||||
|
||||
### categoryId Type
|
||||
|
||||
`string`
|
||||
|
||||
## itemId
|
||||
|
||||
|
||||
|
||||
|
||||
`itemId`
|
||||
|
||||
- is required
|
||||
- Type: `string`
|
||||
- cannot be null
|
||||
- defined in: [SerializedParentAction](serializedparentaction-definitions-serializedaddcategorynetworkidaction-properties-itemid.md "https://timelimit.io/SerializedParentAction#/definitions/SerializedAddCategoryNetworkIdAction/properties/itemId")
|
||||
|
||||
### itemId Type
|
||||
|
||||
`string`
|
||||
|
||||
## hashedNetworkId
|
||||
|
||||
|
||||
|
||||
|
||||
`hashedNetworkId`
|
||||
|
||||
- is required
|
||||
- Type: `string`
|
||||
- cannot be null
|
||||
- defined in: [SerializedParentAction](serializedparentaction-definitions-serializedaddcategorynetworkidaction-properties-hashednetworkid.md "https://timelimit.io/SerializedParentAction#/definitions/SerializedAddCategoryNetworkIdAction/properties/hashedNetworkId")
|
||||
|
||||
### hashedNetworkId Type
|
||||
|
||||
`string`
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
# Untitled string in SerializedParentAction Schema
|
||||
|
||||
```txt
|
||||
https://timelimit.io/SerializedParentAction#/definitions/SerializeResetCategoryNetworkIdsAction/properties/categoryId
|
||||
```
|
||||
|
||||
|
||||
|
||||
|
||||
| Abstract | Extensible | Status | Identifiable | Custom Properties | Additional Properties | Access Restrictions | Defined In |
|
||||
| :------------------ | ---------- | -------------- | ----------------------- | :---------------- | --------------------- | ------------------- | ------------------------------------------------------------------------------------------------- |
|
||||
| Can be instantiated | No | Unknown status | Unknown identifiability | Forbidden | Allowed | none | [SerializedParentAction.schema.json\*](SerializedParentAction.schema.json "open original schema") |
|
||||
|
||||
## categoryId Type
|
||||
|
||||
`string`
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
# Untitled string in SerializedParentAction Schema
|
||||
|
||||
```txt
|
||||
https://timelimit.io/SerializedParentAction#/definitions/SerializeResetCategoryNetworkIdsAction/properties/type
|
||||
```
|
||||
|
||||
|
||||
|
||||
|
||||
| Abstract | Extensible | Status | Identifiable | Custom Properties | Additional Properties | Access Restrictions | Defined In |
|
||||
| :------------------ | ---------- | -------------- | ----------------------- | :---------------- | --------------------- | ------------------- | ------------------------------------------------------------------------------------------------- |
|
||||
| Can be instantiated | No | Unknown status | Unknown identifiability | Forbidden | Allowed | none | [SerializedParentAction.schema.json\*](SerializedParentAction.schema.json "open original schema") |
|
||||
|
||||
## type Type
|
||||
|
||||
`string`
|
||||
|
||||
## type Constraints
|
||||
|
||||
**enum**: the value of this property must be equal to one of the following values:
|
||||
|
||||
| Value | Explanation |
|
||||
| :----------------------------- | ----------- |
|
||||
| `"RESET_CATEGORY_NETWORK_IDS"` | |
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
# Untitled undefined type in SerializedParentAction Schema
|
||||
|
||||
```txt
|
||||
https://timelimit.io/SerializedParentAction#/definitions/SerializeResetCategoryNetworkIdsAction/properties
|
||||
```
|
||||
|
||||
|
||||
|
||||
|
||||
| Abstract | Extensible | Status | Identifiable | Custom Properties | Additional Properties | Access Restrictions | Defined In |
|
||||
| :------------------ | ---------- | -------------- | ----------------------- | :---------------- | --------------------- | ------------------- | ------------------------------------------------------------------------------------------------- |
|
||||
| Can be instantiated | No | Unknown status | Unknown identifiability | Forbidden | Allowed | none | [SerializedParentAction.schema.json\*](SerializedParentAction.schema.json "open original schema") |
|
||||
|
||||
## properties Type
|
||||
|
||||
unknown
|
||||
+63
@@ -0,0 +1,63 @@
|
||||
# SerializeResetCategoryNetworkIdsAction Schema
|
||||
|
||||
```txt
|
||||
https://timelimit.io/SerializedParentAction#/definitions/SerializeResetCategoryNetworkIdsAction
|
||||
```
|
||||
|
||||
|
||||
|
||||
|
||||
| Abstract | Extensible | Status | Identifiable | Custom Properties | Additional Properties | Access Restrictions | Defined In |
|
||||
| :------------------ | ---------- | -------------- | ------------ | :---------------- | --------------------- | ------------------- | ------------------------------------------------------------------------------------------------- |
|
||||
| Can be instantiated | No | Unknown status | No | Forbidden | Forbidden | none | [SerializedParentAction.schema.json\*](SerializedParentAction.schema.json "open original schema") |
|
||||
|
||||
## SerializeResetCategoryNetworkIdsAction Type
|
||||
|
||||
`object` ([SerializeResetCategoryNetworkIdsAction](serializedparentaction-definitions-serializeresetcategorynetworkidsaction.md))
|
||||
|
||||
# SerializeResetCategoryNetworkIdsAction Properties
|
||||
|
||||
| Property | Type | Required | Nullable | Defined by |
|
||||
| :------------------------ | -------- | -------- | -------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| [type](#type) | `string` | Required | cannot be null | [SerializedParentAction](serializedparentaction-definitions-serializeresetcategorynetworkidsaction-properties-type.md "https://timelimit.io/SerializedParentAction#/definitions/SerializeResetCategoryNetworkIdsAction/properties/type") |
|
||||
| [categoryId](#categoryId) | `string` | Required | cannot be null | [SerializedParentAction](serializedparentaction-definitions-serializeresetcategorynetworkidsaction-properties-categoryid.md "https://timelimit.io/SerializedParentAction#/definitions/SerializeResetCategoryNetworkIdsAction/properties/categoryId") |
|
||||
|
||||
## type
|
||||
|
||||
|
||||
|
||||
|
||||
`type`
|
||||
|
||||
- is required
|
||||
- Type: `string`
|
||||
- cannot be null
|
||||
- defined in: [SerializedParentAction](serializedparentaction-definitions-serializeresetcategorynetworkidsaction-properties-type.md "https://timelimit.io/SerializedParentAction#/definitions/SerializeResetCategoryNetworkIdsAction/properties/type")
|
||||
|
||||
### type Type
|
||||
|
||||
`string`
|
||||
|
||||
### type Constraints
|
||||
|
||||
**enum**: the value of this property must be equal to one of the following values:
|
||||
|
||||
| Value | Explanation |
|
||||
| :----------------------------- | ----------- |
|
||||
| `"RESET_CATEGORY_NETWORK_IDS"` | |
|
||||
|
||||
## categoryId
|
||||
|
||||
|
||||
|
||||
|
||||
`categoryId`
|
||||
|
||||
- is required
|
||||
- Type: `string`
|
||||
- cannot be null
|
||||
- defined in: [SerializedParentAction](serializedparentaction-definitions-serializeresetcategorynetworkidsaction-properties-categoryid.md "https://timelimit.io/SerializedParentAction#/definitions/SerializeResetCategoryNetworkIdsAction/properties/categoryId")
|
||||
|
||||
### categoryId Type
|
||||
|
||||
`string`
|
||||
@@ -18,6 +18,7 @@ merged type ([SerializedParentAction](serializedparentaction.md))
|
||||
any of
|
||||
|
||||
- [SerializedAddCategoryAppsAction](serializedparentaction-definitions-serializedaddcategoryappsaction.md "check type definition")
|
||||
- [SerializedAddCategoryNetworkIdAction](serializedparentaction-definitions-serializedaddcategorynetworkidaction.md "check type definition")
|
||||
- [SerializedAddUserAction](serializedparentaction-definitions-serializedadduseraction.md "check type definition")
|
||||
- [SerializedChangeParentPasswordAction](serializedparentaction-definitions-serializedchangeparentpasswordaction.md "check type definition")
|
||||
- [SerializedCreateCategoryAction](serializedparentaction-definitions-serializedcreatecategoryaction.md "check type definition")
|
||||
@@ -29,6 +30,7 @@ any of
|
||||
- [SerializedRemoveCategoryAppsAction](serializedparentaction-definitions-serializedremovecategoryappsaction.md "check type definition")
|
||||
- [SerializedRemoveUserAction](serializedparentaction-definitions-serializedremoveuseraction.md "check type definition")
|
||||
- [SerializedRenameChildAction](serializedparentaction-definitions-serializedrenamechildaction.md "check type definition")
|
||||
- [SerializeResetCategoryNetworkIdsAction](serializedparentaction-definitions-serializeresetcategorynetworkidsaction.md "check type definition")
|
||||
- [SerializedResetParentBlockedTimesAction](serializedparentaction-definitions-serializedresetparentblockedtimesaction.md "check type definition")
|
||||
- [SerializedSetCategoryExtraTimeAction](serializedparentaction-definitions-serializedsetcategoryextratimeaction.md "check type definition")
|
||||
- [SerializedSetCategoryForUnassignedAppsAction](serializedparentaction-definitions-serializedsetcategoryforunassignedappsaction.md "check type definition")
|
||||
@@ -131,6 +133,93 @@ Reference this group by using
|
||||
|
||||
`string[]`
|
||||
|
||||
## Definitions group SerializedAddCategoryNetworkIdAction
|
||||
|
||||
Reference this group by using
|
||||
|
||||
```json
|
||||
{"$ref":"https://timelimit.io/SerializedParentAction#/definitions/SerializedAddCategoryNetworkIdAction"}
|
||||
```
|
||||
|
||||
| Property | Type | Required | Nullable | Defined by |
|
||||
| :---------------------------------- | -------- | -------- | -------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| [type](#type) | `string` | Required | cannot be null | [SerializedParentAction](serializedparentaction-definitions-serializedaddcategorynetworkidaction-properties-type.md "https://timelimit.io/SerializedParentAction#/definitions/SerializedAddCategoryNetworkIdAction/properties/type") |
|
||||
| [categoryId](#categoryId) | `string` | Required | cannot be null | [SerializedParentAction](serializedparentaction-definitions-serializedaddcategorynetworkidaction-properties-categoryid.md "https://timelimit.io/SerializedParentAction#/definitions/SerializedAddCategoryNetworkIdAction/properties/categoryId") |
|
||||
| [itemId](#itemId) | `string` | Required | cannot be null | [SerializedParentAction](serializedparentaction-definitions-serializedaddcategorynetworkidaction-properties-itemid.md "https://timelimit.io/SerializedParentAction#/definitions/SerializedAddCategoryNetworkIdAction/properties/itemId") |
|
||||
| [hashedNetworkId](#hashedNetworkId) | `string` | Required | cannot be null | [SerializedParentAction](serializedparentaction-definitions-serializedaddcategorynetworkidaction-properties-hashednetworkid.md "https://timelimit.io/SerializedParentAction#/definitions/SerializedAddCategoryNetworkIdAction/properties/hashedNetworkId") |
|
||||
|
||||
### type
|
||||
|
||||
|
||||
|
||||
|
||||
`type`
|
||||
|
||||
- is required
|
||||
- Type: `string`
|
||||
- cannot be null
|
||||
- defined in: [SerializedParentAction](serializedparentaction-definitions-serializedaddcategorynetworkidaction-properties-type.md "https://timelimit.io/SerializedParentAction#/definitions/SerializedAddCategoryNetworkIdAction/properties/type")
|
||||
|
||||
#### type Type
|
||||
|
||||
`string`
|
||||
|
||||
#### type Constraints
|
||||
|
||||
**enum**: the value of this property must be equal to one of the following values:
|
||||
|
||||
| Value | Explanation |
|
||||
| :-------------------------- | ----------- |
|
||||
| `"ADD_CATEGORY_NETWORK_ID"` | |
|
||||
|
||||
### categoryId
|
||||
|
||||
|
||||
|
||||
|
||||
`categoryId`
|
||||
|
||||
- is required
|
||||
- Type: `string`
|
||||
- cannot be null
|
||||
- defined in: [SerializedParentAction](serializedparentaction-definitions-serializedaddcategorynetworkidaction-properties-categoryid.md "https://timelimit.io/SerializedParentAction#/definitions/SerializedAddCategoryNetworkIdAction/properties/categoryId")
|
||||
|
||||
#### categoryId Type
|
||||
|
||||
`string`
|
||||
|
||||
### itemId
|
||||
|
||||
|
||||
|
||||
|
||||
`itemId`
|
||||
|
||||
- is required
|
||||
- Type: `string`
|
||||
- cannot be null
|
||||
- defined in: [SerializedParentAction](serializedparentaction-definitions-serializedaddcategorynetworkidaction-properties-itemid.md "https://timelimit.io/SerializedParentAction#/definitions/SerializedAddCategoryNetworkIdAction/properties/itemId")
|
||||
|
||||
#### itemId Type
|
||||
|
||||
`string`
|
||||
|
||||
### hashedNetworkId
|
||||
|
||||
|
||||
|
||||
|
||||
`hashedNetworkId`
|
||||
|
||||
- is required
|
||||
- Type: `string`
|
||||
- cannot be null
|
||||
- defined in: [SerializedParentAction](serializedparentaction-definitions-serializedaddcategorynetworkidaction-properties-hashednetworkid.md "https://timelimit.io/SerializedParentAction#/definitions/SerializedAddCategoryNetworkIdAction/properties/hashedNetworkId")
|
||||
|
||||
#### hashedNetworkId Type
|
||||
|
||||
`string`
|
||||
|
||||
## Definitions group SerializedAddUserAction
|
||||
|
||||
Reference this group by using
|
||||
@@ -1374,6 +1463,59 @@ Reference this group by using
|
||||
|
||||
`string`
|
||||
|
||||
## Definitions group SerializeResetCategoryNetworkIdsAction
|
||||
|
||||
Reference this group by using
|
||||
|
||||
```json
|
||||
{"$ref":"https://timelimit.io/SerializedParentAction#/definitions/SerializeResetCategoryNetworkIdsAction"}
|
||||
```
|
||||
|
||||
| Property | Type | Required | Nullable | Defined by |
|
||||
| :------------------------ | -------- | -------- | -------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| [type](#type) | `string` | Required | cannot be null | [SerializedParentAction](serializedparentaction-definitions-serializeresetcategorynetworkidsaction-properties-type.md "https://timelimit.io/SerializedParentAction#/definitions/SerializeResetCategoryNetworkIdsAction/properties/type") |
|
||||
| [categoryId](#categoryId) | `string` | Required | cannot be null | [SerializedParentAction](serializedparentaction-definitions-serializeresetcategorynetworkidsaction-properties-categoryid.md "https://timelimit.io/SerializedParentAction#/definitions/SerializeResetCategoryNetworkIdsAction/properties/categoryId") |
|
||||
|
||||
### type
|
||||
|
||||
|
||||
|
||||
|
||||
`type`
|
||||
|
||||
- is required
|
||||
- Type: `string`
|
||||
- cannot be null
|
||||
- defined in: [SerializedParentAction](serializedparentaction-definitions-serializeresetcategorynetworkidsaction-properties-type.md "https://timelimit.io/SerializedParentAction#/definitions/SerializeResetCategoryNetworkIdsAction/properties/type")
|
||||
|
||||
#### type Type
|
||||
|
||||
`string`
|
||||
|
||||
#### type Constraints
|
||||
|
||||
**enum**: the value of this property must be equal to one of the following values:
|
||||
|
||||
| Value | Explanation |
|
||||
| :----------------------------- | ----------- |
|
||||
| `"RESET_CATEGORY_NETWORK_IDS"` | |
|
||||
|
||||
### categoryId
|
||||
|
||||
|
||||
|
||||
|
||||
`categoryId`
|
||||
|
||||
- is required
|
||||
- Type: `string`
|
||||
- cannot be null
|
||||
- defined in: [SerializedParentAction](serializedparentaction-definitions-serializeresetcategorynetworkidsaction-properties-categoryid.md "https://timelimit.io/SerializedParentAction#/definitions/SerializeResetCategoryNetworkIdsAction/properties/categoryId")
|
||||
|
||||
#### categoryId Type
|
||||
|
||||
`string`
|
||||
|
||||
## Definitions group SerializedResetParentBlockedTimesAction
|
||||
|
||||
Reference this group by using
|
||||
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
# Untitled string in ServerDataStatus Schema
|
||||
|
||||
```txt
|
||||
https://timelimit.io/ServerDataStatus#/definitions/ServerCategoryNetworkId/properties/hashedNetworkId
|
||||
```
|
||||
|
||||
|
||||
|
||||
|
||||
| Abstract | Extensible | Status | Identifiable | Custom Properties | Additional Properties | Access Restrictions | Defined In |
|
||||
| :------------------ | ---------- | -------------- | ----------------------- | :---------------- | --------------------- | ------------------- | ------------------------------------------------------------------------------------- |
|
||||
| Can be instantiated | No | Unknown status | Unknown identifiability | Forbidden | Allowed | none | [ServerDataStatus.schema.json\*](ServerDataStatus.schema.json "open original schema") |
|
||||
|
||||
## hashedNetworkId Type
|
||||
|
||||
`string`
|
||||
@@ -0,0 +1,16 @@
|
||||
# Untitled string in ServerDataStatus Schema
|
||||
|
||||
```txt
|
||||
https://timelimit.io/ServerDataStatus#/definitions/ServerCategoryNetworkId/properties/itemId
|
||||
```
|
||||
|
||||
|
||||
|
||||
|
||||
| Abstract | Extensible | Status | Identifiable | Custom Properties | Additional Properties | Access Restrictions | Defined In |
|
||||
| :------------------ | ---------- | -------------- | ----------------------- | :---------------- | --------------------- | ------------------- | ------------------------------------------------------------------------------------- |
|
||||
| Can be instantiated | No | Unknown status | Unknown identifiability | Forbidden | Allowed | none | [ServerDataStatus.schema.json\*](ServerDataStatus.schema.json "open original schema") |
|
||||
|
||||
## itemId Type
|
||||
|
||||
`string`
|
||||
@@ -0,0 +1,16 @@
|
||||
# Untitled undefined type in ServerDataStatus Schema
|
||||
|
||||
```txt
|
||||
https://timelimit.io/ServerDataStatus#/definitions/ServerCategoryNetworkId/properties
|
||||
```
|
||||
|
||||
|
||||
|
||||
|
||||
| Abstract | Extensible | Status | Identifiable | Custom Properties | Additional Properties | Access Restrictions | Defined In |
|
||||
| :------------------ | ---------- | -------------- | ----------------------- | :---------------- | --------------------- | ------------------- | ------------------------------------------------------------------------------------- |
|
||||
| Can be instantiated | No | Unknown status | Unknown identifiability | Forbidden | Allowed | none | [ServerDataStatus.schema.json\*](ServerDataStatus.schema.json "open original schema") |
|
||||
|
||||
## properties Type
|
||||
|
||||
unknown
|
||||
@@ -0,0 +1,55 @@
|
||||
# ServerCategoryNetworkId Schema
|
||||
|
||||
```txt
|
||||
https://timelimit.io/ServerDataStatus#/definitions/ServerCategoryNetworkId
|
||||
```
|
||||
|
||||
|
||||
|
||||
|
||||
| Abstract | Extensible | Status | Identifiable | Custom Properties | Additional Properties | Access Restrictions | Defined In |
|
||||
| :------------------ | ---------- | -------------- | ------------ | :---------------- | --------------------- | ------------------- | ------------------------------------------------------------------------------------- |
|
||||
| Can be instantiated | No | Unknown status | No | Forbidden | Forbidden | none | [ServerDataStatus.schema.json\*](ServerDataStatus.schema.json "open original schema") |
|
||||
|
||||
## ServerCategoryNetworkId Type
|
||||
|
||||
`object` ([ServerCategoryNetworkId](serverdatastatus-definitions-servercategorynetworkid.md))
|
||||
|
||||
# ServerCategoryNetworkId Properties
|
||||
|
||||
| Property | Type | Required | Nullable | Defined by |
|
||||
| :---------------------------------- | -------- | -------- | -------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
||||
| [itemId](#itemId) | `string` | Required | cannot be null | [ServerDataStatus](serverdatastatus-definitions-servercategorynetworkid-properties-itemid.md "https://timelimit.io/ServerDataStatus#/definitions/ServerCategoryNetworkId/properties/itemId") |
|
||||
| [hashedNetworkId](#hashedNetworkId) | `string` | Required | cannot be null | [ServerDataStatus](serverdatastatus-definitions-servercategorynetworkid-properties-hashednetworkid.md "https://timelimit.io/ServerDataStatus#/definitions/ServerCategoryNetworkId/properties/hashedNetworkId") |
|
||||
|
||||
## itemId
|
||||
|
||||
|
||||
|
||||
|
||||
`itemId`
|
||||
|
||||
- is required
|
||||
- Type: `string`
|
||||
- cannot be null
|
||||
- defined in: [ServerDataStatus](serverdatastatus-definitions-servercategorynetworkid-properties-itemid.md "https://timelimit.io/ServerDataStatus#/definitions/ServerCategoryNetworkId/properties/itemId")
|
||||
|
||||
### itemId Type
|
||||
|
||||
`string`
|
||||
|
||||
## hashedNetworkId
|
||||
|
||||
|
||||
|
||||
|
||||
`hashedNetworkId`
|
||||
|
||||
- is required
|
||||
- Type: `string`
|
||||
- cannot be null
|
||||
- defined in: [ServerDataStatus](serverdatastatus-definitions-servercategorynetworkid-properties-hashednetworkid.md "https://timelimit.io/ServerDataStatus#/definitions/ServerCategoryNetworkId/properties/hashedNetworkId")
|
||||
|
||||
### hashedNetworkId Type
|
||||
|
||||
`string`
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
# Untitled array in ServerDataStatus Schema
|
||||
|
||||
```txt
|
||||
https://timelimit.io/ServerDataStatus#/definitions/ServerUpdatedCategoryBaseData/properties/networks
|
||||
```
|
||||
|
||||
|
||||
|
||||
|
||||
| Abstract | Extensible | Status | Identifiable | Custom Properties | Additional Properties | Access Restrictions | Defined In |
|
||||
| :------------------ | ---------- | -------------- | ----------------------- | :---------------- | --------------------- | ------------------- | ------------------------------------------------------------------------------------- |
|
||||
| Can be instantiated | No | Unknown status | Unknown identifiability | Forbidden | Allowed | none | [ServerDataStatus.schema.json\*](ServerDataStatus.schema.json "open original schema") |
|
||||
|
||||
## networks Type
|
||||
|
||||
`object[]` ([ServerCategoryNetworkId](serverdatastatus-definitions-servercategorynetworkid.md))
|
||||
@@ -34,6 +34,7 @@ https://timelimit.io/ServerDataStatus#/definitions/ServerUpdatedCategoryBaseData
|
||||
| [mblCharging](#mblCharging) | `number` | Required | cannot be null | [ServerDataStatus](serverdatastatus-definitions-serverupdatedcategorybasedata-properties-mblcharging.md "https://timelimit.io/ServerDataStatus#/definitions/ServerUpdatedCategoryBaseData/properties/mblCharging") |
|
||||
| [mblMobile](#mblMobile) | `number` | Required | cannot be null | [ServerDataStatus](serverdatastatus-definitions-serverupdatedcategorybasedata-properties-mblmobile.md "https://timelimit.io/ServerDataStatus#/definitions/ServerUpdatedCategoryBaseData/properties/mblMobile") |
|
||||
| [sort](#sort) | `number` | Required | cannot be null | [ServerDataStatus](serverdatastatus-definitions-serverupdatedcategorybasedata-properties-sort.md "https://timelimit.io/ServerDataStatus#/definitions/ServerUpdatedCategoryBaseData/properties/sort") |
|
||||
| [networks](#networks) | `array` | Required | cannot be null | [ServerDataStatus](serverdatastatus-definitions-serverupdatedcategorybasedata-properties-networks.md "https://timelimit.io/ServerDataStatus#/definitions/ServerUpdatedCategoryBaseData/properties/networks") |
|
||||
|
||||
## categoryId
|
||||
|
||||
@@ -274,3 +275,19 @@ https://timelimit.io/ServerDataStatus#/definitions/ServerUpdatedCategoryBaseData
|
||||
### sort Type
|
||||
|
||||
`number`
|
||||
|
||||
## networks
|
||||
|
||||
|
||||
|
||||
|
||||
`networks`
|
||||
|
||||
- is required
|
||||
- Type: `object[]` ([ServerCategoryNetworkId](serverdatastatus-definitions-servercategorynetworkid.md))
|
||||
- cannot be null
|
||||
- defined in: [ServerDataStatus](serverdatastatus-definitions-serverupdatedcategorybasedata-properties-networks.md "https://timelimit.io/ServerDataStatus#/definitions/ServerUpdatedCategoryBaseData/properties/networks")
|
||||
|
||||
### networks Type
|
||||
|
||||
`object[]` ([ServerCategoryNetworkId](serverdatastatus-definitions-servercategorynetworkid.md))
|
||||
|
||||
@@ -974,6 +974,7 @@ Reference this group by using
|
||||
| [mblCharging](#mblCharging) | `number` | Required | cannot be null | [ServerDataStatus](serverdatastatus-definitions-serverupdatedcategorybasedata-properties-mblcharging.md "https://timelimit.io/ServerDataStatus#/definitions/ServerUpdatedCategoryBaseData/properties/mblCharging") |
|
||||
| [mblMobile](#mblMobile) | `number` | Required | cannot be null | [ServerDataStatus](serverdatastatus-definitions-serverupdatedcategorybasedata-properties-mblmobile.md "https://timelimit.io/ServerDataStatus#/definitions/ServerUpdatedCategoryBaseData/properties/mblMobile") |
|
||||
| [sort](#sort) | `number` | Required | cannot be null | [ServerDataStatus](serverdatastatus-definitions-serverupdatedcategorybasedata-properties-sort.md "https://timelimit.io/ServerDataStatus#/definitions/ServerUpdatedCategoryBaseData/properties/sort") |
|
||||
| [networks](#networks) | `array` | Required | cannot be null | [ServerDataStatus](serverdatastatus-definitions-serverupdatedcategorybasedata-properties-networks.md "https://timelimit.io/ServerDataStatus#/definitions/ServerUpdatedCategoryBaseData/properties/networks") |
|
||||
|
||||
### categoryId
|
||||
|
||||
@@ -1215,6 +1216,67 @@ Reference this group by using
|
||||
|
||||
`number`
|
||||
|
||||
### networks
|
||||
|
||||
|
||||
|
||||
|
||||
`networks`
|
||||
|
||||
- is required
|
||||
- Type: `object[]` ([ServerCategoryNetworkId](serverdatastatus-definitions-servercategorynetworkid.md))
|
||||
- cannot be null
|
||||
- defined in: [ServerDataStatus](serverdatastatus-definitions-serverupdatedcategorybasedata-properties-networks.md "https://timelimit.io/ServerDataStatus#/definitions/ServerUpdatedCategoryBaseData/properties/networks")
|
||||
|
||||
#### networks Type
|
||||
|
||||
`object[]` ([ServerCategoryNetworkId](serverdatastatus-definitions-servercategorynetworkid.md))
|
||||
|
||||
## Definitions group ServerCategoryNetworkId
|
||||
|
||||
Reference this group by using
|
||||
|
||||
```json
|
||||
{"$ref":"https://timelimit.io/ServerDataStatus#/definitions/ServerCategoryNetworkId"}
|
||||
```
|
||||
|
||||
| Property | Type | Required | Nullable | Defined by |
|
||||
| :---------------------------------- | -------- | -------- | -------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
||||
| [itemId](#itemId) | `string` | Required | cannot be null | [ServerDataStatus](serverdatastatus-definitions-servercategorynetworkid-properties-itemid.md "https://timelimit.io/ServerDataStatus#/definitions/ServerCategoryNetworkId/properties/itemId") |
|
||||
| [hashedNetworkId](#hashedNetworkId) | `string` | Required | cannot be null | [ServerDataStatus](serverdatastatus-definitions-servercategorynetworkid-properties-hashednetworkid.md "https://timelimit.io/ServerDataStatus#/definitions/ServerCategoryNetworkId/properties/hashedNetworkId") |
|
||||
|
||||
### itemId
|
||||
|
||||
|
||||
|
||||
|
||||
`itemId`
|
||||
|
||||
- is required
|
||||
- Type: `string`
|
||||
- cannot be null
|
||||
- defined in: [ServerDataStatus](serverdatastatus-definitions-servercategorynetworkid-properties-itemid.md "https://timelimit.io/ServerDataStatus#/definitions/ServerCategoryNetworkId/properties/itemId")
|
||||
|
||||
#### itemId Type
|
||||
|
||||
`string`
|
||||
|
||||
### hashedNetworkId
|
||||
|
||||
|
||||
|
||||
|
||||
`hashedNetworkId`
|
||||
|
||||
- is required
|
||||
- Type: `string`
|
||||
- cannot be null
|
||||
- defined in: [ServerDataStatus](serverdatastatus-definitions-servercategorynetworkid-properties-hashednetworkid.md "https://timelimit.io/ServerDataStatus#/definitions/ServerCategoryNetworkId/properties/hashedNetworkId")
|
||||
|
||||
#### hashedNetworkId Type
|
||||
|
||||
`string`
|
||||
|
||||
## Definitions group ServerUpdatedCategoryAssignedApps
|
||||
|
||||
Reference this group by using
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
# Admin API
|
||||
|
||||
When the ``ADMIN_TOKEN`` environment variable was set, then there is a admin API available
|
||||
at ``http(s)://server/admin``. It can be used by the [TimeLimit Server Admin UI](https://codeberg.org/timelimit/timelimit-server-ui).
|
||||
@@ -0,0 +1,7 @@
|
||||
# Clustering
|
||||
|
||||
This application only supports running one instance per database.
|
||||
|
||||
Otherwise, when doing clustering, push messages do not work anymore between devices
|
||||
connected to different instances and the rate limiting is per instance and thus not
|
||||
strictly enforced.
|
||||
@@ -0,0 +1,56 @@
|
||||
# Configuration/ environment variables
|
||||
|
||||
- DATABASE_URL
|
||||
- this specifies the database to use
|
||||
- default value: ``sqlite://test.db`` (sqlite database in the source code directory)
|
||||
- supports mysql, postgresql and sqlite (sqlite in development builds only because it's declared as dev dependency)
|
||||
- looks like ``postgres://user:pass@example.com:5432/dbname``
|
||||
- no extra setup needed
|
||||
- when starting the application, the database tables are created/ migrated
|
||||
- this only works for upgrading; if you intend to eventually downgrade, make a backup first (you should make backups in all cases before an upgrade)
|
||||
- PORT
|
||||
- the port at which the server should listen
|
||||
- default value: 8080
|
||||
- NODE_ENV
|
||||
- should be set to ``production`` in production
|
||||
- when using ``development``, then mails are not sent; instead they are written to a html file which is opened
|
||||
- GOOGLE_PLAY_PUBLIC_KEY
|
||||
- key for validating purchases
|
||||
- purchases using google play don't work without it/ when it is not set
|
||||
- MAIL_SENDER
|
||||
- sender (for the from-field) for sent mails
|
||||
- the sent mails contain the info that one can reply to it in case of questions ... so you should have someone who looks into the inbox and send replies (or you know that there is nobody and don't ask anything)
|
||||
- MAIL_TRANSPORT
|
||||
- a JSON encoded configuration for nodemailer
|
||||
- supports setting a smtp server configuration, see <https://nodemailer.com/smtp/>
|
||||
- allows easier configuration in case of a [well known services](https://nodemailer.com/smtp/well-known/)
|
||||
- default value is ``null``
|
||||
- examples
|
||||
- ``{"host": "localhost", "port": 25}`` (using a local mail server which does not require any authentication)
|
||||
- ``{"service": "1und1", "auth": {"user": "me@my.timelimit.server", "pass": "my password"}}`` (using a well known service)
|
||||
- ``{"host": "my.mail.server", "secure": true, "auth": {"user": "me@my.timelimit.server", "pass": "my password"}}`` (using a external smtp server)
|
||||
- in case of a docker-compose file, you should escape this, e.g. sourround it with ``'`` single quotes
|
||||
- MAIL_IMPRINT
|
||||
- a string which is added to the footer of the sent mails
|
||||
- default value: ``not defined``
|
||||
- ADMIN_TOKEN
|
||||
- a password which allows to use some APIs
|
||||
- admin APIs are disabled when this is not set
|
||||
- MAIL_SERVER_BLACKLIST
|
||||
- list of domains, separated by comma
|
||||
- if the user tries to use such a mail service, then he will get the notification that this provider is not supported
|
||||
- the blacklist is empty if this is not set
|
||||
- MAIL_WHITELIST
|
||||
- list of mail addresses (``someone@somewhere.com``) or domains (``mailbox.org``), separated by comma
|
||||
- if a user requests signing in with a mail address which is not in this list, then the request is rejected
|
||||
- if the list is empty/ the variable is not set, then any mail address (except with domains from the blacklist) is allowed
|
||||
- note: this allows a third party who knows the server url to check if a certain mail address is allowed by trying to sign in with it
|
||||
- DISABLE_SIGNUP
|
||||
- ``yes`` or ``no`` (default: no)
|
||||
- disables creating new families if ``yes`` is selected
|
||||
- ALWAYS_PRO
|
||||
- ``yes`` or ``no`` (default: ``no``)
|
||||
- if ``yes``, then the features of the premium version are unlocked for all users
|
||||
- PING_INTERVAL_SEC
|
||||
- ping interval at the websocket in seconds
|
||||
- the default value is ``25``
|
||||
@@ -0,0 +1,90 @@
|
||||
# Docker
|
||||
|
||||
You can run the timelimit server with docker. Here are two example configuration files:
|
||||
|
||||
## Important
|
||||
|
||||
The ``image: 'timelimit-server:latest'`` will not work out of the box.
|
||||
You have to build this image yourself (using ``sudo docker build -t timelimit-server .``
|
||||
within the root directory of this git repository) or you can replace it by
|
||||
``image: docker.timelimit.io/timelimit-server`` which will use prebuilt docker
|
||||
images.
|
||||
|
||||
In case of self building the image, don't forget to run ``docker-compose up`` again
|
||||
to make docker use the new image.
|
||||
|
||||
## example docker-compose.yml with included database
|
||||
|
||||
```
|
||||
version: '3'
|
||||
services:
|
||||
api:
|
||||
image: 'timelimit-server:latest'
|
||||
environment:
|
||||
NODE_ENV: production
|
||||
DATABASE_URL: mariadb://timelimit:timelimitpassword@database:3306/timelimit
|
||||
PORT: 8080
|
||||
MAIL_SENDER: me@my.timelimit.server
|
||||
MAIL_TRANSPORT: '{"host": "localhost", "port": 25}'
|
||||
ALWAYS_PRO: yes
|
||||
# put additional config variables here
|
||||
ports:
|
||||
- "8080:8080"
|
||||
restart: always
|
||||
# you can enable logging during testing by commenting this out,
|
||||
# but logging is not needed when everything works
|
||||
logging:
|
||||
driver: none
|
||||
links:
|
||||
- database
|
||||
database:
|
||||
image: 'mariadb:10'
|
||||
environment:
|
||||
MYSQL_ROOT_PASSWORD: rootpassword
|
||||
MYSQL_DATABASE: timelimit
|
||||
MYSQL_USER: timelimit
|
||||
MYSQL_PASSWORD: timelimitpassword
|
||||
volumes:
|
||||
- ./database:/var/lib/mysql
|
||||
# you can enable logging during testing by commenting this out,
|
||||
# but logging is not needed when everything works
|
||||
logging:
|
||||
driver: none
|
||||
```
|
||||
|
||||
The database files will be saved at the folder which contains the docker-compose.yml.
|
||||
You should change the passwords.
|
||||
|
||||
Docker starts both (TimeLimit and the database) at the same time,
|
||||
so the TimeLimit server will crash a few times due to the missing database
|
||||
before it starts working.
|
||||
|
||||
## example docker-compose.yml with external databases
|
||||
|
||||
```
|
||||
version: '2'
|
||||
services:
|
||||
api:
|
||||
image: 'timelimit-server:latest'
|
||||
environment:
|
||||
NODE_ENV: production
|
||||
DATABASE_URL: postgres://user:pass@example.com:5432/dbname
|
||||
PORT: 8080
|
||||
MAIL_SENDER: me@my.timelimit.server
|
||||
MAIL_TRANSPORT: '{"host": "localhost", "port": 25}'
|
||||
ALWAYS_PRO: yes
|
||||
# put additional config variables here
|
||||
restart: always
|
||||
# you can enable logging during testing by commenting this out,
|
||||
# but logging is not needed when everything works
|
||||
logging:
|
||||
driver: none
|
||||
# easy solution to use a database which does not run within docker
|
||||
network_mode: "host"
|
||||
# otherwise:
|
||||
# redirect host port 9000 to guest port 8080 (to allow access to the API)
|
||||
# ports:
|
||||
# - "9000:8080"
|
||||
# in case the database runs outside of docker and you don't want to use the host network mode, see
|
||||
# https://forums.docker.com/t/accessing-host-machine-from-within-docker-container/14248
|
||||
```
|
||||
@@ -0,0 +1,43 @@
|
||||
# HTTPS
|
||||
|
||||
This server application itself does not support HTTPS. You have to use
|
||||
an other tool to use HTTPS. One options for this is to use nginx with the
|
||||
following site config:
|
||||
|
||||
```
|
||||
# don't forget to update the port for your local configuration
|
||||
#
|
||||
# the max_fails is important - otherwise nginx
|
||||
# marks the server sometimes as unreachable if it is restarted
|
||||
# or starts after nginx
|
||||
upstream timelimitbackend {
|
||||
server localhost:8080 max_fails=0;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 443 ssl;
|
||||
listen [::]:443 ssl;
|
||||
|
||||
# don't forget to update the domain
|
||||
server_name my.domain;
|
||||
|
||||
# don't forget to update the paths
|
||||
ssl_certificate /my/fullchain.pem;
|
||||
ssl_certificate_key /my/privkey.pem;
|
||||
|
||||
# You can add custom SSL parameters here
|
||||
|
||||
location / {
|
||||
proxy_pass http://timelimitbackend/;
|
||||
|
||||
client_max_body_size 10m;
|
||||
# the following is required for websocket support
|
||||
#
|
||||
# without websockets, the client will not detect
|
||||
# that there is a connection and it will not sync
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
proxy_http_version 1.1;
|
||||
}
|
||||
}
|
||||
```
|
||||
@@ -0,0 +1,27 @@
|
||||
# npm Commands
|
||||
|
||||
This requires that you've installed Node.JS and NPM.
|
||||
You need this for the development, but you don't need it
|
||||
when deploying using Docker.
|
||||
|
||||
## Warning
|
||||
|
||||
You have to run ``npm install`` and ``npm run build`` and restart the server again
|
||||
after running ``git pull``. otherwise you will keep using the old version.
|
||||
|
||||
## npm install
|
||||
|
||||
This install all dependencies.
|
||||
|
||||
## npm run build
|
||||
|
||||
This "compiles" the application.
|
||||
|
||||
## npm start
|
||||
|
||||
This runs all pending migrations and starts the server.
|
||||
|
||||
## npm run lint:fix
|
||||
|
||||
This fixes the causes of lint warnings (where possible). This is only needed
|
||||
during the development.
|
||||
@@ -0,0 +1,8 @@
|
||||
# Purchases
|
||||
|
||||
To enable the automated purchase feature, set the ``GOOGLE_PLAY_PUBLIC_KEY`` environment variable.
|
||||
The value for the official builds which are distributed using the Play Store can
|
||||
be found at <https://codeberg.org/timelimit/timelimit-android/src/commit/3da677877f4dde0b1b01523daae33745f14e08ac/app/build.gradle#L49>.
|
||||
|
||||
Additionally, there is the admin API which allows one to unlock the
|
||||
premium features.
|
||||
@@ -0,0 +1,12 @@
|
||||
# Running
|
||||
|
||||
There are 3 options for running this application:
|
||||
|
||||
Option 1: Build a docker image and use it
|
||||
Option 2: Install Node.JS (see below for detailed usage)
|
||||
Option 3: Use a prebuilt docker image
|
||||
|
||||
After starting it, you can open ``http://server/time`` to test it,
|
||||
it should show a timestamp
|
||||
|
||||
|
||||
Generated
+63
-52
@@ -213,27 +213,27 @@
|
||||
"dev": true
|
||||
},
|
||||
"@babel/code-frame": {
|
||||
"version": "7.8.3",
|
||||
"resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.8.3.tgz",
|
||||
"integrity": "sha512-a9gxpmdXtZEInkCSHUJDLHZVBgb1QS0jhss4cPP93EW7s+uC5bikET2twEF3KV+7rDblJcmNvTR7VJejqd2C2g==",
|
||||
"version": "7.10.4",
|
||||
"resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.10.4.tgz",
|
||||
"integrity": "sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@babel/highlight": "7.9.0"
|
||||
"@babel/highlight": "7.10.4"
|
||||
}
|
||||
},
|
||||
"@babel/helper-validator-identifier": {
|
||||
"version": "7.9.0",
|
||||
"resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.9.0.tgz",
|
||||
"integrity": "sha512-6G8bQKjOh+of4PV/ThDm/rRqlU7+IGoJuofpagU5GlEl29Vv0RGqqt86ZGRV8ZuSOY3o+8yXl5y782SMcG7SHw==",
|
||||
"version": "7.10.4",
|
||||
"resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.10.4.tgz",
|
||||
"integrity": "sha512-3U9y+43hz7ZM+rzG24Qe2mufW5KhvFg/NhnNph+i9mgCtdTCtMJuI1TMkrIUiK7Ix4PYlRF9I5dhqaLYA/ADXw==",
|
||||
"dev": true
|
||||
},
|
||||
"@babel/highlight": {
|
||||
"version": "7.9.0",
|
||||
"resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.9.0.tgz",
|
||||
"integrity": "sha512-lJZPilxX7Op3Nv/2cvFdnlepPXDxi29wxteT57Q965oc5R9v86ztx0jfxVrTcBk8C2kcPkkDa2Z4T3ZsPPVWsQ==",
|
||||
"version": "7.10.4",
|
||||
"resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.10.4.tgz",
|
||||
"integrity": "sha512-i6rgnR/YgPEQzZZnbTHHuZdlE8qyoBNalD6F+q4vAFlcMEcqmkoG+mPqJYJCo63qPf74+Y1UZsl3l6f7/RIkmA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@babel/helper-validator-identifier": "7.9.0",
|
||||
"@babel/helper-validator-identifier": "7.10.4",
|
||||
"chalk": "2.4.2",
|
||||
"js-tokens": "4.0.0"
|
||||
}
|
||||
@@ -270,7 +270,7 @@
|
||||
"debug": "4.1.1",
|
||||
"i18n": "0.8.6",
|
||||
"i18n-locales": "0.0.4",
|
||||
"lodash": "4.17.15",
|
||||
"lodash": "4.17.19",
|
||||
"moment": "2.24.0",
|
||||
"multimatch": "4.0.0",
|
||||
"qs": "6.9.3",
|
||||
@@ -755,7 +755,7 @@
|
||||
"requires": {
|
||||
"babel-runtime": "6.26.0",
|
||||
"esutils": "2.0.3",
|
||||
"lodash": "4.17.15",
|
||||
"lodash": "4.17.19",
|
||||
"to-fast-properties": "1.0.3"
|
||||
}
|
||||
},
|
||||
@@ -1456,7 +1456,7 @@
|
||||
"get-paths": "0.0.7",
|
||||
"html-to-text": "5.1.1",
|
||||
"juice": "6.0.0",
|
||||
"lodash": "4.17.15",
|
||||
"lodash": "4.17.19",
|
||||
"nodemailer": "6.4.6",
|
||||
"pify": "5.0.0",
|
||||
"preview-email": "2.0.1"
|
||||
@@ -1851,7 +1851,6 @@
|
||||
"version": "7.1.6",
|
||||
"resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz",
|
||||
"integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"fs.realpath": "1.0.0",
|
||||
"inflight": "1.0.6",
|
||||
@@ -1959,7 +1958,7 @@
|
||||
"requires": {
|
||||
"he": "1.2.0",
|
||||
"htmlparser2": "3.10.1",
|
||||
"lodash": "4.17.15",
|
||||
"lodash": "4.17.19",
|
||||
"minimist": "1.2.5"
|
||||
},
|
||||
"dependencies": {
|
||||
@@ -2404,9 +2403,9 @@
|
||||
}
|
||||
},
|
||||
"lodash": {
|
||||
"version": "4.17.15",
|
||||
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz",
|
||||
"integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A=="
|
||||
"version": "4.17.19",
|
||||
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.19.tgz",
|
||||
"integrity": "sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ=="
|
||||
},
|
||||
"lodash.assignin": {
|
||||
"version": "4.2.0",
|
||||
@@ -2818,9 +2817,20 @@
|
||||
"npm-packlist": "1.4.1",
|
||||
"npmlog": "4.1.2",
|
||||
"rc": "1.2.8",
|
||||
"rimraf": "2.6.3",
|
||||
"rimraf": "2.7.1",
|
||||
"semver": "5.5.0",
|
||||
"tar": "4.4.8"
|
||||
},
|
||||
"dependencies": {
|
||||
"rimraf": {
|
||||
"version": "2.7.1",
|
||||
"resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz",
|
||||
"integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==",
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"glob": "7.1.6"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"nodemailer": {
|
||||
@@ -3559,28 +3569,12 @@
|
||||
}
|
||||
},
|
||||
"rimraf": {
|
||||
"version": "2.6.3",
|
||||
"resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz",
|
||||
"integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==",
|
||||
"optional": true,
|
||||
"version": "3.0.2",
|
||||
"resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz",
|
||||
"integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"glob": "7.1.3"
|
||||
},
|
||||
"dependencies": {
|
||||
"glob": {
|
||||
"version": "7.1.3",
|
||||
"resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz",
|
||||
"integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==",
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"fs.realpath": "1.0.0",
|
||||
"inflight": "1.0.6",
|
||||
"inherits": "2.0.3",
|
||||
"minimatch": "3.0.4",
|
||||
"once": "1.4.0",
|
||||
"path-is-absolute": "1.0.1"
|
||||
}
|
||||
}
|
||||
"glob": "7.1.6"
|
||||
}
|
||||
},
|
||||
"safe-buffer": {
|
||||
@@ -3641,7 +3635,7 @@
|
||||
"debug": "4.1.1",
|
||||
"dottie": "2.0.2",
|
||||
"inflection": "1.12.0",
|
||||
"lodash": "4.17.15",
|
||||
"lodash": "4.17.19",
|
||||
"moment": "2.24.0",
|
||||
"moment-timezone": "0.5.28",
|
||||
"retry-as-promised": "3.2.0",
|
||||
@@ -4088,18 +4082,18 @@
|
||||
}
|
||||
},
|
||||
"tslib": {
|
||||
"version": "1.11.1",
|
||||
"resolved": "https://registry.npmjs.org/tslib/-/tslib-1.11.1.tgz",
|
||||
"integrity": "sha512-aZW88SY8kQbU7gpV19lN24LtXh/yD4ZZg6qieAJDDg+YBsJcSmLGK9QpnUjAKVG/xefmvJGd1WUmfpT/g6AJGA==",
|
||||
"version": "1.13.0",
|
||||
"resolved": "https://registry.npmjs.org/tslib/-/tslib-1.13.0.tgz",
|
||||
"integrity": "sha512-i/6DQjL8Xf3be4K/E6Wgpekn5Qasl1usyw++dAA35Ue5orEn65VIxOA+YvNNl9HV3qv70T7CNwjODHZrLwvd1Q==",
|
||||
"dev": true
|
||||
},
|
||||
"tslint": {
|
||||
"version": "6.1.0",
|
||||
"resolved": "https://registry.npmjs.org/tslint/-/tslint-6.1.0.tgz",
|
||||
"integrity": "sha512-fXjYd/61vU6da04E505OZQGb2VCN2Mq3doeWcOIryuG+eqdmFUXTYVwdhnbEu2k46LNLgUYt9bI5icQze/j0bQ==",
|
||||
"version": "6.1.3",
|
||||
"resolved": "https://registry.npmjs.org/tslint/-/tslint-6.1.3.tgz",
|
||||
"integrity": "sha512-IbR4nkT96EQOvKE2PW/djGz8iGNeJ4rF2mBfiYaR/nvUWYKJhLwimoJKgjIFEIDibBtOevj7BqCRL4oHeWWUCg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@babel/code-frame": "7.8.3",
|
||||
"@babel/code-frame": "7.10.4",
|
||||
"builtin-modules": "1.1.1",
|
||||
"chalk": "2.4.2",
|
||||
"commander": "2.20.0",
|
||||
@@ -4107,11 +4101,28 @@
|
||||
"glob": "7.1.6",
|
||||
"js-yaml": "3.13.1",
|
||||
"minimatch": "3.0.4",
|
||||
"mkdirp": "0.5.1",
|
||||
"mkdirp": "0.5.5",
|
||||
"resolve": "1.12.0",
|
||||
"semver": "5.5.0",
|
||||
"tslib": "1.11.1",
|
||||
"tslib": "1.13.0",
|
||||
"tsutils": "2.29.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"minimist": {
|
||||
"version": "1.2.5",
|
||||
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz",
|
||||
"integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==",
|
||||
"dev": true
|
||||
},
|
||||
"mkdirp": {
|
||||
"version": "0.5.5",
|
||||
"resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz",
|
||||
"integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"minimist": "1.2.5"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"tslint-config-standard": {
|
||||
@@ -4157,7 +4168,7 @@
|
||||
"integrity": "sha512-g5JVHCIJwzfISaXpXE1qvNalca5Jwob6FjI4AoPlqMusJ6ftFE7IkkFoMhVLRgK+4Kx3gkzb8UZK5t5yTTvEmA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"tslib": "1.11.1"
|
||||
"tslib": "1.13.0"
|
||||
}
|
||||
},
|
||||
"tunnel-agent": {
|
||||
|
||||
+5
-3
@@ -8,7 +8,8 @@
|
||||
"test": "echo \"Error: no test specified\" && exit 1",
|
||||
"lint": "tslint --project .",
|
||||
"lint:fix": "tslint --project . --fix",
|
||||
"build": "npm run build:json && npm run build:ts && npm run lint && npm run build:doc",
|
||||
"build": "npm run build:clean && npm run build:json && npm run build:ts && npm run lint && npm run build:doc",
|
||||
"build:clean": "rimraf build",
|
||||
"build:json": "node ./scripts/build-schemas.js",
|
||||
"build:ts": "tsc",
|
||||
"build:doc": "npm run build:doc:json",
|
||||
@@ -39,7 +40,8 @@
|
||||
"@types/socket.io": "^2.1.4",
|
||||
"@types/tokgen": "^1.0.0",
|
||||
"@types/umzug": "^2.2.3",
|
||||
"tslint": "^6.1.0",
|
||||
"rimraf": "^3.0.2",
|
||||
"tslint": "^6.1.3",
|
||||
"tslint-config-standard": "^9.0.0",
|
||||
"typescript": "^3.8.3",
|
||||
"typescript-json-schema": "^0.42.0"
|
||||
@@ -54,7 +56,7 @@
|
||||
"express": "^4.17.1",
|
||||
"http-errors": "^1.7.3",
|
||||
"iab_verifier": "^0.1.2",
|
||||
"lodash": "^4.17.15",
|
||||
"lodash": "^4.17.19",
|
||||
"mariadb": "^2.3.1",
|
||||
"pg": "^7.18.2",
|
||||
"pg-hstore": "^2.3.3",
|
||||
|
||||
@@ -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,10 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { assertNonEmptyListWithoutDuplicates } from '../util/list'
|
||||
import { assertIdWithinFamily } from '../util/token'
|
||||
import { ParentAction } from './basetypes'
|
||||
import { assertIdWithinFamily, assertNonEmptyListWithoutDuplicates } from './meta/util'
|
||||
|
||||
const actionType = 'AddCategoryApps'
|
||||
|
||||
export class AddCategoryAppsAction extends ParentAction {
|
||||
readonly categoryId: string
|
||||
@@ -26,19 +27,13 @@ export class AddCategoryAppsAction extends ParentAction {
|
||||
constructor ({ categoryId, packageNames }: {categoryId: string, packageNames: Array<string>}) {
|
||||
super()
|
||||
|
||||
assertIdWithinFamily(categoryId)
|
||||
assertNonEmptyListWithoutDuplicates(packageNames)
|
||||
assertIdWithinFamily({ actionType, field: 'categoryId', value: categoryId })
|
||||
assertNonEmptyListWithoutDuplicates({ actionType, field: 'packageNames', list: packageNames })
|
||||
|
||||
this.categoryId = categoryId
|
||||
this.packageNames = packageNames
|
||||
}
|
||||
|
||||
serialize = (): SerializedAddCategoryAppsAction => ({
|
||||
type: 'ADD_CATEGORY_APPS',
|
||||
categoryId: this.categoryId,
|
||||
packageNames: this.packageNames
|
||||
})
|
||||
|
||||
static parse = ({ categoryId, packageNames }: SerializedAddCategoryAppsAction) => (
|
||||
new AddCategoryAppsAction({ categoryId, packageNames })
|
||||
)
|
||||
|
||||
@@ -0,0 +1,67 @@
|
||||
/*
|
||||
* server component for the TimeLimit App
|
||||
* 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
|
||||
* published by the Free Software Foundation, version 3 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { anonymizedNetworkIdLength } from '../database/categorynetworkid'
|
||||
import { ParentAction } from './basetypes'
|
||||
import { InvalidActionParameterException } from './meta/exception'
|
||||
import { assertHexString, assertIdWithinFamily } from './meta/util'
|
||||
|
||||
const actionType = 'AddCategoryNetworkIdAction'
|
||||
|
||||
export class AddCategoryNetworkIdAction extends ParentAction {
|
||||
readonly categoryId: string
|
||||
readonly itemId: string
|
||||
readonly hashedNetworkId: string
|
||||
|
||||
constructor ({ categoryId, itemId, hashedNetworkId }: {
|
||||
categoryId: string
|
||||
itemId: string
|
||||
hashedNetworkId: string
|
||||
}) {
|
||||
super()
|
||||
|
||||
assertIdWithinFamily({ actionType, field: 'categoryId', value: categoryId })
|
||||
assertIdWithinFamily({ actionType, field: 'itemId', value: itemId })
|
||||
assertHexString({ actionType, field: 'hashedNetworkId', value: hashedNetworkId })
|
||||
|
||||
if (hashedNetworkId.length !== anonymizedNetworkIdLength) {
|
||||
throw new InvalidActionParameterException({
|
||||
actionType,
|
||||
staticMessage: 'wrong network id length'
|
||||
})
|
||||
}
|
||||
|
||||
this.categoryId = categoryId
|
||||
this.itemId = itemId
|
||||
this.hashedNetworkId = hashedNetworkId
|
||||
}
|
||||
|
||||
static parse = ({ categoryId, itemId, hashedNetworkId }: SerializedAddCategoryNetworkIdAction) => (
|
||||
new AddCategoryNetworkIdAction({
|
||||
categoryId,
|
||||
itemId,
|
||||
hashedNetworkId
|
||||
})
|
||||
)
|
||||
}
|
||||
|
||||
export interface SerializedAddCategoryNetworkIdAction {
|
||||
type: 'ADD_CATEGORY_NETWORK_ID'
|
||||
categoryId: string
|
||||
itemId: string
|
||||
hashedNetworkId: string
|
||||
}
|
||||
@@ -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
|
||||
@@ -16,8 +16,10 @@
|
||||
*/
|
||||
|
||||
import { InstalledApp, SerializedInstalledApp } from '../model/installedapp'
|
||||
import { assertNonEmptyListWithoutDuplicates } from '../util/list'
|
||||
import { AppLogicAction } from './basetypes'
|
||||
import { assertNonEmptyListWithoutDuplicates } from './meta/util'
|
||||
|
||||
const actionType = 'AddInstalledAppsAction'
|
||||
|
||||
export class AddInstalledAppsAction extends AppLogicAction {
|
||||
readonly apps: Array<InstalledApp>
|
||||
@@ -25,16 +27,11 @@ export class AddInstalledAppsAction extends AppLogicAction {
|
||||
constructor ({ apps }: {apps: Array<InstalledApp>}) {
|
||||
super()
|
||||
|
||||
assertNonEmptyListWithoutDuplicates(apps.map((app) => app.packageName))
|
||||
assertNonEmptyListWithoutDuplicates({ actionType, field: 'apps', list: apps.map((app) => app.packageName) })
|
||||
|
||||
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))
|
||||
|
||||
+21
-14
@@ -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,8 +15,11 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { assertIdWithinFamily } from '../util/token'
|
||||
import { AppLogicAction } from './basetypes'
|
||||
import { InvalidActionParameterException } from './meta/exception'
|
||||
import { assertIdWithinFamily } from './meta/util'
|
||||
|
||||
const actionType = 'AddUsedTimeAction'
|
||||
|
||||
export class AddUsedTimeAction extends AppLogicAction {
|
||||
readonly categoryId: string
|
||||
@@ -32,18 +35,30 @@ export class AddUsedTimeAction extends AppLogicAction {
|
||||
}) {
|
||||
super()
|
||||
|
||||
assertIdWithinFamily(categoryId)
|
||||
assertIdWithinFamily({ actionType, field: 'categoryId', value: categoryId })
|
||||
|
||||
if (dayOfEpoch < 0 || (!Number.isSafeInteger(dayOfEpoch))) {
|
||||
throw new Error('illegal dayOfEpoch')
|
||||
throw new InvalidActionParameterException({
|
||||
actionType,
|
||||
staticMessage: 'invalid dayOfEpoch',
|
||||
dynamicMessage: 'invalid dayOfEpoch: ' + dayOfEpoch
|
||||
})
|
||||
}
|
||||
|
||||
if (timeToAdd < 0 || (!Number.isSafeInteger(timeToAdd))) {
|
||||
throw new Error('illegal timeToAdd')
|
||||
throw new InvalidActionParameterException({
|
||||
actionType,
|
||||
staticMessage: 'illegal timeToAdd',
|
||||
dynamicMessage: 'illegal timeToAdd: ' + timeToAdd
|
||||
})
|
||||
}
|
||||
|
||||
if (extraTimeToSubtract < 0 || (!Number.isSafeInteger(extraTimeToSubtract))) {
|
||||
throw new Error('illegal extra time to subtract')
|
||||
throw new InvalidActionParameterException({
|
||||
actionType,
|
||||
staticMessage: 'illegal extra time to subtract',
|
||||
dynamicMessage: 'illegal extra time to subtract: ' + extraTimeToSubtract
|
||||
})
|
||||
}
|
||||
|
||||
this.categoryId = categoryId
|
||||
@@ -52,14 +67,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,
|
||||
|
||||
+48
-52
@@ -15,10 +15,12 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { uniq } from 'lodash'
|
||||
import { MinuteOfDay } from '../util/minuteofday'
|
||||
import { assertIdWithinFamily } from '../util/token'
|
||||
import { AppLogicAction } from './basetypes'
|
||||
import { InvalidActionParameterException } from './meta/exception'
|
||||
import { assertIdWithinFamily, assertListWithoutDuplicates, assertSafeInteger, throwOutOfRange } from './meta/util'
|
||||
|
||||
const actionType = 'AddUsedTimeActionVersion2'
|
||||
|
||||
export class AddUsedTimeActionVersion2 extends AppLogicAction {
|
||||
readonly dayOfEpoch: number
|
||||
@@ -44,46 +46,54 @@ export class AddUsedTimeActionVersion2 extends AppLogicAction {
|
||||
}) {
|
||||
super()
|
||||
|
||||
if (dayOfEpoch < 0 || (!Number.isSafeInteger(dayOfEpoch))) {
|
||||
throw new Error('illegal dayOfEpoch')
|
||||
assertSafeInteger({ actionType, field: 'dayOfEpoch', value: dayOfEpoch })
|
||||
|
||||
if (dayOfEpoch < 0) {
|
||||
throwOutOfRange({ actionType, field: 'dayOfEpoch', value: dayOfEpoch })
|
||||
}
|
||||
|
||||
if (trustedTimestamp < 0 || (!Number.isSafeInteger(trustedTimestamp))) {
|
||||
throw new Error('illegal trustedTimestamp')
|
||||
assertSafeInteger({ actionType, field: 'trustedTimestamp', value: trustedTimestamp })
|
||||
|
||||
if (trustedTimestamp < 0) {
|
||||
throwOutOfRange({ actionType, field: 'trustedTimestamp', value: trustedTimestamp })
|
||||
}
|
||||
|
||||
if (items.length === 0) {
|
||||
throw new Error('missing items')
|
||||
throw new InvalidActionParameterException({ actionType, staticMessage: 'no items' })
|
||||
}
|
||||
|
||||
if (items.length !== uniq(items.map((item) => item.categoryId)).length) {
|
||||
throw new Error('duplicate category ids')
|
||||
}
|
||||
assertListWithoutDuplicates({
|
||||
actionType,
|
||||
field: 'categoryIds',
|
||||
list: items.map((item) => item.categoryId)
|
||||
})
|
||||
|
||||
items.forEach((item) => {
|
||||
assertIdWithinFamily(item.categoryId)
|
||||
assertIdWithinFamily({ actionType, field: 'categoryId', value: item.categoryId })
|
||||
|
||||
if (item.timeToAdd < 0 || (!Number.isSafeInteger(item.timeToAdd))) {
|
||||
throw new Error('illegal timeToAdd')
|
||||
assertSafeInteger({ actionType, field: 'timeToAdd', value: item.timeToAdd })
|
||||
|
||||
if (item.timeToAdd < 0) {
|
||||
throwOutOfRange({ actionType, field: 'timeToAdd', value: item.timeToAdd })
|
||||
}
|
||||
|
||||
if (item.extraTimeToSubtract < 0 || (!Number.isSafeInteger(item.extraTimeToSubtract))) {
|
||||
throw new Error('illegal extra time to subtract')
|
||||
assertSafeInteger({ actionType, field: 'extraTimeToSubtract', value: item.extraTimeToSubtract })
|
||||
|
||||
if (item.extraTimeToSubtract < 0) {
|
||||
throwOutOfRange({ actionType, field: 'extraTimeToSubtract', value: item.extraTimeToSubtract })
|
||||
}
|
||||
|
||||
if (
|
||||
uniq(item.additionalCountingSlots.map((item) => JSON.stringify(item.serialize()))).length !==
|
||||
item.additionalCountingSlots.length
|
||||
) {
|
||||
throw new Error()
|
||||
}
|
||||
assertListWithoutDuplicates({
|
||||
actionType,
|
||||
field: 'additionalCountingSlots',
|
||||
list: item.additionalCountingSlots.map((item) => JSON.stringify(item.serialize()))
|
||||
})
|
||||
|
||||
if (
|
||||
uniq(item.sessionDurationLimits.map((item) => JSON.stringify(item.serialize()))).length !==
|
||||
item.sessionDurationLimits.length
|
||||
) {
|
||||
throw new Error()
|
||||
}
|
||||
assertListWithoutDuplicates({
|
||||
actionType,
|
||||
field: 'sessionDurationLimits',
|
||||
list: item.sessionDurationLimits.map((item) => JSON.stringify(item.serialize()))
|
||||
})
|
||||
})
|
||||
|
||||
this.dayOfEpoch = dayOfEpoch
|
||||
@@ -91,17 +101,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,
|
||||
@@ -122,16 +121,15 @@ class AddUsedTimeActionItemAdditionalCountingSlot {
|
||||
readonly end: number
|
||||
|
||||
constructor ({ start, end }: { start: number, end: number }) {
|
||||
if ((!Number.isSafeInteger(start)) || (!Number.isSafeInteger(end))) {
|
||||
throw new Error()
|
||||
}
|
||||
assertSafeInteger({ actionType, field: 'start', value: start })
|
||||
assertSafeInteger({ actionType, field: 'end', value: end })
|
||||
|
||||
if (start < MinuteOfDay.MIN || end > MinuteOfDay.MAX || start > end) {
|
||||
throw new Error()
|
||||
throw new InvalidActionParameterException({ actionType, staticMessage: 'start or end out of range' })
|
||||
}
|
||||
|
||||
if (start === MinuteOfDay.MIN && end === MinuteOfDay.MAX) {
|
||||
throw new Error()
|
||||
throw new InvalidActionParameterException({ actionType, staticMessage: 'couting slot can not fill the whole day' })
|
||||
}
|
||||
|
||||
this.start = start
|
||||
@@ -150,19 +148,17 @@ class AddUsedTimeActionItemSessionDurationLimitSlot {
|
||||
readonly pause: number
|
||||
|
||||
constructor ({ start, end, duration, pause }: { start: number, end: number, duration: number, pause: number }) {
|
||||
if (
|
||||
(!Number.isSafeInteger(start)) || (!Number.isSafeInteger(end)) ||
|
||||
(!Number.isSafeInteger(duration)) || (!Number.isSafeInteger(pause))
|
||||
) {
|
||||
throw new Error()
|
||||
}
|
||||
assertSafeInteger({ actionType, field: 'start', value: start })
|
||||
assertSafeInteger({ actionType, field: 'end', value: end })
|
||||
assertSafeInteger({ actionType, field: 'duration', value: duration })
|
||||
assertSafeInteger({ actionType, field: 'pause', value: pause })
|
||||
|
||||
if (start < MinuteOfDay.MIN || end > MinuteOfDay.MAX || start > end) {
|
||||
throw new Error()
|
||||
throw new InvalidActionParameterException({ actionType, staticMessage: 'start or end out of range' })
|
||||
}
|
||||
|
||||
if (duration <= 0 || pause <= 0) {
|
||||
throw new Error()
|
||||
throw new InvalidActionParameterException({ actionType, staticMessage: 'duration and pause must not be zero or smaller' })
|
||||
}
|
||||
|
||||
this.start = start
|
||||
@@ -171,7 +167,7 @@ class AddUsedTimeActionItemSessionDurationLimitSlot {
|
||||
this.pause = pause
|
||||
}
|
||||
|
||||
serialize = () => [ this.start, this.end ]
|
||||
serialize = () => [ this.start, this.end, this.duration, this.pause ]
|
||||
|
||||
static parse = ([ start, end, duration, pause ]: [number, number, number, number]) => new AddUsedTimeActionItemSessionDurationLimitSlot({ start, end, duration, pause })
|
||||
}
|
||||
|
||||
+21
-15
@@ -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,12 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { assertParentPasswordValid, ParentPassword } from '../api/schema'
|
||||
import { assertIdWithinFamily } from '../util/token'
|
||||
import { assertParentPasswordValid, ParentPassword, ParentPasswordValidationException } from '../api/schema'
|
||||
import { ParentAction } from './basetypes'
|
||||
import { InvalidActionParameterException } from './meta/exception'
|
||||
import { assertIdWithinFamily } from './meta/util'
|
||||
|
||||
const actionType = 'AddUserAction'
|
||||
|
||||
export class AddUserAction extends ParentAction {
|
||||
readonly userId: string
|
||||
@@ -35,7 +38,7 @@ export class AddUserAction extends ParentAction {
|
||||
}) {
|
||||
super()
|
||||
|
||||
assertIdWithinFamily(userId)
|
||||
assertIdWithinFamily({ actionType, field: 'userId', value: userId })
|
||||
|
||||
this.userId = userId
|
||||
this.name = name
|
||||
@@ -45,24 +48,27 @@ export class AddUserAction extends ParentAction {
|
||||
|
||||
if (userType === 'parent') {
|
||||
if (!password) {
|
||||
throw new Error('parent users must have got an password')
|
||||
throw new InvalidActionParameterException({
|
||||
actionType,
|
||||
staticMessage: 'parent users must have got an password'
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
if (password) {
|
||||
assertParentPasswordValid(password)
|
||||
try {
|
||||
assertParentPasswordValid(password)
|
||||
} catch (ex) {
|
||||
if (ex instanceof ParentPasswordValidationException) {
|
||||
throw new InvalidActionParameterException({
|
||||
actionType,
|
||||
staticMessage: 'invalid password data'
|
||||
})
|
||||
} else throw ex
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
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,
|
||||
|
||||
@@ -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 <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
export abstract class Action {
|
||||
abstract serialize: () => object
|
||||
}
|
||||
export abstract class Action {}
|
||||
|
||||
export abstract class AppLogicAction extends Action {}
|
||||
|
||||
|
||||
@@ -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
|
||||
@@ -16,9 +16,11 @@
|
||||
*/
|
||||
|
||||
import { createDecipheriv, createHash } from 'crypto'
|
||||
import { assertIsHexString } from '../util/hexstring'
|
||||
import { assertIdWithinFamily } from '../util/token'
|
||||
import { ParentAction } from './basetypes'
|
||||
import { InvalidActionParameterException } from './meta/exception'
|
||||
import { assertHexString, assertIdWithinFamily } from './meta/util'
|
||||
|
||||
const actionType = 'ChangeParentPasswordAction'
|
||||
|
||||
export class ChangeParentPasswordAction extends ParentAction {
|
||||
readonly parentUserId: string
|
||||
@@ -36,7 +38,7 @@ export class ChangeParentPasswordAction extends ParentAction {
|
||||
}) {
|
||||
super()
|
||||
|
||||
assertIdWithinFamily(parentUserId)
|
||||
assertIdWithinFamily({ actionType, field: 'parentUserId', value: parentUserId })
|
||||
|
||||
if (
|
||||
(!parentUserId) ||
|
||||
@@ -45,15 +47,25 @@ export class ChangeParentPasswordAction extends ParentAction {
|
||||
(!newPasswordSecondHashEncrypted) ||
|
||||
(!integrity)
|
||||
) {
|
||||
throw new Error('missing required parameter for change parent password')
|
||||
throw new InvalidActionParameterException({
|
||||
actionType,
|
||||
staticMessage: 'missing required parameter for change parent password'
|
||||
})
|
||||
}
|
||||
|
||||
if (integrity.length !== 128) {
|
||||
throw new Error('wrong length of integrity data')
|
||||
throw new InvalidActionParameterException({
|
||||
actionType,
|
||||
staticMessage: 'wrong length of integrity data'
|
||||
})
|
||||
}
|
||||
|
||||
assertIsHexString(newPasswordSecondHashEncrypted)
|
||||
assertIsHexString(integrity)
|
||||
assertHexString({ actionType, field: 'newPasswordSecondHashEncrypted', value: newPasswordSecondHashEncrypted })
|
||||
assertHexString({ actionType, field: 'integrity', value: integrity })
|
||||
|
||||
if (newPasswordSecondHashEncrypted.length <= 70) {
|
||||
throw new InvalidActionParameterException({ actionType, staticMessage: 'wrong length of the new password' })
|
||||
}
|
||||
|
||||
this.parentUserId = parentUserId
|
||||
this.newPasswordFirstHash = newPasswordFirstHash
|
||||
@@ -62,15 +74,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,
|
||||
@@ -91,15 +94,11 @@ export class ChangeParentPasswordAction extends ParentAction {
|
||||
const expected = createHash('sha512').update(integrityData).digest('hex')
|
||||
|
||||
if (expected !== this.integrity) {
|
||||
throw new Error('invalid integrity for change parent password action')
|
||||
throw new InvalidChangeParentPasswordIntegrityException()
|
||||
}
|
||||
}
|
||||
|
||||
decryptSecondHash ({ oldPasswordSecondHash }: {oldPasswordSecondHash: string}) {
|
||||
if (this.newPasswordSecondHashEncrypted.length <= 70) {
|
||||
throw new Error('wrong length of the new password')
|
||||
}
|
||||
|
||||
decryptSecondHash ({ oldPasswordSecondHash }: { oldPasswordSecondHash: string }) {
|
||||
const ivHex = this.newPasswordSecondHashEncrypted.substring(0, 32)
|
||||
const salt = this.newPasswordSecondHashEncrypted.substring(32, 64)
|
||||
const encryptedData = this.newPasswordSecondHashEncrypted.substring(64)
|
||||
@@ -124,3 +123,7 @@ export interface SerializedChangeParentPasswordAction {
|
||||
secondHashEncrypted: string
|
||||
integrity: string
|
||||
}
|
||||
|
||||
export class InvalidChangeParentPasswordIntegrityException extends Error {
|
||||
constructor () { super('invalid integrity for change parent password action') }
|
||||
}
|
||||
|
||||
@@ -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,8 +15,11 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { assertParentPasswordValid, ParentPassword } from '../api/schema'
|
||||
import { assertParentPasswordValid, ParentPassword, ParentPasswordValidationException } from '../api/schema'
|
||||
import { ChildAction } from './basetypes'
|
||||
import { InvalidActionParameterException } from './meta/exception'
|
||||
|
||||
const actionType = 'ChildChangePasswordAction'
|
||||
|
||||
export class ChildChangePasswordAction extends ChildAction {
|
||||
readonly password: ParentPassword
|
||||
@@ -26,16 +29,20 @@ export class ChildChangePasswordAction extends ChildAction {
|
||||
}) {
|
||||
super()
|
||||
|
||||
assertParentPasswordValid(password)
|
||||
try {
|
||||
assertParentPasswordValid(password)
|
||||
} catch (ex) {
|
||||
if (ex instanceof ParentPasswordValidationException) {
|
||||
throw new InvalidActionParameterException({
|
||||
actionType,
|
||||
staticMessage: 'invalid password'
|
||||
})
|
||||
} else throw ex
|
||||
}
|
||||
|
||||
this.password = password
|
||||
}
|
||||
|
||||
serialize = (): SerializedChildChangePasswordAction => ({
|
||||
type: 'CHILD_CHANGE_PASSWORD',
|
||||
password: this.password
|
||||
})
|
||||
|
||||
static parse = ({ password }: SerializedChildChangePasswordAction) => (
|
||||
new ChildChangePasswordAction({ password })
|
||||
)
|
||||
|
||||
@@ -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,11 +22,7 @@ export class ChildSignInAction extends ChildAction {
|
||||
super()
|
||||
}
|
||||
|
||||
serialize = (): SerializedChildSignInAction => ({
|
||||
type: 'CHILD_SIGN_IN'
|
||||
})
|
||||
|
||||
static parse = (action: SerializedChildSignInAction) => (
|
||||
static parse = (_: SerializedChildSignInAction) => (
|
||||
new ChildSignInAction()
|
||||
)
|
||||
}
|
||||
|
||||
@@ -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,8 +15,10 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { assertIdWithinFamily } from '../util/token'
|
||||
import { ParentAction } from './basetypes'
|
||||
import { assertIdWithinFamily } from './meta/util'
|
||||
|
||||
const actionType = 'CreateCategoryAction'
|
||||
|
||||
export class CreateCategoryAction extends ParentAction {
|
||||
readonly categoryId: string
|
||||
@@ -26,21 +28,14 @@ export class CreateCategoryAction extends ParentAction {
|
||||
constructor ({ categoryId, childId, title }: {categoryId: string, childId: string, title: string}) {
|
||||
super()
|
||||
|
||||
assertIdWithinFamily(categoryId)
|
||||
assertIdWithinFamily(childId)
|
||||
assertIdWithinFamily({ actionType, field: 'categoryId', value: categoryId })
|
||||
assertIdWithinFamily({ actionType, field: 'childId', value: childId })
|
||||
|
||||
this.categoryId = categoryId
|
||||
this.childId = childId
|
||||
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 })
|
||||
)
|
||||
|
||||
@@ -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,8 +15,11 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { SerializedTimeLimitRule, TimelimitRule } from '../model/timelimitrule'
|
||||
import { ParseTimeLimitRuleException, SerializedTimeLimitRule, TimelimitRule } from '../model/timelimitrule'
|
||||
import { ParentAction } from './basetypes'
|
||||
import { InvalidActionParameterException } from './meta/exception'
|
||||
|
||||
const actionType = 'CreateTimeLimitRuleAction'
|
||||
|
||||
export class CreateTimeLimitRuleAction extends ParentAction {
|
||||
rule: TimelimitRule
|
||||
@@ -27,16 +30,21 @@ 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)
|
||||
})
|
||||
)
|
||||
static parse = ({ rule }: SerializedCreateTimelimtRuleAction) => {
|
||||
try {
|
||||
return new CreateTimeLimitRuleAction({
|
||||
rule: TimelimitRule.parse(rule)
|
||||
})
|
||||
} catch (ex) {
|
||||
if (ex instanceof ParseTimeLimitRuleException) {
|
||||
throw new InvalidActionParameterException({
|
||||
actionType,
|
||||
staticMessage: 'invalid time limit rule',
|
||||
dynamicMessage: 'invalid time limit rule: ' + ex.toString()
|
||||
})
|
||||
} else throw ex
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export interface SerializedCreateTimelimtRuleAction {
|
||||
|
||||
@@ -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,25 +15,22 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { assertIdWithinFamily } from '../util/token'
|
||||
import { ParentAction } from './basetypes'
|
||||
import { assertIdWithinFamily } from './meta/util'
|
||||
|
||||
const actionType = 'DeleteCategoryAction'
|
||||
|
||||
export class DeleteCategoryAction extends ParentAction {
|
||||
readonly categoryId: string
|
||||
|
||||
constructor ({ categoryId }: {categoryId: string}) {
|
||||
constructor ({ categoryId }: { categoryId: string }) {
|
||||
super()
|
||||
|
||||
assertIdWithinFamily(categoryId)
|
||||
assertIdWithinFamily({ actionType, field: 'categoryId', value: categoryId })
|
||||
|
||||
this.categoryId = categoryId
|
||||
}
|
||||
|
||||
serialize = (): SerializedDeleteCategoryAction => ({
|
||||
type: 'DELETE_CATEGORY',
|
||||
categoryId: this.categoryId
|
||||
})
|
||||
|
||||
static parse = ({ categoryId }: SerializedDeleteCategoryAction) => (
|
||||
new DeleteCategoryAction({ categoryId })
|
||||
)
|
||||
|
||||
@@ -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,8 +15,10 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { assertIdWithinFamily } from '../util/token'
|
||||
import { ParentAction } from './basetypes'
|
||||
import { assertIdWithinFamily } from './meta/util'
|
||||
|
||||
const actionType = 'DeleteTimeLimitRuleAction'
|
||||
|
||||
export class DeleteTimeLimitRuleAction extends ParentAction {
|
||||
readonly ruleId: string
|
||||
@@ -24,16 +26,11 @@ export class DeleteTimeLimitRuleAction extends ParentAction {
|
||||
constructor ({ ruleId }: {ruleId: string}) {
|
||||
super()
|
||||
|
||||
assertIdWithinFamily(ruleId)
|
||||
assertIdWithinFamily({ actionType, field: 'ruleId', value: ruleId })
|
||||
|
||||
this.ruleId = ruleId
|
||||
}
|
||||
|
||||
serialize = (): SerializedDeleteTimeLimitRuleAction => ({
|
||||
type: 'DELETE_TIMELIMIT_RULE',
|
||||
ruleId: this.ruleId
|
||||
})
|
||||
|
||||
static parse = ({ ruleId }: SerializedDeleteTimeLimitRuleAction) => (
|
||||
new DeleteTimeLimitRuleAction({ ruleId })
|
||||
)
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
/*
|
||||
* server component for the TimeLimit App
|
||||
* 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
|
||||
* published by the Free Software Foundation, version 3 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { AppLogicAction } from './basetypes'
|
||||
|
||||
export class ForceSyncAction extends AppLogicAction {
|
||||
static instance = new ForceSyncAction()
|
||||
|
||||
private constructor () {
|
||||
super()
|
||||
}
|
||||
|
||||
static parse = (_: SerializedForceSyncAction) => ForceSyncAction.instance
|
||||
}
|
||||
|
||||
export interface SerializedForceSyncAction {
|
||||
type: 'FORCE_SYNC'
|
||||
}
|
||||
@@ -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
|
||||
@@ -16,8 +16,10 @@
|
||||
*/
|
||||
|
||||
import { DeviceHadManipulationFlags } from '../database/device'
|
||||
import { assertIdWithinFamily } from '../util/token'
|
||||
import { ParentAction } from './basetypes'
|
||||
import { assertIdWithinFamily, assertSafeInteger, throwOutOfRange } from './meta/util'
|
||||
|
||||
const actionType = 'IgnoreManipulationAction'
|
||||
|
||||
export class IgnoreManipulationAction extends ParentAction {
|
||||
readonly deviceId: string
|
||||
@@ -51,13 +53,14 @@ export class IgnoreManipulationAction extends ParentAction {
|
||||
}) {
|
||||
super()
|
||||
|
||||
assertIdWithinFamily(deviceId)
|
||||
assertIdWithinFamily({ actionType, field: 'deviceId', value: deviceId })
|
||||
|
||||
assertSafeInteger({ actionType, field: 'ignoreHadManipulationFlags', value: ignoreHadManipulationFlags })
|
||||
|
||||
if (
|
||||
(!Number.isSafeInteger(ignoreHadManipulationFlags)) ||
|
||||
ignoreHadManipulationFlags < 0 || ignoreHadManipulationFlags > DeviceHadManipulationFlags.ALL
|
||||
) {
|
||||
throw new Error('invalid ignoreHadManipulationFlags')
|
||||
throwOutOfRange({ actionType, field: 'ignoreHadManipulationFlags', value: ignoreHadManipulationFlags })
|
||||
}
|
||||
|
||||
this.deviceId = deviceId
|
||||
@@ -73,20 +76,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,
|
||||
|
||||
@@ -15,8 +15,10 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { assertIdWithinFamily } from '../util/token'
|
||||
import { ParentAction } from './basetypes'
|
||||
import { assertIdWithinFamily, assertSafeInteger, throwOutOfRange } from './meta/util'
|
||||
|
||||
const actionType = 'IncrementCategoryExtraTimeAction'
|
||||
|
||||
export class IncrementCategoryExtraTimeAction extends ParentAction {
|
||||
readonly categoryId: string
|
||||
@@ -26,14 +28,18 @@ export class IncrementCategoryExtraTimeAction extends ParentAction {
|
||||
constructor ({ categoryId, addedExtraTime, day }: {categoryId: string, addedExtraTime: number, day: number}) {
|
||||
super()
|
||||
|
||||
assertIdWithinFamily(categoryId)
|
||||
assertIdWithinFamily({ actionType, field: 'categoryId', value: categoryId })
|
||||
|
||||
if (addedExtraTime <= 0 || (!Number.isSafeInteger(addedExtraTime))) {
|
||||
throw new Error('must add some extra time with IncrementCategoryExtraTimeAction')
|
||||
assertSafeInteger({ actionType, field: 'addedExtraTime', value: addedExtraTime })
|
||||
|
||||
if (addedExtraTime < 0) {
|
||||
throwOutOfRange({ actionType, field: 'addedExtraTime', value: addedExtraTime })
|
||||
}
|
||||
|
||||
if (day < -1 || (!Number.isSafeInteger(day))) {
|
||||
throw Error('day must be valid')
|
||||
assertSafeInteger({ actionType, field: 'day', value: day })
|
||||
|
||||
if (day < -1) {
|
||||
throwOutOfRange({ actionType, field: 'day', value: day })
|
||||
}
|
||||
|
||||
this.categoryId = categoryId
|
||||
@@ -41,13 +47,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 })
|
||||
)
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
export { AppLogicAction, ChildAction, ParentAction } from './basetypes'
|
||||
|
||||
export { AddCategoryAppsAction } from './addcategoryapps'
|
||||
export { AddCategoryNetworkIdAction } from './addcategorynetworkid'
|
||||
export { AddUserAction } from './adduser'
|
||||
export { AddInstalledAppsAction } from './addinstalledapps'
|
||||
export { AddUsedTimeAction } from './addusedtime'
|
||||
@@ -29,11 +30,13 @@ export { CreateCategoryAction } from './createcategory'
|
||||
export { CreateTimeLimitRuleAction } from './createtimelimitrule'
|
||||
export { DeleteCategoryAction } from './deletecategory'
|
||||
export { DeleteTimeLimitRuleAction } from './deletetimelimitrule'
|
||||
export { ForceSyncAction } from './forcesync'
|
||||
export { IgnoreManipulationAction } from './ignoremanipulation'
|
||||
export { IncrementCategoryExtraTimeAction } from './incrementcategoryextratime'
|
||||
export { RemoveCategoryAppsAction } from './removecategoryapps'
|
||||
export { RemoveInstalledAppsAction } from './removeinstalledapps'
|
||||
export { RemoveUserAction } from './removeuser'
|
||||
export { ResetCategoryNetworkIdsAction } from './resetcategorynetworkids'
|
||||
export { RenameChildAction } from './renamechild'
|
||||
export { ResetParentBlockedTimesAction } from './resetparentblockedtimes'
|
||||
export { SetCategoryExtraTimeAction } from './setcategoryextratime'
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
/*
|
||||
* server component for the TimeLimit App
|
||||
* 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
|
||||
* published by the Free Software Foundation, version 3 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { StaticMessageException } from '../../exception'
|
||||
|
||||
export class InvalidActionParameterException extends StaticMessageException {
|
||||
constructor ({ actionType, staticMessage, dynamicMessage }: {
|
||||
actionType: string
|
||||
staticMessage: string
|
||||
dynamicMessage?: string
|
||||
}) {
|
||||
super({
|
||||
staticMessage: 'invalid action paramters:' + actionType + ':' + staticMessage,
|
||||
dynamicMessage: dynamicMessage ? 'invalid action paramters:' + actionType + ':' + dynamicMessage : undefined
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
export class UnknownActionTypeException extends InvalidActionParameterException {
|
||||
constructor ({ group }: { group: string }) {
|
||||
super({
|
||||
actionType: group,
|
||||
staticMessage: 'unknown action type'
|
||||
})
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,104 @@
|
||||
/*
|
||||
* server component for the TimeLimit App
|
||||
* 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
|
||||
* published by the Free Software Foundation, version 3 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { checkIfHexString } from '../../util/hexstring'
|
||||
import { hasDuplicates } from '../../util/list'
|
||||
import { isIdWithinFamily } from '../../util/token'
|
||||
import { InvalidActionParameterException } from './exception'
|
||||
|
||||
export const assertIdWithinFamily = ({ value, actionType, field }: {
|
||||
value: string
|
||||
actionType: string
|
||||
field: string
|
||||
}) => {
|
||||
if (!isIdWithinFamily(value)) {
|
||||
throw new InvalidActionParameterException({
|
||||
actionType,
|
||||
staticMessage: 'invalid id within family for ' + field,
|
||||
dynamicMessage: 'invalid id within family for ' + field + ': ' + value
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
export const assertHexString = ({ value, actionType, field }: {
|
||||
value: string
|
||||
actionType: string
|
||||
field: string
|
||||
}) => {
|
||||
if (!checkIfHexString(value)) {
|
||||
throw new InvalidActionParameterException({
|
||||
actionType,
|
||||
staticMessage: 'invalid hex string for ' + field,
|
||||
dynamicMessage: 'invalid hex string for ' + field + ': ' + value
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
export const assertSafeInteger = ({ value, actionType, field }: {
|
||||
value: number
|
||||
actionType: string
|
||||
field: string
|
||||
}) => {
|
||||
if (!Number.isSafeInteger(value)) {
|
||||
throw new InvalidActionParameterException({
|
||||
actionType,
|
||||
staticMessage: 'require number for ' + field,
|
||||
dynamicMessage: 'require number for ' + field + ': ' + value
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
export const throwOutOfRange = ({ value, actionType, field }: {
|
||||
value: number
|
||||
actionType: string
|
||||
field: string
|
||||
}) => {
|
||||
throw new InvalidActionParameterException({
|
||||
actionType,
|
||||
staticMessage: field + ' out of range',
|
||||
dynamicMessage: field + ' out of range: ' + value
|
||||
})
|
||||
}
|
||||
|
||||
export function assertNonEmptyListWithoutDuplicates ({ list, actionType, field }: {
|
||||
list: Array<string>
|
||||
actionType: string
|
||||
field: string
|
||||
}) {
|
||||
assertListWithoutDuplicates({ list, actionType, field })
|
||||
|
||||
if (hasDuplicates(list)) {
|
||||
throw new InvalidActionParameterException({
|
||||
actionType,
|
||||
staticMessage: 'empty list for ' + field
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
export function assertListWithoutDuplicates ({ list, actionType, field }: {
|
||||
list: Array<string>
|
||||
actionType: string
|
||||
field: string
|
||||
}) {
|
||||
if (hasDuplicates(list)) {
|
||||
throw new InvalidActionParameterException({
|
||||
actionType,
|
||||
staticMessage: 'list has duplicates for ' + field,
|
||||
dynamicMessage: 'list has duplicates for ' + field + ': ' + list.join(';')
|
||||
})
|
||||
}
|
||||
}
|
||||
@@ -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,10 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { assertNonEmptyListWithoutDuplicates } from '../util/list'
|
||||
import { assertIdWithinFamily } from '../util/token'
|
||||
import { ParentAction } from './basetypes'
|
||||
import { assertIdWithinFamily, assertNonEmptyListWithoutDuplicates } from './meta/util'
|
||||
|
||||
const actionType = 'RemoveCategoryAppsAction'
|
||||
|
||||
export class RemoveCategoryAppsAction extends ParentAction {
|
||||
readonly categoryId: string
|
||||
@@ -26,19 +27,13 @@ export class RemoveCategoryAppsAction extends ParentAction {
|
||||
constructor ({ categoryId, packageNames }: {categoryId: string, packageNames: Array<string>}) {
|
||||
super()
|
||||
|
||||
assertIdWithinFamily(categoryId)
|
||||
assertNonEmptyListWithoutDuplicates(packageNames)
|
||||
assertIdWithinFamily({ actionType, field: 'categoryId', value: categoryId })
|
||||
assertNonEmptyListWithoutDuplicates({ actionType, field: 'packageNames', list: packageNames })
|
||||
|
||||
this.categoryId = categoryId
|
||||
this.packageNames = packageNames
|
||||
}
|
||||
|
||||
serialize = (): SerializedRemoveCategoryAppsAction => ({
|
||||
type: 'REMOVE_CATEGORY_APPS',
|
||||
categoryId: this.categoryId,
|
||||
packageNames: this.packageNames
|
||||
})
|
||||
|
||||
static parse = ({ categoryId, packageNames }: SerializedRemoveCategoryAppsAction) => (
|
||||
new RemoveCategoryAppsAction({ categoryId, packageNames })
|
||||
)
|
||||
|
||||
@@ -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,8 +15,10 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { assertNonEmptyListWithoutDuplicates } from '../util/list'
|
||||
import { AppLogicAction } from './basetypes'
|
||||
import { assertNonEmptyListWithoutDuplicates } from './meta/util'
|
||||
|
||||
const actionType = 'RemoveInstalledAppsAction'
|
||||
|
||||
export class RemoveInstalledAppsAction extends AppLogicAction {
|
||||
readonly packageNames: Array<string>
|
||||
@@ -24,16 +26,11 @@ export class RemoveInstalledAppsAction extends AppLogicAction {
|
||||
constructor ({ packageNames }: {packageNames: Array<string>}) {
|
||||
super()
|
||||
|
||||
assertNonEmptyListWithoutDuplicates(packageNames)
|
||||
assertNonEmptyListWithoutDuplicates({ actionType, field: 'packageNames', list: packageNames })
|
||||
|
||||
this.packageNames = packageNames
|
||||
}
|
||||
|
||||
serialize = (): SerializedRemoveInstalledAppsAction => ({
|
||||
type: 'REMOVE_INSTALLED_APPS',
|
||||
packageNames: this.packageNames
|
||||
})
|
||||
|
||||
static parse = ({ packageNames }: SerializedRemoveInstalledAppsAction) => (
|
||||
new RemoveInstalledAppsAction({ packageNames })
|
||||
)
|
||||
|
||||
@@ -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,8 +15,10 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { assertIdWithinFamily } from '../util/token'
|
||||
import { ParentAction } from './basetypes'
|
||||
import { assertIdWithinFamily } from './meta/util'
|
||||
|
||||
const actionType = 'RemoveUserAction'
|
||||
|
||||
export class RemoveUserAction extends ParentAction {
|
||||
readonly userId: string
|
||||
@@ -31,18 +33,12 @@ export class RemoveUserAction extends ParentAction {
|
||||
}) {
|
||||
super()
|
||||
|
||||
assertIdWithinFamily(userId)
|
||||
assertIdWithinFamily({ actionType, field: 'userId', value: userId })
|
||||
|
||||
this.userId = userId
|
||||
this.authentication = authentication
|
||||
}
|
||||
|
||||
serialize = (): SerializedRemoveUserAction => ({
|
||||
type: 'REMOVE_USER',
|
||||
userId: this.userId,
|
||||
authentication: this.authentication
|
||||
})
|
||||
|
||||
static parse = ({ userId, authentication }: SerializedRemoveUserAction) => (
|
||||
new RemoveUserAction({ userId, authentication })
|
||||
)
|
||||
|
||||
+10
-10
@@ -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,8 +15,11 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { assertIdWithinFamily } from '../util/token'
|
||||
import { ParentAction } from './basetypes'
|
||||
import { InvalidActionParameterException } from './meta/exception'
|
||||
import { assertIdWithinFamily } from './meta/util'
|
||||
|
||||
const actionType = 'RenameChildAction'
|
||||
|
||||
export class RenameChildAction extends ParentAction {
|
||||
readonly childId: string
|
||||
@@ -28,22 +31,19 @@ export class RenameChildAction extends ParentAction {
|
||||
}) {
|
||||
super()
|
||||
|
||||
assertIdWithinFamily(childId)
|
||||
assertIdWithinFamily({ actionType, field: 'childId', value: childId })
|
||||
|
||||
if (newName === '') {
|
||||
throw new Error('new name must not be empty')
|
||||
throw new InvalidActionParameterException({
|
||||
actionType,
|
||||
staticMessage: 'new name must not be empty'
|
||||
})
|
||||
}
|
||||
|
||||
this.childId = childId
|
||||
this.newName = newName
|
||||
}
|
||||
|
||||
serialize = (): SerializedRenameChildAction => ({
|
||||
type: 'RENAME_CHILD',
|
||||
childId: this.childId,
|
||||
newName: this.newName
|
||||
})
|
||||
|
||||
static parse = ({ childId, newName }: SerializedRenameChildAction) => (
|
||||
new RenameChildAction({ childId, newName })
|
||||
)
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
/*
|
||||
* server component for the TimeLimit App
|
||||
* 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
|
||||
* published by the Free Software Foundation, version 3 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { ParentAction } from './basetypes'
|
||||
import { assertIdWithinFamily } from './meta/util'
|
||||
|
||||
const actionType = 'ResetCategoryNetworkIdsAction'
|
||||
|
||||
export class ResetCategoryNetworkIdsAction extends ParentAction {
|
||||
readonly categoryId: string
|
||||
|
||||
constructor ({ categoryId }: {
|
||||
categoryId: string
|
||||
}) {
|
||||
super()
|
||||
|
||||
assertIdWithinFamily({ actionType, field: 'categoryId', value: categoryId })
|
||||
|
||||
this.categoryId = categoryId
|
||||
}
|
||||
|
||||
static parse = ({ categoryId }: SerializeResetCategoryNetworkIdsAction) => (
|
||||
new ResetCategoryNetworkIdsAction({
|
||||
categoryId
|
||||
})
|
||||
)
|
||||
}
|
||||
|
||||
export interface SerializeResetCategoryNetworkIdsAction {
|
||||
type: 'RESET_CATEGORY_NETWORK_IDS'
|
||||
categoryId: string
|
||||
}
|
||||
@@ -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,8 +15,10 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { assertIdWithinFamily } from '../util/token'
|
||||
import { ParentAction } from './basetypes'
|
||||
import { assertIdWithinFamily } from './meta/util'
|
||||
|
||||
const actionType = 'ResetParentBlockedTimesAction'
|
||||
|
||||
export class ResetParentBlockedTimesAction extends ParentAction {
|
||||
readonly parentId: string
|
||||
@@ -26,16 +28,11 @@ export class ResetParentBlockedTimesAction extends ParentAction {
|
||||
}) {
|
||||
super()
|
||||
|
||||
assertIdWithinFamily(parentId)
|
||||
assertIdWithinFamily({ actionType, field: 'parentId', value: parentId })
|
||||
|
||||
this.parentId = parentId
|
||||
}
|
||||
|
||||
serialize = (): SerializedResetParentBlockedTimesAction => ({
|
||||
type: 'RESET_PARENT_BLOCKED_TIMES',
|
||||
parentId: this.parentId
|
||||
})
|
||||
|
||||
static parse = ({ parentId }: SerializedResetParentBlockedTimesAction) => (
|
||||
new ResetParentBlockedTimesAction({
|
||||
parentId
|
||||
|
||||
@@ -19,6 +19,8 @@ import { AddInstalledAppsAction, SerializedAddInstalledAppsAction } from '../add
|
||||
import { AddUsedTimeAction, SerializedAddUsedTimeAction } from '../addusedtime'
|
||||
import { AddUsedTimeActionVersion2, SerializedAddUsedTimeActionVersion2 } from '../addusedtime2'
|
||||
import { AppLogicAction } from '../basetypes'
|
||||
import { ForceSyncAction, SerializedForceSyncAction } from '../forcesync'
|
||||
import { UnknownActionTypeException } from '../meta/exception'
|
||||
import { RemoveInstalledAppsAction, SerializedRemoveInstalledAppsAction } from '../removeinstalledapps'
|
||||
import { SerializedSignOutAtDeviceAction, SignOutAtDeviceAction } from '../signoutatdevice'
|
||||
import { SerialiezdTriedDisablingDeviceAdminAction, TriedDisablingDeviceAdminAction } from '../trieddisablingdeviceadmin'
|
||||
@@ -29,6 +31,7 @@ export type SerializedAppLogicAction =
|
||||
SerializedAddInstalledAppsAction |
|
||||
SerializedAddUsedTimeAction |
|
||||
SerializedAddUsedTimeActionVersion2 |
|
||||
SerializedForceSyncAction |
|
||||
SerializedRemoveInstalledAppsAction |
|
||||
SerializedSignOutAtDeviceAction |
|
||||
SerialiezdTriedDisablingDeviceAdminAction |
|
||||
@@ -42,6 +45,8 @@ export const parseAppLogicAction = (serialized: SerializedAppLogicAction): AppLo
|
||||
return AddUsedTimeActionVersion2.parse(serialized)
|
||||
} else if (serialized.type === 'ADD_INSTALLED_APPS') {
|
||||
return AddInstalledAppsAction.parse(serialized)
|
||||
} else if (serialized.type === 'FORCE_SYNC') {
|
||||
return ForceSyncAction.parse(serialized)
|
||||
} else if (serialized.type === 'REMOVE_INSTALLED_APPS') {
|
||||
return RemoveInstalledAppsAction.parse(serialized)
|
||||
} else if (serialized.type === 'SIGN_OUT_AT_DEVICE') {
|
||||
@@ -53,6 +58,6 @@ export const parseAppLogicAction = (serialized: SerializedAppLogicAction): AppLo
|
||||
} else if (serialized.type === 'UPDATE_DEVICE_STATUS') {
|
||||
return UpdateDeviceStatusAction.parse(serialized)
|
||||
} else {
|
||||
throw new Error('illegal state: unsupported type at parseAppLogicAction')
|
||||
throw new UnknownActionTypeException({ group: 'app logic' })
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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
|
||||
@@ -17,6 +17,7 @@
|
||||
|
||||
import { ChildChangePasswordAction, SerializedChildChangePasswordAction } from '../childchangepassword'
|
||||
import { ChildSignInAction, SerializedChildSignInAction } from '../childsignin'
|
||||
import { UnknownActionTypeException } from '../meta/exception'
|
||||
|
||||
export type SerializedChildAction = SerializedChildChangePasswordAction | SerializedChildSignInAction
|
||||
|
||||
@@ -26,6 +27,6 @@ export const parseChildAction = (serialized: SerializedChildAction) => {
|
||||
} else if (serialized.type === 'CHILD_SIGN_IN') {
|
||||
return ChildSignInAction.parse(serialized)
|
||||
} else {
|
||||
throw new Error('illegal state: unsupported type at parseChildAction')
|
||||
throw new UnknownActionTypeException({ group: 'child' })
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
*/
|
||||
|
||||
import { AddCategoryAppsAction, SerializedAddCategoryAppsAction } from '../addcategoryapps'
|
||||
import { AddCategoryNetworkIdAction, SerializedAddCategoryNetworkIdAction } from '../addcategorynetworkid'
|
||||
import { AddUserAction, SerializedAddUserAction } from '../adduser'
|
||||
import { ParentAction } from '../basetypes'
|
||||
import { ChangeParentPasswordAction, SerializedChangeParentPasswordAction } from '../changeparentpassword'
|
||||
@@ -25,9 +26,11 @@ import { DeleteCategoryAction, SerializedDeleteCategoryAction } from '../deletec
|
||||
import { DeleteTimeLimitRuleAction, SerializedDeleteTimeLimitRuleAction } from '../deletetimelimitrule'
|
||||
import { IgnoreManipulationAction, SerializedIgnoreManipulationAction } from '../ignoremanipulation'
|
||||
import { IncrementCategoryExtraTimeAction, SerializedIncrementCategoryExtraTimeAction } from '../incrementcategoryextratime'
|
||||
import { UnknownActionTypeException } from '../meta/exception'
|
||||
import { RemoveCategoryAppsAction, SerializedRemoveCategoryAppsAction } from '../removecategoryapps'
|
||||
import { RemoveUserAction, SerializedRemoveUserAction } from '../removeuser'
|
||||
import { RenameChildAction, SerializedRenameChildAction } from '../renamechild'
|
||||
import { ResetCategoryNetworkIdsAction, SerializeResetCategoryNetworkIdsAction } from '../resetcategorynetworkids'
|
||||
import { ResetParentBlockedTimesAction, SerializedResetParentBlockedTimesAction } from '../resetparentblockedtimes'
|
||||
import { SerializedSetCategoryExtraTimeAction, SetCategoryExtraTimeAction } from '../setcategoryextratime'
|
||||
import { SerializedSetCategoryForUnassignedAppsAction, SetCategoryForUnassignedAppsAction } from '../setcategoryforunassignedapps'
|
||||
@@ -60,6 +63,7 @@ import { SerializedUpdateUserLimitLoginCategory, UpdateUserLimitLoginCategory }
|
||||
|
||||
export type SerializedParentAction =
|
||||
SerializedAddCategoryAppsAction |
|
||||
SerializedAddCategoryNetworkIdAction |
|
||||
SerializedAddUserAction |
|
||||
SerializedChangeParentPasswordAction |
|
||||
SerializedCreateCategoryAction |
|
||||
@@ -71,6 +75,7 @@ export type SerializedParentAction =
|
||||
SerializedRemoveCategoryAppsAction |
|
||||
SerializedRemoveUserAction |
|
||||
SerializedRenameChildAction |
|
||||
SerializeResetCategoryNetworkIdsAction |
|
||||
SerializedResetParentBlockedTimesAction |
|
||||
SerializedSetCategoryForUnassignedAppsAction |
|
||||
SerializedSetChildPasswordAction |
|
||||
@@ -104,6 +109,8 @@ export type SerializedParentAction =
|
||||
export const parseParentAction = (action: SerializedParentAction): ParentAction => {
|
||||
if (action.type === 'ADD_CATEGORY_APPS') {
|
||||
return AddCategoryAppsAction.parse(action)
|
||||
} else if (action.type === 'ADD_CATEGORY_NETWORK_ID') {
|
||||
return AddCategoryNetworkIdAction.parse(action)
|
||||
} else if (action.type === 'ADD_USER') {
|
||||
return AddUserAction.parse(action)
|
||||
} else if (action.type === 'CHANGE_PARENT_PASSWORD') {
|
||||
@@ -126,6 +133,8 @@ export const parseParentAction = (action: SerializedParentAction): ParentAction
|
||||
return RemoveUserAction.parse(action)
|
||||
} else if (action.type === 'RENAME_CHILD') {
|
||||
return RenameChildAction.parse(action)
|
||||
} else if (action.type === 'RESET_CATEGORY_NETWORK_IDS') {
|
||||
return ResetCategoryNetworkIdsAction.parse(action)
|
||||
} else if (action.type === 'RESET_PARENT_BLOCKED_TIMES') {
|
||||
return ResetParentBlockedTimesAction.parse(action)
|
||||
} else if (action.type === 'SET_CATEGORY_EXTRA_TIME') {
|
||||
@@ -185,6 +194,6 @@ export const parseParentAction = (action: SerializedParentAction): ParentAction
|
||||
} else if (action.type === 'UPDATE_USER_LIMIT_LOGIN_CATEGORY') {
|
||||
return UpdateUserLimitLoginCategory.parse(action)
|
||||
} else {
|
||||
throw new Error('illegal state: invalid type for action at parseParentAction')
|
||||
throw new UnknownActionTypeException({ group: 'parent' })
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,8 +15,10 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { assertIdWithinFamily } from '../util/token'
|
||||
import { ParentAction } from './basetypes'
|
||||
import { assertIdWithinFamily, assertSafeInteger, throwOutOfRange } from './meta/util'
|
||||
|
||||
const actionType = 'SetCategoryExtraTimeAction'
|
||||
|
||||
export class SetCategoryExtraTimeAction extends ParentAction {
|
||||
readonly categoryId: string
|
||||
@@ -26,14 +28,18 @@ export class SetCategoryExtraTimeAction extends ParentAction {
|
||||
constructor ({ categoryId, newExtraTime, day }: {categoryId: string, newExtraTime: number, day: number}) {
|
||||
super()
|
||||
|
||||
assertIdWithinFamily(categoryId)
|
||||
assertIdWithinFamily({ actionType, field: 'categoryId', value: categoryId })
|
||||
|
||||
if (newExtraTime < 0 || (!Number.isSafeInteger(newExtraTime))) {
|
||||
throw Error('newExtraTime must be >= 0')
|
||||
assertSafeInteger({ actionType, field: 'newExtraTime', value: newExtraTime })
|
||||
|
||||
if (newExtraTime < 0) {
|
||||
throwOutOfRange({ actionType, field: 'newExtraTime', value: newExtraTime })
|
||||
}
|
||||
|
||||
if (day < -1 || (!Number.isSafeInteger(day))) {
|
||||
throw Error('day must be valid')
|
||||
assertSafeInteger({ actionType, field: 'day', value: day })
|
||||
|
||||
if (day < -1) {
|
||||
throwOutOfRange({ actionType, field: 'day', value: day })
|
||||
}
|
||||
|
||||
this.categoryId = categoryId
|
||||
@@ -41,13 +47,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 })
|
||||
)
|
||||
|
||||
@@ -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,8 +15,10 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { assertIdWithinFamily } from '../util/token'
|
||||
import { ParentAction } from './basetypes'
|
||||
import { assertIdWithinFamily } from './meta/util'
|
||||
|
||||
const actionType = 'SetCategoryForUnassignedAppsAction'
|
||||
|
||||
export class SetCategoryForUnassignedAppsAction extends ParentAction {
|
||||
readonly childId: string
|
||||
@@ -28,22 +30,16 @@ export class SetCategoryForUnassignedAppsAction extends ParentAction {
|
||||
}) {
|
||||
super()
|
||||
|
||||
assertIdWithinFamily(childId)
|
||||
assertIdWithinFamily({ actionType, field: 'childId', value: childId })
|
||||
|
||||
if (categoryId !== '') {
|
||||
assertIdWithinFamily(categoryId)
|
||||
assertIdWithinFamily({ actionType, field: 'categoryId', value: categoryId })
|
||||
}
|
||||
|
||||
this.childId = childId
|
||||
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 })
|
||||
)
|
||||
|
||||
@@ -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,12 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { assertParentPasswordValid, ParentPassword } from '../api/schema'
|
||||
import { assertIdWithinFamily } from '../util/token'
|
||||
import { assertParentPasswordValid, ParentPassword, ParentPasswordValidationException } from '../api/schema'
|
||||
import { ParentAction } from './basetypes'
|
||||
import { InvalidActionParameterException } from './meta/exception'
|
||||
import { assertIdWithinFamily } from './meta/util'
|
||||
|
||||
const actionType = 'SetChildPasswordAction'
|
||||
|
||||
export class SetChildPasswordAction extends ParentAction {
|
||||
readonly childUserId: string
|
||||
@@ -29,19 +32,23 @@ export class SetChildPasswordAction extends ParentAction {
|
||||
}) {
|
||||
super()
|
||||
|
||||
assertIdWithinFamily(childUserId)
|
||||
assertParentPasswordValid(newPassword)
|
||||
assertIdWithinFamily({ actionType, field: 'childUserId', value: childUserId })
|
||||
|
||||
try {
|
||||
assertParentPasswordValid(newPassword)
|
||||
} catch (ex) {
|
||||
if (ex instanceof ParentPasswordValidationException) {
|
||||
throw new InvalidActionParameterException({
|
||||
actionType,
|
||||
staticMessage: 'invalid parent password'
|
||||
})
|
||||
} else throw ex
|
||||
}
|
||||
|
||||
this.childUserId = childUserId
|
||||
this.newPassword = newPassword
|
||||
}
|
||||
|
||||
serialize = (): SerializedSetChildPasswordAction => ({
|
||||
type: 'SET_CHILD_PASSWORD',
|
||||
childId: this.childUserId,
|
||||
newPassword: this.newPassword
|
||||
})
|
||||
|
||||
static parse = ({ childId, newPassword }: SerializedSetChildPasswordAction) => (
|
||||
new SetChildPasswordAction({
|
||||
childUserId: childId,
|
||||
|
||||
@@ -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,8 +15,10 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { assertIdWithinFamily } from '../util/token'
|
||||
import { ParentAction } from './basetypes'
|
||||
import { assertIdWithinFamily } from './meta/util'
|
||||
|
||||
const actionType = 'SetConsiderRebootManipulationAction'
|
||||
|
||||
export class SetConsiderRebootManipulationAction extends ParentAction {
|
||||
readonly deviceId: string
|
||||
@@ -25,18 +27,12 @@ export class SetConsiderRebootManipulationAction extends ParentAction {
|
||||
constructor ({ deviceId, enable }: {deviceId: string, enable: boolean}) {
|
||||
super()
|
||||
|
||||
assertIdWithinFamily(deviceId)
|
||||
assertIdWithinFamily({ actionType, field: 'deviceId', value: deviceId })
|
||||
|
||||
this.deviceId = deviceId
|
||||
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 })
|
||||
)
|
||||
|
||||
@@ -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,8 +15,10 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { assertIdWithinFamily } from '../util/token'
|
||||
import { ParentAction } from './basetypes'
|
||||
import { assertIdWithinFamily } from './meta/util'
|
||||
|
||||
const actionType = 'SetDeviceDefaultUserAction'
|
||||
|
||||
export class SetDeviceDefaultUserAction extends ParentAction {
|
||||
readonly deviceId: string
|
||||
@@ -28,22 +30,16 @@ export class SetDeviceDefaultUserAction extends ParentAction {
|
||||
}) {
|
||||
super()
|
||||
|
||||
assertIdWithinFamily(deviceId)
|
||||
assertIdWithinFamily({ actionType, field: 'deviceId', value: deviceId })
|
||||
|
||||
if (defaultUserId !== '') {
|
||||
assertIdWithinFamily(defaultUserId)
|
||||
assertIdWithinFamily({ actionType, field: 'defaultUserId', value: defaultUserId })
|
||||
}
|
||||
|
||||
this.deviceId = deviceId
|
||||
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 })
|
||||
)
|
||||
|
||||
@@ -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,8 +15,11 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { assertIdWithinFamily } from '../util/token'
|
||||
import { ParentAction } from './basetypes'
|
||||
import { InvalidActionParameterException } from './meta/exception'
|
||||
import { assertIdWithinFamily, assertSafeInteger } from './meta/util'
|
||||
|
||||
const actionType = 'SetDeviceDefaultUserTimeoutAction'
|
||||
|
||||
export class SetDeviceDefaultUserTimeoutAction extends ParentAction {
|
||||
readonly deviceId: string
|
||||
@@ -28,22 +31,21 @@ export class SetDeviceDefaultUserTimeoutAction extends ParentAction {
|
||||
}) {
|
||||
super()
|
||||
|
||||
assertIdWithinFamily(deviceId)
|
||||
assertIdWithinFamily({ actionType, field: 'deviceId', value: deviceId })
|
||||
assertSafeInteger({ actionType, field: 'timeout', value: timeout })
|
||||
|
||||
if ((!Number.isInteger(timeout)) || (timeout < 0)) {
|
||||
throw new Error('timeout must be a non-negative integer')
|
||||
if (timeout < 0) {
|
||||
throw new InvalidActionParameterException({
|
||||
actionType,
|
||||
staticMessage: 'timeout must be a non-negative integer',
|
||||
dynamicMessage: 'timeout must be a non-negative integer, was ' + timeout
|
||||
})
|
||||
}
|
||||
|
||||
this.deviceId = deviceId
|
||||
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 })
|
||||
)
|
||||
|
||||
@@ -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,8 +15,10 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { assertIdWithinFamily } from '../util/token'
|
||||
import { ParentAction } from './basetypes'
|
||||
import { assertIdWithinFamily } from './meta/util'
|
||||
|
||||
const actionType = 'SetDeviceUserAction'
|
||||
|
||||
export class SetDeviceUserAction extends ParentAction {
|
||||
readonly deviceId: string
|
||||
@@ -28,22 +30,16 @@ export class SetDeviceUserAction extends ParentAction {
|
||||
}) {
|
||||
super()
|
||||
|
||||
assertIdWithinFamily(deviceId)
|
||||
assertIdWithinFamily({ actionType, field: 'deviceId', value: deviceId })
|
||||
|
||||
if (userId !== '') {
|
||||
assertIdWithinFamily(userId)
|
||||
assertIdWithinFamily({ actionType, field: 'userId', value: userId })
|
||||
}
|
||||
|
||||
this.deviceId = deviceId
|
||||
this.userId = userId
|
||||
}
|
||||
|
||||
serialize = (): SerializedSetDeviceUserAction => ({
|
||||
type: 'SET_DEVICE_USER',
|
||||
deviceId: this.deviceId,
|
||||
userId: this.userId
|
||||
})
|
||||
|
||||
static parse = ({ deviceId, userId }: SerializedSetDeviceUserAction) => (
|
||||
new SetDeviceUserAction({ deviceId, userId })
|
||||
)
|
||||
|
||||
@@ -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,8 +15,10 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { assertIdWithinFamily } from '../util/token'
|
||||
import { ParentAction } from './basetypes'
|
||||
import { assertIdWithinFamily } from './meta/util'
|
||||
|
||||
const actionType = 'SetKeepSignedInAction'
|
||||
|
||||
export class SetKeepSignedInAction extends ParentAction {
|
||||
readonly deviceId: string
|
||||
@@ -28,18 +30,12 @@ export class SetKeepSignedInAction extends ParentAction {
|
||||
}) {
|
||||
super()
|
||||
|
||||
assertIdWithinFamily(deviceId)
|
||||
assertIdWithinFamily({ actionType, field: 'deviceId', value: deviceId })
|
||||
|
||||
this.deviceId = deviceId
|
||||
this.keepSignedIn = keepSignedIn
|
||||
}
|
||||
|
||||
serialize = (): SerializedSetKeepSignedInAction => ({
|
||||
type: 'SET_KEEP_SIGNED_IN',
|
||||
deviceId: this.deviceId,
|
||||
keepSignedIn: this.keepSignedIn
|
||||
})
|
||||
|
||||
static parse = ({ deviceId, keepSignedIn }: SerializedSetKeepSignedInAction) => (
|
||||
new SetKeepSignedInAction({
|
||||
deviceId,
|
||||
|
||||
@@ -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,8 +15,10 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { assertIdWithinFamily } from '../util/token'
|
||||
import { ParentAction } from './basetypes'
|
||||
import { assertIdWithinFamily } from './meta/util'
|
||||
|
||||
const actionType = 'SetParentCategoryAction'
|
||||
|
||||
export class SetParentCategoryAction extends ParentAction {
|
||||
readonly categoryId: string
|
||||
@@ -28,22 +30,16 @@ export class SetParentCategoryAction extends ParentAction {
|
||||
}) {
|
||||
super()
|
||||
|
||||
assertIdWithinFamily(categoryId)
|
||||
assertIdWithinFamily({ actionType, field: 'categoryId', value: categoryId })
|
||||
|
||||
if (parentCategory !== '') {
|
||||
assertIdWithinFamily(parentCategory)
|
||||
assertIdWithinFamily({ actionType, field: 'parentCategory', value: parentCategory })
|
||||
}
|
||||
|
||||
this.categoryId = categoryId
|
||||
this.parentCategory = parentCategory
|
||||
}
|
||||
|
||||
serialize = (): SerializedSetParentCategoryAction => ({
|
||||
type: 'SET_PARENT_CATEGORY',
|
||||
categoryId: this.categoryId,
|
||||
parentCategory: this.parentCategory
|
||||
})
|
||||
|
||||
static parse = ({ categoryId, parentCategory }: SerializedSetParentCategoryAction) => (
|
||||
new SetParentCategoryAction({
|
||||
categoryId,
|
||||
|
||||
@@ -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,8 +15,10 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { assertIdWithinFamily } from '../util/token'
|
||||
import { ParentAction } from './basetypes'
|
||||
import { assertIdWithinFamily } from './meta/util'
|
||||
|
||||
const actionType = 'SetRelaxPrimaryDeviceAction'
|
||||
|
||||
export class SetRelaxPrimaryDeviceAction extends ParentAction {
|
||||
readonly userId: string
|
||||
@@ -28,18 +30,12 @@ export class SetRelaxPrimaryDeviceAction extends ParentAction {
|
||||
}) {
|
||||
super()
|
||||
|
||||
assertIdWithinFamily(userId)
|
||||
assertIdWithinFamily({ actionType, field: 'userId', value: userId })
|
||||
|
||||
this.userId = userId
|
||||
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 })
|
||||
)
|
||||
|
||||
@@ -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,8 +15,10 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { assertIdWithinFamily } from '../util/token'
|
||||
import { ParentAction } from './basetypes'
|
||||
import { assertIdWithinFamily } from './meta/util'
|
||||
|
||||
const actionType = 'SetSendDeviceConnected'
|
||||
|
||||
export class SetSendDeviceConnected extends ParentAction {
|
||||
readonly deviceId: string
|
||||
@@ -28,18 +30,12 @@ export class SetSendDeviceConnected extends ParentAction {
|
||||
}) {
|
||||
super()
|
||||
|
||||
assertIdWithinFamily(deviceId)
|
||||
assertIdWithinFamily({ actionType, field: 'deviceId', value: deviceId })
|
||||
|
||||
this.deviceId = deviceId
|
||||
this.enable = enable
|
||||
}
|
||||
|
||||
serialize = (): SerializedSetSendDeviceConnected => ({
|
||||
type: 'SET_SEND_DEVICE_CONNECTED',
|
||||
deviceId: this.deviceId,
|
||||
enable: this.enable
|
||||
})
|
||||
|
||||
static parse = ({ deviceId, enable }: SerializedSetSendDeviceConnected) => (
|
||||
new SetSendDeviceConnected({
|
||||
deviceId,
|
||||
|
||||
@@ -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,8 +15,11 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { assertIdWithinFamily } from '../util/token'
|
||||
import { ParentAction } from './basetypes'
|
||||
import { InvalidActionParameterException } from './meta/exception'
|
||||
import { assertIdWithinFamily, assertSafeInteger } from './meta/util'
|
||||
|
||||
const actionType = 'SetUserDisableLimitsUntilAction'
|
||||
|
||||
export class SetUserDisableLimitsUntilAction extends ParentAction {
|
||||
readonly childId: string
|
||||
@@ -28,22 +31,21 @@ export class SetUserDisableLimitsUntilAction extends ParentAction {
|
||||
}) {
|
||||
super()
|
||||
|
||||
assertIdWithinFamily(childId)
|
||||
assertIdWithinFamily({ actionType, field: 'childId', value: childId })
|
||||
assertSafeInteger({ actionType, field: 'timestamp', value: timestamp })
|
||||
|
||||
if (timestamp < 0 || (!Number.isSafeInteger(timestamp))) {
|
||||
throw new Error('timestamp for set user disabe limits until must be >= 0')
|
||||
if (timestamp < 0) {
|
||||
throw new InvalidActionParameterException({
|
||||
actionType,
|
||||
staticMessage: 'timestamp for set user disabe limits until must be >= 0',
|
||||
dynamicMessage: 'timestamp for set user disabe limits until must be >= 0, but was ' + timestamp
|
||||
})
|
||||
}
|
||||
|
||||
this.childId = childId
|
||||
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,
|
||||
|
||||
@@ -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,8 +15,10 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { assertIdWithinFamily } from '../util/token'
|
||||
import { ParentAction } from './basetypes'
|
||||
import { assertIdWithinFamily } from './meta/util'
|
||||
|
||||
const actionType = 'SetUserTimezoneAction'
|
||||
|
||||
export class SetUserTimezoneAction extends ParentAction {
|
||||
readonly userId: string
|
||||
@@ -28,18 +30,12 @@ export class SetUserTimezoneAction extends ParentAction {
|
||||
}) {
|
||||
super()
|
||||
|
||||
assertIdWithinFamily(userId)
|
||||
assertIdWithinFamily({ actionType, field: 'userId', value: userId })
|
||||
|
||||
this.userId = userId
|
||||
this.timezone = timezone
|
||||
}
|
||||
|
||||
serialize = (): SerializedSetUserTimezoneAction => ({
|
||||
type: 'SET_USER_TIMEZONE',
|
||||
userId: this.userId,
|
||||
timezone: this.timezone
|
||||
})
|
||||
|
||||
static parse = ({ userId, timezone }: SerializedSetUserTimezoneAction) => (
|
||||
new SetUserTimezoneAction({ userId, timezone })
|
||||
)
|
||||
|
||||
@@ -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,11 +24,7 @@ export class SignOutAtDeviceAction extends AppLogicAction {
|
||||
super()
|
||||
}
|
||||
|
||||
serialize = (): SerializedSignOutAtDeviceAction => ({
|
||||
type: 'SIGN_OUT_AT_DEVICE'
|
||||
})
|
||||
|
||||
static parse = (action: SerializedSignOutAtDeviceAction) => SignOutAtDeviceAction.instance
|
||||
static parse = (_: SerializedSignOutAtDeviceAction) => SignOutAtDeviceAction.instance
|
||||
}
|
||||
|
||||
export interface SerializedSignOutAtDeviceAction {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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,14 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { AppActivityItem, RemovedAppActivityItem, SerializedAppActivityItem, SerializedRemovedAppActivityItem } from '../model/appactivity'
|
||||
import { assertListWithoutDuplicates } from '../util/list'
|
||||
import {
|
||||
AppActivityItem, IncompleteAppActivityItemException, RemovedAppActivityItem, SerializedAppActivityItem, SerializedRemovedAppActivityItem
|
||||
} from '../model/appactivity'
|
||||
import { AppLogicAction } from './basetypes'
|
||||
import { InvalidActionParameterException } from './meta/exception'
|
||||
import { assertListWithoutDuplicates } from './meta/util'
|
||||
|
||||
const actionType = 'UpdateAppActivitiesAction'
|
||||
|
||||
export class UpdateAppActivitiesAction extends AppLogicAction {
|
||||
readonly removed: Array<RemovedAppActivityItem>
|
||||
@@ -29,29 +34,44 @@ export class UpdateAppActivitiesAction extends AppLogicAction {
|
||||
}) {
|
||||
super()
|
||||
|
||||
assertListWithoutDuplicates(removed.map((item) => item.packageName + ':' + item.activityName))
|
||||
assertListWithoutDuplicates(updatedOrAdded.map((item) => item.packageName + ':' + item.activityName))
|
||||
assertListWithoutDuplicates({
|
||||
actionType,
|
||||
field: 'removed',
|
||||
list: removed.map((item) => item.packageName + ':' + item.activityName)
|
||||
})
|
||||
|
||||
assertListWithoutDuplicates({
|
||||
actionType,
|
||||
field: 'updatedOrAdded',
|
||||
list: updatedOrAdded.map((item) => item.packageName + ':' + item.activityName)
|
||||
})
|
||||
|
||||
if (removed.length === 0 && updatedOrAdded.length === 0) {
|
||||
throw new Error('UpdateAppActivitiesAction is empty')
|
||||
throw new InvalidActionParameterException({
|
||||
actionType,
|
||||
staticMessage: 'UpdateAppActivitiesAction is empty'
|
||||
})
|
||||
}
|
||||
|
||||
this.removed = removed
|
||||
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)),
|
||||
updatedOrAdded: updatedOrAdded.map((item) => AppActivityItem.parse(item))
|
||||
})
|
||||
)
|
||||
static parse = ({ removed, updatedOrAdded }: SerializedUpdateAppActivitiesAction) => {
|
||||
try {
|
||||
return new UpdateAppActivitiesAction({
|
||||
removed: removed.map((item) => RemovedAppActivityItem.parse(item)),
|
||||
updatedOrAdded: updatedOrAdded.map((item) => AppActivityItem.parse(item))
|
||||
})
|
||||
} catch (ex) {
|
||||
if (ex instanceof IncompleteAppActivityItemException) {
|
||||
throw new InvalidActionParameterException({
|
||||
actionType,
|
||||
staticMessage: 'invalid app activity item'
|
||||
})
|
||||
} else throw ex
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export interface SerializedUpdateAppActivitiesAction {
|
||||
|
||||
@@ -15,8 +15,10 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { assertIdWithinFamily } from '../util/token'
|
||||
import { ParentAction } from './basetypes'
|
||||
import { assertIdWithinFamily, assertSafeInteger, throwOutOfRange } from './meta/util'
|
||||
|
||||
const actionType = 'UpdateCategoryBatteryLimitAction'
|
||||
|
||||
export class UpdateCategoryBatteryLimitAction extends ParentAction {
|
||||
readonly categoryId: string
|
||||
@@ -30,17 +32,21 @@ export class UpdateCategoryBatteryLimitAction extends ParentAction {
|
||||
}) {
|
||||
super()
|
||||
|
||||
assertIdWithinFamily(categoryId)
|
||||
assertIdWithinFamily({ actionType, field: 'categoryId', value: categoryId })
|
||||
|
||||
if (chargeLimit !== undefined) {
|
||||
if ((!Number.isSafeInteger(chargeLimit)) || chargeLimit < 0 || chargeLimit > 100) {
|
||||
throw new Error('charge limit out of range')
|
||||
assertSafeInteger({ actionType, field: 'chargeLimit', value: chargeLimit })
|
||||
|
||||
if (chargeLimit < 0 || chargeLimit > 100) {
|
||||
throwOutOfRange({ actionType, field: 'chargeLimit', value: chargeLimit })
|
||||
}
|
||||
}
|
||||
|
||||
if (mobileLimit !== undefined) {
|
||||
if ((!Number.isSafeInteger(mobileLimit)) || mobileLimit < 0 || mobileLimit > 100) {
|
||||
throw new Error('mobile limit out of range')
|
||||
assertSafeInteger({ actionType, field: 'mobileLimit', value: mobileLimit })
|
||||
|
||||
if (mobileLimit < 0 || mobileLimit > 100) {
|
||||
throwOutOfRange({ actionType, field: 'mobileLimit', value: mobileLimit })
|
||||
}
|
||||
}
|
||||
|
||||
@@ -49,13 +55,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 })
|
||||
)
|
||||
|
||||
@@ -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,8 +15,10 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { assertIdWithinFamily } from '../util/token'
|
||||
import { ParentAction } from './basetypes'
|
||||
import { assertIdWithinFamily } from './meta/util'
|
||||
|
||||
const actionType = 'UpdateCategoryBlockAllNotificationsAction'
|
||||
|
||||
export class UpdateCategoryBlockAllNotificationsAction extends ParentAction {
|
||||
readonly categoryId: string
|
||||
@@ -25,18 +27,12 @@ export class UpdateCategoryBlockAllNotificationsAction extends ParentAction {
|
||||
constructor ({ categoryId, blocked }: {categoryId: string, blocked: boolean}) {
|
||||
super()
|
||||
|
||||
assertIdWithinFamily(categoryId)
|
||||
assertIdWithinFamily({ actionType, field: 'categoryId', value: categoryId })
|
||||
|
||||
this.categoryId = categoryId
|
||||
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 })
|
||||
)
|
||||
|
||||
@@ -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,14 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { validateBitmask } from '../util/bitmask'
|
||||
import { assertIdWithinFamily } from '../util/token'
|
||||
import { BitmapValidationException, validateBitmask } from '../util/bitmask'
|
||||
import { ParentAction } from './basetypes'
|
||||
import { InvalidActionParameterException } from './meta/exception'
|
||||
import { assertIdWithinFamily } from './meta/util'
|
||||
|
||||
export const blockedTimesBitmaskLength = 60 * 24 * 7 /* number of minutes per week */
|
||||
|
||||
const actionType = 'UpdateCategoryBlockedTimesAction'
|
||||
|
||||
export class UpdateCategoryBlockedTimesAction extends ParentAction {
|
||||
readonly categoryId: string
|
||||
@@ -29,19 +34,23 @@ export class UpdateCategoryBlockedTimesAction extends ParentAction {
|
||||
}) {
|
||||
super()
|
||||
|
||||
assertIdWithinFamily(categoryId)
|
||||
validateBitmask(blockedTimes, 60 * 24 * 7 /* number of minutes per week */)
|
||||
assertIdWithinFamily({ actionType, field: 'categoryId', value: categoryId })
|
||||
|
||||
try {
|
||||
validateBitmask(blockedTimes, blockedTimesBitmaskLength)
|
||||
} catch (ex) {
|
||||
if (ex instanceof BitmapValidationException) {
|
||||
throw new InvalidActionParameterException({
|
||||
actionType,
|
||||
staticMessage: 'invalid bitmask'
|
||||
})
|
||||
} else throw ex
|
||||
}
|
||||
|
||||
this.categoryId = categoryId
|
||||
this.blockedTimes = blockedTimes
|
||||
}
|
||||
|
||||
serialize = (): SerializedUpdateCategoryBlockedTimesAction => ({
|
||||
type: 'UPDATE_CATEGORY_BLOCKED_TIMES',
|
||||
categoryId: this.categoryId,
|
||||
times: this.blockedTimes
|
||||
})
|
||||
|
||||
static parse = ({ categoryId, times }: SerializedUpdateCategoryBlockedTimesAction) => (
|
||||
new UpdateCategoryBlockedTimesAction({
|
||||
categoryId,
|
||||
|
||||
@@ -15,9 +15,10 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { uniq } from 'lodash'
|
||||
import { assertIdWithinFamily } from '../util/token'
|
||||
import { ParentAction } from './basetypes'
|
||||
import { assertIdWithinFamily, assertNonEmptyListWithoutDuplicates } from './meta/util'
|
||||
|
||||
const actionType = 'UpdateCategorySortingAction'
|
||||
|
||||
export class UpdateCategorySortingAction extends ParentAction {
|
||||
readonly categoryIds: Array<string>
|
||||
@@ -27,24 +28,17 @@ export class UpdateCategorySortingAction extends ParentAction {
|
||||
}) {
|
||||
super()
|
||||
|
||||
if (categoryIds.length === 0) {
|
||||
throw new Error('empty category sorting list')
|
||||
}
|
||||
assertNonEmptyListWithoutDuplicates({ actionType, field: 'categoryIds', list: categoryIds })
|
||||
|
||||
if (uniq(categoryIds).length !== categoryIds.length) {
|
||||
throw new Error('category sorting list has duplicates')
|
||||
}
|
||||
|
||||
categoryIds.forEach((categoryId) => assertIdWithinFamily(categoryId))
|
||||
categoryIds.forEach((categoryId) => assertIdWithinFamily({
|
||||
actionType,
|
||||
field: 'categoryIds',
|
||||
value: categoryId
|
||||
}))
|
||||
|
||||
this.categoryIds = categoryIds
|
||||
}
|
||||
|
||||
serialize = (): SerializedUpdateCategorySortingAction => ({
|
||||
type: 'UPDATE_CATEGORY_SORTING',
|
||||
categoryIds: this.categoryIds
|
||||
})
|
||||
|
||||
static parse = ({ categoryIds }: SerializedUpdateCategorySortingAction) => (
|
||||
new UpdateCategorySortingAction({ categoryIds })
|
||||
)
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user