// 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, ArtifactsPutArtifactData, ArtifactsPutArtifactResponse, ArtifactsGetArtifactData, ArtifactsGetArtifactResponse, CloudReadStatusResponse, CloudEnrollData, CloudEnrollResponse, CloudDisconnectResponse, DashboardsReadDashboardsResponse, DashboardsReadDashboardData, DashboardsReadDashboardResponse, DashboardsCreateDashboardData, DashboardsCreateDashboardResponse, DashboardsSaveDashboardData, DashboardsSaveDashboardResponse, DashboardsDeleteDashboardData, DashboardsDeleteDashboardResponse, DashboardsPublishDashboardData, DashboardsPublishDashboardResponse, DashboardsDiscardDashboardDraftData, DashboardsDiscardDashboardDraftResponse, DashboardsRenameDashboardData, DashboardsRenameDashboardResponse, FlowsReadFlowsResponse, FlowsReadNodeTypesResponse, FlowsReadGraphResponse, 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, FlowsCancelNodeData, FlowsCancelNodeResponse, FlowsReadFlowStateData, FlowsReadFlowStateResponse, FlowsReadMessageHistoryData, FlowsReadMessageHistoryResponse, LoginLoginAccessTokenData, LoginLoginAccessTokenResponse, LoginTestTokenResponse, LoginRecoverPasswordData, LoginRecoverPasswordResponse, LoginResetPasswordData, LoginResetPasswordResponse, LoginRecoverPasswordHtmlContentData, LoginRecoverPasswordHtmlContentResponse, MessagesReadMessagesResponse, MessagesPublishMessageData, MessagesPublishMessageResponse, MessagesReadMessageHistoryData, MessagesReadMessageHistoryResponse, ModulesReadModulesResponse, ModulesApplyModulesData, ModulesApplyModulesResponse, OauthRegisterClientData, OauthRegisterClientResponse, OauthAuthorizeValidateData, OauthAuthorizeValidateResponse, OauthAuthorizeData, OauthAuthorizeResponse, OauthTokenData, OauthTokenResponse, OauthReadClientsResponse, OauthRevokeClientData, OauthRevokeClientResponse, ObservabilityReadSummaryResponse, ObservabilityReadTimeseriesData, ObservabilityReadTimeseriesResponse, ObservabilityReadFlowRollupsData, ObservabilityReadFlowRollupsResponse, ObservabilityReadRunsData, ObservabilityReadRunsResponse, ObservabilityReadEventsData, ObservabilityReadEventsResponse, ObservabilityReadDeadLettersData, ObservabilityReadDeadLettersResponse, PrivateCreateUserData, PrivateCreateUserResponse, RunsCreateRunData, RunsCreateRunResponse, RunsCreateSweepData, RunsCreateSweepResponse, RunsReadRunsData, RunsReadRunsResponse, RunsReadRunData, RunsReadRunResponse, RunsCancelRunData, RunsCancelRunResponse, RunsReadMetricsData, RunsReadMetricsResponse, RunsCompareMetricData, RunsCompareMetricResponse, 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, WorkersReadWorkersResponse, WorkersIssueTokenData, WorkersIssueTokenResponse, WorkersReadRuntimeResponse } 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 ArtifactsService { /** * Put Artifact * Store the request body and answer with the reference to it. * @param data The data for the request. * @param data.name * @param data.mediaType * @returns ArtifactRef Successful Response * @throws ApiError */ public static putArtifact(data: ArtifactsPutArtifactData = {}): CancelablePromise { return __request(OpenAPI, { method: 'PUT', url: '/api/v1/artifacts', query: { name: data.name, media_type: data.mediaType }, errors: { 422: 'Validation Error' } }); } /** * Get Artifact * Stream one artifact back. * @param data The data for the request. * @param data.digest * @returns unknown Successful Response * @throws ApiError */ public static getArtifact(data: ArtifactsGetArtifactData): CancelablePromise { return __request(OpenAPI, { method: 'GET', url: '/api/v1/artifacts/{digest}', path: { digest: data.digest }, errors: { 422: 'Validation Error' } }); } } export class CloudService { /** * Read Status * Whether this installation is enrolled, and whether the link is up. * * Readable by any signed-in user: everyone here has a right to know whether * the machine they are using can be reached from outside. * @returns unknown Successful Response * @throws ApiError */ public static readStatus(): CancelablePromise { return __request(OpenAPI, { method: 'GET', url: '/api/v1/cloud/status' }); } /** * Enroll * Redeem a claim code and start dialling the portal. * * The account performing this is recorded as the one every portal session * will act as. There is no way to widen that later from the portal side. * @param data The data for the request. * @param data.requestBody * @returns Message Successful Response * @throws ApiError */ public static enroll(data: CloudEnrollData): CancelablePromise { return __request(OpenAPI, { method: 'POST', url: '/api/v1/cloud/enroll', body: data.requestBody, mediaType: 'application/json', errors: { 422: 'Validation Error' } }); } /** * Disconnect * Sever the connection from this side. * * Unilateral and immediate: the config is the only reason portal tokens * verify here, so deleting it ends remote access whatever the portal still * has on file. * @returns Message Successful Response * @throws ApiError */ public static disconnect(): CancelablePromise { return __request(OpenAPI, { method: 'DELETE', url: '/api/v1/cloud' }); } } 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 * What a panel shows, or with ``draft`` the copy the editor is on. * @param data The data for the request. * @param data.name * @param data.draft * @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 }, query: { draft: data.draft }, 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 * Save unpublished changes, refusing a save someone else has moved past. * * This writes a draft: panels keep showing the published document until * someone publishes, so nothing here can change what a wall is displaying — * which is also why the engine's history limits are left alone. * @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' } }); } /** * Publish Dashboard * Put the unpublished changes on the panels. * @param data The data for the request. * @param data.name * @param data.requestBody * @returns DashboardDef_Output Successful Response * @throws ApiError */ public static publishDashboard(data: DashboardsPublishDashboardData): CancelablePromise { return __request(OpenAPI, { method: 'POST', url: '/api/v1/dashboards/{name}/publish', path: { name: data.name }, body: data.requestBody, mediaType: 'application/json', errors: { 422: 'Validation Error' } }); } /** * Discard Dashboard Draft * Throw the unpublished changes away and go back to what is shown. * @param data The data for the request. * @param data.name * @returns DashboardDef_Output Successful Response * @throws ApiError */ public static discardDashboardDraft(data: DashboardsDiscardDashboardDraftData): CancelablePromise { return __request(OpenAPI, { method: 'POST', url: '/api/v1/dashboards/{name}/discard', 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 Graph * Every flow as one graph, with nodes talking to the same thing merged. * @returns BrainGraph Successful Response * @throws ApiError */ public static readGraph(): CancelablePromise { return __request(OpenAPI, { method: 'GET', url: '/api/v1/flows/graph' }); } /** * 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. * * A *batch* flow is submitted as a run instead, because that is what running * one means: it is what keeps the parameters, the series and the result, and * a button that quietly did something else would be a trap. * @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' } }); } /** * Cancel Node * Stop a node that is running right now, by killing the worker running it. * * Idempotent on purpose: by the time a click reaches here the node may well * have finished, and that is the outcome that was asked for. * @param data The data for the request. * @param data.name * @param data.nodeId * @returns Message Successful Response * @throws ApiError */ public static cancelNode(data: FlowsCancelNodeData): CancelablePromise { return __request(OpenAPI, { method: 'POST', url: '/api/v1/flows/{name}/nodes/{node_id}/cancel', path: { name: data.name, node_id: data.nodeId }, 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 ModulesService { /** * Read Modules * What node code can import, and whether it matches the manifest. * @returns ModulesInfo Successful Response * @throws ApiError */ public static readModules(): CancelablePromise { return __request(OpenAPI, { method: 'GET', url: '/api/v1/modules/' }); } /** * Apply Modules * Install exactly these requirements, then hand them to the workers. * * A manifest that does not resolve changes nothing: the venv is left as it * was and the stored manifest is only written once the install succeeded. * @param data The data for the request. * @param data.requestBody * @returns ApplyResult Successful Response * @throws ApiError */ public static applyModules(data: ModulesApplyModulesData): CancelablePromise { return __request(OpenAPI, { method: 'POST', url: '/api/v1/modules/apply', body: data.requestBody, mediaType: 'application/json', 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 ObservabilityService { /** * Read Summary * How the engine is doing right now. Always 200, degraded or not. * @returns HealthSummary Successful Response * @throws ApiError */ public static readSummary(): CancelablePromise { return __request(OpenAPI, { method: 'GET', url: '/api/v1/observability/summary' }); } /** * Read Timeseries * Executions, errors and timings over time, summed across nodes. * @param data The data for the request. * @param data.flow * @param data.node * @param data.hours * @param data.bucketS * @returns SeriesPoint Successful Response * @throws ApiError */ public static readTimeseries(data: ObservabilityReadTimeseriesData = {}): CancelablePromise { return __request(OpenAPI, { method: 'GET', url: '/api/v1/observability/timeseries', query: { flow: data.flow, node: data.node, hours: data.hours, bucket_s: data.bucketS }, errors: { 422: 'Validation Error' } }); } /** * Read Flow Rollups * One row per flow, with a coarse trend of how much it ran. * @param data The data for the request. * @param data.hours * @returns FlowRollup Successful Response * @throws ApiError */ public static readFlowRollups(data: ObservabilityReadFlowRollupsData = {}): CancelablePromise { return __request(OpenAPI, { method: 'GET', url: '/api/v1/observability/flows', query: { hours: data.hours }, errors: { 422: 'Validation Error' } }); } /** * Read Runs * Recent cascades, newest first. * * ``since`` is inclusive and ``until`` exclusive, so a window of one minute * holds exactly the runs of the minute bucket the charts are drawn from. * @param data The data for the request. * @param data.flow * @param data.status * @param data.since * @param data.until * @param data.limit * @returns app__api__routes__observability__RunRow Successful Response * @throws ApiError */ public static readRuns(data: ObservabilityReadRunsData = {}): CancelablePromise { return __request(OpenAPI, { method: 'GET', url: '/api/v1/observability/runs', query: { flow: data.flow, status: data.status, since: data.since, until: data.until, limit: data.limit }, errors: { 422: 'Validation Error' } }); } /** * Read Events * What went wrong, or who changed what. Newest first. * * ``since`` is inclusive and ``until`` exclusive, the same window ``/runs`` * takes, so a list can cover the span the charts beside it are drawn from. * @param data The data for the request. * @param data.kind * @param data.flow * @param data.since * @param data.until * @param data.limit * @returns EventRow Successful Response * @throws ApiError */ public static readEvents(data: ObservabilityReadEventsData = {}): CancelablePromise { return __request(OpenAPI, { method: 'GET', url: '/api/v1/observability/events', query: { kind: data.kind, flow: data.flow, since: data.since, until: data.until, limit: data.limit }, errors: { 422: 'Validation Error' } }); } /** * Read Dead Letters * Work the engine gave up on, which nothing else surfaces. * @param data The data for the request. * @param data.limit * @returns DeadLetter Successful Response * @throws ApiError */ public static readDeadLetters(data: ObservabilityReadDeadLettersData = {}): CancelablePromise { return __request(OpenAPI, { method: 'GET', url: '/api/v1/observability/dead-letter', query: { limit: data.limit }, 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 RunsService { /** * Create Run * Queue one run of a flow. * @param data The data for the request. * @param data.name * @param data.requestBody * @returns app__api__routes__runs__RunRow Successful Response * @throws ApiError */ public static createRun(data: RunsCreateRunData): CancelablePromise { return __request(OpenAPI, { method: 'POST', url: '/api/v1/runs/flows/{name}', path: { name: data.name }, body: data.requestBody, mediaType: 'application/json', errors: { 422: 'Validation Error' } }); } /** * Create Sweep * Queue many runs of one flow under a shared group. * * An ensemble is this with the same parameters and different seeds; a grid * search is this with the parameters spread out. Either way the caller * builds the list — the engine does not own a sweep grammar. * @param data The data for the request. * @param data.name * @param data.requestBody * @returns app__api__routes__runs__RunRow Successful Response * @throws ApiError */ public static createSweep(data: RunsCreateSweepData): CancelablePromise { return __request(OpenAPI, { method: 'POST', url: '/api/v1/runs/flows/{name}/sweep', path: { name: data.name }, body: data.requestBody, mediaType: 'application/json', errors: { 422: 'Validation Error' } }); } /** * Read Runs * Runs, newest first. The queryable table an experiment log needs. * @param data The data for the request. * @param data.flow * @param data.status * @param data.group * @param data.digest * @param data.limit * @returns app__api__routes__runs__RunRow Successful Response * @throws ApiError */ public static readRuns(data: RunsReadRunsData = {}): CancelablePromise { return __request(OpenAPI, { method: 'GET', url: '/api/v1/runs', query: { flow: data.flow, status: data.status, group: data.group, digest: data.digest, limit: data.limit }, errors: { 422: 'Validation Error' } }); } /** * Read Run * One run in full: what it was asked, what each node did, what it made. * @param data The data for the request. * @param data.runId * @returns RunDetail Successful Response * @throws ApiError */ public static readRun(data: RunsReadRunData): CancelablePromise { return __request(OpenAPI, { method: 'GET', url: '/api/v1/runs/{run_id}', path: { run_id: data.runId }, errors: { 422: 'Validation Error' } }); } /** * Cancel Run * Stop a run. One already past its last node is left as it finished. * @param data The data for the request. * @param data.runId * @returns app__api__routes__runs__RunRow Successful Response * @throws ApiError */ public static cancelRun(data: RunsCancelRunData): CancelablePromise { return __request(OpenAPI, { method: 'POST', url: '/api/v1/runs/{run_id}/cancel', path: { run_id: data.runId }, errors: { 422: 'Validation Error' } }); } /** * Read Metrics * One metric's series, in step order. * * ``stride`` thins a long curve down: 3000 steps drawn on a 400-pixel chart * is 3000 points nobody can see. * @param data The data for the request. * @param data.runId * @param data.name * @param data.stride * @returns MetricPoint Successful Response * @throws ApiError */ public static readMetrics(data: RunsReadMetricsData): CancelablePromise { return __request(OpenAPI, { method: 'GET', url: '/api/v1/runs/{run_id}/metrics', path: { run_id: data.runId }, query: { name: data.name, stride: data.stride }, errors: { 422: 'Validation Error' } }); } /** * Compare Metric * One metric across several runs, as the chart widget's series shape. * * This is the comparison view: it answers in the same shape a flow answers a * chart's query with, so putting three training curves beside each other is * a widget binding rather than a screen of its own. * @param data The data for the request. * @param data.ids * @param data.metric * @returns SeriesAnswer Successful Response * @throws ApiError */ public static compareMetric(data: RunsCompareMetricData): CancelablePromise { return __request(OpenAPI, { method: 'GET', url: '/api/v1/runs/series/compare', query: { ids: data.ids, metric: data.metric }, 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/' }); } } export class WorkersService { /** * Read Workers * What is attached, and how busy it is. * @returns WorkerInfo Successful Response * @throws ApiError */ public static readWorkers(): CancelablePromise { return __request(OpenAPI, { method: 'GET', url: '/api/v1/workers' }); } /** * Issue Token * Mint the credential a worker presents when it dials in. * * Shown once. It is signed with the same keypair the agent tokens use, so * rotating that key revokes every worker along with them. * @param data The data for the request. * @param data.requestBody * @returns TokenIssued Successful Response * @throws ApiError */ public static issueToken(data: WorkersIssueTokenData): CancelablePromise { return __request(OpenAPI, { method: 'POST', url: '/api/v1/workers/tokens', body: data.requestBody, mediaType: 'application/json', errors: { 422: 'Validation Error' } }); } /** * Read Runtime * The worker's own code, so a fresh host installs by fetching one file. * * It is the same module the engine's local workers run — deliberately * standard library only, and with nothing of the app importable in it. * @returns string Successful Response * @throws ApiError */ public static readRuntime(): CancelablePromise { return __request(OpenAPI, { method: 'GET', url: '/api/v1/workers/runtime' }); } }