From 716f90fc85f37ed56b7eabfe1ae3079a40d7f318 Mon Sep 17 00:00:00 2001 From: this-Aditya Date: Wed, 21 Aug 2024 17:30:05 +0530 Subject: [PATCH] Added configs and types for mp projects fetching --- config/github-config.ts | 5 +++++ utils/structures.ts | 13 +++++++++++++ 2 files changed, 18 insertions(+) diff --git a/config/github-config.ts b/config/github-config.ts index 1258bf4..9ab4ff3 100644 --- a/config/github-config.ts +++ b/config/github-config.ts @@ -22,3 +22,8 @@ export const REMOTE_DEFINITIONS_CONFIG = { ELIGIBILITY_DEFINITION_FILE_NAME_CONTENT: 'eligibility', STUDY_INFO_DEFINITION_FILE_NAME_CONTENT: 'study_info' } + +export const MP_CONFIG = { + BASE_URL: process.env.MP_CONFIG_BASE_URL || 'http://127.0.1.1:8080/managementportal/api', + PROJECTS_ENDPOINT: process.env.MP_PROJECTS_ENDPOINT || 'public/projects', +} diff --git a/utils/structures.ts b/utils/structures.ts index ab1a209..10f314f 100644 --- a/utils/structures.ts +++ b/utils/structures.ts @@ -23,3 +23,16 @@ export type Definition = { matrix_ranking: string; field_annotation: string; }; + +export type Project = { + projectName?: string; + description?: string; + sourceTypes: SourceType[]; +} + +export type SourceType = { + id: number; + model?: string; + producer?: string; + catalogVersion?: string; +}