{"openapi":"3.1.0","info":{"title":"ReleaseFlow API","description":"API for managing app releases with Sparkle, Electron auto-updates, and manual Android APK distribution","version":"1.0.0"},"servers":[{"url":"https://releaseflow.net/api/rest"}],"paths":{"/integrations/polar":{"get":{"operationId":"polarIntegration-getAll","summary":"List Polar integrations","description":"Get all Polar integrations for the authenticated user","tags":["Integrations","Polar"],"security":[{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"accessToken":{"type":"string"},"organizationId":{"type":"string"},"environment":{"type":"string","enum":["SANDBOX","PRODUCTION"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"_count":{"type":"object","properties":{"apps":{"type":"number"}},"required":["apps"],"additionalProperties":false}},"required":["id","name","description","accessToken","organizationId","environment","createdAt","updatedAt","_count"],"additionalProperties":false}}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}},"post":{"operationId":"polarIntegration-create","summary":"Create Polar integration","description":"Create a new Polar integration with access token and organization ID","tags":["Integrations","Polar"],"security":[{"apiKey":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"description":{"type":"string","maxLength":500},"accessToken":{"type":"string","minLength":1},"organizationId":{"type":"string","minLength":1},"environment":{"default":"PRODUCTION","type":"string","enum":["SANDBOX","PRODUCTION"]}},"required":["name","accessToken","organizationId"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"accessToken":{"type":"string"},"organizationId":{"type":"string"},"environment":{"type":"string","enum":["SANDBOX","PRODUCTION"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","description","accessToken","organizationId","environment","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/integrations/polar/{id}":{"get":{"operationId":"polarIntegration-getById","summary":"Get Polar integration","description":"Get a single Polar integration by ID","tags":["Integrations","Polar"],"security":[{"apiKey":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"accessToken":{"type":"string"},"organizationId":{"type":"string"},"environment":{"type":"string","enum":["SANDBOX","PRODUCTION"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"apps":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"}},"required":["id","name","slug"],"additionalProperties":false}}},"required":["id","name","description","accessToken","organizationId","environment","createdAt","updatedAt","apps"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}},"patch":{"operationId":"polarIntegration-update","summary":"Update Polar integration","description":"Update an existing Polar integration","tags":["Integrations","Polar"],"security":[{"apiKey":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"accessToken":{"type":"string","minLength":1},"organizationId":{"type":"string","minLength":1},"environment":{"type":"string","enum":["SANDBOX","PRODUCTION"]}}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"accessToken":{"type":"string"},"organizationId":{"type":"string"},"environment":{"type":"string","enum":["SANDBOX","PRODUCTION"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","description","accessToken","organizationId","environment","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}},"delete":{"operationId":"polarIntegration-delete","summary":"Delete Polar integration","description":"Delete a Polar integration","tags":["Integrations","Polar"],"security":[{"apiKey":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/apps/{appId}/integrations/polar":{"post":{"operationId":"polarIntegration-connectApp","summary":"Connect app to Polar","description":"Connect an app to a Polar integration for license management","tags":["Integrations","Polar"],"security":[{"apiKey":[]}],"parameters":[{"in":"path","name":"appId","schema":{"type":"string"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"integrationId":{"type":"string"}},"required":["integrationId"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"polarIntegrationId":{"anyOf":[{"type":"string"},{"type":"null"}]},"lemonSqueezyIntegrationId":{"anyOf":[{"type":"string"},{"type":"null"}]},"licenseProvider":{"type":"string","enum":["NONE","POLAR","LEMONSQUEEZY","INTERNAL"]}},"required":["id","slug","name","polarIntegrationId","lemonSqueezyIntegrationId","licenseProvider"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}},"delete":{"operationId":"polarIntegration-disconnectApp","summary":"Disconnect app from Polar","description":"Disconnect an app from its Polar integration","tags":["Integrations","Polar"],"security":[{"apiKey":[]}],"parameters":[{"in":"path","name":"appId","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"polarIntegrationId":{"anyOf":[{"type":"string"},{"type":"null"}]},"lemonSqueezyIntegrationId":{"anyOf":[{"type":"string"},{"type":"null"}]},"licenseProvider":{"type":"string","enum":["NONE","POLAR","LEMONSQUEEZY","INTERNAL"]}},"required":["id","slug","name","polarIntegrationId","lemonSqueezyIntegrationId","licenseProvider"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/apps/{appId}/polar/products":{"get":{"operationId":"polarIntegration-getProductsForApp","summary":"Get Polar products for app","description":"Get all Polar products configured for an app","tags":["Integrations","Polar"],"security":[{"apiKey":[]}],"parameters":[{"in":"path","name":"appId","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"appId":{"type":"string"},"productId":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"maxActivations":{"anyOf":[{"type":"number"},{"type":"null"}]},"isPreorder":{"type":"boolean"},"createdAt":{"type":"string"}},"required":["id","appId","productId","name","description","maxActivations","isPreorder","createdAt"],"additionalProperties":false}}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/apps/{appId}/polar/benefits":{"get":{"operationId":"polarIntegration-getBenefitsForApp","summary":"Get Polar benefits for app","description":"Get all Polar benefits configured for an app","tags":["Integrations","Polar"],"security":[{"apiKey":[]}],"parameters":[{"in":"path","name":"appId","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"appId":{"type":"string"},"benefitId":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"}},"required":["id","appId","benefitId","name","createdAt"],"additionalProperties":false}}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/integrations/lemonsqueezy":{"get":{"operationId":"lemonSqueezyIntegration-getAll","summary":"List LemonSqueezy integrations","description":"Get all LemonSqueezy integrations for the authenticated user","tags":["Integrations","LemonSqueezy"],"security":[{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"apiKey":{"type":"string"},"storeId":{"type":"string"},"environment":{"type":"string","enum":["TEST","PRODUCTION"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"_count":{"type":"object","properties":{"apps":{"type":"number"}},"required":["apps"],"additionalProperties":false}},"required":["id","name","description","apiKey","storeId","environment","createdAt","updatedAt","_count"],"additionalProperties":false}}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}},"post":{"operationId":"lemonSqueezyIntegration-create","summary":"Create LemonSqueezy integration","description":"Create a new LemonSqueezy integration with API key and store ID","tags":["Integrations","LemonSqueezy"],"security":[{"apiKey":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"description":{"type":"string","maxLength":500},"apiKey":{"type":"string","minLength":1},"storeId":{"type":"string","minLength":1},"environment":{"default":"PRODUCTION","type":"string","enum":["TEST","PRODUCTION"]}},"required":["name","apiKey","storeId"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"apiKey":{"type":"string"},"storeId":{"type":"string"},"environment":{"type":"string","enum":["TEST","PRODUCTION"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","description","apiKey","storeId","environment","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/integrations/lemonsqueezy/{id}":{"get":{"operationId":"lemonSqueezyIntegration-getById","summary":"Get LemonSqueezy integration","description":"Get a single LemonSqueezy integration by ID","tags":["Integrations","LemonSqueezy"],"security":[{"apiKey":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"apiKey":{"type":"string"},"storeId":{"type":"string"},"environment":{"type":"string","enum":["TEST","PRODUCTION"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"apps":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"}},"required":["id","name","slug"],"additionalProperties":false}}},"required":["id","name","description","apiKey","storeId","environment","createdAt","updatedAt","apps"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}},"patch":{"operationId":"lemonSqueezyIntegration-update","summary":"Update LemonSqueezy integration","description":"Update an existing LemonSqueezy integration","tags":["Integrations","LemonSqueezy"],"security":[{"apiKey":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"apiKey":{"type":"string","minLength":1},"storeId":{"type":"string","minLength":1},"environment":{"type":"string","enum":["TEST","PRODUCTION"]}}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"apiKey":{"type":"string"},"storeId":{"type":"string"},"environment":{"type":"string","enum":["TEST","PRODUCTION"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","description","apiKey","storeId","environment","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}},"delete":{"operationId":"lemonSqueezyIntegration-delete","summary":"Delete LemonSqueezy integration","description":"Delete a LemonSqueezy integration","tags":["Integrations","LemonSqueezy"],"security":[{"apiKey":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/apps/{appId}/integrations/lemonsqueezy":{"post":{"operationId":"lemonSqueezyIntegration-connectApp","summary":"Connect app to LemonSqueezy","description":"Connect an app to a LemonSqueezy integration for license management","tags":["Integrations","LemonSqueezy"],"security":[{"apiKey":[]}],"parameters":[{"in":"path","name":"appId","schema":{"type":"string"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"integrationId":{"type":"string"}},"required":["integrationId"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"polarIntegrationId":{"anyOf":[{"type":"string"},{"type":"null"}]},"lemonSqueezyIntegrationId":{"anyOf":[{"type":"string"},{"type":"null"}]},"licenseProvider":{"type":"string","enum":["NONE","POLAR","LEMONSQUEEZY","INTERNAL"]}},"required":["id","slug","name","polarIntegrationId","lemonSqueezyIntegrationId","licenseProvider"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}},"delete":{"operationId":"lemonSqueezyIntegration-disconnectApp","summary":"Disconnect app from LemonSqueezy","description":"Disconnect an app from its LemonSqueezy integration","tags":["Integrations","LemonSqueezy"],"security":[{"apiKey":[]}],"parameters":[{"in":"path","name":"appId","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"polarIntegrationId":{"anyOf":[{"type":"string"},{"type":"null"}]},"lemonSqueezyIntegrationId":{"anyOf":[{"type":"string"},{"type":"null"}]},"licenseProvider":{"type":"string","enum":["NONE","POLAR","LEMONSQUEEZY","INTERNAL"]}},"required":["id","slug","name","polarIntegrationId","lemonSqueezyIntegrationId","licenseProvider"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/apps/{appId}/lemonsqueezy/products":{"get":{"operationId":"lemonSqueezyIntegration-getProductsForApp","summary":"Get LemonSqueezy products for app","description":"Get all LemonSqueezy products configured for an app","tags":["Integrations","LemonSqueezy"],"security":[{"apiKey":[]}],"parameters":[{"in":"path","name":"appId","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"appId":{"type":"string"},"productId":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"maxActivations":{"anyOf":[{"type":"number"},{"type":"null"}]},"isPreorder":{"type":"boolean"},"createdAt":{"type":"string"}},"required":["id","appId","productId","name","description","maxActivations","isPreorder","createdAt"],"additionalProperties":false}}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/apps/{appId}/license-keys":{"post":{"operationId":"license-create","summary":"Create a license key","description":"Create a built-in license key for an app. Returns the full key.","tags":["Licenses"],"security":[{"apiKey":[]}],"parameters":[{"in":"path","name":"appId","schema":{"type":"string"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"customerEmail":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"customerName":{"type":"string"},"maxActivations":{"type":"integer","minimum":1,"maximum":9007199254740991},"allowUserDeactivation":{"type":"boolean"},"expiresAt":{"type":"string"},"notes":{"type":"string"}},"required":["customerEmail"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"key":{"type":"string"},"customerEmail":{"type":"string"},"status":{"type":"string","enum":["ACTIVE","SUSPENDED","REVOKED","EXPIRED"]},"maxActivations":{"type":"number"},"createdAt":{"type":"string"}},"required":["id","key","customerEmail","status","maxActivations","createdAt"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/apps":{"get":{"operationId":"releaseflow-getAll","summary":"List all apps","description":"Get all apps for the authenticated user","tags":["Apps"],"security":[{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"type":{"type":"string","enum":["ANDROID","ELECTRON","SPARKLE"]},"githubRepo":{"anyOf":[{"type":"string"},{"type":"null"}]},"releaseHistoryLimit":{"anyOf":[{"type":"number"},{"type":"null"}]},"changelogMode":{"type":"string","enum":["NONE","GLINK","CUSTOM"]},"sparkleVersionStrategy":{"type":"string","enum":["SEMVER","NUMERIC_BUILD"]},"_count":{"type":"object","properties":{"releases":{"type":"number"}},"required":["releases"],"additionalProperties":false},"polarIntegration":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},{"type":"null"}]},"lemonSqueezyIntegration":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},{"type":"null"}]}},"required":["id","slug","name","type","githubRepo","releaseHistoryLimit","changelogMode","sparkleVersionStrategy","_count","polarIntegration","lemonSqueezyIntegration"],"additionalProperties":false}}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}},"post":{"operationId":"releaseflow-create","summary":"Create a new app","description":"Create a new app connected to a GitHub repository","tags":["Apps"],"security":[{"apiKey":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"slug":{"type":"string","minLength":1,"maxLength":50,"pattern":"^[a-z0-9-]+$"},"type":{"type":"string","enum":["ANDROID","ELECTRON","SPARKLE"]},"githubRepo":{"anyOf":[{"type":"string","pattern":"^[^/]+\\/[^/]+$"},{"type":"null"}]},"sparklePublicKey":{"type":"string"},"minimumSystemVersion":{"type":"string"},"sparkleVersionStrategy":{"type":"string","enum":["SEMVER","NUMERIC_BUILD"]},"enableBeta":{"default":false,"type":"boolean"},"enableAlpha":{"default":false,"type":"boolean"},"releaseHistoryLimit":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["name","slug","type"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"type":{"type":"string","enum":["ANDROID","ELECTRON","SPARKLE"]},"githubRepo":{"anyOf":[{"type":"string"},{"type":"null"}]},"changelogMode":{"type":"string","enum":["NONE","GLINK","CUSTOM"]},"sparklePublicKey":{"anyOf":[{"type":"string"},{"type":"null"}]},"minimumSystemVersion":{"anyOf":[{"type":"string"},{"type":"null"}]},"sparkleVersionStrategy":{"type":"string","enum":["SEMVER","NUMERIC_BUILD"]},"enableBeta":{"type":"boolean"},"enableAlpha":{"type":"boolean"},"isPublic":{"type":"boolean"},"releaseHistoryLimit":{"anyOf":[{"type":"number"},{"type":"null"}]},"licenseProvider":{"type":"string","enum":["NONE","POLAR","LEMONSQUEEZY","INTERNAL"]},"licenseMaxActivations":{"type":"number"},"licenseMachineTracking":{"type":"boolean"},"licenseTrialDays":{"type":"number"},"licenseOfflineGraceDays":{"type":"number"},"licenseRevalidationDays":{"type":"number"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","slug","name","type","githubRepo","changelogMode","sparklePublicKey","minimumSystemVersion","sparkleVersionStrategy","enableBeta","enableAlpha","isPublic","releaseHistoryLimit","licenseProvider","licenseMaxActivations","licenseMachineTracking","licenseTrialDays","licenseOfflineGraceDays","licenseRevalidationDays","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/apps/{slug}":{"get":{"operationId":"releaseflow-getBySlug","summary":"Get app by slug","description":"Get a single app by its slug","tags":["Apps"],"security":[{"apiKey":[]}],"parameters":[{"in":"path","name":"slug","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"type":{"type":"string","enum":["ANDROID","ELECTRON","SPARKLE"]},"githubRepo":{"anyOf":[{"type":"string"},{"type":"null"}]},"changelogMode":{"type":"string","enum":["NONE","GLINK","CUSTOM"]},"sparklePublicKey":{"anyOf":[{"type":"string"},{"type":"null"}]},"minimumSystemVersion":{"anyOf":[{"type":"string"},{"type":"null"}]},"sparkleVersionStrategy":{"type":"string","enum":["SEMVER","NUMERIC_BUILD"]},"enableBeta":{"type":"boolean"},"enableAlpha":{"type":"boolean"},"devChannelEnabled":{"type":"boolean"},"isPublic":{"type":"boolean"},"releaseHistoryLimit":{"anyOf":[{"type":"number"},{"type":"null"}]},"glinkUsername":{"anyOf":[{"type":"string"},{"type":"null"}]},"glinkProjectSlug":{"anyOf":[{"type":"string"},{"type":"null"}]},"licenseProvider":{"type":"string","enum":["NONE","POLAR","LEMONSQUEEZY","INTERNAL"]},"licenseMaxActivations":{"type":"number"},"licenseMachineTracking":{"type":"boolean"},"licenseTrialDays":{"type":"number"},"licenseOfflineGraceDays":{"type":"number"},"licenseRevalidationDays":{"type":"number"},"polarIntegrationId":{"anyOf":[{"type":"string"},{"type":"null"}]},"lemonSqueezyIntegrationId":{"anyOf":[{"type":"string"},{"type":"null"}]},"user":{"type":"object","properties":{"username":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["username"],"additionalProperties":false},"polarIntegration":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"environment":{"type":"string"}},"required":["id","name","environment"],"additionalProperties":false},{"type":"null"}]},"lemonSqueezyIntegration":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"environment":{"type":"string"}},"required":["id","name","environment"],"additionalProperties":false},{"type":"null"}]},"releases":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"version":{"type":"string"},"channel":{"type":"string","enum":["STABLE","BETA","ALPHA","DEV"]},"notes":{"anyOf":[{"type":"string"},{"type":"null"}]},"changelogUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"tagName":{"type":"string"},"isPrerelease":{"type":"boolean"},"isEnabled":{"type":"boolean"},"publishedAt":{"type":"string"},"assets":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"platform":{"type":"string","enum":["ANDROID","DARWIN","WINDOWS","LINUX"]},"arch":{"anyOf":[{"type":"string"},{"type":"null"}]},"size":{"type":"number"},"downloadUrl":{"type":"string"}},"required":["id","name","platform","arch","size","downloadUrl"],"additionalProperties":false}}},"required":["id","version","channel","notes","changelogUrl","tagName","isPrerelease","isEnabled","publishedAt","assets"],"additionalProperties":false}}},"required":["id","slug","name","type","githubRepo","changelogMode","sparklePublicKey","minimumSystemVersion","sparkleVersionStrategy","enableBeta","enableAlpha","devChannelEnabled","isPublic","releaseHistoryLimit","glinkUsername","glinkProjectSlug","licenseProvider","licenseMaxActivations","licenseMachineTracking","licenseTrialDays","licenseOfflineGraceDays","licenseRevalidationDays","polarIntegrationId","lemonSqueezyIntegrationId","user","polarIntegration","lemonSqueezyIntegration","releases"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/apps/{slug}/dev-channel":{"post":{"operationId":"releaseflow-setDevChannel","summary":"Rotate or disable the private dev channel token","description":"enabled=true rotates the token and returns it once (or stores a caller-supplied tokenHash and returns no token); enabled=false disables the dev channel.","tags":["Apps"],"security":[{"apiKey":[]}],"parameters":[{"in":"path","name":"slug","schema":{"type":"string"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean"},"tokenHash":{"type":"string","pattern":"^[a-f0-9]{64}$"}},"required":["enabled"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean"},"token":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["enabled","token"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/apps/{id}":{"patch":{"operationId":"releaseflow-update","summary":"Update an app","description":"Update app settings, integrations, and configuration","tags":["Apps"],"security":[{"apiKey":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"sparklePublicKey":{"anyOf":[{"type":"string"},{"type":"null"}]},"minimumSystemVersion":{"anyOf":[{"type":"string"},{"type":"null"}]},"sparkleVersionStrategy":{"type":"string","enum":["SEMVER","NUMERIC_BUILD"]},"enableBeta":{"type":"boolean"},"enableAlpha":{"type":"boolean"},"isPublic":{"type":"boolean"},"releaseHistoryLimit":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"polarIntegrationId":{"anyOf":[{"type":"string"},{"type":"null"}]},"lemonSqueezyIntegrationId":{"anyOf":[{"type":"string"},{"type":"null"}]},"licenseProvider":{"type":"string","enum":["NONE","POLAR","LEMONSQUEEZY","INTERNAL"]},"licenseMaxActivations":{"type":"integer","minimum":1,"maximum":100},"licenseMachineTracking":{"type":"boolean"},"licenseTrialDays":{"type":"integer","minimum":0,"maximum":365},"licenseOfflineGraceDays":{"type":"integer","minimum":0,"maximum":90},"licenseRevalidationDays":{"type":"integer","minimum":1,"maximum":365},"changelogMode":{"type":"string","enum":["NONE","GLINK","CUSTOM"]},"glinkUsername":{"anyOf":[{"type":"string"},{"type":"null"}]},"glinkProjectSlug":{"anyOf":[{"type":"string"},{"type":"null"}]},"polarProductIds":{"type":"array","items":{"type":"string"}},"polarBenefitIds":{"type":"array","items":{"type":"string"}},"lemonSqueezyProductIds":{"type":"array","items":{"type":"string"}}}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"type":{"type":"string","enum":["ANDROID","ELECTRON","SPARKLE"]},"githubRepo":{"anyOf":[{"type":"string"},{"type":"null"}]},"changelogMode":{"type":"string","enum":["NONE","GLINK","CUSTOM"]},"sparklePublicKey":{"anyOf":[{"type":"string"},{"type":"null"}]},"minimumSystemVersion":{"anyOf":[{"type":"string"},{"type":"null"}]},"sparkleVersionStrategy":{"type":"string","enum":["SEMVER","NUMERIC_BUILD"]},"enableBeta":{"type":"boolean"},"enableAlpha":{"type":"boolean"},"isPublic":{"type":"boolean"},"releaseHistoryLimit":{"anyOf":[{"type":"number"},{"type":"null"}]},"licenseProvider":{"type":"string","enum":["NONE","POLAR","LEMONSQUEEZY","INTERNAL"]},"licenseMaxActivations":{"type":"number"},"licenseMachineTracking":{"type":"boolean"},"licenseTrialDays":{"type":"number"},"licenseOfflineGraceDays":{"type":"number"},"licenseRevalidationDays":{"type":"number"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","slug","name","type","githubRepo","changelogMode","sparklePublicKey","minimumSystemVersion","sparkleVersionStrategy","enableBeta","enableAlpha","isPublic","releaseHistoryLimit","licenseProvider","licenseMaxActivations","licenseMachineTracking","licenseTrialDays","licenseOfflineGraceDays","licenseRevalidationDays","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}},"delete":{"operationId":"releaseflow-delete","summary":"Delete an app","description":"Permanently delete an app and all its releases from ReleaseFlow","tags":["Apps"],"security":[{"apiKey":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/apps/{id}/sync":{"post":{"operationId":"releaseflow-syncReleases","summary":"Sync releases from GitHub","description":"Fetch and sync releases from the connected GitHub repository","tags":["Apps","Releases"],"security":[{"apiKey":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"created":{"type":"number"},"updated":{"type":"number"},"newReleaseIds":{"type":"array","items":{"type":"string"}},"newReleaseVersions":{"type":"array","items":{"type":"string"}}},"required":["created","updated","newReleaseIds","newReleaseVersions"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/apps/{slug}/urls":{"get":{"operationId":"releaseflow-getUrls","summary":"Get app URLs","description":"Get download and update URLs for an app","tags":["Apps"],"security":[{"apiKey":[]}],"parameters":[{"in":"path","name":"slug","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"download":{"type":"object","properties":{"auto":{"type":"string"},"android":{"type":"string"},"darwin":{"type":"string"},"darwinArm64":{"type":"string"},"windows":{"type":"string"},"linux":{"type":"string"}},"required":["auto"],"additionalProperties":false},"page":{"type":"object","properties":{"stable":{"type":"string"},"beta":{"type":"string"},"alpha":{"type":"string"}},"required":["stable"],"additionalProperties":false},"releases":{"type":"string"},"releasesByChannel":{"type":"object","properties":{"stable":{"type":"string"},"beta":{"type":"string"},"alpha":{"type":"string"}},"required":["stable"],"additionalProperties":false},"sparkle":{"type":"object","properties":{"appcast":{"type":"string"},"appcastBeta":{"type":"string"},"appcastAlpha":{"type":"string"}},"required":["appcast"],"additionalProperties":false},"electron":{"type":"object","properties":{"darwin":{"type":"string"},"darwinBeta":{"type":"string"},"darwinAlpha":{"type":"string"},"windows":{"type":"string"},"windowsBeta":{"type":"string"},"windowsAlpha":{"type":"string"},"linux":{"type":"string"},"linuxBeta":{"type":"string"},"linuxAlpha":{"type":"string"}},"required":["darwin","windows","linux"],"additionalProperties":false}},"required":["download","page","releases","releasesByChannel"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/releases/manual":{"post":{"operationId":"releaseflow-createManualRelease","summary":"Create manual Android release","description":"Create or replace a manual Android APK release from hosted APK URLs or base64 APK uploads.","tags":["Releases"],"security":[{"apiKey":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"appId":{"type":"string"},"version":{"type":"string","minLength":1,"maxLength":80,"pattern":"^[A-Za-z0-9._+-]+$"},"channel":{"default":"STABLE","type":"string","enum":["STABLE","BETA","ALPHA","DEV"]},"notes":{"anyOf":[{"type":"string"},{"type":"null"}]},"changelogUrl":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"publishedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"assets":{"minItems":1,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"downloadUrl":{"type":"string","format":"uri"},"base64":{"description":"Base64-encoded APK bytes, optionally as a data URL.","type":"string","minLength":1},"size":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"contentType":{"default":"application/vnd.android.package-archive","type":"string","minLength":1},"arch":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["name"]}}},"required":["appId","version","assets"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"version":{"type":"string"},"channel":{"type":"string","enum":["STABLE","BETA","ALPHA","DEV"]},"notes":{"anyOf":[{"type":"string"},{"type":"null"}]},"changelogUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"tagName":{"type":"string"},"isPrerelease":{"type":"boolean"},"isEnabled":{"type":"boolean"},"publishedAt":{"type":"string"},"assets":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"platform":{"type":"string","enum":["ANDROID","DARWIN","WINDOWS","LINUX"]},"arch":{"anyOf":[{"type":"string"},{"type":"null"}]},"size":{"type":"number"},"downloadUrl":{"type":"string"}},"required":["id","name","platform","arch","size","downloadUrl"],"additionalProperties":false}}},"required":["id","version","channel","notes","changelogUrl","tagName","isPrerelease","isEnabled","publishedAt","assets"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/releases/manual/uploads":{"post":{"operationId":"releaseflow-createManualReleaseUpload","summary":"Start manual Android upload","description":"Start a chunked manual Android APK upload. Upload chunks, then complete the upload to publish the release.","tags":["Releases"],"security":[{"apiKey":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"appId":{"type":"string"},"version":{"type":"string","minLength":1,"maxLength":80,"pattern":"^[A-Za-z0-9._+-]+$"},"channel":{"default":"STABLE","type":"string","enum":["STABLE","BETA","ALPHA","DEV"]},"notes":{"anyOf":[{"type":"string"},{"type":"null"}]},"changelogUrl":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"publishedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"asset":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"size":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"contentType":{"default":"application/vnd.android.package-archive","type":"string","minLength":1},"arch":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["name","size"]}},"required":["appId","version","asset"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"uploadId":{"type":"string"},"chunkSize":{"type":"number"}},"required":["uploadId","chunkSize"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/releases/manual/uploads/{uploadId}/chunks":{"post":{"operationId":"releaseflow-appendManualReleaseUploadChunk","summary":"Upload Android APK chunk","description":"Append or replace one base64-encoded chunk for a chunked manual Android APK upload.","tags":["Releases"],"security":[{"apiKey":[]}],"parameters":[{"in":"path","name":"uploadId","schema":{"type":"string"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"index":{"type":"integer","minimum":0,"maximum":9007199254740991},"base64":{"type":"string","minLength":1}},"required":["index","base64"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"uploadId":{"type":"string"},"index":{"type":"number"},"receivedSize":{"type":"number"}},"required":["uploadId","index","receivedSize"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/releases/manual/uploads/{uploadId}/complete":{"post":{"operationId":"releaseflow-completeManualReleaseUpload","summary":"Complete manual Android upload","description":"Assemble uploaded APK chunks, store them as a ReleaseFlow-hosted asset, and publish or replace the manual Android release.","tags":["Releases"],"security":[{"apiKey":[]}],"parameters":[{"in":"path","name":"uploadId","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"version":{"type":"string"},"channel":{"type":"string","enum":["STABLE","BETA","ALPHA","DEV"]},"notes":{"anyOf":[{"type":"string"},{"type":"null"}]},"changelogUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"tagName":{"type":"string"},"isPrerelease":{"type":"boolean"},"isEnabled":{"type":"boolean"},"publishedAt":{"type":"string"},"assets":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"platform":{"type":"string","enum":["ANDROID","DARWIN","WINDOWS","LINUX"]},"arch":{"anyOf":[{"type":"string"},{"type":"null"}]},"size":{"type":"number"},"downloadUrl":{"type":"string"}},"required":["id","name","platform","arch","size","downloadUrl"],"additionalProperties":false}}},"required":["id","version","channel","notes","changelogUrl","tagName","isPrerelease","isEnabled","publishedAt","assets"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/releases/{releaseId}":{"patch":{"operationId":"releaseflow-updateRelease","summary":"Update release","description":"Update user-facing release notes, a custom changelog URL, or release availability.","tags":["Releases"],"security":[{"apiKey":[]}],"parameters":[{"in":"path","name":"releaseId","schema":{"type":"string"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"notes":{"anyOf":[{"type":"string"},{"type":"null"}]},"changelogUrl":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"isEnabled":{"type":"boolean"}}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"version":{"type":"string"},"channel":{"type":"string","enum":["STABLE","BETA","ALPHA","DEV"]},"notes":{"anyOf":[{"type":"string"},{"type":"null"}]},"changelogUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"tagName":{"type":"string"},"isPrerelease":{"type":"boolean"},"isEnabled":{"type":"boolean"},"publishedAt":{"type":"string"},"assets":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"platform":{"type":"string","enum":["ANDROID","DARWIN","WINDOWS","LINUX"]},"arch":{"anyOf":[{"type":"string"},{"type":"null"}]},"size":{"type":"number"},"downloadUrl":{"type":"string"}},"required":["id","name","platform","arch","size","downloadUrl"],"additionalProperties":false}}},"required":["id","version","channel","notes","changelogUrl","tagName","isPrerelease","isEnabled","publishedAt","assets"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}},"delete":{"operationId":"releaseflow-deleteRelease","summary":"Delete release","description":"Delete a release from ReleaseFlow only (keeps GitHub release intact). Useful for resyncing.","tags":["Releases"],"security":[{"apiKey":[]}],"parameters":[{"in":"path","name":"releaseId","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"version":{"type":"string"}},"required":["success","version"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/releases/{releaseId}/toggle":{"post":{"operationId":"releaseflow-toggleRelease","summary":"Toggle release","description":"Enable or disable a release for distribution","tags":["Releases"],"security":[{"apiKey":[]}],"parameters":[{"in":"path","name":"releaseId","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"isEnabled":{"type":"boolean"}},"required":["isEnabled"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}}},"components":{"schemas":{"error.BAD_REQUEST":{"type":"object","properties":{"message":{"type":"string","description":"The error message","example":"Invalid input data"},"code":{"type":"string","description":"The error code","example":"BAD_REQUEST"},"issues":{"description":"An array of issues that were responsible for the error","example":[],"type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false,"title":"Invalid input data error (400)","description":"The error information","example":{"code":"BAD_REQUEST","message":"Invalid input data","issues":[]}},"error.UNAUTHORIZED":{"type":"object","properties":{"message":{"type":"string","description":"The error message","example":"Authorization not provided"},"code":{"type":"string","description":"The error code","example":"UNAUTHORIZED"},"issues":{"description":"An array of issues that were responsible for the error","example":[],"type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false,"title":"Authorization not provided error (401)","description":"The error information","example":{"code":"UNAUTHORIZED","message":"Authorization not provided","issues":[]}},"error.FORBIDDEN":{"type":"object","properties":{"message":{"type":"string","description":"The error message","example":"Insufficient access"},"code":{"type":"string","description":"The error code","example":"FORBIDDEN"},"issues":{"description":"An array of issues that were responsible for the error","example":[],"type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false,"title":"Insufficient access error (403)","description":"The error information","example":{"code":"FORBIDDEN","message":"Insufficient access","issues":[]}},"error.NOT_FOUND":{"type":"object","properties":{"message":{"type":"string","description":"The error message","example":"Not found"},"code":{"type":"string","description":"The error code","example":"NOT_FOUND"},"issues":{"description":"An array of issues that were responsible for the error","example":[],"type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false,"title":"Not found error (404)","description":"The error information","example":{"code":"NOT_FOUND","message":"Not found","issues":[]}},"error.INTERNAL_SERVER_ERROR":{"type":"object","properties":{"message":{"type":"string","description":"The error message","example":"Internal server error"},"code":{"type":"string","description":"The error code","example":"INTERNAL_SERVER_ERROR"},"issues":{"description":"An array of issues that were responsible for the error","example":[],"type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false,"title":"Internal server error error (500)","description":"The error information","example":{"code":"INTERNAL_SERVER_ERROR","message":"Internal server error","issues":[]}}},"securitySchemes":{"apiKey":{"type":"apiKey","in":"header","name":"x-api-key","description":"API key for authentication. Get one from Settings > API Keys."}}}}