mirror of
https://codeberg.org/timelimit/timelimit-server.git
synced 2026-08-31 19:03:45 +02:00
Add documentation of the json schemas
This commit is contained in:
@@ -0,0 +1,352 @@
|
||||
{
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/SerializedAddInstalledAppsAction"
|
||||
},
|
||||
{
|
||||
"$ref": "#/definitions/SerializedAddUsedTimeAction"
|
||||
},
|
||||
{
|
||||
"$ref": "#/definitions/SerializedAddUsedTimeActionVersion2"
|
||||
},
|
||||
{
|
||||
"$ref": "#/definitions/SerializedRemoveInstalledAppsAction"
|
||||
},
|
||||
{
|
||||
"$ref": "#/definitions/SerializedSignOutAtDeviceAction"
|
||||
},
|
||||
{
|
||||
"$ref": "#/definitions/SerialiezdTriedDisablingDeviceAdminAction"
|
||||
},
|
||||
{
|
||||
"$ref": "#/definitions/SerializedUpdateAppActivitiesAction"
|
||||
},
|
||||
{
|
||||
"$ref": "#/definitions/SerializedUpdateDeviceStatusAction"
|
||||
}
|
||||
],
|
||||
"definitions": {
|
||||
"SerializedAddInstalledAppsAction": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"ADD_INSTALLED_APPS"
|
||||
]
|
||||
},
|
||||
"apps": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/SerializedInstalledApp"
|
||||
}
|
||||
}
|
||||
},
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"apps",
|
||||
"type"
|
||||
],
|
||||
"title": "SerializedAddInstalledAppsAction"
|
||||
},
|
||||
"SerializedInstalledApp": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"packageName": {
|
||||
"type": "string"
|
||||
},
|
||||
"title": {
|
||||
"type": "string"
|
||||
},
|
||||
"isLaunchable": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"recommendation": {
|
||||
"$ref": "#/definitions/AppRecommendation"
|
||||
}
|
||||
},
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"isLaunchable",
|
||||
"packageName",
|
||||
"recommendation",
|
||||
"title"
|
||||
],
|
||||
"title": "SerializedInstalledApp"
|
||||
},
|
||||
"AppRecommendation": {
|
||||
"enum": [
|
||||
"blacklist",
|
||||
"none",
|
||||
"whitelist"
|
||||
],
|
||||
"type": "string",
|
||||
"title": "AppRecommendation"
|
||||
},
|
||||
"SerializedAddUsedTimeAction": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"ADD_USED_TIME"
|
||||
]
|
||||
},
|
||||
"categoryId": {
|
||||
"type": "string"
|
||||
},
|
||||
"day": {
|
||||
"type": "number"
|
||||
},
|
||||
"timeToAdd": {
|
||||
"type": "number"
|
||||
},
|
||||
"extraTimeToSubtract": {
|
||||
"type": "number"
|
||||
}
|
||||
},
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"categoryId",
|
||||
"day",
|
||||
"extraTimeToSubtract",
|
||||
"timeToAdd",
|
||||
"type"
|
||||
],
|
||||
"title": "SerializedAddUsedTimeAction"
|
||||
},
|
||||
"SerializedAddUsedTimeActionVersion2": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"ADD_USED_TIME_V2"
|
||||
]
|
||||
},
|
||||
"d": {
|
||||
"type": "number"
|
||||
},
|
||||
"i": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"categoryId": {
|
||||
"type": "string"
|
||||
},
|
||||
"tta": {
|
||||
"type": "number"
|
||||
},
|
||||
"etts": {
|
||||
"type": "number"
|
||||
}
|
||||
},
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"categoryId",
|
||||
"etts",
|
||||
"tta"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"d",
|
||||
"i",
|
||||
"type"
|
||||
],
|
||||
"title": "SerializedAddUsedTimeActionVersion2"
|
||||
},
|
||||
"SerializedRemoveInstalledAppsAction": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"REMOVE_INSTALLED_APPS"
|
||||
]
|
||||
},
|
||||
"packageNames": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"packageNames",
|
||||
"type"
|
||||
],
|
||||
"title": "SerializedRemoveInstalledAppsAction"
|
||||
},
|
||||
"SerializedSignOutAtDeviceAction": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"SIGN_OUT_AT_DEVICE"
|
||||
]
|
||||
}
|
||||
},
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"type"
|
||||
],
|
||||
"title": "SerializedSignOutAtDeviceAction"
|
||||
},
|
||||
"SerialiezdTriedDisablingDeviceAdminAction": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"TRIED_DISABLING_DEVICE_ADMIN"
|
||||
]
|
||||
}
|
||||
},
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"type"
|
||||
],
|
||||
"title": "SerialiezdTriedDisablingDeviceAdminAction"
|
||||
},
|
||||
"SerializedUpdateAppActivitiesAction": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"UPDATE_APP_ACTIVITIES"
|
||||
]
|
||||
},
|
||||
"removed": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "array",
|
||||
"items": [
|
||||
{
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
],
|
||||
"minItems": 2,
|
||||
"additionalItems": {
|
||||
"anyOf": [
|
||||
{
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"updatedOrAdded": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/SerializedAppActivityItem"
|
||||
}
|
||||
}
|
||||
},
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"removed",
|
||||
"type",
|
||||
"updatedOrAdded"
|
||||
],
|
||||
"title": "SerializedUpdateAppActivitiesAction"
|
||||
},
|
||||
"SerializedAppActivityItem": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"p": {
|
||||
"type": "string"
|
||||
},
|
||||
"c": {
|
||||
"type": "string"
|
||||
},
|
||||
"t": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"c",
|
||||
"p",
|
||||
"t"
|
||||
],
|
||||
"title": "SerializedAppActivityItem"
|
||||
},
|
||||
"SerializedUpdateDeviceStatusAction": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"UPDATE_DEVICE_STATUS"
|
||||
]
|
||||
},
|
||||
"protectionLevel": {
|
||||
"enum": [
|
||||
"device owner",
|
||||
"none",
|
||||
"password device admin",
|
||||
"simple device admin"
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
"usageStats": {
|
||||
"enum": [
|
||||
"granted",
|
||||
"not granted",
|
||||
"not required"
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
"notificationAccess": {
|
||||
"enum": [
|
||||
"granted",
|
||||
"not granted",
|
||||
"not supported"
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
"overlayPermission": {
|
||||
"enum": [
|
||||
"granted",
|
||||
"not granted",
|
||||
"not required"
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
"accessibilityServiceEnabled": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"appVersion": {
|
||||
"type": "number"
|
||||
},
|
||||
"didReboot": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"isQOrLaterNow": {
|
||||
"type": "boolean"
|
||||
}
|
||||
},
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"type"
|
||||
],
|
||||
"title": "SerializedUpdateDeviceStatusAction"
|
||||
}
|
||||
},
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"title": "SerializedAppLogicAction",
|
||||
"$id": "https://timelimit.io/SerializedAppLogicAction"
|
||||
}
|
||||
Reference in New Issue
Block a user