From 94088476e3b348f7e0477792d34f45cd8c587135 Mon Sep 17 00:00:00 2001 From: Bruce Schultz Date: Mon, 26 Jan 2026 11:30:57 +0100 Subject: [PATCH 01/15] chore(api): update hub adapter api definitions --- services/Api.ts | 633 +++++++++----- services/hub_adapter_swagger.json | 1314 ++++++++++++++++------------- 2 files changed, 1151 insertions(+), 796 deletions(-) diff --git a/services/Api.ts b/services/Api.ts index 9f8a2cd..86bf2cf 100644 --- a/services/Api.ts +++ b/services/Api.ts @@ -22,7 +22,10 @@ export enum ProtocolCode { Tcp = "tcp", } -/** PodStatus */ +/** + * PodStatus + * Custom PO run statuses. + */ export enum PodStatus { Starting = "starting", Started = "started", @@ -60,7 +63,10 @@ export enum DataStoreType { Fhir = "fhir", } -/** CleanUpType */ +/** + * CleanUpType + * Canned strings for cleanup endpoint + */ export enum CleanUpType { All = "all", Analyzes = "analyzes", @@ -68,6 +74,7 @@ export enum CleanUpType { Mb = "mb", Rs = "rs", Keycloak = "keycloak", + Zombies = "zombies", } /** @@ -249,9 +256,9 @@ export interface AnalysisNode { run_status: | "starting" | "started" + | "running" | "stopping" | "stopped" - | "running" | "finished" | "failed" | null; @@ -285,26 +292,22 @@ export interface AnalysisNode { node_realm_id: string; } -/** Body_accept_reject_analysis_node_analysis_nodes__analysis_node_id__post */ -export interface BodyAcceptRejectAnalysisNodeAnalysisNodesAnalysisNodeIdPost { +/** Body_auth_token_get_token_post */ +export interface BodyAuthTokenGetTokenPost { /** - * Approval Status - * Set the approval status of project for the node. Either 'rejected' or 'approved' + * Username + * Keycloak username */ - approval_status: "rejected" | "approved"; -} - -/** Body_accept_reject_project_proposal_project_nodes__project_node_id__post */ -export interface BodyAcceptRejectProjectProposalProjectNodesProjectNodeIdPost { + username: string; /** - * Approval Status - * Set the approval status of project for the node. Either 'rejected' or 'approved' + * Password + * Keycloak password */ - approval_status: "rejected" | "approved"; + password: string; } -/** Body_create_analysis_po_post */ -export interface BodyCreateAnalysisPoPost { +/** Body_hub_analysis_image_get_analysis_image_post */ +export interface BodyHubAnalysisImageGetAnalysisImagePost { /** * Analysis Id * Analysis UUID @@ -327,8 +330,26 @@ export interface BodyCreateAnalysisPoPost { node_id: string; } -/** Body_create_and_connect_analysis_to_project_kong_analysis_post */ -export interface BodyCreateAndConnectAnalysisToProjectKongAnalysisPost { +/** Body_hub_analysis_node_update_analysis_nodes__analysis_node_id__post */ +export interface BodyHubAnalysisNodeUpdateAnalysisNodesAnalysisNodeIdPost { + /** + * Approval Status + * Set the approval status of project for the node. Either 'rejected' or 'approved' + */ + approval_status: "rejected" | "approved"; +} + +/** Body_hub_project_node_update_project_nodes__project_node_id__post */ +export interface BodyHubProjectNodeUpdateProjectNodesProjectNodeIdPost { + /** + * Approval Status + * Set the approval status of project for the node. Either 'rejected' or 'approved' + */ + approval_status: "rejected" | "approved"; +} + +/** Body_kong_analysis_create_kong_analysis_post */ +export interface BodyKongAnalysisCreateKongAnalysisPost { /** * Project Id * UUID or name of the project @@ -341,8 +362,19 @@ export interface BodyCreateAndConnectAnalysisToProjectKongAnalysisPost { analysis_id: string; } -/** Body_create_datastore_and_project_with_link_kong_initialize_post */ -export interface BodyCreateDatastoreAndProjectWithLinkKongInitializePost { +/** Body_kong_datastore_create_kong_datastore_post */ +export interface BodyKongDatastoreCreateKongDatastorePost { + /** + * Data store metadata. + * Required information for creating a new data store. + */ + datastore: ServiceRequest; + /** Data store type. Either 's3' or 'fhir' */ + ds_type: DataStoreType; +} + +/** Body_kong_initialize_kong_initialize_post */ +export interface BodyKongInitializeKongInitializePost { /** * Project Id * UUID of the project @@ -369,8 +401,8 @@ export interface BodyCreateDatastoreAndProjectWithLinkKongInitializePost { datastore: ServiceRequest; } -/** Body_create_route_to_datastore_kong_project_post */ -export interface BodyCreateRouteToDatastoreKongProjectPost { +/** Body_kong_project_create_kong_project_post */ +export interface BodyKongProjectCreateKongProjectPost { /** * Data Store Id * UUID of the data store or 'service' @@ -400,19 +432,8 @@ export interface BodyCreateRouteToDatastoreKongProjectPost { ds_type?: DataStoreType; } -/** Body_create_service_kong_datastore_post */ -export interface BodyCreateServiceKongDatastorePost { - /** - * Data store metadata. - * Required information for creating a new data store. - */ - datastore: ServiceRequest; - /** Data store type. Either 's3' or 'fhir' */ - ds_type: DataStoreType; -} - -/** Body_get_analysis_image_url_analysis_image_post */ -export interface BodyGetAnalysisImageUrlAnalysisImagePost { +/** Body_podorc_pods_create_po_post */ +export interface BodyPodorcPodsCreatePoPost { /** * Analysis Id * Analysis UUID @@ -435,21 +456,10 @@ export interface BodyGetAnalysisImageUrlAnalysisImagePost { node_id: string; } -/** Body_get_token_token_post */ -export interface BodyGetTokenTokenPost { - /** - * Username - * Keycloak username - */ - username: string; - /** - * Password - * Keycloak password - */ - password: string; -} - -/** CleanupPodResponse */ +/** + * CleanupPodResponse + * Response model for cleanup endpoint + */ export interface CleanupPodResponse { /** All */ all?: string | null; @@ -819,6 +829,28 @@ export interface DownstreamHealthCheck { kong: Record | string; } +/** + * EventLogResponse + * Event log response model. + */ +export interface EventLogResponse { + /** Id */ + id: number; + /** Event Name */ + event_name: string; + /** Service Name */ + service_name: string; + /** + * Timestamp + * @format date-time + */ + timestamp: string; + /** Body */ + body: string; + /** Attributes */ + attributes: Record; +} + /** HTTPValidationError */ export interface HTTPValidationError { /** Detail */ @@ -947,7 +979,10 @@ export interface ListServices { */ export type LogReport = Record; -/** LogResponse */ +/** + * LogResponse + * Response for log endpoint + */ export interface LogResponse { analysis?: LogReport | null; nginx?: LogReport | null; @@ -1609,7 +1644,7 @@ export enum ContentType { } export class HttpClient { - public baseUrl: string = ""; + public baseUrl: string = "/api"; private securityData: SecurityDataType | null = null; private securityWorker?: ApiConfig["securityWorker"]; private abortControllers = new Map(); @@ -1677,8 +1712,12 @@ export class HttpClient { input !== null && typeof input !== "string" ? JSON.stringify(input) : input, - [ContentType.FormData]: (input: any) => - Object.keys(input || {}).reduce((formData, key) => { + [ContentType.FormData]: (input: any) => { + if (input instanceof FormData) { + return input; + } + + return Object.keys(input || {}).reduce((formData, key) => { const property = input[key]; formData.append( key, @@ -1689,7 +1728,8 @@ export class HttpClient { : `${property}`, ); return formData; - }, new FormData()), + }, new FormData()); + }, [ContentType.UrlEncoded]: (input: any) => this.toQueryString(input), }; @@ -1775,13 +1815,14 @@ export class HttpClient { : payloadFormatter(body), }, ).then(async (response) => { - const r = response.clone() as HttpResponse; + const r = response as HttpResponse; r.data = null as unknown as T; r.error = null as unknown as E; + const responseToParse = responseFormat ? response.clone() : response; const data = !responseFormat ? r - : await response[responseFormat]() + : await responseToParse[responseFormat]() .then((data) => { if (r.ok) { r.data = data; @@ -1809,6 +1850,7 @@ export class HttpClient { * @title FLAME API * @version 0.1.0 * @license Apache 2.0 (https://www.apache.org/licenses/LICENSE-2.0.html) + * @baseUrl /api * * FLAME project API for interacting with various microservices within the node for the UI. */ @@ -1820,13 +1862,13 @@ export class Api< * @description Gather the image URL for the requested analysis container and send information to the PO. * * @tags PodOrc - * @name CreateAnalysisPoPost - * @summary Create Analysis + * @name PodorcPodsCreatePoPost + * @summary Podorc.Pods.Create * @request POST:/po * @secure */ - createAnalysisPoPost: ( - data: BodyCreateAnalysisPoPost, + podorcPodsCreatePoPost: ( + data: BodyPodorcPodsCreatePoPost, params: RequestParams = {}, ) => this.request({ @@ -1843,12 +1885,12 @@ export class Api< * @description Get all analysis pod logs. * * @tags PodOrc - * @name GetAllAnalysisLogsPoLogsGet - * @summary Get All Analysis Logs + * @name PodorcLogsGetPoLogsGet + * @summary Podorc.Logs.Get * @request GET:/po/logs * @secure */ - getAllAnalysisLogsPoLogsGet: (params: RequestParams = {}) => + podorcLogsGetPoLogsGet: (params: RequestParams = {}) => this.request({ path: `/po/logs`, method: "GET", @@ -1861,12 +1903,12 @@ export class Api< * @description Get the analysis pod logs. * * @tags PodOrc - * @name GetAnalysisLogsPoLogsAnalysisIdGet - * @summary Get Analysis Logs + * @name PodorcLogsGetPoLogsAnalysisIdGet + * @summary Podorc.Logs.Get * @request GET:/po/logs/{analysis_id} * @secure */ - getAnalysisLogsPoLogsAnalysisIdGet: ( + podorcLogsGetPoLogsAnalysisIdGet: ( analysisId: string, params: RequestParams = {}, ) => @@ -1882,12 +1924,12 @@ export class Api< * @description Get all previous analysis pod logs. * * @tags PodOrc - * @name GetAllAnalysisLogHistoryPoHistoryGet - * @summary Get All Analysis Log History + * @name PodorcHistoryGetPoHistoryGet + * @summary Podorc.History.Get * @request GET:/po/history * @secure */ - getAllAnalysisLogHistoryPoHistoryGet: (params: RequestParams = {}) => + podorcHistoryGetPoHistoryGet: (params: RequestParams = {}) => this.request({ path: `/po/history`, method: "GET", @@ -1900,12 +1942,12 @@ export class Api< * @description Get the previous analysis pod logs. * * @tags PodOrc - * @name GetAnalysisLogHistoryPoHistoryAnalysisIdGet - * @summary Get Analysis Log History + * @name PodorcHistoryGetPoHistoryAnalysisIdGet + * @summary Podorc.History.Get * @request GET:/po/history/{analysis_id} * @secure */ - getAnalysisLogHistoryPoHistoryAnalysisIdGet: ( + podorcHistoryGetPoHistoryAnalysisIdGet: ( analysisId: string | null, params: RequestParams = {}, ) => @@ -1921,12 +1963,12 @@ export class Api< * @description Get all analysis run statuses. * * @tags PodOrc - * @name GetAllAnalysisStatusPoStatusGet - * @summary Get All Analysis Status + * @name PodorcStatusGetPoStatusGet + * @summary Podorc.Status.Get * @request GET:/po/status * @secure */ - getAllAnalysisStatusPoStatusGet: (params: RequestParams = {}) => + podorcStatusGetPoStatusGet: (params: RequestParams = {}) => this.request({ path: `/po/status`, method: "GET", @@ -1939,12 +1981,12 @@ export class Api< * @description Get a specific analysis pod run status. * * @tags PodOrc - * @name GetAnalysisStatusPoStatusAnalysisIdGet - * @summary Get Analysis Status + * @name PodorcStatusGetPoStatusAnalysisIdGet + * @summary Podorc.Status.Get * @request GET:/po/status/{analysis_id} * @secure */ - getAnalysisStatusPoStatusAnalysisIdGet: ( + podorcStatusGetPoStatusAnalysisIdGet: ( analysisId: string | null, params: RequestParams = {}, ) => @@ -1960,12 +2002,12 @@ export class Api< * @description Get all running pods in the k8s cluster. * * @tags PodOrc - * @name GetAllAnalysisPodsPoPodsGet - * @summary Get All Analysis Pods + * @name PodorcPodsGetPoPodsGet + * @summary Podorc.Pods.Get * @request GET:/po/pods * @secure */ - getAllAnalysisPodsPoPodsGet: (params: RequestParams = {}) => + podorcPodsGetPoPodsGet: (params: RequestParams = {}) => this.request({ path: `/po/pods`, method: "GET", @@ -1978,12 +2020,12 @@ export class Api< * @description Get information on a specific running analysis pod in the k8s cluster. * * @tags PodOrc - * @name GetAnalysisPodsPoPodsAnalysisIdGet - * @summary Get Analysis Pods + * @name PodorcPodsGetPoPodsAnalysisIdGet + * @summary Podorc.Pods.Get * @request GET:/po/pods/{analysis_id} * @secure */ - getAnalysisPodsPoPodsAnalysisIdGet: ( + podorcPodsGetPoPodsAnalysisIdGet: ( analysisId: string | null, params: RequestParams = {}, ) => @@ -1999,12 +2041,12 @@ export class Api< * @description Stop all analysis pods. * * @tags PodOrc - * @name StopAllAnalysesPoStopPut - * @summary Stop All Analyses + * @name PodorcPodsStopPoStopPut + * @summary Podorc.Pods.Stop * @request PUT:/po/stop * @secure */ - stopAllAnalysesPoStopPut: (params: RequestParams = {}) => + podorcPodsStopPoStopPut: (params: RequestParams = {}) => this.request({ path: `/po/stop`, method: "PUT", @@ -2017,12 +2059,12 @@ export class Api< * @description Stop a specific analysis run. * * @tags PodOrc - * @name StopAnalysisPoStopAnalysisIdPut - * @summary Stop Analysis + * @name PodorcPodsStopPoStopAnalysisIdPut + * @summary Podorc.Pods.Stop * @request PUT:/po/stop/{analysis_id} * @secure */ - stopAnalysisPoStopAnalysisIdPut: ( + podorcPodsStopPoStopAnalysisIdPut: ( analysisId: string | null, params: RequestParams = {}, ) => @@ -2038,12 +2080,12 @@ export class Api< * @description Delete all analysis pods. * * @tags PodOrc - * @name DeleteAllAnalysesPoDeleteDelete - * @summary Delete All Analyses + * @name PodorcPodsDeletePoDeleteDelete + * @summary Podorc.Pods.Delete * @request DELETE:/po/delete * @secure */ - deleteAllAnalysesPoDeleteDelete: (params: RequestParams = {}) => + podorcPodsDeletePoDeleteDelete: (params: RequestParams = {}) => this.request({ path: `/po/delete`, method: "DELETE", @@ -2056,12 +2098,12 @@ export class Api< * @description Delete a specific analysis run. * * @tags PodOrc - * @name DeleteAnalysisPoDeleteAnalysisIdDelete - * @summary Delete Analysis + * @name PodorcPodsDeletePoDeleteAnalysisIdDelete + * @summary Podorc.Pods.Delete * @request DELETE:/po/delete/{analysis_id} * @secure */ - deleteAnalysisPoDeleteAnalysisIdDelete: ( + podorcPodsDeletePoDeleteAnalysisIdDelete: ( analysisId: string | null, params: RequestParams = {}, ) => @@ -2077,12 +2119,12 @@ export class Api< * @description Delete specific types of resources. Should be a comma separated combination of the following entries: 'all', 'analyzes', 'services', 'mb', 'rs', 'keycloak' * * @tags PodOrc - * @name CleanupNodePoCleanupCleanupTypeDelete - * @summary Cleanup Node + * @name PodorcCleanupPoCleanupCleanupTypeDelete + * @summary Podorc.Cleanup * @request DELETE:/po/cleanup/{cleanup_type} * @secure */ - cleanupNodePoCleanupCleanupTypeDelete: ( + podorcCleanupPoCleanupCleanupTypeDelete: ( cleanupType: CleanUpType, params: RequestParams = {}, ) => @@ -2099,12 +2141,12 @@ export class Api< * @description Perform the required checks to start an analysis and send information to the PO. * * @tags Meta - * @name InitializeAnalysisAnalysisInitializePost - * @summary Initialize Analysis + * @name MetaInitializeAnalysisInitializePost + * @summary Meta.Initialize * @request POST:/analysis/initialize * @secure */ - initializeAnalysisAnalysisInitializePost: ( + metaInitializeAnalysisInitializePost: ( data: InitializeAnalysis, params: RequestParams = {}, ) => @@ -2122,12 +2164,12 @@ export class Api< * @description Perform the required checks to stop an analysis and delete it and its components. This method will first delete the kong consumer and then send the delete command to the PO. * * @tags Meta - * @name TerminateAnalysisAnalysisTerminateAnalysisIdDelete - * @summary Terminate Analysis + * @name MetaTerminateAnalysisTerminateAnalysisIdDelete + * @summary Meta.Terminate * @request DELETE:/analysis/terminate/{analysis_id} * @secure */ - terminateAnalysisAnalysisTerminateAnalysisIdDelete: ( + metaTerminateAnalysisTerminateAnalysisIdDelete: ( analysisId: string, params: RequestParams = {}, ) => @@ -2143,13 +2185,13 @@ export class Api< * @description Build an analysis image URL using its metadata from the Hub. * * @tags Hub - * @name GetAnalysisImageUrlAnalysisImagePost - * @summary Get Analysis Image Url + * @name HubAnalysisImageGetAnalysisImagePost + * @summary Hub.Analysis.Image.Get * @request POST:/analysis/image * @secure */ - getAnalysisImageUrlAnalysisImagePost: ( - data: BodyGetAnalysisImageUrlAnalysisImagePost, + hubAnalysisImageGetAnalysisImagePost: ( + data: BodyHubAnalysisImageGetAnalysisImagePost, params: RequestParams = {}, ) => this.request({ @@ -2167,12 +2209,12 @@ export class Api< * @description List all projects. * * @tags Hub - * @name ListAllProjectsProjectsGet + * @name HubProjectGetProjectsGet * @summary List all of the projects * @request GET:/projects * @secure */ - listAllProjectsProjectsGet: (params: RequestParams = {}) => + hubProjectGetProjectsGet: (params: RequestParams = {}) => this.request({ path: `/projects`, method: "GET", @@ -2185,12 +2227,12 @@ export class Api< * @description List project for a given UUID. * * @tags Hub - * @name ListSpecificProjectProjectsProjectIdGet + * @name HubProjectGetProjectsProjectIdGet * @summary List a specific project * @request GET:/projects/{project_id} * @secure */ - listSpecificProjectProjectsProjectIdGet: ( + hubProjectGetProjectsProjectIdGet: ( projectId: string, params: RequestParams = {}, ) => @@ -2207,18 +2249,18 @@ export class Api< * @description List project proposals. * * @tags Hub - * @name ListProjectProposalsProjectNodesGet + * @name HubProjectNodeGetProjectNodesGet * @summary List all of the project proposals * @request GET:/project-nodes * @secure */ - listProjectProposalsProjectNodesGet: ( + hubProjectNodeGetProjectNodesGet: ( query?: { /** - * Debug + * Force Refresh * @default false */ - debug?: boolean; + force_refresh?: boolean; }, params: RequestParams = {}, ) => @@ -2235,12 +2277,12 @@ export class Api< * @description Set the approval status of a project proposal. * * @tags Hub - * @name ListProjectProposalProjectNodesProjectNodeIdGet + * @name HubProjectNodeGetProjectNodesProjectNodeIdGet * @summary List a specific project proposal * @request GET:/project-nodes/{project_node_id} * @secure */ - listProjectProposalProjectNodesProjectNodeIdGet: ( + hubProjectNodeGetProjectNodesProjectNodeIdGet: ( projectNodeId: string, params: RequestParams = {}, ) => @@ -2256,14 +2298,14 @@ export class Api< * @description Set the approval status of a project proposal. * * @tags Hub - * @name AcceptRejectProjectProposalProjectNodesProjectNodeIdPost + * @name HubProjectNodeUpdateProjectNodesProjectNodeIdPost * @summary Update a specific project proposal * @request POST:/project-nodes/{project_node_id} * @secure */ - acceptRejectProjectProposalProjectNodesProjectNodeIdPost: ( + hubProjectNodeUpdateProjectNodesProjectNodeIdPost: ( projectNodeId: string, - data: BodyAcceptRejectProjectProposalProjectNodesProjectNodeIdPost, + data: BodyHubProjectNodeUpdateProjectNodesProjectNodeIdPost, params: RequestParams = {}, ) => this.request({ @@ -2281,18 +2323,18 @@ export class Api< * @description List all analysis nodes for give node. * * @tags Hub - * @name ListAnalysisNodesAnalysisNodesGet + * @name HubAnalysisNodeGetAnalysisNodesGet * @summary List all of the analysis proposals * @request GET:/analysis-nodes * @secure */ - listAnalysisNodesAnalysisNodesGet: ( + hubAnalysisNodeGetAnalysisNodesGet: ( query?: { /** - * Debug + * Force Refresh * @default false */ - debug?: boolean; + force_refresh?: boolean; }, params: RequestParams = {}, ) => @@ -2309,12 +2351,12 @@ export class Api< * @description List a specific analysis node. * * @tags Hub - * @name ListSpecificAnalysisNodeAnalysisNodesAnalysisNodeIdGet + * @name HubAnalysisNodeGetAnalysisNodesAnalysisNodeIdGet * @summary List a specific analysis node * @request GET:/analysis-nodes/{analysis_node_id} * @secure */ - listSpecificAnalysisNodeAnalysisNodesAnalysisNodeIdGet: ( + hubAnalysisNodeGetAnalysisNodesAnalysisNodeIdGet: ( analysisNodeId: string, params: RequestParams = {}, ) => @@ -2330,14 +2372,14 @@ export class Api< * @description Set the approval status of an analysis proposal. * * @tags Hub - * @name AcceptRejectAnalysisNodeAnalysisNodesAnalysisNodeIdPost + * @name HubAnalysisNodeUpdateAnalysisNodesAnalysisNodeIdPost * @summary Update a specific analysis proposal * @request POST:/analysis-nodes/{analysis_node_id} * @secure */ - acceptRejectAnalysisNodeAnalysisNodesAnalysisNodeIdPost: ( + hubAnalysisNodeUpdateAnalysisNodesAnalysisNodeIdPost: ( analysisNodeId: string, - data: BodyAcceptRejectAnalysisNodeAnalysisNodesAnalysisNodeIdPost, + data: BodyHubAnalysisNodeUpdateAnalysisNodesAnalysisNodeIdPost, params: RequestParams = {}, ) => this.request({ @@ -2355,12 +2397,12 @@ export class Api< * @description List all registered analyses. * * @tags Hub - * @name ListAllAnalysesAnalysesGet + * @name HubAnalysisGetAnalysesGet * @summary List all of the analysis proposals * @request GET:/analyses * @secure */ - listAllAnalysesAnalysesGet: (params: RequestParams = {}) => + hubAnalysisGetAnalysesGet: (params: RequestParams = {}) => this.request({ path: `/analyses`, method: "GET", @@ -2373,12 +2415,12 @@ export class Api< * @description List a specific analysis. * * @tags Hub - * @name ListSpecificAnalysisAnalysesAnalysisIdGet + * @name HubAnalysisGetAnalysesAnalysisIdGet * @summary List a specific analysis * @request GET:/analyses/{analysis_id} * @secure */ - listSpecificAnalysisAnalysesAnalysisIdGet: ( + hubAnalysisGetAnalysesAnalysisIdGet: ( analysisId: string, params: RequestParams = {}, ) => @@ -2394,12 +2436,12 @@ export class Api< * @description Update analysis with a given UUID. * * @tags Hub - * @name UpdateSpecificAnalysisAnalysesAnalysisIdPost + * @name HubAnalysisUpdateAnalysesAnalysisIdPost * @summary Update a specific analysis proposal * @request POST:/analyses/{analysis_id} * @secure */ - updateSpecificAnalysisAnalysesAnalysisIdPost: ( + hubAnalysisUpdateAnalysesAnalysisIdPost: ( analysisId: string, data: string, params: RequestParams = {}, @@ -2419,12 +2461,12 @@ export class Api< * @description List all nodes. * * @tags Hub - * @name ListAllNodesNodesGet + * @name HubNodeGetNodesGet * @summary List all of the nodes * @request GET:/nodes * @secure */ - listAllNodesNodesGet: (params: RequestParams = {}) => + hubNodeGetNodesGet: (params: RequestParams = {}) => this.request({ path: `/nodes`, method: "GET", @@ -2437,15 +2479,12 @@ export class Api< * @description List a specific node. * * @tags Hub - * @name ListSpecificNodeNodesNodeIdGet + * @name HubNodeGetNodesNodeIdGet * @summary List a specific node * @request GET:/nodes/{node_id} * @secure */ - listSpecificNodeNodesNodeIdGet: ( - nodeId: string, - params: RequestParams = {}, - ) => + hubNodeGetNodesNodeIdGet: (nodeId: string, params: RequestParams = {}) => this.request({ path: `/nodes/${nodeId}`, method: "GET", @@ -2459,12 +2498,12 @@ export class Api< * @description Return what type of node this API is deployed on. * * @tags Hub - * @name GetNodeTypeNodeTypeGet + * @name HubNodeTypeGetNodeTypeGet * @summary Return what type of node this API is deployed on * @request GET:/node-type * @secure */ - getNodeTypeNodeTypeGet: (params: RequestParams = {}) => + hubNodeTypeGetNodeTypeGet: (params: RequestParams = {}) => this.request({ path: `/node-type`, method: "GET", @@ -2478,12 +2517,12 @@ export class Api< * @description List registry data for a project. * * @tags Hub - * @name GetRegistryMetadataForProjectRegistryProjectsRegistryProjectIdGet + * @name HubRegistryMetadataGetRegistryProjectsRegistryProjectIdGet * @summary Get registry project * @request GET:/registry-projects/{registry_project_id} * @secure */ - getRegistryMetadataForProjectRegistryProjectsRegistryProjectIdGet: ( + hubRegistryMetadataGetRegistryProjectsRegistryProjectIdGet: ( registryProjectId: string, params: RequestParams = {}, ) => @@ -2500,12 +2539,12 @@ export class Api< * @description List all analysis buckets. * * @tags Hub - * @name ListAllAnalysisBucketsAnalysisBucketsGet + * @name HubAnalysisBucketGetAnalysisBucketsGet * @summary List a specific analysis bucket * @request GET:/analysis-buckets * @secure */ - listAllAnalysisBucketsAnalysisBucketsGet: (params: RequestParams = {}) => + hubAnalysisBucketGetAnalysisBucketsGet: (params: RequestParams = {}) => this.request({ path: `/analysis-buckets`, method: "GET", @@ -2518,12 +2557,12 @@ export class Api< * @description List a specific analysis bucket. * * @tags Hub - * @name ListSpecificAnalysisBucketsAnalysisBucketsAnalysisBucketIdGet + * @name HubAnalysisBucketGetAnalysisBucketsAnalysisBucketIdGet * @summary List a specific analysis bucket * @request GET:/analysis-buckets/{analysis_bucket_id} * @secure */ - listSpecificAnalysisBucketsAnalysisBucketsAnalysisBucketIdGet: ( + hubAnalysisBucketGetAnalysisBucketsAnalysisBucketIdGet: ( analysisBucketId: string, params: RequestParams = {}, ) => @@ -2540,12 +2579,12 @@ export class Api< * @description List partial analysis bucket files. * * @tags Hub - * @name ListAllAnalysisBucketFilesAnalysisBucketFilesGet + * @name HubAnalysisBucketFileGetAnalysisBucketFilesGet * @summary List partial analysis bucket files. * @request GET:/analysis-bucket-files * @secure */ - listAllAnalysisBucketFilesAnalysisBucketFilesGet: ( + hubAnalysisBucketFileGetAnalysisBucketFilesGet: ( params: RequestParams = {}, ) => this.request({ @@ -2560,12 +2599,12 @@ export class Api< * @description List specific partial analysis bucket file. * * @tags Hub - * @name ListSpecificAnalysisBucketFileAnalysisBucketFilesAnalysisBucketFileIdGet + * @name HubAnalysisBucketFileGetAnalysisBucketFilesAnalysisBucketFileIdGet * @summary List partial analysis bucket files. * @request GET:/analysis-bucket-files/{analysis_bucket_file_id} * @secure */ - listSpecificAnalysisBucketFileAnalysisBucketFilesAnalysisBucketFileIdGet: ( + hubAnalysisBucketFileGetAnalysisBucketFilesAnalysisBucketFileIdGet: ( analysisBucketFileId: string, params: RequestParams = {}, ) => @@ -2577,17 +2616,46 @@ export class Api< ...params, }), }; + local = { + /** + * @description Delete all objects in MinIO and all Postgres database entries related to the specified project. Returns a 200 on success, a 400 if the project is still available on the Hub and a 403 if it is not the Hub Adapter client that sends the request. In both error cases nothing is deleted at all. + * + * @tags Results + * @name StorageLocalDeleteLocalDelete + * @summary Storage.Local.Delete + * @request DELETE:/local + * @secure + */ + storageLocalDeleteLocalDelete: ( + query: { + /** + * Project Id + * UUID of the associated project. + */ + project_id: string; + }, + params: RequestParams = {}, + ) => + this.request({ + path: `/local`, + method: "DELETE", + query: query, + secure: true, + format: "json", + ...params, + }), + }; kong = { /** * @description List all available data stores (referred to as services by kong). * * @tags Kong - * @name ListDataStoresKongDatastoreGet - * @summary List Data Stores + * @name KongDatastoreGetKongDatastoreGet + * @summary Kong.Datastore.Get * @request GET:/kong/datastore * @secure */ - listDataStoresKongDatastoreGet: ( + kongDatastoreGetKongDatastoreGet: ( query?: { /** * Detailed @@ -2611,13 +2679,13 @@ export class Api< * @description Create a datastore (referred to as services by kong) by providing necessary metadata. * * @tags Kong - * @name CreateServiceKongDatastorePost - * @summary Create Service + * @name KongDatastoreCreateKongDatastorePost + * @summary Kong.Datastore.Create * @request POST:/kong/datastore * @secure */ - createServiceKongDatastorePost: ( - data: BodyCreateServiceKongDatastorePost, + kongDatastoreCreateKongDatastorePost: ( + data: BodyKongDatastoreCreateKongDatastorePost, params: RequestParams = {}, ) => this.request({ @@ -2631,16 +2699,16 @@ export class Api< }), /** - * @description List all available data stores (referred to as services by kong). Will be composed of the Project UUID and the datastore type (fhir/s3) i.e. {project_id}-{ds_type}. This is found via the tags. + * @description Retrieve a specific data store using the project UUID * * @tags Kong - * @name ListSpecificDataStoreKongDatastoreProjectIdGet - * @summary List Specific Data Store + * @name KongDatastoreGetKongDatastoreProjectIdGet + * @summary Kong.Datastore.Get * @request GET:/kong/datastore/{project_id} * @secure */ - listSpecificDataStoreKongDatastoreProjectIdGet: ( - projectId: string | null, + kongDatastoreGetKongDatastoreProjectIdGet: ( + projectId: string, query?: { /** * Detailed @@ -2664,12 +2732,12 @@ export class Api< * @description Delete the listed data store (referred to as services by kong). * * @tags Kong - * @name DeleteDataStoreKongDatastoreDataStoreNameDelete - * @summary Delete Data Store + * @name KongDatastoreDeleteKongDatastoreDataStoreNameDelete + * @summary Kong.Datastore.Delete * @request DELETE:/kong/datastore/{data_store_name} * @secure */ - deleteDataStoreKongDatastoreDataStoreNameDelete: ( + kongDatastoreDeleteKongDatastoreDataStoreNameDelete: ( dataStoreName: string, params: RequestParams = {}, ) => @@ -2682,24 +2750,19 @@ export class Api< }), /** - * @description List all projects (referred to as routes by kong) available, can be filtered by project_id. Set "detailed" to True to include detailed information on the linked data stores. + * @description List all projects (referred to as routes by kong) available, can be filtered by project_id. Set "detailed" to True to include detailed information on the linked kong service. * * @tags Kong - * @name ListProjectsKongProjectGet - * @summary List Projects + * @name KongProjectGetKongProjectGet + * @summary Kong.Project.Get * @request GET:/kong/project * @secure */ - listProjectsKongProjectGet: ( + kongProjectGetKongProjectGet: ( query?: { - /** - * Project Id - * UUID of project. - */ - project_id?: string | null; /** * Detailed - * Whether to include detailed information on data stores + * Whether to include detailed information on the connected kong service * @default false */ detailed?: boolean; @@ -2719,13 +2782,13 @@ export class Api< * @description Connect a project to a data store (referred to as a route by kong). * * @tags Kong - * @name CreateRouteToDatastoreKongProjectPost - * @summary Create Route To Datastore + * @name KongProjectCreateKongProjectPost + * @summary Kong.Project.Create * @request POST:/kong/project * @secure */ - createRouteToDatastoreKongProjectPost: ( - data: BodyCreateRouteToDatastoreKongProjectPost, + kongProjectCreateKongProjectPost: ( + data: BodyKongProjectCreateKongProjectPost, params: RequestParams = {}, ) => this.request({ @@ -2738,17 +2801,47 @@ export class Api< ...params, }), + /** + * @description List a specific projects (referred to as routes by kong) using the project UUID. Set "detailed" to True to include detailed information on the linked kong service. + * + * @tags Kong + * @name KongProjectGetKongProjectProjectIdGet + * @summary Kong.Project.Get + * @request GET:/kong/project/{project_id} + * @secure + */ + kongProjectGetKongProjectProjectIdGet: ( + projectId: string, + query?: { + /** + * Detailed + * Whether to include detailed information on the connected kong service + * @default false + */ + detailed?: boolean; + }, + params: RequestParams = {}, + ) => + this.request({ + path: `/kong/project/${projectId}`, + method: "GET", + query: query, + secure: true, + format: "json", + ...params, + }), + /** * @description Creates a new datastore (service) and a new project (route), then links them together with a health consumer. * * @tags Kong - * @name CreateDatastoreAndProjectWithLinkKongInitializePost - * @summary Create Datastore And Project With Link + * @name KongInitializeKongInitializePost + * @summary Kong.Initialize * @request POST:/kong/initialize * @secure */ - createDatastoreAndProjectWithLinkKongInitializePost: ( - data: BodyCreateDatastoreAndProjectWithLinkKongInitializePost, + kongInitializeKongInitializePost: ( + data: BodyKongInitializeKongInitializePost, params: RequestParams = {}, ) => this.request({ @@ -2765,12 +2858,12 @@ export class Api< * @description Disconnect a project (route) from all data stores (services) and delete associated analyses (consumers). * * @tags Kong - * @name DeleteRouteKongProjectProjectRouteIdDelete - * @summary Delete Route + * @name KongProjectDeleteKongProjectProjectRouteIdDelete + * @summary Kong.Project.Delete * @request DELETE:/kong/project/{project_route_id} * @secure */ - deleteRouteKongProjectProjectRouteIdDelete: ( + kongProjectDeleteKongProjectProjectRouteIdDelete: ( projectRouteId: string, params: RequestParams = {}, ) => @@ -2783,24 +2876,19 @@ export class Api< }), /** - * @description List all analyses (referred to as consumers by kong) available, can be filtered by analysis_id. + * @description List all analyses (referred to as consumers by kong) available. Can be filtered by project UUID using tag. * * @tags Kong - * @name GetAnalysesKongAnalysisGet - * @summary Get Analyses + * @name KongAnalysisGetKongAnalysisGet + * @summary Kong.Analysis.Get * @request GET:/kong/analysis * @secure */ - getAnalysesKongAnalysisGet: ( + kongAnalysisGetKongAnalysisGet: ( query?: { - /** - * Analysis Id - * UUID of the analysis. - */ - analysis_id?: string | null; /** * Tag - * Tag to filter by e.g. project ID + * Filter consumers by project using the project UUID */ tag?: string | null; }, @@ -2819,13 +2907,13 @@ export class Api< * @description Create a new analysis and link it to a project. * * @tags Kong - * @name CreateAndConnectAnalysisToProjectKongAnalysisPost - * @summary Create And Connect Analysis To Project + * @name KongAnalysisCreateKongAnalysisPost + * @summary Kong.Analysis.Create * @request POST:/kong/analysis * @secure */ - createAndConnectAnalysisToProjectKongAnalysisPost: ( - data: BodyCreateAndConnectAnalysisToProjectKongAnalysisPost, + kongAnalysisCreateKongAnalysisPost: ( + data: BodyKongAnalysisCreateKongAnalysisPost, params: RequestParams = {}, ) => this.request({ @@ -2839,22 +2927,29 @@ export class Api< }), /** - * @description Test whether Kong can read the requested data source. Because we use the key-auth plugin, a consumer is required for pinging the data service. + * @description List all analyses (referred to as consumers by kong) available. * * @tags Kong - * @name TestConnectionKongProjectProjectIdDsTypeHealthGet - * @summary Test Connection - * @request GET:/kong/project/{project_id}/{ds_type}/health + * @name KongAnalysisGetKongAnalysisAnalysisIdGet + * @summary Kong.Analysis.Get + * @request GET:/kong/analysis/{analysis_id} * @secure */ - testConnectionKongProjectProjectIdDsTypeHealthGet: ( - projectId: string, - dsType: DataStoreType, + kongAnalysisGetKongAnalysisAnalysisIdGet: ( + analysisId: string | null, + query?: { + /** + * Tag + * Filter consumers by project using the project UUID + */ + tag?: string | null; + }, params: RequestParams = {}, ) => - this.request({ - path: `/kong/project/${projectId}/${dsType}/health`, + this.request({ + path: `/kong/analysis/${analysisId}`, method: "GET", + query: query, secure: true, format: "json", ...params, @@ -2864,12 +2959,12 @@ export class Api< * @description Delete the listed analysis. * * @tags Kong - * @name DeleteAnalysisKongAnalysisAnalysisIdDelete - * @summary Delete Analysis + * @name KongAnalysisDeleteKongAnalysisAnalysisIdDelete + * @summary Kong.Analysis.Delete * @request DELETE:/kong/analysis/{analysis_id} * @secure */ - deleteAnalysisKongAnalysisAnalysisIdDelete: ( + kongAnalysisDeleteKongAnalysisAnalysisIdDelete: ( analysisId: string, params: RequestParams = {}, ) => @@ -2880,17 +2975,39 @@ export class Api< format: "json", ...params, }), + + /** + * @description Test whether Kong can read the requested data source. Because we use the key-auth plugin, a consumer is required for pinging the data service. + * + * @tags Kong + * @name KongProbeKongProjectProjectIdDsTypeHealthGet + * @summary Kong.Probe + * @request GET:/kong/project/{project_id}/{ds_type}/health + * @secure + */ + kongProbeKongProjectProjectIdDsTypeHealthGet: ( + projectId: string, + dsType: DataStoreType, + params: RequestParams = {}, + ) => + this.request({ + path: `/kong/project/${projectId}/${dsType}/health`, + method: "GET", + secure: true, + format: "json", + ...params, + }), }; healthz = { /** * @description ## Perform a Health Check Endpoint to perform a healthcheck on. This endpoint can primarily be used Docker to ensure a robust container orchestration and management is in place. Other services which rely on proper functioning of the API service will not deploy if this endpoint returns any other HTTP status code except 200 (OK). Returns: HealthCheck: Returns a JSON response with the health status * * @tags Health - * @name GetHealthHealthzGet + * @name HealthStatusGetHealthzGet * @summary Perform a Health Check * @request GET:/healthz */ - getHealthHealthzGet: (params: RequestParams = {}) => + healthStatusGetHealthzGet: (params: RequestParams = {}) => this.request({ path: `/healthz`, method: "GET", @@ -2903,13 +3020,11 @@ export class Api< * @description Return the health of the downstream microservices. * * @tags Health - * @name GetHealthDownstreamServicesHealthServicesGet + * @name HealthStatusServicesGetHealthServicesGet * @summary Perform a Health Check on the downstream microservices * @request GET:/health/services */ - getHealthDownstreamServicesHealthServicesGet: ( - params: RequestParams = {}, - ) => + healthStatusServicesGetHealthServicesGet: (params: RequestParams = {}) => this.request({ path: `/health/services`, method: "GET", @@ -2922,12 +3037,12 @@ export class Api< * @description Get a JWT from the IDP by passing a valid username and password. This token can then be used to authenticate yourself with this API. If no client ID/secret is provided, it will be autofilled using the hub adapter. * * @tags Auth - * @name GetTokenTokenPost + * @name AuthTokenGetTokenPost * @summary Get a token from the IDP * @request POST:/token */ - getTokenTokenPost: ( - data: BodyGetTokenTokenPost, + authTokenGetTokenPost: ( + data: BodyAuthTokenGetTokenPost, params: RequestParams = {}, ) => this.request({ @@ -2939,4 +3054,64 @@ export class Api< ...params, }), }; + events = { + /** + * @description Retrieve a selection of logged events. + * + * @tags Events + * @name EventsGetEventsGet + * @summary Events.Get + * @request GET:/events + * @secure + */ + eventsGetEventsGet: ( + query?: { + /** + * Limit + * Maximum number of events to return + * @default 50 + */ + limit?: number | null; + /** + * Offset + * Number of events to offset by + */ + offset?: number | null; + /** + * Service Name + * Filter events by service name + */ + service_name?: string | null; + /** + * Event Name + * Filter events by event name + */ + event_name?: string | null; + /** + * Username + * Filter events by username + */ + username?: string | null; + /** + * Start Date + * Filter events by start date using ISO8601 format + */ + start_date?: string | null; + /** + * End Date + * Filter events by end date using ISO8601 format + */ + end_date?: string | null; + }, + params: RequestParams = {}, + ) => + this.request({ + path: `/events`, + method: "GET", + query: query, + secure: true, + format: "json", + ...params, + }), + }; } diff --git a/services/hub_adapter_swagger.json b/services/hub_adapter_swagger.json index dd3e989..213b656 100644 --- a/services/hub_adapter_swagger.json +++ b/services/hub_adapter_swagger.json @@ -10,20 +10,23 @@ }, "version": "0.1.0" }, + "servers": [ + { + "url": "/api" + } + ], "paths": { "/po": { "post": { - "tags": [ - "PodOrc" - ], - "summary": "Create Analysis", + "tags": ["PodOrc"], + "summary": "Podorc.Pods.Create", "description": "Gather the image URL for the requested analysis container and send information to the PO.", - "operationId": "create_analysis_po_post", + "operationId": "podorc_pods_create_po_post", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Body_create_analysis_po_post" + "$ref": "#/components/schemas/Body_podorc_pods_create_po_post" } } }, @@ -63,12 +66,10 @@ }, "/po/logs": { "get": { - "tags": [ - "PodOrc" - ], - "summary": "Get All Analysis Logs", + "tags": ["PodOrc"], + "summary": "Podorc.Logs.Get", "description": "Get all analysis pod logs.", - "operationId": "get_all_analysis_logs_po_logs_get", + "operationId": "podorc_logs_get_po_logs_get", "responses": { "200": { "description": "Successful Response", @@ -93,12 +94,10 @@ }, "/po/logs/{analysis_id}": { "get": { - "tags": [ - "PodOrc" - ], - "summary": "Get Analysis Logs", + "tags": ["PodOrc"], + "summary": "Podorc.Logs.Get", "description": "Get the analysis pod logs.", - "operationId": "get_analysis_logs_po_logs__analysis_id__get", + "operationId": "podorc_logs_get_po_logs__analysis_id__get", "security": [ { "JWT": [] @@ -147,12 +146,10 @@ }, "/po/history": { "get": { - "tags": [ - "PodOrc" - ], - "summary": "Get All Analysis Log History", + "tags": ["PodOrc"], + "summary": "Podorc.History.Get", "description": "Get all previous analysis pod logs.", - "operationId": "get_all_analysis_log_history_po_history_get", + "operationId": "podorc_history_get_po_history_get", "responses": { "200": { "description": "Successful Response", @@ -177,12 +174,10 @@ }, "/po/history/{analysis_id}": { "get": { - "tags": [ - "PodOrc" - ], - "summary": "Get Analysis Log History", + "tags": ["PodOrc"], + "summary": "Podorc.History.Get", "description": "Get the previous analysis pod logs.", - "operationId": "get_analysis_log_history_po_history__analysis_id__get", + "operationId": "podorc_history_get_po_history__analysis_id__get", "security": [ { "JWT": [] @@ -238,12 +233,10 @@ }, "/po/status": { "get": { - "tags": [ - "PodOrc" - ], - "summary": "Get All Analysis Status", + "tags": ["PodOrc"], + "summary": "Podorc.Status.Get", "description": "Get all analysis run statuses.", - "operationId": "get_all_analysis_status_po_status_get", + "operationId": "podorc_status_get_po_status_get", "responses": { "200": { "description": "Successful Response", @@ -268,12 +261,10 @@ }, "/po/status/{analysis_id}": { "get": { - "tags": [ - "PodOrc" - ], - "summary": "Get Analysis Status", + "tags": ["PodOrc"], + "summary": "Podorc.Status.Get", "description": "Get a specific analysis pod run status.", - "operationId": "get_analysis_status_po_status__analysis_id__get", + "operationId": "podorc_status_get_po_status__analysis_id__get", "security": [ { "JWT": [] @@ -329,12 +320,10 @@ }, "/po/pods": { "get": { - "tags": [ - "PodOrc" - ], - "summary": "Get All Analysis Pods", + "tags": ["PodOrc"], + "summary": "Podorc.Pods.Get", "description": "Get all running pods in the k8s cluster.", - "operationId": "get_all_analysis_pods_po_pods_get", + "operationId": "podorc_pods_get_po_pods_get", "responses": { "200": { "description": "Successful Response", @@ -359,12 +348,10 @@ }, "/po/pods/{analysis_id}": { "get": { - "tags": [ - "PodOrc" - ], - "summary": "Get Analysis Pods", + "tags": ["PodOrc"], + "summary": "Podorc.Pods.Get", "description": "Get information on a specific running analysis pod in the k8s cluster.", - "operationId": "get_analysis_pods_po_pods__analysis_id__get", + "operationId": "podorc_pods_get_po_pods__analysis_id__get", "security": [ { "JWT": [] @@ -420,12 +407,10 @@ }, "/po/stop": { "put": { - "tags": [ - "PodOrc" - ], - "summary": "Stop All Analyses", + "tags": ["PodOrc"], + "summary": "Podorc.Pods.Stop", "description": "Stop all analysis pods.", - "operationId": "stop_all_analyses_po_stop_put", + "operationId": "podorc_pods_stop_po_stop_put", "responses": { "200": { "description": "Successful Response", @@ -450,12 +435,10 @@ }, "/po/stop/{analysis_id}": { "put": { - "tags": [ - "PodOrc" - ], - "summary": "Stop Analysis", + "tags": ["PodOrc"], + "summary": "Podorc.Pods.Stop", "description": "Stop a specific analysis run.", - "operationId": "stop_analysis_po_stop__analysis_id__put", + "operationId": "podorc_pods_stop_po_stop__analysis_id__put", "security": [ { "JWT": [] @@ -511,12 +494,10 @@ }, "/po/delete": { "delete": { - "tags": [ - "PodOrc" - ], - "summary": "Delete All Analyses", + "tags": ["PodOrc"], + "summary": "Podorc.Pods.Delete", "description": "Delete all analysis pods.", - "operationId": "delete_all_analyses_po_delete_delete", + "operationId": "podorc_pods_delete_po_delete_delete", "responses": { "200": { "description": "Successful Response", @@ -541,12 +522,10 @@ }, "/po/delete/{analysis_id}": { "delete": { - "tags": [ - "PodOrc" - ], - "summary": "Delete Analysis", + "tags": ["PodOrc"], + "summary": "Podorc.Pods.Delete", "description": "Delete a specific analysis run.", - "operationId": "delete_analysis_po_delete__analysis_id__delete", + "operationId": "podorc_pods_delete_po_delete__analysis_id__delete", "security": [ { "JWT": [] @@ -602,12 +581,10 @@ }, "/po/cleanup/{cleanup_type}": { "delete": { - "tags": [ - "PodOrc" - ], - "summary": "Cleanup Node", + "tags": ["PodOrc"], + "summary": "Podorc.Cleanup", "description": "Delete specific types of resources.\n\nShould be a comma separated combination of the following entries:\n'all', 'analyzes', 'services', 'mb', 'rs', 'keycloak'", - "operationId": "cleanup_node_po_cleanup__cleanup_type__delete", + "operationId": "podorc_cleanup_po_cleanup__cleanup_type__delete", "security": [ { "JWT": [] @@ -654,12 +631,10 @@ }, "/analysis/initialize": { "post": { - "tags": [ - "Meta" - ], - "summary": "Initialize Analysis", + "tags": ["Meta"], + "summary": "Meta.Initialize", "description": "Perform the required checks to start an analysis and send information to the PO.", - "operationId": "initialize_analysis_analysis_initialize_post", + "operationId": "meta_initialize_analysis_initialize_post", "requestBody": { "content": { "application/x-www-form-urlencoded": { @@ -705,12 +680,10 @@ }, "/analysis/terminate/{analysis_id}": { "delete": { - "tags": [ - "Meta" - ], - "summary": "Terminate Analysis", + "tags": ["Meta"], + "summary": "Meta.Terminate", "description": "Perform the required checks to stop an analysis and delete it and its components.\n\nThis method will first delete the kong consumer and then send the delete command to the PO.", - "operationId": "terminate_analysis_analysis_terminate__analysis_id__delete", + "operationId": "meta_terminate_analysis_terminate__analysis_id__delete", "security": [ { "JWT": [] @@ -766,12 +739,10 @@ }, "/projects": { "get": { - "tags": [ - "Hub" - ], + "tags": ["Hub"], "summary": "List all of the projects", "description": "List all projects.", - "operationId": "list_all_projects_projects_get", + "operationId": "hub_project_get_projects_get", "responses": { "200": { "description": "Successful Response", @@ -782,7 +753,7 @@ "$ref": "#/components/schemas/Project" }, "type": "array", - "title": "Response List All Projects Projects Get" + "title": "Response Hub Project Get Projects Get" } } } @@ -800,12 +771,10 @@ }, "/projects/{project_id}": { "get": { - "tags": [ - "Hub" - ], + "tags": ["Hub"], "summary": "List a specific project", "description": "List project for a given UUID.", - "operationId": "list_specific_project_projects__project_id__get", + "operationId": "hub_project_get_projects__project_id__get", "security": [ { "JWT": [] @@ -861,12 +830,10 @@ }, "/project-nodes": { "get": { - "tags": [ - "Hub" - ], + "tags": ["Hub"], "summary": "List all of the project proposals", "description": "List project proposals.", - "operationId": "list_project_proposals_project_nodes_get", + "operationId": "hub_project_node_get_project_nodes_get", "security": [ { "JWT": [] @@ -874,13 +841,13 @@ ], "parameters": [ { - "name": "debug", + "name": "force_refresh", "in": "query", "required": false, "schema": { "type": "boolean", "default": false, - "title": "Debug" + "title": "Force Refresh" } } ], @@ -894,7 +861,7 @@ "items": { "$ref": "#/components/schemas/ProjectNode" }, - "title": "Response List Project Proposals Project Nodes Get" + "title": "Response Hub Project Node Get Project Nodes Get" } } } @@ -917,12 +884,10 @@ }, "/project-nodes/{project_node_id}": { "get": { - "tags": [ - "Hub" - ], + "tags": ["Hub"], "summary": "List a specific project proposal", "description": "Set the approval status of a project proposal.", - "operationId": "list_project_proposal_project_nodes__project_node_id__get", + "operationId": "hub_project_node_get_project_nodes__project_node_id__get", "security": [ { "JWT": [] @@ -976,12 +941,10 @@ } }, "post": { - "tags": [ - "Hub" - ], + "tags": ["Hub"], "summary": "Update a specific project proposal", "description": "Set the approval status of a project proposal.", - "operationId": "accept_reject_project_proposal_project_nodes__project_node_id__post", + "operationId": "hub_project_node_update_project_nodes__project_node_id__post", "security": [ { "JWT": [] @@ -1013,7 +976,7 @@ "content": { "application/x-www-form-urlencoded": { "schema": { - "$ref": "#/components/schemas/Body_accept_reject_project_proposal_project_nodes__project_node_id__post" + "$ref": "#/components/schemas/Body_hub_project_node_update_project_nodes__project_node_id__post" } } } @@ -1047,12 +1010,10 @@ }, "/analysis-nodes": { "get": { - "tags": [ - "Hub" - ], + "tags": ["Hub"], "summary": "List all of the analysis proposals", "description": "List all analysis nodes for give node.", - "operationId": "list_analysis_nodes_analysis_nodes_get", + "operationId": "hub_analysis_node_get_analysis_nodes_get", "security": [ { "JWT": [] @@ -1060,13 +1021,13 @@ ], "parameters": [ { - "name": "debug", + "name": "force_refresh", "in": "query", "required": false, "schema": { "type": "boolean", "default": false, - "title": "Debug" + "title": "Force Refresh" } } ], @@ -1080,7 +1041,7 @@ "items": { "$ref": "#/components/schemas/AnalysisNode" }, - "title": "Response List Analysis Nodes Analysis Nodes Get" + "title": "Response Hub Analysis Node Get Analysis Nodes Get" } } } @@ -1103,12 +1064,10 @@ }, "/analysis-nodes/{analysis_node_id}": { "get": { - "tags": [ - "Hub" - ], + "tags": ["Hub"], "summary": "List a specific analysis node", "description": "List a specific analysis node.", - "operationId": "list_specific_analysis_node_analysis_nodes__analysis_node_id__get", + "operationId": "hub_analysis_node_get_analysis_nodes__analysis_node_id__get", "security": [ { "JWT": [] @@ -1162,12 +1121,10 @@ } }, "post": { - "tags": [ - "Hub" - ], + "tags": ["Hub"], "summary": "Update a specific analysis proposal", "description": "Set the approval status of an analysis proposal.", - "operationId": "accept_reject_analysis_node_analysis_nodes__analysis_node_id__post", + "operationId": "hub_analysis_node_update_analysis_nodes__analysis_node_id__post", "security": [ { "JWT": [] @@ -1199,7 +1156,7 @@ "content": { "application/x-www-form-urlencoded": { "schema": { - "$ref": "#/components/schemas/Body_accept_reject_analysis_node_analysis_nodes__analysis_node_id__post" + "$ref": "#/components/schemas/Body_hub_analysis_node_update_analysis_nodes__analysis_node_id__post" } } } @@ -1233,12 +1190,10 @@ }, "/analyses": { "get": { - "tags": [ - "Hub" - ], + "tags": ["Hub"], "summary": "List all of the analysis proposals", "description": "List all registered analyses.", - "operationId": "list_all_analyses_analyses_get", + "operationId": "hub_analysis_get_analyses_get", "responses": { "200": { "description": "Successful Response", @@ -1249,7 +1204,7 @@ "$ref": "#/components/schemas/Analysis" }, "type": "array", - "title": "Response List All Analyses Analyses Get" + "title": "Response Hub Analysis Get Analyses Get" } } } @@ -1267,12 +1222,10 @@ }, "/analyses/{analysis_id}": { "get": { - "tags": [ - "Hub" - ], + "tags": ["Hub"], "summary": "List a specific analysis", "description": "List a specific analysis.", - "operationId": "list_specific_analysis_analyses__analysis_id__get", + "operationId": "hub_analysis_get_analyses__analysis_id__get", "security": [ { "JWT": [] @@ -1326,12 +1279,10 @@ } }, "post": { - "tags": [ - "Hub" - ], + "tags": ["Hub"], "summary": "Update a specific analysis proposal", "description": "Update analysis with a given UUID.", - "operationId": "update_specific_analysis_analyses__analysis_id__post", + "operationId": "hub_analysis_update_analyses__analysis_id__post", "security": [ { "JWT": [] @@ -1399,12 +1350,10 @@ }, "/nodes": { "get": { - "tags": [ - "Hub" - ], + "tags": ["Hub"], "summary": "List all of the nodes", "description": "List all nodes.", - "operationId": "list_all_nodes_nodes_get", + "operationId": "hub_node_get_nodes_get", "responses": { "200": { "description": "Successful Response", @@ -1415,7 +1364,7 @@ "$ref": "#/components/schemas/Node" }, "type": "array", - "title": "Response List All Nodes Nodes Get" + "title": "Response Hub Node Get Nodes Get" } } } @@ -1433,12 +1382,10 @@ }, "/nodes/{node_id}": { "get": { - "tags": [ - "Hub" - ], + "tags": ["Hub"], "summary": "List a specific node", "description": "List a specific node.", - "operationId": "list_specific_node_nodes__node_id__get", + "operationId": "hub_node_get_nodes__node_id__get", "security": [ { "JWT": [] @@ -1494,12 +1441,10 @@ }, "/node-type": { "get": { - "tags": [ - "Hub" - ], + "tags": ["Hub"], "summary": "Return what type of node this API is deployed on", "description": "Return what type of node this API is deployed on.", - "operationId": "get_node_type_node_type_get", + "operationId": "hub_node_type_get_node_type_get", "responses": { "200": { "description": "Successful Response", @@ -1524,12 +1469,10 @@ }, "/registry-projects/{registry_project_id}": { "get": { - "tags": [ - "Hub" - ], + "tags": ["Hub"], "summary": "Get registry project", "description": "List registry data for a project.", - "operationId": "get_registry_metadata_for_project_registry_projects__registry_project_id__get", + "operationId": "hub_registry_metadata_get_registry_projects__registry_project_id__get", "security": [ { "JWT": [] @@ -1585,17 +1528,15 @@ }, "/analysis/image": { "post": { - "tags": [ - "Hub" - ], - "summary": "Get Analysis Image Url", + "tags": ["Hub"], + "summary": "Hub.Analysis.Image.Get", "description": "Build an analysis image URL using its metadata from the Hub.", - "operationId": "get_analysis_image_url_analysis_image_post", + "operationId": "hub_analysis_image_get_analysis_image_post", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Body_get_analysis_image_url_analysis_image_post" + "$ref": "#/components/schemas/Body_hub_analysis_image_get_analysis_image_post" } } }, @@ -1635,12 +1576,10 @@ }, "/analysis-buckets": { "get": { - "tags": [ - "Hub" - ], + "tags": ["Hub"], "summary": "List a specific analysis bucket", "description": "List all analysis buckets.", - "operationId": "list_all_analysis_buckets_analysis_buckets_get", + "operationId": "hub_analysis_bucket_get_analysis_buckets_get", "responses": { "200": { "description": "Successful Response", @@ -1663,12 +1602,10 @@ }, "/analysis-buckets/{analysis_bucket_id}": { "get": { - "tags": [ - "Hub" - ], + "tags": ["Hub"], "summary": "List a specific analysis bucket", "description": "List a specific analysis bucket.", - "operationId": "list_specific_analysis_buckets_analysis_buckets__analysis_bucket_id__get", + "operationId": "hub_analysis_bucket_get_analysis_buckets__analysis_bucket_id__get", "security": [ { "JWT": [] @@ -1724,12 +1661,10 @@ }, "/analysis-bucket-files": { "get": { - "tags": [ - "Hub" - ], + "tags": ["Hub"], "summary": "List partial analysis bucket files.", "description": "List partial analysis bucket files.", - "operationId": "list_all_analysis_bucket_files_analysis_bucket_files_get", + "operationId": "hub_analysis_bucket_file_get_analysis_bucket_files_get", "responses": { "200": { "description": "Successful Response", @@ -1752,12 +1687,10 @@ }, "/analysis-bucket-files/{analysis_bucket_file_id}": { "get": { - "tags": [ - "Hub" - ], + "tags": ["Hub"], "summary": "List partial analysis bucket files.", "description": "List specific partial analysis bucket file.", - "operationId": "list_specific_analysis_bucket_file_analysis_bucket_files__analysis_bucket_file_id__get", + "operationId": "hub_analysis_bucket_file_get_analysis_bucket_files__analysis_bucket_file_id__get", "security": [ { "JWT": [] @@ -1809,14 +1742,69 @@ } } }, + "/local": { + "delete": { + "tags": ["Results"], + "summary": "Storage.Local.Delete", + "description": "Delete all objects in MinIO and all Postgres database entries related to the specified project.\n\nReturns a 200 on success, a 400 if the project is still available on the Hub and a 403 if it is not the\nHub Adapter client that sends the request. In both error cases nothing is deleted at all.", + "operationId": "storage_local_delete_local_delete", + "security": [ + { + "JWT": [] + } + ], + "parameters": [ + { + "name": "project_id", + "in": "query", + "required": true, + "schema": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "string" + } + ], + "description": "UUID of the associated project.", + "title": "Project Id" + }, + "description": "UUID of the associated project." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + }, + "404": { + "description": "Not found" + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, "/kong/datastore": { "get": { - "tags": [ - "Kong" - ], - "summary": "List Data Stores", + "tags": ["Kong"], + "summary": "Kong.Datastore.Get", "description": "List all available data stores (referred to as services by kong).", - "operationId": "list_data_stores_kong_datastore_get", + "operationId": "kong_datastore_get_kong_datastore_get", "security": [ { "JWT": [] @@ -1863,12 +1851,10 @@ } }, "post": { - "tags": [ - "Kong" - ], - "summary": "Create Service", + "tags": ["Kong"], + "summary": "Kong.Datastore.Create", "description": "Create a datastore (referred to as services by kong) by providing necessary metadata.", - "operationId": "create_service_kong_datastore_post", + "operationId": "kong_datastore_create_kong_datastore_post", "security": [ { "JWT": [] @@ -1879,7 +1865,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Body_create_service_kong_datastore_post" + "$ref": "#/components/schemas/Body_kong_datastore_create_kong_datastore_post" } } } @@ -1913,12 +1899,10 @@ }, "/kong/datastore/{project_id}": { "get": { - "tags": [ - "Kong" - ], - "summary": "List Specific Data Store", - "description": "List all available data stores (referred to as services by kong).\n\nWill be composed of the Project UUID and the datastore type (fhir/s3) i.e. {project_id}-{ds_type}. This is found\nvia the tags.", - "operationId": "list_specific_data_store_kong_datastore__project_id__get", + "tags": ["Kong"], + "summary": "Kong.Datastore.Get", + "description": "Retrieve a specific data store using the project UUID", + "operationId": "kong_datastore_get_kong_datastore__project_id__get", "security": [ { "JWT": [] @@ -1932,10 +1916,11 @@ "schema": { "anyOf": [ { - "type": "string" + "type": "string", + "format": "uuid" }, { - "type": "null" + "type": "string" } ], "description": "UUID of the associated project.", @@ -1985,12 +1970,10 @@ }, "/kong/datastore/{data_store_name}": { "delete": { - "tags": [ - "Kong" - ], - "summary": "Delete Data Store", + "tags": ["Kong"], + "summary": "Kong.Datastore.Delete", "description": "Delete the listed data store (referred to as services by kong).", - "operationId": "delete_data_store_kong_datastore__data_store_name__delete", + "operationId": "kong_datastore_delete_kong_datastore__data_store_name__delete", "security": [ { "JWT": [] @@ -2036,51 +2019,27 @@ }, "/kong/project": { "get": { - "tags": [ - "Kong" - ], - "summary": "List Projects", - "description": "List all projects (referred to as routes by kong) available, can be filtered by project_id.\n\nSet \"detailed\" to True to include detailed information on the linked data stores.", - "operationId": "list_projects_kong_project_get", + "tags": ["Kong"], + "summary": "Kong.Project.Get", + "description": "List all projects (referred to as routes by kong) available, can be filtered by project_id.\n\nSet \"detailed\" to True to include detailed information on the linked kong service.", + "operationId": "kong_project_get_kong_project_get", "security": [ { "JWT": [] } ], "parameters": [ - { - "name": "project_id", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string", - "format": "uuid" - }, - { - "type": "string" - }, - { - "type": "null" - } - ], - "description": "UUID of project.", - "title": "Project Id" - }, - "description": "UUID of project." - }, { "name": "detailed", "in": "query", "required": false, "schema": { "type": "boolean", - "description": "Whether to include detailed information on data stores", + "description": "Whether to include detailed information on the connected kong service", "default": false, "title": "Detailed" }, - "description": "Whether to include detailed information on data stores" + "description": "Whether to include detailed information on the connected kong service" } ], "responses": { @@ -2110,12 +2069,10 @@ } }, "post": { - "tags": [ - "Kong" - ], - "summary": "Create Route To Datastore", + "tags": ["Kong"], + "summary": "Kong.Project.Create", "description": "Connect a project to a data store (referred to as a route by kong).", - "operationId": "create_route_to_datastore_kong_project_post", + "operationId": "kong_project_create_kong_project_post", "security": [ { "JWT": [] @@ -2126,7 +2083,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Body_create_route_to_datastore_kong_project_post" + "$ref": "#/components/schemas/Body_kong_project_create_kong_project_post" } } } @@ -2158,26 +2115,95 @@ } } }, + "/kong/project/{project_id}": { + "get": { + "tags": ["Kong"], + "summary": "Kong.Project.Get", + "description": "List a specific projects (referred to as routes by kong) using the project UUID.\n\nSet \"detailed\" to True to include detailed information on the linked kong service.", + "operationId": "kong_project_get_kong_project__project_id__get", + "security": [ + { + "JWT": [] + } + ], + "parameters": [ + { + "name": "project_id", + "in": "path", + "required": true, + "schema": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "string" + } + ], + "description": "UUID of the associated project.", + "title": "Project Id" + }, + "description": "UUID of the associated project." + }, + { + "name": "detailed", + "in": "query", + "required": false, + "schema": { + "type": "boolean", + "description": "Whether to include detailed information on the connected kong service", + "default": false, + "title": "Detailed" + }, + "description": "Whether to include detailed information on the connected kong service" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ListRoutes" + } + } + } + }, + "404": { + "description": "Not found" + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, "/kong/initialize": { "post": { - "tags": [ - "Kong" - ], - "summary": "Create Datastore And Project With Link", + "tags": ["Kong"], + "summary": "Kong.Initialize", "description": "Creates a new datastore (service) and a new project (route), then links them together with a health consumer.", - "operationId": "create_datastore_and_project_with_link_kong_initialize_post", + "operationId": "kong_initialize_kong_initialize_post", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Body_create_datastore_and_project_with_link_kong_initialize_post" + "$ref": "#/components/schemas/Body_kong_initialize_kong_initialize_post" } } }, "required": true }, "responses": { - "200": { + "201": { "description": "Successful Response", "content": { "application/json": { @@ -2210,12 +2236,10 @@ }, "/kong/project/{project_route_id}": { "delete": { - "tags": [ - "Kong" - ], - "summary": "Delete Route", + "tags": ["Kong"], + "summary": "Kong.Project.Delete", "description": "Disconnect a project (route) from all data stores (services) and delete associated analyses (consumers).", - "operationId": "delete_route_kong_project__project_route_id__delete", + "operationId": "kong_project_delete_kong_project__project_route_id__delete", "security": [ { "JWT": [] @@ -2228,10 +2252,10 @@ "required": true, "schema": { "type": "string", - "description": "Unique identifier of the project to be deleted", + "description": "Unique identifier of the route to be deleted, must include datastore type hyphenated at the end", "title": "Project Route Id" }, - "description": "Unique identifier of the project to be deleted" + "description": "Unique identifier of the route to be deleted, must include datastore type hyphenated at the end" } ], "responses": { @@ -2263,40 +2287,16 @@ }, "/kong/analysis": { "get": { - "tags": [ - "Kong" - ], - "summary": "Get Analyses", - "description": "List all analyses (referred to as consumers by kong) available, can be filtered by analysis_id.", - "operationId": "get_analyses_kong_analysis_get", + "tags": ["Kong"], + "summary": "Kong.Analysis.Get", + "description": "List all analyses (referred to as consumers by kong) available. Can be filtered by project UUID using tag.", + "operationId": "kong_analysis_get_kong_analysis_get", "security": [ { "JWT": [] } ], "parameters": [ - { - "name": "analysis_id", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string", - "format": "uuid" - }, - { - "type": "string" - }, - { - "type": "null" - } - ], - "description": "UUID of the analysis.", - "title": "Analysis Id" - }, - "description": "UUID of the analysis." - }, { "name": "tag", "in": "query", @@ -2310,10 +2310,10 @@ "type": "null" } ], - "description": "Tag to filter by e.g. project ID", + "description": "Filter consumers by project using the project UUID", "title": "Tag" }, - "description": "Tag to filter by e.g. project ID" + "description": "Filter consumers by project using the project UUID" } ], "responses": { @@ -2343,12 +2343,10 @@ } }, "post": { - "tags": [ - "Kong" - ], - "summary": "Create And Connect Analysis To Project", + "tags": ["Kong"], + "summary": "Kong.Analysis.Create", "description": "Create a new analysis and link it to a project.", - "operationId": "create_and_connect_analysis_to_project_kong_analysis_post", + "operationId": "kong_analysis_create_kong_analysis_post", "security": [ { "JWT": [] @@ -2359,7 +2357,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Body_create_and_connect_analysis_to_project_kong_analysis_post" + "$ref": "#/components/schemas/Body_kong_analysis_create_kong_analysis_post" } } } @@ -2391,14 +2389,12 @@ } } }, - "/kong/project/{project_id}/{ds_type}/health": { + "/kong/analysis/{analysis_id}": { "get": { - "tags": [ - "Kong" - ], - "summary": "Test Connection", - "description": "Test whether Kong can read the requested data source.\n\nBecause we use the key-auth plugin, a consumer is required for pinging the data service.", - "operationId": "test_connection_kong_project__project_id___ds_type__health_get", + "tags": ["Kong"], + "summary": "Kong.Analysis.Get", + "description": "List all analyses (referred to as consumers by kong) available.", + "operationId": "kong_analysis_get_kong_analysis__analysis_id__get", "security": [ { "JWT": [] @@ -2406,33 +2402,44 @@ ], "parameters": [ { - "name": "project_id", + "name": "analysis_id", "in": "path", "required": true, "schema": { "anyOf": [ + { + "type": "string", + "format": "uuid" + }, { "type": "string" }, { - "type": "string", - "format": "uuid" + "type": "null" } ], - "description": "UUID or unique name of the project.", - "title": "Project Id" + "description": "UUID of the analysis.", + "title": "Analysis Id" }, - "description": "UUID or unique name of the project." + "description": "UUID of the analysis." }, { - "name": "ds_type", - "in": "path", - "required": true, + "name": "tag", + "in": "query", + "required": false, "schema": { - "$ref": "#/components/schemas/DataStoreType", - "description": "Either \"fhir\" or \"s3\"" + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Filter consumers by project using the project UUID", + "title": "Tag" }, - "description": "Either \"fhir\" or \"s3\"" + "description": "Filter consumers by project using the project UUID" } ], "responses": { @@ -2440,7 +2447,9 @@ "description": "Successful Response", "content": { "application/json": { - "schema": {} + "schema": { + "$ref": "#/components/schemas/ListConsumers" + } } } }, @@ -2458,16 +2467,12 @@ } } } - } - }, - "/kong/analysis/{analysis_id}": { + }, "delete": { - "tags": [ - "Kong" - ], - "summary": "Delete Analysis", + "tags": ["Kong"], + "summary": "Kong.Analysis.Delete", "description": "Delete the listed analysis.", - "operationId": "delete_analysis_kong_analysis__analysis_id__delete", + "operationId": "kong_analysis_delete_kong_analysis__analysis_id__delete", "security": [ { "JWT": [] @@ -2511,14 +2516,79 @@ } } }, - "/healthz": { + "/kong/project/{project_id}/{ds_type}/health": { "get": { - "tags": [ - "Health" + "tags": ["Kong"], + "summary": "Kong.Probe", + "description": "Test whether Kong can read the requested data source.\n\nBecause we use the key-auth plugin, a consumer is required for pinging the data service.", + "operationId": "kong_probe_kong_project__project_id___ds_type__health_get", + "security": [ + { + "JWT": [] + } ], + "parameters": [ + { + "name": "project_id", + "in": "path", + "required": true, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "format": "uuid" + } + ], + "description": "UUID or unique name of the project.", + "title": "Project Id" + }, + "description": "UUID or unique name of the project." + }, + { + "name": "ds_type", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/DataStoreType", + "description": "Either \"fhir\" or \"s3\"" + }, + "description": "Either \"fhir\" or \"s3\"" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + }, + "404": { + "description": "Not found" + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/healthz": { + "get": { + "tags": ["Health"], "summary": "Perform a Health Check", "description": "## Perform a Health Check\nEndpoint to perform a healthcheck on. This endpoint can primarily be used Docker\nto ensure a robust container orchestration and management is in place. Other\nservices which rely on proper functioning of the API service will not deploy if this\nendpoint returns any other HTTP status code except 200 (OK).\nReturns:\n HealthCheck: Returns a JSON response with the health status", - "operationId": "get_health_healthz_get", + "operationId": "health_status_get_healthz_get", "responses": { "200": { "description": "Return HTTP Status Code 200 (OK)", @@ -2527,59 +2597,228 @@ "schema": { "$ref": "#/components/schemas/HealthCheck" } - } - } - } - } - } - }, - "/health/services": { - "get": { - "tags": [ - "Health" - ], - "summary": "Perform a Health Check on the downstream microservices", - "description": "Return the health of the downstream microservices.", - "operationId": "get_health_downstream_services_health_services_get", - "responses": { - "200": { - "description": "Return HTTP Status code for downstream services", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DownstreamHealthCheck" + } + } + } + } + } + }, + "/health/services": { + "get": { + "tags": ["Health"], + "summary": "Perform a Health Check on the downstream microservices", + "description": "Return the health of the downstream microservices.", + "operationId": "health_status_services_get_health_services_get", + "responses": { + "200": { + "description": "Return HTTP Status code for downstream services", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DownstreamHealthCheck" + } + } + } + } + } + } + }, + "/token": { + "post": { + "tags": ["Auth"], + "summary": "Get a token from the IDP", + "description": "Get a JWT from the IDP by passing a valid username and password.\n\nThis token can then be used to authenticate\nyourself with this API. If no client ID/secret is provided, it will be autofilled using the hub adapter.", + "operationId": "auth_token_get_token_post", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "schema": { + "$ref": "#/components/schemas/Body_auth_token_get_token_post" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Token" + } + } + } + }, + "404": { + "description": "Not found" + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/events": { + "get": { + "tags": ["Events"], + "summary": "Events.Get", + "description": "Retrieve a selection of logged events.", + "operationId": "events_get_events_get", + "security": [ + { + "JWT": [] + } + ], + "parameters": [ + { + "name": "limit", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "description": "Maximum number of events to return", + "default": 50, + "title": "Limit" + }, + "description": "Maximum number of events to return" + }, + { + "name": "offset", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "description": "Number of events to offset by", + "title": "Offset" + }, + "description": "Number of events to offset by" + }, + { + "name": "service_name", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Filter events by service name", + "title": "Service Name" + }, + "description": "Filter events by service name" + }, + { + "name": "event_name", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Filter events by event name", + "title": "Event Name" + }, + "description": "Filter events by event name" + }, + { + "name": "username", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Filter events by username", + "title": "Username" + }, + "description": "Filter events by username" + }, + { + "name": "start_date", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "null" } - } - } + ], + "description": "Filter events by start date using ISO8601 format", + "title": "Start Date" + }, + "description": "Filter events by start date using ISO8601 format" + }, + { + "name": "end_date", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "null" + } + ], + "description": "Filter events by end date using ISO8601 format", + "title": "End Date" + }, + "description": "Filter events by end date using ISO8601 format" } - } - } - }, - "/token": { - "post": { - "tags": [ - "Auth" ], - "summary": "Get a token from the IDP", - "description": "Get a JWT from the IDP by passing a valid username and password.\n\nThis token can then be used to authenticate\nyourself with this API. If no client ID/secret is provided, it will be autofilled using the hub adapter.", - "operationId": "get_token_token_post", - "requestBody": { - "content": { - "application/x-www-form-urlencoded": { - "schema": { - "$ref": "#/components/schemas/Body_get_token_token_post" - } - } - }, - "required": true - }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Token" + "type": "array", + "items": { + "$ref": "#/components/schemas/EventLogResponse" + }, + "title": "Response Events Get Events Get" } } } @@ -2872,11 +3111,7 @@ }, "type": { "type": "string", - "enum": [ - "CODE", - "RESULT", - "TEMP" - ], + "enum": ["CODE", "RESULT", "TEMP"], "title": "Type" }, "external_id": { @@ -2987,11 +3222,7 @@ } }, "type": "object", - "required": [ - "image_url", - "analysis_id", - "registry_url" - ], + "required": ["image_url", "analysis_id", "registry_url"], "title": "AnalysisImageUrl" }, "AnalysisNode": { @@ -3015,10 +3246,7 @@ "anyOf": [ { "type": "string", - "enum": [ - "rejected", - "approved" - ] + "enum": ["rejected", "approved"] }, { "type": "null" @@ -3033,9 +3261,9 @@ "enum": [ "starting", "started", + "running", "stopping", "stopped", - "running", "finished", "failed" ] @@ -3123,43 +3351,24 @@ ], "title": "AnalysisNode" }, - "Body_accept_reject_analysis_node_analysis_nodes__analysis_node_id__post": { + "Body_auth_token_get_token_post": { "properties": { - "approval_status": { + "username": { "type": "string", - "enum": [ - "rejected", - "approved" - ], - "title": "Approval Status", - "description": "Set the approval status of project for the node. Either 'rejected' or 'approved'" - } - }, - "type": "object", - "required": [ - "approval_status" - ], - "title": "Body_accept_reject_analysis_node_analysis_nodes__analysis_node_id__post" - }, - "Body_accept_reject_project_proposal_project_nodes__project_node_id__post": { - "properties": { - "approval_status": { + "title": "Username", + "description": "Keycloak username" + }, + "password": { "type": "string", - "enum": [ - "rejected", - "approved" - ], - "title": "Approval Status", - "description": "Set the approval status of project for the node. Either 'rejected' or 'approved'" + "title": "Password", + "description": "Keycloak password" } }, "type": "object", - "required": [ - "approval_status" - ], - "title": "Body_accept_reject_project_proposal_project_nodes__project_node_id__post" + "required": ["username", "password"], + "title": "Body_auth_token_get_token_post" }, - "Body_create_analysis_po_post": { + "Body_hub_analysis_image_get_analysis_image_post": { "properties": { "analysis_id": { "anyOf": [ @@ -3207,14 +3416,36 @@ } }, "type": "object", - "required": [ - "analysis_id", - "project_id", - "node_id" - ], - "title": "Body_create_analysis_po_post" + "required": ["analysis_id", "project_id", "node_id"], + "title": "Body_hub_analysis_image_get_analysis_image_post" + }, + "Body_hub_analysis_node_update_analysis_nodes__analysis_node_id__post": { + "properties": { + "approval_status": { + "type": "string", + "enum": ["rejected", "approved"], + "title": "Approval Status", + "description": "Set the approval status of project for the node. Either 'rejected' or 'approved'" + } + }, + "type": "object", + "required": ["approval_status"], + "title": "Body_hub_analysis_node_update_analysis_nodes__analysis_node_id__post" + }, + "Body_hub_project_node_update_project_nodes__project_node_id__post": { + "properties": { + "approval_status": { + "type": "string", + "enum": ["rejected", "approved"], + "title": "Approval Status", + "description": "Set the approval status of project for the node. Either 'rejected' or 'approved'" + } + }, + "type": "object", + "required": ["approval_status"], + "title": "Body_hub_project_node_update_project_nodes__project_node_id__post" }, - "Body_create_and_connect_analysis_to_project_kong_analysis_post": { + "Body_kong_analysis_create_kong_analysis_post": { "properties": { "project_id": { "anyOf": [ @@ -3244,13 +3475,26 @@ } }, "type": "object", - "required": [ - "project_id", - "analysis_id" - ], - "title": "Body_create_and_connect_analysis_to_project_kong_analysis_post" + "required": ["project_id", "analysis_id"], + "title": "Body_kong_analysis_create_kong_analysis_post" + }, + "Body_kong_datastore_create_kong_datastore_post": { + "properties": { + "datastore": { + "$ref": "#/components/schemas/ServiceRequest", + "title": "Data store metadata.", + "description": "Required information for creating a new data store." + }, + "ds_type": { + "$ref": "#/components/schemas/DataStoreType", + "description": "Data store type. Either 's3' or 'fhir'" + } + }, + "type": "object", + "required": ["datastore", "ds_type"], + "title": "Body_kong_datastore_create_kong_datastore_post" }, - "Body_create_datastore_and_project_with_link_kong_initialize_post": { + "Body_kong_initialize_kong_initialize_post": { "properties": { "project_id": { "anyOf": [ @@ -3272,9 +3516,7 @@ "type": "array", "title": "Methods", "description": "List of acceptable HTTP methods", - "default": [ - "GET" - ] + "default": ["GET"] }, "protocols": { "items": { @@ -3283,9 +3525,7 @@ "type": "array", "title": "Protocols", "description": "List of acceptable transfer protocols. A combo of 'http', 'grpc', 'grpcs', 'tls', 'tcp'", - "default": [ - "http" - ] + "default": ["http"] }, "ds_type": { "$ref": "#/components/schemas/DataStoreType", @@ -3298,14 +3538,10 @@ } }, "type": "object", - "required": [ - "project_id", - "ds_type", - "datastore" - ], - "title": "Body_create_datastore_and_project_with_link_kong_initialize_post" + "required": ["project_id", "ds_type", "datastore"], + "title": "Body_kong_initialize_kong_initialize_post" }, - "Body_create_route_to_datastore_kong_project_post": { + "Body_kong_project_create_kong_project_post": { "properties": { "data_store_id": { "anyOf": [ @@ -3340,9 +3576,7 @@ "type": "array", "title": "Methods", "description": "List of acceptable HTTP methods", - "default": [ - "GET" - ] + "default": ["GET"] }, "protocols": { "items": { @@ -3351,9 +3585,7 @@ "type": "array", "title": "Protocols", "description": "List of acceptable transfer protocols. A combo of 'http', 'grpc', 'grpcs', 'tls', 'tcp'", - "default": [ - "http" - ] + "default": ["http"] }, "ds_type": { "$ref": "#/components/schemas/DataStoreType", @@ -3362,32 +3594,10 @@ } }, "type": "object", - "required": [ - "data_store_id", - "project_id" - ], - "title": "Body_create_route_to_datastore_kong_project_post" - }, - "Body_create_service_kong_datastore_post": { - "properties": { - "datastore": { - "$ref": "#/components/schemas/ServiceRequest", - "title": "Data store metadata.", - "description": "Required information for creating a new data store." - }, - "ds_type": { - "$ref": "#/components/schemas/DataStoreType", - "description": "Data store type. Either 's3' or 'fhir'" - } - }, - "type": "object", - "required": [ - "datastore", - "ds_type" - ], - "title": "Body_create_service_kong_datastore_post" + "required": ["data_store_id", "project_id"], + "title": "Body_kong_project_create_kong_project_post" }, - "Body_get_analysis_image_url_analysis_image_post": { + "Body_podorc_pods_create_po_post": { "properties": { "analysis_id": { "anyOf": [ @@ -3435,32 +3645,8 @@ } }, "type": "object", - "required": [ - "analysis_id", - "project_id", - "node_id" - ], - "title": "Body_get_analysis_image_url_analysis_image_post" - }, - "Body_get_token_token_post": { - "properties": { - "username": { - "type": "string", - "title": "Username", - "description": "Keycloak username" - }, - "password": { - "type": "string", - "title": "Password", - "description": "Keycloak password" - } - }, - "type": "object", - "required": [ - "username", - "password" - ], - "title": "Body_get_token_token_post" + "required": ["analysis_id", "project_id", "node_id"], + "title": "Body_podorc_pods_create_po_post" }, "CleanUpType": { "type": "string", @@ -3470,9 +3656,11 @@ "services", "mb", "rs", - "keycloak" + "keycloak", + "zombies" ], - "title": "CleanUpType" + "title": "CleanUpType", + "description": "Canned strings for cleanup endpoint" }, "CleanupPodResponse": { "properties": { @@ -3544,7 +3732,8 @@ } }, "type": "object", - "title": "CleanupPodResponse" + "title": "CleanupPodResponse", + "description": "Response model for cleanup endpoint" }, "Consumer": { "properties": { @@ -3635,10 +3824,7 @@ }, "DataStoreType": { "type": "string", - "enum": [ - "s3", - "fhir" - ], + "enum": ["s3", "fhir"], "title": "DataStoreType", "description": "Data store types." }, @@ -3667,9 +3853,7 @@ } }, "type": "object", - "required": [ - "removed" - ], + "required": ["removed"], "title": "DeleteProject", "description": "Response from disconnecting a project from a datastore." }, @@ -4448,14 +4632,51 @@ } }, "type": "object", - "required": [ - "po", - "results", - "kong" - ], + "required": ["po", "results", "kong"], "title": "DownstreamHealthCheck", "description": "Response model for downstream health checks." }, + "EventLogResponse": { + "properties": { + "id": { + "type": "integer", + "title": "Id" + }, + "event_name": { + "type": "string", + "title": "Event Name" + }, + "service_name": { + "type": "string", + "title": "Service Name" + }, + "timestamp": { + "type": "string", + "format": "date-time", + "title": "Timestamp" + }, + "body": { + "type": "string", + "title": "Body" + }, + "attributes": { + "additionalProperties": true, + "type": "object", + "title": "Attributes" + } + }, + "type": "object", + "required": [ + "id", + "event_name", + "service_name", + "timestamp", + "body", + "attributes" + ], + "title": "EventLogResponse", + "description": "Event log response model." + }, "HTTPValidationError": { "properties": { "detail": { @@ -4526,10 +4747,7 @@ } }, "type": "object", - "required": [ - "analysis_id", - "project_id" - ], + "required": ["analysis_id", "project_id"], "title": "InitializeAnalysis" }, "KeyAuth": { @@ -4630,11 +4848,7 @@ } }, "type": "object", - "required": [ - "route", - "keyauth", - "acl" - ], + "required": ["route", "keyauth", "acl"], "title": "LinkDataStoreProject" }, "LinkProjectAnalysis": { @@ -4650,11 +4864,7 @@ } }, "type": "object", - "required": [ - "consumer", - "keyauth", - "acl" - ], + "required": ["consumer", "keyauth", "acl"], "title": "LinkProjectAnalysis" }, "ListConsumers": { @@ -4801,7 +5011,8 @@ } }, "type": "object", - "title": "LogResponse" + "title": "LogResponse", + "description": "Response for log endpoint" }, "MasterImage": { "properties": { @@ -4893,10 +5104,7 @@ "anyOf": [ { "type": "string", - "enum": [ - "before", - "after" - ] + "enum": ["before", "after"] }, { "type": "null" @@ -4906,10 +5114,7 @@ } }, "type": "object", - "required": [ - "value", - "position" - ], + "required": ["value", "position"], "title": "MasterImageCommandArgument" }, "Node": { @@ -4968,10 +5173,7 @@ "anyOf": [ { "type": "string", - "enum": [ - "aggregator", - "default" - ] + "enum": ["aggregator", "default"] }, { "type": "null" @@ -5069,17 +5271,12 @@ "properties": { "type": { "type": "string", - "enum": [ - "aggregator", - "default" - ], + "enum": ["aggregator", "default"], "title": "Type" } }, "type": "object", - "required": [ - "type" - ], + "required": ["type"], "title": "NodeTypeResponse" }, "PodResponse": { @@ -5114,7 +5311,8 @@ "finished", "failed" ], - "title": "PodStatus" + "title": "PodStatus", + "description": "Custom PO run statuses." }, "Project": { "properties": { @@ -5243,10 +5441,7 @@ }, "approval_status": { "type": "string", - "enum": [ - "rejected", - "approved" - ], + "enum": ["rejected", "approved"], "title": "Approval Status" }, "comment": { @@ -5303,13 +5498,7 @@ }, "ProtocolCode": { "type": "string", - "enum": [ - "http", - "grpc", - "grpcs", - "tls", - "tcp" - ], + "enum": ["http", "grpc", "grpcs", "tls", "tcp"], "title": "ProtocolCode", "description": "Protocol codes." }, @@ -6270,10 +6459,7 @@ } }, "type": "object", - "required": [ - "host", - "path" - ], + "required": ["host", "path"], "title": "ServiceRequest", "description": "Improved version of the CreateServiceRequest with better defaults.", "examples": [ @@ -6287,9 +6473,7 @@ "protocol": "http", "read_timeout": 6000, "retries": 5, - "tags": [ - "example" - ], + "tags": ["example"], "write_timeout": 6000 } ] @@ -6343,11 +6527,7 @@ } }, "type": "object", - "required": [ - "access_token", - "token_type", - "expires_in" - ], + "required": ["access_token", "token_type", "expires_in"], "title": "Token", "description": "IDP token model." }, @@ -6377,11 +6557,7 @@ } }, "type": "object", - "required": [ - "loc", - "msg", - "type" - ], + "required": ["loc", "msg", "type"], "title": "ValidationError" } }, @@ -6398,6 +6574,10 @@ "name": "Auth", "description": "Endpoints for authorization specific tasks." }, + { + "name": "Events", + "description": "Gateway endpoints for retrieving logged events." + }, { "name": "Meta", "description": "Custom Hub Adapter endpoints which combine endpoints from other APIs." @@ -6419,4 +6599,4 @@ "description": "Gateway endpoints for the Pod Orchestration service." } ] -} \ No newline at end of file +} From 5c86669c5e9034915f5973dae20ffbfc1b071a1f Mon Sep 17 00:00:00 2001 From: Bruce Schultz Date: Mon, 26 Jan 2026 11:31:25 +0100 Subject: [PATCH 02/15] chore(events): add event page and menu link --- components/events/EventViewer.vue | 170 ++++++++++++++++++++++++++++++ components/header/MenuHeader.vue | 5 + composables/useAPIFetch.ts | 20 +++- pages/events.vue | 9 ++ 4 files changed, 199 insertions(+), 5 deletions(-) create mode 100644 components/events/EventViewer.vue create mode 100644 pages/events.vue diff --git a/components/events/EventViewer.vue b/components/events/EventViewer.vue new file mode 100644 index 0000000..c9dc7db --- /dev/null +++ b/components/events/EventViewer.vue @@ -0,0 +1,170 @@ + + + + + diff --git a/components/header/MenuHeader.vue b/components/header/MenuHeader.vue index 470abe7..d92e652 100644 --- a/components/header/MenuHeader.vue +++ b/components/header/MenuHeader.vue @@ -38,6 +38,11 @@ const items = ref([ }, ], }, + { + label: "Events", + icon: "pi pi-list", + route: "/events", + }, ]); diff --git a/composables/useAPIFetch.ts b/composables/useAPIFetch.ts index 0cd2e7e..6816070 100644 --- a/composables/useAPIFetch.ts +++ b/composables/useAPIFetch.ts @@ -1,10 +1,11 @@ import type { AnalysisNode, - BodyCreateRouteToDatastoreKongProjectPost, DeleteProject, DetailedAnalysis, + EventLogResponse, LinkDataStoreProject, ListConsumers, + ListRoutes, ListServices, Project, ProjectNode, @@ -23,6 +24,18 @@ export function useAPIFetch( }); } +// Hub endpoints +export function getEvents(opts?) { + return useAPIFetch("/events", { + ...opts, + method: "GET", + query: { + limit: 50, + offset: 0, + }, + }); +} + // Hub endpoints export function getProjectNodes(opts?) { return useAPIFetch("/project-nodes", { @@ -91,10 +104,7 @@ export function deleteDataStore(dataStoreName: string, opts?) { }); } -export function createProject( - routeProps: BodyCreateRouteToDatastoreKongProjectPost, - opts?, -) { +export function createProject(routeProps: ListRoutes, opts?) { return useAPIFetch<{ data: LinkDataStoreProject }>(`/kong/project`, { ...opts, method: "POST", diff --git a/pages/events.vue b/pages/events.vue new file mode 100644 index 0000000..817ea91 --- /dev/null +++ b/pages/events.vue @@ -0,0 +1,9 @@ + + + + + From d1f1e5d20acd5a552ba59224c5b93f30fb629fc0 Mon Sep 17 00:00:00 2001 From: Bruce Schultz Date: Mon, 26 Jan 2026 15:37:18 +0100 Subject: [PATCH 03/15] chore(events): basic filter and table --- components/events/EventViewer.vue | 182 ++++++++++++++++++++---------- components/events/FilterPanel.vue | 84 ++++++++++++++ components/header/MenuHeader.vue | 10 +- types/eventTag.ts | 26 +++++ 4 files changed, 235 insertions(+), 67 deletions(-) create mode 100644 components/events/FilterPanel.vue create mode 100644 types/eventTag.ts diff --git a/components/events/EventViewer.vue b/components/events/EventViewer.vue index c9dc7db..2dfb137 100644 --- a/components/events/EventViewer.vue +++ b/components/events/EventViewer.vue @@ -3,12 +3,19 @@ import { getEvents } from "~/composables/useAPIFetch"; import type { EventLogResponse } from "~/services/Api"; import { FilterMatchMode } from "@primevue/core/api"; import SearchBar from "~/components/table/SearchBar.vue"; +import { + EventLogLevelTag, + EventMiscTag, + EventServiceTag, + type EventTag +} from "~/types/eventTag"; +import FilterPanel from "~/components/events/FilterPanel.vue"; const events = ref(null); const dateTimeFormat = new Intl.DateTimeFormat(undefined, { dateStyle: "short", - timeStyle: "long", + timeStyle: "long" }); const filters = ref(); @@ -33,6 +40,21 @@ onMounted(() => { // } // } +function formatTag(tagName: EventTag) { + const isService = Object.values(EventServiceTag).includes(tagName); + const isLogLevel = Object.values(EventLogLevelTag).includes(tagName); + const isMisc = Object.values(EventMiscTag).includes(tagName); + if (isService) { + return { background: "#14b8a6", color: "#ffffff" }; + } else if (isLogLevel) { + return { background: "#ec4899", color: "#ffffff" }; + } else if (isMisc) { + return { backgroundColor: "#f59e0b", color: "#ffffff" }; + } else { + return { backgroundColor: "#8b5cf6", color: "#ffffff" }; + } +} + function formatEventName(eventName: string): string { const eventChunks = eventName.toUpperCase().split("."); return eventChunks.join("-"); @@ -49,7 +71,7 @@ function formatTimestamp(timestamp: string): string { // Table filters const defaultFilters = { global: { value: null, matchMode: FilterMatchMode.CONTAINS }, - approval_status: { value: null, matchMode: FilterMatchMode.EQUALS }, + approval_status: { value: null, matchMode: FilterMatchMode.EQUALS } }; filters.value = defaultFilters; @@ -58,7 +80,7 @@ function resetFilters() { const clearedFilters = {}; for (const filterKey in defaultFilters) { clearedFilters[filterKey] = { - ...defaultFilters[filterKey], + ...defaultFilters[filterKey] }; clearedFilters[filterKey].value = null; } @@ -81,74 +103,101 @@ const updateFilters = (filterText: string) => {
- +
+ +
+
- - - - - - - + + + + diff --git a/components/events/FilterPanel.vue b/components/events/FilterPanel.vue new file mode 100644 index 0000000..3f53467 --- /dev/null +++ b/components/events/FilterPanel.vue @@ -0,0 +1,84 @@ + + + + + diff --git a/components/header/MenuHeader.vue b/components/header/MenuHeader.vue index d92e652..149e004 100644 --- a/components/header/MenuHeader.vue +++ b/components/header/MenuHeader.vue @@ -22,6 +22,11 @@ const items = ref([ icon: "pi pi-lightbulb", route: "/analyses", }, + { + label: "Events", + icon: "pi pi-list", + route: "/events", + }, { label: "Data Stores", icon: "pi pi-warehouse", @@ -38,11 +43,6 @@ const items = ref([ }, ], }, - { - label: "Events", - icon: "pi pi-list", - route: "/events", - }, ]); diff --git a/types/eventTag.ts b/types/eventTag.ts new file mode 100644 index 0000000..dc851be --- /dev/null +++ b/types/eventTag.ts @@ -0,0 +1,26 @@ +export const EventServiceTag = { + Hub: "Hub", + HubAdapter: "Hub Adapter", + PodOrchestrator: "Pod Orchestrator", + Storage: "Storage", + Kong: "Kong", + Authentication: "Authentication", + Autostart: "Autostart", +}; + +export const EventLogLevelTag = { + Info: "Info", + Warning: "Warning", + Error: "Error", +}; + +export const EventMiscTag = { + UserAuth: "User Authentication Required", +}; + +export type EventServiceTag = + (typeof EventServiceTag)[keyof typeof EventServiceTag]; +export type EventLogLevelTag = + (typeof EventLogLevelTag)[keyof typeof EventLogLevelTag]; +export type EventMiscTag = (typeof EventMiscTag)[keyof typeof EventMiscTag]; +export type EventTag = EventServiceTag | EventLogLevelTag | EventMiscTag; From 57d0291ba3a8987817e5c6b952751728a5d7879d Mon Sep 17 00:00:00 2001 From: Bruce Schultz Date: Tue, 27 Jan 2026 11:12:33 +0100 Subject: [PATCH 04/15] chore(events): update api to include event metadata --- services/Api.ts | 38 ++++++++++++++++---- services/hub_adapter_swagger.json | 58 ++++++++++++++++++++++++------- 2 files changed, 78 insertions(+), 18 deletions(-) diff --git a/services/Api.ts b/services/Api.ts index 86bf2cf..85ff6ec 100644 --- a/services/Api.ts +++ b/services/Api.ts @@ -256,9 +256,9 @@ export interface AnalysisNode { run_status: | "starting" | "started" - | "running" | "stopping" | "stopped" + | "running" | "finished" | "failed" | null; @@ -830,10 +830,10 @@ export interface DownstreamHealthCheck { } /** - * EventLogResponse + * EventLog * Event log response model. */ -export interface EventLogResponse { +export interface EventLog { /** Id */ id: number; /** Event Name */ @@ -851,6 +851,17 @@ export interface EventLogResponse { attributes: Record; } +/** + * EventLogResponse + * Event log response model. + */ +export interface EventLogResponse { + /** Data */ + data: EventLog[]; + /** Event log metadata model. */ + meta: Meta; +} + /** HTTPValidationError */ export interface HTTPValidationError { /** Detail */ @@ -1027,6 +1038,21 @@ export interface MasterImageCommandArgument { position: "before" | "after" | null; } +/** + * Meta + * Event log metadata model. + */ +export interface Meta { + /** Count */ + count: number; + /** Total */ + total: number; + /** Limit */ + limit: number; + /** Offset */ + offset: number; +} + /** Node */ export interface Node { /** External Name */ @@ -1644,7 +1670,7 @@ export enum ContentType { } export class HttpClient { - public baseUrl: string = "/api"; + public baseUrl: string = ""; private securityData: SecurityDataType | null = null; private securityWorker?: ApiConfig["securityWorker"]; private abortControllers = new Map(); @@ -1850,7 +1876,6 @@ export class HttpClient { * @title FLAME API * @version 0.1.0 * @license Apache 2.0 (https://www.apache.org/licenses/LICENSE-2.0.html) - * @baseUrl /api * * FLAME project API for interacting with various microservices within the node for the UI. */ @@ -3075,6 +3100,7 @@ export class Api< /** * Offset * Number of events to offset by + * @default 0 */ offset?: number | null; /** @@ -3105,7 +3131,7 @@ export class Api< }, params: RequestParams = {}, ) => - this.request({ + this.request({ path: `/events`, method: "GET", query: query, diff --git a/services/hub_adapter_swagger.json b/services/hub_adapter_swagger.json index 213b656..b9377ae 100644 --- a/services/hub_adapter_swagger.json +++ b/services/hub_adapter_swagger.json @@ -10,11 +10,6 @@ }, "version": "0.1.0" }, - "servers": [ - { - "url": "/api" - } - ], "paths": { "/po": { "post": { @@ -2711,6 +2706,7 @@ } ], "description": "Number of events to offset by", + "default": 0, "title": "Offset" }, "description": "Number of events to offset by" @@ -2814,11 +2810,7 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EventLogResponse" - }, - "title": "Response Events Get Events Get" + "$ref": "#/components/schemas/EventLogResponse" } } } @@ -3261,9 +3253,9 @@ "enum": [ "starting", "started", - "running", "stopping", "stopped", + "running", "finished", "failed" ] @@ -4636,7 +4628,7 @@ "title": "DownstreamHealthCheck", "description": "Response model for downstream health checks." }, - "EventLogResponse": { + "EventLog": { "properties": { "id": { "type": "integer", @@ -4674,6 +4666,24 @@ "body", "attributes" ], + "title": "EventLog", + "description": "Event log response model." + }, + "EventLogResponse": { + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/EventLog" + }, + "type": "array", + "title": "Data" + }, + "meta": { + "$ref": "#/components/schemas/Meta" + } + }, + "type": "object", + "required": ["data", "meta"], "title": "EventLogResponse", "description": "Event log response model." }, @@ -5117,6 +5127,30 @@ "required": ["value", "position"], "title": "MasterImageCommandArgument" }, + "Meta": { + "properties": { + "count": { + "type": "integer", + "title": "Count" + }, + "total": { + "type": "integer", + "title": "Total" + }, + "limit": { + "type": "integer", + "title": "Limit" + }, + "offset": { + "type": "integer", + "title": "Offset" + } + }, + "type": "object", + "required": ["count", "total", "limit", "offset"], + "title": "Meta", + "description": "Event log metadata model." + }, "Node": { "properties": { "external_name": { From 6639ffe9c7682c0e30850ba63b1e254a6147bc91 Mon Sep 17 00:00:00 2001 From: Bruce Schultz Date: Tue, 27 Jan 2026 11:12:44 +0100 Subject: [PATCH 05/15] feat(events): working filters on events --- components/events/EventViewer.vue | 97 ++++++++++++++++++++++--------- components/events/FilterPanel.vue | 20 +++---- composables/useAPIFetch.ts | 2 +- 3 files changed, 79 insertions(+), 40 deletions(-) diff --git a/components/events/EventViewer.vue b/components/events/EventViewer.vue index 2dfb137..ce9b446 100644 --- a/components/events/EventViewer.vue +++ b/components/events/EventViewer.vue @@ -1,29 +1,30 @@