mirror of
https://codeberg.org/timelimit/timelimit-server.git
synced 2026-08-31 19:03:45 +02:00
Add account deletion API
This commit is contained in:
@@ -194,3 +194,27 @@ If the ``secondPasswordHash`` is invalid: HTTP status code 401 Unauthorized
|
||||
If the server does not support this request: HTTP status code 404
|
||||
|
||||
On success: ``{"token": "some string"}``; you should not make any assumptions about the token string
|
||||
|
||||
## POST /parent/delete-account
|
||||
|
||||
Use this to delete an account. This includes the complete family registration
|
||||
with users and devices. Due to that, all parents with a linked mail address
|
||||
have to authenticate this action.
|
||||
|
||||
## request
|
||||
|
||||
see [this JSON schema](../schema/deleteaccountpayload.md)
|
||||
|
||||
## response
|
||||
|
||||
On success: HTTP status code 200
|
||||
|
||||
On a invalid request body: HTTP status code 400 Bad Request
|
||||
|
||||
On unknown device auth token: HTTP status code 401 Unauthorized
|
||||
|
||||
On missing parent authentication: HTTP status code 401 Unauthorized
|
||||
|
||||
On unrelated parent authentication: HTTP status code 401 Unauthorized
|
||||
|
||||
If a newer endpoint must be used/the client is too old: HTTP status code 410 Gone
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"deviceAuthToken": {
|
||||
"type": "string"
|
||||
},
|
||||
"mailAuthTokens": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"deviceAuthToken",
|
||||
"mailAuthTokens"
|
||||
],
|
||||
"definitions": {},
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"title": "DeleteAccountPayload",
|
||||
"$id": "https://timelimit.io/DeleteAccountPayload"
|
||||
}
|
||||
@@ -14,6 +14,8 @@
|
||||
|
||||
* [CreateRegisterDeviceTokenRequest](./createregisterdevicetokenrequest.md) – `https://timelimit.io/CreateRegisterDeviceTokenRequest`
|
||||
|
||||
* [DeleteAccountPayload](./deleteaccountpayload.md) – `https://timelimit.io/DeleteAccountPayload`
|
||||
|
||||
* [FinishPurchaseByGooglePlayRequest](./finishpurchasebygoogleplayrequest.md) – `https://timelimit.io/FinishPurchaseByGooglePlayRequest`
|
||||
|
||||
* [IdentityTokenPayload](./identitytokenpayload.md) – `https://timelimit.io/IdentityTokenPayload`
|
||||
@@ -282,6 +284,8 @@
|
||||
|
||||
* [Untitled array in ClientPushChangesRequest](./clientpushchangesrequest-properties-actions.md) – `https://timelimit.io/ClientPushChangesRequest#/properties/actions`
|
||||
|
||||
* [Untitled array in DeleteAccountPayload](./deleteaccountpayload-properties-mailauthtokens.md) – `https://timelimit.io/DeleteAccountPayload#/properties/mailAuthTokens`
|
||||
|
||||
* [Untitled array in SerializedAppLogicAction](./serializedapplogicaction-definitions-serializedaddinstalledappsaction-properties-apps.md) – `https://timelimit.io/SerializedAppLogicAction#/definitions/SerializedAddInstalledAppsAction/properties/apps`
|
||||
|
||||
* [Untitled array in SerializedAppLogicAction](./serializedapplogicaction-definitions-serializedaddusedtimeactionversion2-properties-i.md) – `https://timelimit.io/SerializedAppLogicAction#/definitions/SerializedAddUsedTimeActionVersion2/properties/i`
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
# Untitled undefined type in DeleteAccountPayload Schema
|
||||
|
||||
```txt
|
||||
https://timelimit.io/DeleteAccountPayload#/definitions
|
||||
```
|
||||
|
||||
|
||||
|
||||
| Abstract | Extensible | Status | Identifiable | Custom Properties | Additional Properties | Access Restrictions | Defined In |
|
||||
| :------------------ | :--------- | :------------- | :---------------------- | :---------------- | :-------------------- | :------------------ | :-------------------------------------------------------------------------------------------- |
|
||||
| Can be instantiated | No | Unknown status | Unknown identifiability | Forbidden | Allowed | none | [DeleteAccountPayload.schema.json\*](DeleteAccountPayload.schema.json "open original schema") |
|
||||
|
||||
## definitions Type
|
||||
|
||||
unknown
|
||||
@@ -0,0 +1,15 @@
|
||||
# Untitled string in DeleteAccountPayload Schema
|
||||
|
||||
```txt
|
||||
https://timelimit.io/DeleteAccountPayload#/properties/deviceAuthToken
|
||||
```
|
||||
|
||||
|
||||
|
||||
| Abstract | Extensible | Status | Identifiable | Custom Properties | Additional Properties | Access Restrictions | Defined In |
|
||||
| :------------------ | :--------- | :------------- | :---------------------- | :---------------- | :-------------------- | :------------------ | :-------------------------------------------------------------------------------------------- |
|
||||
| Can be instantiated | No | Unknown status | Unknown identifiability | Forbidden | Allowed | none | [DeleteAccountPayload.schema.json\*](DeleteAccountPayload.schema.json "open original schema") |
|
||||
|
||||
## deviceAuthToken Type
|
||||
|
||||
`string`
|
||||
@@ -0,0 +1,15 @@
|
||||
# Untitled string in DeleteAccountPayload Schema
|
||||
|
||||
```txt
|
||||
https://timelimit.io/DeleteAccountPayload#/properties/mailAuthTokens/items
|
||||
```
|
||||
|
||||
|
||||
|
||||
| Abstract | Extensible | Status | Identifiable | Custom Properties | Additional Properties | Access Restrictions | Defined In |
|
||||
| :------------------ | :--------- | :------------- | :---------------------- | :---------------- | :-------------------- | :------------------ | :-------------------------------------------------------------------------------------------- |
|
||||
| Can be instantiated | No | Unknown status | Unknown identifiability | Forbidden | Allowed | none | [DeleteAccountPayload.schema.json\*](DeleteAccountPayload.schema.json "open original schema") |
|
||||
|
||||
## items Type
|
||||
|
||||
`string`
|
||||
@@ -0,0 +1,15 @@
|
||||
# Untitled array in DeleteAccountPayload Schema
|
||||
|
||||
```txt
|
||||
https://timelimit.io/DeleteAccountPayload#/properties/mailAuthTokens
|
||||
```
|
||||
|
||||
|
||||
|
||||
| Abstract | Extensible | Status | Identifiable | Custom Properties | Additional Properties | Access Restrictions | Defined In |
|
||||
| :------------------ | :--------- | :------------- | :---------------------- | :---------------- | :-------------------- | :------------------ | :-------------------------------------------------------------------------------------------- |
|
||||
| Can be instantiated | No | Unknown status | Unknown identifiability | Forbidden | Allowed | none | [DeleteAccountPayload.schema.json\*](DeleteAccountPayload.schema.json "open original schema") |
|
||||
|
||||
## mailAuthTokens Type
|
||||
|
||||
`string[]`
|
||||
@@ -0,0 +1,60 @@
|
||||
# DeleteAccountPayload Schema
|
||||
|
||||
```txt
|
||||
https://timelimit.io/DeleteAccountPayload
|
||||
```
|
||||
|
||||
|
||||
|
||||
| Abstract | Extensible | Status | Identifiable | Custom Properties | Additional Properties | Access Restrictions | Defined In |
|
||||
| :------------------ | :--------- | :------------- | :----------- | :---------------- | :-------------------- | :------------------ | :------------------------------------------------------------------------------------------ |
|
||||
| Can be instantiated | Yes | Unknown status | No | Forbidden | Forbidden | none | [DeleteAccountPayload.schema.json](DeleteAccountPayload.schema.json "open original schema") |
|
||||
|
||||
## DeleteAccountPayload Type
|
||||
|
||||
`object` ([DeleteAccountPayload](deleteaccountpayload.md))
|
||||
|
||||
# DeleteAccountPayload Properties
|
||||
|
||||
| Property | Type | Required | Nullable | Defined by |
|
||||
| :---------------------------------- | :------- | :------- | :------------- | :------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| [deviceAuthToken](#deviceauthtoken) | `string` | Required | cannot be null | [DeleteAccountPayload](deleteaccountpayload-properties-deviceauthtoken.md "https://timelimit.io/DeleteAccountPayload#/properties/deviceAuthToken") |
|
||||
| [mailAuthTokens](#mailauthtokens) | `array` | Required | cannot be null | [DeleteAccountPayload](deleteaccountpayload-properties-mailauthtokens.md "https://timelimit.io/DeleteAccountPayload#/properties/mailAuthTokens") |
|
||||
|
||||
## deviceAuthToken
|
||||
|
||||
|
||||
|
||||
`deviceAuthToken`
|
||||
|
||||
* is required
|
||||
|
||||
* Type: `string`
|
||||
|
||||
* cannot be null
|
||||
|
||||
* defined in: [DeleteAccountPayload](deleteaccountpayload-properties-deviceauthtoken.md "https://timelimit.io/DeleteAccountPayload#/properties/deviceAuthToken")
|
||||
|
||||
### deviceAuthToken Type
|
||||
|
||||
`string`
|
||||
|
||||
## mailAuthTokens
|
||||
|
||||
|
||||
|
||||
`mailAuthTokens`
|
||||
|
||||
* is required
|
||||
|
||||
* Type: `string[]`
|
||||
|
||||
* cannot be null
|
||||
|
||||
* defined in: [DeleteAccountPayload](deleteaccountpayload-properties-mailauthtokens.md "https://timelimit.io/DeleteAccountPayload#/properties/mailAuthTokens")
|
||||
|
||||
### mailAuthTokens Type
|
||||
|
||||
`string[]`
|
||||
|
||||
# DeleteAccountPayload Definitions
|
||||
Reference in New Issue
Block a user