diff --git a/frontend/src/client/schemas.gen.ts b/frontend/src/client/schemas.gen.ts index e4df5b8..44b3f82 100644 --- a/frontend/src/client/schemas.gen.ts +++ b/frontend/src/client/schemas.gen.ts @@ -292,6 +292,23 @@ export const HTTPValidationErrorSchema = { title: 'HTTPValidationError' } as const; +export const HistoryPointSchema = { + properties: { + ts: { + type: 'number', + title: 'Ts' + }, + value: { + type: 'number', + title: 'Value' + } + }, + type: 'object', + required: ['ts', 'value'], + title: 'HistoryPoint', + description: 'One numeric value a message carried, and when.' +} as const; + export const MessageSchema = { properties: { message: { @@ -304,6 +321,34 @@ export const MessageSchema = { title: 'Message' } as const; +export const MessageHistorySchema = { + properties: { + message: { + type: 'string', + title: 'Message' + }, + numeric: { + type: 'boolean', + title: 'Numeric', + default: false + }, + points: { + items: { + '$ref': '#/components/schemas/HistoryPoint' + }, + type: 'array', + title: 'Points' + } + }, + type: 'object', + required: ['message'], + title: 'MessageHistory', + description: `A message's recent numeric values, oldest first. + +Only numbers are recorded, so \`\`numeric\`\` tells the panel whether an empty +series means "nothing plottable here" or "nothing has arrived yet".` +} as const; + export const MessageSpecSchema = { properties: { name: { diff --git a/frontend/src/client/sdk.gen.ts b/frontend/src/client/sdk.gen.ts index 3333676..4903d7d 100644 --- a/frontend/src/client/sdk.gen.ts +++ b/frontend/src/client/sdk.gen.ts @@ -3,7 +3,7 @@ import type { CancelablePromise } from './core/CancelablePromise'; import { OpenAPI } from './core/OpenAPI'; import { request as __request } from './core/request'; -import type { FlowsReadFlowsResponse, FlowsReadNodeTypesResponse, FlowsReadFlowData, FlowsReadFlowResponse, FlowsSaveFlowData, FlowsSaveFlowResponse, FlowsDeleteFlowData, FlowsDeleteFlowResponse, FlowsRenameFlowData, FlowsRenameFlowResponse, FlowsReadNodeSourceData, FlowsReadNodeSourceResponse, FlowsSaveNodeSourceData, FlowsSaveNodeSourceResponse, FlowsValidateFlowData, FlowsValidateFlowResponse, FlowsRunFlowData, FlowsRunFlowResponse, FlowsTriggerNodeData, FlowsTriggerNodeResponse, FlowsReadFlowStateData, FlowsReadFlowStateResponse, LoginLoginAccessTokenData, LoginLoginAccessTokenResponse, LoginTestTokenResponse, LoginRecoverPasswordData, LoginRecoverPasswordResponse, LoginResetPasswordData, LoginResetPasswordResponse, LoginRecoverPasswordHtmlContentData, LoginRecoverPasswordHtmlContentResponse, PrivateCreateUserData, PrivateCreateUserResponse, SecretsReadSecretsResponse, SecretsSaveSecretData, SecretsSaveSecretResponse, SecretsDeleteSecretData, SecretsDeleteSecretResponse, UsersReadUsersData, UsersReadUsersResponse, UsersCreateUserData, UsersCreateUserResponse, UsersReadUserMeResponse, UsersDeleteUserMeResponse, UsersUpdateUserMeData, UsersUpdateUserMeResponse, UsersUpdatePasswordMeData, UsersUpdatePasswordMeResponse, UsersRegisterUserData, UsersRegisterUserResponse, UsersReadUserByIdData, UsersReadUserByIdResponse, UsersUpdateUserData, UsersUpdateUserResponse, UsersDeleteUserData, UsersDeleteUserResponse, UtilsTestEmailData, UtilsTestEmailResponse, UtilsHealthCheckResponse } from './types.gen'; +import type { FlowsReadFlowsResponse, FlowsReadNodeTypesResponse, FlowsReadFlowData, FlowsReadFlowResponse, FlowsSaveFlowData, FlowsSaveFlowResponse, FlowsDeleteFlowData, FlowsDeleteFlowResponse, FlowsRenameFlowData, FlowsRenameFlowResponse, FlowsReadNodeSourceData, FlowsReadNodeSourceResponse, FlowsSaveNodeSourceData, FlowsSaveNodeSourceResponse, FlowsValidateFlowData, FlowsValidateFlowResponse, FlowsRunFlowData, FlowsRunFlowResponse, FlowsTriggerNodeData, FlowsTriggerNodeResponse, FlowsReadFlowStateData, FlowsReadFlowStateResponse, FlowsReadMessageHistoryData, FlowsReadMessageHistoryResponse, LoginLoginAccessTokenData, LoginLoginAccessTokenResponse, LoginTestTokenResponse, LoginRecoverPasswordData, LoginRecoverPasswordResponse, LoginResetPasswordData, LoginResetPasswordResponse, LoginRecoverPasswordHtmlContentData, LoginRecoverPasswordHtmlContentResponse, PrivateCreateUserData, PrivateCreateUserResponse, SecretsReadSecretsResponse, SecretsSaveSecretData, SecretsSaveSecretResponse, SecretsDeleteSecretData, SecretsDeleteSecretResponse, UsersReadUsersData, UsersReadUsersResponse, UsersCreateUserData, UsersCreateUserResponse, UsersReadUserMeResponse, UsersDeleteUserMeResponse, UsersUpdateUserMeData, UsersUpdateUserMeResponse, UsersUpdatePasswordMeData, UsersUpdatePasswordMeResponse, UsersRegisterUserData, UsersRegisterUserResponse, UsersReadUserByIdData, UsersReadUserByIdResponse, UsersUpdateUserData, UsersUpdateUserResponse, UsersDeleteUserData, UsersDeleteUserResponse, UtilsTestEmailData, UtilsTestEmailResponse, UtilsHealthCheckResponse } from './types.gen'; export class FlowsService { /** @@ -262,6 +262,32 @@ export class FlowsService { } }); } + + /** + * Read Message History + * The recent values of one message, for plotting. + * + * ``message`` may be given bare or qualified; a message that never carried a + * number comes back with an empty series. + * @param data The data for the request. + * @param data.name + * @param data.message + * @returns MessageHistory Successful Response + * @throws ApiError + */ + public static readMessageHistory(data: FlowsReadMessageHistoryData): CancelablePromise { + return __request(OpenAPI, { + method: 'GET', + url: '/api/v1/flows/{name}/history/{message}', + path: { + name: data.name, + message: data.message + }, + errors: { + 422: 'Validation Error' + } + }); + } } export class LoginService { diff --git a/frontend/src/client/types.gen.ts b/frontend/src/client/types.gen.ts index f011a42..c54ee5c 100644 --- a/frontend/src/client/types.gen.ts +++ b/frontend/src/client/types.gen.ts @@ -83,6 +83,14 @@ export type FlowSummary = { error_count?: number; }; +/** + * One numeric value a message carried, and when. + */ +export type HistoryPoint = { + ts: number; + value: number; +}; + export type HTTPValidationError = { detail?: Array; }; @@ -91,6 +99,18 @@ export type Message = { message: string; }; +/** + * A message's recent numeric values, oldest first. + * + * Only numbers are recorded, so ``numeric`` tells the panel whether an empty + * series means "nothing plottable here" or "nothing has arrived yet". + */ +export type MessageHistory = { + message: string; + numeric?: boolean; + points?: Array; +}; + /** * A single port of a node, and the message it is bound to. * @@ -366,6 +386,13 @@ export type FlowsReadFlowStateData = { export type FlowsReadFlowStateResponse = (FlowStatePublic); +export type FlowsReadMessageHistoryData = { + message: string; + name: string; +}; + +export type FlowsReadMessageHistoryResponse = (MessageHistory); + export type LoginLoginAccessTokenData = { formData: Body_login_login_access_token; };