From b5d021d03cc6c894ccc3dfc7319238a342d6fe88 Mon Sep 17 00:00:00 2001 From: kirillius Date: Wed, 28 Jan 2026 13:18:12 +0300 Subject: [PATCH] =?UTF-8?q?=D1=83=D0=B4=D0=B0=D0=BB=D0=B8=D0=BB=20=D0=B0?= =?UTF-8?q?=D0=B2=D1=82=D0=BE=D0=B3=D0=B5=D0=BD=D0=B5=D1=80=D0=B8=D1=80?= =?UTF-8?q?=D1=83=D0=B5=D0=BC=D1=8B=D0=B9=20spec?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api.spec.json | 243 -------------------------------------------------- 1 file changed, 243 deletions(-) delete mode 100644 api.spec.json diff --git a/api.spec.json b/api.spec.json deleted file mode 100644 index c720cc0..0000000 --- a/api.spec.json +++ /dev/null @@ -1,243 +0,0 @@ -{ - "modules": [ - { - "name": "Profile", - "methods": [ - { - "name": "get", - "description": "Get current user profile", - "return": "User", - "accessLevel": "Guest", - "params": [] - }, - { - "name": "save", - "description": "edit current user profile", - "return": "boolean", - "accessLevel": "User", - "params": [ - { - "name": "login", - "type": "string", - "description": "User login. Have to be unique", - "optional": false - }, - { - "name": "name", - "type": "string", - "description": "User display name", - "optional": false - }, - { - "name": "password", - "type": "string", - "description": "Change user password if defined", - "optional": true - }, - { - "name": "values", - "type": "object", - "description": "User custom values", - "optional": false - } - ] - } - ] - }, - { - "name": "Auth", - "methods": [ - { - "name": "generateToken", - "description": "Generates a new API token and returns its details", - "return": "ApiToken", - "accessLevel": "User", - "params": [ - { - "name": "permanent", - "type": "boolean", - "description": "If true, creates a token that never expires", - "optional": true - }, - { - "name": "name", - "type": "string", - "description": "Display name for the token. If not provided, the User-Agent header will be used", - "optional": true - } - ] - }, - { - "name": "authenticateByToken", - "description": "Authenticates a user using an API token. Returns true if authentication is successful.", - "return": "boolean", - "accessLevel": "Guest", - "params": [ - { - "name": "token", - "type": "string", - "description": "API token string for authentication", - "optional": false - } - ] - }, - { - "name": "logout", - "description": "Logs out the current user. Returns true if logout is successful, false if the user is not logged in", - "return": "boolean", - "accessLevel": "User", - "params": [] - }, - { - "name": "authenticateByPassword", - "description": "Authenticates a user using login and password. Returns true if authentication is successful.", - "return": "boolean", - "accessLevel": "Guest", - "params": [ - { - "name": "login", - "type": "string", - "description": "User's login name", - "optional": false - }, - { - "name": "password", - "type": "string", - "description": "User's password", - "optional": false - } - ] - }, - { - "name": "getTokens", - "description": "Retrieves all API tokens associated with the current user", - "return": "ApiToken[]", - "accessLevel": "User", - "params": [] - } - ] - }, - { - "name": "Users", - "methods": [ - { - "name": "getById", - "description": "Load user object by ID", - "return": "User", - "accessLevel": "Admin", - "params": [ - { - "name": "id", - "type": "number", - "description": "User id", - "optional": false - } - ] - }, - { - "name": "remove", - "description": "Remove user by ID", - "return": "boolean", - "accessLevel": "Admin", - "params": [ - { - "name": "id", - "type": "number", - "description": "User id", - "optional": false - } - ] - }, - { - "name": "save", - "description": "Save user data", - "return": "User", - "accessLevel": "Admin", - "params": [ - { - "name": "user", - "type": "User", - "description": "User object to save", - "optional": false - } - ] - }, - { - "name": "getAll", - "description": "Get all users as list", - "return": "User[]", - "accessLevel": "Admin", - "params": [] - } - ] - } - ], - "types": [ - { - "name": "ApiToken", - "type": "class", - "fields": [ - { - "name": "expirationDate", - "type": "Date" - }, - { - "name": "user", - "type": "PersistenceEntity" - }, - { - "name": "name", - "type": "string" - }, - { - "name": "uuid", - "type": "UUID" - }, - { - "name": "id", - "type": "number" - } - ] - }, - { - "name": "User", - "type": "class", - "fields": [ - { - "name": "login", - "type": "string" - }, - { - "name": "name", - "type": "string" - }, - { - "name": "values", - "type": "object" - }, - { - "name": "role", - "type": "UserRole" - }, - { - "name": "uuid", - "type": "UUID" - }, - { - "name": "id", - "type": "number" - } - ] - }, - { - "name": "UserRole", - "type": "enum", - "values": [ - "Guest", - "User", - "Operator", - "Admin" - ] - } - ] -} \ No newline at end of file