// This file is auto-generated by @hey-api/openapi-ts import type { CancelablePromise } from './core/CancelablePromise'; import { OpenAPI } from './core/OpenAPI'; import { request as __request } from './core/request'; import type { AlertsReadAlertsConfigResponse, AlertsSaveAlertsConfigData, AlertsSaveAlertsConfigResponse, AlertsTestChannelData, AlertsTestChannelResponse, DashboardsReadDashboardsResponse, DashboardsReadDashboardData, DashboardsReadDashboardResponse, DashboardsCreateDashboardData, DashboardsCreateDashboardResponse, DashboardsSaveDashboardData, DashboardsSaveDashboardResponse, DashboardsDeleteDashboardData, DashboardsDeleteDashboardResponse, DashboardsRenameDashboardData, DashboardsRenameDashboardResponse, FlowsReadFlowsResponse, FlowsReadNodeTypesResponse, FlowsReadLibraryResponse, FlowsDeleteSharedNodeData, FlowsDeleteSharedNodeResponse, FlowsReadFlowData, FlowsReadFlowResponse, FlowsSaveFlowData, FlowsSaveFlowResponse, FlowsDeleteFlowData, FlowsDeleteFlowResponse, FlowsPublishFlowData, FlowsPublishFlowResponse, FlowsDiscardDraftData, FlowsDiscardDraftResponse, FlowsRenameFlowData, FlowsRenameFlowResponse, FlowsReadNodeSourceData, FlowsReadNodeSourceResponse, FlowsSaveNodeSourceData, FlowsSaveNodeSourceResponse, FlowsShareNodeData, FlowsShareNodeResponse, FlowsUnshareNodeData, FlowsUnshareNodeResponse, FlowsStartFlowData, FlowsStartFlowResponse, FlowsStopFlowData, FlowsStopFlowResponse, FlowsPauseFlowData, FlowsPauseFlowResponse, FlowsResumeFlowData, FlowsResumeFlowResponse, FlowsStepFlowData, FlowsStepFlowResponse, FlowsValidateFlowData, FlowsValidateFlowResponse, FlowsRunFlowData, FlowsRunFlowResponse, FlowsTriggerNodeData, FlowsTriggerNodeResponse, FlowsReadFlowStateData, FlowsReadFlowStateResponse, FlowsReadMessageHistoryData, FlowsReadMessageHistoryResponse, LoginLoginAccessTokenData, LoginLoginAccessTokenResponse, LoginTestTokenResponse, LoginRecoverPasswordData, LoginRecoverPasswordResponse, LoginResetPasswordData, LoginResetPasswordResponse, LoginRecoverPasswordHtmlContentData, LoginRecoverPasswordHtmlContentResponse, MessagesReadMessagesResponse, MessagesPublishMessageData, MessagesPublishMessageResponse, MessagesReadMessageHistoryData, MessagesReadMessageHistoryResponse, OauthRegisterClientData, OauthRegisterClientResponse, OauthAuthorizeValidateData, OauthAuthorizeValidateResponse, OauthAuthorizeData, OauthAuthorizeResponse, OauthTokenData, OauthTokenResponse, OauthReadClientsResponse, OauthRevokeClientData, OauthRevokeClientResponse, PrivateCreateUserData, PrivateCreateUserResponse, SecretsReadSecretsResponse, SecretsSaveSecretData, SecretsSaveSecretResponse, SecretsDeleteSecretData, SecretsDeleteSecretResponse, UsersReadUsersData, UsersReadUsersResponse, UsersCreateUserData, UsersCreateUserResponse, UsersReadUserMeResponse, UsersDeleteUserMeResponse, UsersUpdateUserMeData, UsersUpdateUserMeResponse, UsersUpdatePasswordMeData, UsersUpdatePasswordMeResponse, UsersRegisterUserData, UsersRegisterUserResponse, UsersReadUserByIdData, UsersReadUserByIdResponse, UsersUpdateUserData, UsersUpdateUserResponse, UsersDeleteUserData, UsersDeleteUserResponse, UtilsTestEmailData, UtilsTestEmailResponse, UtilsHealthCheckResponse, UtilsHealthResponse } from './types.gen'; export class AlertsService { /** * Read Alerts Config * What the engine alerts on, and where it sends it. * @returns AlertsConfig Successful Response * @throws ApiError */ public static readAlertsConfig(): CancelablePromise { return __request(OpenAPI, { method: 'GET', url: '/api/v1/alerts/config' }); } /** * Save Alerts Config * Replace the configuration. Takes effect immediately. * @param data The data for the request. * @param data.requestBody * @returns AlertsConfig Successful Response * @throws ApiError */ public static saveAlertsConfig(data: AlertsSaveAlertsConfigData): CancelablePromise { return __request(OpenAPI, { method: 'PUT', url: '/api/v1/alerts/config', body: data.requestBody, mediaType: 'application/json', errors: { 422: 'Validation Error' } }); } /** * Test Channel * Send one alert, to prove the channel works before relying on it. * @param data The data for the request. * @param data.channelName * @returns Message Successful Response * @throws ApiError */ public static testChannel(data: AlertsTestChannelData): CancelablePromise { return __request(OpenAPI, { method: 'POST', url: '/api/v1/alerts/test/{channel_name}', path: { channel_name: data.channelName }, errors: { 422: 'Validation Error' } }); } } export class DashboardsService { /** * Read Dashboards * Every dashboard, without its contents. * @returns DashboardsPublic Successful Response * @throws ApiError */ public static readDashboards(): CancelablePromise { return __request(OpenAPI, { method: 'GET', url: '/api/v1/dashboards/' }); } /** * Read Dashboard * @param data The data for the request. * @param data.name * @returns DashboardDef_Output Successful Response * @throws ApiError */ public static readDashboard(data: DashboardsReadDashboardData): CancelablePromise { return __request(OpenAPI, { method: 'GET', url: '/api/v1/dashboards/{name}', path: { name: data.name }, errors: { 422: 'Validation Error' } }); } /** * Create Dashboard * Start a dashboard: one page, one section, nothing on it yet. * @param data The data for the request. * @param data.name * @returns DashboardDef_Output Successful Response * @throws ApiError */ public static createDashboard(data: DashboardsCreateDashboardData): CancelablePromise { return __request(OpenAPI, { method: 'POST', url: '/api/v1/dashboards/{name}', path: { name: data.name }, errors: { 422: 'Validation Error' } }); } /** * Save Dashboard * Replace a dashboard, refusing a save someone else has moved past. * @param data The data for the request. * @param data.name * @param data.requestBody * @returns DashboardDef_Output Successful Response * @throws ApiError */ public static saveDashboard(data: DashboardsSaveDashboardData): CancelablePromise { return __request(OpenAPI, { method: 'PUT', url: '/api/v1/dashboards/{name}', path: { name: data.name }, body: data.requestBody, mediaType: 'application/json', errors: { 422: 'Validation Error' } }); } /** * Delete Dashboard * @param data The data for the request. * @param data.name * @returns Message Successful Response * @throws ApiError */ public static deleteDashboard(data: DashboardsDeleteDashboardData): CancelablePromise { return __request(OpenAPI, { method: 'DELETE', url: '/api/v1/dashboards/{name}', path: { name: data.name }, errors: { 422: 'Validation Error' } }); } /** * Rename Dashboard * @param data The data for the request. * @param data.name * @param data.requestBody * @returns DashboardDef_Output Successful Response * @throws ApiError */ public static renameDashboard(data: DashboardsRenameDashboardData): CancelablePromise { return __request(OpenAPI, { method: 'POST', url: '/api/v1/dashboards/{name}/rename', path: { name: data.name }, body: data.requestBody, mediaType: 'application/json', errors: { 422: 'Validation Error' } }); } } export class FlowsService { /** * Read Flows * List every flow. * @returns FlowsPublic Successful Response * @throws ApiError */ public static readFlows(): CancelablePromise { return __request(OpenAPI, { method: 'GET', url: '/api/v1/flows/' }); } /** * Read Node Types * The node types that can be placed on a canvas. * @returns NodeTypeInfo Successful Response * @throws ApiError */ public static readNodeTypes(): CancelablePromise { return __request(OpenAPI, { method: 'GET', url: '/api/v1/flows/node-types' }); } /** * Read Library * The node sources shared across flows, and which nodes use each. * @returns LibraryNode Successful Response * @throws ApiError */ public static readLibrary(): CancelablePromise { return __request(OpenAPI, { method: 'GET', url: '/api/v1/flows/library' }); } /** * Delete Shared Node * Remove a shared source, as long as no flow still runs it. * @param data The data for the request. * @param data.libName * @returns Message Successful Response * @throws ApiError */ public static deleteSharedNode(data: FlowsDeleteSharedNodeData): CancelablePromise { return __request(OpenAPI, { method: 'DELETE', url: '/api/v1/flows/library/{lib_name}', path: { lib_name: data.libName }, errors: { 422: 'Validation Error' } }); } /** * Read Flow * Read one flow, with the state of its nodes. * @param data The data for the request. * @param data.name * @returns FlowDetail Successful Response * @throws ApiError */ public static readFlow(data: FlowsReadFlowData): CancelablePromise { return __request(OpenAPI, { method: 'GET', url: '/api/v1/flows/{name}', path: { name: data.name }, errors: { 422: 'Validation Error' } }); } /** * Save Flow * Save unpublished changes to a flow. * * This writes a draft: the running pipeline keeps the published version until * someone publishes. ``version`` is the one the editor last saw — a mismatch * means another client saved in between and answers 409 rather than throwing * their work away. * @param data The data for the request. * @param data.name * @param data.requestBody * @returns FlowDetail Successful Response * @throws ApiError */ public static saveFlow(data: FlowsSaveFlowData): CancelablePromise { return __request(OpenAPI, { method: 'PUT', url: '/api/v1/flows/{name}', path: { name: data.name }, body: data.requestBody, mediaType: 'application/json', errors: { 422: 'Validation Error' } }); } /** * Delete Flow * Delete a flow and everything in it. * @param data The data for the request. * @param data.name * @returns Message Successful Response * @throws ApiError */ public static deleteFlow(data: FlowsDeleteFlowData): CancelablePromise { return __request(OpenAPI, { method: 'DELETE', url: '/api/v1/flows/{name}', path: { name: data.name }, errors: { 422: 'Validation Error' } }); } /** * Publish Flow * Deploy the unpublished changes: the engine picks them up from here. * @param data The data for the request. * @param data.name * @param data.requestBody * @returns FlowDetail Successful Response * @throws ApiError */ public static publishFlow(data: FlowsPublishFlowData): CancelablePromise { return __request(OpenAPI, { method: 'POST', url: '/api/v1/flows/{name}/publish', path: { name: data.name }, body: data.requestBody, mediaType: 'application/json', errors: { 422: 'Validation Error' } }); } /** * Discard Draft * Throw the unpublished changes away and go back to what is running. * @param data The data for the request. * @param data.name * @returns FlowDetail Successful Response * @throws ApiError */ public static discardDraft(data: FlowsDiscardDraftData): CancelablePromise { return __request(OpenAPI, { method: 'POST', url: '/api/v1/flows/{name}/discard-draft', path: { name: data.name }, errors: { 422: 'Validation Error' } }); } /** * Rename Flow * Rename a flow, along with every reference to its messages. * @param data The data for the request. * @param data.name * @param data.requestBody * @returns FlowDetail Successful Response * @throws ApiError */ public static renameFlow(data: FlowsRenameFlowData): CancelablePromise { return __request(OpenAPI, { method: 'POST', url: '/api/v1/flows/{name}/rename', path: { name: data.name }, body: data.requestBody, mediaType: 'application/json', errors: { 422: 'Validation Error' } }); } /** * Read Node Source * Read a node's Python source, including unpublished edits. * @param data The data for the request. * @param data.name * @param data.nodeId * @returns NodeSource Successful Response * @throws ApiError */ public static readNodeSource(data: FlowsReadNodeSourceData): CancelablePromise { return __request(OpenAPI, { method: 'GET', url: '/api/v1/flows/{name}/nodes/{node_id}/source', path: { name: data.name, node_id: data.nodeId }, errors: { 422: 'Validation Error' } }); } /** * Save Node Source * Save a node's source as an unpublished edit and report whether it loads. * * The answer comes from compiling the code rather than from the running * pipeline: a draft is not deployed, and compiling is both faster and more * precise about what the author just typed. * * A shared node writes to the library, so the fix reaches every flow using * it — and that one is live immediately rather than waiting for a publish, * because the copy is not any single flow's to hold back. * @param data The data for the request. * @param data.name * @param data.nodeId * @param data.requestBody * @returns NodeStatusPublic Successful Response * @throws ApiError */ public static saveNodeSource(data: FlowsSaveNodeSourceData): CancelablePromise { return __request(OpenAPI, { method: 'PUT', url: '/api/v1/flows/{name}/nodes/{node_id}/source', path: { name: data.name, node_id: data.nodeId }, body: data.requestBody, mediaType: 'application/json', errors: { 422: 'Validation Error' } }); } /** * Share Node * Move this node's code into the library so other flows can run it too. * @param data The data for the request. * @param data.name * @param data.nodeId * @param data.requestBody * @returns FlowDetail Successful Response * @throws ApiError */ public static shareNode(data: FlowsShareNodeData): CancelablePromise { return __request(OpenAPI, { method: 'POST', url: '/api/v1/flows/{name}/nodes/{node_id}/share', path: { name: data.name, node_id: data.nodeId }, body: data.requestBody, mediaType: 'application/json', errors: { 422: 'Validation Error' } }); } /** * Unshare Node * Take a private copy of the shared code back into this flow. * @param data The data for the request. * @param data.name * @param data.nodeId * @returns FlowDetail Successful Response * @throws ApiError */ public static unshareNode(data: FlowsUnshareNodeData): CancelablePromise { return __request(OpenAPI, { method: 'POST', url: '/api/v1/flows/{name}/nodes/{node_id}/unshare', path: { name: data.name, node_id: data.nodeId }, errors: { 422: 'Validation Error' } }); } /** * Start Flow * Let the engine run this flow again. * @param data The data for the request. * @param data.name * @returns FlowDetail Successful Response * @throws ApiError */ public static startFlow(data: FlowsStartFlowData): CancelablePromise { return __request(OpenAPI, { method: 'POST', url: '/api/v1/flows/{name}/start', path: { name: data.name }, errors: { 422: 'Validation Error' } }); } /** * Stop Flow * Take this flow off the engine: no subscriptions, schedules or webhooks. * @param data The data for the request. * @param data.name * @returns FlowDetail Successful Response * @throws ApiError */ public static stopFlow(data: FlowsStopFlowData): CancelablePromise { return __request(OpenAPI, { method: 'POST', url: '/api/v1/flows/{name}/stop', path: { name: data.name }, errors: { 422: 'Validation Error' } }); } /** * Pause Flow * Hold the flow's nodes so its messages can be stepped through. * @param data The data for the request. * @param data.name * @returns Message Successful Response * @throws ApiError */ public static pauseFlow(data: FlowsPauseFlowData): CancelablePromise { return __request(OpenAPI, { method: 'POST', url: '/api/v1/flows/{name}/pause', path: { name: data.name }, errors: { 422: 'Validation Error' } }); } /** * Resume Flow * Let the flow carry on, running whatever was held back. * @param data The data for the request. * @param data.name * @returns Message Successful Response * @throws ApiError */ public static resumeFlow(data: FlowsResumeFlowData): CancelablePromise { return __request(OpenAPI, { method: 'POST', url: '/api/v1/flows/{name}/resume', path: { name: data.name }, errors: { 422: 'Validation Error' } }); } /** * Step Flow * Run one message a pause is holding back, leaving the flow paused. * @param data The data for the request. * @param data.name * @returns Message Successful Response * @throws ApiError */ public static stepFlow(data: FlowsStepFlowData): CancelablePromise { return __request(OpenAPI, { method: 'POST', url: '/api/v1/flows/{name}/step', path: { name: data.name }, errors: { 422: 'Validation Error' } }); } /** * Validate Flow * Report what would keep this flow from running. * @param data The data for the request. * @param data.name * @returns ValidationResult Successful Response * @throws ApiError */ public static validateFlow(data: FlowsValidateFlowData): CancelablePromise { return __request(OpenAPI, { method: 'POST', url: '/api/v1/flows/{name}/validate', path: { name: data.name }, errors: { 422: 'Validation Error' } }); } /** * Run Flow * Run every node of a flow once. * * With unpublished changes this runs the draft, so the button matches what is * on the canvas. Nothing is deployed by running it. * @param data The data for the request. * @param data.name * @param data.requestBody * @returns FlowStatePublic Successful Response * @throws ApiError */ public static runFlow(data: FlowsRunFlowData): CancelablePromise { return __request(OpenAPI, { method: 'POST', url: '/api/v1/flows/{name}/run', path: { name: data.name }, body: data.requestBody, mediaType: 'application/json', errors: { 422: 'Validation Error' } }); } /** * Trigger Node * Feed values into a single node. * @param data The data for the request. * @param data.name * @param data.nodeId * @param data.requestBody * @returns FlowStatePublic Successful Response * @throws ApiError */ public static triggerNode(data: FlowsTriggerNodeData): CancelablePromise { return __request(OpenAPI, { method: 'POST', url: '/api/v1/flows/{name}/nodes/{node_id}/trigger', path: { name: data.name, node_id: data.nodeId }, body: data.requestBody, mediaType: 'application/json', errors: { 422: 'Validation Error' } }); } /** * Read Flow State * The last value seen on every message of this flow. * @param data The data for the request. * @param data.name * @returns FlowStatePublic Successful Response * @throws ApiError */ public static readFlowState(data: FlowsReadFlowStateData): CancelablePromise { return __request(OpenAPI, { method: 'GET', url: '/api/v1/flows/{name}/state', path: { name: data.name }, errors: { 422: 'Validation Error' } }); } /** * Read Message History * The recent values of one message, for plotting. * * ``message`` may be given bare or qualified; a message that never carried a * number comes back with an empty series. * @param data The data for the request. * @param data.name * @param data.message * @returns MessageHistory Successful Response * @throws ApiError */ public static readMessageHistory(data: FlowsReadMessageHistoryData): CancelablePromise { return __request(OpenAPI, { method: 'GET', url: '/api/v1/flows/{name}/history/{message}', path: { name: data.name, message: data.message }, errors: { 422: 'Validation Error' } }); } } export class LoginService { /** * Login Access Token * OAuth2 compatible token login, get an access token for future requests * @param data The data for the request. * @param data.formData * @returns Token Successful Response * @throws ApiError */ public static loginAccessToken(data: LoginLoginAccessTokenData): CancelablePromise { return __request(OpenAPI, { method: 'POST', url: '/api/v1/login/access-token', formData: data.formData, mediaType: 'application/x-www-form-urlencoded', errors: { 422: 'Validation Error' } }); } /** * Test Token * Test access token * @returns UserPublic Successful Response * @throws ApiError */ public static testToken(): CancelablePromise { return __request(OpenAPI, { method: 'POST', url: '/api/v1/login/test-token' }); } /** * Recover Password * Password Recovery * @param data The data for the request. * @param data.email * @returns Message Successful Response * @throws ApiError */ public static recoverPassword(data: LoginRecoverPasswordData): CancelablePromise { return __request(OpenAPI, { method: 'POST', url: '/api/v1/password-recovery/{email}', path: { email: data.email }, errors: { 422: 'Validation Error' } }); } /** * Reset Password * Reset password * @param data The data for the request. * @param data.requestBody * @returns Message Successful Response * @throws ApiError */ public static resetPassword(data: LoginResetPasswordData): CancelablePromise { return __request(OpenAPI, { method: 'POST', url: '/api/v1/reset-password/', body: data.requestBody, mediaType: 'application/json', errors: { 422: 'Validation Error' } }); } /** * Recover Password Html Content * HTML Content for Password Recovery * @param data The data for the request. * @param data.email * @returns string Successful Response * @throws ApiError */ public static recoverPasswordHtmlContent(data: LoginRecoverPasswordHtmlContentData): CancelablePromise { return __request(OpenAPI, { method: 'POST', url: '/api/v1/password-recovery-html-content/{email}', path: { email: data.email }, errors: { 422: 'Validation Error' } }); } } export class MessagesService { /** * Read Messages * Every message any published flow declares, with its last value. * @returns MessagesPublic Successful Response * @throws ApiError */ public static readMessages(): CancelablePromise { return __request(OpenAPI, { method: 'GET', url: '/api/v1/messages/' }); } /** * Publish Message * Put a value into the graph, as a dashboard control does. * * Only a message some flow declares can be published to: flows own the * namespace, and a dashboard is a client of it rather than a second author. * @param data The data for the request. * @param data.name * @param data.requestBody * @returns app__api__routes__messages__MessageValue Successful Response * @throws ApiError */ public static publishMessage(data: MessagesPublishMessageData): CancelablePromise { return __request(OpenAPI, { method: 'POST', url: '/api/v1/messages/{name}', path: { name: data.name }, body: data.requestBody, mediaType: 'application/json', errors: { 422: 'Validation Error' } }); } /** * Read Message History * The series behind a chart. Numbers only — nothing else plots. * @param data The data for the request. * @param data.name * @returns MessagePoints Successful Response * @throws ApiError */ public static readMessageHistory(data: MessagesReadMessageHistoryData): CancelablePromise { return __request(OpenAPI, { method: 'GET', url: '/api/v1/messages/{name}/history', path: { name: data.name }, errors: { 422: 'Validation Error' } }); } } export class OauthService { /** * Register Client * RFC 7591 dynamic client registration. * * Open on purpose, and harmless on its own: a registered client can do * nothing until a signed-in human approves it on the consent page. * @param data The data for the request. * @param data.requestBody * @returns unknown Successful Response * @throws ApiError */ public static registerClient(data: OauthRegisterClientData): CancelablePromise { return __request(OpenAPI, { method: 'POST', url: '/api/v1/oauth/register', body: data.requestBody, mediaType: 'application/json', errors: { 422: 'Validation Error' } }); } /** * Authorize Validate * What the consent page should say, checked before it says it. * @param data The data for the request. * @param data.clientId * @param data.redirectUri * @returns OAuthAuthorizeInfo Successful Response * @throws ApiError */ public static authorizeValidate(data: OauthAuthorizeValidateData): CancelablePromise { return __request(OpenAPI, { method: 'GET', url: '/api/v1/oauth/authorize/validate', query: { client_id: data.clientId, redirect_uri: data.redirectUri }, errors: { 422: 'Validation Error' } }); } /** * Authorize * Approve a client, on behalf of the signed-in user. * @param data The data for the request. * @param data.requestBody * @returns OAuthAuthorizeResponse Successful Response * @throws ApiError */ public static authorize(data: OauthAuthorizeData): CancelablePromise { return __request(OpenAPI, { method: 'POST', url: '/api/v1/oauth/authorize', body: data.requestBody, mediaType: 'application/json', errors: { 422: 'Validation Error' } }); } /** * Token * Exchange a code, or a refresh token, for an access token. * @param data The data for the request. * @param data.formData * @returns unknown Successful Response * @throws ApiError */ public static token(data: OauthTokenData): CancelablePromise { return __request(OpenAPI, { method: 'POST', url: '/api/v1/oauth/token', formData: data.formData, mediaType: 'application/x-www-form-urlencoded', errors: { 422: 'Validation Error' } }); } /** * Read Clients * Every agent that registered itself, newest first. * @returns RegisteredClients Successful Response * @throws ApiError */ public static readClients(): CancelablePromise { return __request(OpenAPI, { method: 'GET', url: '/api/v1/oauth/clients' }); } /** * Revoke Client * Withdraw one agent's access, leaving every other agent alone. * * Deleting the client cascades to its codes and refresh tokens, so it can * get nothing new and cannot come back without registering again. An access * token already in its hands keeps working until it expires * (``MCP_TOKEN_EXPIRE_MINUTES``) — those are stateless by design. * @param data The data for the request. * @param data.clientId * @returns Message Successful Response * @throws ApiError */ public static revokeClient(data: OauthRevokeClientData): CancelablePromise { return __request(OpenAPI, { method: 'DELETE', url: '/api/v1/oauth/clients/{client_id}', path: { client_id: data.clientId }, errors: { 422: 'Validation Error' } }); } } export class PrivateService { /** * Create User * Create a new user. * @param data The data for the request. * @param data.requestBody * @returns UserPublic Successful Response * @throws ApiError */ public static createUser(data: PrivateCreateUserData): CancelablePromise { return __request(OpenAPI, { method: 'POST', url: '/api/v1/private/users/', body: data.requestBody, mediaType: 'application/json', errors: { 422: 'Validation Error' } }); } } export class SecretsService { /** * Read Secrets * List the names of stored secrets. * @returns SecretNames Successful Response * @throws ApiError */ public static readSecrets(): CancelablePromise { return __request(OpenAPI, { method: 'GET', url: '/api/v1/secrets/' }); } /** * Save Secret * Store a secret under a name that nodes can reference. * @param data The data for the request. * @param data.name * @param data.requestBody * @returns Message Successful Response * @throws ApiError */ public static saveSecret(data: SecretsSaveSecretData): CancelablePromise { return __request(OpenAPI, { method: 'PUT', url: '/api/v1/secrets/{name}', path: { name: data.name }, body: data.requestBody, mediaType: 'application/json', errors: { 422: 'Validation Error' } }); } /** * Delete Secret * Delete a secret. * @param data The data for the request. * @param data.name * @returns Message Successful Response * @throws ApiError */ public static deleteSecret(data: SecretsDeleteSecretData): CancelablePromise { return __request(OpenAPI, { method: 'DELETE', url: '/api/v1/secrets/{name}', path: { name: data.name }, errors: { 422: 'Validation Error' } }); } } export class UsersService { /** * Read Users * Retrieve users. * @param data The data for the request. * @param data.skip * @param data.limit * @returns UsersPublic Successful Response * @throws ApiError */ public static readUsers(data: UsersReadUsersData = {}): CancelablePromise { return __request(OpenAPI, { method: 'GET', url: '/api/v1/users/', query: { skip: data.skip, limit: data.limit }, errors: { 422: 'Validation Error' } }); } /** * Create User * Create new user. * @param data The data for the request. * @param data.requestBody * @returns UserPublic Successful Response * @throws ApiError */ public static createUser(data: UsersCreateUserData): CancelablePromise { return __request(OpenAPI, { method: 'POST', url: '/api/v1/users/', body: data.requestBody, mediaType: 'application/json', errors: { 422: 'Validation Error' } }); } /** * Read User Me * Get current user. * @returns UserPublic Successful Response * @throws ApiError */ public static readUserMe(): CancelablePromise { return __request(OpenAPI, { method: 'GET', url: '/api/v1/users/me' }); } /** * Delete User Me * Delete own user. * @returns Message Successful Response * @throws ApiError */ public static deleteUserMe(): CancelablePromise { return __request(OpenAPI, { method: 'DELETE', url: '/api/v1/users/me' }); } /** * Update User Me * Update own user. * @param data The data for the request. * @param data.requestBody * @returns UserPublic Successful Response * @throws ApiError */ public static updateUserMe(data: UsersUpdateUserMeData): CancelablePromise { return __request(OpenAPI, { method: 'PATCH', url: '/api/v1/users/me', body: data.requestBody, mediaType: 'application/json', errors: { 422: 'Validation Error' } }); } /** * Update Password Me * Update own password. * @param data The data for the request. * @param data.requestBody * @returns Message Successful Response * @throws ApiError */ public static updatePasswordMe(data: UsersUpdatePasswordMeData): CancelablePromise { return __request(OpenAPI, { method: 'PATCH', url: '/api/v1/users/me/password', body: data.requestBody, mediaType: 'application/json', errors: { 422: 'Validation Error' } }); } /** * Register User * Create new user without the need to be logged in. * @param data The data for the request. * @param data.requestBody * @returns UserPublic Successful Response * @throws ApiError */ public static registerUser(data: UsersRegisterUserData): CancelablePromise { return __request(OpenAPI, { method: 'POST', url: '/api/v1/users/signup', body: data.requestBody, mediaType: 'application/json', errors: { 422: 'Validation Error' } }); } /** * Read User By Id * Get a specific user by id. * @param data The data for the request. * @param data.userId * @returns UserPublic Successful Response * @throws ApiError */ public static readUserById(data: UsersReadUserByIdData): CancelablePromise { return __request(OpenAPI, { method: 'GET', url: '/api/v1/users/{user_id}', path: { user_id: data.userId }, errors: { 422: 'Validation Error' } }); } /** * Update User * Update a user. * @param data The data for the request. * @param data.userId * @param data.requestBody * @returns UserPublic Successful Response * @throws ApiError */ public static updateUser(data: UsersUpdateUserData): CancelablePromise { return __request(OpenAPI, { method: 'PATCH', url: '/api/v1/users/{user_id}', path: { user_id: data.userId }, body: data.requestBody, mediaType: 'application/json', errors: { 422: 'Validation Error' } }); } /** * Delete User * Delete a user. * @param data The data for the request. * @param data.userId * @returns Message Successful Response * @throws ApiError */ public static deleteUser(data: UsersDeleteUserData): CancelablePromise { return __request(OpenAPI, { method: 'DELETE', url: '/api/v1/users/{user_id}', path: { user_id: data.userId }, errors: { 422: 'Validation Error' } }); } } export class UtilsService { /** * Test Email * Test emails. * @param data The data for the request. * @param data.emailTo * @returns Message Successful Response * @throws ApiError */ public static testEmail(data: UtilsTestEmailData): CancelablePromise { return __request(OpenAPI, { method: 'POST', url: '/api/v1/utils/test-email/', query: { email_to: data.emailTo }, errors: { 422: 'Validation Error' } }); } /** * Health Check * @returns boolean Successful Response * @throws ApiError */ public static healthCheck(): CancelablePromise { return __request(OpenAPI, { method: 'GET', url: '/api/v1/utils/health-check/' }); } /** * Health * Deep health: 200 while the engine can serve its purpose, 503 otherwise. * * "Serve its purpose" means the event loop is responsive and the configured * state backend answers — the two failure modes a process-alive check never * sees. The queue and pool sections are filled by the execution service. * @returns unknown Successful Response * @throws ApiError */ public static health(): CancelablePromise { return __request(OpenAPI, { method: 'GET', url: '/api/v1/utils/health/' }); } }