Files
app/frontend/src/client/sdk.gen.ts
T

3437 lines
117 KiB
TypeScript

// 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 { AiReadAiConfigResponse, AiUpdateAiConfigData, AiUpdateAiConfigResponse, AiDeleteAiConfigResponse, AiListAiModelsData, AiListAiModelsResponse, AiReadAiStatusResponse, AiReadControlNodesResponse, AiReadChatResponse, AiChatData, AiChatResponse, AiClearChatResponse, AlertsReadAlertsConfigResponse, AlertsSaveAlertsConfigData, AlertsSaveAlertsConfigResponse, AlertsReadWebpushKeyResponse, AlertsAddWebpushSubscriptionData, AlertsAddWebpushSubscriptionResponse, AlertsRemoveWebpushSubscriptionData, AlertsRemoveWebpushSubscriptionResponse, AlertsStartTelegramLinkData, AlertsStartTelegramLinkResponse, AlertsReadTelegramLinkData, AlertsReadTelegramLinkResponse, AlertsCancelTelegramLinkData, AlertsCancelTelegramLinkResponse, AlertsTestChannelData, AlertsTestChannelResponse, ArtifactsPutArtifactData, ArtifactsPutArtifactResponse, ArtifactsGetArtifactData, ArtifactsGetArtifactResponse, ArtifactsDeleteArtifactData, ArtifactsDeleteArtifactResponse, CloudReadStatusResponse, CloudEnrollData, CloudEnrollResponse, CloudAddRemoteUserData, CloudAddRemoteUserResponse, CloudReadMembersResponse, CloudLinkMemberData, CloudLinkMemberResponse, CloudRevokeMemberData, CloudRevokeMemberResponse, CloudDisconnectResponse, ConnectorsReadConnectorStateData, ConnectorsReadConnectorStateResponse, ConnectorsClearConnectorStateData, ConnectorsClearConnectorStateResponse, ConnectorsDeleteConnectorStateData, ConnectorsDeleteConnectorStateResponse, DashboardsReadDashboardsResponse, DashboardsReadDashboardData, DashboardsReadDashboardResponse, DashboardsCreateDashboardData, DashboardsCreateDashboardResponse, DashboardsSaveDashboardData, DashboardsSaveDashboardResponse, DashboardsDeleteDashboardData, DashboardsDeleteDashboardResponse, DashboardsGenerateResultsDashboardData, DashboardsGenerateResultsDashboardResponse, DashboardsPublishDashboardData, DashboardsPublishDashboardResponse, DashboardsDiscardDashboardDraftData, DashboardsDiscardDashboardDraftResponse, DashboardsDuplicateDashboardData, DashboardsDuplicateDashboardResponse, DevicesStartPairingData, DevicesStartPairingResponse, DevicesPollPairingData, DevicesPollPairingResponse, DevicesReadDevicesResponse, DevicesReadPendingResponse, DevicesPendingDeviceData, DevicesPendingDeviceResponse, DevicesCreateDeviceData, DevicesCreateDeviceResponse, DevicesReadDeviceData, DevicesReadDeviceResponse, DevicesSaveDeviceData, DevicesSaveDeviceResponse, DevicesDeleteDeviceData, DevicesDeleteDeviceResponse, DevicesReadIceData, DevicesReadIceResponse, DevicesPutReportData, DevicesPutReportResponse, DevicesApprovePairingData, DevicesApprovePairingResponse, DevicesUnpairDeviceData, DevicesUnpairDeviceResponse, FlavorsReadFlavorsResponse, FlavorsCreateFlavorData, FlavorsCreateFlavorResponse, FlavorsUpdateFlavorData, FlavorsUpdateFlavorResponse, FlavorsDeleteFlavorData, FlavorsDeleteFlavorResponse, FlowsReadFlowsResponse, FlowsReadNodeTypesResponse, FlowsReadGraphResponse, FlowsReadLibraryResponse, FlowsDeleteSharedNodeData, FlowsDeleteSharedNodeResponse, FlowsReadFlowData, FlowsReadFlowResponse, FlowsSaveFlowData, FlowsSaveFlowResponse, FlowsDeleteFlowData, FlowsDeleteFlowResponse, FlowsPublishFlowData, FlowsPublishFlowResponse, FlowsDiscardDraftData, FlowsDiscardDraftResponse, FlowsDuplicateFlowData, FlowsDuplicateFlowResponse, 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, FlowsAcknowledgeNodeErrorData, FlowsAcknowledgeNodeErrorResponse, FlowsTrainNodeData, FlowsTrainNodeResponse, FlowsReadTrainingData, FlowsReadTrainingResponse, FlowsReadFlowStateData, FlowsReadFlowStateResponse, FlowsReadMessageHistoryData, FlowsReadMessageHistoryResponse, FlowsIssueSocketTicketResponse, LoginLoginAccessTokenData, LoginLoginAccessTokenResponse, LoginTestTokenResponse, LoginRecoverPasswordData, LoginRecoverPasswordResponse, LoginResetPasswordData, LoginResetPasswordResponse, LoginRecoverPasswordHtmlContentData, LoginRecoverPasswordHtmlContentResponse, MessagesReadMessagesResponse, MessagesPublishMessageData, MessagesPublishMessageResponse, MessagesReadMessageHistoryData, MessagesReadMessageHistoryResponse, ModulesReadModulesResponse, ModulesApplyModulesData, ModulesApplyModulesResponse, ModulesRefreshModulesResponse, OauthRegisterClientData, OauthRegisterClientResponse, OauthAuthorizeValidateData, OauthAuthorizeValidateResponse, OauthAuthorizeData, OauthAuthorizeResponse, OauthTokenData, OauthTokenResponse, OauthReadClientsResponse, OauthRevokeClientData, OauthRevokeClientResponse, ObservabilityReadSummaryResponse, ObservabilityReadTimeseriesData, ObservabilityReadTimeseriesResponse, ObservabilityReadFlowRollupsData, ObservabilityReadFlowRollupsResponse, ObservabilityReadNodeTypeTimingsData, ObservabilityReadNodeTypeTimingsResponse, ObservabilityReadRunsData, ObservabilityReadRunsResponse, ObservabilityReadEventsData, ObservabilityReadEventsResponse, ObservabilityReadDeadLettersData, ObservabilityReadDeadLettersResponse, ObservabilityFlushMetricsResponse, PrivateCreateUserData, PrivateCreateUserResponse, RunsCreateRunData, RunsCreateRunResponse, RunsCreateSweepData, RunsCreateSweepResponse, RunsImportRunsData, RunsImportRunsResponse, RunsReadRunsData, RunsReadRunsResponse, RunsDeleteRunsData, RunsDeleteRunsResponse, RunsReadOverviewResponse, RunsExportMetricsData, RunsExportMetricsResponse, RunsExportRunsData, RunsExportRunsResponse, RunsReadMetricNamesData, RunsReadMetricNamesResponse, RunsReadRunData, RunsReadRunResponse, RunsDeleteRunData, RunsDeleteRunResponse, RunsReadNodeOutputsData, RunsReadNodeOutputsResponse, RunsCancelRunData, RunsCancelRunResponse, RunsRetryRunData, RunsRetryRunResponse, RunsReadMetricsData, RunsReadMetricsResponse, RunsCompareMetricData, RunsCompareMetricResponse, SearchReadSearchIndexResponse, 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, UtilsReadConfigResponse, UtilsHealthCheckResponse, UtilsHealthResponse, WorkersReadWorkersResponse, WorkersReadResourcesResponse, WorkersReadTokensResponse, WorkersIssueTokenData, WorkersIssueTokenResponse, WorkersRevokeTokenData, WorkersRevokeTokenResponse, WorkersReadRuntimeResponse } from './types.gen';
export class AiService {
/**
* Read Ai Config
* @returns AIConfigPublic Successful Response
* @throws ApiError
*/
public static readAiConfig(): CancelablePromise<AiReadAiConfigResponse> {
return __request(OpenAPI, {
method: 'GET',
url: '/api/v1/ai/config'
});
}
/**
* Update Ai Config
* @param data The data for the request.
* @param data.requestBody
* @returns AIConfigPublic Successful Response
* @throws ApiError
*/
public static updateAiConfig(data: AiUpdateAiConfigData): CancelablePromise<AiUpdateAiConfigResponse> {
return __request(OpenAPI, {
method: 'PUT',
url: '/api/v1/ai/config',
body: data.requestBody,
mediaType: 'application/json',
errors: {
422: 'Validation Error'
}
});
}
/**
* Delete Ai Config
* @returns unknown Successful Response
* @throws ApiError
*/
public static deleteAiConfig(): CancelablePromise<AiDeleteAiConfigResponse> {
return __request(OpenAPI, {
method: 'DELETE',
url: '/api/v1/ai/config'
});
}
/**
* List Ai Models
* What the provider offers, tried with the key given or the one stored.
* @param data The data for the request.
* @param data.requestBody
* @returns string Successful Response
* @throws ApiError
*/
public static listAiModels(data: AiListAiModelsData): CancelablePromise<AiListAiModelsResponse> {
return __request(OpenAPI, {
method: 'POST',
url: '/api/v1/ai/config/models',
body: data.requestBody,
mediaType: 'application/json',
errors: {
422: 'Validation Error'
}
});
}
/**
* Read Ai Status
* Whether there is an assistant to show. Readable by anyone signed in.
* @returns AIStatus Successful Response
* @throws ApiError
*/
public static readAiStatus(): CancelablePromise<AiReadAiStatusResponse> {
return __request(OpenAPI, {
method: 'GET',
url: '/api/v1/ai/status'
});
}
/**
* Read Control Nodes
* The conversations of the running live flows, for the chat's Control tab.
*
* One per wren or assistant node a command reaches first. A node whose
* prompt is another's ``unhandled`` answers in that one's conversation,
* after it. The conversation shows the prompt, the words heard so far (the
* ``partial`` of a ``stt`` node writing the prompt), and each node's
* ``reply`` and ``actions``, so typed and spoken commands are one.
* @returns ControlNode Successful Response
* @throws ApiError
*/
public static readControlNodes(): CancelablePromise<AiReadControlNodesResponse> {
return __request(OpenAPI, {
method: 'GET',
url: '/api/v1/ai/control'
});
}
/**
* Read Chat
* The transcript, with each tool's answer reduced to whether it worked.
* @returns ChatItem Successful Response
* @throws ApiError
*/
public static readChat(): CancelablePromise<AiReadChatResponse> {
return __request(OpenAPI, {
method: 'GET',
url: '/api/v1/ai/chat'
});
}
/**
* Chat
* One turn, streamed as server-sent events.
*
* ``delta`` as the model writes, ``message`` with a round's whole text,
* ``tool_call`` and ``tool_result`` as it works, ``error`` when something
* stops it, and ``done`` last either way.
* @param data The data for the request.
* @param data.requestBody
* @returns unknown Successful Response
* @throws ApiError
*/
public static chat(data: AiChatData): CancelablePromise<AiChatResponse> {
return __request(OpenAPI, {
method: 'POST',
url: '/api/v1/ai/chat',
body: data.requestBody,
mediaType: 'application/json',
errors: {
422: 'Validation Error'
}
});
}
/**
* Clear Chat
* @returns ChatItem Successful Response
* @throws ApiError
*/
public static clearChat(): CancelablePromise<AiClearChatResponse> {
return __request(OpenAPI, {
method: 'DELETE',
url: '/api/v1/ai/chat'
});
}
}
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<AlertsReadAlertsConfigResponse> {
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<AlertsSaveAlertsConfigResponse> {
return __request(OpenAPI, {
method: 'PUT',
url: '/api/v1/alerts/config',
body: data.requestBody,
mediaType: 'application/json',
errors: {
422: 'Validation Error'
}
});
}
/**
* Read Webpush Key
* The key a browser subscribes against. Made on the first ask.
* @returns WebPushKey Successful Response
* @throws ApiError
*/
public static readWebpushKey(): CancelablePromise<AlertsReadWebpushKeyResponse> {
return __request(OpenAPI, {
method: 'GET',
url: '/api/v1/alerts/webpush/key'
});
}
/**
* Add Webpush Subscription
* Remember this browser, so a `webpush` channel can reach it.
* @param data The data for the request.
* @param data.requestBody
* @returns Message Successful Response
* @throws ApiError
*/
public static addWebpushSubscription(data: AlertsAddWebpushSubscriptionData): CancelablePromise<AlertsAddWebpushSubscriptionResponse> {
return __request(OpenAPI, {
method: 'POST',
url: '/api/v1/alerts/webpush/subscriptions',
body: data.requestBody,
mediaType: 'application/json',
errors: {
422: 'Validation Error'
}
});
}
/**
* Remove Webpush Subscription
* Forget this browser.
* @param data The data for the request.
* @param data.requestBody
* @returns Message Successful Response
* @throws ApiError
*/
public static removeWebpushSubscription(data: AlertsRemoveWebpushSubscriptionData): CancelablePromise<AlertsRemoveWebpushSubscriptionResponse> {
return __request(OpenAPI, {
method: 'POST',
url: '/api/v1/alerts/webpush/unsubscribe',
body: data.requestBody,
mediaType: 'application/json',
errors: {
422: 'Validation Error'
}
});
}
/**
* Start Telegram Link
* A one-time link that connects whichever chat opens it first.
*
* Typing a chat id would prove nothing about whose it is. Here the chat
* sends the code back through the bot, so it is one somebody opened with a
* link the operator handed out. Good for ten minutes, and for one chat.
* @param data The data for the request.
* @param data.channelName
* @returns TelegramLink Successful Response
* @throws ApiError
*/
public static startTelegramLink(data: AlertsStartTelegramLinkData): CancelablePromise<AlertsStartTelegramLinkResponse> {
return __request(OpenAPI, {
method: 'POST',
url: '/api/v1/alerts/telegram/{channel_name}/link',
path: {
channel_name: data.channelName
},
errors: {
422: 'Validation Error'
}
});
}
/**
* Read Telegram Link
* Whether a code for this channel is still waiting to be used.
* @param data The data for the request.
* @param data.channelName
* @returns TelegramLinkStatus Successful Response
* @throws ApiError
*/
public static readTelegramLink(data: AlertsReadTelegramLinkData): CancelablePromise<AlertsReadTelegramLinkResponse> {
return __request(OpenAPI, {
method: 'GET',
url: '/api/v1/alerts/telegram/{channel_name}/link',
path: {
channel_name: data.channelName
},
errors: {
422: 'Validation Error'
}
});
}
/**
* Cancel Telegram Link
* Stop waiting for a chat to open the link.
* @param data The data for the request.
* @param data.channelName
* @returns Message Successful Response
* @throws ApiError
*/
public static cancelTelegramLink(data: AlertsCancelTelegramLinkData): CancelablePromise<AlertsCancelTelegramLinkResponse> {
return __request(OpenAPI, {
method: 'DELETE',
url: '/api/v1/alerts/telegram/{channel_name}/link',
path: {
channel_name: data.channelName
},
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<AlertsTestChannelResponse> {
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.
*
* Spooled to disk as it arrives rather than buffered: a video segment is as
* legitimate a body here as a checkpoint, and neither should have to fit in
* memory twice. Capped, because nothing else here was: any account, and any
* worker credential, could otherwise fill the data volume.
*
* ``volatile`` puts it in the ring instead of the store — a frame a screen is
* watching now, which the oldest of falls out of memory rather than being
* kept. A worker on another host or a device publishing a camera sends this.
* It is read into memory, where the ring holds it, and never touches the
* disk, so it is held to ``MAX_FRAME_BYTES`` rather than the store's cap.
* @param data The data for the request.
* @param data.name
* @param data.mediaType
* @param data.volatile
* @returns ArtifactRef Successful Response
* @throws ApiError
*/
public static putArtifact(data: ArtifactsPutArtifactData = {}): CancelablePromise<ArtifactsPutArtifactResponse> {
return __request(OpenAPI, {
method: 'PUT',
url: '/api/v1/artifacts',
query: {
name: data.name,
media_type: data.mediaType,
volatile: data.volatile
},
errors: {
422: 'Validation Error'
}
});
}
/**
* Get Artifact
* Serve one artifact back.
*
* The caller passes the media type off the reference it holds, which is what
* lets a browser play a clip rather than download it; the store itself keeps
* only bytes. Ranged requests are answered because an audio or video element
* scrubbing through a file asks for them.
* @param data The data for the request.
* @param data.digest
* @param data.mediaType
* @returns unknown Successful Response
* @throws ApiError
*/
public static getArtifact(data: ArtifactsGetArtifactData): CancelablePromise<ArtifactsGetArtifactResponse> {
return __request(OpenAPI, {
method: 'GET',
url: '/api/v1/artifacts/{digest}',
path: {
digest: data.digest
},
query: {
media_type: data.mediaType
},
errors: {
422: 'Validation Error'
}
});
}
/**
* Delete Artifact
* Remove one artifact's bytes from the store.
*
* A superuser's call, because the store records no uploader and identical
* content from two callers is one file, so nobody else can be said to own
* it. Refused while anything still names the digest, the same references the
* hourly sweep keeps, so a reference that exists never answers 404. The
* volatile ring is left alone: its frames fall out on their own.
* @param data The data for the request.
* @param data.digest
* @returns void Successful Response
* @throws ApiError
*/
public static deleteArtifact(data: ArtifactsDeleteArtifactData): CancelablePromise<ArtifactsDeleteArtifactResponse> {
return __request(OpenAPI, {
method: 'DELETE',
url: '/api/v1/artifacts/{digest}',
path: {
digest: data.digest
},
errors: {
422: 'Validation Error'
}
});
}
}
export class CloudService {
/**
* Read Status
* Whether this instance 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<CloudReadStatusResponse> {
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 mapped to the portal account that owns the
* instance, so the owner's portal sessions arrive here as them. Widening
* that to anyone else is a local decision made one person at a time, below —
* never something the portal can do from its side.
*
* The same work as `fluksio enroll` on the command line, which is how a
* machine with no browser pointed at it does this.
* @param data The data for the request.
* @param data.requestBody
* @returns Message Successful Response
* @throws ApiError
*/
public static enroll(data: CloudEnrollData): CancelablePromise<CloudEnrollResponse> {
return __request(OpenAPI, {
method: 'POST',
url: '/api/v1/cloud/enroll',
body: data.requestBody,
mediaType: 'application/json',
errors: {
422: 'Validation Error'
}
});
}
/**
* Add Remote User
* Admit a portal account, and give it a local user of its own.
*
* The point of the local user is that it is ordinary: a remote person shows
* up in Admin → Users like everyone else, holds no superuser flag, and is
* removed by deleting them there. They have no password because they never
* sign in here — the portal vouches for them, and this row is what says which
* of our accounts that vouching amounts to.
* @param data The data for the request.
* @param data.requestBody
* @returns UserPublic Successful Response
* @throws ApiError
*/
public static addRemoteUser(data: CloudAddRemoteUserData): CancelablePromise<CloudAddRemoteUserResponse> {
return __request(OpenAPI, {
method: 'POST',
url: '/api/v1/cloud/users',
body: data.requestBody,
mediaType: 'application/json',
errors: {
422: 'Validation Error'
}
});
}
/**
* Read Members
* Everyone the portal admits to this instance, its owner aside.
*
* A share link admits somebody at the portal before this instance has heard
* of them, so this is the one place a superuser here can see who may still
* arrive. It also shows a membership left standing when a local user was
* deleted while the portal could not be told.
* @returns PortalMember Successful Response
* @throws ApiError
*/
public static readMembers(): CancelablePromise<CloudReadMembersResponse> {
return __request(OpenAPI, {
method: 'GET',
url: '/api/v1/cloud/members'
});
}
/**
* Link Member
* Let a pending member in as the local user that already has their email.
*
* Arriving on their own they are refused, because handing an existing
* account to whoever holds that address at the portal is not a guess to
* make. This is a superuser deciding it, and never for a superuser's account.
* @param data The data for the request.
* @param data.portalSub
* @returns UserPublic Successful Response
* @throws ApiError
*/
public static linkMember(data: CloudLinkMemberData): CancelablePromise<CloudLinkMemberResponse> {
return __request(OpenAPI, {
method: 'POST',
url: '/api/v1/cloud/members/{portal_sub}/link',
path: {
portal_sub: data.portalSub
},
errors: {
422: 'Validation Error'
}
});
}
/**
* Revoke Member
* Take a portal membership back.
*
* For somebody who has not arrived, this is the whole of their access.
* Somebody who has is deleted under Admin → Users instead, which also does
* this.
* @param data The data for the request.
* @param data.portalSub
* @returns Message Successful Response
* @throws ApiError
*/
public static revokeMember(data: CloudRevokeMemberData): CancelablePromise<CloudRevokeMemberResponse> {
return __request(OpenAPI, {
method: 'DELETE',
url: '/api/v1/cloud/members/{portal_sub}',
path: {
portal_sub: data.portalSub
},
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. The users the portal let in go with it. The account it was
* enrolled as stays, and so does every superuser.
* @returns Message Successful Response
* @throws ApiError
*/
public static disconnect(): CancelablePromise<CloudDisconnectResponse> {
return __request(OpenAPI, {
method: 'DELETE',
url: '/api/v1/cloud'
});
}
}
export class ConnectorsService {
/**
* Read Connector State
* The keys this connector keeps, without their values.
* @param data The data for the request.
* @param data.nodeType
* @returns ConnectorStatePublic Successful Response
* @throws ApiError
*/
public static readConnectorState(data: ConnectorsReadConnectorStateData): CancelablePromise<ConnectorsReadConnectorStateResponse> {
return __request(OpenAPI, {
method: 'GET',
url: '/api/v1/connectors/{node_type}/state',
path: {
node_type: data.nodeType
},
errors: {
422: 'Validation Error'
}
});
}
/**
* Clear Connector State
* Forget everything this connector keeps. It starts over on next use.
* @param data The data for the request.
* @param data.nodeType
* @returns Message Successful Response
* @throws ApiError
*/
public static clearConnectorState(data: ConnectorsClearConnectorStateData): CancelablePromise<ConnectorsClearConnectorStateResponse> {
return __request(OpenAPI, {
method: 'DELETE',
url: '/api/v1/connectors/{node_type}/state',
path: {
node_type: data.nodeType
},
errors: {
422: 'Validation Error'
}
});
}
/**
* Delete Connector State
* Forget one key, such as the certificate pinned for one bridge.
* @param data The data for the request.
* @param data.nodeType
* @param data.key
* @returns Message Successful Response
* @throws ApiError
*/
public static deleteConnectorState(data: ConnectorsDeleteConnectorStateData): CancelablePromise<ConnectorsDeleteConnectorStateResponse> {
return __request(OpenAPI, {
method: 'DELETE',
url: '/api/v1/connectors/{node_type}/state/{key}',
path: {
node_type: data.nodeType,
key: data.key
},
errors: {
422: 'Validation Error'
}
});
}
}
export class DashboardsService {
/**
* Read Dashboards
* Every dashboard, without its contents.
* @returns DashboardsPublic Successful Response
* @throws ApiError
*/
public static readDashboards(): CancelablePromise<DashboardsReadDashboardsResponse> {
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<DashboardsReadDashboardResponse> {
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.
*
* A draft, like every edit that follows it — a dashboard reaches a panel
* only once someone publishes it, so an empty one never does.
* @param data The data for the request.
* @param data.name
* @returns DashboardDef_Output Successful Response
* @throws ApiError
*/
public static createDashboard(data: DashboardsCreateDashboardData): CancelablePromise<DashboardsCreateDashboardResponse> {
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<DashboardsSaveDashboardResponse> {
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<DashboardsDeleteDashboardResponse> {
return __request(OpenAPI, {
method: 'DELETE',
url: '/api/v1/dashboards/{name}',
path: {
name: data.name
},
errors: {
422: 'Validation Error'
}
});
}
/**
* Generate Results Dashboard
* Draw a batch flow's results as a dashboard, from the ports it declares.
*
* Published straight away rather than left as a draft: there is nothing to
* review that the flow did not already say, and what makes it useful is
* being able to open it against a run immediately. It is an ordinary
* dashboard afterwards — editing it is how it stops being generic.
* @param data The data for the request.
* @param data.flow
* @returns DashboardDef_Output Successful Response
* @throws ApiError
*/
public static generateResultsDashboard(data: DashboardsGenerateResultsDashboardData): CancelablePromise<DashboardsGenerateResultsDashboardResponse> {
return __request(OpenAPI, {
method: 'POST',
url: '/api/v1/dashboards/from-flow/{flow}',
path: {
flow: data.flow
},
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<DashboardsPublishDashboardResponse> {
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<DashboardsDiscardDashboardDraftResponse> {
return __request(OpenAPI, {
method: 'POST',
url: '/api/v1/dashboards/{name}/discard',
path: {
name: data.name
},
errors: {
422: 'Validation Error'
}
});
}
/**
* Duplicate Dashboard
* Copy a dashboard into a new one that is only a draft, named after it.
*
* No history limits to apply, as for a new dashboard: nothing published moved.
* @param data The data for the request.
* @param data.name
* @returns DashboardDef_Output Successful Response
* @throws ApiError
*/
public static duplicateDashboard(data: DashboardsDuplicateDashboardData): CancelablePromise<DashboardsDuplicateDashboardResponse> {
return __request(OpenAPI, {
method: 'POST',
url: '/api/v1/dashboards/{name}/duplicate',
path: {
name: data.name
},
errors: {
422: 'Validation Error'
}
});
}
}
export class DevicesService {
/**
* Start Pairing
* A device asks to be adopted. Unauthenticated, by necessity.
*
* All this hands out is a code that means nothing until somebody with an
* account approves it, so the worst an unwelcome caller achieves is an entry
* that expires ten minutes later. Reachable from the internet when this
* instance is enrolled with a portal, which is what the per-address limit,
* the cap and the portal's own limits are between. At the cap the oldest
* request makes room, so a flood delays a device rather than locking it out.
* @param data The data for the request.
* @param data.requestBody
* @returns PairStarted Successful Response
* @throws ApiError
*/
public static startPairing(data: DevicesStartPairingData = {}): CancelablePromise<DevicesStartPairingResponse> {
return __request(OpenAPI, {
method: 'POST',
url: '/api/v1/devices/pair',
body: data.requestBody,
mediaType: 'application/json',
errors: {
422: 'Validation Error'
}
});
}
/**
* Poll Pairing
* Has anyone claimed this device yet?
*
* Answers the same 404 for a code that never existed, one that expired and
* one polled with the wrong secret: a caller reading a code off a wall learns
* nothing by guessing.
* @param data The data for the request.
* @param data.code
* @param data.secret
* @returns PairStatus Successful Response
* @throws ApiError
*/
public static pollPairing(data: DevicesPollPairingData): CancelablePromise<DevicesPollPairingResponse> {
return __request(OpenAPI, {
method: 'GET',
url: '/api/v1/devices/pair/{code}',
path: {
code: data.code
},
query: {
secret: data.secret
},
errors: {
422: 'Validation Error'
}
});
}
/**
* Read Devices
* Every device, what each one shows, and whether it is connected.
* @returns DevicesPublic Successful Response
* @throws ApiError
*/
public static readDevices(): CancelablePromise<DevicesReadDevicesResponse> {
return __request(OpenAPI, {
method: 'GET',
url: '/api/v1/devices/'
});
}
/**
* Read Pending
* The devices asking for a code right now, as they describe themselves.
* @returns PendingDevice Successful Response
* @throws ApiError
*/
public static readPending(): CancelablePromise<DevicesReadPendingResponse> {
return __request(OpenAPI, {
method: 'GET',
url: '/api/v1/devices/pending'
});
}
/**
* Pending Device
* What is waiting on this code, before anyone says what it is.
* @param data The data for the request.
* @param data.code
* @returns PendingDevice Successful Response
* @throws ApiError
*/
public static pendingDevice(data: DevicesPendingDeviceData): CancelablePromise<DevicesPendingDeviceResponse> {
return __request(OpenAPI, {
method: 'GET',
url: '/api/v1/devices/pair/{code}/device',
path: {
code: data.code
},
errors: {
422: 'Validation Error'
}
});
}
/**
* Create Device
* Add a device. It shows nothing until it is given dashboards.
* @param data The data for the request.
* @param data.deviceId
* @param data.requestBody
* @returns DeviceDef Successful Response
* @throws ApiError
*/
public static createDevice(data: DevicesCreateDeviceData): CancelablePromise<DevicesCreateDeviceResponse> {
return __request(OpenAPI, {
method: 'POST',
url: '/api/v1/devices/{device_id}',
path: {
device_id: data.deviceId
},
body: data.requestBody,
mediaType: 'application/json',
errors: {
422: 'Validation Error'
}
});
}
/**
* Read Device
* One device, read by a person or by the device holding its credential.
*
* The definition and what the flows wire its ports to, nothing about this
* moment: a device compares what it reads with what it is showing, and a
* field that changes on every request would rebuild its screen each time.
* Declared after the pairing routes and ``/pending``, so neither is mistaken
* for a device of that name.
* @param data The data for the request.
* @param data.deviceId
* @returns DeviceDocument Successful Response
* @throws ApiError
*/
public static readDevice(data: DevicesReadDeviceData): CancelablePromise<DevicesReadDeviceResponse> {
return __request(OpenAPI, {
method: 'GET',
url: '/api/v1/devices/{device_id}',
path: {
device_id: data.deviceId
},
errors: {
422: 'Validation Error'
}
});
}
/**
* Save Device
* Save a device. Takes effect on its next read.
*
* The body carries the ``version`` it was based on, and a save someone else
* has moved past is refused with 409.
* @param data The data for the request.
* @param data.deviceId
* @param data.requestBody
* @returns DeviceDef Successful Response
* @throws ApiError
*/
public static saveDevice(data: DevicesSaveDeviceData): CancelablePromise<DevicesSaveDeviceResponse> {
return __request(OpenAPI, {
method: 'PUT',
url: '/api/v1/devices/{device_id}',
path: {
device_id: data.deviceId
},
body: data.requestBody,
mediaType: 'application/json',
errors: {
422: 'Validation Error'
}
});
}
/**
* Delete Device
* Remove the device and refuse its credential, wherever it was minted here.
* @param data The data for the request.
* @param data.deviceId
* @returns Message Successful Response
* @throws ApiError
*/
public static deleteDevice(data: DevicesDeleteDeviceData): CancelablePromise<DevicesDeleteDeviceResponse> {
return __request(OpenAPI, {
method: 'DELETE',
url: '/api/v1/devices/{device_id}',
path: {
device_id: data.deviceId
},
errors: {
422: 'Validation Error'
}
});
}
/**
* Read Ice
* Where a browser looks for a way to this device's live view.
*
* STUN and TURN servers, the TURN ones with credentials of the caller's own
* that expire. Empty when none are set, which is enough on one network.
* Only for whoever may see the device's camera (``DeviceDef.viewers``).
* @param data The data for the request.
* @param data.deviceId
* @returns IceServers Successful Response
* @throws ApiError
*/
public static readIce(data: DevicesReadIceData): CancelablePromise<DevicesReadIceResponse> {
return __request(OpenAPI, {
method: 'GET',
url: '/api/v1/devices/{device_id}/ice',
path: {
device_id: data.deviceId
},
errors: {
422: 'Validation Error'
}
});
}
/**
* Put Report
* A device says what it has: its board, its screen, its ports.
*
* Only the device itself, through its own credential, which ``_device_may``
* holds to its own id. The report replaces the one before it, and the flows
* are validated again, since a device node's ports are checked against it.
*
* The first report of a touch screen makes the device touch friendly, as
* the switch would have been set by hand. Later ones leave the setting to
* whoever changed it since, and so does the first report of a device paired
* before pairings were noted: its switch was set by hand already.
* @param data The data for the request.
* @param data.deviceId
* @returns Message Successful Response
* @throws ApiError
*/
public static putReport(data: DevicesPutReportData): CancelablePromise<DevicesPutReportResponse> {
return __request(OpenAPI, {
method: 'PUT',
url: '/api/v1/devices/{device_id}/report',
path: {
device_id: data.deviceId
},
errors: {
422: 'Validation Error'
}
});
}
/**
* Approve Pairing
* Say which device the one showing this code, or making this request, is.
* @param data The data for the request.
* @param data.deviceId
* @param data.requestBody
* @returns Message Successful Response
* @throws ApiError
*/
public static approvePairing(data: DevicesApprovePairingData): CancelablePromise<DevicesApprovePairingResponse> {
return __request(OpenAPI, {
method: 'POST',
url: '/api/v1/devices/{device_id}/pair',
path: {
device_id: data.deviceId
},
body: data.requestBody,
mediaType: 'application/json',
errors: {
422: 'Validation Error'
}
});
}
/**
* Unpair Device
* Stop honouring this device's credential, and keep the device.
*
* The screen hanging there is refused on its next request and goes back to
* showing a pairing code, while its dashboards and their arrangement stay.
* The same holds for one the portal minted. An older portal minted without
* the nonce, and such a credential stands only while the nonce is still 0,
* so this refuses it too.
* @param data The data for the request.
* @param data.deviceId
* @returns Message Successful Response
* @throws ApiError
*/
public static unpairDevice(data: DevicesUnpairDeviceData): CancelablePromise<DevicesUnpairDeviceResponse> {
return __request(OpenAPI, {
method: 'POST',
url: '/api/v1/devices/{device_id}/unpair',
path: {
device_id: data.deviceId
},
errors: {
422: 'Validation Error'
}
});
}
}
export class FlavorsService {
/**
* Read Flavors
* Every size a node can ask for.
* @returns FlavorsPublic Successful Response
* @throws ApiError
*/
public static readFlavors(): CancelablePromise<FlavorsReadFlavorsResponse> {
return __request(OpenAPI, {
method: 'GET',
url: '/api/v1/flavors/'
});
}
/**
* Create Flavor
* @param data The data for the request.
* @param data.requestBody
* @returns FlavorPublic Successful Response
* @throws ApiError
*/
public static createFlavor(data: FlavorsCreateFlavorData): CancelablePromise<FlavorsCreateFlavorResponse> {
return __request(OpenAPI, {
method: 'POST',
url: '/api/v1/flavors/',
body: data.requestBody,
mediaType: 'application/json',
errors: {
422: 'Validation Error'
}
});
}
/**
* Update Flavor
* Change what a size means. Every node naming it gets the new one.
* @param data The data for the request.
* @param data.name
* @param data.requestBody
* @returns FlavorPublic Successful Response
* @throws ApiError
*/
public static updateFlavor(data: FlavorsUpdateFlavorData): CancelablePromise<FlavorsUpdateFlavorResponse> {
return __request(OpenAPI, {
method: 'PATCH',
url: '/api/v1/flavors/{name}',
path: {
name: data.name
},
body: data.requestBody,
mediaType: 'application/json',
errors: {
422: 'Validation Error'
}
});
}
/**
* Delete Flavor
* Remove a size, as long as no node still asks for it.
* @param data The data for the request.
* @param data.name
* @returns Message Successful Response
* @throws ApiError
*/
public static deleteFlavor(data: FlavorsDeleteFlavorData): CancelablePromise<FlavorsDeleteFlavorResponse> {
return __request(OpenAPI, {
method: 'DELETE',
url: '/api/v1/flavors/{name}',
path: {
name: data.name
},
errors: {
422: 'Validation Error'
}
});
}
}
export class FlowsService {
/**
* Read Flows
* List every flow.
* @returns FlowsPublic Successful Response
* @throws ApiError
*/
public static readFlows(): CancelablePromise<FlowsReadFlowsResponse> {
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<FlowsReadNodeTypesResponse> {
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<FlowsReadGraphResponse> {
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<FlowsReadLibraryResponse> {
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.
*
* With ``detach``, every node using it keeps a copy of the code as its own
* first, so the source can be retired while flows still use it.
* @param data The data for the request.
* @param data.libName
* @param data.detach
* @returns Message Successful Response
* @throws ApiError
*/
public static deleteSharedNode(data: FlowsDeleteSharedNodeData): CancelablePromise<FlowsDeleteSharedNodeResponse> {
return __request(OpenAPI, {
method: 'DELETE',
url: '/api/v1/flows/library/{lib_name}',
path: {
lib_name: data.libName
},
query: {
detach: data.detach
},
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<FlowsReadFlowResponse> {
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<FlowsSaveFlowResponse> {
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, except the record of what it ran.
* @param data The data for the request.
* @param data.name
* @returns Message Successful Response
* @throws ApiError
*/
public static deleteFlow(data: FlowsDeleteFlowData): CancelablePromise<FlowsDeleteFlowResponse> {
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<FlowsPublishFlowResponse> {
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<FlowsDiscardDraftResponse> {
return __request(OpenAPI, {
method: 'POST',
url: '/api/v1/flows/{name}/discard-draft',
path: {
name: data.name
},
errors: {
422: 'Validation Error'
}
});
}
/**
* Duplicate Flow
* Copy a flow into a new one that is only a draft, named after it.
*
* Nothing to reload: a draft does not run. Its code nodes are new code in
* the copy, so copying them is a superuser's, like writing them.
* @param data The data for the request.
* @param data.name
* @returns FlowDetail Successful Response
* @throws ApiError
*/
public static duplicateFlow(data: FlowsDuplicateFlowData): CancelablePromise<FlowsDuplicateFlowResponse> {
return __request(OpenAPI, {
method: 'POST',
url: '/api/v1/flows/{name}/duplicate',
path: {
name: data.name
},
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<FlowsReadNodeSourceResponse> {
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. Being live, it is
* audited like a publish.
*
* A node with its own code takes its input ports and settings from the
* header of ``process`` (see `follow_header`), and the answer carries the
* node when that changed it. ``drop=false`` is the editor's autosave, which
* adds and renames from the header but keeps what it no longer names until
* the editor is left.
* @param data The data for the request.
* @param data.name
* @param data.nodeId
* @param data.requestBody
* @param data.drop
* @returns NodeSourceSaved Successful Response
* @throws ApiError
*/
public static saveNodeSource(data: FlowsSaveNodeSourceData): CancelablePromise<FlowsSaveNodeSourceResponse> {
return __request(OpenAPI, {
method: 'PUT',
url: '/api/v1/flows/{name}/nodes/{node_id}/source',
path: {
name: data.name,
node_id: data.nodeId
},
query: {
drop: data.drop
},
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<FlowsShareNodeResponse> {
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<FlowsUnshareNodeResponse> {
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<FlowsStartFlowResponse> {
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<FlowsStopFlowResponse> {
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<FlowsPauseFlowResponse> {
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<FlowsResumeFlowResponse> {
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<FlowsStepFlowResponse> {
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<FlowsValidateFlowResponse> {
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<FlowsRunFlowResponse> {
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<FlowsTriggerNodeResponse> {
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<FlowsCancelNodeResponse> {
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'
}
});
}
/**
* Acknowledge Node Error
* Dismiss what a node last failed with, so the canvas stops marking it.
*
* A failure outlives the next good run on purpose — otherwise one that fired
* an alert leaves no trace by the time anyone looks. Reading the traceback is
* what says it has been seen.
* @param data The data for the request.
* @param data.name
* @param data.nodeId
* @returns Message Successful Response
* @throws ApiError
*/
public static acknowledgeNodeError(data: FlowsAcknowledgeNodeErrorData): CancelablePromise<FlowsAcknowledgeNodeErrorResponse> {
return __request(OpenAPI, {
method: 'POST',
url: '/api/v1/flows/{name}/nodes/{node_id}/acknowledge',
path: {
name: data.name,
node_id: data.nodeId
},
errors: {
422: 'Validation Error'
}
});
}
/**
* Train Node
* Train a new model for a wren node, as a run of wren's training flow.
*
* It learns the node's targets, its ``examples`` and its ``tests``, as the
* editor shows them. The node keeps running its model until the new one is
* set as its ``model``.
* @param data The data for the request.
* @param data.name
* @param data.nodeId
* @returns Training Successful Response
* @throws ApiError
*/
public static trainNode(data: FlowsTrainNodeData): CancelablePromise<FlowsTrainNodeResponse> {
return __request(OpenAPI, {
method: 'POST',
url: '/api/v1/flows/{name}/nodes/{node_id}/train',
path: {
name: data.name,
node_id: data.nodeId
},
errors: {
422: 'Validation Error'
}
});
}
/**
* Read Training
* A wren node's latest training run, or null when it has none.
* @param data The data for the request.
* @param data.name
* @param data.nodeId
* @returns unknown Successful Response
* @throws ApiError
*/
public static readTraining(data: FlowsReadTrainingData): CancelablePromise<FlowsReadTrainingResponse> {
return __request(OpenAPI, {
method: 'GET',
url: '/api/v1/flows/{name}/nodes/{node_id}/train',
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<FlowsReadFlowStateResponse> {
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 or a flag 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<FlowsReadMessageHistoryResponse> {
return __request(OpenAPI, {
method: 'GET',
url: '/api/v1/flows/{name}/history/{message}',
path: {
name: data.name,
message: data.message
},
errors: {
422: 'Validation Error'
}
});
}
/**
* Issue Socket Ticket
* A one-time pass for opening `/flows/ws`, good for thirty seconds.
*
* A browser cannot set a header on a websocket handshake, and a token in the
* URL ends up in every access log on the way. The ticket goes there instead
* and stands for the bearer token of this call, panel credentials included.
* @returns SocketTicket Successful Response
* @throws ApiError
*/
public static issueSocketTicket(): CancelablePromise<FlowsIssueSocketTicketResponse> {
return __request(OpenAPI, {
method: 'POST',
url: '/api/v1/flows/ws-ticket'
});
}
}
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<LoginLoginAccessTokenResponse> {
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<LoginTestTokenResponse> {
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<LoginRecoverPasswordResponse> {
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<LoginResetPasswordResponse> {
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<LoginRecoverPasswordHtmlContentResponse> {
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.
*
* A camera the caller may not see is listed without its value, so a tile
* can still be bound to it.
* @returns MessagesPublic Successful Response
* @throws ApiError
*/
public static readMessages(): CancelablePromise<MessagesReadMessagesResponse> {
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 fluksio__api__routes__messages__MessageValue Successful Response
* @throws ApiError
*/
public static publishMessage(data: MessagesPublishMessageData): CancelablePromise<MessagesPublishMessageResponse> {
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 and flags — 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<MessagesReadMessageHistoryResponse> {
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<ModulesReadModulesResponse> {
return __request(OpenAPI, {
method: 'GET',
url: '/api/v1/modules/'
});
}
/**
* Apply Modules
* Install exactly these requirements, then hand them to the workers.
*
* A superuser's: a package runs its own code on install and on import.
*
* 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.
*
* Only the flows already holding a node that would not load are rebuilt,
* because those are the ones an install is called to fix. A flow that this
* install *breaks* — a package taken back out from under it — is still green
* and fails at call time with the node author's own import error, until
* something rebuilds it.
* @param data The data for the request.
* @param data.requestBody
* @returns ApplyResult Successful Response
* @throws ApiError
*/
public static applyModules(data: ModulesApplyModulesData): CancelablePromise<ModulesApplyModulesResponse> {
return __request(OpenAPI, {
method: 'POST',
url: '/api/v1/modules/apply',
body: data.requestBody,
mediaType: 'application/json',
errors: {
422: 'Validation Error'
}
});
}
/**
* Refresh Modules
* Retire the workers without installing anything.
*
* A node that imports the caller's own package holds it in `sys.modules` for
* as long as the process lives, so editing that package changes nothing a
* running worker can see — recompiling the node would not help either, since
* the import returns the module already there. Retiring the processes is the
* whole of it, and `fluksio sync` asks for it after every upload.
* @returns Message Successful Response
* @throws ApiError
*/
public static refreshModules(): CancelablePromise<ModulesRefreshModulesResponse> {
return __request(OpenAPI, {
method: 'POST',
url: '/api/v1/modules/refresh'
});
}
}
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<OauthRegisterClientResponse> {
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<OauthAuthorizeValidateResponse> {
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.
*
* Through the hub the endpoint is the one there, which is the resource an
* agent that came that way asks for.
* @param data The data for the request.
* @param data.requestBody
* @returns OAuthAuthorizeResponse Successful Response
* @throws ApiError
*/
public static authorize(data: OauthAuthorizeData): CancelablePromise<OauthAuthorizeResponse> {
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<OauthTokenResponse> {
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<OauthReadClientsResponse> {
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. The access
* token already in its hands stops working too, even though it is a
* stateless JWT nobody can reach into: every door that takes one looks the
* client up first (``api.deps.oauth_client_lives``), so the row deleted here
* is the whole of the revocation.
* @param data The data for the request.
* @param data.clientId
* @returns Message Successful Response
* @throws ApiError
*/
public static revokeClient(data: OauthRevokeClientData): CancelablePromise<OauthRevokeClientResponse> {
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<ObservabilityReadSummaryResponse> {
return __request(OpenAPI, {
method: 'GET',
url: '/api/v1/observability/summary'
});
}
/**
* Read Timeseries
* Executions, errors and timings over time, summed across nodes.
*
* ``hours`` measures back from now, which is what a range picker asks for.
* ``since`` and ``until`` name a window instead — inclusive and exclusive,
* the same pair ``/runs`` and ``/events`` take — so a chart dragged to a
* span can be re-fetched at that span's own resolution rather than
* magnifying the buckets it already has.
* @param data The data for the request.
* @param data.flow
* @param data.node
* @param data.hours
* @param data.bucketS
* @param data.since
* @param data.until
* @returns SeriesPoint Successful Response
* @throws ApiError
*/
public static readTimeseries(data: ObservabilityReadTimeseriesData = {}): CancelablePromise<ObservabilityReadTimeseriesResponse> {
return __request(OpenAPI, {
method: 'GET',
url: '/api/v1/observability/timeseries',
query: {
flow: data.flow,
node: data.node,
hours: data.hours,
bucket_s: data.bucketS,
since: data.since,
until: data.until
},
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<ObservabilityReadFlowRollupsResponse> {
return __request(OpenAPI, {
method: 'GET',
url: '/api/v1/observability/flows',
query: {
hours: data.hours
},
errors: {
422: 'Validation Error'
}
});
}
/**
* Read Node Type Timings
* Execution time per node type, slowest first, to point at the hotspots.
*
* The rollups are kept per node, so the type is joined on from the published
* flows. A node deleted since it ran has no type left to count under.
* @param data The data for the request.
* @param data.hours
* @returns NodeTypeTiming Successful Response
* @throws ApiError
*/
public static readNodeTypeTimings(data: ObservabilityReadNodeTypeTimingsData = {}): CancelablePromise<ObservabilityReadNodeTypeTimingsResponse> {
return __request(OpenAPI, {
method: 'GET',
url: '/api/v1/observability/node-types',
query: {
hours: data.hours
},
errors: {
422: 'Validation Error'
}
});
}
/**
* Read Runs
* Recent cascades, newest first, and how many there were in total.
*
* ``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 RunPage Successful Response
* @throws ApiError
*/
public static readRuns(data: ObservabilityReadRunsData = {}): CancelablePromise<ObservabilityReadRunsResponse> {
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.
* ``run`` narrows to one run — a batch run's id, or the journaled item a live
* cascade came from. Rows recorded before the column existed carry none, so
* an old failure answers no run at all rather than the wrong one.
* @param data The data for the request.
* @param data.kind
* @param data.flow
* @param data.run
* @param data.since
* @param data.until
* @param data.limit
* @returns EventRow Successful Response
* @throws ApiError
*/
public static readEvents(data: ObservabilityReadEventsData = {}): CancelablePromise<ObservabilityReadEventsResponse> {
return __request(OpenAPI, {
method: 'GET',
url: '/api/v1/observability/events',
query: {
kind: data.kind,
flow: data.flow,
run: data.run,
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<ObservabilityReadDeadLettersResponse> {
return __request(OpenAPI, {
method: 'GET',
url: '/api/v1/observability/dead-letter',
query: {
limit: data.limit
},
errors: {
422: 'Validation Error'
}
});
}
/**
* Flush Metrics
* Write what the metrics collector holds now, not at its next interval.
*
* For tooling that reads or clears these tables right after causing events,
* such as the soak harness clearing its own rows.
* @returns Message Successful Response
* @throws ApiError
*/
public static flushMetrics(): CancelablePromise<ObservabilityFlushMetricsResponse> {
return __request(OpenAPI, {
method: 'POST',
url: '/api/v1/observability/flush'
});
}
}
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<PrivateCreateUserResponse> {
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 fluksio__api__routes__runs__RunRow Successful Response
* @throws ApiError
*/
public static createRun(data: RunsCreateRunData): CancelablePromise<RunsCreateRunResponse> {
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 fluksio__api__routes__runs__RunRow Successful Response
* @throws ApiError
*/
public static createSweep(data: RunsCreateSweepData): CancelablePromise<RunsCreateSweepResponse> {
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'
}
});
}
/**
* Import Runs
* Record runs that were executed somewhere else: a history from before.
*
* Stored as they ended, with `cause` "import" and no commit or code digest,
* since this engine never saw the code. The whole request is checked before
* anything is written, and an `external_id` already here answers with the
* run it made rather than a second one.
* @param data The data for the request.
* @param data.requestBody
* @returns Imported Successful Response
* @throws ApiError
*/
public static importRuns(data: RunsImportRunsData): CancelablePromise<RunsImportRunsResponse> {
return __request(OpenAPI, {
method: 'POST',
url: '/api/v1/runs/import',
body: data.requestBody,
mediaType: 'application/json',
errors: {
422: 'Validation Error'
}
});
}
/**
* Read Runs
* Runs, newest first. The queryable table an experiment log needs.
*
* ``before`` is the cursor a long history is paged by: rows are newest
* first, so handing back the last row's ``created_at`` reads the next page
* whatever landed meanwhile — which ``offset`` cannot, since a run submitted
* between two pages shifts every row down one. ``since`` bounds the other
* end and is inclusive.
* @param data The data for the request.
* @param data.flow
* @param data.status
* @param data.group
* @param data.digest
* @param data.since
* @param data.before
* @param data.limit
* @param data.offset
* @returns fluksio__api__routes__runs__RunRow Successful Response
* @throws ApiError
*/
public static readRuns(data: RunsReadRunsData = {}): CancelablePromise<RunsReadRunsResponse> {
return __request(OpenAPI, {
method: 'GET',
url: '/api/v1/runs',
query: {
flow: data.flow,
status: data.status,
group: data.group,
digest: data.digest,
since: data.since,
before: data.before,
limit: data.limit,
offset: data.offset
},
errors: {
422: 'Validation Error'
}
});
}
/**
* Delete Runs
* Every run of one flow at once.
*
* The counterpart to the list's ``flow`` filter, and what a reseed needs:
* deleting a flow leaves its runs standing on purpose, so this is the only
* way to clear a history without a call per run. ``flow`` is required —
* there is no "delete every run of everything" here, by design.
*
* ``history`` also drops the flow's rows in the run history (``flow_run``),
* its cascades included. That is for a flow being deleted, which would
* otherwise stay in the history until the retention window passes.
* @param data The data for the request.
* @param data.flow
* @param data.history
* @returns Message Successful Response
* @throws ApiError
*/
public static deleteRuns(data: RunsDeleteRunsData): CancelablePromise<RunsDeleteRunsResponse> {
return __request(OpenAPI, {
method: 'DELETE',
url: '/api/v1/runs',
query: {
flow: data.flow,
history: data.history
},
errors: {
422: 'Validation Error'
}
});
}
/**
* Read Overview
* One row per flow that has ever run, busiest-recent first.
*
* The list caps at 500 newest runs, so counting flows on the client goes
* wrong the moment a history outgrows one page. The database counts instead.
* @returns FlowRunsRow Successful Response
* @throws ApiError
*/
public static readOverview(): CancelablePromise<RunsReadOverviewResponse> {
return __request(OpenAPI, {
method: 'GET',
url: '/api/v1/runs/overview'
});
}
/**
* Export Metrics
* Every selected run's series as one long table: run, name, step, ts, value.
*
* The tidy shape a plotting library takes without reshaping. ``name`` keeps
* the metrics it lists; ``stride`` thins each curve — per series, so asking
* for every tenth point of two metrics gives every tenth point of both.
* @param data The data for the request.
* @param data.flow
* @param data.status
* @param data.group
* @param data.ids
* @param data.since
* @param data.until
* @param data.name
* @param data.stride
* @param data.format
* @returns unknown Successful Response
* @throws ApiError
*/
public static exportMetrics(data: RunsExportMetricsData = {}): CancelablePromise<RunsExportMetricsResponse> {
return __request(OpenAPI, {
method: 'GET',
url: '/api/v1/runs/export/metrics',
query: {
flow: data.flow,
status: data.status,
group: data.group,
ids: data.ids,
since: data.since,
until: data.until,
name: data.name,
stride: data.stride,
format: data.format
},
errors: {
422: 'Validation Error'
}
});
}
/**
* Export Runs
* One row per run: what it was given, what it scored, what code it ran.
*
* The arm-comparison table. Inputs are columns rather than one JSON blob —
* every input the selection recorded, so the schema is the same whichever
* runs are asked for; ``params`` narrows it. ``metrics`` narrows the final
* numbers to a few of a run's declared outputs.
*
* Both take dotted paths into a record a node returned:
* ``metrics=final_metrics.train_loss,test_metrics.known.perfect`` selects
* three fields rather than two blobs, and the defaults reach the same
* depth.
* @param data The data for the request.
* @param data.flow
* @param data.status
* @param data.group
* @param data.ids
* @param data.since
* @param data.until
* @param data.params
* @param data.metrics
* @param data.format
* @returns unknown Successful Response
* @throws ApiError
*/
public static exportRuns(data: RunsExportRunsData = {}): CancelablePromise<RunsExportRunsResponse> {
return __request(OpenAPI, {
method: 'GET',
url: '/api/v1/runs/export/runs',
query: {
flow: data.flow,
status: data.status,
group: data.group,
ids: data.ids,
since: data.since,
until: data.until,
params: data.params,
metrics: data.metrics,
format: data.format
},
errors: {
422: 'Validation Error'
}
});
}
/**
* Read Metric Names
* Every metric name the selected runs recorded.
*
* A name is flow-qualified — a node of `train` writing `train_loss` records
* `train.train_loss` — so this is the answer to "what would match". Exact
* over the whole selection: the client used to read the newest run that had
* measured anything and take its names for the vocabulary, which missed a
* name only an older run ever wrote. Declared before `/{run_id}`, or that
* route would take "metrics" for an id.
* @param data The data for the request.
* @param data.flow
* @param data.status
* @param data.group
* @param data.ids
* @param data.since
* @param data.until
* @returns string Successful Response
* @throws ApiError
*/
public static readMetricNames(data: RunsReadMetricNamesData = {}): CancelablePromise<RunsReadMetricNamesResponse> {
return __request(OpenAPI, {
method: 'GET',
url: '/api/v1/runs/metrics/names',
query: {
flow: data.flow,
status: data.status,
group: data.group,
ids: data.ids,
since: data.since,
until: data.until
},
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<RunsReadRunResponse> {
return __request(OpenAPI, {
method: 'GET',
url: '/api/v1/runs/{run_id}',
path: {
run_id: data.runId
},
errors: {
422: 'Validation Error'
}
});
}
/**
* Delete Run
* Forget a run and everything hanging off it.
*
* A live run is refused rather than raced: the driver writes its nodes back
* when it finishes, and those rows would arrive for a run that no longer
* exists. Cancel it first.
* @param data The data for the request.
* @param data.runId
* @returns void Successful Response
* @throws ApiError
*/
public static deleteRun(data: RunsDeleteRunData): CancelablePromise<RunsDeleteRunResponse> {
return __request(OpenAPI, {
method: 'DELETE',
url: '/api/v1/runs/{run_id}',
path: {
run_id: data.runId
},
errors: {
422: 'Validation Error'
}
});
}
/**
* Read Node Outputs
* What one node returned, by message, as the stage cache stored it.
*
* Kept only for a node that succeeded and may be reused, and only up to
* 256 kB of JSON. Null when the node published nothing.
* @param data The data for the request.
* @param data.runId
* @param data.node
* @returns unknown Successful Response
* @throws ApiError
*/
public static readNodeOutputs(data: RunsReadNodeOutputsData): CancelablePromise<RunsReadNodeOutputsResponse> {
return __request(OpenAPI, {
method: 'GET',
url: '/api/v1/runs/{run_id}/nodes/{node}/outputs',
path: {
run_id: data.runId,
node: data.node
},
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 fluksio__api__routes__runs__RunRow Successful Response
* @throws ApiError
*/
public static cancelRun(data: RunsCancelRunData): CancelablePromise<RunsCancelRunResponse> {
return __request(OpenAPI, {
method: 'POST',
url: '/api/v1/runs/{run_id}/cancel',
path: {
run_id: data.runId
},
errors: {
422: 'Validation Error'
}
});
}
/**
* Retry Run
* Run the same thing again, as a new run pointing back at this one.
* @param data The data for the request.
* @param data.runId
* @returns fluksio__api__routes__runs__RunRow Successful Response
* @throws ApiError
*/
public static retryRun(data: RunsRetryRunData): CancelablePromise<RunsRetryRunResponse> {
return __request(OpenAPI, {
method: 'POST',
url: '/api/v1/runs/{run_id}/retry',
path: {
run_id: data.runId
},
errors: {
422: 'Validation Error'
}
});
}
/**
* Read Metrics
* One metric's series, in step order — or every one of them, unnamed.
*
* ``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<RunsReadMetricsResponse> {
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.
*
* ``x`` names what to plot against — nothing or "step", "time", or another
* metric of the same runs.
* @param data The data for the request.
* @param data.ids
* @param data.metric
* @param data.x
* @returns SeriesAnswer Successful Response
* @throws ApiError
*/
public static compareMetric(data: RunsCompareMetricData): CancelablePromise<RunsCompareMetricResponse> {
return __request(OpenAPI, {
method: 'GET',
url: '/api/v1/runs/series/compare',
query: {
ids: data.ids,
metric: data.metric,
x: data.x
},
errors: {
422: 'Validation Error'
}
});
}
}
export class SearchService {
/**
* Read Search Index
* Everything searchable, for the client to match against as it is typed.
*
* The whole index rather than a query: it is a few hundred short rows for an
* instance of any ordinary size, so one fetch when the panel opens beats a
* round trip per keystroke — and the client already has a matcher.
*
* Secrets and alert channels are named only to a superuser, which is who
* ``/secrets`` and ``/alerts`` answer to.
* @returns SearchEntry Successful Response
* @throws ApiError
*/
public static readSearchIndex(): CancelablePromise<SearchReadSearchIndexResponse> {
return __request(OpenAPI, {
method: 'GET',
url: '/api/v1/search/'
});
}
}
export class SecretsService {
/**
* Read Secrets
* List the names of stored secrets.
* @returns SecretNames Successful Response
* @throws ApiError
*/
public static readSecrets(): CancelablePromise<SecretsReadSecretsResponse> {
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<SecretsSaveSecretResponse> {
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<SecretsDeleteSecretResponse> {
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<UsersReadUsersResponse> {
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<UsersCreateUserResponse> {
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<UsersReadUserMeResponse> {
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<UsersDeleteUserMeResponse> {
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<UsersUpdateUserMeResponse> {
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<UsersUpdatePasswordMeResponse> {
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<UsersRegisterUserResponse> {
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<UsersReadUserByIdResponse> {
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<UsersUpdateUserResponse> {
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<UsersDeleteUserResponse> {
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<UtilsTestEmailResponse> {
return __request(OpenAPI, {
method: 'POST',
url: '/api/v1/utils/test-email/',
query: {
email_to: data.emailTo
},
errors: {
422: 'Validation Error'
}
});
}
/**
* Read Config
* The settings the login page reads. Unauthenticated, so nothing secret.
* @returns PublicConfig Successful Response
* @throws ApiError
*/
public static readConfig(): CancelablePromise<UtilsReadConfigResponse> {
return __request(OpenAPI, {
method: 'GET',
url: '/api/v1/utils/config/'
});
}
/**
* Health Check
* @returns boolean Successful Response
* @throws ApiError
*/
public static healthCheck(): CancelablePromise<UtilsHealthCheckResponse> {
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<UtilsHealthResponse> {
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<WorkersReadWorkersResponse> {
return __request(OpenAPI, {
method: 'GET',
url: '/api/v1/workers'
});
}
/**
* Read Resources
* Every machine, what is free of it, and which nodes are queued.
*
* A node waiting its turn looks exactly like a node that has hung — the run
* sits at `running` and says nothing — so what is waiting, and for what, has
* to be readable somewhere.
* @returns ResourcesSnapshot Successful Response
* @throws ApiError
*/
public static readResources(): CancelablePromise<WorkersReadResourcesResponse> {
return __request(OpenAPI, {
method: 'GET',
url: '/api/v1/workers/resources'
});
}
/**
* Read Tokens
* Every worker token minted here, newest first, without the tokens.
* @returns WorkerToken Successful Response
* @throws ApiError
*/
public static readTokens(): CancelablePromise<WorkersReadTokensResponse> {
return __request(OpenAPI, {
method: 'GET',
url: '/api/v1/workers/tokens'
});
}
/**
* Issue Token
* Mint the credential a worker presents when it dials in.
*
* Shown once. The worker's name and labels are signed into it, so a worker is
* what it was minted as whatever it says about itself, and only its `jti` is
* kept here, to revoke it by.
* @param data The data for the request.
* @param data.requestBody
* @returns TokenIssued Successful Response
* @throws ApiError
*/
public static issueToken(data: WorkersIssueTokenData): CancelablePromise<WorkersIssueTokenResponse> {
return __request(OpenAPI, {
method: 'POST',
url: '/api/v1/workers/tokens',
body: data.requestBody,
mediaType: 'application/json',
errors: {
422: 'Validation Error'
}
});
}
/**
* Revoke Token
* Refuse this token from now on, and drop a worker attached with it.
* @param data The data for the request.
* @param data.jti
* @returns WorkerToken Successful Response
* @throws ApiError
*/
public static revokeToken(data: WorkersRevokeTokenData): CancelablePromise<WorkersRevokeTokenResponse> {
return __request(OpenAPI, {
method: 'POST',
url: '/api/v1/workers/tokens/{jti}/revoke',
path: {
jti: data.jti
},
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 engine importable in it.
* @returns string Successful Response
* @throws ApiError
*/
public static readRuntime(): CancelablePromise<WorkersReadRuntimeResponse> {
return __request(OpenAPI, {
method: 'GET',
url: '/api/v1/workers/runtime'
});
}
}