// Code generated by swaggo/swag. DO NOT EDIT.

package docs

import "github.com/swaggo/swag/v2"

const docTemplate = `{
    "schemes": {{ marshal .Schemes }},"swagger":"2.0","info":{"description":"{{escape .Description}}","title":"{{.Title}}","termsOfService":"http://swagger.io/terms/","contact":{"name":"API Support","url":"http://1backend.com/","email":"sales@singulatron.com"},"license":{"name":"AGPL v3.0","url":"https://www.gnu.org/licenses/agpl-3.0.html"},"version":"{{.Version}}"},"host":"{{.Host}}","basePath":"{{.BasePath}}","paths":{"/chat-svc/events":{"get":{"description":"Events is a dummy endpoint to display documentation about the events that this service emits.","consumes":["application/json"],"produces":["application/json"],"tags":["Chat Svc"],"summary":"Events","operationId":"events","responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/chat_svc.EventThreadUpdate"}}}}},"/chat-svc/message/{messageId}":{"delete":{"security":[{"BearerAuth":[]}],"description":"Delete a specific message from a chat thread by its ID","consumes":["application/json"],"produces":["application/json"],"tags":["Chat Svc"],"summary":"Delete a Message","operationId":"deleteMessage","parameters":[{"type":"string","description":"Message ID","name":"messageId","in":"path","required":true}],"responses":{"200":{"description":"Message successfully deleted","schema":{"type":"object","additionalProperties":true}},"400":{"description":"Invalid JSON","schema":{"type":"string"}},"401":{"description":"Unauthorized","schema":{"type":"string"}},"500":{"description":"Internal Server Error","schema":{"type":"string"}}}}},"/chat-svc/messages":{"post":{"security":[{"BearerAuth":[]}],"description":"Fetch messages (and associated assets) for a specific chat thread.","consumes":["application/json"],"produces":["application/json"],"tags":["Chat Svc"],"summary":"List Messages","operationId":"listMessages","parameters":[{"description":"List Messages Request","name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/chat_svc.ListMessagesRequest"}}],"responses":{"200":{"description":"Messages and assets successfully retrieved","schema":{"$ref":"#/definitions/chat_svc.ListMessagesResponse"}},"400":{"description":"Invalid JSON","schema":{"type":"string"}},"401":{"description":"unauthorized","schema":{"type":"string"}},"500":{"description":"internal server error","schema":{"type":"string"}}}}},"/chat-svc/thread":{"post":{"security":[{"BearerAuth":[]}],"description":"Create or update a chat thread.\nRequires the ` + "`" + `chat-svc:thread:edit` + "`" + ` permission.","consumes":["application/json"],"produces":["application/json"],"tags":["Chat Svc"],"summary":"Save Thread","operationId":"saveThread","parameters":[{"description":"Save Thread Request","name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/chat_svc.SaveThreadRequest"}}],"responses":{"200":{"description":"Thread successfully created","schema":{"$ref":"#/definitions/chat_svc.SaveThreadResponse"}},"400":{"description":"Invalid JSON","schema":{"type":"string"}},"401":{"description":"Unauthorized","schema":{"type":"string"}},"500":{"description":"Internal Server Error","schema":{"type":"string"}}}}},"/chat-svc/thread/{threadId}":{"delete":{"security":[{"BearerAuth":[]}],"description":"Delete a specific chat thread by its ID","consumes":["application/json"],"produces":["application/json"],"tags":["Chat Svc"],"summary":"Delete a Thread","operationId":"deleteThread","parameters":[{"type":"string","description":"Thread ID","name":"threadId","in":"path","required":true}],"responses":{"200":{"description":"Thread successfully deleted","schema":{"type":"object","additionalProperties":true}},"400":{"description":"Invalid JSON","schema":{"type":"string"}},"401":{"description":"Unauthorized","schema":{"type":"string"}},"500":{"description":"Internal Server Error","schema":{"type":"string"}}}}},"/chat-svc/thread/{threadId}/message":{"post":{"security":[{"BearerAuth":[]}],"description":"Save a new message to a specific thread.","consumes":["application/json"],"produces":["application/json"],"tags":["Chat Svc"],"summary":"Save Message","operationId":"saveMessage","parameters":[{"type":"string","description":"Thread ID","name":"threadId","in":"path","required":true},{"description":"Save Message Request","name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/chat_svc.SaveMessageRequest"}}],"responses":{"200":{"description":"Message successfully added","schema":{"type":"object","additionalProperties":true}},"400":{"description":"Invalid JSON","schema":{"type":"string"}},"401":{"description":"Unauthorized","schema":{"type":"string"}},"500":{"description":"Internal Server Error","schema":{"type":"string"}}}}},"/chat-svc/threads":{"post":{"security":[{"BearerAuth":[]}],"description":"Fetch all chat threads associated with a specific user","consumes":["application/json"],"produces":["application/json"],"tags":["Chat Svc"],"summary":"List Threads","operationId":"listThreads","parameters":[{"description":"List Threads Request","name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/chat_svc.ListThreadsRequest"}}],"responses":{"200":{"description":"Threads successfully retrieved","schema":{"$ref":"#/definitions/chat_svc.ListThreadsResponse"}},"400":{"description":"Invalid JSON","schema":{"type":"string"}},"401":{"description":"Unauthorized","schema":{"type":"string"}},"500":{"description":"Internal Server Error","schema":{"type":"string"}}}}},"/config-svc/config":{"put":{"security":[{"BearerAuth":[]}],"description":"Save the provided configuration to the server.\nThe app from the caller's token is used to determine which app the config belongs to.\nThe caller's camelCased slug (e.g., \"test-user-slug\" becomes \"testUserSlug\") is used as the config key automatically,\nexcept for users who have the \"config-svc:config:edit-on-behalf\" permission (admins), who can specify any key they want.\nAdmins (users with the \"config-svc:config:edit-on-behalf\" permission) can also provide an \"app\" field in the request body to specify which app the config belongs to, while\nnon-admin users cannot specify the \"app\" field, the app associated with their token will be used.\n\nThe save performs a deep merge, that is:\n- Nested objects are recursively merged rather than replaced.\n- If a field exists in both the existing and the incoming config and both values are objects, their contents are merged.\n- If a field exists in both but one or both values are not objects (e.g., string, number, array), the incoming value replaces the existing one.\n- Fields present only in the incoming config are added.\n- Fields present only in the existing config are preserved.\n- Top-level and nested merges follow the same rules.","consumes":["application/json"],"produces":["application/json"],"tags":["Config Svc"],"summary":"Save Config","operationId":"saveConfig","parameters":[{"description":"Save Config Request","name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/config_svc.SaveConfigRequest"}}],"responses":{"200":{"description":"Save Config Response","schema":{"$ref":"#/definitions/config_svc.SaveConfigResponse"}},"401":{"description":"Unauthorized","schema":{"type":"string"}},"500":{"description":"Internal Server Error","schema":{"type":"string"}}}}},"/config-svc/configs":{"post":{"description":"Retrieves the current configurations for a specified app.\nSince any user can save configurations, it is strongly advised that you supply a list of\nowners to filter on.\nIf no app is specified, the default \"unnamed\" app is used.\nThis is a public endpoint and does not require authentication.\nConfiguration data is non-sensitive. For sensitive data, refer to the Secret Service.\n\nConfigurations are used to control frontend behavior, A/B testing, feature flags, and other non-sensitive settings.","consumes":["application/json"],"produces":["application/json"],"tags":["Config Svc"],"summary":"List Configs","operationId":"listConfigs","parameters":[{"description":"List Configs Request","name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/config_svc.ListConfigsRequest"}}],"responses":{"200":{"description":"Current configuration","schema":{"$ref":"#/definitions/config_svc.ListConfigsResponse"}},"401":{"description":"Unauthorized","schema":{"type":"string"}},"500":{"description":"Internal Server Error","schema":{"type":"string"}}}}},"/container-svc/container":{"put":{"security":[{"BearerAuth":[]}],"description":"Runs a Docker container with the specified parameters.\n\nRequires the ` + "`" + `container-svc:container:run` + "`" + ` permission.","consumes":["application/json"],"produces":["application/json"],"tags":["Container Svc"],"summary":"Run a Container","operationId":"runContainer","parameters":[{"description":"Run Container Request","name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/container_svc.RunContainerRequest"}}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/container_svc.RunContainerResponse"}},"400":{"description":"Invalid JSON","schema":{"$ref":"#/definitions/container_svc.ErrorResponse"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/container_svc.ErrorResponse"}},"500":{"description":"Internal Server Error","schema":{"$ref":"#/definitions/container_svc.ErrorResponse"}}}}},"/container-svc/container/is-running":{"get":{"security":[{"BearerAuth":[]}],"description":"Check if a Docker container is running, identified by hash or name.","consumes":["application/json"],"produces":["application/json"],"tags":["Container Svc"],"summary":"Check If a Container Is Running","operationId":"containerIsRunning","parameters":[{"type":"string","description":"Container Hash","name":"hash","in":"query"},{"type":"string","description":"Container Name","name":"name","in":"query"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/container_svc.ContainerIsRunningResponse"}},"400":{"description":"missing parameters","schema":{"$ref":"#/definitions/container_svc.ErrorResponse"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/container_svc.ErrorResponse"}},"500":{"description":"Internal Server Error","schema":{"$ref":"#/definitions/container_svc.ErrorResponse"}}}}},"/container-svc/container/stop":{"put":{"security":[{"BearerAuth":[]}],"description":"Stops a Docker container with the specified parameters.\n\nRequires the ` + "`" + `container-svc:container:stop` + "`" + ` permission.","consumes":["application/json"],"produces":["application/json"],"tags":["Container Svc"],"summary":"Stop a Container","operationId":"stopContainer","parameters":[{"description":"Stop Container Request","name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/container_svc.StopContainerRequest"}}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/container_svc.StopContainerResponse"}},"400":{"description":"Invalid JSON","schema":{"$ref":"#/definitions/container_svc.ErrorResponse"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/container_svc.ErrorResponse"}},"500":{"description":"Internal Server Error","schema":{"$ref":"#/definitions/container_svc.ErrorResponse"}}}}},"/container-svc/container/summary":{"get":{"security":[{"BearerAuth":[]}],"description":"Get a summary of the Docker container identified by hash or name, limited to a specified number of lines.","consumes":["application/json"],"produces":["application/json"],"tags":["Container Svc"],"summary":"Get Container Summary","operationId":"containerSummary","parameters":[{"type":"string","description":"Container Hash","name":"hash","in":"query"},{"type":"string","description":"Container Name","name":"name","in":"query"},{"type":"integer","description":"Number of Lines","name":"lines","in":"query"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/container_svc.GetContainerSummaryResponse"}},"400":{"description":"missing parameters","schema":{"$ref":"#/definitions/container_svc.ErrorResponse"}},"401":{"description":"unauthorized","schema":{"$ref":"#/definitions/container_svc.ErrorResponse"}},"500":{"description":"internal server error","schema":{"$ref":"#/definitions/container_svc.ErrorResponse"}}}}},"/container-svc/containers":{"post":{"security":[{"BearerAuth":[]}],"description":"List containers.\n\nRequires the ` + "`" + `container-svc:container:view` + "`" + ` permission.","consumes":["application/json"],"produces":["application/json"],"tags":["Container Svc"],"summary":"List Containers","operationId":"listContainers","parameters":[{"description":"List Containers Request","name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/container_svc.ListContainersRequest"}}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/container_svc.ListContainersResponse"}},"400":{"description":"Invalid JSON","schema":{"$ref":"#/definitions/container_svc.ErrorResponse"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/container_svc.ErrorResponse"}},"500":{"description":"Internal Server Error","schema":{"$ref":"#/definitions/container_svc.ErrorResponse"}}}}},"/container-svc/daemon/info":{"get":{"security":[{"BearerAuth":[]}],"description":"Retrieve detailed information about the availability and status of container daemons on the node.","consumes":["application/json"],"produces":["application/json"],"tags":["Container Svc"],"summary":"Get Container Daemon Information","operationId":"containerDaemonInfo","responses":{"200":{"description":"Service Information","schema":{"$ref":"#/definitions/container_svc.DaemonInfoResponse"}},"401":{"description":"unauthorized","schema":{"$ref":"#/definitions/container_svc.ErrorResponse"}},"500":{"description":"internal server error","schema":{"$ref":"#/definitions/container_svc.ErrorResponse"}}}}},"/container-svc/host":{"get":{"security":[{"BearerAuth":[]}],"description":"Retrieve information about the Container host","consumes":["application/json"],"produces":["application/json"],"tags":["Container Svc"],"summary":"Get Container Host","operationId":"getHost","responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/container_svc.GetHostResponse"}},"401":{"description":"unauthorized","schema":{"$ref":"#/definitions/container_svc.ErrorResponse"}},"500":{"description":"internal server error","schema":{"$ref":"#/definitions/container_svc.ErrorResponse"}}}}},"/container-svc/image":{"put":{"security":[{"BearerAuth":[]}],"description":"Builds a Docker image with the specified parameters.\n\nRequires the ` + "`" + `container-svc:image:build` + "`" + ` permission.","consumes":["application/json"],"produces":["application/json"],"tags":["Container Svc"],"summary":"Build an Image","operationId":"buildImage","parameters":[{"description":"Build Image Request","name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/container_svc.BuildImageRequest"}}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/container_svc.BuildImageResponse"}},"400":{"description":"Invalid JSON","schema":{"$ref":"#/definitions/container_svc.ErrorResponse"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/container_svc.ErrorResponse"}},"500":{"description":"Internal Server Error","schema":{"$ref":"#/definitions/container_svc.ErrorResponse"}}}}},"/container-svc/image/{imageName}/pullable":{"get":{"security":[{"BearerAuth":[]}],"description":"Check if an image exists on in the container registry and is pullable.","consumes":["application/json"],"produces":["application/json"],"tags":["Container Svc"],"summary":"Check if Container Image is Pullable","operationId":"imagePullable","parameters":[{"type":"string","description":"Image name","name":"imageName","in":"path","required":true}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/container_svc.ImagePullableResponse"}},"400":{"description":"model ID in path is not URL encoded","schema":{"$ref":"#/definitions/container_svc.ErrorResponse"}},"401":{"description":"unauthorized","schema":{"$ref":"#/definitions/container_svc.ErrorResponse"}},"500":{"description":"internal server error","schema":{"$ref":"#/definitions/container_svc.ErrorResponse"}}}}},"/container-svc/logs":{"post":{"security":[{"BearerAuth":[]}],"description":"List Container logs.\n\nRequires the ` + "`" + `container-svc:log:view` + "`" + ` permission.","consumes":["application/json"],"produces":["application/json"],"tags":["Container Svc"],"summary":"List Logs","operationId":"listContainerLogs","parameters":[{"description":"List Logs Request","name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/container_svc.ListLogsRequest"}}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/container_svc.ListLogsResponse"}},"400":{"description":"Invalid JSON","schema":{"$ref":"#/definitions/container_svc.ErrorResponse"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/container_svc.ErrorResponse"}},"500":{"description":"Internal Server Error","schema":{"$ref":"#/definitions/container_svc.ErrorResponse"}}}}},"/data-svc/object":{"post":{"security":[{"BearerAuth":[]}],"description":"Creates a new object with the provided details. Requires authorization and user authentication.","consumes":["application/json"],"produces":["application/json"],"tags":["Data Svc"],"summary":"Create a Generic Object","operationId":"createObject","parameters":[{"description":"Create request payload","name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/data_svc.CreateObjectRequest"}}],"responses":{"200":{"description":"Success","schema":{"$ref":"#/definitions/data_svc.CreateObjectResponse"}},"400":{"description":"Invalid JSON","schema":{"$ref":"#/definitions/data_svc.ErrorResponse"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/data_svc.ErrorResponse"}},"500":{"description":"Internal Server Error","schema":{"$ref":"#/definitions/data_svc.ErrorResponse"}}}}},"/data-svc/object/{objectId}":{"put":{"security":[{"BearerAuth":[]}],"description":"Creates a new dynamic object or updates an existing one based on the provided data. Requires authorization and user authentication.","consumes":["application/json"],"produces":["application/json"],"tags":["Data Svc"],"summary":"Upsert a Generic Object","operationId":"upsertObject","parameters":[{"type":"string","description":"Object ID","name":"objectId","in":"path","required":true},{"description":"Upsert request payload","name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/data_svc.UpsertObjectRequest"}}],"responses":{"200":{"description":"Successful creation or update of object","schema":{"$ref":"#/definitions/data_svc.UpsertObjectResponse"}},"400":{"description":"Invalid JSON","schema":{"$ref":"#/definitions/data_svc.ErrorResponse"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/data_svc.ErrorResponse"}},"500":{"description":"Internal Server Error","schema":{"$ref":"#/definitions/data_svc.ErrorResponse"}}}}},"/data-svc/objects":{"post":{"security":[{"BearerAuth":[]}],"description":"Retrieves objects from a specified table based on search criteria.\nRequires authorization and user authentication.\n\n\nUse helper functions in your respective client library such as condition constructors (` + "`" + `equal` + "`" + `, ` + "`" + `contains` + "`" + `, ` + "`" + `startsWith` + "`" + `) and field selectors (` + "`" + `field` + "`" + `, ` + "`" + `fields` + "`" + `, ` + "`" + `id` + "`" + `) for easier access.","consumes":["application/json"],"produces":["application/json"],"tags":["Data Svc"],"summary":"Query Objects","operationId":"queryObjects","parameters":[{"description":"Query Request","name":"body","in":"body","schema":{"$ref":"#/definitions/data_svc.QueryRequest"}}],"responses":{"200":{"description":"Successful retrieval of objects","schema":{"$ref":"#/definitions/data_svc.QueryResponse"}},"400":{"description":"Invalid JSON","schema":{"$ref":"#/definitions/data_svc.ErrorResponse"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/data_svc.ErrorResponse"}},"500":{"description":"Internal Server Error","schema":{"$ref":"#/definitions/data_svc.ErrorResponse"}}}}},"/data-svc/objects/delete":{"post":{"security":[{"BearerAuth":[]}],"description":"Deletes all objects matchin the provided filters.","consumes":["application/json"],"produces":["application/json"],"tags":["Data Svc"],"summary":"Delete Objects","operationId":"deleteObjects","parameters":[{"description":"Delete request payload","name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/data_svc.DeleteObjectRequest"}}],"responses":{"200":{"description":"Successful deletion of object","schema":{"$ref":"#/definitions/data_svc.DeleteObjectResponse"}},"400":{"description":"Invalid JSON","schema":{"$ref":"#/definitions/data_svc.ErrorResponse"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/data_svc.ErrorResponse"}},"500":{"description":"Internal Server Error","schema":{"$ref":"#/definitions/data_svc.ErrorResponse"}}}}},"/data-svc/objects/update":{"post":{"security":[{"BearerAuth":[]}],"description":"Update fields of objects that match the given filters using the provided object.\nAny fields not included in the incoming object will remain unchanged.","consumes":["application/json"],"produces":["application/json"],"tags":["Data Svc"],"summary":"Update Objects","operationId":"updateObjects","parameters":[{"description":"Update request payload","name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/data_svc.UpdateObjectsRequest"}}],"responses":{"200":{"description":"Successful update of objects","schema":{"$ref":"#/definitions/data_svc.UpdateObjectsResponse"}},"400":{"description":"Invalid JSON","schema":{"$ref":"#/definitions/data_svc.ErrorResponse"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/data_svc.ErrorResponse"}},"500":{"description":"Internal Server Error","schema":{"$ref":"#/definitions/data_svc.ErrorResponse"}}}}},"/data-svc/objects/upsert":{"put":{"security":[{"BearerAuth":[]}],"description":"Upserts objects by ids.","consumes":["application/json"],"produces":["application/json"],"tags":["Data Svc"],"summary":"Upsert Objects","operationId":"upsertObjects","parameters":[{"description":"Upsert request payload","name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/data_svc.UpsertObjectRequest"}}],"responses":{"200":{"description":"Successful upsert of objects","schema":{"$ref":"#/definitions/data_svc.UpsertObjectResponse"}},"400":{"description":"Invalid JSON","schema":{"$ref":"#/definitions/data_svc.ErrorResponse"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/data_svc.ErrorResponse"}},"500":{"description":"Internal Server Error","schema":{"$ref":"#/definitions/data_svc.ErrorResponse"}}}}},"/deploy-svc/deployment":{"put":{"security":[{"BearerAuth":[]}],"description":"Save a deployment.","consumes":["application/json"],"produces":["application/json"],"tags":["Deploy Svc"],"summary":"Save Deployment","operationId":"saveDeployment","parameters":[{"description":"Save Deploys Request","name":"body","in":"body","schema":{"$ref":"#/definitions/deploy_svc.SaveDeploymentRequest"}}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/deploy_svc.SaveDeploymentResponse"}},"400":{"description":"Invalid JSON","schema":{"$ref":"#/definitions/deploy_svc.ErrorResponse"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/deploy_svc.ErrorResponse"}},"500":{"description":"Internal Server Error","schema":{"$ref":"#/definitions/deploy_svc.ErrorResponse"}}}},"delete":{"security":[{"BearerAuth":[]}],"description":"Delete a deployment.","consumes":["application/json"],"produces":["application/json"],"tags":["Deploy Svc"],"summary":"Delete Deployment","operationId":"deleteDeployment","parameters":[{"description":"Delete Deploys Request","name":"body","in":"body","schema":{"$ref":"#/definitions/deploy_svc.DeleteDeploymentRequest"}}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/deploy_svc.DeleteDeploymentResponse"}},"400":{"description":"Invalid JSON","schema":{"$ref":"#/definitions/deploy_svc.ErrorResponse"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/deploy_svc.ErrorResponse"}},"500":{"description":"Internal Server Error","schema":{"$ref":"#/definitions/deploy_svc.ErrorResponse"}}}}},"/deploy-svc/deployments":{"post":{"security":[{"BearerAuth":[]}],"description":"Retrieve a list of deployments.","consumes":["application/json"],"produces":["application/json"],"tags":["Deploy Svc"],"summary":"List Deployments","operationId":"listDeployments","parameters":[{"description":"List Deploys Request","name":"body","in":"body","schema":{"$ref":"#/definitions/deploy_svc.ListDeploymentsRequest"}}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/deploy_svc.ListDeploymentsResponse"}},"400":{"description":"Invalid JSON","schema":{"$ref":"#/definitions/deploy_svc.ErrorResponse"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/deploy_svc.ErrorResponse"}},"500":{"description":"Internal Server Error","schema":{"$ref":"#/definitions/deploy_svc.ErrorResponse"}}}}},"/email-svc/email":{"post":{"security":[{"BearerAuth":[]}],"description":"Sends an email with optional attachments via a supported email provider.\n\nCurrently, only SendGrid is supported. Additional providers may be added in the future.\n\nRequired secrets from the Secret Svc for SendGrid:\n- ` + "`" + `sender-email` + "`" + `: Sender's email address.\n- ` + "`" + `sender-name` + "`" + `: Sender's display name.\n- ` + "`" + `sendgrid-api-key` + "`" + `: API key for SendGrid.","consumes":["application/json"],"produces":["application/json"],"tags":["Email Svc"],"summary":"Send an Email","operationId":"sendEmail","parameters":[{"description":"Send Email Request","name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/email_svc.SendEmailRequest"}}],"responses":{"200":{"description":"Successfully sent the email","schema":{"$ref":"#/definitions/email_svc.SendEmailResponse"}},"400":{"description":"Invalid JSON","schema":{"$ref":"#/definitions/email_svc.ErrorResponse"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/email_svc.ErrorResponse"}},"500":{"description":"Internal Server Error","schema":{"$ref":"#/definitions/email_svc.ErrorResponse"}}}}},"/file-svc/download":{"put":{"security":[{"BearerAuth":[]}],"description":"Start or resume the download for a specified URL.\n\nRequires the ` + "`" + `file-svc:download:create` + "`" + ` permission.","consumes":["application/json"],"produces":["application/json"],"tags":["File Svc"],"summary":"Download a File","operationId":"downloadFile","parameters":[{"description":"Download Request","name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/file_svc.DownloadFileRequest"}}],"responses":{"200":{"description":"Download initiated successfully","schema":{"type":"object","additionalProperties":true}},"400":{"description":"Invalid JSON","schema":{"$ref":"#/definitions/file_svc.ErrorResponse"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/file_svc.ErrorResponse"}},"500":{"description":"Failed to download file","schema":{"$ref":"#/definitions/file_svc.ErrorResponse"}}}}},"/file-svc/download/{url}":{"get":{"security":[{"BearerAuth":[]}],"description":"Get a download by URL.\n\nRequires the ` + "`" + `file-svc:download:view` + "`" + ` permission.","consumes":["application/json"],"produces":["application/json"],"tags":["File Svc"],"summary":"Get a Download","operationId":"getDownload","parameters":[{"type":"string","description":"url","name":"url","in":"path","required":true}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/file_svc.GetDownloadResponse"}},"400":{"description":"Invalid URL","schema":{"type":"string"}},"401":{"description":"Unauthorized","schema":{"type":"string"}},"500":{"description":"Internal Server Error","schema":{"type":"string"}}}}},"/file-svc/download/{url}/pause":{"put":{"security":[{"BearerAuth":[]}],"description":"Pause a download that is currently in progress.\n\nRequires the ` + "`" + `file-svc:download:edit` + "`" + ` permission.","consumes":["application/json"],"produces":["application/json"],"tags":["File Svc"],"summary":"Pause a Download","operationId":"pauseDownload","parameters":[{"type":"string","description":"Download URL","name":"url","in":"path","required":true}],"responses":{"200":{"description":"Success response","schema":{"type":"object","additionalProperties":true}},"400":{"description":"Download ID in path is not URL encoded","schema":{"type":"string"}},"401":{"description":"Unauthorized","schema":{"type":"string"}},"500":{"description":"Internal Server Error","schema":{"type":"string"}}}}},"/file-svc/downloads":{"post":{"security":[{"BearerAuth":[]}],"description":"List download details.\n\nRequires the ` + "`" + `file-svc:download:view` + "`" + ` permission.","consumes":["application/json"],"produces":["application/json"],"tags":["File Svc"],"summary":"List Downloads","operationId":"listDownloads","responses":{"200":{"description":"List of downloads","schema":{"$ref":"#/definitions/file_svc.DownloadsResponse"}},"401":{"description":"Unauthorized","schema":{"type":"string"}},"500":{"description":"Internal Server Error","schema":{"type":"string"}}}}},"/file-svc/serve/download/{url}":{"get":{"description":"Serves a previously downloaded file based on its URL.","produces":["application/octet-stream"],"tags":["File Svc"],"summary":"Serve a Downloaded file","operationId":"serveDownload","parameters":[{"type":"string","description":"URL of the file. Even after downloading, the file is still referenced by its original internet URL.","name":"url","in":"path","required":true}],"responses":{"200":{"description":"File served successfully","schema":{"type":"file"}},"400":{"description":"Error Parsing Download URL","schema":{"$ref":"#/definitions/file_svc.ErrorResponse"}},"404":{"description":"File Not Found","schema":{"$ref":"#/definitions/file_svc.ErrorResponse"}},"500":{"description":"Internal Server Error","schema":{"$ref":"#/definitions/file_svc.ErrorResponse"}}}}},"/file-svc/serve/upload/{fileId}":{"get":{"description":"Retrieves and serves a previously uploaded file using its File ID.\nNote: The ` + "`" + `ID` + "`" + ` and ` + "`" + `FileID` + "`" + ` fields of an upload are different.\n- ` + "`" + `FileID` + "`" + ` is a unique identifier for the file itself.\n- ` + "`" + `ID` + "`" + ` is a unique identifier for a specific replica of the file.\nSince 1Backend is a distributed system, files can be replicated across multiple nodes.\nThis means each uploaded file may have multiple records with the same ` + "`" + `FileID` + "`" + ` but different ` + "`" + `ID` + "`" + `s.","consumes":["application/json"],"produces":["application/octet-stream"],"tags":["File Svc"],"summary":"Serve an Uploaded File","operationId":"serveUpload","parameters":[{"type":"string","description":"FileID uniquely identifies the file itself (not an ID, which represents a specific replica)","name":"fileId","in":"path","required":true}],"responses":{"200":{"description":"File served successfully","schema":{"type":"file"}},"400":{"description":"Missing Upload ID","schema":{"$ref":"#/definitions/file_svc.ErrorResponse"}},"404":{"description":"File Not Found","schema":{"$ref":"#/definitions/file_svc.ErrorResponse"}},"500":{"description":"Internal Server Error","schema":{"$ref":"#/definitions/file_svc.ErrorResponse"}}}}},"/file-svc/upload":{"put":{"security":[{"BearerAuth":[]}],"description":"Uploads a file to the server.\nCurrently if using the clients only one file can be uploaded at a time due to this bug https://github.com/OpenAPITools/openapi-generator/issues/11341\nOnce that is fixed we should have an ` + "`" + `PUT /file-svc/uploads` + "`" + `/uploadFiles (note the plural) endpoints.\nIn reality the endpoint \"unofficially\" supports multiple files. YMMV.\n\nRequires the ` + "`" + `file-svc:upload:create` + "`" + ` permission.","consumes":["multipart/form-data"],"produces":["application/json"],"tags":["File Svc"],"summary":"Upload a File","operationId":"uploadFile","parameters":[{"type":"file","description":"File to upload","name":"file","in":"formData","required":true}],"responses":{"200":{"description":"File uploaded successfully","schema":{"$ref":"#/definitions/file_svc.UploadFileResponse"}},"400":{"description":"invalid request","schema":{"$ref":"#/definitions/file_svc.ErrorResponse"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/file_svc.ErrorResponse"}},"500":{"description":"Internal Server Error","schema":{"$ref":"#/definitions/file_svc.ErrorResponse"}}}}},"/file-svc/uploads":{"post":{"security":[{"BearerAuth":[]}],"description":"Lists uploaded files, returning only metadata about each upload.\nTo retrieve file content, use the ` + "`" + `Serve an Uploaded File` + "`" + ` endpoint, which serves a single file per request.\nNote: Retrieving the contents of multiple files in a single request is not supported currently.\n\nRequires the ` + "`" + `file-svc:upload:view` + "`" + ` permission.","consumes":["application/json"],"produces":["application/json"],"tags":["File Svc"],"summary":"List Uploads","operationId":"listUploads","parameters":[{"description":"List Uploads Request","name":"body","in":"body","schema":{"$ref":"#/definitions/file_svc.ListUploadsRequest"}}],"responses":{"200":{"description":"List of uploads","schema":{"$ref":"#/definitions/file_svc.ListUploadsResponse"}},"401":{"description":"Unauthorized","schema":{"type":"string"}},"500":{"description":"Internal Server Error","schema":{"type":"string"}}}}},"/firehose-svc/event":{"post":{"security":[{"BearerAuth":[]}],"description":"Publishes an event to the firehose service after authorization check","consumes":["application/json"],"produces":["application/json"],"tags":["Firehose Svc"],"summary":"Publish an Event","operationId":"publishEvent","parameters":[{"description":"Event to publish","name":"event","in":"body","required":true,"schema":{"$ref":"#/definitions/firehose_svc.EventPublishRequest"}}],"responses":{"200":{"description":"{}"},"400":{"description":"Invalid JSON","schema":{"$ref":"#/definitions/firehose_svc.ErrorResponse"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/firehose_svc.ErrorResponse"}}}}},"/firehose-svc/events/subscribe":{"get":{"security":[{"BearerAuth":[]}],"description":"Establish a subscription to the firehose events and accept a real time stream of them.","consumes":["application/json"],"produces":["text/event-stream"],"tags":["Firehose Svc"],"summary":"Subscribe to the Event Stream","operationId":"subscribeToEvents","responses":{"200":{"description":"Event data","schema":{"type":"string"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/firehose_svc.ErrorResponse"}},"500":{"description":"Internal Server Error","schema":{"$ref":"#/definitions/firehose_svc.ErrorResponse"}}}}},"/image-svc/serve/upload/{fileId}":{"get":{"description":"Retrieves and serves a previously uploaded image file using its File ID.","consumes":["application/json"],"produces":["application/octet-stream"],"tags":["Image Svc"],"summary":"Serve Uploaded Image","operationId":"serveUploadedImage","parameters":[{"type":"string","description":"FileID uniquely identifies the file itself (not an ID, which represents a specific replica)","name":"fileId","in":"path","required":true},{"type":"integer","description":"Optional width to resize the image to","name":"width","in":"query"},{"type":"integer","description":"Optional height to resize the image to","name":"height","in":"query"}],"responses":{"200":{"description":"File served successfully","schema":{"type":"file"}},"400":{"description":"Missing File ID","schema":{"$ref":"#/definitions/image_svc.ErrorResponse"}},"404":{"description":"File Not Found","schema":{"$ref":"#/definitions/image_svc.ErrorResponse"}},"500":{"description":"Internal Server Error","schema":{"$ref":"#/definitions/image_svc.ErrorResponse"}}}}},"/model-svc/default-model/start":{"put":{"security":[{"BearerAuth":[]}],"description":"Starts The Default Model.\n\nRequires the ` + "`" + `model-svc:model:create` + "`" + ` permission.","consumes":["application/json"],"produces":["application/json"],"tags":["Model Svc"],"summary":"Start the Default Model","operationId":"startDefaultModel","responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/model_svc.StartResponse"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/model_svc.ErrorResponse"}},"500":{"description":"Internal Server Error","schema":{"$ref":"#/definitions/model_svc.ErrorResponse"}}}}},"/model-svc/default-model/status":{"get":{"security":[{"BearerAuth":[]}],"description":"Retrieves the status of the default model.\n\nRequires the ` + "`" + `model-svc:model:view` + "`" + ` permission.","consumes":["application/json"],"produces":["application/json"],"tags":["Model Svc"],"summary":"Get Default Model Status","operationId":"getDefaultModelStatus","responses":{"200":{"description":"Model status retrieved successfully","schema":{"$ref":"#/definitions/model_svc.StatusResponse"}},"401":{"description":"Unauthorized","schema":{"type":"string"}},"500":{"description":"Internal Server Error","schema":{"type":"string"}}}}},"/model-svc/model/{modelId}":{"get":{"security":[{"BearerAuth":[]}],"description":"Retrieves the details of a model by its ID.\n\nthe Requires ` + "`" + `model.view` + "`" + ` permission.","consumes":["application/json"],"produces":["application/json"],"tags":["Model Svc"],"summary":"Get a Model","operationId":"getModel","parameters":[{"type":"string","description":"Model ID","name":"modelId","in":"path","required":true}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/model_svc.GetModelResponse"}},"400":{"description":"Invalid Model ID","schema":{"$ref":"#/definitions/model_svc.ErrorResponse"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/model_svc.ErrorResponse"}},"404":{"description":"Model Not Found","schema":{"$ref":"#/definitions/model_svc.ErrorResponse"}},"500":{"description":"Internal Server Error","schema":{"$ref":"#/definitions/model_svc.ErrorResponse"}}}}},"/model-svc/model/{modelId}/make-default":{"put":{"security":[{"BearerAuth":[]}],"description":"Sets a model as the default model — when prompts are sent without a Model ID, the default model is used.","consumes":["application/json"],"produces":["application/json"],"tags":["Model Svc"],"summary":"Make a Model Default","operationId":"makeDefault","parameters":[{"type":"string","description":"Model ID","name":"modelId","in":"path","required":true}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/model_svc.MakeDefaultResponse"}},"400":{"description":"Invalid Model ID","schema":{"$ref":"#/definitions/model_svc.ErrorResponse"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/model_svc.ErrorResponse"}},"500":{"description":"Internal Server Error","schema":{"$ref":"#/definitions/model_svc.ErrorResponse"}}}}},"/model-svc/model/{modelId}/start":{"put":{"security":[{"BearerAuth":[]}],"description":"Starts a model by ID","consumes":["application/json"],"produces":["application/json"],"tags":["Model Svc"],"summary":"Start a Model","operationId":"startModel","parameters":[{"type":"string","description":"Model ID","name":"modelId","in":"path","required":true}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/model_svc.StartResponse"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/model_svc.ErrorResponse"}},"500":{"description":"Internal Server Error","schema":{"$ref":"#/definitions/model_svc.ErrorResponse"}}}}},"/model-svc/model/{modelId}/status":{"get":{"security":[{"BearerAuth":[]}],"description":"Retrieves the status of a model by ID.\n\nRequires the ` + "`" + `model-svc:model:view` + "`" + ` permission.","consumes":["application/json"],"produces":["application/json"],"tags":["Model Svc"],"summary":"Get Model Status","operationId":"getModelStatus","parameters":[{"type":"string","description":"Model ID","name":"modelId","in":"path","required":true}],"responses":{"200":{"description":"Model status retrieved successfully","schema":{"$ref":"#/definitions/model_svc.StatusResponse"}},"401":{"description":"Unauthorized","schema":{"type":"string"}},"500":{"description":"Internal Server Error","schema":{"type":"string"}}}}},"/model-svc/models":{"post":{"security":[{"BearerAuth":[]}],"description":"Retrieves a list of models.\n\nRequires ` + "`" + `model-svc:model:view` + "`" + ` permission.","consumes":["application/json"],"produces":["application/json"],"tags":["Model Svc"],"summary":"List Models","operationId":"listModels","responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/model_svc.ListModelsResponse"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/model_svc.ErrorResponse"}},"500":{"description":"Internal Server Error","schema":{"$ref":"#/definitions/model_svc.ErrorResponse"}}}}},"/model-svc/platforms":{"post":{"security":[{"BearerAuth":[]}],"description":"Retrieves a list of AI platforms. Eg. LlamaCpp, StableDiffusion etc.\n\nRequires ` + "`" + `model-svc:platform:view` + "`" + ` permission.","consumes":["application/json"],"produces":["application/json"],"tags":["Model Svc"],"summary":"List Platforms","operationId":"listPlatforms","responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/model_svc.ListPlatformsResponse"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/model_svc.ErrorResponse"}},"500":{"description":"Internal Server Error","schema":{"$ref":"#/definitions/model_svc.ErrorResponse"}}}}},"/policy-svc/check":{"post":{"security":[{"BearerAuth":[]}],"description":"Check records a resource access and returns if the access is allowed.","consumes":["application/json"],"produces":["application/json"],"tags":["Policy Svc"],"summary":"Check","operationId":"check","parameters":[{"description":"Check Request","name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/policy_svc.CheckRequest"}}],"responses":{"200":{"description":"Checked successfully","schema":{"$ref":"#/definitions/policy_svc.CheckResponse"}},"400":{"description":"Invalid JSON","schema":{"$ref":"#/definitions/policy_svc.ErrorResponse"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/policy_svc.ErrorResponse"}},"500":{"description":"Internal Server Error","schema":{"$ref":"#/definitions/policy_svc.ErrorResponse"}}}}},"/policy-svc/instance/{instanceId}":{"put":{"security":[{"BearerAuth":[]}],"description":"Allows user to upsert a new policy instance based on a template.","consumes":["application/json"],"produces":["application/json"],"tags":["Policy Svc"],"summary":"Upsert an Instance","operationId":"upsertInstance","parameters":[{"type":"string","description":"Instance ID","name":"instanceId","in":"path","required":true},{"description":"Upsert Instance Request","name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/policy_svc.UpsertInstanceRequest"}}],"responses":{"200":{"description":"Instance upserted successfully","schema":{"$ref":"#/definitions/policy_svc.UpsertInstanceResponse"}},"400":{"description":"Invalid JSON","schema":{"$ref":"#/definitions/policy_svc.ErrorResponse"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/policy_svc.ErrorResponse"}},"500":{"description":"Internal Server Error","schema":{"$ref":"#/definitions/policy_svc.ErrorResponse"}}}}},"/prompt-svc/prompt":{"post":{"security":[{"BearerAuth":[]}],"description":"Sends a prompt and waits for a response if sync is true. If sync is false, adds the prompt to the queue and returns immediately.\n\nPrompts can be used for ` + "`" + `text-to-text` + "`" + `, ` + "`" + `text-to-image` + "`" + `, ` + "`" + `image-to-image` + "`" + `, and other types of generation.\nIf no model ID is specified, the default model will be used (see ` + "`" + `Model Svc` + "`" + ` for details). The default model may or may not support the requested generation type.\n\n**Prompting Modes**\n- **High-Level Parameters**: Uses predefined parameters relevant to ` + "`" + `text-to-image` + "`" + `, ` + "`" + `image-to-image` + "`" + `, etc. This mode abstracts away the underlying engine (e.g., LLaMA, Stable Diffusion) and focuses on functionality.\n- **Engine-Specific Parameters**: Uses ` + "`" + `engineParameters` + "`" + ` to directly specify an AI engine, exposing all available parameters for fine-tuned control.\n\n**Permissions Required:** ` + "`" + `prompt-svc:prompt:create` + "`" + `","consumes":["application/json"],"produces":["application/json"],"tags":["Prompt Svc"],"summary":"Prompt an AI","operationId":"prompt","parameters":[{"description":"Add Prompt Request","name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/prompt_svc.PromptRequest"}}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/prompt_svc.PromptResponse"}},"400":{"description":"Invalid JSON","schema":{"$ref":"#/definitions/prompt_svc.ErrorResponse"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/prompt_svc.ErrorResponse"}},"500":{"description":"Internal Server Error","schema":{"$ref":"#/definitions/prompt_svc.ErrorResponse"}}}}},"/prompt-svc/prompts":{"post":{"security":[{"BearerAuth":[]}],"description":"List prompts that satisfy a query.","consumes":["application/json"],"produces":["application/json"],"tags":["Prompt Svc"],"summary":"List Prompts","operationId":"listPrompts","parameters":[{"description":"List Prompts Request","name":"body","in":"body","schema":{"$ref":"#/definitions/prompt_svc.ListPromptsRequest"}}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/prompt_svc.ListPromptsResponse"}},"400":{"description":"Invalid JSON","schema":{"$ref":"#/definitions/prompt_svc.ErrorResponse"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/prompt_svc.ErrorResponse"}},"500":{"description":"Internal Server Error","schema":{"$ref":"#/definitions/prompt_svc.ErrorResponse"}}}}},"/prompt-svc/prompts/{threadId}/responses/subscribe":{"get":{"security":[{"BearerAuth":[]}],"description":"Subscribe to prompt responses by thread via Server-Sent Events (SSE).\nYou can subscribe to threads before they are created.\nThe streamed strings are of type ` + "`" + `StreamChunk` + "`" + `, see the PromptTypes endpoint for more details.","tags":["Prompt Svc"],"summary":"Subscribe to Prompt Responses by Thread","operationId":"subscribeToPromptResponses","parameters":[{"type":"string","description":"Thread ID","name":"threadId","in":"path","required":true}],"responses":{"200":{"description":"Streaming response","schema":{"type":"string"}},"400":{"description":"Missing Parameter","schema":{"$ref":"#/definitions/prompt_svc.ErrorResponse"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/prompt_svc.ErrorResponse"}}}}},"/prompt-svc/remove":{"post":{"security":[{"BearerAuth":[]}],"description":"Remove a prompt by ID.","consumes":["application/json"],"produces":["application/json"],"tags":["Prompt Svc"],"summary":"Remove Prompt","operationId":"removePrompt","parameters":[{"description":"Remove Prompt Request","name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/prompt_svc.RemovePromptRequest"}}],"responses":{"200":{"description":"{}","schema":{"$ref":"#/definitions/prompt_svc.RemovePromptResponse"}},"400":{"description":"Invalid JSON","schema":{"$ref":"#/definitions/prompt_svc.ErrorResponse"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/prompt_svc.ErrorResponse"}},"500":{"description":"Internal Server Error","schema":{"$ref":"#/definitions/prompt_svc.ErrorResponse"}}}}},"/prompt-svc/types":{"post":{"security":[{"BearerAuth":[]}],"description":"The only purpose of this \"endpoint\" is to export types otherwise not appearing in the API docs.\nThis endpoint otherwise does nothing. Do not depend on this endpoint, only its types.","consumes":["application/json"],"produces":["application/json"],"tags":["Prompt Svc"],"summary":"Prompt Types","operationId":"promptTypes","parameters":[{"description":"Types Request","name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/prompt_svc.TypesRequest"}}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/prompt_svc.TypesResponse"}},"400":{"description":"Invalid JSON","schema":{"$ref":"#/definitions/prompt_svc.ErrorResponse"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/prompt_svc.ErrorResponse"}},"500":{"description":"Internal Server Error","schema":{"$ref":"#/definitions/prompt_svc.ErrorResponse"}}}}},"/proxy-svc/certs":{"put":{"security":[{"BearerAuth":[]}],"description":"This endpoint only exist for testing purposes. Only callable by admins\nCerts should be saved by the Proxy Svc and its edge proxying functionality internally,\nnot through this endpoint.","consumes":["application/json"],"produces":["application/json"],"tags":["Proxy Svc"],"summary":"Save Certs","operationId":"saveCerts","parameters":[{"description":"Save Certs Request","name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/proxy_svc.SaveCertsRequest"}}],"responses":{"200":{"description":"Certs saved successfully","schema":{"$ref":"#/definitions/proxy_svc.SaveCertsResponse"}},"400":{"description":"Invalid JSON","schema":{"$ref":"#/definitions/proxy_svc.ErrorResponse"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/proxy_svc.ErrorResponse"}},"500":{"description":"Internal Server Error","schema":{"$ref":"#/definitions/proxy_svc.ErrorResponse"}}}},"post":{"security":[{"BearerAuth":[]}],"description":"List certs that the edge proxy will use to cert requests.","consumes":["application/json"],"produces":["application/json"],"tags":["Proxy Svc"],"summary":"List Certs","operationId":"listCerts","parameters":[{"description":"List Certs Request","name":"body","in":"body","schema":{"$ref":"#/definitions/proxy_svc.ListCertsRequest"}}],"responses":{"200":{"description":"Certs listed successfully","schema":{"$ref":"#/definitions/proxy_svc.ListCertsResponse"}},"400":{"description":"Invalid JSON","schema":{"$ref":"#/definitions/proxy_svc.ErrorResponse"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/proxy_svc.ErrorResponse"}},"500":{"description":"Internal Server Error","schema":{"$ref":"#/definitions/proxy_svc.ErrorResponse"}}}}},"/proxy-svc/routes":{"put":{"security":[{"BearerAuth":[]}],"description":"Save routes that the edge proxy will use to route requests.","consumes":["application/json"],"produces":["application/json"],"tags":["Proxy Svc"],"summary":"Save Routes","operationId":"saveRoutes","parameters":[{"description":"Save Routes Request","name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/proxy_svc.SaveRoutesRequest"}}],"responses":{"200":{"description":"Routes saved successfully","schema":{"$ref":"#/definitions/proxy_svc.SaveRoutesResponse"}},"400":{"description":"Invalid JSON","schema":{"$ref":"#/definitions/proxy_svc.ErrorResponse"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/proxy_svc.ErrorResponse"}},"500":{"description":"Internal Server Error","schema":{"$ref":"#/definitions/proxy_svc.ErrorResponse"}}}},"post":{"security":[{"BearerAuth":[]}],"description":"List routes that the edge proxy will use to route requests.","consumes":["application/json"],"produces":["application/json"],"tags":["Proxy Svc"],"summary":"List Routes","operationId":"listRoutes","parameters":[{"description":"List Routes Request","name":"body","in":"body","schema":{"$ref":"#/definitions/proxy_svc.ListRoutesRequest"}}],"responses":{"200":{"description":"Routes listd successfully","schema":{"$ref":"#/definitions/proxy_svc.ListRoutesResponse"}},"400":{"description":"Invalid JSON","schema":{"$ref":"#/definitions/proxy_svc.ErrorResponse"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/proxy_svc.ErrorResponse"}},"500":{"description":"Internal Server Error","schema":{"$ref":"#/definitions/proxy_svc.ErrorResponse"}}}}},"/registry-svc/definition":{"put":{"security":[{"BearerAuth":[]}],"description":"Registers a new definition, associating an definition address with a slug acquired from the bearer token.","consumes":["application/json"],"produces":["application/json"],"tags":["Registry Svc"],"summary":"Register a Definition","operationId":"saveDefinition","parameters":[{"description":"Register Service Definition Request","name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/registry_svc.SaveDefinitionRequest"}}],"responses":{"201":{"description":"Created","schema":{"$ref":"#/definitions/registry_svc.SaveDefinitionResponse"}},"400":{"description":"Invalid JSON","schema":{"$ref":"#/definitions/registry_svc.ErrorResponse"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/registry_svc.ErrorResponse"}},"500":{"description":"Internal Server Error","schema":{"$ref":"#/definitions/registry_svc.ErrorResponse"}}}}},"/registry-svc/definition/{id}":{"delete":{"security":[{"BearerAuth":[]}],"description":"Deletes a registered definition by ID.","consumes":["application/json"],"produces":["application/json"],"tags":["Registry Svc"],"summary":"Delete Definition","operationId":"deleteDefinition","parameters":[{"type":"string","description":"Definition ID","name":"id","in":"path","required":true}],"responses":{"204":{"description":"No Content"},"400":{"description":"Invalid ID","schema":{"$ref":"#/definitions/registry_svc.ErrorResponse"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/registry_svc.ErrorResponse"}},"404":{"description":"Not Found","schema":{"$ref":"#/definitions/registry_svc.ErrorResponse"}},"500":{"description":"Internal Server Error","schema":{"$ref":"#/definitions/registry_svc.ErrorResponse"}}}}},"/registry-svc/definitions":{"get":{"security":[{"BearerAuth":[]}],"description":"Retrieves a list of all definitions or filters them by specific criteria.","consumes":["application/json"],"produces":["application/json"],"tags":["Registry Svc"],"summary":"List Definitions","operationId":"listDefinitions","responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/registry_svc.ListDefinitionsResponse"}},"400":{"description":"Invalid filters","schema":{"$ref":"#/definitions/registry_svc.ErrorResponse"}},"500":{"description":"Internal Server Error","schema":{"$ref":"#/definitions/registry_svc.ErrorResponse"}}}}},"/registry-svc/echo":{"get":{"security":[{"BearerAuth":[]}],"description":"This endpoint is used to test the server's response to a GET request.\nIt echoes back the query parameters as a JSON object.","produces":["application/json"],"tags":["Registry Svc"],"summary":"Echo the query parameters in the response body.","operationId":"echoGet","responses":{"200":{"description":"Echoed query parameters","schema":{"type":"object","additionalProperties":true}}}},"put":{"security":[{"BearerAuth":[]}],"description":"This endpoint is used to test the server's response to a request.\nIt simply echoes back the request body as a JSON response.","consumes":["application/json"],"produces":["application/json"],"tags":["Registry Svc"],"summary":"Echo the request body in the response body.","operationId":"echoPut","responses":{"200":{"description":"Echoed response","schema":{"type":"object","additionalProperties":true}},"400":{"description":"Invalid JSON","schema":{"type":"object","additionalProperties":{"type":"string"}}}}},"post":{"security":[{"BearerAuth":[]}],"description":"This endpoint is used to test the server's response to a request.\nIt simply echoes back the request body as a JSON response.","consumes":["application/json"],"produces":["application/json"],"tags":["Registry Svc"],"summary":"Echo the request body in the response body.","operationId":"echoPost","responses":{"200":{"description":"Echoed response","schema":{"type":"object","additionalProperties":true}},"400":{"description":"Invalid JSON","schema":{"type":"object","additionalProperties":{"type":"string"}}}}}},"/registry-svc/instance":{"put":{"security":[{"BearerAuth":[]}],"description":"Registers an instance. Idempotent.","consumes":["application/json"],"produces":["application/json"],"tags":["Registry Svc"],"summary":"Register Instance","operationId":"registerInstance","parameters":[{"description":"Register Instance Request","name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/registry_svc.RegisterInstanceRequest"}}],"responses":{"201":{"description":"Created","schema":{"$ref":"#/definitions/registry_svc.RegisterInstanceResponse"}},"400":{"description":"Invalid JSON","schema":{"$ref":"#/definitions/registry_svc.ErrorResponse"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/registry_svc.ErrorResponse"}},"500":{"description":"Internal Server Error","schema":{"$ref":"#/definitions/registry_svc.ErrorResponse"}}}}},"/registry-svc/instance/{id}":{"delete":{"security":[{"BearerAuth":[]}],"description":"Removes a registered instance by ID.","consumes":["application/json"],"produces":["application/json"],"tags":["Registry Svc"],"summary":"Remove Instance","operationId":"removeInstance","parameters":[{"type":"string","description":"Instance ID","name":"id","in":"path","required":true}],"responses":{"204":{"description":"No Content"},"400":{"description":"Invalid ID","schema":{"$ref":"#/definitions/registry_svc.ErrorResponse"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/registry_svc.ErrorResponse"}},"404":{"description":"Service Not Found","schema":{"$ref":"#/definitions/registry_svc.ErrorResponse"}},"500":{"description":"Internal Server Error","schema":{"$ref":"#/definitions/registry_svc.ErrorResponse"}}}}},"/registry-svc/instances":{"get":{"security":[{"BearerAuth":[]}],"description":"Retrieves a list of all instances or filters them by specific criteria (e.g., host, IP).","consumes":["application/json"],"produces":["application/json"],"tags":["Registry Svc"],"summary":"List Service Instances","operationId":"listInstances","parameters":[{"type":"string","description":"Scheme to filter by","name":"scheme","in":"query"},{"type":"string","description":"IP to filter by","name":"ip","in":"query"},{"type":"string","description":"Deployment ID to filter by","name":"deploymentId","in":"query"},{"type":"string","description":"Host to filter by","name":"host","in":"query"},{"type":"string","description":"IP to filter by","name":"ip","in":"query"},{"type":"string","description":"Id to filter by","name":"id","in":"query"},{"type":"string","description":"Slug to filter by","name":"slug","in":"query"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/registry_svc.ListInstancesResponse"}},"400":{"description":"Invalid filters","schema":{"$ref":"#/definitions/registry_svc.ErrorResponse"}},"500":{"description":"Internal Server Error","schema":{"$ref":"#/definitions/registry_svc.ErrorResponse"}}}}},"/registry-svc/node/self":{"get":{"security":[{"BearerAuth":[]}],"description":"Show the local node.","consumes":["application/json"],"produces":["application/json"],"tags":["Registry Svc"],"summary":"View Self Node","operationId":"selfNode","parameters":[{"description":"List Registrys Request","name":"body","in":"body","schema":{"$ref":"#/definitions/registry_svc.NodeSelfRequest"}}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/registry_svc.NodeSelfResponse"}},"400":{"description":"Invalid JSON","schema":{"$ref":"#/definitions/registry_svc.ErrorResponse"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/registry_svc.ErrorResponse"}},"500":{"description":"Internal Server Error","schema":{"$ref":"#/definitions/registry_svc.ErrorResponse"}}}}},"/registry-svc/node/{url}":{"delete":{"security":[{"BearerAuth":[]}],"description":"Deletes a registered node by node URL. This endpoint is useful when a node is no longer available but it's still present in the database.","consumes":["application/json"],"produces":["application/json"],"tags":["Registry Svc"],"summary":"Delete Node","operationId":"deleteNode","parameters":[{"type":"string","description":"Node URL","name":"url","in":"path","required":true}],"responses":{"204":{"description":"No Content"},"400":{"description":"Invalid ID","schema":{"$ref":"#/definitions/registry_svc.ErrorResponse"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/registry_svc.ErrorResponse"}},"404":{"description":"Service not found","schema":{"$ref":"#/definitions/registry_svc.ErrorResponse"}},"500":{"description":"Internal Server Error","schema":{"$ref":"#/definitions/registry_svc.ErrorResponse"}}}}},"/registry-svc/nodes":{"post":{"security":[{"BearerAuth":[]}],"description":"Retrieve a list of nodes.","consumes":["application/json"],"produces":["application/json"],"tags":["Registry Svc"],"summary":"List Nodes","operationId":"listNodes","parameters":[{"description":"List Nodes Request","name":"body","in":"body","schema":{"$ref":"#/definitions/registry_svc.ListNodesRequest"}}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/registry_svc.ListNodesResponse"}},"400":{"description":"Invalid JSON","schema":{"$ref":"#/definitions/registry_svc.ErrorResponse"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/registry_svc.ErrorResponse"}},"500":{"description":"Internal Server Error","schema":{"$ref":"#/definitions/registry_svc.ErrorResponse"}}}}},"/secret-svc/decrypt":{"post":{"security":[{"BearerAuth":[]}],"description":"Decrypt a value and return the encrypted result","consumes":["application/json"],"produces":["application/json"],"tags":["Secret Svc"],"summary":"Decrypt a Value","operationId":"decryptValue","parameters":[{"description":"Decrypt Value Request","name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/secret_svc.DecryptValueRequest"}}],"responses":{"200":{"description":"Decrypt Value Response","schema":{"$ref":"#/definitions/secret_svc.DecryptValueResponse"}},"400":{"description":"Bad Request","schema":{"type":"string"}},"401":{"description":"Unauthorized","schema":{"type":"string"}},"500":{"description":"Internal Server Error","schema":{"type":"string"}}}}},"/secret-svc/encrypt":{"post":{"security":[{"BearerAuth":[]}],"description":"Encrypt a value and return the encrypted result","consumes":["application/json"],"produces":["application/json"],"tags":["Secret Svc"],"summary":"Encrypt a Value","operationId":"encryptValue","parameters":[{"description":"Encrypt Value Request","name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/secret_svc.EncryptValueRequest"}}],"responses":{"200":{"description":"Encrypt Value Response","schema":{"$ref":"#/definitions/secret_svc.EncryptValueResponse"}},"400":{"description":"Missing Data","schema":{"type":"string"}},"401":{"description":"Unauthorized","schema":{"type":"string"}},"500":{"description":"Internal Server Error","schema":{"type":"string"}}}}},"/secret-svc/is-secure":{"get":{"security":[{"BearerAuth":[]}],"description":"Returns true if the encryption key is sufficiently secure.","consumes":["application/json"],"produces":["application/json"],"tags":["Secret Svc"],"summary":"Check Security Status","operationId":"isSecure","responses":{"200":{"description":"Encrypt Value Response","schema":{"$ref":"#/definitions/secret_svc.IsSecureResponse"}},"400":{"description":"Bad Request","schema":{"type":"string"}},"401":{"description":"Unauthorized","schema":{"type":"string"}},"500":{"description":"Internal Server Error","schema":{"type":"string"}}}}},"/secret-svc/secrets":{"put":{"security":[{"BearerAuth":[]}],"description":"Save secrets if authorized to do so.\nRequires the ` + "`" + `secret-svc:secret:save` + "`" + ` permission.\nUsers can only save secrets prefixed with their user slug unless they also have the\n` + "`" + `secret-svc:secret:save-unprefixed` + "`" + ` permission, which allows them to save a secret without a slug prefix.","consumes":["application/json"],"produces":["application/json"],"tags":["Secret Svc"],"summary":"Save Secrets","operationId":"saveSecrets","parameters":[{"description":"Save Secret Request","name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/secret_svc.SaveSecretsRequest"}}],"responses":{"200":{"description":"Save Secret Response","schema":{"$ref":"#/definitions/secret_svc.SaveSecretsResponse"}},"401":{"description":"Unauthorized","schema":{"type":"string"}},"500":{"description":"Internal Server Error","schema":{"type":"string"}}}},"post":{"security":[{"BearerAuth":[]}],"description":"List secrets by key(s) if authorized.","consumes":["application/json"],"produces":["application/json"],"tags":["Secret Svc"],"summary":"List Secrets","operationId":"listSecrets","parameters":[{"description":"List Secret Request","name":"body","in":"body","schema":{"$ref":"#/definitions/secret_svc.ListSecretsRequest"}}],"responses":{"200":{"description":"List Secret Response","schema":{"$ref":"#/definitions/secret_svc.ListSecretsResponse"}},"401":{"description":"Unauthorized","schema":{"type":"string"}},"500":{"description":"Internal Server Error","schema":{"type":"string"}}}},"delete":{"security":[{"BearerAuth":[]}],"description":"Remove secrets if authorized to do so","consumes":["application/json"],"produces":["application/json"],"tags":["Secret Svc"],"summary":"Remove Secrets","operationId":"removeSecrets","parameters":[{"description":"Remove Secret Request","name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/secret_svc.RemoveSecretsRequest"}}],"responses":{"200":{"description":"Remove Secret Response","schema":{"$ref":"#/definitions/secret_svc.RemoveSecretsResponse"}},"401":{"description":"Unauthorized","schema":{"type":"string"}},"500":{"description":"Internal Server Error","schema":{"type":"string"}}}}},"/source-svc/repo/checkout":{"post":{"security":[{"BearerAuth":[]}],"description":"Checkout a git repository over https or ssh at a specific version into a temporary directory.\nPerforms a shallow clone with minimal history for faster checkout.","consumes":["application/json"],"produces":["application/json"],"tags":["Source Svc"],"summary":"Checkout a git repository","operationId":"checkoutRepo","parameters":[{"description":"Checkout Repo Request","name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/source_svc.CheckoutRepoRequest"}}],"responses":{"200":{"description":"Successfully checked out the repository","schema":{"$ref":"#/definitions/source_svc.CheckoutRepoResponse"}},"400":{"description":"Invalid JSON","schema":{"$ref":"#/definitions/source_svc.ErrorResponse"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/source_svc.ErrorResponse"}},"500":{"description":"Internal Server Error","schema":{"$ref":"#/definitions/source_svc.ErrorResponse"}}}}},"/user-svc/app":{"post":{"security":[{"BearerAuth":[]}],"description":"Get an app by host, or create it if it does not exist.","consumes":["application/json"],"produces":["application/json"],"tags":["User Svc"],"summary":"Read or Create App","operationId":"readApp","parameters":[{"description":"Read App Request","name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/user_svc.ReadAppRequest"}}],"responses":{"200":{"description":"App retrieved or created successfully","schema":{"$ref":"#/definitions/user_svc.ReadAppResponse"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/user_svc.ErrorResponse"}},"500":{"description":"Internal Server Error","schema":{"$ref":"#/definitions/user_svc.ErrorResponse"}}}}},"/user-svc/apps":{"post":{"security":[{"BearerAuth":[]}],"description":"List apps. Role, user ID or contact ID must be specified.\n\nRequires the ` + "`" + `user-svc:app:view` + "`" + ` permission, which by default all users have.\nCaller can only list apps of roles they own (unless they are an admin).","consumes":["application/json"],"produces":["application/json"],"tags":["User Svc"],"summary":"List Apps","operationId":"listApps","parameters":[{"description":"List Apps Request","name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/user_svc.ListAppsRequest"}}],"responses":{"200":{"description":"Apps listed successfully","schema":{"$ref":"#/definitions/user_svc.ListAppsResponse"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/user_svc.ErrorResponse"}},"500":{"description":"Internal Server Error","schema":{"$ref":"#/definitions/user_svc.ErrorResponse"}}}}},"/user-svc/change-password":{"post":{"security":[{"BearerAuth":[]}],"description":"Allows an authenticated user to change their own password.","consumes":["application/json"],"produces":["application/json"],"tags":["User Svc"],"summary":"Change Password","operationId":"changePassword","parameters":[{"description":"Change Password Request","name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/user_svc.ChangePasswordRequest"}}],"responses":{"200":{"description":"Password changed successfully","schema":{"$ref":"#/definitions/user_svc.ChangePasswordResponse"}},"400":{"description":"Invalid JSON","schema":{"$ref":"#/definitions/user_svc.ErrorResponse"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/user_svc.ErrorResponse"}},"500":{"description":"Internal Server Error","schema":{"$ref":"#/definitions/user_svc.ErrorResponse"}}}}},"/user-svc/enrolls":{"put":{"security":[{"BearerAuth":[]}],"description":"Enroll a list of users by contact or user Id to acquire a role.\nWorks on future or current users.\n\nA user can only enroll an other user to a role if the user \"owns\" that role.\nA user who owns a role can enroll others in that roll in any app.\nThe same request might contain enrolls for different apps.\n\nA user \"owns\" a role in the following cases:\n- A static role where the role ID is prefixed with the caller's slug.\n- Any dynamic or static role where the caller is an admin (has ` + "`" + `*:admin` + "`" + ` postfix of that role).\n\nExamples:\n- A user with the slug ` + "`" + `joe-doe` + "`" + ` owns roles like ` + "`" + `joe-doe:*` + "`" + ` such as ` + "`" + `joe-doe:any-custom-role` + "`" + `.\n- A user with any slug who has the role ` + "`" + `my-service:admin` + "`" + ` owns ` + "`" + `my-service:*` + "`" + ` roles such as ` + "`" + `my-service:user` + "`" + `.\n- A user with any slug who has the role ` + "`" + `user-svc:org:{%orgId}:admin` + "`" + ` owns ` + "`" + `user-svc:org:{%orgId}:*` + "`" + ` such as ` + "`" + `user-svc:org:{%orgId}:user` + "`" + `.","consumes":["application/json"],"produces":["application/json"],"tags":["User Svc"],"summary":"Save Enrolls","operationId":"saveEnrolls","parameters":[{"description":"Save Enrolls Request","name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/user_svc.SaveEnrollsRequest"}}],"responses":{"200":{"description":"Enrolls saved successfully","schema":{"$ref":"#/definitions/user_svc.SaveEnrollsResponse"}},"400":{"description":"Invalid JSON","schema":{"$ref":"#/definitions/user_svc.ErrorResponse"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/user_svc.ErrorResponse"}},"500":{"description":"Internal Server Error","schema":{"$ref":"#/definitions/user_svc.ErrorResponse"}}}},"post":{"security":[{"BearerAuth":[]}],"description":"List enrolls. Role, user ID or contact ID must be specified.\n\nRequires the ` + "`" + `user-svc:enroll:view` + "`" + ` permission, which by default all users have.\nCaller can only list enrolls of roles they own (unless they are an admin).","consumes":["application/json"],"produces":["application/json"],"tags":["User Svc"],"summary":"List Enrolls","operationId":"listEnrolls","parameters":[{"description":"List Enrolls Request","name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/user_svc.ListEnrollsRequest"}}],"responses":{"200":{"description":"Enrolls listed successfully","schema":{"$ref":"#/definitions/user_svc.ListEnrollsResponse"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/user_svc.ErrorResponse"}},"500":{"description":"Internal Server Error","schema":{"$ref":"#/definitions/user_svc.ErrorResponse"}}}}},"/user-svc/login":{"post":{"description":"Authenticates a user and returns a token.","consumes":["application/json"],"produces":["application/json"],"tags":["User Svc"],"summary":"Login","operationId":"login","parameters":[{"description":"Login Request","name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/user_svc.LoginRequest"}}],"responses":{"200":{"description":"Login successful","schema":{"$ref":"#/definitions/user_svc.LoginResponse"}},"400":{"description":"Invalid JSON","schema":{"$ref":"#/definitions/user_svc.ErrorResponse"}},"404":{"description":"User Not Found","schema":{"$ref":"#/definitions/user_svc.ErrorResponse"}},"500":{"description":"Internal Server Error","schema":{"$ref":"#/definitions/user_svc.ErrorResponse"}}}}},"/user-svc/organization":{"put":{"security":[{"BearerAuth":[]}],"description":"Allows a logged-in user to save an organization. The user initiating the request will be assigned the role of admin for that organization.\nThe initiating user will receive a dynamic role in the format ` + "`" + `user-svc:org:{organizationId}:admin` + "`" + `, where ` + "`" + `{organizationId}` + "`" + ` is a unique identifier for the saved organization.\nDynamic roles are generated based on specific user-resource associations (in this case the resource being the organization), offering more flexible permission management compared to static roles.","consumes":["application/json"],"produces":["application/json"],"tags":["User Svc"],"summary":"Save an Organization","operationId":"saveOrganization","parameters":[{"description":"Save User Request","name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/user_svc.SaveOrganizationRequest"}}],"responses":{"200":{"description":"User saved successfully","schema":{"$ref":"#/definitions/user_svc.SaveOrganizationResponse"}},"400":{"description":"Invalid JSON","schema":{"$ref":"#/definitions/user_svc.ErrorResponse"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/user_svc.ErrorResponse"}},"500":{"description":"Internal Server Error","schema":{"$ref":"#/definitions/user_svc.ErrorResponse"}}}}},"/user-svc/organization/{organizationId}/user/{userId}":{"put":{"security":[{"BearerAuth":[]}],"description":"Adds a user to an organization by saving a Membership.\nAlso issues the corresponding Enroll, which grants the\nuser their dynamic organization role (e.g. ` + "`" + `user-svc:org:{org_123}:user` + "`" + `).","consumes":["application/json"],"produces":["application/json"],"tags":["User Svc"],"summary":"Save Membership","operationId":"saveMembership","parameters":[{"type":"string","description":"Organization ID","name":"organizationId","in":"path","required":true},{"type":"string","description":"User ID","name":"userId","in":"path","required":true},{"description":"Add User to Organization Request","name":"body","in":"body","schema":{"$ref":"#/definitions/user_svc.SaveMembershipRequest"}}],"responses":{"200":{"description":"User added successfully","schema":{"$ref":"#/definitions/user_svc.SaveMembershipResponse"}},"400":{"description":"Invalid JSON","schema":{"$ref":"#/definitions/user_svc.ErrorResponse"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/user_svc.ErrorResponse"}},"403":{"description":"Forbidden","schema":{"$ref":"#/definitions/user_svc.ErrorResponse"}},"404":{"description":"Organization/User not found","schema":{"$ref":"#/definitions/user_svc.ErrorResponse"}},"500":{"description":"Internal Server Error","schema":{"$ref":"#/definitions/user_svc.ErrorResponse"}}}},"delete":{"security":[{"BearerAuth":[]}],"description":"Allows an organization admin to remove a user from an organization.","consumes":["application/json"],"produces":["application/json"],"tags":["User Svc"],"summary":"Delete Membership","operationId":"deleteMembership","parameters":[{"type":"string","description":"Organization ID","name":"organizationId","in":"path","required":true},{"type":"string","description":"User ID","name":"userId","in":"path","required":true},{"description":"Remove User From Organization Request","name":"body","in":"body","schema":{"$ref":"#/definitions/user_svc.DeleteMembershipRequest"}}],"responses":{"200":{"description":"User added successfully","schema":{"$ref":"#/definitions/user_svc.DeleteMembershipResponse"}},"400":{"description":"Invalid JSON","schema":{"$ref":"#/definitions/user_svc.ErrorResponse"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/user_svc.ErrorResponse"}},"403":{"description":"Forbidden","schema":{"$ref":"#/definitions/user_svc.ErrorResponse"}},"404":{"description":"Organization/User not found","schema":{"$ref":"#/definitions/user_svc.ErrorResponse"}},"500":{"description":"Internal Server Error","schema":{"$ref":"#/definitions/user_svc.ErrorResponse"}}}}},"/user-svc/organizations":{"post":{"security":[{"BearerAuth":[]}],"description":"Requires the ` + "`" + `user-svc:organization:view` + "`" + ` permission, that only admins have by default.","consumes":["application/json"],"produces":["application/json"],"tags":["User Svc"],"summary":"List Organizations","operationId":"listOrganizations","parameters":[{"description":"List Organizations Request","name":"body","in":"body","schema":{"$ref":"#/definitions/user_svc.ListOrganizationsRequest"}}],"responses":{"200":{"description":"Organization listed successfully","schema":{"$ref":"#/definitions/user_svc.ListOrganizationsResponse"}},"400":{"description":"Invalid JSON","schema":{"$ref":"#/definitions/user_svc.ErrorResponse"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/user_svc.ErrorResponse"}},"500":{"description":"Internal Server Error","schema":{"$ref":"#/definitions/user_svc.ErrorResponse"}}}}},"/user-svc/permissions":{"post":{"security":[{"BearerAuth":[]}],"description":"List permissions by roles.\nCaller can only list permissions for roles they have.","consumes":["application/json"],"produces":["application/json"],"tags":["User Svc"],"summary":"List Permissions","operationId":"listPermissions","parameters":[{"type":"string","description":"Role ID","name":"roleId","in":"path","required":true}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/user_svc.ListPermissionsResponse"}},"400":{"description":"Invalid JSON","schema":{"type":"string"}},"401":{"description":"Unauthorized","schema":{"type":"string"}},"500":{"description":"Internal Server Error","schema":{"type":"string"}}}}},"/user-svc/permits":{"put":{"security":[{"BearerAuth":[]}],"description":"Save permits.\nPermits give access to users with certain slugs and roles to permissions.","consumes":["application/json"],"produces":["application/json"],"tags":["User Svc"],"summary":"Save Permits","operationId":"savePermits","parameters":[{"description":"Save Permits Request","name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/user_svc.SavePermitsRequest"}}],"responses":{"200":{"description":"Permit saved successfully","schema":{"$ref":"#/definitions/user_svc.SavePermitsResponse"}},"400":{"description":"Invalid JSON","schema":{"$ref":"#/definitions/user_svc.ErrorResponse"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/user_svc.ErrorResponse"}},"500":{"description":"Internal Server Error","schema":{"$ref":"#/definitions/user_svc.ErrorResponse"}}}},"post":{"security":[{"BearerAuth":[]}],"description":"List permits. Requires the ` + "`" + `user-svc:permit:view` + "`" + ` permission, which only admins have by default.\n\u0026todo Users should be able to list permits referring to them.","consumes":["application/json"],"produces":["application/json"],"tags":["User Svc"],"summary":"List Permits","operationId":"listPermits","parameters":[{"description":"List Permits Request","name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/user_svc.ListPermitsRequest"}}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/user_svc.ListPermitsResponse"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/user_svc.ErrorResponse"}},"500":{"description":"Internal Server Error","schema":{"$ref":"#/definitions/user_svc.ErrorResponse"}}}}},"/user-svc/public-key":{"get":{"description":"Get the public key to verify the JWT signature.","consumes":["application/json"],"produces":["application/json"],"tags":["User Svc"],"summary":"Get Public Key","operationId":"getPublicKey","responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/user_svc.GetPublicKeyResponse"}},"400":{"description":"Invalid JSON or missing permission id","schema":{"$ref":"#/definitions/user_svc.ErrorResponse"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/user_svc.ErrorResponse"}}}}},"/user-svc/refresh-token":{"post":{"description":"Refreshes an existing token, including inactive ones.\nThe old token becomes inactive (if not already inactive), and a new, active token is issued.\nThis allows continued verification of user roles without requiring a new login.\nInactive tokens are refreshable unless explicitly revoked (no mechanism for this yet).\nLeaked tokens should be handled separately, via a revocation flag or deletion.","consumes":["application/json"],"produces":["application/json"],"tags":["User Svc"],"summary":"Refresh Token","operationId":"refreshToken","responses":{"200":{"description":"Refresh Token successful","schema":{"$ref":"#/definitions/user_svc.RefreshTokenResponse"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/user_svc.ErrorResponse"}},"500":{"description":"Internal Server Error","schema":{"$ref":"#/definitions/user_svc.ErrorResponse"}}}}},"/user-svc/register":{"post":{"description":"Register a new user with a name, email, and password.","consumes":["application/json"],"produces":["application/json"],"tags":["User Svc"],"summary":"Register","operationId":"register","parameters":[{"description":"Register Request","name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/user_svc.RegisterRequest"}}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/user_svc.RegisterResponse"}},"400":{"description":"Invalid JSON","schema":{"$ref":"#/definitions/user_svc.ErrorResponse"}},"500":{"description":"Internal Server Error","schema":{"$ref":"#/definitions/user_svc.ErrorResponse"}}}}},"/user-svc/self":{"put":{"security":[{"BearerAuth":[]}],"description":"Save user's own profile information.","consumes":["application/json"],"produces":["application/json"],"tags":["User Svc"],"summary":"Save User Profile","operationId":"saveSelf","parameters":[{"description":"Save Profile Request","name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/user_svc.SaveSelfRequest"}}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/user_svc.SaveSelfResponse"}},"400":{"description":"Invalid JSON","schema":{"$ref":"#/definitions/user_svc.ErrorResponse"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/user_svc.ErrorResponse"}},"500":{"description":"Internal Server Error","schema":{"$ref":"#/definitions/user_svc.ErrorResponse"}}}},"post":{"security":[{"BearerAuth":[]}],"description":"Retrieves user information based on the authentication token in the request header.\nTypically called by single-page applications during the initial page load.\nWhile some details (such as roles, slug, user ID, and active organization ID) can be extracted from the JWT,\nthis endpoint returns additional data, including the full user object and associated organizations.\n\nReadSelf intentionally still works after token revocation until the token expires.\nThis is to ensure that the user is not notified of token revocation (though some information is\nleaked by the count token functionality @todo).","consumes":["application/json"],"produces":["application/json"],"tags":["User Svc"],"summary":"Read Self","operationId":"readSelf","parameters":[{"description":"Read Self Request","name":"body","in":"body","schema":{"$ref":"#/definitions/user_svc.ReadSelfRequest"}}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/user_svc.ReadSelfResponse"}},"400":{"description":"Token Missing","schema":{"$ref":"#/definitions/user_svc.ErrorResponse"}},"500":{"description":"Internal Server Error","schema":{"$ref":"#/definitions/user_svc.ErrorResponse"}}}}},"/user-svc/self/has/{permission}":{"post":{"security":[{"BearerAuth":[]}],"description":"Checks whether the caller has a specific permission.\nOptimized for caching — only the caller and the permission are required.\nTo assign a permission to a user or role, use the ` + "`" + `Save Permits` + "`" + ` endpoint.\n\nThis endpoint does not return 401 Unauthorized if access is denied.\nInstead, it always returns 200 OK with ` + "`" + `Authorized: false` + "`" + ` if the permission is missing.\nThe response will still include the caller’s user information if not authorized.","consumes":["application/json"],"produces":["application/json"],"tags":["User Svc"],"summary":"Has Permission","operationId":"hasPermission","parameters":[{"type":"string","description":"Permission","name":"permission","in":"path","required":true}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/user_svc.HasPermissionResponse"}},"400":{"description":"Missing Permission","schema":{"$ref":"#/definitions/user_svc.ErrorResponse"}}}}},"/user-svc/token/exchange":{"put":{"description":"Exchange an existing token for a new token scoped to a different app (namespace).\nThe new token represents the same user but contains roles specific to the target app.\n\nThe original token remains valid.\nThe minted token is not stored and cannot be refreshed (and will have the same expiration duration as normal tokens), unlike tokens acquired via login.\n\nFor now, token exchange is designed to be in situ — the User Svc must be contacted at exchange time.\nThis introduces a stateful dependency on the User Svc, but simplifies things until broader use cases emerge.","consumes":["application/json"],"produces":["application/json"],"tags":["User Svc","User Svc"],"summary":"Exchange Token","operationId":"exchangeToken","parameters":[{"description":"ExchangeToken Request","name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/user_svc.ExchangeTokenRequest"}}],"responses":{"200":{"description":"ExchangeToken successful","schema":{"$ref":"#/definitions/user_svc.ExchangeTokenResponse"}},"400":{"description":"Invalid JSON","schema":{"$ref":"#/definitions/user_svc.ErrorResponse"}},"404":{"description":"User Not Found","schema":{"$ref":"#/definitions/user_svc.ErrorResponse"}},"500":{"description":"Internal Server Error","schema":{"$ref":"#/definitions/user_svc.ErrorResponse"}}}}},"/user-svc/tokens":{"delete":{"security":[{"BearerAuth":[]}],"description":"Revoke tokens in one of the following scenarios:\n- For the current user.\n- For another user (see ` + "`" + `userId` + "`" + ` field), if permitted (` + "`" + `user-svc:token:revoke` + "`" + ` permission, typically by admins).","consumes":["application/json"],"produces":["application/json"],"tags":["User Svc"],"summary":"Revoke Tokens","operationId":"revokeTokens","parameters":[{"description":"Revoke Tokens Request","name":"body","in":"body","schema":{"$ref":"#/definitions/user_svc.RevokeTokensRequest"}}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/user_svc.RevokeTokensResponse"}},"400":{"description":"Mutually Exclusive Parameters","schema":{"$ref":"#/definitions/user_svc.ErrorResponse"}},"500":{"description":"Internal Server Error","schema":{"$ref":"#/definitions/user_svc.ErrorResponse"}}}}},"/user-svc/user":{"post":{"security":[{"BearerAuth":[]}],"description":"Allows an authenticated administrator to create a new user with specified details.","consumes":["application/json"],"produces":["application/json"],"tags":["User Svc"],"summary":"Create a New User","operationId":"createUser","parameters":[{"description":"Create User Request","name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/user_svc.CreateUserRequest"}}],"responses":{"200":{"description":"User created successfully","schema":{"$ref":"#/definitions/user_svc.CreateUserResponse"}},"400":{"description":"Invalid User","schema":{"$ref":"#/definitions/user_svc.ErrorResponse"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/user_svc.ErrorResponse"}},"500":{"description":"Internal Server Error","schema":{"$ref":"#/definitions/user_svc.ErrorResponse"}}}}},"/user-svc/user/{userId}":{"put":{"security":[{"BearerAuth":[]}],"description":"Save user information based on the provided user ID.\nIntended for admins. Requires the ` + "`" + `user-svc:user:edit` + "`" + ` permission.\nFor a user to edit their own profile, see ` + "`" + `saveSelf` + "`" + `.","consumes":["application/json"],"produces":["application/json"],"tags":["User Svc"],"summary":"Save User","operationId":"saveUser","parameters":[{"type":"string","description":"User ID","name":"userId","in":"path","required":true},{"description":"Save Profile Request","name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/user_svc.SaveUserRequest"}}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/user_svc.SaveUserResponse"}},"400":{"description":"Invalid JSON","schema":{"$ref":"#/definitions/user_svc.ErrorResponse"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/user_svc.ErrorResponse"}},"500":{"description":"Internal Server Error","schema":{"$ref":"#/definitions/user_svc.ErrorResponse"}}}},"delete":{"security":[{"BearerAuth":[]}],"description":"Delete a user based on the user ID.","consumes":["application/json"],"produces":["application/json"],"tags":["User Svc"],"summary":"Delete a User","operationId":"deleteUser","parameters":[{"type":"string","description":"User ID","name":"userId","in":"path","required":true}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/user_svc.DeleteUserResponse"}},"401":{"description":"Unauthorized","schema":{"type":"string"}},"500":{"description":"Internal Server Error","schema":{"type":"string"}}}}},"/user-svc/users":{"post":{"security":[{"BearerAuth":[]}],"description":"Fetches a list of users with optional query filters and pagination.\nRequires the ` + "`" + `user-svc:user:view` + "`" + ` permission that only admins have by default.","consumes":["application/json"],"produces":["application/json"],"tags":["User Svc"],"summary":"List Users","operationId":"listUsers","parameters":[{"description":"List Users Request","name":"body","in":"body","schema":{"$ref":"#/definitions/user_svc.ListUsersRequest"}}],"responses":{"200":{"description":"List of users retrieved successfully","schema":{"$ref":"#/definitions/user_svc.ListUsersResponse"}},"400":{"description":"Invalid JSON","schema":{"$ref":"#/definitions/user_svc.ErrorResponse"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/user_svc.ErrorResponse"}},"500":{"description":"Internal Server Error","schema":{"$ref":"#/definitions/user_svc.ErrorResponse"}}}}},"/user-svc/{userId}/reset-password":{"post":{"security":[{"BearerAuth":[]}],"description":"Allows an administrator to change a user's password.","consumes":["application/json"],"produces":["application/json"],"tags":["User Svc"],"summary":"Reset Password","operationId":"resetPassword","parameters":[{"type":"string","description":"User ID","name":"userId","in":"path","required":true},{"description":"Change Password Request","name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/user_svc.ResetPasswordRequest"}}],"responses":{"200":{"description":"Password changed successfully","schema":{"$ref":"#/definitions/user_svc.ResetPasswordResponse"}},"400":{"description":"Invalid JSON","schema":{"$ref":"#/definitions/user_svc.ErrorResponse"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/user_svc.ErrorResponse"}},"500":{"description":"Internal Server Error","schema":{"$ref":"#/definitions/user_svc.ErrorResponse"}}}}}},"definitions":{"chat_svc.EventMessageAdded":{"type":"object","properties":{"threadId":{"type":"string"}}},"chat_svc.EventThreadAdded":{"type":"object","properties":{"threadId":{"type":"string"}}},"chat_svc.EventThreadUpdate":{"type":"object","properties":{"threadId":{"type":"string"}}},"chat_svc.ListMessagesRequest":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"}},"threadId":{"type":"string"}}},"chat_svc.ListMessagesResponse":{"type":"object","properties":{"messages":{"type":"array","items":{"$ref":"#/definitions/chat_svc.Message"}}}},"chat_svc.ListThreadsRequest":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"}}}},"chat_svc.ListThreadsResponse":{"type":"object","properties":{"threads":{"type":"array","items":{"$ref":"#/definitions/chat_svc.Thread"}}}},"chat_svc.Message":{"type":"object","required":["createdAt","id","threadId","updatedAt"],"properties":{"createdAt":{"type":"string"},"fileIds":{"description":"FileIds defines the file attachments the message has.","type":"array","items":{"type":"string"}},"id":{"type":"string","example":"msg_emSOPlW58o"},"meta":{"type":"object","additionalProperties":true},"text":{"description":"Text content of the message eg. \"Hi, what's up?\"","type":"string"},"threadId":{"description":"ThreadId of the message.","type":"string","example":"thr_emSOeEUWAg"},"updatedAt":{"type":"string"},"userId":{"description":"UserId is the id of the user who wrote the message.\nFor AI messages this field is empty.","type":"string"}}},"chat_svc.SaveMessageRequest":{"type":"object","properties":{"fileIds":{"description":"FileIds defines the file attachments the message has.","type":"array","items":{"type":"string"}},"id":{"type":"string","example":"msg_emSOPlW58o"},"meta":{"type":"object","additionalProperties":true},"text":{"description":"Text content of the message eg. \"Hi, what's up?\"","type":"string"},"threadId":{"description":"ThreadId of the message.","type":"string","example":"thr_emSOeEUWAg"},"userId":{"description":"UserId is the id of the user who wrote the message.\nFor AI messages this field is empty.","type":"string"}}},"chat_svc.SaveThreadRequest":{"type":"object","properties":{"id":{"type":"string","example":"thr_emSQnpJbhG"},"title":{"description":"Title of the thread.","type":"string"},"topicIds":{"description":"TopicIds defines which topics the thread belongs to.\nTopics can roughly be thought of as tags for threads.","type":"array","items":{"type":"string"}},"userIds":{"description":"UserIds the ids of the users who can see this thread.","type":"array","items":{"type":"string"}}}},"chat_svc.SaveThreadResponse":{"type":"object","properties":{"thread":{"$ref":"#/definitions/chat_svc.Thread"}}},"chat_svc.Thread":{"type":"object","required":["createdAt","id","updatedAt"],"properties":{"createdAt":{"type":"string"},"id":{"type":"string","example":"thr_emSQnpJbhG"},"title":{"description":"Title of the thread.","type":"string"},"topicIds":{"description":"TopicIds defines which topics the thread belongs to.\nTopics can roughly be thought of as tags for threads.","type":"array","items":{"type":"string"}},"updatedAt":{"type":"string"},"userIds":{"description":"UserIds the ids of the users who can see this thread.","type":"array","items":{"type":"string"}}}},"config_svc.Config":{"type":"object","required":["appId","createdAt","data","dataJson","id","updatedAt"],"properties":{"appId":{"type":"string"},"createdAt":{"type":"string"},"data":{"type":"object","additionalProperties":true},"dataJson":{"type":"string"},"id":{"description":"CamelCased slugs of the config owners","type":"string"},"internalId":{"type":"string"},"updatedAt":{"type":"string"}}},"config_svc.ListConfigsRequest":{"type":"object","required":["appHost"],"properties":{"appHost":{"type":"string","example":"shoes.com"},"ids":{"description":"Ids are camelCased slugs of the config owners.\nSpecifying only the ids will mean all of the config will be returned\nfor that key.\n\nIf the configs are large, consider using the ` + "`" + `Selector` + "`" + ` request field.","type":"array","items":{"type":"string"}},"selector":{"description":"Selector allows dotPath-based filtering per config owner.\nExample:\n{\n  \"user1\": [\"settings.theme\", \"featureFlags.enableNewUI\"],\n  \"user2\": [\"settings.language\"]\n}","type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}}}},"config_svc.ListConfigsResponse":{"type":"object","required":["configs"],"properties":{"configs":{"description":"Configs is a map of camelcase owner slug to Config.\nEg.\n{\n\t\"testUserSlug0\": {\n  \"id\": \"testUserSlug0\",\n  \"data\": {\n    \"key1\": \"value1\",\n    \"key2\": \"value2\"\n  }\n\t}\n}","type":"object","additionalProperties":{"$ref":"#/definitions/config_svc.Config"}}}},"config_svc.SaveConfigRequest":{"type":"object","properties":{"appHost":{"description":"AppHost can only be specified by users who have the\n` + "`" + `config-svc:config:edit-on-behalf` + "`" + ` permission, who are typically admins.\n\nIf not specified, the config will be saved for the current app of the user's token.","type":"string"},"data":{"type":"object","additionalProperties":true},"dataJson":{"type":"string"},"id":{"description":"Id is the slug of the owner to save the config for.\nOnly user with the ` + "`" + `config-svc:config:edit-on-behalf` + "`" + ` can specify this.\nFor everyone else, it is automatically set to the slug of the caller user.","type":"string"}}},"config_svc.SaveConfigResponse":{"type":"object"},"container_svc.Asset":{"type":"object","required":["envVarKey","url"],"properties":{"envVarKey":{"type":"string"},"url":{"type":"string"}}},"container_svc.BuildImageRequest":{"type":"object","required":["contextPath","name"],"properties":{"contextPath":{"description":"ContextPath is the local path to the build context","type":"string","example":"."},"dockerfilePath":{"description":"DockerfilePath is the local path to the Dockerfile","type":"string","example":"Dockerfile"},"name":{"description":"Name is the name of the image to build","type":"string","example":"nginx:latest"}}},"container_svc.BuildImageResponse":{"type":"object"},"container_svc.Capabilities":{"type":"object","properties":{"gpuEnabled":{"description":"GPUEnabled specifies whether GPU support is enabled for the container.","type":"boolean"}}},"container_svc.Container":{"type":"object","properties":{"assets":{"description":"Assets maps environment variable names to file URLs.\nExample: {\"MODEL\": \"https://huggingface.co/TheBloke/Mistral-7B-Instruct-v0.2-GGUF/resolve/main/mistral-7b-instruct-v0.2.Q2_K.gguf\"}\nThese files are downloaded by the File Svc and mounted in the container.\nThe environment variable ` + "`" + `MODEL` + "`" + ` will point to the local file path in the container.","type":"array","items":{"$ref":"#/definitions/container_svc.Asset"}},"capabilities":{"description":"Capabilities define additional runtime features, such as GPU support.","allOf":[{"$ref":"#/definitions/container_svc.Capabilities"}]},"envs":{"description":"Envs are environment variables set within the container.","type":"array","items":{"$ref":"#/definitions/container_svc.EnvVar"}},"hash":{"description":"Hash is a unique identifier associated with the container.","type":"string"},"id":{"description":"Id is the unique identifier for the container instance.","type":"string"},"image":{"description":"Image is the Docker image used to create the container.","type":"string"},"keeps":{"description":"Keeps are paths that persist across container restarts.\nThey function like mounts or volumes, but their external storage location is irrelevant.","type":"array","items":{"$ref":"#/definitions/container_svc.Keep"}},"labels":{"description":"Labels are metadata tags assigned to the container.","type":"array","items":{"$ref":"#/definitions/container_svc.Label"}},"names":{"description":"Names are the human-readable aliases assigned to the container.","type":"array","items":{"type":"string"}},"network":{"description":"Network contains networking-related information for the container.","allOf":[{"$ref":"#/definitions/container_svc.Network"}]},"nodeId":{"description":"Node Id\nPlease see the documentation for the envar OB_NODE_ID","type":"string"},"ports":{"description":"Ports maps host ports (keys) to container ports (values).","type":"array","items":{"$ref":"#/definitions/container_svc.PortMapping"}},"resources":{"description":"Resources defines CPU, memory, and disk constraints for the container.","allOf":[{"$ref":"#/definitions/container_svc.Resources"}]},"runtime":{"description":"Runtime specifies the container runtime (e.g., Docker, containerd, etc.).","type":"string"},"status":{"description":"Status indicates the current state of the container (e.g., running, stopped).","type":"string"},"volumes":{"description":"Volumes mounted by the container.","type":"array","items":{"$ref":"#/definitions/container_svc.Volume"}}}},"container_svc.ContainerIsRunningResponse":{"type":"object","required":["isRunning"],"properties":{"isRunning":{"type":"boolean"}}},"container_svc.DaemonInfoResponse":{"type":"object","required":["available"],"properties":{"address":{"type":"string"},"available":{"type":"boolean"},"error":{"type":"string"}}},"container_svc.EnvVar":{"type":"object","required":["key","value"],"properties":{"key":{"description":"Key is the environment variable name.","type":"string"},"value":{"description":"Value is the environment variable value.","type":"string"}}},"container_svc.ErrorResponse":{"type":"object","properties":{"error":{"type":"string"}}},"container_svc.GetContainerSummaryResponse":{"type":"object","required":["logs","status","summary"],"properties":{"logs":{"type":"string"},"status":{"type":"string"},"summary":{"description":"DEPRECATED. Summary contains both Status and Logs.","type":"string"}}},"container_svc.GetHostResponse":{"type":"object","required":["host"],"properties":{"host":{"type":"string"}}},"container_svc.ImagePullableResponse":{"type":"object","required":["pullable"],"properties":{"pullable":{"type":"boolean"}}},"container_svc.Keep":{"type":"object","required":["path"],"properties":{"path":{"description":"Path is the absolute path inside the container for the folder that should persist across restarts.","type":"string"},"readOnly":{"description":"ReadOnly indicates whether the keep is read-only.","type":"boolean"}}},"container_svc.Label":{"type":"object","required":["key","value"],"properties":{"key":{"type":"string"},"value":{"type":"string"}}},"container_svc.ListContainersRequest":{"type":"object","properties":{"containerId":{"type":"string"},"limit":{"type":"integer"},"nodeId":{"type":"string"}}},"container_svc.ListContainersResponse":{"type":"object","properties":{"containers":{"type":"array","items":{"$ref":"#/definitions/container_svc.Container"}}}},"container_svc.ListLogsRequest":{"type":"object","properties":{"containerId":{"type":"string"},"limit":{"type":"integer"},"nodeId":{"type":"string"}}},"container_svc.ListLogsResponse":{"type":"object","properties":{"logs":{"type":"array","items":{"$ref":"#/definitions/container_svc.Log"}}}},"container_svc.Log":{"type":"object","required":["createdAt"],"properties":{"containerId":{"description":"ContainerId is the raw underlying container ID.\nEg. Docker container id. Node local.","type":"string"},"content":{"type":"string"},"createdAt":{"type":"string"},"id":{"type":"string"},"nodeId":{"description":"Node Id\nPlease see the documentation for the envar OB_NODE_ID","type":"string"}}},"container_svc.Network":{"type":"object","properties":{"ipAddress":{"description":"IPAddress is the assigned IP address of the container.","type":"string"},"macAddress":{"description":"MacAddress is the container's MAC address if applicable.","type":"string"},"mode":{"description":"Mode specifies the container's network mode (e.g., bridge, host, none, custom).","type":"string"}}},"container_svc.PortMapping":{"type":"object","required":["host","internal"],"properties":{"host":{"type":"integer"},"internal":{"type":"integer"}}},"container_svc.Resources":{"type":"object","properties":{"cpu":{"description":"CPU cores allocated to the container (e.g., 0.5 = 500m, 2 = 2 cores).","type":"number"},"diskMB":{"description":"Disk space allocated to the container in megabytes.","type":"integer"},"memoryMB":{"description":"Memory allocated to the container in megabytes.","type":"integer"}}},"container_svc.RunContainerRequest":{"type":"object","required":["image"],"properties":{"assets":{"description":"Assets maps environment variable names to file URLs.\nExample: {\"MODEL\": \"https://huggingface.co/TheBloke/Mistral-7B-Instruct-v0.2-GGUF/resolve/main/mistral-7b-instruct-v0.2.Q2_K.gguf\"}\nThese files are downloaded by the File Svc and mounted in the container.\nThe environment variable ` + "`" + `MODEL` + "`" + ` will point to the local file path in the container.","type":"array","items":{"$ref":"#/definitions/container_svc.Asset"}},"capabilities":{"description":"Capabilities define additional runtime features, such as GPU support.","allOf":[{"$ref":"#/definitions/container_svc.Capabilities"}]},"envs":{"description":"Envs are environment variables set within the container.","type":"array","items":{"$ref":"#/definitions/container_svc.EnvVar"}},"hash":{"description":"Hash is a unique identifier for the container","type":"string"},"image":{"description":"Image is the Docker image to use for the container","type":"string","example":"nginx:latest"},"keeps":{"description":"Keeps are paths that persist across container restarts.\nThey function like mounts or volumes, but their external storage location is irrelevant.","type":"array","items":{"$ref":"#/definitions/container_svc.Keep"}},"labels":{"description":"Labels are metadata tags assigned to the container.","type":"array","items":{"$ref":"#/definitions/container_svc.Label"}},"names":{"description":"Names are the human-readable aliases assigned to the container.","type":"array","items":{"type":"string"}},"ports":{"description":"Ports maps host ports (keys) to container ports (values).","type":"array","items":{"$ref":"#/definitions/container_svc.PortMapping"}}}},"container_svc.RunContainerResponse":{"type":"object","properties":{"ports":{"description":"Ports is returned here as host ports might get mapped dynamically.","type":"array","items":{"$ref":"#/definitions/container_svc.PortMapping"}},"started":{"type":"boolean"}}},"container_svc.StopContainerRequest":{"type":"object","properties":{"id":{"type":"string","example":"4378b76e05ba"},"name":{"type":"string","example":"sup-container-x"}}},"container_svc.StopContainerResponse":{"type":"object"},"container_svc.Volume":{"type":"object","properties":{"destination":{"description":"Destination is the path inside the container.","type":"string"},"readOnly":{"description":"ReadOnly indicates whether the mount is read-only.","type":"boolean"},"source":{"description":"Source is the host path or volume name.","type":"string"}}},"data_svc.CreateObjectFields":{"type":"object","required":["data","table"],"properties":{"authors":{"description":"Authors is a list of user ID and organization ID who created the object.\nIf an organization ID is not provided, the currently active organization will\nbe queried from the User Svc.","type":"array","items":{"type":"string"},"example":["["]},"data":{"type":"object","additionalProperties":true},"deleters":{"description":"Deleters is a list of user IDs and role IDs that can delete the object.\n` + "`" + `_self` + "`" + ` can be used to refer to the caller user's userId and\n` + "`" + `_org` + "`" + ` can be used to refer to the user's currently active organization (if exists).","type":"array","items":{"type":"string"}},"id":{"type":"string"},"readers":{"description":"Readers is a list of user IDs and role IDs that can read the object.\n` + "`" + `_self` + "`" + ` can be used to refer to the caller user's userId and\n` + "`" + `_org` + "`" + ` can be used to refer to the user's currently active organization (if exists).","type":"array","items":{"type":"string"}},"table":{"type":"string"},"writers":{"description":"Writers is a list of user IDs and role IDs that can write the object.\n` + "`" + `_self` + "`" + ` can be used to refer to the caller user's userId and\n` + "`" + `_org` + "`" + ` can be used to refer to the user's currently active organization (if exists).","type":"array","items":{"type":"string"}}}},"data_svc.CreateObjectRequest":{"type":"object","properties":{"object":{"$ref":"#/definitions/data_svc.CreateObjectFields"}}},"data_svc.CreateObjectResponse":{"type":"object","properties":{"object":{"$ref":"#/definitions/data_svc.Object"}}},"data_svc.DeleteObjectRequest":{"type":"object","properties":{"filters":{"type":"array","items":{"$ref":"#/definitions/datastore.Filter"}},"table":{"type":"string"}}},"data_svc.DeleteObjectResponse":{"type":"object"},"data_svc.ErrorResponse":{"type":"object","properties":{"error":{"type":"string"}}},"data_svc.Object":{"type":"object","required":["createdAt","data","table","updatedAt"],"properties":{"authors":{"description":"Authors is a list of user ID and organization ID who created the object.\nThe authors field tracks which users or organizations created an entry, helping to prevent spam.\nIf an organization ID is not provided, the currently active organization will\nbe queried from the User Svc.","type":"array","items":{"type":"string"},"example":["["]},"createdAt":{"type":"string"},"data":{"type":"object","additionalProperties":true},"deleters":{"description":"Deleters is a list of user IDs and role IDs that can delete the object.\n` + "`" + `_self` + "`" + ` can be used to refer to the caller user's userId and\n` + "`" + `_org` + "`" + ` can be used to refer to the user's currently active organization (if exists).","type":"array","items":{"type":"string"},"example":["["]},"id":{"type":"string"},"readers":{"description":"Readers is a list of user IDs and role IDs that can read the object.\n` + "`" + `_self` + "`" + ` can be used to refer to the caller user's userId and\n` + "`" + `_org` + "`" + ` can be used to refer to the user's currently active organization (if exists).","type":"array","items":{"type":"string"},"example":["["]},"table":{"type":"string"},"updatedAt":{"type":"string"},"writers":{"description":"Writers is a list of user IDs and role IDs that can write the object.\n` + "`" + `_self` + "`" + ` can be used to refer to the caller user's userId and\n` + "`" + `_org` + "`" + ` can be used to refer to the user's currently active organization (if exists).","type":"array","items":{"type":"string"},"example":["["]}}},"data_svc.QueryRequest":{"type":"object","properties":{"query":{"$ref":"#/definitions/datastore.Query"},"readers":{"type":"array","items":{"type":"string"}},"table":{"type":"string"}}},"data_svc.QueryResponse":{"type":"object","properties":{"objects":{"type":"array","items":{"$ref":"#/definitions/data_svc.Object"}}}},"data_svc.UpdateObjectsRequest":{"type":"object","properties":{"filters":{"description":"Filters to determine which objects will be updated.\nOnly objects matching all filters will be modified.","type":"array","items":{"$ref":"#/definitions/datastore.Filter"}},"object":{"description":"The object containing the fields to update in matching objects.","allOf":[{"$ref":"#/definitions/data_svc.Object"}]},"table":{"type":"string"}}},"data_svc.UpdateObjectsResponse":{"type":"object"},"data_svc.UpsertObjectRequest":{"type":"object","properties":{"object":{"$ref":"#/definitions/data_svc.CreateObjectFields"}}},"data_svc.UpsertObjectResponse":{"type":"object","properties":{"object":{"$ref":"#/definitions/data_svc.Object"}}},"datastore.Filter":{"type":"object","properties":{"fields":{"type":"array","items":{"type":"string"}},"op":{"$ref":"#/definitions/datastore.Op"},"subFilters":{"description":"SubFilters is used for operations like OR where multiple filters are combined.","type":"array","items":{"$ref":"#/definitions/datastore.Filter"}},"valuesJson":{"type":"string"}}},"datastore.Op":{"type":"string","enum":["or","equals","containsSubstring","startsWith","intersects","isInList"],"x-enum-varnames":["OpOr","OpEquals","OpContainsSubstring","OpStartsWith","OpIntersects","OpIsInList"]},"datastore.OrderBy":{"type":"object","properties":{"desc":{"description":"Desc indicates whether the sorting should be in descending order.","type":"boolean"},"field":{"description":"The field by which to order the results","type":"string"},"sortingType":{"description":"Defines the type of sorting to apply (numeric, text, date, etc.)","allOf":[{"$ref":"#/definitions/datastore.SortingType"}]}}},"datastore.Query":{"type":"object","properties":{"afterJson":{"description":"AfterJson is used for cursor-based pagination, which is more\neffective in scalable and distributed environments compared\nto offset-based pagination.","type":"string"},"count":{"description":"Count true means return the count of the dataset filtered by Filters\nwithout after or limit.","type":"boolean"},"filters":{"description":"Filters are filtering options of a query. It is advised to use\nIt's advised to use helper functions in your respective client library such as filter constructors (` + "`" + `all` + "`" + `, ` + "`" + `equal` + "`" + `, ` + "`" + `contains` + "`" + `, ` + "`" + `startsWith` + "`" + `) and field selectors (` + "`" + `field` + "`" + `, ` + "`" + `fields` + "`" + `, ` + "`" + `id` + "`" + `) for easier access.","type":"array","items":{"$ref":"#/definitions/datastore.Filter"}},"limit":{"description":"Limit the number of records in the result set.","type":"integer"},"orderBys":{"description":"OrderBys order the result set.","type":"array","items":{"$ref":"#/definitions/datastore.OrderBy"}}}},"datastore.SortingType":{"type":"string","enum":["","numeric","text","date","random"],"x-enum-varnames":["SortingTypeDefault","SortingTypeNumeric","SortingTypeText","SortingTypeDate","SortingTypeRandom"]},"deploy_svc.AutoScalingConfig":{"type":"object","properties":{"cpuThreshold":{"description":"CPU usage threshold for scaling (as a percentage)","type":"integer"},"maxReplicas":{"description":"Maximum number of replicas to run","type":"integer"},"minReplicas":{"description":"Minimum number of replicas to run","type":"integer"}}},"deploy_svc.DeleteDeploymentRequest":{"type":"object","required":["deploymentId"],"properties":{"deploymentId":{"type":"string"}}},"deploy_svc.DeleteDeploymentResponse":{"type":"object"},"deploy_svc.Deployment":{"type":"object","required":["definitionId","id"],"properties":{"autoScaling":{"description":"Optional: Auto-scaling rules","allOf":[{"$ref":"#/definitions/deploy_svc.AutoScalingConfig"}]},"definitionId":{"description":"DefinitionId is the id of the definition","type":"string","example":"def_deBXZMpxrQ"},"description":{"description":"Description of what this deployment does","type":"string","example":"Handles user service requests"},"details":{"description":"Details provides additional information about the deployment's current state,\nincluding both success and failure conditions (e.g., \"Deployment in progress\", \"Error pulling image\").","type":"string","example":"Deployment is in progress"},"envars":{"description":"Envars is a map of environment variables that will be passed down to service instances (see Registry Svc Instance)\nAlso see the Registry Svc Definition for required envars.","type":"object","additionalProperties":{"type":"string"}},"id":{"description":"ID of the deployment (e.g., \"depl_dbOdi5eLQK\")","type":"string","example":"depl_dbOdi5eLQK"},"name":{"description":"Short name for easy reference (e.g., \"user-service-v2\")","type":"string","example":"user-service-v2"},"replicas":{"description":"Number of container instances to run","type":"integer"},"resources":{"description":"Resource requirements for each replica","allOf":[{"$ref":"#/definitions/deploy_svc.ResourceLimits"}]},"status":{"description":"Current status of the deployment (e.g., \"OK\", \"Error\", \"Pending\")","allOf":[{"$ref":"#/definitions/deploy_svc.DeploymentStatus"}],"example":"OK"},"strategy":{"description":"Deployment strategy (e.g., rolling update)","allOf":[{"$ref":"#/definitions/deploy_svc.DeploymentStrategy"}]},"targetRegions":{"description":"Target deployment regions or clusters","type":"array","items":{"$ref":"#/definitions/deploy_svc.TargetRegion"}}}},"deploy_svc.DeploymentStatus":{"type":"string","enum":["OK","Error","Pending","Failed","Deploying"],"x-enum-varnames":["DeploymentStatusOK","DeploymentStatusError","DeploymentStatusPending","DeploymentStatusFailed","DeploymentStatusDeploying"]},"deploy_svc.DeploymentStrategy":{"type":"object","properties":{"maxSurge":{"description":"Max extra replicas during update","type":"integer"},"maxUnavailable":{"description":"Max unavailable replicas during update","type":"integer"},"type":{"description":"Deployment strategy type (RollingUpdate, Recreate, etc.)","allOf":[{"$ref":"#/definitions/deploy_svc.StrategyType"}]}}},"deploy_svc.ErrorResponse":{"type":"object","properties":{"error":{"type":"string"}}},"deploy_svc.ListDeploymentsRequest":{"type":"object"},"deploy_svc.ListDeploymentsResponse":{"type":"object","properties":{"deployments":{"type":"array","items":{"$ref":"#/definitions/deploy_svc.Deployment"}}}},"deploy_svc.ResourceLimits":{"type":"object","properties":{"cpu":{"description":"CPU limit, e.g., \"500m\" for 0.5 cores","type":"string"},"memory":{"description":"Memory limit, e.g., \"128Mi\"","type":"string"},"vram":{"description":"Optional: GPU VRAM requirement, e.g., \"48GB\"","type":"string"}}},"deploy_svc.SaveDeploymentRequest":{"type":"object","properties":{"deployment":{"$ref":"#/definitions/deploy_svc.Deployment"}}},"deploy_svc.SaveDeploymentResponse":{"type":"object"},"deploy_svc.StrategyType":{"type":"string","enum":["RollingUpdate","Recreate"],"x-enum-varnames":["StrategyRollingUpdate","StrategyRecreate"]},"deploy_svc.TargetRegion":{"type":"object","properties":{"cluster":{"description":"Cluster or node where service should be deployed (e.g., \"us-west1\", \"local-docker\")","type":"string"},"zone":{"description":"Optional: Specific zone for the deployment","type":"string"}}},"email_svc.Attachment":{"type":"object","required":["contentType","filename"],"properties":{"content":{"description":"Base64-encoded file content. Use this for small files.\nRequired for inline attachments (i.e., those not using File Svc, see FileId).","type":"string"},"contentType":{"description":"MIME type of the file (e.g., \"application/pdf\", \"image/png\")\nRequired for inline attachments (i.e., those not using File Svc, see FileId).","type":"string"},"fileId":{"description":"A File Svc file ID. Requires the file to be uploaded separately.\nRecommended for mid to large-sized files.\nIf this field is specified, all other fields are optional.","type":"string"},"filename":{"description":"File name for the attachment.\nRequired for inline attachments (i.e., those not using File Svc, see FileId).","type":"string"}}},"email_svc.ErrorResponse":{"type":"object","properties":{"error":{"type":"string"}}},"email_svc.SendEmailRequest":{"type":"object","required":["body","subject","to"],"properties":{"attachments":{"description":"List of file attachments (optional)","type":"array","items":{"$ref":"#/definitions/email_svc.Attachment"}},"bcc":{"description":"List of BCC recipient email addresses (optional)","type":"array","items":{"type":"string"}},"body":{"description":"Email body content (plain text or HTML)","type":"string"},"cc":{"description":"List of CC recipient email addresses (optional)","type":"array","items":{"type":"string"}},"contentType":{"description":"Content type: \"text/plain\" or \"text/html\"","type":"string"},"id":{"description":"Unique identifier","type":"string"},"subject":{"description":"Email subject line","type":"string"},"to":{"description":"List of recipient email addresses","type":"array","items":{"type":"string"}}}},"email_svc.SendEmailResponse":{"type":"object","properties":{"emailId":{"description":"Unique identifier for the sent email","type":"string"},"status":{"description":"Status of the email send operation (\"sent\", \"queued\", etc.)","type":"string"}}},"file_svc.Download":{"type":"object","required":["createdAt","updatedAt"],"properties":{"createdAt":{"type":"string"},"downloadedBytes":{"description":"DownloadedBytes exists to show the download progress in terms of the number of bytes already downloaded.","type":"integer","format":"int64"},"error":{"type":"string"},"fileName":{"type":"string"},"filePath":{"type":"string"},"fileSize":{"description":"FileSize is the full final downloaded file size.","type":"integer","format":"int64"},"id":{"type":"string"},"progress":{"type":"number"},"status":{"type":"string"},"updatedAt":{"type":"string"},"url":{"type":"string"}}},"file_svc.DownloadFileRequest":{"type":"object","required":["url"],"properties":{"folderPath":{"type":"string"},"url":{"type":"string"}}},"file_svc.DownloadsResponse":{"type":"object","properties":{"downloads":{"type":"array","items":{"$ref":"#/definitions/file_svc.Download"}}}},"file_svc.ErrorResponse":{"type":"object","properties":{"error":{"type":"string"}}},"file_svc.GetDownloadResponse":{"type":"object","required":["exists"],"properties":{"download":{"$ref":"#/definitions/file_svc.Download"},"exists":{"type":"boolean"}}},"file_svc.ListUploadsRequest":{"type":"object","properties":{"after":{"description":"After time value","type":"string"},"limit":{"type":"integer"},"userId":{"type":"string"}}},"file_svc.ListUploadsResponse":{"type":"object","properties":{"uploads":{"type":"array","items":{"$ref":"#/definitions/file_svc.Upload"}}}},"file_svc.Upload":{"type":"object","required":["createdAt","fileId","fileName","filePath","fileSize","id","nodeId","updatedAt","userId"],"properties":{"createdAt":{"type":"string"},"fileId":{"description":"Logical file ID spanning all replicas","type":"string"},"fileName":{"description":"Filename is the original name of the file","type":"string"},"filePath":{"description":"FilePath is the full node local path of the file","type":"string"},"fileSize":{"type":"integer","format":"int64"},"id":{"description":"Unique ID for this replica","type":"string"},"nodeId":{"description":"ID of the node storing this replica","type":"string"},"updatedAt":{"type":"string"},"userId":{"type":"string"}}},"file_svc.UploadFileResponse":{"type":"object","properties":{"upload":{"$ref":"#/definitions/file_svc.Upload"}}},"firehose_svc.ErrorResponse":{"type":"object","properties":{"error":{"type":"string"}}},"firehose_svc.Event":{"type":"object","properties":{"data":{},"name":{"type":"string"}}},"firehose_svc.EventPublishRequest":{"type":"object","properties":{"event":{"$ref":"#/definitions/firehose_svc.Event"}}},"image_svc.ErrorResponse":{"type":"object","properties":{"error":{"type":"string"}}},"model_svc.Architectures":{"type":"object","properties":{"cuda":{"description":"CUDA-specific container parameters, if applicable.","allOf":[{"$ref":"#/definitions/model_svc.CudaParameters"}]},"default":{"description":"Default container configuration for non-GPU environments.","allOf":[{"$ref":"#/definitions/model_svc.DefaultParameters"}]}}},"model_svc.Asset":{"type":"object","required":["envVarKey","url"],"properties":{"envVarKey":{"type":"string"},"url":{"type":"string"}}},"model_svc.Container":{"type":"object","properties":{"envars":{"description":"Environment variables to be passed to the container (e.g., \"DEVICES=all\").","type":"array","items":{"$ref":"#/definitions/model_svc.EnvVar"}},"imageTemplate":{"description":"Template for constructing the container image name.","type":"string"},"keeps":{"description":"List of container paths that should persist across restarts.","type":"array","items":{"$ref":"#/definitions/model_svc.Keep"}},"port":{"description":"Internal port exposed by the container.","type":"integer"}}},"model_svc.CudaParameters":{"type":"object","properties":{"container":{"description":"Container configuration related to CUDA usage.","allOf":[{"$ref":"#/definitions/model_svc.Container"}]},"cudaVersionPrecision":{"description":"Level of precision for selecting the CUDA version when resolving the container image.\n- 2 -\u003e Use \"major.minor\" (e.g., \"12.2\")\n- 3 -\u003e Use \"major.minor.patch\" (e.g., \"12.2.0\")","type":"integer"},"defaultCudaVersion":{"description":"Default CUDA version to use (e.g., \"12.2\" or \"12.2.0\").","type":"string"},"defaultCudnnVersion":{"description":"Default cuDNN version to use alongside CUDA.","type":"string"}}},"model_svc.DefaultParameters":{"type":"object","properties":{"container":{"$ref":"#/definitions/model_svc.Container"}}},"model_svc.EnvVar":{"type":"object","properties":{"key":{"description":"Key is the environment variable name.","type":"string"},"value":{"description":"Value is the environment variable value.","type":"string"}}},"model_svc.ErrorResponse":{"type":"object","properties":{"error":{"type":"string"}}},"model_svc.GetModelResponse":{"type":"object","required":["exists","model","platform"],"properties":{"exists":{"type":"boolean"},"model":{"$ref":"#/definitions/model_svc.Model"},"platform":{"$ref":"#/definitions/model_svc.Platform"}}},"model_svc.Keep":{"type":"object","properties":{"path":{"description":"Path is the absolute path inside the container for the folder that should persist across restarts.","type":"string"},"readOnly":{"description":"ReadOnly indicates whether the keep is read-only.","type":"boolean"}}},"model_svc.ListModelsResponse":{"type":"object","properties":{"models":{"type":"array","items":{"$ref":"#/definitions/model_svc.Model"}}}},"model_svc.ListPlatformsResponse":{"type":"object","required":["platforms"],"properties":{"platforms":{"type":"array","items":{"$ref":"#/definitions/model_svc.Platform"}}}},"model_svc.MakeDefaultResponse":{"type":"object"},"model_svc.Model":{"type":"object","required":["id","name","platformId"],"properties":{"assets":{"type":"array","items":{"$ref":"#/definitions/model_svc.Asset"}},"bits":{"type":"integer"},"description":{"type":"string"},"extension":{"type":"string"},"flavour":{"type":"string"},"fullName":{"type":"string"},"id":{"type":"string"},"maxBits":{"type":"integer"},"maxRam":{"type":"number"},"mirrors":{"type":"array","items":{"type":"string"}},"name":{"type":"string"},"parameters":{"type":"string"},"platformId":{"type":"string"},"promptTemplate":{"type":"string"},"quality":{"type":"string"},"quantComment":{"type":"string"},"size":{"type":"number"},"tags":{"type":"array","items":{"type":"string"}},"uncensored":{"type":"boolean"},"version":{"type":"string"}}},"model_svc.ModelStatus":{"type":"object","required":["address","assetsReady","running"],"properties":{"address":{"type":"string"},"assetsReady":{"type":"boolean"},"running":{"description":"Running triggers onModelLaunch on the frontend.\n\tRunning is true when the model is both running and answering\n\t- fully loaded.","type":"boolean"}}},"model_svc.Platform":{"type":"object","properties":{"architectures":{"$ref":"#/definitions/model_svc.Architectures"},"id":{"type":"string"},"name":{"type":"string"},"types":{"description":"List of prompt types that the AI engine supports.","type":"array","items":{"$ref":"#/definitions/prompt_svc.PromptType"}},"version":{"type":"integer"}}},"model_svc.StartResponse":{"type":"object"},"model_svc.StatusResponse":{"type":"object","properties":{"status":{"$ref":"#/definitions/model_svc.ModelStatus"}}},"policy_svc.BlocklistParameters":{"type":"object","properties":{"blockedIPs":{"type":"array","items":{"type":"string"}}}},"policy_svc.CheckRequest":{"type":"object","properties":{"endpoint":{"type":"string"},"ip":{"type":"string"},"method":{"type":"string"},"userId":{"type":"string"}}},"policy_svc.CheckResponse":{"type":"object","required":["allowed"],"properties":{"allowed":{"type":"boolean"}}},"policy_svc.Entity":{"type":"string","enum":["userId","ip"],"x-enum-varnames":["EntityUserID","EntityIP"]},"policy_svc.ErrorResponse":{"type":"object","properties":{"error":{"type":"string"}}},"policy_svc.Instance":{"type":"object","required":["parameters","templateId"],"properties":{"endpoint":{"type":"string","example":"/user-svc/register"},"id":{"type":"string"},"parameters":{"$ref":"#/definitions/policy_svc.Parameters"},"templateId":{"allOf":[{"$ref":"#/definitions/policy_svc.TemplateId"}],"example":"rate-limit"}}},"policy_svc.Parameters":{"type":"object","properties":{"blocklist":{"$ref":"#/definitions/policy_svc.BlocklistParameters"},"rateLimit":{"$ref":"#/definitions/policy_svc.RateLimitParameters"}}},"policy_svc.RateLimitParameters":{"type":"object","properties":{"entity":{"allOf":[{"$ref":"#/definitions/policy_svc.Entity"}],"example":"userId"},"maxRequests":{"type":"integer","example":10},"scope":{"allOf":[{"$ref":"#/definitions/policy_svc.Scope"}],"example":"endpoint"},"timeWindow":{"type":"string","example":"1m"}}},"policy_svc.Scope":{"type":"string","enum":["endpoint","global"],"x-enum-varnames":["ScopeEndpoint","ScopeGlobal"]},"policy_svc.TemplateId":{"type":"string","enum":["rate-limit","blocklist"],"x-enum-varnames":["TemplateIdRateLimit","TemplateIdBlocklist"]},"policy_svc.UpsertInstanceRequest":{"type":"object","properties":{"instance":{"$ref":"#/definitions/policy_svc.Instance"}}},"policy_svc.UpsertInstanceResponse":{"type":"object"},"prompt_svc.EngineParameters":{"type":"object","properties":{"llamaCppParameters":{"$ref":"#/definitions/prompt_svc.LlamaCppParameters"},"stableDiffusion":{"$ref":"#/definitions/prompt_svc.StableDiffusionParameters"}}},"prompt_svc.ErrorResponse":{"type":"object","properties":{"error":{"type":"string"}}},"prompt_svc.ListPromptsRequest":{"type":"object","properties":{"query":{"$ref":"#/definitions/datastore.Query"}}},"prompt_svc.ListPromptsResponse":{"type":"object","properties":{"after":{},"count":{"type":"integer"},"prompts":{"type":"array","items":{"$ref":"#/definitions/prompt_svc.Prompt"}}}},"prompt_svc.LlamaCppParameters":{"type":"object","properties":{"template":{"description":"Template of the prompt. Optional. If not present it's derived from ModelId.","type":"string","example":"[INST]{prompt}[/INST]"}}},"prompt_svc.Parameters":{"type":"object","properties":{"textToImage":{"$ref":"#/definitions/prompt_svc.TextToImageParameters"},"textToText":{"$ref":"#/definitions/prompt_svc.TextToTextParameters"}}},"prompt_svc.Prompt":{"type":"object","required":["prompt"],"properties":{"createdAt":{"description":"CreatedAt is the time of the prompt creation.","type":"string"},"engineParameters":{"description":"AI engine/platform (eg. LlamaCpp, Stable Diffusion) specific parameters","allOf":[{"$ref":"#/definitions/prompt_svc.EngineParameters"}]},"error":{"description":"Error that arose during prompt execution, if any.","type":"string"},"id":{"description":"Id is the unique ID of the prompt.","type":"string"},"lastRun":{"description":"LastRun is the time of the last prompt run.","type":"string"},"maxRetries":{"description":"MaxRetries specified how many times the system should retry a prompt when it keeps erroring.","type":"integer","example":10},"modelId":{"description":"ModelId is just the 1Backend internal ID of the model.","type":"string","example":"huggingface/TheBloke/mistral-7b-instruct-v0.2.Q3_K_S.gguf"},"parameters":{"description":"AI engine/platform (eg. LlamaCpp, Stable Diffusion) agnostic parameters.\nUse these high level parameters when you don't care about the actual engine, only\nthe functionality (eg. text to image, image to image) it provides.","allOf":[{"$ref":"#/definitions/prompt_svc.Parameters"}]},"prompt":{"description":"Prompt is the message itself eg. \"What's a banana?","type":"string","example":"What's a banana?"},"requestMessageId":{"type":"string"},"responseMessageId":{"type":"string"},"runCount":{"description":"RunCount is the number of times the prompt was retried due to errors","type":"integer"},"status":{"description":"Status of the prompt.","allOf":[{"$ref":"#/definitions/prompt_svc.PromptStatus"}]},"sync":{"description":"Sync drives whether prompt add request should wait and hang until\nthe prompt is done executing. By default the prompt just gets put on a queue\nand the client will just subscribe to a Thread Stream.\nFor quick and dirty scripting however it's often times easier to do things syncronously.\nIn those cases set Sync to true.","type":"boolean"},"threadId":{"description":"ThreadId is the ID of the thread a prompt belongs to.\nClients subscribe to Thread Streams to see the answer to a prompt,\nor set ` + "`" + `prompt.sync` + "`" + ` to true for a blocking answer.","type":"string"},"type":{"description":"Type is inferred from the ` + "`" + `Parameters` + "`" + ` or ` + "`" + `EngineParameters` + "`" + ` field.\nEg. A LLamaCpp prompt will be \"Text-to-Text\",\na Stabel Diffusion one will be \"Text-to-Image\" etc.","allOf":[{"$ref":"#/definitions/prompt_svc.PromptType"}]},"updatedAt":{"description":"UpdatedAt is the last time the prompt was updated.","type":"string"},"userId":{"description":"UserId contains the ID of the user who submitted the prompt.","type":"string"}}},"prompt_svc.PromptRequest":{"type":"object","required":["prompt"],"properties":{"engineParameters":{"description":"AI engine/platform (eg. Llama, Stable Diffusion) specific parameters","allOf":[{"$ref":"#/definitions/prompt_svc.EngineParameters"}]},"id":{"description":"Id is the unique ID of the prompt.","type":"string"},"maxRetries":{"description":"MaxRetries specified how many times the system should retry a prompt when it keeps erroring.","type":"integer","example":10},"modelId":{"description":"ModelId is just the 1Backend internal ID of the model.","type":"string","example":"huggingface/TheBloke/mistral-7b-instruct-v0.2.Q3_K_S.gguf"},"parameters":{"description":"AI engine/platform (eg. Llama, Stable Diffusion) agnostic parameters.\nUse these high level parameters when you don't care about the actual engine, only\nthe functionality (eg. text to image, image to image) it provides.","allOf":[{"$ref":"#/definitions/prompt_svc.Parameters"}]},"prompt":{"description":"Prompt is the message itself eg. \"What's a banana?","type":"string","example":"What's a banana?"},"sync":{"description":"Sync drives whether prompt add request should wait and hang until\nthe prompt is done executing. By default the prompt just gets put on a queue\nand the client will just subscribe to a Thread Stream.\nFor quick and dirty scripting however it's often times easier to do things synchronously.\nIn those cases set Sync to true.","type":"boolean"},"threadId":{"description":"ThreadId is the ID of the thread a prompt belongs to.\nClients subscribe to Thread Streams to see the answer to a prompt,\nor set ` + "`" + `prompt.sync` + "`" + ` to true for a blocking answer.","type":"string"}}},"prompt_svc.PromptResponse":{"type":"object","properties":{"prompt":{"description":"Prompt contains the details of the prompt that was just created by this request.\nThis includes the ID, prompt text, status, and other associated metadata.","allOf":[{"$ref":"#/definitions/prompt_svc.Prompt"}]},"responseMessage":{"description":"Response message contains the response text and files.\nThis field is populated only for synchronous prompts (` + "`" + `sync = true` + "`" + `).\nFor asynchronous prompts, the response will provided in the associated\nmessage identified by the ` + "`" + `responseMessageId` + "`" + ` of the ` + "`" + `promptSvc.prompt` + "`" + ` object once the prompt completes.","allOf":[{"$ref":"#/definitions/chat_svc.Message"}]}}},"prompt_svc.PromptStatus":{"type":"string","enum":["scheduled","running","completed","errored","abandoned","canceled"],"x-enum-varnames":["PromptStatusScheduled","PromptStatusRunning","PromptStatusCompleted","PromptStatusErrored","PromptStatusAbandoned","PromptStatusCanceled"]},"prompt_svc.PromptType":{"type":"string","enum":["Image-Text-to-Text","Visual Question Answering","Document Question Answering","Text-to-Image","Image-to-Image","Image-to-Video","Unconditional Image Generation","Text-to-Video","Zero-Shot Image Classification","Zero-Shot Object Detection","Text-to-3D","Image-to-3D","Image Feature Extraction","Keypoint Detection","Text-to-Text","Question Answering","Translation","Summarization","Text Generation","Fill-Mask","Text-to-Speech","Text-to-Audio","Automatic Speech Recognition","Audio-to-Audio","Audio Classification","Reinforcement Learning","Robotics","Graph Machine Learning"],"x-enum-varnames":["PromptTypeImageTextToText","PromptTypeVisualQuestionAnswering","PromptTypeDocumentQuestionAnswering","PromptTypeTextToImage","PromptTypeImageToImage","PromptTypeImageToVideo","PromptTypeUnconditionalImageGeneration","PromptTypeTextToVideo","PromptTypeZeroShotImageClassification","PromptTypeZeroShotObjectDetection","PromptTypeTextTo3D","PromptTypeImageTo3D","PromptTypeImageFeatureExtraction","PromptTypeKeypointDetection","PromptTypeTextToText","PromptTypeQuestionAnswering","PromptTypeTranslation","PromptTypeSummarization","PromptTypeTextGeneration","PromptTypeFillMask","PromptTypeTextToSpeech","PromptTypeTextToAudio","PromptTypeAutomaticSpeechRecognition","PromptTypeAudioToAudio","PromptTypeAudioClassification","PromptTypeReinforcementLearning","PromptTypeRobotics","PromptTypeGraphMachineLearning"]},"prompt_svc.RemovePromptRequest":{"type":"object","properties":{"promptId":{"type":"string"}}},"prompt_svc.RemovePromptResponse":{"type":"object"},"prompt_svc.StableDiffusionParameters":{"type":"object","properties":{"txt2Img":{"description":"Text to image parameters","allOf":[{"$ref":"#/definitions/stable_diffusion.Txt2ImgRequest"}]}}},"prompt_svc.TextToImageParameters":{"type":"object","properties":{"aspectRatio":{"description":"Alternative way to specify dimensions (e.g., \"16:9\", \"1:1\").","type":"string"},"batchSize":{"description":"Number of images to generate per batch.","type":"integer"},"denoisingStrength":{"description":"Controls how much variation is introduced in image modifications.","type":"number"},"enableUpscaling":{"description":"Whether to apply AI-based upscaling.","type":"boolean"},"format":{"description":"Output format for the generated image (png, jpg, webp, etc.).","type":"string"},"guidanceScale":{"description":"How closely the output should follow the prompt.","type":"number"},"height":{"type":"integer"},"negativePrompt":{"description":"A negative prompt to specify what should be avoided in the image.","type":"string"},"numIterations":{"description":"Number of batches to generate.","type":"integer"},"prompt":{"description":"The primary prompt for generating the image.\nDefaults to the top-level prompt if not specified.\nIf both are provided (which should be avoided), this field takes precedence.","type":"string"},"qualityPreset":{"description":"Preset quality settings (e.g., Low, Medium, High, Ultra).","type":"string"},"restoreFaces":{"description":"Whether to enhance facial details for portraits.","type":"boolean"},"scheduler":{"description":"Specifies the sampling method used during generation.","type":"string"},"seed":{"description":"Optional seed for reproducibility. If not set, a random seed is used.","type":"integer"},"steps":{"description":"Number of inference steps for image generation.","type":"integer"},"styles":{"description":"List of artistic styles or themes to apply.","type":"array","items":{"type":"string"}},"width":{"description":"Image dimensions (width and height in pixels).","type":"integer"}}},"prompt_svc.TextToTextParameters":{"type":"object","properties":{"template":{"description":"Template of the prompt. Optional. If not present it's derived from ModelId.","type":"string","example":"[INST]{prompt}[/INST]"}}},"prompt_svc.TypesRequest":{"type":"object"},"prompt_svc.TypesResponse":{"type":"object","properties":{"chunk":{"$ref":"#/definitions/prompt_svc_stream.Chunk"}}},"prompt_svc_stream.Chunk":{"type":"object","properties":{"messageId":{"description":"MessageId is the ChatSvc Message id that the chunk is part of.\nMight only be available for \"done\" chunks.","type":"string"},"text":{"description":"TextChunk contains a part of the text output from the stream.","type":"string"},"type":{"description":"Type indicates the type of the stream event (e.g., text, done).","allOf":[{"$ref":"#/definitions/prompt_svc_stream.ChunkType"}]}}},"prompt_svc_stream.ChunkType":{"type":"string","enum":["progress","done"],"x-enum-varnames":["ChunkTypeProgress","ChunkTypeDone"]},"proxy_svc.Cert":{"type":"object","required":["cert","createdAt","id","updatedAt"],"properties":{"cert":{"description":"PEM-encoded certificate bundle\n\n -----BEGIN EC PARAMETERS-----\n BggqhkjOPQMBBw==\n -----END EC PARAMETERS-----\n -----BEGIN EC PRIVATE KEY-----\n MHcCAQEEIDC3+7pySTQl6WRBuef...\n -----END EC PRIVATE KEY-----\n -----BEGIN CERTIFICATE-----\n MIIBhTCCASugAwIBAgIUQYwE...\n -----END CERTIFICATE-----","type":"string"},"commonName":{"description":"Subject Common Name (typically domain)","type":"string"},"createdAt":{"description":"When cert record was created","type":"string"},"dnsNames":{"description":"Subject Alternative Names (covered domains)","type":"array","items":{"type":"string"}},"id":{"description":"Id is the host which this cert is for, e.g., \"example.com\" or \"www.example.com\"","type":"string","example":"example.com"},"isCA":{"description":"Whether cert is a CA (usually false for LE certs)","type":"boolean"},"issuer":{"description":"Certificate issuer name (e.g., Let's Encrypt)","type":"string"},"notAfter":{"description":"Cert validity end time","type":"string"},"notBefore":{"description":"Cert validity start time","type":"string"},"publicKeyAlgorithm":{"description":"Public key algorithm (e.g., RSA, ECDSA)","type":"string"},"publicKeyBitLength":{"description":"Bit length of the public key","type":"integer"},"serialNumber":{"description":"Unique certificate serial number","type":"string"},"signatureAlgorithm":{"description":"Algorithm used to sign the cert (e.g., SHA256-RSA)","type":"string"},"updatedAt":{"description":"When cert record was last updated","type":"string"}}},"proxy_svc.CertInput":{"type":"object","required":["cert","id"],"properties":{"cert":{"description":"PEM-encoded certificate bundle\n\n -----BEGIN EC PARAMETERS-----\n BggqhkjOPQMBBw==\n -----END EC PARAMETERS-----\n -----BEGIN EC PRIVATE KEY-----\n MHcCAQEEIDC3+7pySTQl6WRBuef...\n -----END EC PRIVATE KEY-----\n -----BEGIN CERTIFICATE-----\n MIIBhTCCASugAwIBAgIUQYwE...\n -----END CERTIFICATE-----","type":"string"},"id":{"description":"Id is the host which this cert is for, e.g., \"example.com\" or \"www.example.com\"","type":"string","example":"example.com"}}},"proxy_svc.ErrorResponse":{"type":"object","properties":{"error":{"type":"string"}}},"proxy_svc.ListCertsRequest":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"}}}},"proxy_svc.ListCertsResponse":{"type":"object","properties":{"certs":{"type":"array","items":{"$ref":"#/definitions/proxy_svc.Cert"}}}},"proxy_svc.ListRoutesRequest":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"}}}},"proxy_svc.ListRoutesResponse":{"type":"object","properties":{"routes":{"type":"array","items":{"$ref":"#/definitions/proxy_svc.Route"}}}},"proxy_svc.Route":{"type":"object","required":["id","target"],"properties":{"id":{"description":"Id is the routing key: host plus optional path prefix.\nExample:\n  \"x.com\"              -\u003e root of the domain\n  \"x.com/path1\"        -\u003e microfrontend at /path1\n  \"x.com/path1/path2\"  -\u003e deeper microfrontend mounted at /path1/path2\n\nUse case: multiple microfrontends served under the same host but\nseparated by URL path segments. For example:\n  - Marketing site at x.com\n  - Dashboard at x.com/app\n  - Admin UI at x.com/app/admin\n\nLookup algorithm:\n  1. Take the request host and path (e.g. \"x.com/app/admin/users\").\n  2. Try to match the longest registered Id by progressively stripping\n     trailing path segments:\n        - x.com/app/admin/users   (no match)\n        - x.com/app/admin         (match -\u003e admin UI)\n  3. If still no match, strip again:\n        - x.com/app               (match -\u003e dashboard)\n  4. If still no match, fallback to host-only route:\n        - x.com                   (match -\u003e marketing site)\n  5. If no host-only route exists, return 404.\n\nThis provides deterministic longest-prefix routing without regex or\nrule engines, keeping the model simple but enabling path-based\nmicrofrontend composition.","type":"string"},"target":{"type":"string"}}},"proxy_svc.RouteInput":{"type":"object","required":["id"],"properties":{"id":{"description":"Id is the host itself, e.g. \"test.localhost\"","type":"string"},"target":{"type":"string"}}},"proxy_svc.SaveCertsRequest":{"type":"object","properties":{"certs":{"type":"array","items":{"$ref":"#/definitions/proxy_svc.CertInput"}}}},"proxy_svc.SaveCertsResponse":{"type":"object"},"proxy_svc.SaveRoutesRequest":{"type":"object","properties":{"routes":{"type":"array","items":{"$ref":"#/definitions/proxy_svc.RouteInput"}}}},"proxy_svc.SaveRoutesResponse":{"type":"object","properties":{"routes":{"type":"array","items":{"$ref":"#/definitions/proxy_svc.Route"}}}},"registry_svc.APISpec":{"type":"object","properties":{"metadata":{"description":"Additional metadata about the API (e.g., author, license, etc.)","type":"object","additionalProperties":{"type":"string"}},"protocolType":{"description":"Protocol type (e.g., OpenAPI, Swagger, etc.)","type":"string"},"url":{"description":"URL to the OpenAPI file or other API definition","type":"string"},"version":{"description":"Version of the API specification (e.g., 3.0.0)","type":"string"}}},"registry_svc.Client":{"type":"object","required":["language","url"],"properties":{"language":{"description":"Programming language.","allOf":[{"$ref":"#/definitions/registry_svc.Language"}],"example":"JavaScript"},"url":{"description":"The URL of the client.","type":"string","example":"https://example.com/client.js"}}},"registry_svc.Definition":{"type":"object","required":["id"],"properties":{"apiSpecs":{"description":"API Specs such as OpenAPI definitions etc.","type":"array","items":{"$ref":"#/definitions/registry_svc.APISpec"}},"clients":{"description":"Programming language clients such as on npm or GitHub.","type":"array","items":{"$ref":"#/definitions/registry_svc.Client"}},"envars":{"description":"Envars is a map of Renvironment variables that a deployment (see Deploy Svc Deployment) of this definition will REQUIRE to run.\nE.g., {\"DB_URL\": \"mysql://user:password@host:port/db\"}\nThese will be injected into the service instances (see Registry Svc Instance) at runtime.\nThe value of a key here is the default value. The actual value can be overridden at deployment time.","type":"array","items":{"$ref":"#/definitions/registry_svc.EnvVar"}},"id":{"type":"string"},"image":{"description":"Container specifications for Docker, K8s, etc.\nUse this to deploy already built images.","allOf":[{"$ref":"#/definitions/registry_svc.ImageSpec"}]},"ports":{"description":"Ports have host ports and internal ports currently but they\nreally only should have internal ports as host ports should be assigned\nby the system. Host ports might go away in the future.","type":"array","items":{"$ref":"#/definitions/registry_svc.PortMapping"}},"repository":{"description":"Repository based definitions is an alternative to Image definitions.\nInstead of deploying an already built and pushed image, a source code repository\nurl can be provided. The container will be built from the source.","allOf":[{"$ref":"#/definitions/registry_svc.RepositorySpec"}]}}},"registry_svc.EnvVar":{"type":"object","required":["key","value"],"properties":{"key":{"description":"Key is the environment variable name.","type":"string"},"value":{"description":"Value is the environment variable value.","type":"string"}}},"registry_svc.ErrorResponse":{"type":"object","properties":{"error":{"type":"string"}}},"registry_svc.GPU":{"type":"object","properties":{"busId":{"type":"string"},"computeMode":{"type":"string"},"cudaVersion":{"type":"string"},"gpuUtilization":{"type":"number"},"id":{"description":"Id Node.URL + IntraNodeId","type":"string"},"intraNodeId":{"type":"integer"},"memoryTotal":{"type":"integer"},"memoryUsage":{"type":"integer"},"name":{"type":"string"},"performanceState":{"type":"string"},"powerCap":{"type":"number"},"powerUsage":{"type":"number"},"processDetails":{"type":"array","items":{"$ref":"#/definitions/registry_svc.Process"}},"temperature":{"type":"number"}}},"registry_svc.ImageSpec":{"type":"object","required":["internalPorts","name"],"properties":{"internalPorts":{"description":"InternalPorts are the ports the container will listen on internally","type":"array","items":{"type":"integer"}},"name":{"description":"Name is the container image name/URL to use for the container","type":"string","example":"nginx:latest"}}},"registry_svc.Instance":{"type":"object","required":["id","status","url"],"properties":{"deploymentId":{"description":"The ID of the deployment that this instance is an instance of.\nOnly instances deployed by 1Backend have a DeploymentId.\nServices can be deployed through other means (Docker Compose, K8s, anything),\nin that case they self-register and will not have a DeploymentId.","type":"string","example":"depl_deBUCtJirc"},"details":{"description":"Details","type":"string","example":"Instance is healthy"},"host":{"description":"Host of the instance address. Required if URL is not provided","type":"string","example":"myserver.com"},"id":{"description":"Required: ID of the instance","type":"string","example":"inst_di9riJEvH2"},"ip":{"description":"IP of the instance address. Optional: to register by IP instead of host","type":"string","example":"8.8.8.8"},"lastHeartbeat":{"description":"Last time the instance gave a sign of life","type":"string"},"nodeUrl":{"description":"NodeURL is the URL of the 1Backend server the instance is running on.\nTo have a NodeURL the instance must either:\n- Be deployed by 1Backend\n- Declare the 1Backend server URL when registering its instance","type":"string","example":"https://myserver.com:11337"},"path":{"description":"Path of the instance address. Optional (e.g., \"/api\")","type":"string","example":"/your-svc"},"port":{"description":"Port of the instance address. Required if URL is not provided","type":"integer","example":8080},"scheme":{"description":"Scheme of the instance address. Required if URL is not provided.","type":"string","example":"https"},"slug":{"description":"Slug of the account that owns this instance\nServices that want to be proxied by their slug are advised to self register\ntheir instance at startup.\nKeep in mind, instances might be deployed by 1Backend yet they still won't be 1Backend services\nand they won't have slugs. Think NGINX, MySQL, etc.","type":"string","example":"my-svc"},"status":{"description":"Status","allOf":[{"$ref":"#/definitions/registry_svc.InstanceStatus"}],"example":"Healthy"},"tags":{"description":"Tags are used to filter instances","type":"array","items":{"type":"string"},"example":["tag1","tag2"]},"url":{"description":"Full address URL of the instance.","type":"string","example":"https://myserver.com:5981"}}},"registry_svc.InstanceStatus":{"type":"string","enum":["Unknown","Healthy","Degraded","Unreachable","Error"],"x-enum-comments":{"InstanceStatusDegraded":"Instance is responding but with performance issues or partial failures","InstanceStatusError":"Instance encountered errors or failed multiple health checks","InstanceStatusHealthy":"Instance is fully operational and responding as expected","InstanceStatusUnknown":"Default state when the instance status is not yet determined","InstanceStatusUnreachable":"Instance is not reachable, possibly down or with network issues"},"x-enum-varnames":["InstanceStatusUnknown","InstanceStatusHealthy","InstanceStatusDegraded","InstanceStatusUnreachable","InstanceStatusError"]},"registry_svc.Language":{"type":"string","enum":["JavaScript","Python","Java","C#","C++","Ruby","Go","Swift","PHP","TypeScript","Kotlin","Scala","Perl","Rust","Haskell","Clojure","Elixir","Objective-C","F#"],"x-enum-varnames":["JavaScript","Python","Java","CSharp","CPlusPlus","Ruby","Go","Swift","PHP","TypeScript","Kotlin","Scala","Perl","Rust","Haskell","Clojure","Elixir","ObjectiveC","FSharp"]},"registry_svc.ListDefinitionsResponse":{"type":"object","properties":{"definitions":{"type":"array","items":{"$ref":"#/definitions/registry_svc.Definition"}}}},"registry_svc.ListInstancesResponse":{"type":"object","properties":{"instances":{"type":"array","items":{"$ref":"#/definitions/registry_svc.Instance"}}}},"registry_svc.ListNodesRequest":{"type":"object","properties":{"ids":{"description":"Node IDs to filter on","type":"array","items":{"type":"string"}}}},"registry_svc.ListNodesResponse":{"type":"object","properties":{"nodes":{"type":"array","items":{"$ref":"#/definitions/registry_svc.Node"}}}},"registry_svc.Node":{"type":"object","required":["id","url"],"properties":{"availabilityZone":{"description":"The availability zone of the node","type":"string"},"gpus":{"description":"List of GPUs available on the node","type":"array","items":{"$ref":"#/definitions/registry_svc.GPU"}},"id":{"description":"Required: ID of the instance","type":"string","example":"node_di9riJEvH2"},"lastHeartbeat":{"description":"Last time the instance gave a sign of life","type":"string"},"region":{"description":"The region of the node","type":"string"},"url":{"description":"URL of the daemon running on the node.\nIf not configured defaults to hostname + default 1Backend server port.","type":"string"},"usage":{"description":"Resource usage metrics of the node.","allOf":[{"$ref":"#/definitions/registry_svc.ResourceUsage"}]}}},"registry_svc.NodeSelfRequest":{"type":"object"},"registry_svc.NodeSelfResponse":{"type":"object","required":["node"],"properties":{"node":{"$ref":"#/definitions/registry_svc.Node"}}},"registry_svc.PortMapping":{"type":"object","required":["host","internal"],"properties":{"host":{"type":"integer"},"internal":{"type":"integer"}}},"registry_svc.Process":{"type":"object","properties":{"memoryUsage":{"type":"integer"},"pid":{"type":"integer"},"processName":{"type":"string"}}},"registry_svc.RegisterInstanceRequest":{"type":"object","required":["url"],"properties":{"deploymentId":{"description":"The ID of the deployment that this instance is an instance of.","type":"string","example":"depl_deBUCtJirc"},"host":{"description":"Host of the instance address. Required if URL is not provided","type":"string","example":"myserver.com"},"id":{"type":"string","example":"inst_di9riJEvH2"},"ip":{"description":"IP of the instance address. Optional: to register by IP instead of host","type":"string","example":"8.8.8.8"},"path":{"description":"Path of the instance address. Optional (e.g., \"/api\")","type":"string","example":"/your-svc"},"port":{"description":"Port of the instance address. Required if URL is not provided","type":"integer","example":8080},"scheme":{"description":"Scheme of the instance address. Required if URL is not provided.","type":"string","example":"https"},"url":{"description":"Full address URL of the instance.","type":"string","example":"https://myserver.com:5981"}}},"registry_svc.RegisterInstanceResponse":{"type":"object"},"registry_svc.RepositorySpec":{"type":"object","required":["internalPorts","url"],"properties":{"buildContext":{"description":"Context is the path to the image build context","type":"string","example":"path/to/subfolder"},"containerFile":{"description":"ContainerFile is the path to the file that contains the container build instructions\nRelative from the build context. By default, it is assumed to be a Dockerfile.","type":"string","example":"docker/Dockerfile"},"internalPorts":{"description":"Ports the container will listen on internally","type":"array","items":{"type":"integer"}},"url":{"description":"URL is the URL to the repository","type":"string","example":"https://github.com/1backend/1backend.git"},"version":{"description":"Version of the code to use","type":"string","example":"v1.0.0"}}},"registry_svc.ResourceUsage":{"type":"object","properties":{"cpu":{"description":"CPU usage metrics.","allOf":[{"$ref":"#/definitions/registry_svc.Usage"}]},"disk":{"description":"Disk usage metrics.","allOf":[{"$ref":"#/definitions/registry_svc.Usage"}]},"memory":{"description":"Memory usage metrics.","allOf":[{"$ref":"#/definitions/registry_svc.Usage"}]}}},"registry_svc.SaveDefinitionRequest":{"type":"object","properties":{"definition":{"$ref":"#/definitions/registry_svc.Definition"}}},"registry_svc.SaveDefinitionResponse":{"type":"object"},"registry_svc.Usage":{"type":"object","properties":{"percent":{"description":"Usage percentage.","type":"number"},"total":{"description":"Total available amount (in bytes).","type":"integer","format":"int64"},"used":{"description":"Used amount (in bytes).","type":"integer","format":"int64"}}},"secret_svc.ChecksumAlgorithm":{"type":"string","enum":["","CRC32","BLAKE2s","SHA-256","SHA-512"],"x-enum-varnames":["ChecksumAlgorithmUnspecified","ChecksumAlgorithmCRC32","ChecksumAlgorithmBlake2s","ChecksumAlgorithmSha256","ChecksumAlgorithmSha512"]},"secret_svc.DecryptValueRequest":{"type":"object","properties":{"value":{"type":"string"},"values":{"type":"array","items":{"type":"string"}}}},"secret_svc.DecryptValueResponse":{"type":"object","properties":{"value":{"type":"string"},"values":{"type":"array","items":{"type":"string"}}}},"secret_svc.EncryptValueRequest":{"type":"object","properties":{"value":{"type":"string"},"values":{"type":"array","items":{"type":"string"}}}},"secret_svc.EncryptValueResponse":{"type":"object","properties":{"value":{"type":"string"},"values":{"type":"array","items":{"type":"string"}}}},"secret_svc.IsSecureResponse":{"type":"object","required":["isSecure"],"properties":{"isSecure":{"type":"boolean"}}},"secret_svc.ListSecretsRequest":{"type":"object","properties":{"id":{"type":"string"},"ids":{"type":"array","items":{"type":"string"}}}},"secret_svc.ListSecretsResponse":{"type":"object","properties":{"secrets":{"type":"array","items":{"$ref":"#/definitions/secret_svc.Secret"}}}},"secret_svc.RemoveSecretsRequest":{"type":"object","properties":{"id":{"type":"string"},"ids":{"type":"array","items":{"type":"string"}}}},"secret_svc.RemoveSecretsResponse":{"type":"object"},"secret_svc.SaveSecretsRequest":{"type":"object","properties":{"secrets":{"type":"array","items":{"$ref":"#/definitions/secret_svc.SecretInput"}}}},"secret_svc.SaveSecretsResponse":{"type":"object"},"secret_svc.Secret":{"type":"object","required":["appId","id","value"],"properties":{"appId":{"type":"string"},"canChangeDeleters":{"description":"Slugs of services/users who can change the deleters list","type":"array","items":{"type":"string"}},"canChangeReaders":{"description":"Slugs of services/users who can change the readers list","type":"array","items":{"type":"string"}},"canChangeWriters":{"description":"Slugs of services/users who can change the writers list","type":"array","items":{"type":"string"}},"checksum":{"description":"Checksum of the secret value","type":"string"},"checksumAlgorithm":{"description":"Algorithm used for the checksum (e.g., \"CRC32\")","allOf":[{"$ref":"#/definitions/secret_svc.ChecksumAlgorithm"}],"example":"CRC32"},"deleters":{"description":"Slugs of services/users who can delete the secret","type":"array","items":{"type":"string"}},"encrypted":{"description":"Whether the secret is encrypted\nAll secrets are encrypted before written to the DB.\nThis really only exists for write requests to know if the secret is already encrypted.\nIe: while most ` + "`" + `secret save [id] [value]` + "`" + ` commands are probably not encrypted,\nFile based saves, eg. ` + "`" + `secret save secretA.yaml` + "`" + ` are probably encrypted.","type":"boolean"},"id":{"description":"Envar- or slug-like id of the secret","type":"string"},"internalId":{"type":"string"},"readers":{"description":"Slugs of services/users who can read the secret","type":"array","items":{"type":"string"}},"value":{"description":"Secret Value","type":"string"},"writers":{"description":"Slugs of services/users who can modify the secret","type":"array","items":{"type":"string"}}}},"secret_svc.SecretInput":{"type":"object","required":["id"],"properties":{"appHost":{"type":"string"},"canChangeDeleters":{"description":"Slugs of services/users who can change the deleters list","type":"array","items":{"type":"string"}},"canChangeReaders":{"description":"Slugs of services/users who can change the readers list","type":"array","items":{"type":"string"}},"canChangeWriters":{"description":"Slugs of services/users who can change the writers list","type":"array","items":{"type":"string"}},"checksum":{"description":"Checksum of the secret value","type":"string"},"checksumAlgorithm":{"description":"Algorithm used for the checksum (e.g., \"CRC32\")","allOf":[{"$ref":"#/definitions/secret_svc.ChecksumAlgorithm"}],"example":"CRC32"},"deleters":{"description":"Slugs of services/users who can delete the secret","type":"array","items":{"type":"string"}},"encrypted":{"description":"Whether the secret is encrypted\nAll secrets are encrypted before written to the DB.\nThis really only exists for write requests to know if the secret is already encrypted.\nIe: while most ` + "`" + `secret save [id] [value]` + "`" + ` commands are probably not encrypted,\nFile based saves, eg. ` + "`" + `secret save secretA.yaml` + "`" + ` are probably encrypted.","type":"boolean"},"id":{"description":"Envar- or slug-like id of the secret","type":"string"},"readers":{"description":"Slugs of services/users who can read the secret","type":"array","items":{"type":"string"}},"value":{"description":"Secret Value","type":"string"},"writers":{"description":"Slugs of services/users who can modify the secret","type":"array","items":{"type":"string"}}}},"source_svc.CheckoutRepoRequest":{"type":"object","properties":{"password":{"description":"Password or token for HTTPS auth","type":"string"},"ssh_key":{"description":"SSH private key (optional for SSH connection)","type":"string"},"ssh_key_pwd":{"description":"Password for SSH private key if encrypted (optional)","type":"string"},"token":{"description":"Token for HTTPS auth (optional for SSH)","type":"string"},"url":{"description":"Full repository URL (e.g., https://github.com/user/repo)","type":"string"},"username":{"description":"Username for HTTPS or SSH user (optional for SSH)","type":"string"},"version":{"description":"Branch, tag, or commit SHA","type":"string"}}},"source_svc.CheckoutRepoResponse":{"type":"object","properties":{"dir":{"description":"Directory where the repository was checked out","type":"string"}}},"source_svc.ErrorResponse":{"type":"object","properties":{"error":{"type":"string"}}},"stable_diffusion.Txt2ImgRequest":{"type":"object","properties":{"alwayson_scripts":{"type":"object","additionalProperties":{"type":"string"}},"batch_size":{"type":"integer"},"cfg_scale":{"type":"number"},"comments":{"type":"object","additionalProperties":{"type":"string"}},"denoising_strength":{"type":"number"},"disable_extra_networks":{"type":"boolean"},"do_not_save_grid":{"type":"boolean"},"do_not_save_samples":{"type":"boolean"},"enable_hr":{"type":"boolean"},"eta":{"type":"number"},"firstpass_image":{"type":"string"},"firstphase_height":{"type":"integer"},"firstphase_width":{"type":"integer"},"force_task_id":{"type":"string"},"height":{"type":"integer"},"hr_checkpoint_name":{"type":"string"},"hr_negative_prompt":{"type":"string"},"hr_prompt":{"type":"string"},"hr_resize_x":{"type":"integer"},"hr_resize_y":{"type":"integer"},"hr_sampler_name":{"type":"string"},"hr_scale":{"type":"number"},"hr_scheduler":{"type":"string"},"hr_second_pass_steps":{"type":"integer"},"hr_upscaler":{"type":"string"},"infotext":{"type":"string"},"n_iter":{"type":"integer"},"negative_prompt":{"type":"string"},"override_settings":{"type":"object","additionalProperties":{"type":"string"}},"override_settings_restore_afterwards":{"type":"boolean"},"prompt":{"type":"string"},"refiner_checkpoint":{"type":"string"},"refiner_switch_at":{"type":"number"},"restore_faces":{"type":"boolean"},"s_churn":{"type":"number"},"s_min_uncond":{"type":"number"},"s_noise":{"type":"number"},"s_tmax":{"type":"number"},"s_tmin":{"type":"number"},"sampler_index":{"type":"string"},"sampler_name":{"type":"string"},"save_images":{"type":"boolean"},"scheduler":{"type":"string"},"script_args":{"type":"array","items":{"type":"string"}},"script_name":{"type":"string"},"seed":{"type":"integer"},"seed_resize_from_h":{"type":"integer"},"seed_resize_from_w":{"type":"integer"},"send_images":{"type":"boolean"},"steps":{"type":"integer"},"styles":{"type":"array","items":{"type":"string"}},"subseed":{"type":"integer"},"subseed_strength":{"type":"number"},"tiling":{"type":"boolean"},"width":{"type":"integer"}}},"user_svc.App":{"type":"object","required":["host","id"],"properties":{"host":{"type":"string"},"id":{"type":"string"}}},"user_svc.ChangePasswordRequest":{"type":"object","required":["currentPassword","newPassword"],"properties":{"currentPassword":{"type":"string"},"newPassword":{"type":"string"}}},"user_svc.ChangePasswordResponse":{"type":"object"},"user_svc.Contact":{"type":"object","required":["createdAt","handle","id","platform","updatedAt","userId"],"properties":{"createdAt":{"type":"string"},"deletedAt":{"type":"string"},"handle":{"description":"Handle is the platform local unique identifier.\nIe. while the ` + "`" + `id` + "`" + ` of a Twitter contact is ` + "`" + `twitter.com/thejoe` + "`" + `, the value will be only ` + "`" + `thejoe` + "`" + `.\nFor email and phones the ` + "`" + `id` + "`" + ` and the ` + "`" + `value` + "`" + ` will be the same.\nThis field mostly exists for display purposes.\n\nExample values: \"joe12\" (1backend username), \"thejoe\" (twitter username), \"joe@joesdomain.com\" (email)","type":"string","example":"thejoe"},"id":{"description":"The unique identifier, which can be a URL.\n\nExample values: \"joe12\" (1backend username), \"twitter.com/thejoe\" (twitter url), \"joe@joesdomain.com\" (email)","type":"string","example":"twitter.com/thejoe"},"isPrimary":{"description":"If this is the primary contact method","type":"boolean"},"platform":{"description":"Platform of the contact (e.g., \"email\", \"phone\", \"twitter\")","type":"string","example":"twitter"},"updatedAt":{"type":"string"},"userId":{"type":"string"},"verified":{"description":"Whether the contact is verified","type":"boolean"}}},"user_svc.ContactInput":{"type":"object","required":["id","platform"],"properties":{"handle":{"description":"Handle is the platform local unique identifier.\nIe. while the ` + "`" + `id` + "`" + ` of a Twitter contact is ` + "`" + `twitter.com/thejoe` + "`" + `, the value will be only ` + "`" + `thejoe` + "`" + `.\nFor email and phones the ` + "`" + `id` + "`" + ` and the ` + "`" + `value` + "`" + ` will be the same.\nThis field mostly exists for display purposes.\n\nExample values: \"joe12\" (1backend username), \"thejoe\" (twitter username), \"joe@joesdomain.com\" (email)","type":"string","example":"thejoe"},"id":{"description":"The unique identifier, which can be a URL.\n\nExample values: \"joe12\" (1backend username), \"twitter.com/thejoe\" (twitter url), \"joe@joesdomain.com\" (email)","type":"string","example":"twitter.com/thejoe"},"platform":{"description":"Platform of the contact (e.g., \"email\", \"phone\", \"twitter\")","type":"string","example":"twitter"}}},"user_svc.CreateUserRequest":{"type":"object","properties":{"appHost":{"type":"string","example":"shoes.com"},"contacts":{"type":"array","items":{"$ref":"#/definitions/user_svc.Contact"}},"password":{"type":"string"},"roleIds":{"type":"array","items":{"type":"string"}},"user":{"$ref":"#/definitions/user_svc.UserInput"}}},"user_svc.CreateUserResponse":{"type":"object"},"user_svc.DeleteMembershipRequest":{"type":"object"},"user_svc.DeleteMembershipResponse":{"type":"object"},"user_svc.DeleteUserResponse":{"type":"object"},"user_svc.Enroll":{"type":"object","required":["appId","createdAt","id","role","updatedAt"],"properties":{"appId":{"description":"App of the enroll.\nUse ` + "`" + `*` + "`" + ` to match all apps, such as when bootstrapping\nin services.","type":"string"},"contactId":{"description":"ContactId is the the recipient of the enroll.\nIf the user is already registered, the role is assigned immediately;\notherwise, it is applied upon registration.","type":"string"},"createdAt":{"type":"string"},"createdBy":{"description":"CreatedBy contains the ID of the user who created the Enroll.","type":"string"},"deletedAt":{"type":"string"},"id":{"type":"string","example":"inv_fIYPbMHIcI"},"internalId":{"type":"string"},"role":{"description":"Role specifies the role to be assigned to the ContactId.\nCallers can only assign roles they own, identified by their service slug\n(e.g., if \"my-service\" creates an enroll, the role must be \"my-service:admin\").\nDynamic organization roles can also be assigned\n(e.g., \"user-svc:org:{%orgId}:admin\" or \"user-svc:org:{%orgId}:user\"),\nbut in this case, the caller must be an admin of the target organization.","type":"string"},"updatedAt":{"type":"string"},"userId":{"description":"UserId is the recipient of the enroll.\nIf the user is already registered, the role is assigned immediately;\notherwise, it is applied upon registration.","type":"string"}}},"user_svc.EnrollInput":{"type":"object","required":["role"],"properties":{"appHost":{"type":"string"},"contactId":{"description":"ContactId is the the recipient of the enroll.\nIf the user is already registered, the role is assigned immediately;\notherwise, it is applied upon registration.","type":"string"},"id":{"type":"string","example":"inv_fIYPbMHIcI"},"role":{"type":"string"},"userId":{"description":"UserId is the recipient of the enroll.\nIf the user is already registered, the role is assigned immediately;\notherwise, it is applied upon registration.","type":"string"}}},"user_svc.ErrorResponse":{"type":"object","properties":{"error":{"type":"string"}}},"user_svc.ExchangeTokenRequest":{"type":"object","properties":{"newAppHost":{"description":"NewApp is the app of the new token that will be returned by this endpoint.","type":"string"},"newAppId":{"type":"string"},"newDevice":{"description":"NewDevice. If not provided, the device of the original token will be used.","type":"string"}}},"user_svc.ExchangeTokenResponse":{"type":"object","required":["token"],"properties":{"token":{"description":"Token is the new token that will be returned by this endpoint.","allOf":[{"$ref":"#/definitions/user_svc.Token"}]}}},"user_svc.GetPublicKeyResponse":{"type":"object","required":["publicKey"],"properties":{"publicKey":{"type":"string"}}},"user_svc.HasPermissionResponse":{"type":"object","required":["app","appId","authorized","until","user"],"properties":{"app":{"$ref":"#/definitions/user_svc.App"},"appId":{"type":"string"},"authorized":{"type":"boolean"},"until":{"type":"string"},"user":{"$ref":"#/definitions/user_svc.User"}}},"user_svc.ListAppsRequest":{"type":"object","properties":{"host":{"type":"array","items":{"type":"string"}},"ids":{"type":"array","items":{"type":"string"}}}},"user_svc.ListAppsResponse":{"type":"object","required":["apps"],"properties":{"apps":{"type":"array","items":{"$ref":"#/definitions/user_svc.App"}}}},"user_svc.ListEnrollsRequest":{"type":"object","properties":{"contactId":{"type":"string"},"role":{"type":"string"},"userId":{"type":"string"}}},"user_svc.ListEnrollsResponse":{"type":"object","required":["enrolls"],"properties":{"enrolls":{"type":"array","items":{"$ref":"#/definitions/user_svc.Enroll"}}}},"user_svc.ListOrganizationsRequest":{"type":"object","properties":{"afterTime":{"description":"Organizations by default come back ordered\ndesc by ` + "`" + `createdAt` + "`" + ` field.","type":"string"},"ids":{"type":"array","items":{"type":"string"}},"limit":{"type":"integer"}}},"user_svc.ListOrganizationsResponse":{"type":"object","properties":{"organizations":{"type":"array","items":{"$ref":"#/definitions/user_svc.Organization"}}}},"user_svc.ListPermissionsResponse":{"type":"object","properties":{"permissions":{"type":"array","items":{"type":"string"}}}},"user_svc.ListPermitsRequest":{"type":"object","properties":{"permission":{"type":"string"},"slug":{"type":"string"}}},"user_svc.ListPermitsResponse":{"type":"object","properties":{"permits":{"type":"array","items":{"$ref":"#/definitions/user_svc.Permit"}}}},"user_svc.ListUsersOrderBy":{"type":"string","enum":["createdAt","updatedAt"],"x-enum-varnames":["ListUsersOrderByCreatedAt","ListUsersOrderByUpdatedAt"]},"user_svc.ListUsersRequest":{"type":"object","properties":{"afterTime":{"description":"AfterTime is a time in RFC3339 format.\nIt is used to paginate the results when the ` + "`" + `orderByField` + "`" + ` is set to ` + "`" + `createdAt` + "`" + ` or ` + "`" + `updatedAt` + "`" + `.\nThe results will be returned after this time.","type":"string"},"contactId":{"description":"ContactId is the id of the contact the user is associated with.\nWill return a user list with one element if set.","type":"string"},"count":{"description":"Count is a flag that indicates if the count of the users should be returned.","type":"boolean","example":false},"ids":{"description":"Ids of the users to list.","type":"array","items":{"type":"string"}},"limit":{"type":"integer","example":10},"order":{"allOf":[{"$ref":"#/definitions/user_svc.OrderDirection"}],"example":"desc"},"orderBy":{"allOf":[{"$ref":"#/definitions/user_svc.ListUsersOrderBy"}],"example":"createdAt"},"search":{"description":"Search term used to find users. Returns users whose slug, username, or contact ID exactly matches the term.","type":"string"}}},"user_svc.ListUsersResponse":{"type":"object","properties":{"after":{"type":"string"},"count":{"type":"integer"},"users":{"type":"array","items":{"$ref":"#/definitions/user_svc.UserRecord"}}}},"user_svc.LoginRequest":{"type":"object","required":["appHost"],"properties":{"appHost":{"type":"string","example":"shoes.com"},"contact":{"type":"string"},"device":{"type":"string"},"password":{"type":"string"},"slug":{"type":"string"}}},"user_svc.LoginResponse":{"type":"object","properties":{"token":{"$ref":"#/definitions/user_svc.Token"}}},"user_svc.OrderDirection":{"type":"string","enum":["asc","desc"],"x-enum-varnames":["OrderDirectionAsc","OrderDirectionDesc"]},"user_svc.Organization":{"type":"object","required":["createdAt","id","name","slug","updatedAt"],"properties":{"appId":{"type":"string"},"createdAt":{"type":"string"},"deletedAt":{"type":"string"},"id":{"type":"string"},"internalId":{"type":"string"},"name":{"description":"Full name of the organization","type":"string","example":"Acme Corporation"},"slug":{"description":"URL-friendly unique (inside the Singularon platform) identifier for the ` + "`" + `organization` + "`" + `.","type":"string","example":"acme-corporation"},"thumbnailFileId":{"type":"string","example":"file_fQDxusW8og"},"updatedAt":{"type":"string"}}},"user_svc.Permit":{"type":"object","required":["appId","createdAt","id","permission","updatedAt"],"properties":{"appId":{"description":"App of the permit.\nUse ` + "`" + `*` + "`" + ` to match all apps, such as when bootstrapping\nin services.","type":"string"},"createdAt":{"type":"string"},"deletedAt":{"type":"string"},"id":{"type":"string","example":"inv_fIYPbMHIcI"},"internalId":{"type":"string"},"permission":{"type":"string"},"roles":{"description":"Role IDs that have been permited the specified permission.\n\nOriginally, permits were designed for slugs to facilitate service-to-service calls.\nDue to their convenience—especially with CLI and infrastructure-as-code support—they were later extended to roles.","type":"array","items":{"type":"string"}},"slugs":{"description":"Slugs that have been permited the specified permission.","type":"array","items":{"type":"string"}},"updatedAt":{"type":"string"}}},"user_svc.PermitInput":{"type":"object","required":["permission"],"properties":{"appHost":{"description":"App of the permit.\nUse ` + "`" + `*` + "`" + ` to match all apps, such as when bootstrapping\nin services.","type":"string","example":"unnamed,omitempty"},"id":{"type":"string","example":"inv_fIYPbMHIcI"},"permission":{"type":"string"},"roles":{"description":"Role IDs that have been permited the specified permission.\n\nOriginally, permits were designed for slugs to facilitate service-to-service calls.\nDue to their convenience—especially with CLI and infrastructure-as-code support—they were later extended to roles.","type":"array","items":{"type":"string"}},"slugs":{"description":"Slugs that have been permited the specified permission.","type":"array","items":{"type":"string"}}}},"user_svc.ReadAppRequest":{"type":"object","properties":{"host":{"type":"string"}}},"user_svc.ReadAppResponse":{"type":"object","required":["app"],"properties":{"app":{"$ref":"#/definitions/user_svc.App"}}},"user_svc.ReadSelfRequest":{"type":"object","properties":{"countTokens":{"type":"boolean"}}},"user_svc.ReadSelfResponse":{"type":"object","required":["tokenCount","user"],"properties":{"activeOrganizationId":{"description":"Active organization of the caller user, if it has any.","type":"string"},"contacts":{"description":"Contacts of the caller user.","type":"array","items":{"$ref":"#/definitions/user_svc.Contact"}},"organizations":{"description":"Organizations of the caller user.","type":"array","items":{"$ref":"#/definitions/user_svc.Organization"}},"roles":{"description":"Roles the token has that made this request.","type":"array","items":{"type":"string"}},"tokenCount":{"type":"integer"},"user":{"description":"The user who made the request.","allOf":[{"$ref":"#/definitions/user_svc.User"}]}}},"user_svc.RefreshTokenResponse":{"type":"object","required":["token"],"properties":{"token":{"$ref":"#/definitions/user_svc.Token"}}},"user_svc.RegisterRequest":{"type":"object","required":["appHost","slug"],"properties":{"appHost":{"type":"string","example":"shoes.com"},"contact":{"$ref":"#/definitions/user_svc.ContactInput"},"device":{"type":"string"},"name":{"type":"string"},"password":{"description":"Password of the user.","type":"string"},"slug":{"description":"Slug is a URL-friendly unique (inside the 1Backend platform) identifier for the ` + "`" + `user` + "`" + `.\nRequired due to its central role in the platform.\nIf your project has no use for a slug, just derive it from the email or similar.","type":"string"}}},"user_svc.RegisterResponse":{"type":"object","properties":{"token":{"$ref":"#/definitions/user_svc.Token"}}},"user_svc.ResetPasswordRequest":{"type":"object","required":["newPassword"],"properties":{"newPassword":{"type":"string"}}},"user_svc.ResetPasswordResponse":{"type":"object"},"user_svc.RevokeTokensRequest":{"type":"object","properties":{"allTokens":{"description":"If true, all tokens for the user will be revoked.","type":"boolean"},"device":{"type":"string"},"userId":{"description":"Only used by admins (or whoever has the ` + "`" + `user-svc:token:revoke` + "`" + ` permission\nrevoke tokens for other users","type":"string"}}},"user_svc.RevokeTokensResponse":{"type":"object"},"user_svc.SaveEnrollsRequest":{"type":"object","required":["enrolls"],"properties":{"enrolls":{"type":"array","items":{"$ref":"#/definitions/user_svc.EnrollInput"}}}},"user_svc.SaveEnrollsResponse":{"type":"object","required":["enrolls"],"properties":{"enrolls":{"type":"array","items":{"$ref":"#/definitions/user_svc.Enroll"}}}},"user_svc.SaveMembershipRequest":{"type":"object"},"user_svc.SaveMembershipResponse":{"type":"object"},"user_svc.SaveOrganizationRequest":{"type":"object","required":["slug"],"properties":{"assignCaller":{"description":"If true, the caller (the user making the request) will be assigned\nthe admin role for the organization.\nIf false, no Membership or Enroll will be created.","type":"boolean","example":true},"id":{"type":"string"},"name":{"description":"Full name of the organization.","type":"string"},"slug":{"description":"URL-friendly unique (inside the Singularon platform) identifier for the ` + "`" + `organization` + "`" + `.","type":"string"},"thumbnailFileId":{"type":"string","example":"file_fQDxusW8og"}}},"user_svc.SaveOrganizationResponse":{"type":"object","required":["organization","token"],"properties":{"organization":{"$ref":"#/definitions/user_svc.Organization"},"token":{"description":"Due to the nature of JWT tokens, the token must be refreshed after\ncreating an organization, as dynamic organization roles are embedded in it.","allOf":[{"$ref":"#/definitions/user_svc.Token"}]}}},"user_svc.SavePermitsRequest":{"type":"object","properties":{"permits":{"type":"array","items":{"$ref":"#/definitions/user_svc.PermitInput"}}}},"user_svc.SavePermitsResponse":{"type":"object"},"user_svc.SaveSelfRequest":{"type":"object","properties":{"labels":{"type":"object","additionalProperties":{"type":"string"}},"name":{"type":"string"},"thumbnailFileId":{"type":"string","example":"file_fQDxusW8og"}}},"user_svc.SaveSelfResponse":{"type":"object"},"user_svc.SaveUserRequest":{"type":"object","properties":{"name":{"type":"string"},"thumbnailFileId":{"type":"string","example":"file_fQDxusW8og"}}},"user_svc.SaveUserResponse":{"type":"object"},"user_svc.Token":{"type":"object","required":["appId","createdAt","device","expiresAt","id","token","updatedAt","userId"],"properties":{"active":{"description":"Active tokens contain the most up-to-date information.\nWhen a user's role changes—due to role assignment, organization\ncreation/assignment, etc.—all existing tokens are marked inactive.\nActive tokens are reused during login, while inactive tokens\nthat have been recently refreshed (being used still) are kept for further refreshing\n(unless ` + "`" + `OB_TOKEN_AUTO_REFRESH_OFF` + "`" + ` is set to true, old tokens can be refreshed indefinitely.)\n\nActive tokens contain the most up-to-date information.\nWhen a user's role changes—due to role assignment, organization\ncreation/assignment, etc.—all existing tokens are marked inactive.\nActive tokens are reused during login, while inactive tokens\nthat have been recently refreshed (see ` + "`" + `lastRefreshedAt` + "`" + ` field) and are still in use are retained for further refreshing.\n(Unless ` + "`" + `OB_TOKEN_AUTO_REFRESH_OFF` + "`" + ` is set to true, in which case old tokens can be refreshed indefinitely.)","type":"boolean"},"app":{"$ref":"#/definitions/user_svc.App"},"appId":{"type":"string"},"createdAt":{"type":"string"},"deletedAt":{"type":"string"},"device":{"description":"The device the token is associated with.\nThis in combination with LastRefreshedAt can be used to\ndetermine if the token is still in use, and lets us prune unused tokens.","type":"string"},"expiresAt":{"type":"string"},"id":{"type":"string"},"internalId":{"type":"string"},"lastRefreshedAt":{"description":"The last time the token was refreshed.\nThis is used to determine if the token is still in use.","type":"string"},"token":{"description":"Token is a signed JWT used to authenticate the user without querying the User Svc.\nYou can verify it using the public key at ` + "`" + `/user-svc/public-key` + "`" + `.\n\nThe token is just a JSON object with fields like:\n- \"oui\": the user ID (e.g., \"usr_dC4K75Cbp6\")\n- \"olu\": the user slug (e.g., \"test-user-slug-0\")\n- \"oro\": a list of roles, such as:\n  - \"user-svc:user\"\n  - \"user-svc:org:{org_dC4K7NNDCG}:user\"","type":"string"},"updatedAt":{"type":"string"},"userId":{"type":"string"}}},"user_svc.User":{"type":"object","required":["createdAt","id","slug","updatedAt"],"properties":{"createdAt":{"type":"string"},"deletedAt":{"type":"string"},"id":{"type":"string"},"labels":{"type":"object","additionalProperties":{"type":"string"}},"name":{"description":"Full name of the user.","type":"string","example":"Jane Doe"},"slug":{"description":"URL-friendly unique (inside the 1Backend platform) identifier for the ` + "`" + `user` + "`" + `.","type":"string","example":"jane-doe"},"thumbnailFileId":{"type":"string","example":"file_fQDyi1xdHK"},"updatedAt":{"type":"string"}}},"user_svc.UserInput":{"type":"object","required":["id","slug"],"properties":{"id":{"type":"string"},"labels":{"type":"object","additionalProperties":{"type":"string"}},"name":{"description":"Full name of the user.","type":"string","example":"Jane Doe"},"slug":{"description":"URL-friendly unique (inside the 1Backend platform) identifier for the ` + "`" + `user` + "`" + `.","type":"string","example":"jane-doe"},"thumbnailFileId":{"type":"string","example":"file_fQDyi1xdHK"}}},"user_svc.UserRecord":{"type":"object","required":["createdAt","id","slug","updatedAt"],"properties":{"contactIds":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"string"},"id":{"type":"string"},"name":{"description":"Full name of the user.","type":"string","example":"Jane Doe"},"roles":{"type":"array","items":{"type":"string"}},"slug":{"description":"URL-friendly unique (inside the 1Backend platform) identifier for the ` + "`" + `user` + "`" + `.","type":"string","example":"jane-doe"},"updatedAt":{"type":"string"}}}},"securityDefinitions":{"BearerAuth":{"description":"Type \"Bearer\" followed by a space and token acquired from the User Svc Login endpoint.","type":"apiKey","name":"Authorization","in":"header"}},"externalDocs":{"description":"1Backend API","url":"https://1backend.com/docs/category/1backend-api"}}`

// SwaggerInfo holds exported Swagger Info so clients can modify it
var SwaggerInfo = &swag.Spec{
	Version:          "0.8.2",
	Host:             "localhost:11337",
	BasePath:         "/",
	Schemes:          []string{},
	Title:            "1Backend",
	Description:      "AI-native microservices platform.",
	InfoInstanceName: "swagger",
	SwaggerTemplate:  docTemplate,
	LeftDelim:        "{{",
	RightDelim:       "}}",
}

func init() {
	swag.Register(SwaggerInfo.InstanceName(), SwaggerInfo)
}
