{"openapi":"3.0.0","paths":{"/":{"get":{"operationId":"AppController_getHello","parameters":[],"responses":{"200":{"description":""}},"summary":"Service landing page","tags":["Service"]}},"/commerce-contracts":{"post":{"description":"Idempotency-Key is optional. Missing key still creates. Replay of the same key returns the stored contract (200).","operationId":"CommerceContractController_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 commerce contract.","required":false,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCommerceContractDto"}}}},"responses":{"200":{"description":"Stored commerce contract replayed for this Idempotency-Key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommerceContractResponseDto"}}}},"201":{"description":"CommerceContract created successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommerceContractResponseDto"}}}},"400":{"description":"Invalid input data"}},"summary":"Create a new commerceContract","tags":["CommerceContracts"]},"get":{"operationId":"CommerceContractController_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 commerceContracts","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponseDto"}}}}},"summary":"Get all commerceContracts with pagination","tags":["CommerceContracts"]}},"/commerce-contracts/{id}":{"get":{"operationId":"CommerceContractController_findOne","parameters":[{"name":"id","required":true,"in":"path","description":"CommerceContract ID","schema":{"format":"uuid","type":"string"}},{"name":"x-internal-api-key","required":true,"in":"header","schema":{"type":"string"}}],"responses":{"200":{"description":"CommerceContract found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommerceContractResponseDto"}}}},"404":{"description":"CommerceContract not found"}},"summary":"Get commerceContract by ID","tags":["CommerceContracts"]},"put":{"operationId":"CommerceContractController_update","parameters":[{"name":"id","required":true,"in":"path","description":"CommerceContract 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/UpdateCommerceContractDto"}}}},"responses":{"200":{"description":"CommerceContract updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommerceContractResponseDto"}}}},"404":{"description":"CommerceContract not found"}},"summary":"Update commerceContract","tags":["CommerceContracts"]}},"/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":"Marketplace API","description":"Commerce contracts over the Medusa engine. Catalog and checkout stay on Medusa. Owns: CommerceContracts.","version":"1.0","contact":{}},"tags":[],"servers":[{"url":"https://marketplace.stormbyva.com"}],"components":{"securitySchemes":{"x-internal-api-key":{"type":"apiKey","in":"header","name":"x-internal-api-key","description":"Service-to-service key"}},"schemas":{"CreateCommerceContractDto":{"type":"object","properties":{"carePlanId":{"type":"string","description":"The care plan id of the entity","example":"550e8400-e29b-41d4-a716-446655440000"},"catalogItemId":{"type":"string","description":"The catalog item id of the entity","example":"550e8400-e29b-41d4-a716-446655440000"},"state":{"type":"string","description":"The state of the entity"}},"required":["carePlanId","catalogItemId","state"]},"CommerceContractResponseDto":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier","format":"uuid"},"carePlanId":{"type":"string","description":"The care plan id of the entity","example":"550e8400-e29b-41d4-a716-446655440000"},"catalogItemId":{"type":"string","description":"The catalog item id of the entity","example":"550e8400-e29b-41d4-a716-446655440000"},"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","carePlanId","catalogItemId","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"]},"UpdateCommerceContractDto":{"type":"object","properties":{"carePlanId":{"type":"string","description":"The care plan id of the entity","example":"550e8400-e29b-41d4-a716-446655440000"},"catalogItemId":{"type":"string","description":"The catalog item id of the entity","example":"550e8400-e29b-41d4-a716-446655440000"},"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"}}}}}}