From d7cb844751b6b61dc90f1d8bff83d61e9463f60b Mon Sep 17 00:00:00 2001 From: arsam Date: Fri, 18 Sep 2026 23:11:39 +0330 Subject: [PATCH] Import documentation: docs/frontend-api-contracts.md Import the existing local project snapshot. This commit organizes existing files; it does not represent newly developed functionality. --- docs/frontend-api-contracts.md | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 docs/frontend-api-contracts.md diff --git a/docs/frontend-api-contracts.md b/docs/frontend-api-contracts.md new file mode 100644 index 0000000..ba1f27f --- /dev/null +++ b/docs/frontend-api-contracts.md @@ -0,0 +1,33 @@ +# Frontend API Contracts + +Contracts are defined in `src/api/contracts`. + +Every service returns: + +```json +{ + "data": {}, + "meta": { + "requestId": "req_..." + }, + "error": null +} +``` + +Errors return: + +```json +{ + "data": null, + "meta": { + "requestId": "req_..." + }, + "error": { + "code": "VALIDATION_ERROR", + "message": "Human-readable message", + "fields": {} + } +} +``` + +Shared DTOs cover pagination, filtering, sorting, bulk operations, jobs, job progress, audit metadata, permission checks, and WebSocket events.