{"openapi":"3.0.0","paths":{"/":{"get":{"operationId":"AppController_getHello","parameters":[],"responses":{"200":{"description":""}},"summary":"Service landing page","tags":["Service"]}},"/assets":{"post":{"description":"Idempotency-Key is optional. Missing key still creates. Replay of the same key returns the stored asset (200).","operationId":"AssetController_create","parameters":[{"name":"x-internal-api-key","required":true,"in":"header","schema":{"type":"string"}},{"name":"idempotency-key","required":true,"in":"header","schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","description":"S2S replay key. Same key returns the same asset.","required":false,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAssetDto"}}}},"responses":{"200":{"description":"Stored asset replayed for this Idempotency-Key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssetResponseDto"}}}},"201":{"description":"Asset created successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssetResponseDto"}}}},"400":{"description":"Invalid input data"}},"summary":"Create a new asset","tags":["Assets"]},"get":{"operationId":"AssetController_findAll","parameters":[{"name":"page","required":false,"in":"query","description":"Page number","schema":{"minimum":1,"default":1,"type":"number"}},{"name":"limit","required":false,"in":"query","description":"Items per page","schema":{"minimum":1,"maximum":100,"default":10,"type":"number"}},{"name":"sortBy","required":false,"in":"query","description":"Field to sort by","schema":{"default":"createdAt","type":"string"}},{"name":"sortOrder","required":false,"in":"query","description":"Sort order","schema":{"default":"DESC","type":"string","enum":["ASC","DESC"]}},{"name":"x-internal-api-key","required":true,"in":"header","schema":{"type":"string"}}],"responses":{"200":{"description":"List of assets","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponseDto"}}}}},"summary":"Get all assets with pagination","tags":["Assets"]}},"/assets/{id}/upload-session":{"get":{"operationId":"AssetController_uploadSession","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"x-internal-api-key","required":true,"in":"header","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"summary":"Short-lived tusd upload capability","tags":["Assets"]}},"/assets/{id}/signed-read":{"get":{"operationId":"AssetController_signedRead","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"x-internal-api-key","required":true,"in":"header","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"summary":"Short-lived doctor read URL; origin stays private","tags":["Assets"]}},"/assets/{id}/content":{"get":{"operationId":"AssetController_content","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"exp","required":true,"in":"query","schema":{"type":"string"}},{"name":"sig","required":true,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"summary":"Redeem a signed clinical read","tags":["Assets"]}},"/assets/{id}":{"get":{"operationId":"AssetController_findOne","parameters":[{"name":"id","required":true,"in":"path","description":"Asset ID","schema":{"format":"uuid","type":"string"}},{"name":"x-internal-api-key","required":true,"in":"header","schema":{"type":"string"}}],"responses":{"200":{"description":"Asset found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssetResponseDto"}}}},"404":{"description":"Asset not found"}},"summary":"Get asset by ID","tags":["Assets"]},"put":{"operationId":"AssetController_update","parameters":[{"name":"id","required":true,"in":"path","description":"Asset ID","schema":{"format":"uuid","type":"string"}},{"name":"x-internal-api-key","required":true,"in":"header","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAssetDto"}}}},"responses":{"200":{"description":"Asset updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssetResponseDto"}}}},"404":{"description":"Asset not found"}},"summary":"Update asset","tags":["Assets"]}},"/command-inboxes":{"post":{"operationId":"CommandInboxController_create","parameters":[{"name":"x-internal-api-key","required":true,"in":"header","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCommandInboxDto"}}}},"responses":{"201":{"description":"CommandInbox created successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommandInboxResponseDto"}}}},"400":{"description":"Invalid input data"}},"summary":"Create a new commandInbox","tags":["CommandInboxes"]},"get":{"operationId":"CommandInboxController_findAll","parameters":[{"name":"page","required":false,"in":"query","description":"Page number","schema":{"minimum":1,"default":1,"type":"number"}},{"name":"limit","required":false,"in":"query","description":"Items per page","schema":{"minimum":1,"maximum":100,"default":10,"type":"number"}},{"name":"sortBy","required":false,"in":"query","description":"Field to sort by","schema":{"default":"createdAt","type":"string"}},{"name":"sortOrder","required":false,"in":"query","description":"Sort order","schema":{"default":"DESC","type":"string","enum":["ASC","DESC"]}},{"name":"x-internal-api-key","required":true,"in":"header","schema":{"type":"string"}}],"responses":{"200":{"description":"List of commandInboxes","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponseDto"}}}}},"summary":"Get all commandInboxes with pagination","tags":["CommandInboxes"]}},"/command-inboxes/{id}":{"get":{"operationId":"CommandInboxController_findOne","parameters":[{"name":"id","required":true,"in":"path","description":"CommandInbox ID","schema":{"format":"uuid","type":"string"}},{"name":"x-internal-api-key","required":true,"in":"header","schema":{"type":"string"}}],"responses":{"200":{"description":"CommandInbox found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommandInboxResponseDto"}}}},"404":{"description":"CommandInbox not found"}},"summary":"Get commandInbox by ID","tags":["CommandInboxes"]},"put":{"operationId":"CommandInboxController_update","parameters":[{"name":"id","required":true,"in":"path","description":"CommandInbox ID","schema":{"format":"uuid","type":"string"}},{"name":"x-internal-api-key","required":true,"in":"header","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCommandInboxDto"}}}},"responses":{"200":{"description":"CommandInbox updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommandInboxResponseDto"}}}},"404":{"description":"CommandInbox not found"}},"summary":"Update commandInbox","tags":["CommandInboxes"]}},"/health":{"get":{"operationId":"HealthController_check","parameters":[],"responses":{"200":{"description":"The Health Check is successful","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","example":"ok"},"info":{"type":"object","example":{"database":{"status":"up"}},"additionalProperties":{"type":"object","required":["status"],"properties":{"status":{"type":"string"}},"additionalProperties":true},"nullable":true},"error":{"type":"object","example":{},"additionalProperties":{"type":"object","required":["status"],"properties":{"status":{"type":"string"}},"additionalProperties":true},"nullable":true},"details":{"type":"object","example":{"database":{"status":"up"}},"additionalProperties":{"type":"object","required":["status"],"properties":{"status":{"type":"string"}},"additionalProperties":true}}}}}}},"503":{"description":"The Health Check is not successful","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","example":"error"},"info":{"type":"object","example":{"database":{"status":"up"}},"additionalProperties":{"type":"object","required":["status"],"properties":{"status":{"type":"string"}},"additionalProperties":true},"nullable":true},"error":{"type":"object","example":{"redis":{"status":"down","message":"Could not connect"}},"additionalProperties":{"type":"object","required":["status"],"properties":{"status":{"type":"string"}},"additionalProperties":true},"nullable":true},"details":{"type":"object","example":{"database":{"status":"up"},"redis":{"status":"down","message":"Could not connect"}},"additionalProperties":{"type":"object","required":["status"],"properties":{"status":{"type":"string"}},"additionalProperties":true}}}}}}}},"summary":"Basic health check","tags":["Health"]}},"/health/ready":{"get":{"operationId":"HealthController_readiness","parameters":[],"responses":{"200":{"description":"The Health Check is successful","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","example":"ok"},"info":{"type":"object","example":{"database":{"status":"up"}},"additionalProperties":{"type":"object","required":["status"],"properties":{"status":{"type":"string"}},"additionalProperties":true},"nullable":true},"error":{"type":"object","example":{},"additionalProperties":{"type":"object","required":["status"],"properties":{"status":{"type":"string"}},"additionalProperties":true},"nullable":true},"details":{"type":"object","example":{"database":{"status":"up"}},"additionalProperties":{"type":"object","required":["status"],"properties":{"status":{"type":"string"}},"additionalProperties":true}}}}}}},"503":{"description":"The Health Check is not successful","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","example":"error"},"info":{"type":"object","example":{"database":{"status":"up"}},"additionalProperties":{"type":"object","required":["status"],"properties":{"status":{"type":"string"}},"additionalProperties":true},"nullable":true},"error":{"type":"object","example":{"redis":{"status":"down","message":"Could not connect"}},"additionalProperties":{"type":"object","required":["status"],"properties":{"status":{"type":"string"}},"additionalProperties":true},"nullable":true},"details":{"type":"object","example":{"database":{"status":"up"},"redis":{"status":"down","message":"Could not connect"}},"additionalProperties":{"type":"object","required":["status"],"properties":{"status":{"type":"string"}},"additionalProperties":true}}}}}}}},"summary":"Readiness check - is the service ready to receive traffic?","tags":["Health"]}},"/health/live":{"get":{"operationId":"HealthController_liveness","parameters":[],"responses":{"200":{"description":"The Health Check is successful","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","example":"ok"},"info":{"type":"object","example":{"database":{"status":"up"}},"additionalProperties":{"type":"object","required":["status"],"properties":{"status":{"type":"string"}},"additionalProperties":true},"nullable":true},"error":{"type":"object","example":{},"additionalProperties":{"type":"object","required":["status"],"properties":{"status":{"type":"string"}},"additionalProperties":true},"nullable":true},"details":{"type":"object","example":{"database":{"status":"up"}},"additionalProperties":{"type":"object","required":["status"],"properties":{"status":{"type":"string"}},"additionalProperties":true}}}}}}},"503":{"description":"The Health Check is not successful","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","example":"error"},"info":{"type":"object","example":{"database":{"status":"up"}},"additionalProperties":{"type":"object","required":["status"],"properties":{"status":{"type":"string"}},"additionalProperties":true},"nullable":true},"error":{"type":"object","example":{"redis":{"status":"down","message":"Could not connect"}},"additionalProperties":{"type":"object","required":["status"],"properties":{"status":{"type":"string"}},"additionalProperties":true},"nullable":true},"details":{"type":"object","example":{"database":{"status":"up"},"redis":{"status":"down","message":"Could not connect"}},"additionalProperties":{"type":"object","required":["status"],"properties":{"status":{"type":"string"}},"additionalProperties":true}}}}}}}},"summary":"Liveness check - is the service alive?","tags":["Health"]}}},"info":{"title":"Media API","description":"Clinical photo assets, tusd upload sessions, and signed reads. Origin stays private. Owns: Assets, signed reads.","version":"1.0","contact":{}},"tags":[],"servers":[{"url":"https://media.stormbyva.com"}],"components":{"securitySchemes":{"x-internal-api-key":{"type":"apiKey","in":"header","name":"x-internal-api-key","description":"Service-to-service key"}},"schemas":{"CreateAssetDto":{"type":"object","properties":{"ownerIdentityId":{"type":"string","description":"The owner identity id of the entity","example":"550e8400-e29b-41d4-a716-446655440000"},"objectRef":{"type":"string","description":"The object ref of the entity","example":"Sample text"},"state":{"type":"string","description":"The state of the entity"}},"required":["ownerIdentityId","objectRef","state"]},"AssetResponseDto":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier","format":"uuid"},"ownerIdentityId":{"type":"string","description":"The owner identity id of the entity","example":"550e8400-e29b-41d4-a716-446655440000"},"objectRef":{"type":"string","description":"The object ref of the entity","example":"Sample text"},"state":{"type":"string","description":"The state of the entity"},"isActive":{"type":"boolean","description":"Whether the record is active"},"createdAt":{"format":"date-time","type":"string","description":"Creation timestamp"},"updatedAt":{"format":"date-time","type":"string","description":"Last update timestamp"}},"required":["id","ownerIdentityId","objectRef","state","isActive","createdAt","updatedAt"]},"PaginationMeta":{"type":"object","properties":{"total":{"type":"number","description":"Total number of items"},"page":{"type":"number","description":"Current page number"},"limit":{"type":"number","description":"Number of items per page"},"totalPages":{"type":"number","description":"Total number of pages"},"hasNextPage":{"type":"boolean","description":"Whether there is a next page"},"hasPreviousPage":{"type":"boolean","description":"Whether there is a previous page"}},"required":["total","page","limit","totalPages","hasNextPage","hasPreviousPage"]},"PaginatedResponseDto":{"type":"object","properties":{"items":{"description":"Array of items","type":"array","items":{"type":"array"}},"meta":{"description":"Pagination metadata","allOf":[{"$ref":"#/components/schemas/PaginationMeta"}]}},"required":["items","meta"]},"UpdateAssetDto":{"type":"object","properties":{"ownerIdentityId":{"type":"string","description":"The owner identity id of the entity","example":"550e8400-e29b-41d4-a716-446655440000"},"objectRef":{"type":"string","description":"The object ref of the entity","example":"Sample text"},"state":{"type":"string","description":"The state of the entity"},"isActive":{"type":"boolean","description":"Whether the record is active"}}},"CreateCommandInboxDto":{"type":"object","properties":{"idempotencyKey":{"type":"string","description":"The idempotency key of the entity","example":"Sample text"},"scope":{"type":"string","description":"The scope of the entity","example":"Sample text"},"requestHash":{"type":"string","description":"The request hash of the entity","example":"Sample text"},"responseStatus":{"type":"number","description":"The response status of the entity","example":"42"},"responseBody":{"type":"object","description":"The response body of the entity"},"resourceId":{"type":"string","description":"The resource id of the entity","example":"550e8400-e29b-41d4-a716-446655440000"},"expiresAt":{"format":"date-time","type":"string","description":"The expires at of the entity"}},"required":["idempotencyKey","scope","expiresAt"]},"CommandInboxResponseDto":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier","format":"uuid"},"idempotencyKey":{"type":"string","description":"The idempotency key of the entity","example":"Sample text"},"scope":{"type":"string","description":"The scope of the entity","example":"Sample text"},"requestHash":{"type":"string","description":"The request hash of the entity","example":"Sample text"},"responseStatus":{"type":"number","description":"The response status of the entity","example":"42"},"responseBody":{"type":"object","description":"The response body of the entity"},"resourceId":{"type":"string","description":"The resource id of the entity","example":"550e8400-e29b-41d4-a716-446655440000"},"expiresAt":{"format":"date-time","type":"string","description":"The expires at of the entity"},"isActive":{"type":"boolean","description":"Whether the record is active"},"createdAt":{"format":"date-time","type":"string","description":"Creation timestamp"},"updatedAt":{"format":"date-time","type":"string","description":"Last update timestamp"}},"required":["id","idempotencyKey","scope","requestHash","responseStatus","responseBody","resourceId","expiresAt","isActive","createdAt","updatedAt"]},"UpdateCommandInboxDto":{"type":"object","properties":{"idempotencyKey":{"type":"string","description":"The idempotency key of the entity","example":"Sample text"},"scope":{"type":"string","description":"The scope of the entity","example":"Sample text"},"requestHash":{"type":"string","description":"The request hash of the entity","example":"Sample text"},"responseStatus":{"type":"number","description":"The response status of the entity","example":"42"},"responseBody":{"type":"object","description":"The response body of the entity"},"resourceId":{"type":"string","description":"The resource id of the entity","example":"550e8400-e29b-41d4-a716-446655440000"},"expiresAt":{"format":"date-time","type":"string","description":"The expires at of the entity"},"isActive":{"type":"boolean","description":"Whether the record is active"}}}}}}