Docs / docs (push) Successful in 30s
Playwright Tests / test-playwright (1, 2) (push) Successful in 3m7s
Playwright Tests / test-playwright (2, 2) (push) Successful in 1m54s
pre-commit / pre-commit (push) Failing after 4m24s
Test Backend / test-backend (push) Successful in 3m8s
Compose Smoke Test / test-compose (push) Successful in 40s
Playwright Tests / merge-reports (push) Successful in 1m33s
A port may now declare `image`, `audio` or `video`. Each is the artifact
reference the engine already had, narrowed by the `media_type` on it, so a
speech recogniser declares what it eats rather than taking any bytes at all and
finding out. Bytes still never travel as a message and nothing on the wire
stops being JSON: a camera publishes one reference per frame, a microphone one
per chunk, and a reference may carry a `meta` dict nothing here interprets.
Streaming media is therefore an ordinary streaming port — with one change to
what that means. An emission used to journal an item with no payload, so
downstream read whatever was current when the item was claimed; a consumer
slower than its producer saw only the newest chunk and the ones between were
lost. That is right for a training curve and wrong for a second of speech, so
an emission now journals a `kind="emission"` item carrying its values, and the
executor hands them to the nodes reading that message instead of writing them
to state again. The value in state stays the latest, which is what everything
else reads, and the wave is filtered by what actually changed rather than
walking everything reachable. No queue serialization change — the existing
`outputs` field carries it.
Continuous media makes the store's missing GC a real problem, so this closes
it: `sweep_artifacts` runs hourly, keeps every digest a `run_artifact` row
records or a live message holds, spares anything written in the last hour, and
stands aside entirely while a run is in flight, since a node may store a
checkpoint long before it returns the reference to it. That also collects the
orphans a deleted flow has always left behind. `ARTIFACT_GC_INTERVAL_S=0` turns
it off.
Around the edges: `GET /artifacts/{digest}` serves the media type the caller
passes and answers ranged requests, so a browser plays a clip rather than
downloading it; `PUT` spools to disk instead of holding the whole body in
memory, as does `save_artifact` given a path; a Media widget draws whatever its
message points at, and a wall panel may fetch the bytes its own tiles are
showing and nothing else; and a connector gets `save_artifact`, for a device
whose readings are bytes.
What this cannot do is live video: a frame every second or two is a glance, and
the honest answer above that is the camera's own stream, which the widget takes
as a URL and the browser plays from source.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2319 lines
77 KiB
TypeScript
2319 lines
77 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 { AlertsReadAlertsConfigResponse, AlertsSaveAlertsConfigData, AlertsSaveAlertsConfigResponse, AlertsTestChannelData, AlertsTestChannelResponse, ArtifactsPutArtifactData, ArtifactsPutArtifactResponse, ArtifactsGetArtifactData, ArtifactsGetArtifactResponse, CloudReadStatusResponse, CloudEnrollData, CloudEnrollResponse, CloudAddRemoteUserData, CloudAddRemoteUserResponse, CloudDisconnectResponse, DashboardsReadDashboardsResponse, DashboardsReadDashboardData, DashboardsReadDashboardResponse, DashboardsCreateDashboardData, DashboardsCreateDashboardResponse, DashboardsSaveDashboardData, DashboardsSaveDashboardResponse, DashboardsDeleteDashboardData, DashboardsDeleteDashboardResponse, DashboardsGenerateResultsDashboardData, DashboardsGenerateResultsDashboardResponse, DashboardsPublishDashboardData, DashboardsPublishDashboardResponse, DashboardsDiscardDashboardDraftData, DashboardsDiscardDashboardDraftResponse, DashboardsRenameDashboardData, DashboardsRenameDashboardResponse, FlowsReadFlowsResponse, FlowsReadNodeTypesResponse, FlowsReadGraphResponse, FlowsReadLibraryResponse, FlowsDeleteSharedNodeData, FlowsDeleteSharedNodeResponse, FlowsReadFlowData, FlowsReadFlowResponse, FlowsSaveFlowData, FlowsSaveFlowResponse, FlowsDeleteFlowData, FlowsDeleteFlowResponse, FlowsPublishFlowData, FlowsPublishFlowResponse, FlowsDiscardDraftData, FlowsDiscardDraftResponse, FlowsRenameFlowData, FlowsRenameFlowResponse, FlowsReadNodeSourceData, FlowsReadNodeSourceResponse, FlowsSaveNodeSourceData, FlowsSaveNodeSourceResponse, FlowsShareNodeData, FlowsShareNodeResponse, FlowsUnshareNodeData, FlowsUnshareNodeResponse, FlowsStartFlowData, FlowsStartFlowResponse, FlowsStopFlowData, FlowsStopFlowResponse, FlowsPauseFlowData, FlowsPauseFlowResponse, FlowsResumeFlowData, FlowsResumeFlowResponse, FlowsStepFlowData, FlowsStepFlowResponse, FlowsValidateFlowData, FlowsValidateFlowResponse, FlowsRunFlowData, FlowsRunFlowResponse, FlowsTriggerNodeData, FlowsTriggerNodeResponse, FlowsCancelNodeData, FlowsCancelNodeResponse, FlowsAcknowledgeNodeErrorData, FlowsAcknowledgeNodeErrorResponse, FlowsReadFlowStateData, FlowsReadFlowStateResponse, FlowsReadMessageHistoryData, FlowsReadMessageHistoryResponse, 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, ObservabilityReadRunsData, ObservabilityReadRunsResponse, ObservabilityReadEventsData, ObservabilityReadEventsResponse, ObservabilityReadDeadLettersData, ObservabilityReadDeadLettersResponse, PanelsReadPanelsResponse, PanelsSavePanelsData, PanelsSavePanelsResponse, PanelsStartPairingResponse, PanelsPollPairingData, PanelsPollPairingResponse, PanelsPendingDeviceData, PanelsPendingDeviceResponse, PanelsApprovePairingData, PanelsApprovePairingResponse, PanelsUnpairPanelData, PanelsUnpairPanelResponse, PanelsReadPanelData, PanelsReadPanelResponse, PrivateCreateUserData, PrivateCreateUserResponse, RunsCreateRunData, RunsCreateRunResponse, RunsCreateSweepData, RunsCreateSweepResponse, RunsReadRunsData, RunsReadRunsResponse, RunsReadOverviewResponse, RunsReadRunData, RunsReadRunResponse, RunsCancelRunData, RunsCancelRunResponse, RunsReadMetricsData, RunsReadMetricsResponse, RunsCompareMetricData, RunsCompareMetricResponse, SecretsReadSecretsResponse, SecretsSaveSecretData, SecretsSaveSecretResponse, SecretsDeleteSecretData, SecretsDeleteSecretResponse, UsersReadUsersData, UsersReadUsersResponse, UsersCreateUserData, UsersCreateUserResponse, UsersReadUserMeResponse, UsersDeleteUserMeResponse, UsersUpdateUserMeData, UsersUpdateUserMeResponse, UsersUpdatePasswordMeData, UsersUpdatePasswordMeResponse, UsersRegisterUserData, UsersRegisterUserResponse, UsersReadUserByIdData, UsersReadUserByIdResponse, UsersUpdateUserData, UsersUpdateUserResponse, UsersDeleteUserData, UsersDeleteUserResponse, UtilsTestEmailData, UtilsTestEmailResponse, UtilsHealthCheckResponse, UtilsHealthResponse, WorkersReadWorkersResponse, WorkersReadResourcesResponse, WorkersIssueTokenData, WorkersIssueTokenResponse, WorkersReadRuntimeResponse } from './types.gen';
|
|
|
|
export class AlertsService {
|
|
/**
|
|
* Read Alerts Config
|
|
* What the engine alerts on, and where it sends it.
|
|
* @returns AlertsConfig Successful Response
|
|
* @throws ApiError
|
|
*/
|
|
public static readAlertsConfig(): CancelablePromise<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'
|
|
}
|
|
});
|
|
}
|
|
|
|
/**
|
|
* 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.
|
|
* @param data The data for the request.
|
|
* @param data.name
|
|
* @param data.mediaType
|
|
* @returns ArtifactRef Successful Response
|
|
* @throws ApiError
|
|
*/
|
|
public static putArtifact(data: ArtifactsPutArtifactData = {}): CancelablePromise<ArtifactsPutArtifactResponse> {
|
|
return __request(OpenAPI, {
|
|
method: 'PUT',
|
|
url: '/api/v1/artifacts',
|
|
query: {
|
|
name: data.name,
|
|
media_type: data.mediaType
|
|
},
|
|
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'
|
|
}
|
|
});
|
|
}
|
|
}
|
|
|
|
export class CloudService {
|
|
/**
|
|
* Read Status
|
|
* Whether this installation is enrolled, and whether the link is up.
|
|
*
|
|
* Readable by any signed-in user: everyone here has a right to know whether
|
|
* the machine they are using can be reached from outside.
|
|
* @returns unknown Successful Response
|
|
* @throws ApiError
|
|
*/
|
|
public static readStatus(): CancelablePromise<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
|
|
* installation, 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'
|
|
}
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Disconnect
|
|
* Sever the connection from this side.
|
|
*
|
|
* Unilateral and immediate: the config is the only reason portal tokens
|
|
* verify here, so deleting it ends remote access whatever the portal still
|
|
* has on file.
|
|
* @returns Message Successful Response
|
|
* @throws ApiError
|
|
*/
|
|
public static disconnect(): CancelablePromise<CloudDisconnectResponse> {
|
|
return __request(OpenAPI, {
|
|
method: 'DELETE',
|
|
url: '/api/v1/cloud'
|
|
});
|
|
}
|
|
}
|
|
|
|
export class DashboardsService {
|
|
/**
|
|
* Read Dashboards
|
|
* Every dashboard, without its contents.
|
|
* @returns DashboardsPublic Successful Response
|
|
* @throws ApiError
|
|
*/
|
|
public static readDashboards(): CancelablePromise<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'
|
|
}
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Rename Dashboard
|
|
* @param data The data for the request.
|
|
* @param data.name
|
|
* @param data.requestBody
|
|
* @returns DashboardDef_Output Successful Response
|
|
* @throws ApiError
|
|
*/
|
|
public static renameDashboard(data: DashboardsRenameDashboardData): CancelablePromise<DashboardsRenameDashboardResponse> {
|
|
return __request(OpenAPI, {
|
|
method: 'POST',
|
|
url: '/api/v1/dashboards/{name}/rename',
|
|
path: {
|
|
name: data.name
|
|
},
|
|
body: data.requestBody,
|
|
mediaType: 'application/json',
|
|
errors: {
|
|
422: 'Validation Error'
|
|
}
|
|
});
|
|
}
|
|
}
|
|
|
|
export class FlowsService {
|
|
/**
|
|
* Read Flows
|
|
* List every flow.
|
|
* @returns FlowsPublic Successful Response
|
|
* @throws ApiError
|
|
*/
|
|
public static readFlows(): CancelablePromise<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.
|
|
* @param data The data for the request.
|
|
* @param data.libName
|
|
* @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
|
|
},
|
|
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.
|
|
* @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'
|
|
}
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Rename Flow
|
|
* Rename a flow, along with every reference to its messages.
|
|
* @param data The data for the request.
|
|
* @param data.name
|
|
* @param data.requestBody
|
|
* @returns FlowDetail Successful Response
|
|
* @throws ApiError
|
|
*/
|
|
public static renameFlow(data: FlowsRenameFlowData): CancelablePromise<FlowsRenameFlowResponse> {
|
|
return __request(OpenAPI, {
|
|
method: 'POST',
|
|
url: '/api/v1/flows/{name}/rename',
|
|
path: {
|
|
name: data.name
|
|
},
|
|
body: data.requestBody,
|
|
mediaType: 'application/json',
|
|
errors: {
|
|
422: 'Validation Error'
|
|
}
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Read Node Source
|
|
* Read a node's Python source, including unpublished edits.
|
|
* @param data The data for the request.
|
|
* @param data.name
|
|
* @param data.nodeId
|
|
* @returns NodeSource Successful Response
|
|
* @throws ApiError
|
|
*/
|
|
public static readNodeSource(data: FlowsReadNodeSourceData): CancelablePromise<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.
|
|
* @param data The data for the request.
|
|
* @param data.name
|
|
* @param data.nodeId
|
|
* @param data.requestBody
|
|
* @returns NodeStatusPublic Successful Response
|
|
* @throws ApiError
|
|
*/
|
|
public static saveNodeSource(data: FlowsSaveNodeSourceData): CancelablePromise<FlowsSaveNodeSourceResponse> {
|
|
return __request(OpenAPI, {
|
|
method: 'PUT',
|
|
url: '/api/v1/flows/{name}/nodes/{node_id}/source',
|
|
path: {
|
|
name: data.name,
|
|
node_id: data.nodeId
|
|
},
|
|
body: data.requestBody,
|
|
mediaType: 'application/json',
|
|
errors: {
|
|
422: 'Validation Error'
|
|
}
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Share Node
|
|
* Move this node's code into the library so other flows can run it too.
|
|
* @param data The data for the request.
|
|
* @param data.name
|
|
* @param data.nodeId
|
|
* @param data.requestBody
|
|
* @returns FlowDetail Successful Response
|
|
* @throws ApiError
|
|
*/
|
|
public static shareNode(data: FlowsShareNodeData): CancelablePromise<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'
|
|
}
|
|
});
|
|
}
|
|
|
|
/**
|
|
* 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 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'
|
|
}
|
|
});
|
|
}
|
|
}
|
|
|
|
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.
|
|
* @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 only — nothing else plots.
|
|
* @param data The data for the request.
|
|
* @param data.name
|
|
* @returns MessagePoints Successful Response
|
|
* @throws ApiError
|
|
*/
|
|
public static readMessageHistory(data: MessagesReadMessageHistoryData): CancelablePromise<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 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.
|
|
* @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. An access
|
|
* token already in its hands keeps working until it expires
|
|
* (``MCP_TOKEN_EXPIRE_MINUTES``) — those are stateless by design.
|
|
* @param data The data for the request.
|
|
* @param data.clientId
|
|
* @returns Message Successful Response
|
|
* @throws ApiError
|
|
*/
|
|
public static revokeClient(data: OauthRevokeClientData): CancelablePromise<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.
|
|
* @param data The data for the request.
|
|
* @param data.flow
|
|
* @param data.node
|
|
* @param data.hours
|
|
* @param data.bucketS
|
|
* @returns SeriesPoint Successful Response
|
|
* @throws ApiError
|
|
*/
|
|
public static readTimeseries(data: ObservabilityReadTimeseriesData = {}): CancelablePromise<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
|
|
},
|
|
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 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.
|
|
* @param data The data for the request.
|
|
* @param data.kind
|
|
* @param data.flow
|
|
* @param data.since
|
|
* @param data.until
|
|
* @param data.limit
|
|
* @returns EventRow Successful Response
|
|
* @throws ApiError
|
|
*/
|
|
public static readEvents(data: ObservabilityReadEventsData = {}): CancelablePromise<ObservabilityReadEventsResponse> {
|
|
return __request(OpenAPI, {
|
|
method: 'GET',
|
|
url: '/api/v1/observability/events',
|
|
query: {
|
|
kind: data.kind,
|
|
flow: data.flow,
|
|
since: data.since,
|
|
until: data.until,
|
|
limit: data.limit
|
|
},
|
|
errors: {
|
|
422: 'Validation Error'
|
|
}
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Read Dead Letters
|
|
* Work the engine gave up on, which nothing else surfaces.
|
|
* @param data The data for the request.
|
|
* @param data.limit
|
|
* @returns DeadLetter Successful Response
|
|
* @throws ApiError
|
|
*/
|
|
public static readDeadLetters(data: ObservabilityReadDeadLettersData = {}): CancelablePromise<ObservabilityReadDeadLettersResponse> {
|
|
return __request(OpenAPI, {
|
|
method: 'GET',
|
|
url: '/api/v1/observability/dead-letter',
|
|
query: {
|
|
limit: data.limit
|
|
},
|
|
errors: {
|
|
422: 'Validation Error'
|
|
}
|
|
});
|
|
}
|
|
}
|
|
|
|
export class PanelsService {
|
|
/**
|
|
* Read Panels
|
|
* Every panel, what each one shows, and where to point a device.
|
|
* @returns PanelsPublic Successful Response
|
|
* @throws ApiError
|
|
*/
|
|
public static readPanels(): CancelablePromise<PanelsReadPanelsResponse> {
|
|
return __request(OpenAPI, {
|
|
method: 'GET',
|
|
url: '/api/v1/panels/'
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Save Panels
|
|
* Replace the panels. Takes effect on the devices' next read.
|
|
*
|
|
* A panel that disappears here takes its credential with it, so this is also
|
|
* how a device is unpaired along with its assignment. Re-pairing one screen
|
|
* and keeping the assignment is ``/{panel_id}/unpair`` below.
|
|
* @param data The data for the request.
|
|
* @param data.requestBody
|
|
* @returns PanelsPublic Successful Response
|
|
* @throws ApiError
|
|
*/
|
|
public static savePanels(data: PanelsSavePanelsData): CancelablePromise<PanelsSavePanelsResponse> {
|
|
return __request(OpenAPI, {
|
|
method: 'PUT',
|
|
url: '/api/v1/panels/',
|
|
body: data.requestBody,
|
|
mediaType: 'application/json',
|
|
errors: {
|
|
422: 'Validation Error'
|
|
}
|
|
});
|
|
}
|
|
|
|
/**
|
|
* 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
|
|
* installation is enrolled with a portal, which is what the cap and the
|
|
* portal's own per-address limits are between.
|
|
* @returns PairStarted Successful Response
|
|
* @throws ApiError
|
|
*/
|
|
public static startPairing(): CancelablePromise<PanelsStartPairingResponse> {
|
|
return __request(OpenAPI, {
|
|
method: 'POST',
|
|
url: '/api/v1/panels/pair'
|
|
});
|
|
}
|
|
|
|
/**
|
|
* 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: PanelsPollPairingData): CancelablePromise<PanelsPollPairingResponse> {
|
|
return __request(OpenAPI, {
|
|
method: 'GET',
|
|
url: '/api/v1/panels/pair/{code}',
|
|
path: {
|
|
code: data.code
|
|
},
|
|
query: {
|
|
secret: data.secret
|
|
},
|
|
errors: {
|
|
422: 'Validation Error'
|
|
}
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Pending Device
|
|
* What is waiting on this code, before anyone says what it is.
|
|
*
|
|
* Approving a code adopts whatever is holding it, so it is worth seeing that
|
|
* it looks like the screen you just hung.
|
|
* @param data The data for the request.
|
|
* @param data.code
|
|
* @returns PendingDevice Successful Response
|
|
* @throws ApiError
|
|
*/
|
|
public static pendingDevice(data: PanelsPendingDeviceData): CancelablePromise<PanelsPendingDeviceResponse> {
|
|
return __request(OpenAPI, {
|
|
method: 'GET',
|
|
url: '/api/v1/panels/pair/{code}/device',
|
|
path: {
|
|
code: data.code
|
|
},
|
|
errors: {
|
|
422: 'Validation Error'
|
|
}
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Approve Pairing
|
|
* Say which panel the device showing this code is.
|
|
*
|
|
* A credential minted here names the approver, so what the panel does stays
|
|
* attributable to a person rather than to nobody. One minted by the portal —
|
|
* for a device that reached this installation only through it — names the
|
|
* account this installation was enrolled with instead, since that is the one
|
|
* every portal-borne request already acts as.
|
|
* @param data The data for the request.
|
|
* @param data.panelId
|
|
* @param data.requestBody
|
|
* @returns Message Successful Response
|
|
* @throws ApiError
|
|
*/
|
|
public static approvePairing(data: PanelsApprovePairingData): CancelablePromise<PanelsApprovePairingResponse> {
|
|
return __request(OpenAPI, {
|
|
method: 'POST',
|
|
url: '/api/v1/panels/{panel_id}/pair',
|
|
path: {
|
|
panel_id: data.panelId
|
|
},
|
|
body: data.requestBody,
|
|
mediaType: 'application/json',
|
|
errors: {
|
|
422: 'Validation Error'
|
|
}
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Unpair Panel
|
|
* Stop honouring this panel's credential, and keep the panel.
|
|
*
|
|
* Bumping the nonce refuses the screen hanging there on its next request, so
|
|
* it goes back to showing a pairing code — while the panel, the dashboards it
|
|
* was assigned and their arrangement stay exactly as they were. Deleting the
|
|
* panel is still what throws all three away together.
|
|
*
|
|
* A credential the portal minted for a remote screen carries no nonce, so
|
|
* this does not reach it; that one is revoked at the hub.
|
|
* @param data The data for the request.
|
|
* @param data.panelId
|
|
* @returns Message Successful Response
|
|
* @throws ApiError
|
|
*/
|
|
public static unpairPanel(data: PanelsUnpairPanelData): CancelablePromise<PanelsUnpairPanelResponse> {
|
|
return __request(OpenAPI, {
|
|
method: 'POST',
|
|
url: '/api/v1/panels/{panel_id}/unpair',
|
|
path: {
|
|
panel_id: data.panelId
|
|
},
|
|
errors: {
|
|
422: 'Validation Error'
|
|
}
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Read Panel
|
|
* One panel — read by a person, or by the device holding its credential.
|
|
*
|
|
* Declared after the pairing routes so a device polling ``/panels/pair/...``
|
|
* is never mistaken for someone reading a panel named ``pair``.
|
|
* @param data The data for the request.
|
|
* @param data.panelId
|
|
* @returns PanelDef Successful Response
|
|
* @throws ApiError
|
|
*/
|
|
public static readPanel(data: PanelsReadPanelData): CancelablePromise<PanelsReadPanelResponse> {
|
|
return __request(OpenAPI, {
|
|
method: 'GET',
|
|
url: '/api/v1/panels/{panel_id}',
|
|
path: {
|
|
panel_id: data.panelId
|
|
},
|
|
errors: {
|
|
422: 'Validation Error'
|
|
}
|
|
});
|
|
}
|
|
}
|
|
|
|
export class PrivateService {
|
|
/**
|
|
* Create User
|
|
* Create a new user.
|
|
* @param data The data for the request.
|
|
* @param data.requestBody
|
|
* @returns UserPublic Successful Response
|
|
* @throws ApiError
|
|
*/
|
|
public static createUser(data: PrivateCreateUserData): CancelablePromise<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'
|
|
}
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Read Runs
|
|
* Runs, newest first. The queryable table an experiment log needs.
|
|
* @param data The data for the request.
|
|
* @param data.flow
|
|
* @param data.status
|
|
* @param data.group
|
|
* @param data.digest
|
|
* @param data.limit
|
|
* @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,
|
|
limit: data.limit,
|
|
offset: data.offset
|
|
},
|
|
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'
|
|
});
|
|
}
|
|
|
|
/**
|
|
* 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'
|
|
}
|
|
});
|
|
}
|
|
|
|
/**
|
|
* 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'
|
|
}
|
|
});
|
|
}
|
|
|
|
/**
|
|
* 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 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'
|
|
}
|
|
});
|
|
}
|
|
|
|
/**
|
|
* 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
|
|
* What this machine has free, and which nodes are queued for it.
|
|
*
|
|
* 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 unknown Successful Response
|
|
* @throws ApiError
|
|
*/
|
|
public static readResources(): CancelablePromise<WorkersReadResourcesResponse> {
|
|
return __request(OpenAPI, {
|
|
method: 'GET',
|
|
url: '/api/v1/workers/resources'
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Issue Token
|
|
* Mint the credential a worker presents when it dials in.
|
|
*
|
|
* Shown once. It is signed with the same keypair the agent tokens use, so
|
|
* rotating that key revokes every worker along with them.
|
|
* @param data The data for the request.
|
|
* @param data.requestBody
|
|
* @returns TokenIssued Successful Response
|
|
* @throws ApiError
|
|
*/
|
|
public static issueToken(data: WorkersIssueTokenData): CancelablePromise<WorkersIssueTokenResponse> {
|
|
return __request(OpenAPI, {
|
|
method: 'POST',
|
|
url: '/api/v1/workers/tokens',
|
|
body: data.requestBody,
|
|
mediaType: 'application/json',
|
|
errors: {
|
|
422: 'Validation Error'
|
|
}
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Read Runtime
|
|
* The worker's own code, so a fresh host installs by fetching one file.
|
|
*
|
|
* It is the same module the engine's local workers run — deliberately
|
|
* standard library only, and with nothing of the 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'
|
|
});
|
|
}
|
|
} |