version 1.0.0
This commit is contained in:
@@ -0,0 +1,599 @@
|
||||
{
|
||||
"openapi": "3.0.0",
|
||||
"paths": {
|
||||
"/api/v1/health": {
|
||||
"get": {
|
||||
"operationId": "HealthController_getHealth_v1",
|
||||
"parameters": [],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/HealthResponseDto"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"tags": [
|
||||
"health"
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/v1/devices/register": {
|
||||
"post": {
|
||||
"operationId": "DevicesController_register_v1",
|
||||
"parameters": [],
|
||||
"requestBody": {
|
||||
"required": true,
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/RegisterDeviceRequestDto"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"responses": {
|
||||
"201": {
|
||||
"description": "",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/RegisterDeviceResponseDto"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"tags": [
|
||||
"devices"
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/v1/devices/heartbeat": {
|
||||
"post": {
|
||||
"operationId": "DevicesController_heartbeat_v1",
|
||||
"parameters": [],
|
||||
"requestBody": {
|
||||
"required": true,
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/DeviceHeartbeatRequestDto"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/DeviceHeartbeatResponseDto"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"tags": [
|
||||
"devices"
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/v1/uploads/prepare": {
|
||||
"post": {
|
||||
"operationId": "UploadsController_prepare_v1",
|
||||
"parameters": [],
|
||||
"requestBody": {
|
||||
"required": true,
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/UploadPrepareRequestDto"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"responses": {
|
||||
"201": {
|
||||
"description": "",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/UploadPrepareResponseDto"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"tags": [
|
||||
"uploads"
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/v1/uploads/{uploadId}": {
|
||||
"get": {
|
||||
"operationId": "UploadsController_getStatus_v1",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "uploadId",
|
||||
"required": true,
|
||||
"in": "path",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/UploadSessionStatusResponseDto"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"tags": [
|
||||
"uploads"
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/v1/uploads/{uploadId}/finalize": {
|
||||
"post": {
|
||||
"operationId": "UploadsController_finalize_v1",
|
||||
"parameters": [],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/UploadFinalizeResponseDto"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"summary": "Reserved for the next milestone",
|
||||
"tags": [
|
||||
"uploads"
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/v1/sync/bootstrap": {
|
||||
"get": {
|
||||
"operationId": "SyncController_bootstrap_v1",
|
||||
"parameters": [],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/SyncBootstrapResponseDto"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"tags": [
|
||||
"sync"
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/v1/sync/changes": {
|
||||
"get": {
|
||||
"operationId": "SyncController_changes_v1",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "after",
|
||||
"required": false,
|
||||
"in": "query",
|
||||
"schema": {
|
||||
"example": "0",
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/SyncChangesResponseDto"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"tags": [
|
||||
"sync"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"info": {
|
||||
"title": "Velody API",
|
||||
"description": "Velody Phase 1 foundation API",
|
||||
"version": "1.0.0",
|
||||
"contact": {}
|
||||
},
|
||||
"tags": [],
|
||||
"servers": [],
|
||||
"components": {
|
||||
"schemas": {
|
||||
"HealthDependencyDto": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"status": {
|
||||
"type": "string",
|
||||
"example": "up"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"status"
|
||||
]
|
||||
},
|
||||
"StorageDependencyDto": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"status": {
|
||||
"type": "string",
|
||||
"example": "up"
|
||||
},
|
||||
"root": {
|
||||
"type": "string",
|
||||
"example": "/app/runtime/storage"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"status",
|
||||
"root"
|
||||
]
|
||||
},
|
||||
"HealthResponseDto": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"service": {
|
||||
"type": "string",
|
||||
"example": "velody-backend"
|
||||
},
|
||||
"version": {
|
||||
"type": "string",
|
||||
"example": "0.1.0"
|
||||
},
|
||||
"database": {
|
||||
"$ref": "#/components/schemas/HealthDependencyDto"
|
||||
},
|
||||
"storage": {
|
||||
"$ref": "#/components/schemas/StorageDependencyDto"
|
||||
},
|
||||
"serverTime": {
|
||||
"type": "string",
|
||||
"example": "2026-05-24T20:00:00.000Z"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"service",
|
||||
"version",
|
||||
"database",
|
||||
"storage",
|
||||
"serverTime"
|
||||
]
|
||||
},
|
||||
"RegisterDeviceRequestDto": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"platform": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"MACOS",
|
||||
"IPHONE"
|
||||
],
|
||||
"example": "MACOS"
|
||||
},
|
||||
"deviceName": {
|
||||
"type": "string",
|
||||
"example": "Diya MacBook Pro"
|
||||
},
|
||||
"appVersion": {
|
||||
"type": "string",
|
||||
"example": "0.1.0"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"platform",
|
||||
"deviceName",
|
||||
"appVersion"
|
||||
]
|
||||
},
|
||||
"RegisterDeviceResponseDto": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"deviceId": {
|
||||
"type": "string",
|
||||
"format": "uuid"
|
||||
},
|
||||
"bootstrapToken": {
|
||||
"type": "string"
|
||||
},
|
||||
"serverTime": {
|
||||
"type": "string",
|
||||
"example": "2026-05-24T20:00:00.000Z"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"deviceId",
|
||||
"bootstrapToken",
|
||||
"serverTime"
|
||||
]
|
||||
},
|
||||
"DeviceHeartbeatRequestDto": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"deviceId": {
|
||||
"type": "string",
|
||||
"format": "uuid"
|
||||
},
|
||||
"appVersion": {
|
||||
"type": "string",
|
||||
"example": "0.1.0"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"deviceId",
|
||||
"appVersion"
|
||||
]
|
||||
},
|
||||
"DeviceHeartbeatResponseDto": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"ok": {
|
||||
"type": "boolean",
|
||||
"example": true
|
||||
},
|
||||
"serverTime": {
|
||||
"type": "string",
|
||||
"example": "2026-05-24T20:00:00.000Z"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"ok",
|
||||
"serverTime"
|
||||
]
|
||||
},
|
||||
"UploadPrepareRequestDto": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"deviceId": {
|
||||
"type": "string",
|
||||
"format": "uuid"
|
||||
},
|
||||
"sha256": {
|
||||
"type": "string",
|
||||
"example": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
|
||||
},
|
||||
"originalFilename": {
|
||||
"type": "string",
|
||||
"example": "track.mp3"
|
||||
},
|
||||
"sizeBytes": {
|
||||
"type": "number",
|
||||
"example": 10485760
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"deviceId",
|
||||
"sha256",
|
||||
"originalFilename",
|
||||
"sizeBytes"
|
||||
]
|
||||
},
|
||||
"UploadPrepareResponseDto": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"status": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"exists",
|
||||
"upload_required"
|
||||
]
|
||||
},
|
||||
"uploadId": {
|
||||
"type": "string",
|
||||
"format": "uuid"
|
||||
},
|
||||
"nextOffset": {
|
||||
"type": "number",
|
||||
"example": 0
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"status"
|
||||
]
|
||||
},
|
||||
"UploadSessionStatusResponseDto": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"uploadId": {
|
||||
"type": "string",
|
||||
"format": "uuid"
|
||||
},
|
||||
"status": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"PENDING",
|
||||
"READY_TO_UPLOAD",
|
||||
"COMPLETED",
|
||||
"FAILED"
|
||||
]
|
||||
},
|
||||
"receivedBytes": {
|
||||
"type": "string",
|
||||
"example": 0
|
||||
},
|
||||
"expectedSizeBytes": {
|
||||
"type": "string",
|
||||
"example": 10485760
|
||||
},
|
||||
"nextOffset": {
|
||||
"type": "string",
|
||||
"example": 0
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"uploadId",
|
||||
"status",
|
||||
"receivedBytes",
|
||||
"expectedSizeBytes",
|
||||
"nextOffset"
|
||||
]
|
||||
},
|
||||
"UploadFinalizeResponseDto": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"statusCode": {
|
||||
"type": "number",
|
||||
"example": 501
|
||||
},
|
||||
"message": {
|
||||
"type": "string",
|
||||
"example": "Upload finalization is not implemented yet."
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"statusCode",
|
||||
"message"
|
||||
]
|
||||
},
|
||||
"LibraryTrackDto": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string",
|
||||
"format": "uuid"
|
||||
},
|
||||
"title": {
|
||||
"type": "string",
|
||||
"example": "Placeholder Track"
|
||||
},
|
||||
"artist": {
|
||||
"type": "string",
|
||||
"example": "Velody"
|
||||
}
|
||||
}
|
||||
},
|
||||
"SyncEventDto": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"entityType": {
|
||||
"type": "string",
|
||||
"example": "TRACK"
|
||||
},
|
||||
"entityId": {
|
||||
"type": "string",
|
||||
"format": "uuid"
|
||||
},
|
||||
"action": {
|
||||
"type": "string",
|
||||
"example": "CREATED"
|
||||
},
|
||||
"eventId": {
|
||||
"type": "string",
|
||||
"example": "0"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"entityType",
|
||||
"entityId",
|
||||
"action",
|
||||
"eventId"
|
||||
]
|
||||
},
|
||||
"SyncBootstrapResponseDto": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"nextCursor": {
|
||||
"type": "string",
|
||||
"example": "0"
|
||||
},
|
||||
"tracks": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/components/schemas/LibraryTrackDto"
|
||||
}
|
||||
},
|
||||
"events": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/components/schemas/SyncEventDto"
|
||||
}
|
||||
},
|
||||
"deletedTrackIds": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"serverTime": {
|
||||
"type": "string",
|
||||
"example": "2026-05-24T20:00:00.000Z"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"nextCursor",
|
||||
"tracks",
|
||||
"events",
|
||||
"deletedTrackIds",
|
||||
"serverTime"
|
||||
]
|
||||
},
|
||||
"SyncChangesResponseDto": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"nextCursor": {
|
||||
"type": "string",
|
||||
"example": "0"
|
||||
},
|
||||
"tracks": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/components/schemas/LibraryTrackDto"
|
||||
}
|
||||
},
|
||||
"events": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/components/schemas/SyncEventDto"
|
||||
}
|
||||
},
|
||||
"deletedTrackIds": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"serverTime": {
|
||||
"type": "string",
|
||||
"example": "2026-05-24T20:00:00.000Z"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"nextCursor",
|
||||
"tracks",
|
||||
"events",
|
||||
"deletedTrackIds",
|
||||
"serverTime"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user