From b285bfe474be665a8724617c426c3e2cd93b2ceb Mon Sep 17 00:00:00 2001 From: Leah Tacke genannt Unterberg <leah.tgu@pads.rwth-aachen.de> Date: Tue, 15 Oct 2024 17:26:10 +0200 Subject: [PATCH] almost supporting foreign key mappings --- src/components/ExportView.vue | 10 +- src/components/MapView.vue | 76 ++++- src/components/helpers/FkRelationMapper.vue | 18 + src/components/helpers/ReadinessPoller.vue | 2 +- src/components/helpers/TimePointInput.vue | 2 +- src/components/helpers/TimeRangeInput.vue | 14 +- .../subcomponents/map/AttributeSelector.vue | 1 - .../subcomponents/map/MappingsTable.vue | 2 +- .../map/RelationsColumnMapper.vue | 169 ++++++++++ .../subcomponents/transform/ExtractJson.vue | 32 +- .../subcomponents/transform/SimpleWhere.vue | 8 +- .../subcomponents/transform/TimeFilter.vue | 4 +- .../subcomponents/view/DBTreeView.vue | 17 +- .../subcomponents/view/TableDetails.vue | 3 +- src/services/api-schema/openapi.d.ts | 310 ++++++++++-------- src/services/api-schema/openapi.json | 2 +- src/services/api-schema/openapi.yaml | 137 +++++--- src/services/api.ts | 10 +- src/services/exportStore.ts | 14 +- src/services/mappingStore.ts | 8 +- src/services/mappingUtils.ts | 11 + .../preset-definitions/synthetic-preset.json | 97 +++--- 22 files changed, 652 insertions(+), 295 deletions(-) create mode 100644 src/components/helpers/FkRelationMapper.vue create mode 100644 src/components/subcomponents/map/RelationsColumnMapper.vue create mode 100644 src/services/mappingUtils.ts diff --git a/src/components/ExportView.vue b/src/components/ExportView.vue index 6a17aef..9851d84 100644 --- a/src/components/ExportView.vue +++ b/src/components/ExportView.vue @@ -80,7 +80,8 @@ async function pollExport(url: string) { In "Save Export" mode, a download link is generated by the server that in theory allows anyone with the link to access the created export file. - In contrast, by selecting the "Download Directly" mode, the resulting export file is part of the response and + In contrast, by selecting the "Download Directly" mode, the resulting export file is part of the response + and immediately downloaded without being written to disk on the backend server. In terms of security, no guarantees can be made in either case due to the insecure nature of unauthenticated @@ -112,13 +113,16 @@ async function pollExport(url: string) { :time-limit="Duration.fromMillis(2 * 60 * 1000)" :poll-interval="5 * 1000" :interval-notches="5" stop-on-positive-poll></ReadinessPoller> <v-list-item-action end> - <v-btn density="default" variant="text" icon="mdi-download" :href="item.download_url"> + <v-btn density="default" variant="text"> + <a target="_blank" :href="item.download_url"> + <v-icon color="primary" size="large">mdi-download</v-icon> + </a> </v-btn> </v-list-item-action> <v-list-item-action end> <v-btn density="default" variant="text"> <a target="_blank" :href="item.share_url"> - <v-icon color="primary">mdi-share</v-icon> + <v-icon color="primary" size="large">mdi-share</v-icon> </a> </v-btn> </v-list-item-action> diff --git a/src/components/MapView.vue b/src/components/MapView.vue index 39b02b9..ce899ad 100644 --- a/src/components/MapView.vue +++ b/src/components/MapView.vue @@ -12,13 +12,14 @@ import MappingsTable from "@/components/subcomponents/map/MappingsTable.vue"; import {ConceptMappingEntry, useMappingStore} from "@/services/mappingStore"; import InfoDialog from "@/components/helpers/InfoDialog.vue"; import {anyTIDtoTID, harmonizeToObj, rules} from "@/services/utils"; - +import RelationsColumnMapper from "@/components/subcomponents/map/RelationsColumnMapper.vue"; +import {ForeignRelationMappings, WithinTableMappings} from "@/services/mappingUtils" const selection = useSelectionStore() const mappings = useMappingStore() const {selectedMitM, selectedMitMDef, selectedTable} = storeToRefs(selection) -const formvalidity = reactive({identityCols: false, inlineCols: false}) +const formvalidity = reactive({identityCols: false, inlineCols: false, fkRelationCols: false}) const loading = ref(false) const dialog = reactive({show: false, success: false, content: "", title: "Mapping Validation"}) @@ -27,9 +28,9 @@ const recreatedMapping = ref<ConceptMapping>(null) const concept = ref<string>(null) const typeCol = ref<string>() const kindCol = ref<string>() -const idCols = ref({} as { [key: string]: ExtendedColumnListItem }) -const inlineCols = ref({} as { [key: string]: ExtendedColumnListItem }) -const toOneCols = ref({}) +const idCols = ref({} as WithinTableMappings) +const inlineCols = ref({} as WithinTableMappings) +const foreignRelationMappings = ref({} as ForeignRelationMappings) const attributeCols = ref({} as { [key: string]: { selected: boolean, declaredType: MitMDataType } }) const {columnList} = useColumnsOfTableWithProbe(selectedTable) @@ -102,13 +103,43 @@ function suggestInlineColMap(columns?: ExtendedColumnListItem[]) { return suggestColMap(columns, colMap) } +function suggestFKColMaps(columns?: ExtendedColumnListItem[]): { + [fkRelName: string]: { [nameToMap: string]: ExtendedColumnListItem } +} { + if (!!recreatedMapping.value) return Object.fromEntries(Object.entries(recreatedMapping.value.foreign_relations).map(([fkRelName, fkRel]) => [fkRelName, suggestColMap(columns, harmonizeToObj(fkRel.fk_columns))])) + const mitmDef = selectedMitMDef.value + const toOne = currentConceptRelations.value?.to_one + if (!toOne || !mitmDef) return {} + else + return Object.fromEntries(Object.entries(toOne).map(([fkRelName, fkRelInfo]) => [fkRelName, suggestColMap(columns, Object.fromEntries(Object.entries(fkRelInfo.fk_relations).map(([nameToMap, targetCol]) => [nameToMap, mitmDef.concept_relations[fkRelInfo.target_concept].identity[targetCol]])))])) +} + +function suggestFKTables(): { [fkRelName: string]: TableIdentifier | null } { + if (!!recreatedMapping.value) return Object.fromEntries(Object.entries(recreatedMapping.value.foreign_relations).map(([fkRelName, fkRel]) => [fkRelName, anyTIDtoTID(fkRel.referred_table)])) + const toOne = currentConceptRelations.value?.to_one + if (!toOne) return {} + else return Object.fromEntries(Object.entries(toOne).map(([fkRelName, fkRelInfo]) => { + const matchingTable = mappings.currentMappings.find(cme => cme.mapping.concept === fkRelInfo.target_concept)?.mapping.base_table + return [fkRelName, !!matchingTable ? matchingTable : null] + })) +} + +function suggestForeignRelationsMappings(columns?: ExtendedColumnListItem[]): ForeignRelationMappings { + const suggestedColMaps = suggestFKColMaps(columns) + const suggestedFKTables = suggestFKTables() + return Object.fromEntries(Object.keys(suggestedColMaps).map(fkRelName => [fkRelName, { + fk_columns: suggestedColMaps[fkRelName], + referred_table: ref(suggestedFKTables[fkRelName]) + }])) +} + function suggestAttributeColMap(columns?: ExtendedColumnListItem[], preselect?) { if (!!recreatedMapping.value?.attributes) { const attributes = recreatedMapping.value.attributes - const attributeDtypes = recreatedMapping.value.attribute_dtypes + const attributeDTypes = recreatedMapping.value.attribute_dtypes return Object.fromEntries(columns.map((item) => { const attributeIndex = attributes.indexOf(item.name) - const dt = attributeIndex >= 0 ? attributeDtypes.at(attributeIndex) : null + const dt = attributeIndex >= 0 ? attributeDTypes.at(attributeIndex) : null return [item.name, {selected: attributeIndex >= 0, declaredType: dt}] })) } else @@ -126,9 +157,9 @@ watch([columnList, currentConceptRelations], () => { kindCol.value = suggestKindCol(columns)?.name idCols.value = suggestIdColMap(columns) inlineCols.value = suggestInlineColMap(columns) - const wasPreviouslySuggested = c => (c === typeCol.value || c === kindCol.value || Object.values(idCols.value).some(item => c === item.name) || Object.values(inlineCols.value).some(item => c === item.name)) + foreignRelationMappings.value = suggestForeignRelationsMappings(columns) + const wasPreviouslySuggested = c => (c === typeCol.value || c === kindCol.value || Object.values(idCols.value).some(item => c === item.name) || Object.values(inlineCols.value).some(item => c === item.name) || Object.values(foreignRelationMappings.value).some(fkMapping => Object.values(fkMapping.fk_columns).some(item => c === item.name))) attributeCols.value = suggestAttributeColMap(columns, colItem => !wasPreviouslySuggested(colItem.name)) - }, {flush: "post"}) @@ -137,12 +168,19 @@ async function onSubmit() { const identity_columns = {} const inline_relations = {} + const foreign_relations: { [fkRelName: string]: Mappings.ForeignRelation } = {} Object.entries(idCols.value).forEach(([name, colItem]) => { identity_columns[name] = colItem.name }) Object.entries(inlineCols.value).forEach(([name, colItem]) => { inline_relations[name] = colItem.name }) + Object.entries(foreignRelationMappings.value).forEach(([fkRelName, fkMapping]) => { + foreign_relations[fkRelName] = { + fk_columns: Object.fromEntries(Object.entries(fkMapping.fk_columns).map(([nameToMap, col]) => [nameToMap, col.name])), + referred_table: fkMapping.referred_table + } + }) const attributes = [] const attribute_dtypes = [] @@ -160,6 +198,7 @@ async function onSubmit() { type_col: typeCol.value, identity_columns, inline_relations, + ...Object.keys(foreign_relations).length > 0 && {foreign_relations}, ...(currentConceptProperties.value?.permit_attributes && attributes.length > 0 && { attributes, attribute_dtypes @@ -227,7 +266,8 @@ function recreate(cmEntry: ConceptMappingEntry) { </template> <template v-if="!!currentConceptRelations && Object.keys(currentConceptRelations.identity).length > 0"> - <InlineColumnMapper class="ma-2 pa-2" title="Identity Columns" :mitm-def="selectedMitMDef" + <InlineColumnMapper class="ma-2 pa-2" title="Identity Columns" + :mitm-def="selectedMitMDef" :to-map="currentConceptRelations?.identity" :column-list="columnList" v-model:mapped-columns="idCols" @@ -238,11 +278,23 @@ function recreate(cmEntry: ConceptMappingEntry) { <template v-if="!!currentConceptRelations && Object.keys(currentConceptRelations.inline).length > 0"> <InlineColumnMapper class="ma-2 pa-2" title="Inline Relations Columns" :mitm-def="selectedMitMDef" :to-map="currentConceptRelations?.inline" - :column-list="columnList" v-model:mapped-columns="inlineCols" + :column-list="columnList" + v-model:mapped-columns="inlineCols" v-model:is-valid="formvalidity.inlineCols" :readonly="!!recreatedMapping"></InlineColumnMapper> </template> + <template v-if="!!currentConceptRelations && Object.keys(currentConceptRelations.to_one).length > 0"> + <RelationsColumnMapper class="ma-2 pa-2" title="Foreign Relations" + :mitm-def="selectedMitMDef" + :base-table="selectedTable" + :to-map="currentConceptRelations?.to_one" + :column-list="columnList" + v-model:foreign-relations="foreignRelationMappings" + v-model:is-valid="formvalidity.fkRelationCols" + :readonly="!!recreatedMapping"></RelationsColumnMapper> + </template> + <template v-if="currentConceptProperties?.permit_attributes"> <AttributeSelector class="ma-2 pa-2" :column-list="columnList" v-model="attributeCols" :readonly="!!recreatedMapping"></AttributeSelector> @@ -250,7 +302,7 @@ function recreate(cmEntry: ConceptMappingEntry) { <v-card-actions> <v-spacer></v-spacer> - <v-btn class="me-auto" :disabled="!recreatedMapping" @click.stop="recreatedMapping = null">Edit</v-btn> + <v-btn class="me-auto" :disabled="!recreatedMapping" @click.stop="recreatedMapping = null">Copy</v-btn> <v-btn :disabled="!isValid" type="submit">Verify</v-btn> </v-card-actions> </v-form> diff --git a/src/components/helpers/FkRelationMapper.vue b/src/components/helpers/FkRelationMapper.vue new file mode 100644 index 0000000..d42c397 --- /dev/null +++ b/src/components/helpers/FkRelationMapper.vue @@ -0,0 +1,18 @@ +<script setup lang="ts"> + +</script> + +<template> + + <div class="inline-flex"> + + + </div> + +<v-table density="compact"> +</v-table> +</template> + +<style scoped> + +</style> diff --git a/src/components/helpers/ReadinessPoller.vue b/src/components/helpers/ReadinessPoller.vue index d32b8cf..3f02235 100644 --- a/src/components/helpers/ReadinessPoller.vue +++ b/src/components/helpers/ReadinessPoller.vue @@ -121,7 +121,7 @@ onUnmounted(() => stopPoll()) <template> <div> - <v-progress-circular :model-value="untilRefreshProgress"></v-progress-circular> + <v-progress-circular :model-value="untilRefreshProgress" :indeterminate="isPolling"></v-progress-circular> <template v-if="props.withStatus"> <v-icon class="mx-2" :icon="statusIcon"></v-icon> </template> diff --git a/src/components/helpers/TimePointInput.vue b/src/components/helpers/TimePointInput.vue index b3f2a03..9234380 100644 --- a/src/components/helpers/TimePointInput.vue +++ b/src/components/helpers/TimePointInput.vue @@ -6,7 +6,7 @@ import {DateTime, IANAZone, Zone} from "luxon"; const datetime = defineModel({type: DateTime, required: false, default: null}) const props = defineProps({"timezone": Zone, default: IANAZone.create("Europe/Berlin"), required: false}) const date = ref() -const time = ref() +const time = ref("00:00:00") watch([date, time], ([d, t]) => { if (!d || !t) datetime.value = null diff --git a/src/components/helpers/TimeRangeInput.vue b/src/components/helpers/TimeRangeInput.vue index 63f7edc..7271784 100644 --- a/src/components/helpers/TimeRangeInput.vue +++ b/src/components/helpers/TimeRangeInput.vue @@ -2,13 +2,14 @@ import {reactive, ref, watch} from "vue"; import {DateTime, IANAZone, Zone} from "luxon"; +import {rules} from "@/services/utils" const startDateTime = defineModel("startDateTime", {type: DateTime, required: false, default: null}) -const endDateTime = defineModel("endDateTime", {type: DateTime, required: false, default:null}) +const endDateTime = defineModel("endDateTime", {type: DateTime, required: false, default: null}) const props = defineProps({"timezone": Zone, default: IANAZone.create("Europe/Berlin"), required: false}) const dateRange = ref() -const startTime = ref() -const endTime = ref() +const startTime = ref("00:00:00") +const endTime = ref("00:00:00") watch([dateRange, startTime, endTime], ([dr, st, et]) => { if (!!dr && dr.length >= 1) { @@ -37,7 +38,8 @@ const menus = reactive({startPicker: false, endPicker: false}) <v-row no-gutters class="d-flex flex-nowrap" justify="start"> <v-col cols="3" class="ma-2"> - <v-date-input v-model="dateRange" multiple="range" label="Select range"></v-date-input> + <v-date-input v-model="dateRange" multiple="range" label="Select range" :rules="[rules.required]" + validate-on="input lazy"></v-date-input> </v-col> <v-col cols="4" class="ma-2"> <v-text-field @@ -47,6 +49,8 @@ const menus = reactive({startPicker: false, endPicker: false}) label="Time on start day" prepend-icon="mdi-clock-time-four-outline" readonly + :rules="[rules.required]" + validate-on="input lazy" > <v-menu v-model="menus.startPicker" @@ -71,6 +75,8 @@ const menus = reactive({startPicker: false, endPicker: false}) label="Time on end day" prepend-icon="mdi-clock-time-four-outline" readonly + :rules="[rules.required]" + validate-on="input lazy" > <v-menu v-model="menus.endPicker" diff --git a/src/components/subcomponents/map/AttributeSelector.vue b/src/components/subcomponents/map/AttributeSelector.vue index b9e09d0..94fa5ed 100644 --- a/src/components/subcomponents/map/AttributeSelector.vue +++ b/src/components/subcomponents/map/AttributeSelector.vue @@ -31,7 +31,6 @@ const {mitmTypes} = useMitMTypes() </tr> </thead> <tbody> - <template v-for="item in props.columnList" v-if="!!attributeDeclarations"> <template v-if="item.name in attributeDeclarations"> <tr> diff --git a/src/components/subcomponents/map/MappingsTable.vue b/src/components/subcomponents/map/MappingsTable.vue index 5634745..2189e6c 100644 --- a/src/components/subcomponents/map/MappingsTable.vue +++ b/src/components/subcomponents/map/MappingsTable.vue @@ -38,7 +38,7 @@ const mappingsHeaders = [ const mappingItems = ref([]) -watch(currentMappings, cms => { +watch(currentMappings.value, cms => { mappingItems.value = cms.map((cm, i) => ({ mitm: cm.mapping.mitm, concept: cm.mapping.concept, diff --git a/src/components/subcomponents/map/RelationsColumnMapper.vue b/src/components/subcomponents/map/RelationsColumnMapper.vue new file mode 100644 index 0000000..ec00bac --- /dev/null +++ b/src/components/subcomponents/map/RelationsColumnMapper.vue @@ -0,0 +1,169 @@ +<script setup lang="ts"> + +import {ExtendedColumnListItem} from "@/services/convenienceStore"; +import {Mappings, MitMDataType, MitMDefinition, TableIdentifier} from "@/services/api"; +import {ref, watchEffect} from "vue"; +import {useMappingStore} from "@/services/mappingStore"; +import {storeToRefs} from "pinia"; +import TableSelector from "@/components/helpers/TableSelector.vue"; +import {useMainStore} from "@/services/mainStore"; +import {rules} from "@/services/utils" +import {ForeignRelationMappings} from "@/services/mappingUtils" + + +const store = useMainStore() +const {currentMappings} = storeToRefs(useMappingStore()) + +const props = defineProps<{ + mitmDef: MitMDefinition, + toMap: Mappings.ForeignRelationDefs, + columnList: ExtendedColumnListItem[], + baseTable: TableIdentifier, + title: string, + readonly?: boolean +}>() + +const foreignRelations = defineModel<ForeignRelationMappings>('foreignRelations', {required: true}) +const isValid = defineModel('isValid', {type: Boolean, default: false, required: false}) +const fkValidity = ref({requiredMappingExistence: {}, fkExistence: {}}) +const overrides = ref({}) + +const fkRelationTargets = ref({}) + +watchEffect(() => { + console.log("Attempting update") + console.log(props.toMap, foreignRelations.value) + const frs = foreignRelations.value + let temp = {} + if (!!props.toMap && !!props.mitmDef && !!frs && Object.keys(frs).every(fkRelName => fkRelName in props.toMap)) + temp = Object.fromEntries(Object.keys(foreignRelations.value).map(fkRelName => { + const fkRelInfo = props.toMap[fkRelName] + const targetIdentity = props.mitmDef.concept_relations[fkRelInfo.target_concept].identity + const targetConcepts = Object.values(fkRelInfo.fk_relations).map(targetColName => targetIdentity[targetColName]) + const targetTypes = targetConcepts.map(getRequiredType) + const namesToMap = Object.keys(fkRelInfo.fk_relations) + return [fkRelName, { + targetConcept: fkRelInfo.target_concept, + fkLength: namesToMap.length, + namesToMap, + targetConcepts, + targetTypes + }] + })) + console.log(temp) + console.log(foreignRelations) + fkRelationTargets.value = temp +}) + +//watch(props.toMap, (v) => { +// overrides.value = !!v ? Object.fromEntries(Object.keys(v).map(fkRelName => [fkRelName, ref([])])) : {} +//}) + +//watch(props.columnList, () => { +// overrides.value = [] +//}) +// +//watchEffect(() => { +// const toSkip = overrides.value +// const fkrs = foreignRelations.value +// if (!toSkip || !fkrs) isValid.value = false +// else +// isValid.value = Object.entries(fkrs).map(([fkRelName, fkMapping]) => Object.entries(fkMapping.fk_columns) +// .filter(([nameToMap]) => !toSkip[fkRelName]?.some(n => n === nameToMap)) +// .every(([nameToMap, selectedCol]) => fkRelationTargets[fkRelName].targetTypes[nameToMap] === selectedCol.inferredType)) +//}) + +//watchEffect(() => { +// // check for existence of required concept mapping of selected table, and check for regular FK relation +// const fkrs = foreignRelations.value +// const baseTable = props.baseTable +// const tm: TableMetaInfoResponse = store.getTableMeta(baseTable) +// let temp = {requiredMappingExistence: {}, fkExistence: {}} +// if (!!fkrs && !!baseTable && !!tm) { +// const requiredMappingExistence = Object.entries(fkrs).map(([fkRelName, fkMapping]) => +// currentMappings.some(cme => cme.mapping.concept === fkRelationTargets[fkRelName].targetConcept && cme.mapping.base_table === fkMapping.referred_table) +// ) +// const fkExistence = Object.entries(fkrs) +// .map(([fkRelName, fkMapping]) => baseTable.source === fkMapping.referred_table.source +// && tm.foreign_key_constraints.some(fkc => +// fkc.target_table.schema === fkMapping.referred_table.schema && fkc.target_table.name === fkMapping.referred_table.name)) +// temp = {requiredMappingExistence, fkExistence} +// } +// fkValidity.value = temp +//}) + +function getRequiredType(concept: string): MitMDataType { + return props.mitmDef.weak_concepts[concept] +} + +</script> + +<template> + <v-card :title="props.title" variant="flat" :border="isValid ? null : 'lg error'"> + <v-table density="compact"> + <thead> + <tr> + <th>Relation</th> + <th>Target Concept</th> + <th>Target Table</th> + <th>Target Column</th> + <th>Target Column Concept</th> + <th>Selected Column</th> + <th>Actual SQL Type</th> + <th>Inferred Type</th> + <th>Required Type</th> + <th>Ignore Type Check?</th> + </tr> + </thead> + <tbody> + <template v-for="(fkRelTargets, fkRelName, i) in fkRelationTargets" v-if="!!fkRelationTargets" :key="fkRelName"> + <template v-for="(nameToMap, i) in fkRelTargets.namesToMap" v-if="fkRelName in foreignRelations" :key="nameToMap"> + <tr> + <template v-if="i == 0"> + <td :rowspan="fkRelTargets.fkLength">{{ fkRelName }}</td> + <td :rowspan="fkRelTargets.fkLength">{{ fkRelTargets.targetConcept }}</td> + <td :rowspan="fkRelTargets.fkLength"> + <TableSelector :selected-table="foreignRelations[fkRelName].referred_table" + source-d-b="either" :rules="[rules.required]" :disabled="props.readonly"></TableSelector> + <v-chip-group> + <v-chip v-if="fkValidity.fkExistence[fkRelName]" color="orange" text="No FK to table exists" + size="small"></v-chip> + <v-chip v-if="fkValidity.requiredMappingExistence[fkRelName]" color="error" text="Table not mapped" + size="small"></v-chip> + </v-chip-group> + </td> + </template> + <td>{{ nameToMap }}</td> + <td>{{ fkRelTargets.targetConcepts[i] }}</td> + <td> + <v-select :items="props.columnList" v-model="foreignRelations[fkRelName].fk_columns[nameToMap]" + return-object variant="plain" + :rules="[rules.required]" + :disabled="props.readonly"> + </v-select> + </td> + <td> + {{ foreignRelations[fkRelName]?.fk_columns[nameToMap]?.sqlType }} + </td> + <td> + <v-chip + :color="fkRelTargets.targetTypes[i] === foreignRelations[fkRelName]?.fk_columns[nameToMap]?.inferredType ? 'green' : 'red'"> + {{ foreignRelations[fkRelName]?.fk_columns[nameToMap]?.inferredType }} + </v-chip> + </td> + <td>{{ fkRelTargets.targetTypes[i] }}</td> + <td> + <v-checkbox-btn v-model="overrides[fkRelName]" :value="nameToMap"></v-checkbox-btn> + </td> + </tr> + </template> + </template> + </tbody> + </v-table> + </v-card> + +</template> + +<style scoped> + +</style> diff --git a/src/components/subcomponents/transform/ExtractJson.vue b/src/components/subcomponents/transform/ExtractJson.vue index 51edb2c..b2284b0 100644 --- a/src/components/subcomponents/transform/ExtractJson.vue +++ b/src/components/subcomponents/transform/ExtractJson.vue @@ -18,6 +18,7 @@ const tab = ref("samples") const jsonCol = ref<ExtendedColumnListItem>(null) const jsonSamples = ref([] as string[]) const jsonSchema = ref<string>(null) +const unpackSuggestionFromSample = ref<boolean>(true) const extractionPaths = ref([]) @@ -50,14 +51,21 @@ watchEffect(() => { }) -function addPath() { - extractionPaths.value.push({controls: "", colName: ref(""), path: ref("")}) +function addPath(defaults = {colName: "", path: ""}) { + extractionPaths.value.push({controls: "", colName: ref(defaults.colName), path: ref(defaults.path)}) } function removePath(index) { extractionPaths.value.splice(index, 1) } +function generateAttributes() { + const col = jsonCol.value + if (!!col.sampleSummary.json_schema) { + col.sampleSummary.json_schema["required"]?.forEach(v => addPath({colName: v, path: v})) + } +} + function createTransforms(): Transforms.Transform[] { const baseCol = jsonCol.value; if (!!baseCol && !!extractionPaths.value) { @@ -120,7 +128,25 @@ defineExpose({createTransforms, resetAll}) </v-data-table-virtual> </v-tabs-window-item> <v-tabs-window-item value="schema" key="schema"> - <div class="ma-2 text-body-2">{{ jsonToPrettyStr(jsonSchema) }}</div> + + <v-textarea readonly :model-value="jsonToPrettyStr(jsonSchema)"> + </v-textarea> + + <div class="d-inline-flex align-center"> + <strong>Generate Attributes</strong> + <v-switch class="ms-4" v-model="unpackSuggestionFromSample" + :label="unpackSuggestionFromSample ? 'Use Sample' : 'Query All'" hide-details + inline></v-switch> + <v-tooltip> + <template v-slot:activator="{props}"> + <v-btn variant="text" class="mx-2" v-bind="props" icon="mdi-help-circle-outline"></v-btn> + </template> + <template v-slot:default> + {{ "Querying all rows instead of using the small sample may take very long." }} + </template> + </v-tooltip> + <v-btn variant="flat" @click.stop="generateAttributes">Unpack All Required Attributes</v-btn> + </div> </v-tabs-window-item> </v-tabs-window> </v-col> diff --git a/src/components/subcomponents/transform/SimpleWhere.vue b/src/components/subcomponents/transform/SimpleWhere.vue index d212547..d2bed45 100644 --- a/src/components/subcomponents/transform/SimpleWhere.vue +++ b/src/components/subcomponents/transform/SimpleWhere.vue @@ -57,12 +57,12 @@ defineExpose({ <v-col class="ma-2" cols="3"> <v-select :items="columnList" v-model="form.lhs" label="LHS Column" :rules="[rules.required]" - validate-on="input lazy"></v-select> + validate-on="invalid-input eager"></v-select> </v-col> <v-col class="ma-2" cols="2"> <v-combobox v-model="form.op" :items="sqlOps" label="Comparator" :rules="[rules.required]" - validate-on="input lazy" variant="plain"></v-combobox> + validate-on="invalid-input eager" variant="plain"></v-combobox> </v-col> <v-col class="ma-2" cols="2"> @@ -75,14 +75,14 @@ defineExpose({ <v-text-field label="RHS Value" v-model="form.rhs.value"></v-text-field> <v-select label="RHS Data Type" :items="mitmTypes" v-model="form.rhs.type" return-object :rules="[rules.required]" - validate-on="input lazy" variant="plain"></v-select> + validate-on="invalid-input eager" variant="plain"></v-select> </v-col> </template> <template v-else> <v-col class="ma-2" cols="3"> <v-select v-model="form.rhs.col" :items="columnList" label="RHS Column" :rules="[rules.required]" - validate-on="input lazy"></v-select> + validate-on="invalid-input eager"></v-select> </v-col> </template> </v-row> diff --git a/src/components/subcomponents/transform/TimeFilter.vue b/src/components/subcomponents/transform/TimeFilter.vue index 2820ca2..7cabe8e 100644 --- a/src/components/subcomponents/transform/TimeFilter.vue +++ b/src/components/subcomponents/transform/TimeFilter.vue @@ -37,7 +37,7 @@ const dateTimeRange = reactive({startDateTime: null as DateTime, endDateTime: nu watchEffect(() => { const dtCol = dateTimeCol.value const comp = comparator.value - isValid.value = !!dtCol && !!dateTimePoint || (comp === "between" && !!dateTimeRange.startDateTime && !!dateTimeRange.endDateTime) + isValid.value = !!dtCol && (!!dateTimePoint.value || (comp === "between" && !!dateTimeRange.startDateTime && !!dateTimeRange.endDateTime)) }) function dtToCond(col: string, dt: DateTime, operator: Transforms.SimpleSQLOperator): Transforms.SimpleWhere { @@ -75,7 +75,7 @@ defineExpose({ </v-col> <v-col class="ma-2" cols="4"> - <v-select :items="customTimeZones" v-model="timeZone" label="Time Zone" return-object></v-select> + <v-select :items="customTimeZones" v-model="timeZone" label="Time Zone" return-object :rules="[rules.required]" validate-on="invalid-input eager"></v-select> </v-col> </v-row> <v-row no-gutters class="d-flex flex-nowrap" justify="start"> diff --git a/src/components/subcomponents/view/DBTreeView.vue b/src/components/subcomponents/view/DBTreeView.vue index 3d2281e..0ded7a8 100644 --- a/src/components/subcomponents/view/DBTreeView.vue +++ b/src/components/subcomponents/view/DBTreeView.vue @@ -115,11 +115,20 @@ function tryViewTable(tableIdentifier: TableIdentifier) { props.sourceDB === "original" ? "mdi-table" : "mdi-table-eye" }} </v-icon> - <v-icon v-else-if="item?.kind === 'column' && item.col_props?.data_type in constants.sqlDataTypeProperties"> - {{ constants.sqlDataTypeProperties[item.col_props.data_type].icon }} - </v-icon> + <template v-else-if="item?.kind === 'column' && item.col_props?.data_type in constants.sqlDataTypeProperties"> + <v-icon> + {{ constants.sqlDataTypeProperties[item.col_props.data_type].icon }} + </v-icon> + </template> <v-icon v-else-if="!item.kind">mdi-table-off</v-icon> </template> + <template v-slot:title="{item}"> + {{ item.title }} + <template v-if="item?.kind === 'column'"> + <v-icon size="small" v-if="item.col_props?.part_of_pk">mdi-key</v-icon> + <v-icon size="small" v-if="item.col_props?.part_of_fk">mdi-key-wireless</v-icon> + </template> + </template> <template v-slot:append="{item}"> <template v-if="item?.kind === 'table'"> <v-btn density="compact" icon="mdi-cursor-default-click" variant="text" @@ -131,8 +140,6 @@ function tryViewTable(tableIdentifier: TableIdentifier) { <v-label class="text-small"> {{ item.col_props?.data_type }} </v-label> - <v-icon v-if="item.col_props?.part_of_pk">mdi-key</v-icon> - <v-icon v-if="item.col_props?.part_of_fk">mdi-key-wireless</v-icon> </template> </template> diff --git a/src/components/subcomponents/view/TableDetails.vue b/src/components/subcomponents/view/TableDetails.vue index d230969..4b42bd5 100644 --- a/src/components/subcomponents/view/TableDetails.vue +++ b/src/components/subcomponents/view/TableDetails.vue @@ -39,7 +39,7 @@ const isVirtualTable = computed(() => !!selectedTable.value && selectedTable.val const {columnList} = useColumnsOfTable(selectedTable) watchEffect(() => { - const excl = ['part_of_pk', 'mitm_data_type'] + const excl = ['part_of_pk', 'mitm_data_type', 'part_of_fk'] const temp = columnList.value ?? [] const allProperties = temp.reduce((acc, item) => { @@ -152,6 +152,7 @@ async function dropVirtualView() { @click="() => tryToggle(item)" key="item.name"> <td> <v-icon size="small" v-if="item.column_properties['part_of_pk']">mdi-key</v-icon> + <v-icon size="small" v-if="item.column_properties['part_of_fk']">mdi-key-wireless</v-icon> <v-icon size="small" v-if="item.column_properties['part_of_index']">mdi-alpha-i-circle-outline </v-icon> </td> diff --git a/src/services/api-schema/openapi.d.ts b/src/services/api-schema/openapi.d.ts index de72a2b..25a52f6 100644 --- a/src/services/api-schema/openapi.d.ts +++ b/src/services/api-schema/openapi.d.ts @@ -146,6 +146,14 @@ declare namespace Components { */ schema_name: string; } + /** + * ConceptKind + */ + export type ConceptKind = "concrete" | "abstract"; + /** + * ConceptLevel + */ + export type ConceptLevel = "main" | "sub" | "weak"; /** * ConceptMapping */ @@ -242,10 +250,6 @@ declare namespace Components { */ type_col: string; } - /** - * ConceptNature - */ - export type ConceptNature = "main" | "sub" | "weak"; /** * ConceptProperties */ @@ -258,7 +262,10 @@ declare namespace Components { * Key */ key: string; - nature: /* ConceptNature */ ConceptNature; + /** + * Nature + */ + nature: any[]; /** * Permit Attributes */ @@ -548,6 +555,21 @@ declare namespace Components { */ target_table: /* Target Table */ /* LocalTableIdentifier */ LocalTableIdentifier | any[]; } + /** + * ForeignRelationInfo + */ + export interface ForeignRelationInfo { + /** + * Fk Relations + */ + fk_relations: { + [name: string]: string; + }; + /** + * Target Concept + */ + target_concept: string; + } /** * ForeignRelation */ @@ -558,10 +580,6 @@ declare namespace Components { fk_columns: /* Fk Columns */ { [name: string]: string; } | string[]; - /** - * Referred Columns - */ - referred_columns: string[]; /** * Referred Table */ @@ -577,15 +595,26 @@ declare namespace Components { fk_columns: /* Fk Columns */ { [name: string]: string; } | string[]; - /** - * Referred Columns - */ - referred_columns: string[]; /** * Referred Table */ referred_table: /* Referred Table */ /* TableIdentifier */ TableIdentifier | any[] | any[]; } + /** + * GroupValidationResult + */ + export interface GroupValidationResult { + /** + * Individual Validations + */ + individual_validations?: { + [name: string]: any[][]; + }; + /** + * Is Valid + */ + is_valid: boolean; + } /** * HTTPValidationError */ @@ -595,6 +624,19 @@ declare namespace Components { */ detail?: /* ValidationError */ ValidationError[]; } + /** + * IndividualValidationResult + */ + export interface IndividualValidationResult { + /** + * Is Valid + */ + is_valid?: boolean; + /** + * Violations + */ + violations?: string[]; + } /** * KeepAliveResponse */ @@ -690,11 +732,14 @@ declare namespace Components { }; } /** - * MappingValidationResult + * MappingGroupValidationResult */ - export interface MappingValidationResult { - evaluated_mapping?: /* ConceptMapping */ ConceptMappingOutput | null; - validation_result: /* ValidationResult */ ValidationResult; + export interface MappingGroupValidationResult { + /** + * Evaluated Mappings + */ + evaluated_mappings?: /* Evaluated Mappings */ /* ConceptMapping */ ConceptMappingOutput[] | null; + validation_result: /* GroupValidationResult */ GroupValidationResult; } /** * MitMDataTypeInfos @@ -762,17 +807,13 @@ declare namespace Components { * To Many */ to_many: { - [name: string]: { - [name: string]: string; - }; + [name: string]: /* ForeignRelationInfo */ ForeignRelationInfo; }; /** * To One */ to_one: { - [name: string]: { - [name: string]: string; - }; + [name: string]: /* ForeignRelationInfo */ ForeignRelationInfo; }; } /** @@ -1177,19 +1218,6 @@ declare namespace Components { */ type: string; } - /** - * ValidationResult - */ - export interface ValidationResult { - /** - * Is Valid - */ - is_valid?: boolean; - /** - * Violations - */ - violations?: string[]; - } /** * VirtualViewCreationRequest */ @@ -2056,7 +2084,7 @@ declare namespace Paths { export type $422 = /* HTTPValidationError */ Components.Schemas.HTTPValidationError; } } - namespace ValidateConceptMapping { + namespace ValidateConceptMappings { export interface CookieParameters { simple_session: /* Simple Session */ Parameters.SimpleSession; } @@ -2073,9 +2101,12 @@ declare namespace Paths { export interface QueryParameters { include_request?: /* Include Request */ Parameters.IncludeRequest; } - export type RequestBody = /* ConceptMapping */ Components.Schemas.ConceptMappingInput; + /** + * Concept Mappings + */ + export type RequestBody = /* ConceptMapping */ Components.Schemas.ConceptMappingInput[]; namespace Responses { - export type $200 = /* MappingValidationResult */ Components.Schemas.MappingValidationResult; + export type $200 = /* MappingGroupValidationResult */ Components.Schemas.MappingGroupValidationResult; export type $422 = /* HTTPValidationError */ Components.Schemas.HTTPValidationError; } } @@ -2088,7 +2119,7 @@ export interface OperationMethods { 'root'( parameters?: Parameters<UnknownParamsObject> | null, data?: any, - config?: AxiosRequestConfig + config?: AxiosRequestConfig ): OperationResponse<Paths.Root.Responses.$200> /** * get_active_sessions - Get Active Sessions @@ -2096,7 +2127,7 @@ export interface OperationMethods { 'get_active_sessions'( parameters?: Parameters<UnknownParamsObject> | null, data?: any, - config?: AxiosRequestConfig + config?: AxiosRequestConfig ): OperationResponse<Paths.GetActiveSessions.Responses.$200> /** * clear_exports - Clear Exports @@ -2104,7 +2135,7 @@ export interface OperationMethods { 'clear_exports'( parameters?: Parameters<UnknownParamsObject> | null, data?: any, - config?: AxiosRequestConfig + config?: AxiosRequestConfig ): OperationResponse<Paths.ClearExports.Responses.$200> /** * clear_sessions - Clear Sessions @@ -2112,7 +2143,7 @@ export interface OperationMethods { 'clear_sessions'( parameters?: Parameters<UnknownParamsObject> | null, data?: any, - config?: AxiosRequestConfig + config?: AxiosRequestConfig ): OperationResponse<Paths.ClearSessions.Responses.$200> /** * get_compiled_virtual_view - Get Compiled Virtual View @@ -2120,7 +2151,7 @@ export interface OperationMethods { 'get_compiled_virtual_view'( parameters?: Parameters<Paths.GetCompiledVirtualView.QueryParameters & Paths.GetCompiledVirtualView.CookieParameters> | null, data?: any, - config?: AxiosRequestConfig + config?: AxiosRequestConfig ): OperationResponse<Paths.GetCompiledVirtualView.Responses.$200> /** * get_compiled_virtual_views - Get Compiled Virtual Views @@ -2128,7 +2159,7 @@ export interface OperationMethods { 'get_compiled_virtual_views'( parameters?: Parameters<Paths.GetCompiledVirtualViews.CookieParameters> | null, data?: any, - config?: AxiosRequestConfig + config?: AxiosRequestConfig ): OperationResponse<Paths.GetCompiledVirtualViews.Responses.$200> /** * init_working_db - Init Working Db @@ -2136,7 +2167,7 @@ export interface OperationMethods { 'init_working_db'( parameters?: Parameters<Paths.InitWorkingDb.CookieParameters> | null, data?: any, - config?: AxiosRequestConfig + config?: AxiosRequestConfig ): OperationResponse<Paths.InitWorkingDb.Responses.$200> /** * mark_foreign_key - Mark Foreign Key @@ -2144,7 +2175,7 @@ export interface OperationMethods { 'mark_foreign_key'( parameters?: Parameters<Paths.MarkForeignKey.QueryParameters & Paths.MarkForeignKey.CookieParameters> | null, data?: Paths.MarkForeignKey.RequestBody, - config?: AxiosRequestConfig + config?: AxiosRequestConfig ): OperationResponse<Paths.MarkForeignKey.Responses.$200> /** * reflect_db - Reflect Db @@ -2152,7 +2183,7 @@ export interface OperationMethods { 'reflect_db'( parameters?: Parameters<Paths.ReflectDb.CookieParameters> | null, data?: any, - config?: AxiosRequestConfig + config?: AxiosRequestConfig ): OperationResponse<Paths.ReflectDb.Responses.$200> /** * get_virtual_view - Get Virtual View @@ -2160,7 +2191,7 @@ export interface OperationMethods { 'get_virtual_view'( parameters?: Parameters<Paths.GetVirtualView.QueryParameters & Paths.GetVirtualView.CookieParameters> | null, data?: any, - config?: AxiosRequestConfig + config?: AxiosRequestConfig ): OperationResponse<Paths.GetVirtualView.Responses.$200> /** * create_virtual_view - Create Virtual View @@ -2168,7 +2199,7 @@ export interface OperationMethods { 'create_virtual_view'( parameters?: Parameters<Paths.CreateVirtualView.QueryParameters & Paths.CreateVirtualView.CookieParameters> | null, data?: Paths.CreateVirtualView.RequestBody, - config?: AxiosRequestConfig + config?: AxiosRequestConfig ): OperationResponse<Paths.CreateVirtualView.Responses.$200> /** * drop_virtual_view - Drop Virtual View @@ -2176,7 +2207,7 @@ export interface OperationMethods { 'drop_virtual_view'( parameters?: Parameters<Paths.DropVirtualView.QueryParameters & Paths.DropVirtualView.CookieParameters> | null, data?: any, - config?: AxiosRequestConfig + config?: AxiosRequestConfig ): OperationResponse<Paths.DropVirtualView.Responses.$200> /** * get_virtual_views - Get Virtual Views @@ -2184,7 +2215,7 @@ export interface OperationMethods { 'get_virtual_views'( parameters?: Parameters<Paths.GetVirtualViews.CookieParameters> | null, data?: any, - config?: AxiosRequestConfig + config?: AxiosRequestConfig ): OperationResponse<Paths.GetVirtualViews.Responses.$200> /** * create_virtual_views_batch - Create Virtual Views Batch @@ -2192,7 +2223,7 @@ export interface OperationMethods { 'create_virtual_views_batch'( parameters?: Parameters<Paths.CreateVirtualViewsBatch.QueryParameters & Paths.CreateVirtualViewsBatch.CookieParameters> | null, data?: Paths.CreateVirtualViewsBatch.RequestBody, - config?: AxiosRequestConfig + config?: AxiosRequestConfig ): OperationResponse<Paths.CreateVirtualViewsBatch.Responses.$200> /** * make_erd - Make Erd @@ -2200,7 +2231,7 @@ export interface OperationMethods { 'make_erd'( parameters?: Parameters<Paths.MakeErd.QueryParameters & Paths.MakeErd.CookieParameters> | null, data?: any, - config?: AxiosRequestConfig + config?: AxiosRequestConfig ): OperationResponse<Paths.MakeErd.Responses.$200> /** * make_filtered_erd - Make Filtered Erd @@ -2208,7 +2239,7 @@ export interface OperationMethods { 'make_filtered_erd'( parameters?: Parameters<Paths.MakeFilteredErd.QueryParameters & Paths.MakeFilteredErd.CookieParameters> | null, data?: Paths.MakeFilteredErd.RequestBody, - config?: AxiosRequestConfig + config?: AxiosRequestConfig ): OperationResponse<Paths.MakeFilteredErd.Responses.$200> /** * query_table - Query Table @@ -2216,7 +2247,7 @@ export interface OperationMethods { 'query_table'( parameters?: Parameters<Paths.QueryTable.QueryParameters & Paths.QueryTable.CookieParameters> | null, data?: any, - config?: AxiosRequestConfig + config?: AxiosRequestConfig ): OperationResponse<Paths.QueryTable.Responses.$200> /** * query_unique_values - Query Unique Values @@ -2224,7 +2255,7 @@ export interface OperationMethods { 'query_unique_values'( parameters?: Parameters<Paths.QueryUniqueValues.QueryParameters & Paths.QueryUniqueValues.CookieParameters> | null, data?: any, - config?: AxiosRequestConfig + config?: AxiosRequestConfig ): OperationResponse<Paths.QueryUniqueValues.Responses.$200> /** * raw_query - Raw Query @@ -2232,7 +2263,7 @@ export interface OperationMethods { 'raw_query'( parameters?: Parameters<Paths.RawQuery.CookieParameters> | null, data?: Paths.RawQuery.RequestBody, - config?: AxiosRequestConfig + config?: AxiosRequestConfig ): OperationResponse<Paths.RawQuery.Responses.$200> /** * get_mitm_data_types - Get Mitm Data Types @@ -2240,7 +2271,7 @@ export interface OperationMethods { 'get_mitm_data_types'( parameters?: Parameters<UnknownParamsObject> | null, data?: any, - config?: AxiosRequestConfig + config?: AxiosRequestConfig ): OperationResponse<Paths.GetMitmDataTypes.Responses.$200> /** * get_mitm_definition - Get Mitm Definition @@ -2248,7 +2279,7 @@ export interface OperationMethods { 'get_mitm_definition'( parameters?: Parameters<Paths.GetMitmDefinition.QueryParameters> | null, data?: any, - config?: AxiosRequestConfig + config?: AxiosRequestConfig ): OperationResponse<Paths.GetMitmDefinition.Responses.$200> /** * get_mitms - Get Mitms @@ -2256,7 +2287,7 @@ export interface OperationMethods { 'get_mitms'( parameters?: Parameters<UnknownParamsObject> | null, data?: any, - config?: AxiosRequestConfig + config?: AxiosRequestConfig ): OperationResponse<Paths.GetMitms.Responses.$200> /** * delete_mitm_export - Delete Mitm Export @@ -2264,7 +2295,7 @@ export interface OperationMethods { 'delete_mitm_export'( parameters?: Parameters<Paths.DeleteMitmExport.QueryParameters & Paths.DeleteMitmExport.CookieParameters> | null, data?: any, - config?: AxiosRequestConfig + config?: AxiosRequestConfig ): OperationResponse<Paths.DeleteMitmExport.Responses.$200> /** * delete_mitm_exports - Delete Mitm Exports @@ -2272,7 +2303,7 @@ export interface OperationMethods { 'delete_mitm_exports'( parameters?: Parameters<Paths.DeleteMitmExports.CookieParameters> | null, data?: any, - config?: AxiosRequestConfig + config?: AxiosRequestConfig ): OperationResponse<Paths.DeleteMitmExports.Responses.$200> /** * export_mitm - Export Mitm @@ -2280,7 +2311,7 @@ export interface OperationMethods { 'export_mitm'( parameters?: Parameters<Paths.ExportMitm.CookieParameters> | null, data?: Paths.ExportMitm.RequestBody, - config?: AxiosRequestConfig + config?: AxiosRequestConfig ): OperationResponse<Paths.ExportMitm.Responses.$200> /** * publish_mitm_export - Publish Mitm Export @@ -2288,23 +2319,23 @@ export interface OperationMethods { 'publish_mitm_export'( parameters?: Parameters<Paths.PublishMitmExport.CookieParameters> | null, data?: Paths.PublishMitmExport.RequestBody, - config?: AxiosRequestConfig + config?: AxiosRequestConfig ): OperationResponse<Paths.PublishMitmExport.Responses.$200> /** - * validate_concept_mapping - Validate Concept Mapping + * validate_concept_mappings - Validate Concept Mappings */ - 'validate_concept_mapping'( - parameters?: Parameters<Paths.ValidateConceptMapping.QueryParameters & Paths.ValidateConceptMapping.CookieParameters> | null, - data?: Paths.ValidateConceptMapping.RequestBody, - config?: AxiosRequestConfig - ): OperationResponse<Paths.ValidateConceptMapping.Responses.$200> + 'validate_concept_mappings'( + parameters?: Parameters<Paths.ValidateConceptMappings.QueryParameters & Paths.ValidateConceptMappings.CookieParameters> | null, + data?: Paths.ValidateConceptMappings.RequestBody, + config?: AxiosRequestConfig + ): OperationResponse<Paths.ValidateConceptMappings.Responses.$200> /** * get_db_schema - Get Db Schema */ 'get_db_schema'( parameters?: Parameters<Paths.GetDbSchema.QueryParameters & Paths.GetDbSchema.CookieParameters> | null, data?: any, - config?: AxiosRequestConfig + config?: AxiosRequestConfig ): OperationResponse<Paths.GetDbSchema.Responses.$200> /** * filter_db_schema - Filter Db Schema @@ -2312,7 +2343,7 @@ export interface OperationMethods { 'filter_db_schema'( parameters?: Parameters<Paths.FilterDbSchema.QueryParameters & Paths.FilterDbSchema.CookieParameters> | null, data?: Paths.FilterDbSchema.RequestBody, - config?: AxiosRequestConfig + config?: AxiosRequestConfig ): OperationResponse<Paths.FilterDbSchema.Responses.$200> /** * probe_db - Probe Db @@ -2320,7 +2351,7 @@ export interface OperationMethods { 'probe_db'( parameters?: Parameters<Paths.ProbeDb.QueryParameters & Paths.ProbeDb.CookieParameters> | null, data?: Paths.ProbeDb.RequestBody, - config?: AxiosRequestConfig + config?: AxiosRequestConfig ): OperationResponse<Paths.ProbeDb.Responses.$200> /** * probe_table - Probe Table @@ -2328,7 +2359,7 @@ export interface OperationMethods { 'probe_table'( parameters?: Parameters<Paths.ProbeTable.QueryParameters & Paths.ProbeTable.CookieParameters> | null, data?: any, - config?: AxiosRequestConfig + config?: AxiosRequestConfig ): OperationResponse<Paths.ProbeTable.Responses.$200> /** * query_db_schema - Query Db Schema @@ -2336,7 +2367,7 @@ export interface OperationMethods { 'query_db_schema'( parameters?: Parameters<Paths.QueryDbSchema.QueryParameters & Paths.QueryDbSchema.CookieParameters> | null, data?: Paths.QueryDbSchema.RequestBody, - config?: AxiosRequestConfig + config?: AxiosRequestConfig ): OperationResponse<Paths.QueryDbSchema.Responses.$200> /** * suggest_joins - Suggest Joins @@ -2344,7 +2375,7 @@ export interface OperationMethods { 'suggest_joins'( parameters?: Parameters<Paths.SuggestJoins.QueryParameters & Paths.SuggestJoins.CookieParameters> | null, data?: any, - config?: AxiosRequestConfig + config?: AxiosRequestConfig ): OperationResponse<Paths.SuggestJoins.Responses.$200> /** * get_table_schema - Get Table Schema @@ -2352,7 +2383,7 @@ export interface OperationMethods { 'get_table_schema'( parameters?: Parameters<Paths.GetTableSchema.QueryParameters & Paths.GetTableSchema.CookieParameters> | null, data?: any, - config?: AxiosRequestConfig + config?: AxiosRequestConfig ): OperationResponse<Paths.GetTableSchema.Responses.$200> /** * connect_db - Connect Db @@ -2360,7 +2391,7 @@ export interface OperationMethods { 'connect_db'( parameters?: Parameters<Paths.ConnectDb.CookieParameters> | null, data?: Paths.ConnectDb.RequestBody, - config?: AxiosRequestConfig + config?: AxiosRequestConfig ): OperationResponse<Paths.ConnectDb.Responses.$200> /** * get_session - Get Session @@ -2368,7 +2399,7 @@ export interface OperationMethods { 'get_session'( parameters?: Parameters<Paths.GetSession.CookieParameters> | null, data?: any, - config?: AxiosRequestConfig + config?: AxiosRequestConfig ): OperationResponse<Paths.GetSession.Responses.$200> /** * keep_alive - Keep Alive @@ -2376,7 +2407,7 @@ export interface OperationMethods { 'keep_alive'( parameters?: Parameters<UnknownParamsObject> | null, data?: any, - config?: AxiosRequestConfig + config?: AxiosRequestConfig ): OperationResponse<Paths.KeepAlive.Responses.$200> /** * start_session - Start Session @@ -2384,7 +2415,7 @@ export interface OperationMethods { 'start_session'( parameters?: Parameters<UnknownParamsObject> | null, data?: any, - config?: AxiosRequestConfig + config?: AxiosRequestConfig ): OperationResponse<Paths.StartSession.Responses.$200> /** * stop_session - Stop Session @@ -2392,7 +2423,7 @@ export interface OperationMethods { 'stop_session'( parameters?: Parameters<Paths.StopSession.CookieParameters> | null, data?: any, - config?: AxiosRequestConfig + config?: AxiosRequestConfig ): OperationResponse<Paths.StopSession.Responses.$200> /** * test_db_conn - Test Db Conn @@ -2400,7 +2431,7 @@ export interface OperationMethods { 'test_db_conn'( parameters?: Parameters<Paths.TestDbConn.CookieParameters> | null, data?: any, - config?: AxiosRequestConfig + config?: AxiosRequestConfig ): OperationResponse<Paths.TestDbConn.Responses.$200> /** * upload_db - Upload Db @@ -2408,7 +2439,7 @@ export interface OperationMethods { 'upload_db'( parameters?: Parameters<Paths.UploadDb.CookieParameters> | null, data?: Paths.UploadDb.RequestBody, - config?: AxiosRequestConfig + config?: AxiosRequestConfig ): OperationResponse<Paths.UploadDb.Responses.$200> } @@ -2420,7 +2451,7 @@ export interface PathsDictionary { 'get'( parameters?: Parameters<UnknownParamsObject> | null, data?: any, - config?: AxiosRequestConfig + config?: AxiosRequestConfig ): OperationResponse<Paths.Root.Responses.$200> } ['/admin/active-sessions']: { @@ -2430,7 +2461,7 @@ export interface PathsDictionary { 'get'( parameters?: Parameters<UnknownParamsObject> | null, data?: any, - config?: AxiosRequestConfig + config?: AxiosRequestConfig ): OperationResponse<Paths.GetActiveSessions.Responses.$200> } ['/admin/clear-exports']: { @@ -2440,7 +2471,7 @@ export interface PathsDictionary { 'post'( parameters?: Parameters<UnknownParamsObject> | null, data?: any, - config?: AxiosRequestConfig + config?: AxiosRequestConfig ): OperationResponse<Paths.ClearExports.Responses.$200> } ['/admin/clear-sessions']: { @@ -2450,7 +2481,7 @@ export interface PathsDictionary { 'post'( parameters?: Parameters<UnknownParamsObject> | null, data?: any, - config?: AxiosRequestConfig + config?: AxiosRequestConfig ): OperationResponse<Paths.ClearSessions.Responses.$200> } ['/control/compiled-virtual-view']: { @@ -2460,7 +2491,7 @@ export interface PathsDictionary { 'get'( parameters?: Parameters<Paths.GetCompiledVirtualView.QueryParameters & Paths.GetCompiledVirtualView.CookieParameters> | null, data?: any, - config?: AxiosRequestConfig + config?: AxiosRequestConfig ): OperationResponse<Paths.GetCompiledVirtualView.Responses.$200> } ['/control/compiled-virtual-views']: { @@ -2470,7 +2501,7 @@ export interface PathsDictionary { 'get'( parameters?: Parameters<Paths.GetCompiledVirtualViews.CookieParameters> | null, data?: any, - config?: AxiosRequestConfig + config?: AxiosRequestConfig ): OperationResponse<Paths.GetCompiledVirtualViews.Responses.$200> } ['/control/init-working-db']: { @@ -2480,7 +2511,7 @@ export interface PathsDictionary { 'post'( parameters?: Parameters<Paths.InitWorkingDb.CookieParameters> | null, data?: any, - config?: AxiosRequestConfig + config?: AxiosRequestConfig ): OperationResponse<Paths.InitWorkingDb.Responses.$200> } ['/control/mark-foreign-key']: { @@ -2490,7 +2521,7 @@ export interface PathsDictionary { 'post'( parameters?: Parameters<Paths.MarkForeignKey.QueryParameters & Paths.MarkForeignKey.CookieParameters> | null, data?: Paths.MarkForeignKey.RequestBody, - config?: AxiosRequestConfig + config?: AxiosRequestConfig ): OperationResponse<Paths.MarkForeignKey.Responses.$200> } ['/control/reflect-db']: { @@ -2500,7 +2531,7 @@ export interface PathsDictionary { 'post'( parameters?: Parameters<Paths.ReflectDb.CookieParameters> | null, data?: any, - config?: AxiosRequestConfig + config?: AxiosRequestConfig ): OperationResponse<Paths.ReflectDb.Responses.$200> } ['/control/virtual-view']: { @@ -2510,7 +2541,7 @@ export interface PathsDictionary { 'delete'( parameters?: Parameters<Paths.DropVirtualView.QueryParameters & Paths.DropVirtualView.CookieParameters> | null, data?: any, - config?: AxiosRequestConfig + config?: AxiosRequestConfig ): OperationResponse<Paths.DropVirtualView.Responses.$200> /** * get_virtual_view - Get Virtual View @@ -2518,7 +2549,7 @@ export interface PathsDictionary { 'get'( parameters?: Parameters<Paths.GetVirtualView.QueryParameters & Paths.GetVirtualView.CookieParameters> | null, data?: any, - config?: AxiosRequestConfig + config?: AxiosRequestConfig ): OperationResponse<Paths.GetVirtualView.Responses.$200> /** * create_virtual_view - Create Virtual View @@ -2526,7 +2557,7 @@ export interface PathsDictionary { 'put'( parameters?: Parameters<Paths.CreateVirtualView.QueryParameters & Paths.CreateVirtualView.CookieParameters> | null, data?: Paths.CreateVirtualView.RequestBody, - config?: AxiosRequestConfig + config?: AxiosRequestConfig ): OperationResponse<Paths.CreateVirtualView.Responses.$200> } ['/control/virtual-views']: { @@ -2536,7 +2567,7 @@ export interface PathsDictionary { 'get'( parameters?: Parameters<Paths.GetVirtualViews.CookieParameters> | null, data?: any, - config?: AxiosRequestConfig + config?: AxiosRequestConfig ): OperationResponse<Paths.GetVirtualViews.Responses.$200> } ['/control/virtual-views-batch']: { @@ -2546,7 +2577,7 @@ export interface PathsDictionary { 'put'( parameters?: Parameters<Paths.CreateVirtualViewsBatch.QueryParameters & Paths.CreateVirtualViewsBatch.CookieParameters> | null, data?: Paths.CreateVirtualViewsBatch.RequestBody, - config?: AxiosRequestConfig + config?: AxiosRequestConfig ): OperationResponse<Paths.CreateVirtualViewsBatch.Responses.$200> } ['/data/er-diagram']: { @@ -2556,7 +2587,7 @@ export interface PathsDictionary { 'get'( parameters?: Parameters<Paths.MakeErd.QueryParameters & Paths.MakeErd.CookieParameters> | null, data?: any, - config?: AxiosRequestConfig + config?: AxiosRequestConfig ): OperationResponse<Paths.MakeErd.Responses.$200> } ['/data/filtered-er-diagram']: { @@ -2566,7 +2597,7 @@ export interface PathsDictionary { 'post'( parameters?: Parameters<Paths.MakeFilteredErd.QueryParameters & Paths.MakeFilteredErd.CookieParameters> | null, data?: Paths.MakeFilteredErd.RequestBody, - config?: AxiosRequestConfig + config?: AxiosRequestConfig ): OperationResponse<Paths.MakeFilteredErd.Responses.$200> } ['/data/query-table']: { @@ -2576,7 +2607,7 @@ export interface PathsDictionary { 'get'( parameters?: Parameters<Paths.QueryTable.QueryParameters & Paths.QueryTable.CookieParameters> | null, data?: any, - config?: AxiosRequestConfig + config?: AxiosRequestConfig ): OperationResponse<Paths.QueryTable.Responses.$200> } ['/data/query-unique-values']: { @@ -2586,7 +2617,7 @@ export interface PathsDictionary { 'get'( parameters?: Parameters<Paths.QueryUniqueValues.QueryParameters & Paths.QueryUniqueValues.CookieParameters> | null, data?: any, - config?: AxiosRequestConfig + config?: AxiosRequestConfig ): OperationResponse<Paths.QueryUniqueValues.Responses.$200> } ['/data/raw-query']: { @@ -2596,7 +2627,7 @@ export interface PathsDictionary { 'post'( parameters?: Parameters<Paths.RawQuery.CookieParameters> | null, data?: Paths.RawQuery.RequestBody, - config?: AxiosRequestConfig + config?: AxiosRequestConfig ): OperationResponse<Paths.RawQuery.Responses.$200> } ['/definitions/mitm-data-types']: { @@ -2606,7 +2637,7 @@ export interface PathsDictionary { 'get'( parameters?: Parameters<UnknownParamsObject> | null, data?: any, - config?: AxiosRequestConfig + config?: AxiosRequestConfig ): OperationResponse<Paths.GetMitmDataTypes.Responses.$200> } ['/definitions/mitm-definition']: { @@ -2616,7 +2647,7 @@ export interface PathsDictionary { 'get'( parameters?: Parameters<Paths.GetMitmDefinition.QueryParameters> | null, data?: any, - config?: AxiosRequestConfig + config?: AxiosRequestConfig ): OperationResponse<Paths.GetMitmDefinition.Responses.$200> } ['/definitions/mitms']: { @@ -2626,7 +2657,7 @@ export interface PathsDictionary { 'get'( parameters?: Parameters<UnknownParamsObject> | null, data?: any, - config?: AxiosRequestConfig + config?: AxiosRequestConfig ): OperationResponse<Paths.GetMitms.Responses.$200> } ['/mitm/delete-mitm-export']: { @@ -2636,7 +2667,7 @@ export interface PathsDictionary { 'post'( parameters?: Parameters<Paths.DeleteMitmExport.QueryParameters & Paths.DeleteMitmExport.CookieParameters> | null, data?: any, - config?: AxiosRequestConfig + config?: AxiosRequestConfig ): OperationResponse<Paths.DeleteMitmExport.Responses.$200> } ['/mitm/delete-mitm-exports']: { @@ -2646,7 +2677,7 @@ export interface PathsDictionary { 'post'( parameters?: Parameters<Paths.DeleteMitmExports.CookieParameters> | null, data?: any, - config?: AxiosRequestConfig + config?: AxiosRequestConfig ): OperationResponse<Paths.DeleteMitmExports.Responses.$200> } ['/mitm/export-mitm']: { @@ -2656,7 +2687,7 @@ export interface PathsDictionary { 'post'( parameters?: Parameters<Paths.ExportMitm.CookieParameters> | null, data?: Paths.ExportMitm.RequestBody, - config?: AxiosRequestConfig + config?: AxiosRequestConfig ): OperationResponse<Paths.ExportMitm.Responses.$200> } ['/mitm/publish-mitm-export']: { @@ -2666,18 +2697,18 @@ export interface PathsDictionary { 'post'( parameters?: Parameters<Paths.PublishMitmExport.CookieParameters> | null, data?: Paths.PublishMitmExport.RequestBody, - config?: AxiosRequestConfig + config?: AxiosRequestConfig ): OperationResponse<Paths.PublishMitmExport.Responses.$200> } - ['/mitm/validate-concept-mapping']: { + ['/mitm/validate-concept-mappings']: { /** - * validate_concept_mapping - Validate Concept Mapping + * validate_concept_mappings - Validate Concept Mappings */ 'post'( - parameters?: Parameters<Paths.ValidateConceptMapping.QueryParameters & Paths.ValidateConceptMapping.CookieParameters> | null, - data?: Paths.ValidateConceptMapping.RequestBody, - config?: AxiosRequestConfig - ): OperationResponse<Paths.ValidateConceptMapping.Responses.$200> + parameters?: Parameters<Paths.ValidateConceptMappings.QueryParameters & Paths.ValidateConceptMappings.CookieParameters> | null, + data?: Paths.ValidateConceptMappings.RequestBody, + config?: AxiosRequestConfig + ): OperationResponse<Paths.ValidateConceptMappings.Responses.$200> } ['/reflection/db-schema']: { /** @@ -2686,7 +2717,7 @@ export interface PathsDictionary { 'get'( parameters?: Parameters<Paths.GetDbSchema.QueryParameters & Paths.GetDbSchema.CookieParameters> | null, data?: any, - config?: AxiosRequestConfig + config?: AxiosRequestConfig ): OperationResponse<Paths.GetDbSchema.Responses.$200> } ['/reflection/filter-db-schema']: { @@ -2696,7 +2727,7 @@ export interface PathsDictionary { 'post'( parameters?: Parameters<Paths.FilterDbSchema.QueryParameters & Paths.FilterDbSchema.CookieParameters> | null, data?: Paths.FilterDbSchema.RequestBody, - config?: AxiosRequestConfig + config?: AxiosRequestConfig ): OperationResponse<Paths.FilterDbSchema.Responses.$200> } ['/reflection/probe-db']: { @@ -2706,7 +2737,7 @@ export interface PathsDictionary { 'post'( parameters?: Parameters<Paths.ProbeDb.QueryParameters & Paths.ProbeDb.CookieParameters> | null, data?: Paths.ProbeDb.RequestBody, - config?: AxiosRequestConfig + config?: AxiosRequestConfig ): OperationResponse<Paths.ProbeDb.Responses.$200> } ['/reflection/probe-table']: { @@ -2716,7 +2747,7 @@ export interface PathsDictionary { 'post'( parameters?: Parameters<Paths.ProbeTable.QueryParameters & Paths.ProbeTable.CookieParameters> | null, data?: any, - config?: AxiosRequestConfig + config?: AxiosRequestConfig ): OperationResponse<Paths.ProbeTable.Responses.$200> } ['/reflection/query-db-schema']: { @@ -2726,7 +2757,7 @@ export interface PathsDictionary { 'post'( parameters?: Parameters<Paths.QueryDbSchema.QueryParameters & Paths.QueryDbSchema.CookieParameters> | null, data?: Paths.QueryDbSchema.RequestBody, - config?: AxiosRequestConfig + config?: AxiosRequestConfig ): OperationResponse<Paths.QueryDbSchema.Responses.$200> } ['/reflection/suggest-joins']: { @@ -2736,7 +2767,7 @@ export interface PathsDictionary { 'get'( parameters?: Parameters<Paths.SuggestJoins.QueryParameters & Paths.SuggestJoins.CookieParameters> | null, data?: any, - config?: AxiosRequestConfig + config?: AxiosRequestConfig ): OperationResponse<Paths.SuggestJoins.Responses.$200> } ['/reflection/table-schema']: { @@ -2746,7 +2777,7 @@ export interface PathsDictionary { 'get'( parameters?: Parameters<Paths.GetTableSchema.QueryParameters & Paths.GetTableSchema.CookieParameters> | null, data?: any, - config?: AxiosRequestConfig + config?: AxiosRequestConfig ): OperationResponse<Paths.GetTableSchema.Responses.$200> } ['/session/connect-db']: { @@ -2756,7 +2787,7 @@ export interface PathsDictionary { 'post'( parameters?: Parameters<Paths.ConnectDb.CookieParameters> | null, data?: Paths.ConnectDb.RequestBody, - config?: AxiosRequestConfig + config?: AxiosRequestConfig ): OperationResponse<Paths.ConnectDb.Responses.$200> } ['/session/get-session']: { @@ -2766,7 +2797,7 @@ export interface PathsDictionary { 'get'( parameters?: Parameters<Paths.GetSession.CookieParameters> | null, data?: any, - config?: AxiosRequestConfig + config?: AxiosRequestConfig ): OperationResponse<Paths.GetSession.Responses.$200> } ['/session/keep-alive']: { @@ -2776,7 +2807,7 @@ export interface PathsDictionary { 'get'( parameters?: Parameters<UnknownParamsObject> | null, data?: any, - config?: AxiosRequestConfig + config?: AxiosRequestConfig ): OperationResponse<Paths.KeepAlive.Responses.$200> } ['/session/start-session']: { @@ -2786,7 +2817,7 @@ export interface PathsDictionary { 'post'( parameters?: Parameters<UnknownParamsObject> | null, data?: any, - config?: AxiosRequestConfig + config?: AxiosRequestConfig ): OperationResponse<Paths.StartSession.Responses.$200> } ['/session/stop-session']: { @@ -2796,7 +2827,7 @@ export interface PathsDictionary { 'post'( parameters?: Parameters<Paths.StopSession.CookieParameters> | null, data?: any, - config?: AxiosRequestConfig + config?: AxiosRequestConfig ): OperationResponse<Paths.StopSession.Responses.$200> } ['/session/test-db-conn']: { @@ -2806,7 +2837,7 @@ export interface PathsDictionary { 'get'( parameters?: Parameters<Paths.TestDbConn.CookieParameters> | null, data?: any, - config?: AxiosRequestConfig + config?: AxiosRequestConfig ): OperationResponse<Paths.TestDbConn.Responses.$200> } ['/session/upload-db']: { @@ -2816,7 +2847,7 @@ export interface PathsDictionary { 'post'( parameters?: Parameters<Paths.UploadDb.CookieParameters> | null, data?: Paths.UploadDb.RequestBody, - config?: AxiosRequestConfig + config?: AxiosRequestConfig ): OperationResponse<Paths.UploadDb.Responses.$200> } } @@ -2831,9 +2862,10 @@ export type CastColumn = Components.Schemas.CastColumn; export type CategoricalSummaryStatistics = Components.Schemas.CategoricalSummaryStatistics; export type ColumnProperties = Components.Schemas.ColumnProperties; export type CompiledVirtualView = Components.Schemas.CompiledVirtualView; -export type ConceptMapping_Input = Components.Schemas.ConceptMappingInput; -export type ConceptMapping_Output = Components.Schemas.ConceptMappingOutput; -export type ConceptNature = Components.Schemas.ConceptNature; +export type ConceptKind = Components.Schemas.ConceptKind; +export type ConceptLevel = Components.Schemas.ConceptLevel; +export type ConceptMapping-Input = Components.Schemas.ConceptMappingInput; +export type ConceptMapping-Output = Components.Schemas.ConceptMappingOutput; export type ConceptProperties = Components.Schemas.ConceptProperties; export type DBConnTestResponse = Components.Schemas.DBConnTestResponse; export type DBMetaInfoBase = Components.Schemas.DBMetaInfoBase; @@ -2850,16 +2882,19 @@ export type ExtractJson = Components.Schemas.ExtractJson; export type FKCreationResponse = Components.Schemas.FKCreationResponse; export type ForeignKeyConstraintBase = Components.Schemas.ForeignKeyConstraintBase; export type ForeignKeyConstraintRequest = Components.Schemas.ForeignKeyConstraintRequest; -export type ForeignRelation_Input = Components.Schemas.ForeignRelationInput; -export type ForeignRelation_Output = Components.Schemas.ForeignRelationOutput; +export type ForeignRelationInfo = Components.Schemas.ForeignRelationInfo; +export type ForeignRelation-Input = Components.Schemas.ForeignRelationInput; +export type ForeignRelation-Output = Components.Schemas.ForeignRelationOutput; +export type GroupValidationResult = Components.Schemas.GroupValidationResult; export type HTTPValidationError = Components.Schemas.HTTPValidationError; +export type IndividualValidationResult = Components.Schemas.IndividualValidationResult; export type KeepAliveResponse = Components.Schemas.KeepAliveResponse; export type Limit = Components.Schemas.Limit; export type LocalTableIdentifier = Components.Schemas.LocalTableIdentifier; export type MITM = Components.Schemas.MITM; export type MITMDataType = Components.Schemas.MITMDataType; export type MITMDefinition = Components.Schemas.MITMDefinition; -export type MappingValidationResult = Components.Schemas.MappingValidationResult; +export type MappingGroupValidationResult = Components.Schemas.MappingGroupValidationResult; export type MitMDataTypeInfos = Components.Schemas.MitMDataTypeInfos; export type NumericSummaryStatistics = Components.Schemas.NumericSummaryStatistics; export type OwnedRelations = Components.Schemas.OwnedRelations; @@ -2885,7 +2920,6 @@ export type TableProbeBase = Components.Schemas.TableProbeBase; export type TableQueryResult = Components.Schemas.TableQueryResult; export type TypedRawQuery = Components.Schemas.TypedRawQuery; export type ValidationError = Components.Schemas.ValidationError; -export type ValidationResult = Components.Schemas.ValidationResult; export type VirtualViewCreationRequest = Components.Schemas.VirtualViewCreationRequest; export type VirtualViewResponse = Components.Schemas.VirtualViewResponse; export type WrappedMITMDataType = Components.Schemas.WrappedMITMDataType; diff --git a/src/services/api-schema/openapi.json b/src/services/api-schema/openapi.json index 6e905c8..68229f6 100644 --- a/src/services/api-schema/openapi.json +++ b/src/services/api-schema/openapi.json @@ -1 +1 @@ -{"openapi": "3.1.0", "info": {"title": "MitMExtractorBackend", "version": "0.1.0"}, "paths": {"/admin/clear-sessions": {"post": {"tags": ["admin"], "summary": "Clear Sessions", "operationId": "clear_sessions", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}}}, "/admin/active-sessions": {"get": {"tags": ["admin"], "summary": "Get Active Sessions", "operationId": "get_active_sessions", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"additionalProperties": {"type": "string", "format": "date-time"}, "type": "object", "title": "Response Get Active Sessions Admin Active Sessions Get"}}}}}}}, "/admin/clear-exports": {"post": {"tags": ["admin"], "summary": "Clear Exports", "operationId": "clear_exports", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}}}, "/definitions/mitms": {"get": {"tags": ["definitions"], "summary": "Get Mitms", "operationId": "get_mitms", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"items": {"$ref": "#/components/schemas/MITM"}, "type": "array", "title": "Response Get Mitms Definitions Mitms Get"}}}}}}}, "/definitions/mitm-definition": {"get": {"tags": ["definitions"], "summary": "Get Mitm Definition", "operationId": "get_mitm_definition", "parameters": [{"name": "mitm", "in": "query", "required": true, "schema": {"$ref": "#/components/schemas/MITM"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/MITMDefinition"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/definitions/mitm-data-types": {"get": {"tags": ["definitions"], "summary": "Get Mitm Data Types", "operationId": "get_mitm_data_types", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"additionalProperties": {"$ref": "#/components/schemas/MitMDataTypeInfos"}, "type": "object", "title": "Response Get Mitm Data Types Definitions Mitm Data Types Get"}}}}}}}, "/session/start-session": {"post": {"tags": ["session"], "summary": "Start Session", "operationId": "start_session", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/SessionIdResponse"}}}}}}}, "/session/get-session": {"get": {"tags": ["session"], "summary": "Get Session", "operationId": "get_session", "parameters": [{"name": "simple_session", "in": "cookie", "required": true, "schema": {"type": "string", "title": "Simple Session"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/SessionIdResponse"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/session/stop-session": {"post": {"tags": ["session"], "summary": "Stop Session", "operationId": "stop_session", "parameters": [{"name": "simple_session", "in": "cookie", "required": true, "schema": {"type": "string", "title": "Simple Session"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/session/upload-db": {"post": {"tags": ["session"], "summary": "Upload Db", "operationId": "upload_db", "parameters": [{"name": "simple_session", "in": "cookie", "required": true, "schema": {"type": "string", "title": "Simple Session"}}], "requestBody": {"required": true, "content": {"multipart/form-data": {"schema": {"$ref": "#/components/schemas/Body_upload_db_session_upload_db_post"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/session/connect-db": {"post": {"tags": ["session"], "summary": "Connect Db", "operationId": "connect_db", "parameters": [{"name": "simple_session", "in": "cookie", "required": true, "schema": {"type": "string", "title": "Simple Session"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Body_connect_db_session_connect_db_post"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/session/test-db-conn": {"get": {"tags": ["session"], "summary": "Test Db Conn", "operationId": "test_db_conn", "parameters": [{"name": "simple_session", "in": "cookie", "required": true, "schema": {"type": "string", "title": "Simple Session"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DBConnTestResponse"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/session/keep-alive": {"get": {"tags": ["session"], "summary": "Keep Alive", "operationId": "keep_alive", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/KeepAliveResponse"}}}}}}}, "/control/reflect-db": {"post": {"tags": ["control"], "summary": "Reflect Db", "operationId": "reflect_db", "parameters": [{"name": "simple_session", "in": "cookie", "required": true, "schema": {"type": "string", "title": "Simple Session"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/control/init-working-db": {"post": {"tags": ["control"], "summary": "Init Working Db", "operationId": "init_working_db", "parameters": [{"name": "simple_session", "in": "cookie", "required": true, "schema": {"type": "string", "title": "Simple Session"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/control/mark-foreign-key": {"post": {"tags": ["control"], "summary": "Mark Foreign Key", "operationId": "mark_foreign_key", "parameters": [{"name": "source", "in": "query", "required": false, "schema": {"allOf": [{"$ref": "#/components/schemas/SourceDBType"}], "default": "original", "title": "Source"}}, {"name": "simple_session", "in": "cookie", "required": true, "schema": {"type": "string", "title": "Simple Session"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ForeignKeyConstraintRequest"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/FKCreationResponse"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/control/virtual-view": {"put": {"tags": ["control"], "summary": "Create Virtual View", "operationId": "create_virtual_view", "parameters": [{"name": "override_if_exists", "in": "query", "required": false, "schema": {"type": "boolean", "default": true, "title": "Override If Exists"}}, {"name": "verify_immediately", "in": "query", "required": false, "schema": {"type": "boolean", "default": true, "title": "Verify Immediately"}}, {"name": "simple_session", "in": "cookie", "required": true, "schema": {"type": "string", "title": "Simple Session"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/VirtualViewCreationRequest"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/VirtualViewResponse"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "get": {"tags": ["control"], "summary": "Get Virtual View", "operationId": "get_virtual_view", "parameters": [{"name": "view", "in": "query", "required": true, "schema": {"type": "string", "title": "View"}}, {"name": "schema", "in": "query", "required": false, "schema": {"type": "string", "default": "virtual", "title": "Schema"}}, {"name": "simple_session", "in": "cookie", "required": true, "schema": {"type": "string", "title": "Simple Session"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/VirtualViewResponse"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "delete": {"tags": ["control"], "summary": "Drop Virtual View", "operationId": "drop_virtual_view", "parameters": [{"name": "view", "in": "query", "required": true, "schema": {"type": "string", "title": "View"}}, {"name": "schema", "in": "query", "required": false, "schema": {"type": "string", "default": "virtual", "title": "Schema"}}, {"name": "simple_session", "in": "cookie", "required": true, "schema": {"type": "string", "title": "Simple Session"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/control/virtual-views": {"get": {"tags": ["control"], "summary": "Get Virtual Views", "operationId": "get_virtual_views", "parameters": [{"name": "simple_session", "in": "cookie", "required": true, "schema": {"type": "string", "title": "Simple Session"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"type": "array", "items": {"$ref": "#/components/schemas/VirtualViewResponse"}, "title": "Response Get Virtual Views Control Virtual Views Get"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/control/compiled-virtual-view": {"get": {"tags": ["control"], "summary": "Get Compiled Virtual View", "operationId": "get_compiled_virtual_view", "parameters": [{"name": "view", "in": "query", "required": true, "schema": {"type": "string", "title": "View"}}, {"name": "schema", "in": "query", "required": false, "schema": {"type": "string", "default": "virtual", "title": "Schema"}}, {"name": "simple_session", "in": "cookie", "required": true, "schema": {"type": "string", "title": "Simple Session"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/CompiledVirtualView"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/control/compiled-virtual-views": {"get": {"tags": ["control"], "summary": "Get Compiled Virtual Views", "operationId": "get_compiled_virtual_views", "parameters": [{"name": "simple_session", "in": "cookie", "required": true, "schema": {"type": "string", "title": "Simple Session"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"type": "array", "items": {"$ref": "#/components/schemas/CompiledVirtualView"}, "title": "Response Get Compiled Virtual Views Control Compiled Virtual Views Get"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/control/virtual-views-batch": {"put": {"tags": ["control"], "summary": "Create Virtual Views Batch", "operationId": "create_virtual_views_batch", "parameters": [{"name": "override_if_exists", "in": "query", "required": false, "schema": {"type": "boolean", "default": true, "title": "Override If Exists"}}, {"name": "simple_session", "in": "cookie", "required": true, "schema": {"type": "string", "title": "Simple Session"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "array", "items": {"$ref": "#/components/schemas/VirtualViewCreationRequest"}, "title": "Requests"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"type": "array", "items": {"$ref": "#/components/schemas/VirtualViewResponse"}, "title": "Response Create Virtual Views Batch Control Virtual Views Batch Put"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/data/raw-query": {"post": {"tags": ["data"], "summary": "Raw Query", "operationId": "raw_query", "parameters": [{"name": "simple_session", "in": "cookie", "required": true, "schema": {"type": "string", "title": "Simple Session"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Body_raw_query_data_raw_query_post"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"type": "array", "items": {"type": "array", "items": {}}, "title": "Response Raw Query Data Raw Query Post"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/data/query-table": {"get": {"tags": ["data"], "summary": "Query Table", "operationId": "query_table", "parameters": [{"name": "table", "in": "query", "required": true, "schema": {"type": "string", "title": "Table"}}, {"name": "schema", "in": "query", "required": false, "schema": {"type": "string", "default": "main", "title": "Schema"}}, {"name": "source", "in": "query", "required": false, "schema": {"allOf": [{"$ref": "#/components/schemas/SourceDBType"}], "default": "original", "title": "Source"}}, {"name": "offset", "in": "query", "required": false, "schema": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Offset"}}, {"name": "limit", "in": "query", "required": false, "schema": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Limit"}}, {"name": "include_table_meta", "in": "query", "required": false, "schema": {"type": "boolean", "default": false, "title": "Include Table Meta"}}, {"name": "simple_session", "in": "cookie", "required": true, "schema": {"type": "string", "title": "Simple Session"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TableQueryResult"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/data/query-unique-values": {"get": {"tags": ["data"], "summary": "Query Unique Values", "operationId": "query_unique_values", "parameters": [{"name": "table", "in": "query", "required": true, "schema": {"type": "string", "title": "Table"}}, {"name": "column", "in": "query", "required": true, "schema": {"type": "string", "title": "Column"}}, {"name": "schema", "in": "query", "required": false, "schema": {"type": "string", "default": "main", "title": "Schema"}}, {"name": "source", "in": "query", "required": false, "schema": {"allOf": [{"$ref": "#/components/schemas/SourceDBType"}], "default": "original", "title": "Source"}}, {"name": "simple_session", "in": "cookie", "required": true, "schema": {"type": "string", "title": "Simple Session"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"type": "array", "items": {}, "title": "Response Query Unique Values Data Query Unique Values Get"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/data/er-diagram": {"get": {"tags": ["data"], "summary": "Make Erd", "operationId": "make_erd", "parameters": [{"name": "version", "in": "query", "required": false, "schema": {"allOf": [{"$ref": "#/components/schemas/ERVariant"}], "default": "mermaid", "title": "Version"}}, {"name": "source", "in": "query", "required": false, "schema": {"allOf": [{"$ref": "#/components/schemas/SourceDBType"}], "default": "original", "title": "Source"}}, {"name": "simple_session", "in": "cookie", "required": true, "schema": {"type": "string", "title": "Simple Session"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/data/filtered-er-diagram": {"post": {"tags": ["data"], "summary": "Make Filtered Erd", "operationId": "make_filtered_erd", "parameters": [{"name": "version", "in": "query", "required": false, "schema": {"allOf": [{"$ref": "#/components/schemas/ERVariant"}], "default": "mermaid", "title": "Version"}}, {"name": "source", "in": "query", "required": false, "schema": {"allOf": [{"$ref": "#/components/schemas/SourceDBType"}], "default": "original", "title": "Source"}}, {"name": "simple_session", "in": "cookie", "required": true, "schema": {"type": "string", "title": "Simple Session"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DBSchemaSelectionRequest"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/reflection/table-schema": {"get": {"tags": ["reflection"], "summary": "Get Table Schema", "operationId": "get_table_schema", "parameters": [{"name": "table", "in": "query", "required": true, "schema": {"type": "string", "title": "Table"}}, {"name": "schema", "in": "query", "required": false, "schema": {"type": "string", "default": "main", "title": "Schema"}}, {"name": "source", "in": "query", "required": false, "schema": {"allOf": [{"$ref": "#/components/schemas/SourceDBType"}], "default": "original", "title": "Source"}}, {"name": "simple_session", "in": "cookie", "required": true, "schema": {"type": "string", "title": "Simple Session"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TableMetaInfoBase"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/reflection/db-schema": {"get": {"tags": ["reflection"], "summary": "Get Db Schema", "operationId": "get_db_schema", "parameters": [{"name": "source", "in": "query", "required": false, "schema": {"allOf": [{"$ref": "#/components/schemas/SourceDBType"}], "default": "original", "title": "Source"}}, {"name": "simple_session", "in": "cookie", "required": true, "schema": {"type": "string", "title": "Simple Session"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DBMetaInfoBase"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/reflection/filter-db-schema": {"post": {"tags": ["reflection"], "summary": "Filter Db Schema", "operationId": "filter_db_schema", "parameters": [{"name": "source", "in": "query", "required": false, "schema": {"allOf": [{"$ref": "#/components/schemas/SourceDBType"}], "default": "original", "title": "Source"}}, {"name": "simple_session", "in": "cookie", "required": true, "schema": {"type": "string", "title": "Simple Session"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DBSchemaSelectionRequest"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DBMetaInfoBase"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/reflection/query-db-schema": {"post": {"tags": ["reflection"], "summary": "Query Db Schema", "operationId": "query_db_schema", "parameters": [{"name": "store_intermediate_table_probes", "in": "query", "required": false, "schema": {"type": "boolean", "default": true, "title": "Store Intermediate Table Probes"}}, {"name": "source", "in": "query", "required": false, "schema": {"allOf": [{"$ref": "#/components/schemas/SourceDBType"}], "default": "original", "title": "Source"}}, {"name": "simple_session", "in": "cookie", "required": true, "schema": {"type": "string", "title": "Simple Session"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DBSchemaQueryRequest"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DBMetaInfoBase"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/reflection/suggest-joins": {"get": {"tags": ["reflection"], "summary": "Suggest Joins", "operationId": "suggest_joins", "parameters": [{"name": "table", "in": "query", "required": true, "schema": {"type": "string", "title": "Table"}}, {"name": "schema", "in": "query", "required": false, "schema": {"type": "string", "default": "main", "title": "Schema"}}, {"name": "source", "in": "query", "required": false, "schema": {"allOf": [{"$ref": "#/components/schemas/SourceDBType"}], "default": "original", "title": "Source"}}, {"name": "simple_session", "in": "cookie", "required": true, "schema": {"type": "string", "title": "Simple Session"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"type": "array", "items": {"type": "array", "prefixItems": [{"type": "string"}, {"type": "string"}], "minItems": 2, "maxItems": 2}, "title": "Response Suggest Joins Reflection Suggest Joins Get"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/reflection/probe-table": {"post": {"tags": ["reflection"], "summary": "Probe Table", "operationId": "probe_table", "parameters": [{"name": "table", "in": "query", "required": true, "schema": {"type": "string", "title": "Table"}}, {"name": "schema", "in": "query", "required": false, "schema": {"type": "string", "default": "main", "title": "Schema"}}, {"name": "source", "in": "query", "required": false, "schema": {"allOf": [{"$ref": "#/components/schemas/SourceDBType"}], "default": "original", "title": "Source"}}, {"name": "sample_size", "in": "query", "required": false, "schema": {"type": "integer", "default": 100, "title": "Sample Size"}}, {"name": "override_if_exists", "in": "query", "required": false, "schema": {"type": "boolean", "default": false, "title": "Override If Exists"}}, {"name": "store_results", "in": "query", "required": false, "schema": {"type": "boolean", "default": true, "title": "Store Results"}}, {"name": "simple_session", "in": "cookie", "required": true, "schema": {"type": "string", "title": "Simple Session"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TableProbeBase"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/reflection/probe-db": {"post": {"tags": ["reflection"], "summary": "Probe Db", "operationId": "probe_db", "parameters": [{"name": "source", "in": "query", "required": false, "schema": {"allOf": [{"$ref": "#/components/schemas/SourceDBType"}], "default": "original", "title": "Source"}}, {"name": "sample_size", "in": "query", "required": false, "schema": {"type": "integer", "default": 100, "title": "Sample Size"}}, {"name": "override_if_exists", "in": "query", "required": false, "schema": {"type": "boolean", "default": false, "title": "Override If Exists"}}, {"name": "store_results", "in": "query", "required": false, "schema": {"type": "boolean", "default": true, "title": "Store Results"}}, {"name": "simple_session", "in": "cookie", "required": true, "schema": {"type": "string", "title": "Simple Session"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "object", "additionalProperties": {"type": "array", "uniqueItems": true, "items": {"type": "string"}}, "title": "Table Selection"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DBProbeBase"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/mitm/validate-concept-mapping": {"post": {"tags": ["mitm"], "summary": "Validate Concept Mapping", "operationId": "validate_concept_mapping", "parameters": [{"name": "include_request", "in": "query", "required": false, "schema": {"type": "boolean", "default": false, "title": "Include Request"}}, {"name": "simple_session", "in": "cookie", "required": true, "schema": {"type": "string", "title": "Simple Session"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ConceptMapping-Input"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/MappingValidationResult"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/mitm/export-mitm": {"post": {"tags": ["mitm"], "summary": "Export Mitm", "operationId": "export_mitm", "parameters": [{"name": "simple_session", "in": "cookie", "required": true, "schema": {"type": "string", "title": "Simple Session"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ExportRequest"}}}}, "responses": {"200": {"description": "Successful Response"}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/mitm/publish-mitm-export": {"post": {"tags": ["mitm"], "summary": "Publish Mitm Export", "operationId": "publish_mitm_export", "parameters": [{"name": "simple_session", "in": "cookie", "required": true, "schema": {"type": "string", "title": "Simple Session"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ExportRequest"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/PublishedMitMResponse"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/mitm/delete-mitm-export": {"post": {"tags": ["mitm"], "summary": "Delete Mitm Export", "operationId": "delete_mitm_export", "parameters": [{"name": "export_id", "in": "query", "required": true, "schema": {"type": "integer", "title": "Export Id"}}, {"name": "simple_session", "in": "cookie", "required": true, "schema": {"type": "string", "title": "Simple Session"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/mitm/delete-mitm-exports": {"post": {"tags": ["mitm"], "summary": "Delete Mitm Exports", "operationId": "delete_mitm_exports", "parameters": [{"name": "simple_session", "in": "cookie", "required": true, "schema": {"type": "string", "title": "Simple Session"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/": {"get": {"summary": "Root", "operationId": "root", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}}}}, "components": {"schemas": {"AddColumn": {"properties": {"operation": {"type": "string", "enum": ["add_column"], "const": "add_column", "title": "Operation", "default": "add_column"}, "col_name": {"type": "string", "title": "Col Name"}, "value": {"title": "Value"}, "target_type": {"anyOf": [{"$ref": "#/components/schemas/WrappedMITMDataType"}, {"type": "string"}], "title": "Target Type"}}, "type": "object", "required": ["col_name", "value", "target_type"], "title": "AddColumn"}, "Body_connect_db_session_connect_db_post": {"properties": {"db_url": {"type": "string", "minLength": 1, "format": "uri", "title": "Db Url"}}, "type": "object", "required": ["db_url"], "title": "Body_connect_db_session_connect_db_post"}, "Body_raw_query_data_raw_query_post": {"properties": {"query": {"type": "string", "title": "Query"}}, "type": "object", "required": ["query"], "title": "Body_raw_query_data_raw_query_post"}, "Body_upload_db_session_upload_db_post": {"properties": {"sqlite": {"type": "string", "format": "binary", "title": "Sqlite", "description": "Upload a sqlite db file here."}}, "type": "object", "required": ["sqlite"], "title": "Body_upload_db_session_upload_db_post"}, "CastColumn": {"properties": {"operation": {"type": "string", "enum": ["cast_column"], "const": "cast_column", "title": "Operation", "default": "cast_column"}, "target_type": {"anyOf": [{"$ref": "#/components/schemas/WrappedMITMDataType"}, {"type": "string"}], "title": "Target Type"}}, "type": "object", "required": ["target_type"], "title": "CastColumn"}, "CategoricalSummaryStatistics": {"properties": {"count": {"type": "integer", "minimum": 0.0, "title": "Count"}, "unique": {"type": "integer", "minimum": 0.0, "title": "Unique"}, "top": {"type": "string", "title": "Top"}, "freq": {"type": "integer", "minimum": 0.0, "title": "Freq"}}, "type": "object", "required": ["count", "unique", "top", "freq"], "title": "CategoricalSummaryStatistics"}, "ColumnProperties": {"properties": {"nullable": {"type": "boolean", "title": "Nullable"}, "unique": {"type": "boolean", "title": "Unique"}, "part_of_pk": {"type": "boolean", "title": "Part Of Pk"}, "part_of_fk": {"type": "boolean", "title": "Part Of Fk"}, "part_of_index": {"type": "boolean", "title": "Part Of Index"}, "mitm_data_type": {"$ref": "#/components/schemas/MITMDataType"}}, "type": "object", "required": ["nullable", "unique", "part_of_pk", "part_of_fk", "part_of_index", "mitm_data_type"], "title": "ColumnProperties"}, "CompiledVirtualView": {"properties": {"dialect": {"type": "string", "title": "Dialect"}, "compiled_sql": {"type": "string", "title": "Compiled Sql"}, "columns": {"items": {"type": "string"}, "type": "array", "title": "Columns"}, "column_dtypes": {"items": {"anyOf": [{"$ref": "#/components/schemas/WrappedMITMDataType"}, {"type": "string"}]}, "type": "array", "title": "Column Dtypes"}, "name": {"type": "string", "title": "Name"}, "schema_name": {"type": "string", "title": "Schema Name"}}, "type": "object", "required": ["dialect", "compiled_sql", "columns", "column_dtypes", "name", "schema_name"], "title": "CompiledVirtualView"}, "ConceptMapping-Input": {"properties": {"mitm": {"$ref": "#/components/schemas/MITM"}, "concept": {"type": "string", "title": "Concept"}, "base_table": {"anyOf": [{"$ref": "#/components/schemas/TableIdentifier"}, {"prefixItems": [{"$ref": "#/components/schemas/SourceDBType"}, {"type": "string"}, {"type": "string"}], "type": "array", "maxItems": 3, "minItems": 3}, {"prefixItems": [{"type": "string"}, {"type": "string"}], "type": "array", "maxItems": 2, "minItems": 2}], "title": "Base Table"}, "kind_col": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Kind Col"}, "type_col": {"type": "string", "title": "Type Col"}, "identity_columns": {"anyOf": [{"additionalProperties": {"type": "string"}, "type": "object"}, {"items": {"type": "string"}, "type": "array"}], "title": "Identity Columns"}, "inline_relations": {"anyOf": [{"additionalProperties": {"type": "string"}, "type": "object"}, {"items": {"type": "string"}, "type": "array"}], "title": "Inline Relations"}, "foreign_relations": {"additionalProperties": {"$ref": "#/components/schemas/ForeignRelation-Input"}, "type": "object", "title": "Foreign Relations"}, "attributes": {"items": {"type": "string"}, "type": "array", "title": "Attributes"}, "attribute_dtypes": {"items": {"$ref": "#/components/schemas/MITMDataType"}, "type": "array", "title": "Attribute Dtypes"}}, "type": "object", "required": ["mitm", "concept", "base_table", "type_col"], "title": "ConceptMapping"}, "ConceptMapping-Output": {"properties": {"mitm": {"$ref": "#/components/schemas/MITM"}, "concept": {"type": "string", "title": "Concept"}, "base_table": {"anyOf": [{"$ref": "#/components/schemas/TableIdentifier"}, {"prefixItems": [{"$ref": "#/components/schemas/SourceDBType"}, {"type": "string"}, {"type": "string"}], "type": "array", "maxItems": 3, "minItems": 3}, {"prefixItems": [{"type": "string"}, {"type": "string"}], "type": "array", "maxItems": 2, "minItems": 2}], "title": "Base Table"}, "kind_col": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Kind Col"}, "type_col": {"type": "string", "title": "Type Col"}, "identity_columns": {"anyOf": [{"additionalProperties": {"type": "string"}, "type": "object"}, {"items": {"type": "string"}, "type": "array"}], "title": "Identity Columns"}, "inline_relations": {"anyOf": [{"additionalProperties": {"type": "string"}, "type": "object"}, {"items": {"type": "string"}, "type": "array"}], "title": "Inline Relations"}, "foreign_relations": {"additionalProperties": {"$ref": "#/components/schemas/ForeignRelation-Output"}, "type": "object", "title": "Foreign Relations"}, "attributes": {"items": {"type": "string"}, "type": "array", "title": "Attributes"}, "attribute_dtypes": {"items": {"$ref": "#/components/schemas/MITMDataType"}, "type": "array", "title": "Attribute Dtypes"}}, "type": "object", "required": ["mitm", "concept", "base_table", "type_col"], "title": "ConceptMapping"}, "ConceptNature": {"type": "string", "enum": ["main", "sub", "weak"], "title": "ConceptNature"}, "ConceptProperties": {"properties": {"nature": {"$ref": "#/components/schemas/ConceptNature"}, "key": {"type": "string", "title": "Key"}, "plural": {"type": "string", "title": "Plural"}, "typing_concept": {"type": "string", "title": "Typing Concept", "default": "type"}, "column_group_ordering": {"items": {"type": "string", "enum": ["kind", "type", "identity-relations", "inline-relations", "foreign-relations", "attributes"]}, "type": "array", "title": "Column Group Ordering", "default": ["kind", "type", "identity-relations", "inline-relations", "foreign-relations", "attributes"]}, "permit_attributes": {"type": "boolean", "title": "Permit Attributes", "default": true}}, "type": "object", "required": ["nature", "key", "plural"], "title": "ConceptProperties"}, "DBConnTestResponse": {"properties": {"db_url": {"type": "string", "minLength": 1, "format": "uri", "title": "Db Url"}, "success": {"type": "boolean", "title": "Success"}, "error": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Error"}}, "type": "object", "required": ["db_url", "success"], "title": "DBConnTestResponse"}, "DBMetaInfoBase": {"properties": {"db_structure": {"additionalProperties": {"additionalProperties": {"$ref": "#/components/schemas/TableMetaInfoBase"}, "type": "object"}, "type": "object", "title": "Db Structure"}, "tables": {"additionalProperties": {"$ref": "#/components/schemas/TableMetaInfoBase"}, "type": "object", "title": "Tables", "readOnly": true}}, "type": "object", "required": ["db_structure", "tables"], "title": "DBMetaInfoBase"}, "DBMetaQuery": {"properties": {"syntactic_table_conditions": {"items": {"$ref": "#/components/schemas/SyntacticTableCondition"}, "type": "array", "title": "Syntactic Table Conditions"}, "semantic_table_conditions": {"items": {"$ref": "#/components/schemas/SemanticTableCondition"}, "type": "array", "title": "Semantic Table Conditions"}, "syntactic_column_conditions": {"items": {"$ref": "#/components/schemas/SyntacticColumnCondition"}, "type": "array", "title": "Syntactic Column Conditions"}, "semantic_column_conditions": {"items": {"$ref": "#/components/schemas/SemanticColumnCondition"}, "type": "array", "title": "Semantic Column Conditions"}}, "type": "object", "title": "DBMetaQuery"}, "DBProbeBase": {"properties": {"table_probes": {"additionalProperties": {"$ref": "#/components/schemas/TableProbeBase"}, "type": "object", "title": "Table Probes"}, "db_meta": {"$ref": "#/components/schemas/DBMetaInfoBase"}}, "type": "object", "required": ["db_meta"], "title": "DBProbeBase"}, "DBSchemaQueryRequest": {"properties": {"query": {"$ref": "#/components/schemas/DBMetaQuery"}, "filter_columns": {"type": "boolean", "title": "Filter Columns", "default": false}}, "type": "object", "required": ["query"], "title": "DBSchemaQueryRequest"}, "DBSchemaSelectionRequest": {"properties": {"selection": {"anyOf": [{"additionalProperties": {"items": {"type": "string"}, "type": "array", "uniqueItems": true}, "type": "object"}, {"additionalProperties": {"additionalProperties": {"items": {"type": "string"}, "type": "array", "uniqueItems": true}, "type": "object"}, "type": "object"}], "title": "Selection"}, "filter_columns": {"type": "boolean", "title": "Filter Columns", "default": false}}, "type": "object", "required": ["selection"], "title": "DBSchemaSelectionRequest"}, "DatetimeSummaryStatistics": {"properties": {"count": {"type": "integer", "title": "Count"}, "mean": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Mean"}, "min": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Min"}, "max": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Max"}, "percentile_25": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Percentile 25"}, "percentile_50": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Percentile 50"}, "percentile_75": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Percentile 75"}}, "type": "object", "required": ["count"], "title": "DatetimeSummaryStatistics"}, "ERVariant": {"type": "string", "enum": ["image", "mermaid"], "title": "ERVariant"}, "EditColumns": {"properties": {"operation": {"type": "string", "enum": ["edit_columns"], "const": "edit_columns", "title": "Operation", "default": "edit_columns"}, "transforms": {"additionalProperties": {"oneOf": [{"$ref": "#/components/schemas/CastColumn"}], "discriminator": {"propertyName": "operation", "mapping": {"cast_column": "#/components/schemas/CastColumn"}}}, "type": "object", "title": "Transforms"}, "renames": {"additionalProperties": {"type": "string"}, "type": "object", "title": "Renames"}, "drops": {"items": {"type": "string"}, "type": "array", "uniqueItems": true, "title": "Drops"}, "additions": {"additionalProperties": {"items": {"oneOf": [{"$ref": "#/components/schemas/AddColumn"}, {"$ref": "#/components/schemas/ExtractJson"}], "discriminator": {"propertyName": "operation", "mapping": {"add_column": "#/components/schemas/AddColumn", "extract_json": "#/components/schemas/ExtractJson"}}}, "type": "array"}, "type": "object", "title": "Additions"}}, "type": "object", "title": "EditColumns"}, "ExistingTable": {"properties": {"operation": {"type": "string", "enum": ["existing"], "const": "existing", "title": "Operation", "default": "existing"}, "base_table": {"anyOf": [{"$ref": "#/components/schemas/TableIdentifier"}, {"prefixItems": [{"$ref": "#/components/schemas/SourceDBType"}, {"type": "string"}, {"type": "string"}], "type": "array", "maxItems": 3, "minItems": 3}, {"prefixItems": [{"type": "string"}, {"type": "string"}], "type": "array", "maxItems": 2, "minItems": 2}], "title": "Base Table"}}, "type": "object", "required": ["base_table"], "title": "ExistingTable"}, "ExportRequest": {"properties": {"mitm": {"$ref": "#/components/schemas/MITM"}, "mapped_concepts": {"items": {"$ref": "#/components/schemas/ConceptMapping-Input"}, "type": "array", "title": "Mapped Concepts"}, "post_processing": {"anyOf": [{"$ref": "#/components/schemas/PostProcessing"}, {"type": "null"}]}, "filename": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Filename"}}, "type": "object", "required": ["mitm", "mapped_concepts"], "title": "ExportRequest"}, "ExtractJson": {"properties": {"operation": {"type": "string", "enum": ["extract_json"], "const": "extract_json", "title": "Operation", "default": "extract_json"}, "json_col": {"type": "string", "title": "Json Col"}, "attributes": {"additionalProperties": {"items": {"type": "string"}, "type": "array"}, "type": "object", "title": "Attributes"}}, "type": "object", "required": ["json_col", "attributes"], "title": "ExtractJson"}, "FKCreationResponse": {"properties": {"status": {"type": "boolean", "title": "Status"}, "error": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Error"}}, "type": "object", "required": ["status"], "title": "FKCreationResponse"}, "ForeignKeyConstraintBase": {"properties": {"name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name"}, "table": {"anyOf": [{"$ref": "#/components/schemas/LocalTableIdentifier"}, {"prefixItems": [{"type": "string"}, {"type": "string"}], "type": "array", "maxItems": 2, "minItems": 2}], "title": "Table"}, "columns": {"items": {"type": "string"}, "type": "array", "title": "Columns"}, "target_table": {"anyOf": [{"$ref": "#/components/schemas/LocalTableIdentifier"}, {"prefixItems": [{"type": "string"}, {"type": "string"}], "type": "array", "maxItems": 2, "minItems": 2}], "title": "Target Table"}, "target_columns": {"items": {"type": "string"}, "type": "array", "title": "Target Columns"}}, "type": "object", "required": ["table", "columns", "target_table", "target_columns"], "title": "ForeignKeyConstraintBase"}, "ForeignKeyConstraintRequest": {"properties": {"name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name"}, "table": {"anyOf": [{"$ref": "#/components/schemas/LocalTableIdentifier"}, {"prefixItems": [{"type": "string"}, {"type": "string"}], "type": "array", "maxItems": 2, "minItems": 2}], "title": "Table"}, "columns": {"items": {"type": "string"}, "type": "array", "title": "Columns"}, "target_table": {"anyOf": [{"$ref": "#/components/schemas/LocalTableIdentifier"}, {"prefixItems": [{"type": "string"}, {"type": "string"}], "type": "array", "maxItems": 2, "minItems": 2}], "title": "Target Table"}, "target_columns": {"items": {"type": "string"}, "type": "array", "title": "Target Columns"}}, "type": "object", "required": ["table", "columns", "target_table", "target_columns"], "title": "ForeignKeyConstraintRequest"}, "ForeignRelation-Input": {"properties": {"fk_columns": {"anyOf": [{"additionalProperties": {"type": "string"}, "type": "object"}, {"items": {"type": "string"}, "type": "array"}], "title": "Fk Columns"}, "referred_table": {"anyOf": [{"$ref": "#/components/schemas/TableIdentifier"}, {"prefixItems": [{"$ref": "#/components/schemas/SourceDBType"}, {"type": "string"}, {"type": "string"}], "type": "array", "maxItems": 3, "minItems": 3}, {"prefixItems": [{"type": "string"}, {"type": "string"}], "type": "array", "maxItems": 2, "minItems": 2}], "title": "Referred Table"}, "referred_columns": {"items": {"type": "string"}, "type": "array", "title": "Referred Columns"}}, "type": "object", "required": ["fk_columns", "referred_table", "referred_columns"], "title": "ForeignRelation"}, "ForeignRelation-Output": {"properties": {"fk_columns": {"anyOf": [{"additionalProperties": {"type": "string"}, "type": "object"}, {"items": {"type": "string"}, "type": "array"}], "title": "Fk Columns"}, "referred_table": {"anyOf": [{"$ref": "#/components/schemas/TableIdentifier"}, {"prefixItems": [{"$ref": "#/components/schemas/SourceDBType"}, {"type": "string"}, {"type": "string"}], "type": "array", "maxItems": 3, "minItems": 3}, {"prefixItems": [{"type": "string"}, {"type": "string"}], "type": "array", "maxItems": 2, "minItems": 2}], "title": "Referred Table"}, "referred_columns": {"items": {"type": "string"}, "type": "array", "title": "Referred Columns"}}, "type": "object", "required": ["fk_columns", "referred_table", "referred_columns"], "title": "ForeignRelation"}, "HTTPValidationError": {"properties": {"detail": {"items": {"$ref": "#/components/schemas/ValidationError"}, "type": "array", "title": "Detail"}}, "type": "object", "title": "HTTPValidationError"}, "KeepAliveResponse": {"properties": {"server_status": {"type": "string", "enum": ["available"], "const": "available", "title": "Server Status", "default": "available"}, "session_status": {"type": "string", "enum": ["missing session cookie", "session invalid", "session valid"], "title": "Session Status"}}, "type": "object", "required": ["session_status"], "title": "KeepAliveResponse"}, "Limit": {"properties": {"operation": {"type": "string", "enum": ["limit"], "const": "limit", "title": "Operation", "default": "limit"}, "limit": {"type": "integer", "title": "Limit"}}, "type": "object", "required": ["limit"], "title": "Limit"}, "LocalTableIdentifier": {"properties": {"name": {"type": "string", "title": "Name"}, "schema": {"type": "string", "title": "Schema", "default": "main"}}, "type": "object", "required": ["name"], "title": "LocalTableIdentifier"}, "MITM": {"type": "string", "enum": ["MAED"], "const": "MAED", "title": "MITM"}, "MITMDataType": {"type": "string", "enum": ["text", "json", "integer", "numeric", "boolean", "datetime", "unknown", "infer"], "title": "MITMDataType"}, "MITMDefinition": {"properties": {"main_concepts": {"items": {"type": "string"}, "type": "array", "uniqueItems": true, "title": "Main Concepts"}, "weak_concepts": {"additionalProperties": {"$ref": "#/components/schemas/MITMDataType"}, "type": "object", "title": "Weak Concepts"}, "sub_concepts": {"additionalProperties": {"items": {"type": "string"}, "type": "array", "uniqueItems": true}, "type": "object", "title": "Sub Concepts"}, "concept_relations": {"additionalProperties": {"$ref": "#/components/schemas/OwnedRelations"}, "type": "object", "title": "Concept Relations"}, "concept_properties": {"additionalProperties": {"$ref": "#/components/schemas/ConceptProperties"}, "type": "object", "title": "Concept Properties"}, "leaf_concepts": {"items": {"type": "string"}, "type": "array", "uniqueItems": true, "title": "Leaf Concepts", "readOnly": true}, "abstract_concepts": {"items": {"type": "string"}, "type": "array", "uniqueItems": true, "title": "Abstract Concepts", "readOnly": true}, "parent_concepts_map": {"additionalProperties": {"type": "string"}, "type": "object", "title": "Parent Concepts Map", "readOnly": true}}, "type": "object", "required": ["main_concepts", "weak_concepts", "sub_concepts", "concept_relations", "concept_properties", "leaf_concepts", "abstract_concepts", "parent_concepts_map"], "title": "MITMDefinition"}, "MappingValidationResult": {"properties": {"evaluated_mapping": {"anyOf": [{"$ref": "#/components/schemas/ConceptMapping-Output"}, {"type": "null"}]}, "validation_result": {"$ref": "#/components/schemas/ValidationResult"}}, "type": "object", "required": ["validation_result"], "title": "MappingValidationResult"}, "MitMDataTypeInfos": {"properties": {"sql_type": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Sql Type"}}, "type": "object", "required": ["sql_type"], "title": "MitMDataTypeInfos"}, "NumericSummaryStatistics": {"properties": {"count": {"type": "integer", "title": "Count"}, "mean": {"type": "number", "title": "Mean"}, "min": {"type": "number", "title": "Min"}, "max": {"type": "number", "title": "Max"}, "std": {"anyOf": [{"type": "number"}, {"type": "null"}], "title": "Std"}, "percentile_25": {"type": "number", "title": "Percentile 25"}, "percentile_50": {"type": "number", "title": "Percentile 50"}, "percentile_75": {"type": "number", "title": "Percentile 75"}}, "type": "object", "required": ["count", "mean", "min", "max", "percentile_25", "percentile_50", "percentile_75"], "title": "NumericSummaryStatistics"}, "OwnedRelations": {"properties": {"identity": {"additionalProperties": {"type": "string"}, "type": "object", "title": "Identity"}, "inline": {"additionalProperties": {"type": "string"}, "type": "object", "title": "Inline"}, "to_one": {"additionalProperties": {"additionalProperties": {"type": "string"}, "type": "object"}, "type": "object", "title": "To One"}, "to_many": {"additionalProperties": {"additionalProperties": {"type": "string"}, "type": "object"}, "type": "object", "title": "To Many"}}, "type": "object", "required": ["identity", "inline", "to_one", "to_many"], "title": "OwnedRelations"}, "PostProcessing": {"properties": {"table_postprocessing": {"items": {"$ref": "#/components/schemas/TablePostProcessing"}, "type": "array", "title": "Table Postprocessing"}}, "type": "object", "required": ["table_postprocessing"], "title": "PostProcessing"}, "PublishedMitMResponse": {"properties": {"url": {"type": "string", "maxLength": 2083, "minLength": 1, "format": "uri", "title": "Url"}, "relative_uri": {"type": "string", "title": "Relative Uri"}, "deletion_request_url": {"type": "string", "maxLength": 2083, "minLength": 1, "format": "uri", "title": "Deletion Request Url"}, "export_id": {"type": "integer", "title": "Export Id"}}, "type": "object", "required": ["url", "relative_uri", "deletion_request_url", "export_id"], "title": "PublishedMitMResponse"}, "RawCompiled": {"properties": {"operation": {"type": "string", "enum": ["raw"], "const": "raw", "title": "Operation", "default": "raw"}, "typed_query": {"$ref": "#/components/schemas/TypedRawQuery"}}, "type": "object", "required": ["typed_query"], "title": "RawCompiled"}, "ReselectColumns": {"properties": {"operation": {"type": "string", "enum": ["reselect_columns"], "const": "reselect_columns", "title": "Operation", "default": "reselect_columns"}, "selection": {"items": {"type": "string"}, "type": "array", "title": "Selection"}}, "type": "object", "required": ["selection"], "title": "ReselectColumns"}, "SampleSummary": {"properties": {"sample_size": {"anyOf": [{"type": "integer", "minimum": 0.0}, {"type": "null"}], "title": "Sample Size"}, "na_fraction": {"anyOf": [{"type": "number", "maximum": 1.0, "minimum": 0.0}, {"type": "null"}], "title": "Na Fraction"}, "unique_fraction": {"anyOf": [{"type": "number", "maximum": 1.0, "minimum": 0.0}, {"type": "null"}], "title": "Unique Fraction"}, "value_counts": {"anyOf": [{"additionalProperties": {"type": "integer"}, "type": "object"}, {"type": "null"}], "title": "Value Counts"}, "summary_statistics": {"anyOf": [{"$ref": "#/components/schemas/NumericSummaryStatistics"}, {"$ref": "#/components/schemas/CategoricalSummaryStatistics"}, {"$ref": "#/components/schemas/DatetimeSummaryStatistics"}, {"type": "null"}], "title": "Summary Statistics"}, "json_schema": {"anyOf": [{"type": "object"}, {"type": "null"}], "title": "Json Schema"}}, "type": "object", "title": "SampleSummary"}, "SemanticColumnCondition": {"properties": {"inferred_data_type": {"anyOf": [{"$ref": "#/components/schemas/MITMDataType"}, {"type": "null"}]}, "max_na_fraction": {"anyOf": [{"type": "number", "maximum": 1.0, "minimum": 0.0}, {"type": "null"}], "title": "Max Na Fraction"}, "value_in_range": {"anyOf": [{}, {"type": "null"}], "title": "Value In Range"}, "contained_value": {"anyOf": [{}, {"type": "null"}], "title": "Contained Value"}, "contained_datetime": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Contained Datetime"}}, "type": "object", "title": "SemanticColumnCondition"}, "SemanticTableCondition": {"properties": {"min_row_count": {"anyOf": [{"type": "integer", "minimum": 0.0}, {"type": "null"}], "title": "Min Row Count"}, "max_row_count": {"anyOf": [{"type": "integer", "minimum": 0.0}, {"type": "null"}], "title": "Max Row Count"}}, "type": "object", "title": "SemanticTableCondition"}, "SessionIdResponse": {"properties": {"session_id": {"type": "string", "format": "uuid", "title": "Session Id"}}, "type": "object", "required": ["session_id"], "title": "SessionIdResponse"}, "SimpleJoin": {"properties": {"operation": {"type": "string", "enum": ["join"], "const": "join", "title": "Operation", "default": "join"}, "left_table": {"anyOf": [{"$ref": "#/components/schemas/TableIdentifier"}, {"prefixItems": [{"$ref": "#/components/schemas/SourceDBType"}, {"type": "string"}, {"type": "string"}], "type": "array", "maxItems": 3, "minItems": 3}, {"prefixItems": [{"type": "string"}, {"type": "string"}], "type": "array", "maxItems": 2, "minItems": 2}], "title": "Left Table"}, "right_table": {"anyOf": [{"$ref": "#/components/schemas/TableIdentifier"}, {"prefixItems": [{"$ref": "#/components/schemas/SourceDBType"}, {"type": "string"}, {"type": "string"}], "type": "array", "maxItems": 3, "minItems": 3}, {"prefixItems": [{"type": "string"}, {"type": "string"}], "type": "array", "maxItems": 2, "minItems": 2}], "title": "Right Table"}, "on_cols_left": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "On Cols Left"}, "on_cols_right": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "On Cols Right"}, "is_outer": {"type": "boolean", "title": "Is Outer", "default": false}, "full": {"type": "boolean", "title": "Full", "default": false}, "selected_cols_left": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Selected Cols Left"}, "selected_cols_right": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Selected Cols Right"}, "left_alias": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Left Alias"}, "right_alias": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Right Alias"}}, "type": "object", "required": ["left_table", "right_table"], "title": "SimpleJoin"}, "SimpleSQLOperator": {"type": "string", "enum": ["ilike", "like", "=", ">=", ">", "<=", "<", "in", "notin"], "title": "SimpleSQLOperator"}, "SimpleWhere": {"properties": {"lhs": {"type": "string", "title": "Lhs"}, "operator": {"$ref": "#/components/schemas/SimpleSQLOperator"}, "rhs": {"anyOf": [{"type": "string"}, {"prefixItems": [{}, {"anyOf": [{"$ref": "#/components/schemas/WrappedMITMDataType"}, {"type": "string"}]}], "type": "array", "maxItems": 2, "minItems": 2}], "title": "Rhs"}}, "type": "object", "required": ["lhs", "operator", "rhs"], "title": "SimpleWhere"}, "SourceDBType": {"type": "string", "enum": ["original", "working", "virtual"], "title": "SourceDBType"}, "SyntacticColumnCondition": {"properties": {"name_regex": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Regex"}, "sql_data_type": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Sql Data Type"}, "mitm_data_type": {"anyOf": [{"$ref": "#/components/schemas/MITMDataType"}, {"type": "null"}]}}, "type": "object", "title": "SyntacticColumnCondition"}, "SyntacticTableCondition": {"properties": {"schema_regex": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Schema Regex"}, "name_regex": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Regex"}, "min_col_count": {"anyOf": [{"type": "integer", "minimum": 0.0}, {"type": "null"}], "title": "Min Col Count"}, "max_col_count": {"anyOf": [{"type": "integer", "minimum": 0.0}, {"type": "null"}], "title": "Max Col Count"}, "has_foreign_key": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Has Foreign Key"}}, "type": "object", "title": "SyntacticTableCondition"}, "TableFilter": {"properties": {"operation": {"type": "string", "enum": ["table_filter"], "const": "table_filter", "title": "Operation", "default": "table_filter"}, "wheres": {"items": {"$ref": "#/components/schemas/SimpleWhere"}, "type": "array", "title": "Wheres"}, "limit": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Limit"}}, "type": "object", "required": ["wheres"], "title": "TableFilter"}, "TableIdentifier": {"properties": {"source": {"allOf": [{"$ref": "#/components/schemas/SourceDBType"}], "default": "original"}, "schema": {"type": "string", "title": "Schema", "default": "main"}, "name": {"type": "string", "title": "Name"}}, "type": "object", "required": ["name"], "title": "TableIdentifier"}, "TableMetaInfoBase": {"properties": {"schema_name": {"type": "string", "title": "Schema Name", "default": "main"}, "name": {"type": "string", "title": "Name"}, "columns": {"items": {"type": "string"}, "type": "array", "title": "Columns"}, "sql_column_types": {"items": {"type": "string"}, "type": "array", "title": "Sql Column Types"}, "primary_key": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Primary Key"}, "indexes": {"anyOf": [{"items": {"items": {"type": "string"}, "type": "array"}, "type": "array"}, {"type": "null"}], "title": "Indexes"}, "foreign_key_constraints": {"items": {"$ref": "#/components/schemas/ForeignKeyConstraintBase"}, "type": "array", "title": "Foreign Key Constraints"}, "column_properties": {"additionalProperties": {"$ref": "#/components/schemas/ColumnProperties"}, "type": "object", "title": "Column Properties"}}, "type": "object", "required": ["name", "columns", "sql_column_types"], "title": "TableMetaInfoBase"}, "TablePostProcessing": {"properties": {"target_table": {"anyOf": [{"$ref": "#/components/schemas/TableIdentifier"}, {"prefixItems": [{"$ref": "#/components/schemas/SourceDBType"}, {"type": "string"}, {"type": "string"}], "type": "array", "maxItems": 3, "minItems": 3}, {"prefixItems": [{"type": "string"}, {"type": "string"}], "type": "array", "maxItems": 2, "minItems": 2}], "title": "Target Table"}, "transforms": {"items": {"oneOf": [{"$ref": "#/components/schemas/EditColumns"}, {"$ref": "#/components/schemas/ReselectColumns"}, {"$ref": "#/components/schemas/TableFilter"}, {"$ref": "#/components/schemas/Limit"}], "discriminator": {"propertyName": "operation", "mapping": {"edit_columns": "#/components/schemas/EditColumns", "limit": "#/components/schemas/Limit", "reselect_columns": "#/components/schemas/ReselectColumns", "table_filter": "#/components/schemas/TableFilter"}}}, "type": "array", "title": "Transforms"}}, "type": "object", "required": ["target_table", "transforms"], "title": "TablePostProcessing"}, "TableProbeBase": {"properties": {"row_count": {"type": "integer", "minimum": 0.0, "title": "Row Count"}, "inferred_types": {"additionalProperties": {"$ref": "#/components/schemas/MITMDataType"}, "type": "object", "title": "Inferred Types"}, "sample_summaries": {"additionalProperties": {"$ref": "#/components/schemas/SampleSummary"}, "type": "object", "title": "Sample Summaries"}, "table_meta": {"$ref": "#/components/schemas/TableMetaInfoBase"}, "sampled_values": {"additionalProperties": {"items": {}, "type": "array"}, "type": "object", "title": "Sampled Values"}}, "type": "object", "required": ["row_count", "inferred_types", "sample_summaries", "table_meta", "sampled_values"], "title": "TableProbeBase"}, "TableQueryResult": {"properties": {"table_info": {"anyOf": [{"$ref": "#/components/schemas/TableMetaInfoBase"}, {"type": "null"}]}, "rows": {"items": {"items": {}, "type": "array"}, "type": "array", "title": "Rows"}}, "type": "object", "required": ["table_info", "rows"], "title": "TableQueryResult"}, "TypedRawQuery": {"properties": {"dialect": {"type": "string", "title": "Dialect"}, "compiled_sql": {"type": "string", "title": "Compiled Sql"}, "columns": {"items": {"type": "string"}, "type": "array", "title": "Columns"}, "column_dtypes": {"items": {"anyOf": [{"$ref": "#/components/schemas/WrappedMITMDataType"}, {"type": "string"}]}, "type": "array", "title": "Column Dtypes"}}, "type": "object", "required": ["dialect", "compiled_sql", "columns", "column_dtypes"], "title": "TypedRawQuery"}, "ValidationError": {"properties": {"loc": {"items": {"anyOf": [{"type": "string"}, {"type": "integer"}]}, "type": "array", "title": "Location"}, "msg": {"type": "string", "title": "Message"}, "type": {"type": "string", "title": "Error Type"}}, "type": "object", "required": ["loc", "msg", "type"], "title": "ValidationError"}, "ValidationResult": {"properties": {"is_valid": {"type": "boolean", "title": "Is Valid", "default": true}, "violations": {"items": {"type": "string"}, "type": "array", "title": "Violations"}}, "type": "object", "title": "ValidationResult"}, "VirtualViewCreationRequest": {"properties": {"name": {"type": "string", "title": "Name"}, "table_creation": {"oneOf": [{"$ref": "#/components/schemas/SimpleJoin"}, {"$ref": "#/components/schemas/ExistingTable"}, {"$ref": "#/components/schemas/RawCompiled"}], "title": "Table Creation", "discriminator": {"propertyName": "operation", "mapping": {"existing": "#/components/schemas/ExistingTable", "join": "#/components/schemas/SimpleJoin", "raw": "#/components/schemas/RawCompiled"}}}, "transforms": {"anyOf": [{"items": {"oneOf": [{"$ref": "#/components/schemas/EditColumns"}, {"$ref": "#/components/schemas/ReselectColumns"}, {"$ref": "#/components/schemas/TableFilter"}, {"$ref": "#/components/schemas/Limit"}], "discriminator": {"propertyName": "operation", "mapping": {"edit_columns": "#/components/schemas/EditColumns", "limit": "#/components/schemas/Limit", "reselect_columns": "#/components/schemas/ReselectColumns", "table_filter": "#/components/schemas/TableFilter"}}}, "type": "array"}, {"type": "null"}], "title": "Transforms"}, "schema": {"type": "string", "title": "Schema", "default": "virtual"}}, "type": "object", "required": ["name", "table_creation"], "title": "VirtualViewCreationRequest"}, "VirtualViewResponse": {"properties": {"table_meta": {"$ref": "#/components/schemas/TableMetaInfoBase"}}, "type": "object", "required": ["table_meta"], "title": "VirtualViewResponse"}, "WrappedMITMDataType": {"properties": {"mitm": {"$ref": "#/components/schemas/MITMDataType"}}, "type": "object", "required": ["mitm"], "title": "WrappedMITMDataType"}}}} \ No newline at end of file +{"openapi": "3.1.0", "info": {"title": "MitMExtractorBackend", "version": "0.1.0"}, "paths": {"/admin/clear-sessions": {"post": {"tags": ["admin"], "summary": "Clear Sessions", "operationId": "clear_sessions", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}}}, "/admin/active-sessions": {"get": {"tags": ["admin"], "summary": "Get Active Sessions", "operationId": "get_active_sessions", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"additionalProperties": {"type": "string", "format": "date-time"}, "type": "object", "title": "Response Get Active Sessions Admin Active Sessions Get"}}}}}}}, "/admin/clear-exports": {"post": {"tags": ["admin"], "summary": "Clear Exports", "operationId": "clear_exports", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}}}, "/definitions/mitms": {"get": {"tags": ["definitions"], "summary": "Get Mitms", "operationId": "get_mitms", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"items": {"$ref": "#/components/schemas/MITM"}, "type": "array", "title": "Response Get Mitms Definitions Mitms Get"}}}}}}}, "/definitions/mitm-definition": {"get": {"tags": ["definitions"], "summary": "Get Mitm Definition", "operationId": "get_mitm_definition", "parameters": [{"name": "mitm", "in": "query", "required": true, "schema": {"$ref": "#/components/schemas/MITM"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/MITMDefinition"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/definitions/mitm-data-types": {"get": {"tags": ["definitions"], "summary": "Get Mitm Data Types", "operationId": "get_mitm_data_types", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"additionalProperties": {"$ref": "#/components/schemas/MitMDataTypeInfos"}, "type": "object", "title": "Response Get Mitm Data Types Definitions Mitm Data Types Get"}}}}}}}, "/session/start-session": {"post": {"tags": ["session"], "summary": "Start Session", "operationId": "start_session", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/SessionIdResponse"}}}}}}}, "/session/get-session": {"get": {"tags": ["session"], "summary": "Get Session", "operationId": "get_session", "parameters": [{"name": "simple_session", "in": "cookie", "required": true, "schema": {"type": "string", "title": "Simple Session"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/SessionIdResponse"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/session/stop-session": {"post": {"tags": ["session"], "summary": "Stop Session", "operationId": "stop_session", "parameters": [{"name": "simple_session", "in": "cookie", "required": true, "schema": {"type": "string", "title": "Simple Session"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/session/upload-db": {"post": {"tags": ["session"], "summary": "Upload Db", "operationId": "upload_db", "parameters": [{"name": "simple_session", "in": "cookie", "required": true, "schema": {"type": "string", "title": "Simple Session"}}], "requestBody": {"required": true, "content": {"multipart/form-data": {"schema": {"$ref": "#/components/schemas/Body_upload_db_session_upload_db_post"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/session/connect-db": {"post": {"tags": ["session"], "summary": "Connect Db", "operationId": "connect_db", "parameters": [{"name": "simple_session", "in": "cookie", "required": true, "schema": {"type": "string", "title": "Simple Session"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Body_connect_db_session_connect_db_post"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/session/test-db-conn": {"get": {"tags": ["session"], "summary": "Test Db Conn", "operationId": "test_db_conn", "parameters": [{"name": "simple_session", "in": "cookie", "required": true, "schema": {"type": "string", "title": "Simple Session"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DBConnTestResponse"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/session/keep-alive": {"get": {"tags": ["session"], "summary": "Keep Alive", "operationId": "keep_alive", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/KeepAliveResponse"}}}}}}}, "/control/reflect-db": {"post": {"tags": ["control"], "summary": "Reflect Db", "operationId": "reflect_db", "parameters": [{"name": "simple_session", "in": "cookie", "required": true, "schema": {"type": "string", "title": "Simple Session"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/control/init-working-db": {"post": {"tags": ["control"], "summary": "Init Working Db", "operationId": "init_working_db", "parameters": [{"name": "simple_session", "in": "cookie", "required": true, "schema": {"type": "string", "title": "Simple Session"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/control/mark-foreign-key": {"post": {"tags": ["control"], "summary": "Mark Foreign Key", "operationId": "mark_foreign_key", "parameters": [{"name": "source", "in": "query", "required": false, "schema": {"allOf": [{"$ref": "#/components/schemas/SourceDBType"}], "default": "original", "title": "Source"}}, {"name": "simple_session", "in": "cookie", "required": true, "schema": {"type": "string", "title": "Simple Session"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ForeignKeyConstraintRequest"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/FKCreationResponse"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/control/virtual-view": {"put": {"tags": ["control"], "summary": "Create Virtual View", "operationId": "create_virtual_view", "parameters": [{"name": "override_if_exists", "in": "query", "required": false, "schema": {"type": "boolean", "default": true, "title": "Override If Exists"}}, {"name": "verify_immediately", "in": "query", "required": false, "schema": {"type": "boolean", "default": true, "title": "Verify Immediately"}}, {"name": "simple_session", "in": "cookie", "required": true, "schema": {"type": "string", "title": "Simple Session"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/VirtualViewCreationRequest"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/VirtualViewResponse"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "get": {"tags": ["control"], "summary": "Get Virtual View", "operationId": "get_virtual_view", "parameters": [{"name": "view", "in": "query", "required": true, "schema": {"type": "string", "title": "View"}}, {"name": "schema", "in": "query", "required": false, "schema": {"type": "string", "default": "virtual", "title": "Schema"}}, {"name": "simple_session", "in": "cookie", "required": true, "schema": {"type": "string", "title": "Simple Session"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/VirtualViewResponse"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "delete": {"tags": ["control"], "summary": "Drop Virtual View", "operationId": "drop_virtual_view", "parameters": [{"name": "view", "in": "query", "required": true, "schema": {"type": "string", "title": "View"}}, {"name": "schema", "in": "query", "required": false, "schema": {"type": "string", "default": "virtual", "title": "Schema"}}, {"name": "simple_session", "in": "cookie", "required": true, "schema": {"type": "string", "title": "Simple Session"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/control/virtual-views": {"get": {"tags": ["control"], "summary": "Get Virtual Views", "operationId": "get_virtual_views", "parameters": [{"name": "simple_session", "in": "cookie", "required": true, "schema": {"type": "string", "title": "Simple Session"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"type": "array", "items": {"$ref": "#/components/schemas/VirtualViewResponse"}, "title": "Response Get Virtual Views Control Virtual Views Get"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/control/compiled-virtual-view": {"get": {"tags": ["control"], "summary": "Get Compiled Virtual View", "operationId": "get_compiled_virtual_view", "parameters": [{"name": "view", "in": "query", "required": true, "schema": {"type": "string", "title": "View"}}, {"name": "schema", "in": "query", "required": false, "schema": {"type": "string", "default": "virtual", "title": "Schema"}}, {"name": "simple_session", "in": "cookie", "required": true, "schema": {"type": "string", "title": "Simple Session"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/CompiledVirtualView"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/control/compiled-virtual-views": {"get": {"tags": ["control"], "summary": "Get Compiled Virtual Views", "operationId": "get_compiled_virtual_views", "parameters": [{"name": "simple_session", "in": "cookie", "required": true, "schema": {"type": "string", "title": "Simple Session"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"type": "array", "items": {"$ref": "#/components/schemas/CompiledVirtualView"}, "title": "Response Get Compiled Virtual Views Control Compiled Virtual Views Get"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/control/virtual-views-batch": {"put": {"tags": ["control"], "summary": "Create Virtual Views Batch", "operationId": "create_virtual_views_batch", "parameters": [{"name": "override_if_exists", "in": "query", "required": false, "schema": {"type": "boolean", "default": true, "title": "Override If Exists"}}, {"name": "simple_session", "in": "cookie", "required": true, "schema": {"type": "string", "title": "Simple Session"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "array", "items": {"$ref": "#/components/schemas/VirtualViewCreationRequest"}, "title": "Requests"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"type": "array", "items": {"$ref": "#/components/schemas/VirtualViewResponse"}, "title": "Response Create Virtual Views Batch Control Virtual Views Batch Put"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/data/raw-query": {"post": {"tags": ["data"], "summary": "Raw Query", "operationId": "raw_query", "parameters": [{"name": "simple_session", "in": "cookie", "required": true, "schema": {"type": "string", "title": "Simple Session"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Body_raw_query_data_raw_query_post"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"type": "array", "items": {"type": "array", "items": {}}, "title": "Response Raw Query Data Raw Query Post"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/data/query-table": {"get": {"tags": ["data"], "summary": "Query Table", "operationId": "query_table", "parameters": [{"name": "table", "in": "query", "required": true, "schema": {"type": "string", "title": "Table"}}, {"name": "schema", "in": "query", "required": false, "schema": {"type": "string", "default": "main", "title": "Schema"}}, {"name": "source", "in": "query", "required": false, "schema": {"allOf": [{"$ref": "#/components/schemas/SourceDBType"}], "default": "original", "title": "Source"}}, {"name": "offset", "in": "query", "required": false, "schema": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Offset"}}, {"name": "limit", "in": "query", "required": false, "schema": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Limit"}}, {"name": "include_table_meta", "in": "query", "required": false, "schema": {"type": "boolean", "default": false, "title": "Include Table Meta"}}, {"name": "simple_session", "in": "cookie", "required": true, "schema": {"type": "string", "title": "Simple Session"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TableQueryResult"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/data/query-unique-values": {"get": {"tags": ["data"], "summary": "Query Unique Values", "operationId": "query_unique_values", "parameters": [{"name": "table", "in": "query", "required": true, "schema": {"type": "string", "title": "Table"}}, {"name": "column", "in": "query", "required": true, "schema": {"type": "string", "title": "Column"}}, {"name": "schema", "in": "query", "required": false, "schema": {"type": "string", "default": "main", "title": "Schema"}}, {"name": "source", "in": "query", "required": false, "schema": {"allOf": [{"$ref": "#/components/schemas/SourceDBType"}], "default": "original", "title": "Source"}}, {"name": "simple_session", "in": "cookie", "required": true, "schema": {"type": "string", "title": "Simple Session"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"type": "array", "items": {}, "title": "Response Query Unique Values Data Query Unique Values Get"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/data/er-diagram": {"get": {"tags": ["data"], "summary": "Make Erd", "operationId": "make_erd", "parameters": [{"name": "version", "in": "query", "required": false, "schema": {"allOf": [{"$ref": "#/components/schemas/ERVariant"}], "default": "mermaid", "title": "Version"}}, {"name": "source", "in": "query", "required": false, "schema": {"allOf": [{"$ref": "#/components/schemas/SourceDBType"}], "default": "original", "title": "Source"}}, {"name": "simple_session", "in": "cookie", "required": true, "schema": {"type": "string", "title": "Simple Session"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/data/filtered-er-diagram": {"post": {"tags": ["data"], "summary": "Make Filtered Erd", "operationId": "make_filtered_erd", "parameters": [{"name": "version", "in": "query", "required": false, "schema": {"allOf": [{"$ref": "#/components/schemas/ERVariant"}], "default": "mermaid", "title": "Version"}}, {"name": "source", "in": "query", "required": false, "schema": {"allOf": [{"$ref": "#/components/schemas/SourceDBType"}], "default": "original", "title": "Source"}}, {"name": "simple_session", "in": "cookie", "required": true, "schema": {"type": "string", "title": "Simple Session"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DBSchemaSelectionRequest"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/reflection/table-schema": {"get": {"tags": ["reflection"], "summary": "Get Table Schema", "operationId": "get_table_schema", "parameters": [{"name": "table", "in": "query", "required": true, "schema": {"type": "string", "title": "Table"}}, {"name": "schema", "in": "query", "required": false, "schema": {"type": "string", "default": "main", "title": "Schema"}}, {"name": "source", "in": "query", "required": false, "schema": {"allOf": [{"$ref": "#/components/schemas/SourceDBType"}], "default": "original", "title": "Source"}}, {"name": "simple_session", "in": "cookie", "required": true, "schema": {"type": "string", "title": "Simple Session"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TableMetaInfoBase"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/reflection/db-schema": {"get": {"tags": ["reflection"], "summary": "Get Db Schema", "operationId": "get_db_schema", "parameters": [{"name": "source", "in": "query", "required": false, "schema": {"allOf": [{"$ref": "#/components/schemas/SourceDBType"}], "default": "original", "title": "Source"}}, {"name": "simple_session", "in": "cookie", "required": true, "schema": {"type": "string", "title": "Simple Session"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DBMetaInfoBase"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/reflection/filter-db-schema": {"post": {"tags": ["reflection"], "summary": "Filter Db Schema", "operationId": "filter_db_schema", "parameters": [{"name": "source", "in": "query", "required": false, "schema": {"allOf": [{"$ref": "#/components/schemas/SourceDBType"}], "default": "original", "title": "Source"}}, {"name": "simple_session", "in": "cookie", "required": true, "schema": {"type": "string", "title": "Simple Session"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DBSchemaSelectionRequest"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DBMetaInfoBase"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/reflection/query-db-schema": {"post": {"tags": ["reflection"], "summary": "Query Db Schema", "operationId": "query_db_schema", "parameters": [{"name": "store_intermediate_table_probes", "in": "query", "required": false, "schema": {"type": "boolean", "default": true, "title": "Store Intermediate Table Probes"}}, {"name": "source", "in": "query", "required": false, "schema": {"allOf": [{"$ref": "#/components/schemas/SourceDBType"}], "default": "original", "title": "Source"}}, {"name": "simple_session", "in": "cookie", "required": true, "schema": {"type": "string", "title": "Simple Session"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DBSchemaQueryRequest"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DBMetaInfoBase"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/reflection/suggest-joins": {"get": {"tags": ["reflection"], "summary": "Suggest Joins", "operationId": "suggest_joins", "parameters": [{"name": "table", "in": "query", "required": true, "schema": {"type": "string", "title": "Table"}}, {"name": "schema", "in": "query", "required": false, "schema": {"type": "string", "default": "main", "title": "Schema"}}, {"name": "source", "in": "query", "required": false, "schema": {"allOf": [{"$ref": "#/components/schemas/SourceDBType"}], "default": "original", "title": "Source"}}, {"name": "simple_session", "in": "cookie", "required": true, "schema": {"type": "string", "title": "Simple Session"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"type": "array", "items": {"type": "array", "prefixItems": [{"type": "string"}, {"type": "string"}], "minItems": 2, "maxItems": 2}, "title": "Response Suggest Joins Reflection Suggest Joins Get"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/reflection/probe-table": {"post": {"tags": ["reflection"], "summary": "Probe Table", "operationId": "probe_table", "parameters": [{"name": "table", "in": "query", "required": true, "schema": {"type": "string", "title": "Table"}}, {"name": "schema", "in": "query", "required": false, "schema": {"type": "string", "default": "main", "title": "Schema"}}, {"name": "source", "in": "query", "required": false, "schema": {"allOf": [{"$ref": "#/components/schemas/SourceDBType"}], "default": "original", "title": "Source"}}, {"name": "sample_size", "in": "query", "required": false, "schema": {"type": "integer", "default": 100, "title": "Sample Size"}}, {"name": "override_if_exists", "in": "query", "required": false, "schema": {"type": "boolean", "default": false, "title": "Override If Exists"}}, {"name": "store_results", "in": "query", "required": false, "schema": {"type": "boolean", "default": true, "title": "Store Results"}}, {"name": "simple_session", "in": "cookie", "required": true, "schema": {"type": "string", "title": "Simple Session"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TableProbeBase"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/reflection/probe-db": {"post": {"tags": ["reflection"], "summary": "Probe Db", "operationId": "probe_db", "parameters": [{"name": "source", "in": "query", "required": false, "schema": {"allOf": [{"$ref": "#/components/schemas/SourceDBType"}], "default": "original", "title": "Source"}}, {"name": "sample_size", "in": "query", "required": false, "schema": {"type": "integer", "default": 100, "title": "Sample Size"}}, {"name": "override_if_exists", "in": "query", "required": false, "schema": {"type": "boolean", "default": false, "title": "Override If Exists"}}, {"name": "store_results", "in": "query", "required": false, "schema": {"type": "boolean", "default": true, "title": "Store Results"}}, {"name": "simple_session", "in": "cookie", "required": true, "schema": {"type": "string", "title": "Simple Session"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "object", "additionalProperties": {"type": "array", "uniqueItems": true, "items": {"type": "string"}}, "title": "Table Selection"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DBProbeBase"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/mitm/validate-concept-mappings": {"post": {"tags": ["mitm"], "summary": "Validate Concept Mappings", "operationId": "validate_concept_mappings", "parameters": [{"name": "include_request", "in": "query", "required": false, "schema": {"type": "boolean", "default": false, "title": "Include Request"}}, {"name": "simple_session", "in": "cookie", "required": true, "schema": {"type": "string", "title": "Simple Session"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "array", "items": {"$ref": "#/components/schemas/ConceptMapping-Input"}, "title": "Concept Mappings"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/MappingGroupValidationResult"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/mitm/export-mitm": {"post": {"tags": ["mitm"], "summary": "Export Mitm", "operationId": "export_mitm", "parameters": [{"name": "simple_session", "in": "cookie", "required": true, "schema": {"type": "string", "title": "Simple Session"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ExportRequest"}}}}, "responses": {"200": {"description": "Successful Response"}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/mitm/publish-mitm-export": {"post": {"tags": ["mitm"], "summary": "Publish Mitm Export", "operationId": "publish_mitm_export", "parameters": [{"name": "simple_session", "in": "cookie", "required": true, "schema": {"type": "string", "title": "Simple Session"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ExportRequest"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/PublishedMitMResponse"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/mitm/delete-mitm-export": {"post": {"tags": ["mitm"], "summary": "Delete Mitm Export", "operationId": "delete_mitm_export", "parameters": [{"name": "export_id", "in": "query", "required": true, "schema": {"type": "integer", "title": "Export Id"}}, {"name": "simple_session", "in": "cookie", "required": true, "schema": {"type": "string", "title": "Simple Session"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/mitm/delete-mitm-exports": {"post": {"tags": ["mitm"], "summary": "Delete Mitm Exports", "operationId": "delete_mitm_exports", "parameters": [{"name": "simple_session", "in": "cookie", "required": true, "schema": {"type": "string", "title": "Simple Session"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/": {"get": {"summary": "Root", "operationId": "root", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}}}}, "components": {"schemas": {"AddColumn": {"properties": {"operation": {"type": "string", "enum": ["add_column"], "const": "add_column", "title": "Operation", "default": "add_column"}, "col_name": {"type": "string", "title": "Col Name"}, "value": {"title": "Value"}, "target_type": {"anyOf": [{"$ref": "#/components/schemas/WrappedMITMDataType"}, {"type": "string"}], "title": "Target Type"}}, "type": "object", "required": ["col_name", "value", "target_type"], "title": "AddColumn"}, "Body_connect_db_session_connect_db_post": {"properties": {"db_url": {"type": "string", "minLength": 1, "format": "uri", "title": "Db Url"}}, "type": "object", "required": ["db_url"], "title": "Body_connect_db_session_connect_db_post"}, "Body_raw_query_data_raw_query_post": {"properties": {"query": {"type": "string", "title": "Query"}}, "type": "object", "required": ["query"], "title": "Body_raw_query_data_raw_query_post"}, "Body_upload_db_session_upload_db_post": {"properties": {"sqlite": {"type": "string", "format": "binary", "title": "Sqlite", "description": "Upload a sqlite db file here."}}, "type": "object", "required": ["sqlite"], "title": "Body_upload_db_session_upload_db_post"}, "CastColumn": {"properties": {"operation": {"type": "string", "enum": ["cast_column"], "const": "cast_column", "title": "Operation", "default": "cast_column"}, "target_type": {"anyOf": [{"$ref": "#/components/schemas/WrappedMITMDataType"}, {"type": "string"}], "title": "Target Type"}}, "type": "object", "required": ["target_type"], "title": "CastColumn"}, "CategoricalSummaryStatistics": {"properties": {"count": {"type": "integer", "minimum": 0.0, "title": "Count"}, "unique": {"type": "integer", "minimum": 0.0, "title": "Unique"}, "top": {"type": "string", "title": "Top"}, "freq": {"type": "integer", "minimum": 0.0, "title": "Freq"}}, "type": "object", "required": ["count", "unique", "top", "freq"], "title": "CategoricalSummaryStatistics"}, "ColumnProperties": {"properties": {"nullable": {"type": "boolean", "title": "Nullable"}, "unique": {"type": "boolean", "title": "Unique"}, "part_of_pk": {"type": "boolean", "title": "Part Of Pk"}, "part_of_fk": {"type": "boolean", "title": "Part Of Fk"}, "part_of_index": {"type": "boolean", "title": "Part Of Index"}, "mitm_data_type": {"$ref": "#/components/schemas/MITMDataType"}}, "type": "object", "required": ["nullable", "unique", "part_of_pk", "part_of_fk", "part_of_index", "mitm_data_type"], "title": "ColumnProperties"}, "CompiledVirtualView": {"properties": {"dialect": {"type": "string", "title": "Dialect"}, "compiled_sql": {"type": "string", "title": "Compiled Sql"}, "columns": {"items": {"type": "string"}, "type": "array", "title": "Columns"}, "column_dtypes": {"items": {"anyOf": [{"$ref": "#/components/schemas/WrappedMITMDataType"}, {"type": "string"}]}, "type": "array", "title": "Column Dtypes"}, "name": {"type": "string", "title": "Name"}, "schema_name": {"type": "string", "title": "Schema Name"}}, "type": "object", "required": ["dialect", "compiled_sql", "columns", "column_dtypes", "name", "schema_name"], "title": "CompiledVirtualView"}, "ConceptKind": {"type": "string", "enum": ["concrete", "abstract"], "title": "ConceptKind"}, "ConceptLevel": {"type": "string", "enum": ["main", "sub", "weak"], "title": "ConceptLevel"}, "ConceptMapping-Input": {"properties": {"mitm": {"$ref": "#/components/schemas/MITM"}, "concept": {"type": "string", "title": "Concept"}, "base_table": {"anyOf": [{"$ref": "#/components/schemas/TableIdentifier"}, {"prefixItems": [{"$ref": "#/components/schemas/SourceDBType"}, {"type": "string"}, {"type": "string"}], "type": "array", "maxItems": 3, "minItems": 3}, {"prefixItems": [{"type": "string"}, {"type": "string"}], "type": "array", "maxItems": 2, "minItems": 2}], "title": "Base Table"}, "kind_col": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Kind Col"}, "type_col": {"type": "string", "title": "Type Col"}, "identity_columns": {"anyOf": [{"additionalProperties": {"type": "string"}, "type": "object"}, {"items": {"type": "string"}, "type": "array"}], "title": "Identity Columns"}, "inline_relations": {"anyOf": [{"additionalProperties": {"type": "string"}, "type": "object"}, {"items": {"type": "string"}, "type": "array"}], "title": "Inline Relations"}, "foreign_relations": {"additionalProperties": {"$ref": "#/components/schemas/ForeignRelation-Input"}, "type": "object", "title": "Foreign Relations"}, "attributes": {"items": {"type": "string"}, "type": "array", "title": "Attributes"}, "attribute_dtypes": {"items": {"$ref": "#/components/schemas/MITMDataType"}, "type": "array", "title": "Attribute Dtypes"}}, "type": "object", "required": ["mitm", "concept", "base_table", "type_col"], "title": "ConceptMapping"}, "ConceptMapping-Output": {"properties": {"mitm": {"$ref": "#/components/schemas/MITM"}, "concept": {"type": "string", "title": "Concept"}, "base_table": {"anyOf": [{"$ref": "#/components/schemas/TableIdentifier"}, {"prefixItems": [{"$ref": "#/components/schemas/SourceDBType"}, {"type": "string"}, {"type": "string"}], "type": "array", "maxItems": 3, "minItems": 3}, {"prefixItems": [{"type": "string"}, {"type": "string"}], "type": "array", "maxItems": 2, "minItems": 2}], "title": "Base Table"}, "kind_col": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Kind Col"}, "type_col": {"type": "string", "title": "Type Col"}, "identity_columns": {"anyOf": [{"additionalProperties": {"type": "string"}, "type": "object"}, {"items": {"type": "string"}, "type": "array"}], "title": "Identity Columns"}, "inline_relations": {"anyOf": [{"additionalProperties": {"type": "string"}, "type": "object"}, {"items": {"type": "string"}, "type": "array"}], "title": "Inline Relations"}, "foreign_relations": {"additionalProperties": {"$ref": "#/components/schemas/ForeignRelation-Output"}, "type": "object", "title": "Foreign Relations"}, "attributes": {"items": {"type": "string"}, "type": "array", "title": "Attributes"}, "attribute_dtypes": {"items": {"$ref": "#/components/schemas/MITMDataType"}, "type": "array", "title": "Attribute Dtypes"}}, "type": "object", "required": ["mitm", "concept", "base_table", "type_col"], "title": "ConceptMapping"}, "ConceptProperties": {"properties": {"nature": {"prefixItems": [{"$ref": "#/components/schemas/ConceptLevel"}, {"$ref": "#/components/schemas/ConceptKind"}], "type": "array", "maxItems": 2, "minItems": 2, "title": "Nature"}, "key": {"type": "string", "title": "Key"}, "plural": {"type": "string", "title": "Plural"}, "typing_concept": {"type": "string", "title": "Typing Concept", "default": "type"}, "column_group_ordering": {"items": {"type": "string", "enum": ["kind", "type", "identity-relations", "inline-relations", "foreign-relations", "attributes"]}, "type": "array", "title": "Column Group Ordering", "default": ["kind", "type", "identity-relations", "inline-relations", "foreign-relations", "attributes"]}, "permit_attributes": {"type": "boolean", "title": "Permit Attributes", "default": true}}, "type": "object", "required": ["nature", "key", "plural"], "title": "ConceptProperties"}, "DBConnTestResponse": {"properties": {"db_url": {"type": "string", "minLength": 1, "format": "uri", "title": "Db Url"}, "success": {"type": "boolean", "title": "Success"}, "error": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Error"}}, "type": "object", "required": ["db_url", "success"], "title": "DBConnTestResponse"}, "DBMetaInfoBase": {"properties": {"db_structure": {"additionalProperties": {"additionalProperties": {"$ref": "#/components/schemas/TableMetaInfoBase"}, "type": "object"}, "type": "object", "title": "Db Structure"}, "tables": {"additionalProperties": {"$ref": "#/components/schemas/TableMetaInfoBase"}, "type": "object", "title": "Tables", "readOnly": true}}, "type": "object", "required": ["db_structure", "tables"], "title": "DBMetaInfoBase"}, "DBMetaQuery": {"properties": {"syntactic_table_conditions": {"items": {"$ref": "#/components/schemas/SyntacticTableCondition"}, "type": "array", "title": "Syntactic Table Conditions"}, "semantic_table_conditions": {"items": {"$ref": "#/components/schemas/SemanticTableCondition"}, "type": "array", "title": "Semantic Table Conditions"}, "syntactic_column_conditions": {"items": {"$ref": "#/components/schemas/SyntacticColumnCondition"}, "type": "array", "title": "Syntactic Column Conditions"}, "semantic_column_conditions": {"items": {"$ref": "#/components/schemas/SemanticColumnCondition"}, "type": "array", "title": "Semantic Column Conditions"}}, "type": "object", "title": "DBMetaQuery"}, "DBProbeBase": {"properties": {"table_probes": {"additionalProperties": {"$ref": "#/components/schemas/TableProbeBase"}, "type": "object", "title": "Table Probes"}, "db_meta": {"$ref": "#/components/schemas/DBMetaInfoBase"}}, "type": "object", "required": ["db_meta"], "title": "DBProbeBase"}, "DBSchemaQueryRequest": {"properties": {"query": {"$ref": "#/components/schemas/DBMetaQuery"}, "filter_columns": {"type": "boolean", "title": "Filter Columns", "default": false}}, "type": "object", "required": ["query"], "title": "DBSchemaQueryRequest"}, "DBSchemaSelectionRequest": {"properties": {"selection": {"anyOf": [{"additionalProperties": {"items": {"type": "string"}, "type": "array", "uniqueItems": true}, "type": "object"}, {"additionalProperties": {"additionalProperties": {"items": {"type": "string"}, "type": "array", "uniqueItems": true}, "type": "object"}, "type": "object"}], "title": "Selection"}, "filter_columns": {"type": "boolean", "title": "Filter Columns", "default": false}}, "type": "object", "required": ["selection"], "title": "DBSchemaSelectionRequest"}, "DatetimeSummaryStatistics": {"properties": {"count": {"type": "integer", "title": "Count"}, "mean": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Mean"}, "min": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Min"}, "max": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Max"}, "percentile_25": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Percentile 25"}, "percentile_50": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Percentile 50"}, "percentile_75": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Percentile 75"}}, "type": "object", "required": ["count"], "title": "DatetimeSummaryStatistics"}, "ERVariant": {"type": "string", "enum": ["image", "mermaid"], "title": "ERVariant"}, "EditColumns": {"properties": {"operation": {"type": "string", "enum": ["edit_columns"], "const": "edit_columns", "title": "Operation", "default": "edit_columns"}, "transforms": {"additionalProperties": {"oneOf": [{"$ref": "#/components/schemas/CastColumn"}], "discriminator": {"propertyName": "operation", "mapping": {"cast_column": "#/components/schemas/CastColumn"}}}, "type": "object", "title": "Transforms"}, "renames": {"additionalProperties": {"type": "string"}, "type": "object", "title": "Renames"}, "drops": {"items": {"type": "string"}, "type": "array", "uniqueItems": true, "title": "Drops"}, "additions": {"additionalProperties": {"items": {"oneOf": [{"$ref": "#/components/schemas/AddColumn"}, {"$ref": "#/components/schemas/ExtractJson"}], "discriminator": {"propertyName": "operation", "mapping": {"add_column": "#/components/schemas/AddColumn", "extract_json": "#/components/schemas/ExtractJson"}}}, "type": "array"}, "type": "object", "title": "Additions"}}, "type": "object", "title": "EditColumns"}, "ExistingTable": {"properties": {"operation": {"type": "string", "enum": ["existing"], "const": "existing", "title": "Operation", "default": "existing"}, "base_table": {"anyOf": [{"$ref": "#/components/schemas/TableIdentifier"}, {"prefixItems": [{"$ref": "#/components/schemas/SourceDBType"}, {"type": "string"}, {"type": "string"}], "type": "array", "maxItems": 3, "minItems": 3}, {"prefixItems": [{"type": "string"}, {"type": "string"}], "type": "array", "maxItems": 2, "minItems": 2}], "title": "Base Table"}}, "type": "object", "required": ["base_table"], "title": "ExistingTable"}, "ExportRequest": {"properties": {"mitm": {"$ref": "#/components/schemas/MITM"}, "mapped_concepts": {"items": {"$ref": "#/components/schemas/ConceptMapping-Input"}, "type": "array", "title": "Mapped Concepts"}, "post_processing": {"anyOf": [{"$ref": "#/components/schemas/PostProcessing"}, {"type": "null"}]}, "filename": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Filename"}}, "type": "object", "required": ["mitm", "mapped_concepts"], "title": "ExportRequest"}, "ExtractJson": {"properties": {"operation": {"type": "string", "enum": ["extract_json"], "const": "extract_json", "title": "Operation", "default": "extract_json"}, "json_col": {"type": "string", "title": "Json Col"}, "attributes": {"additionalProperties": {"items": {"type": "string"}, "type": "array"}, "type": "object", "title": "Attributes"}}, "type": "object", "required": ["json_col", "attributes"], "title": "ExtractJson"}, "FKCreationResponse": {"properties": {"status": {"type": "boolean", "title": "Status"}, "error": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Error"}}, "type": "object", "required": ["status"], "title": "FKCreationResponse"}, "ForeignKeyConstraintBase": {"properties": {"name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name"}, "table": {"anyOf": [{"$ref": "#/components/schemas/LocalTableIdentifier"}, {"prefixItems": [{"type": "string"}, {"type": "string"}], "type": "array", "maxItems": 2, "minItems": 2}], "title": "Table"}, "columns": {"items": {"type": "string"}, "type": "array", "title": "Columns"}, "target_table": {"anyOf": [{"$ref": "#/components/schemas/LocalTableIdentifier"}, {"prefixItems": [{"type": "string"}, {"type": "string"}], "type": "array", "maxItems": 2, "minItems": 2}], "title": "Target Table"}, "target_columns": {"items": {"type": "string"}, "type": "array", "title": "Target Columns"}}, "type": "object", "required": ["table", "columns", "target_table", "target_columns"], "title": "ForeignKeyConstraintBase"}, "ForeignKeyConstraintRequest": {"properties": {"name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name"}, "table": {"anyOf": [{"$ref": "#/components/schemas/LocalTableIdentifier"}, {"prefixItems": [{"type": "string"}, {"type": "string"}], "type": "array", "maxItems": 2, "minItems": 2}], "title": "Table"}, "columns": {"items": {"type": "string"}, "type": "array", "title": "Columns"}, "target_table": {"anyOf": [{"$ref": "#/components/schemas/LocalTableIdentifier"}, {"prefixItems": [{"type": "string"}, {"type": "string"}], "type": "array", "maxItems": 2, "minItems": 2}], "title": "Target Table"}, "target_columns": {"items": {"type": "string"}, "type": "array", "title": "Target Columns"}}, "type": "object", "required": ["table", "columns", "target_table", "target_columns"], "title": "ForeignKeyConstraintRequest"}, "ForeignRelation-Input": {"properties": {"fk_columns": {"anyOf": [{"additionalProperties": {"type": "string"}, "type": "object"}, {"items": {"type": "string"}, "type": "array"}], "title": "Fk Columns"}, "referred_table": {"anyOf": [{"$ref": "#/components/schemas/TableIdentifier"}, {"prefixItems": [{"$ref": "#/components/schemas/SourceDBType"}, {"type": "string"}, {"type": "string"}], "type": "array", "maxItems": 3, "minItems": 3}, {"prefixItems": [{"type": "string"}, {"type": "string"}], "type": "array", "maxItems": 2, "minItems": 2}], "title": "Referred Table"}}, "type": "object", "required": ["fk_columns", "referred_table"], "title": "ForeignRelation"}, "ForeignRelation-Output": {"properties": {"fk_columns": {"anyOf": [{"additionalProperties": {"type": "string"}, "type": "object"}, {"items": {"type": "string"}, "type": "array"}], "title": "Fk Columns"}, "referred_table": {"anyOf": [{"$ref": "#/components/schemas/TableIdentifier"}, {"prefixItems": [{"$ref": "#/components/schemas/SourceDBType"}, {"type": "string"}, {"type": "string"}], "type": "array", "maxItems": 3, "minItems": 3}, {"prefixItems": [{"type": "string"}, {"type": "string"}], "type": "array", "maxItems": 2, "minItems": 2}], "title": "Referred Table"}}, "type": "object", "required": ["fk_columns", "referred_table"], "title": "ForeignRelation"}, "ForeignRelationInfo": {"properties": {"target_concept": {"type": "string", "title": "Target Concept"}, "fk_relations": {"additionalProperties": {"type": "string"}, "type": "object", "title": "Fk Relations"}}, "type": "object", "required": ["target_concept", "fk_relations"], "title": "ForeignRelationInfo"}, "GroupValidationResult": {"properties": {"individual_validations": {"additionalProperties": {"items": {"prefixItems": [{"$ref": "#/components/schemas/TableIdentifier"}, {"$ref": "#/components/schemas/IndividualValidationResult"}], "type": "array", "maxItems": 2, "minItems": 2}, "type": "array"}, "type": "object", "title": "Individual Validations"}, "is_valid": {"type": "boolean", "title": "Is Valid", "readOnly": true}}, "type": "object", "required": ["is_valid"], "title": "GroupValidationResult"}, "HTTPValidationError": {"properties": {"detail": {"items": {"$ref": "#/components/schemas/ValidationError"}, "type": "array", "title": "Detail"}}, "type": "object", "title": "HTTPValidationError"}, "IndividualValidationResult": {"properties": {"is_valid": {"type": "boolean", "title": "Is Valid", "default": true}, "violations": {"items": {"type": "string"}, "type": "array", "title": "Violations"}}, "type": "object", "title": "IndividualValidationResult"}, "KeepAliveResponse": {"properties": {"server_status": {"type": "string", "enum": ["available"], "const": "available", "title": "Server Status", "default": "available"}, "session_status": {"type": "string", "enum": ["missing session cookie", "session invalid", "session valid"], "title": "Session Status"}}, "type": "object", "required": ["session_status"], "title": "KeepAliveResponse"}, "Limit": {"properties": {"operation": {"type": "string", "enum": ["limit"], "const": "limit", "title": "Operation", "default": "limit"}, "limit": {"type": "integer", "title": "Limit"}}, "type": "object", "required": ["limit"], "title": "Limit"}, "LocalTableIdentifier": {"properties": {"name": {"type": "string", "title": "Name"}, "schema": {"type": "string", "title": "Schema", "default": "main"}}, "type": "object", "required": ["name"], "title": "LocalTableIdentifier"}, "MITM": {"type": "string", "enum": ["MAED"], "const": "MAED", "title": "MITM"}, "MITMDataType": {"type": "string", "enum": ["text", "json", "integer", "numeric", "boolean", "datetime", "unknown", "infer"], "title": "MITMDataType"}, "MITMDefinition": {"properties": {"main_concepts": {"items": {"type": "string"}, "type": "array", "uniqueItems": true, "title": "Main Concepts"}, "weak_concepts": {"additionalProperties": {"$ref": "#/components/schemas/MITMDataType"}, "type": "object", "title": "Weak Concepts"}, "sub_concepts": {"additionalProperties": {"items": {"type": "string"}, "type": "array", "uniqueItems": true}, "type": "object", "title": "Sub Concepts"}, "concept_relations": {"additionalProperties": {"$ref": "#/components/schemas/OwnedRelations"}, "type": "object", "title": "Concept Relations"}, "concept_properties": {"additionalProperties": {"$ref": "#/components/schemas/ConceptProperties"}, "type": "object", "title": "Concept Properties"}, "leaf_concepts": {"items": {"type": "string"}, "type": "array", "uniqueItems": true, "title": "Leaf Concepts", "readOnly": true}, "abstract_concepts": {"items": {"type": "string"}, "type": "array", "uniqueItems": true, "title": "Abstract Concepts", "readOnly": true}, "parent_concepts_map": {"additionalProperties": {"type": "string"}, "type": "object", "title": "Parent Concepts Map", "readOnly": true}}, "type": "object", "required": ["main_concepts", "weak_concepts", "sub_concepts", "concept_relations", "concept_properties", "leaf_concepts", "abstract_concepts", "parent_concepts_map"], "title": "MITMDefinition"}, "MappingGroupValidationResult": {"properties": {"evaluated_mappings": {"anyOf": [{"items": {"$ref": "#/components/schemas/ConceptMapping-Output"}, "type": "array"}, {"type": "null"}], "title": "Evaluated Mappings"}, "validation_result": {"$ref": "#/components/schemas/GroupValidationResult"}}, "type": "object", "required": ["validation_result"], "title": "MappingGroupValidationResult"}, "MitMDataTypeInfos": {"properties": {"sql_type": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Sql Type"}}, "type": "object", "required": ["sql_type"], "title": "MitMDataTypeInfos"}, "NumericSummaryStatistics": {"properties": {"count": {"type": "integer", "title": "Count"}, "mean": {"type": "number", "title": "Mean"}, "min": {"type": "number", "title": "Min"}, "max": {"type": "number", "title": "Max"}, "std": {"anyOf": [{"type": "number"}, {"type": "null"}], "title": "Std"}, "percentile_25": {"type": "number", "title": "Percentile 25"}, "percentile_50": {"type": "number", "title": "Percentile 50"}, "percentile_75": {"type": "number", "title": "Percentile 75"}}, "type": "object", "required": ["count", "mean", "min", "max", "percentile_25", "percentile_50", "percentile_75"], "title": "NumericSummaryStatistics"}, "OwnedRelations": {"properties": {"identity": {"additionalProperties": {"type": "string"}, "type": "object", "title": "Identity"}, "inline": {"additionalProperties": {"type": "string"}, "type": "object", "title": "Inline"}, "to_one": {"additionalProperties": {"$ref": "#/components/schemas/ForeignRelationInfo"}, "type": "object", "title": "To One"}, "to_many": {"additionalProperties": {"$ref": "#/components/schemas/ForeignRelationInfo"}, "type": "object", "title": "To Many"}}, "type": "object", "required": ["identity", "inline", "to_one", "to_many"], "title": "OwnedRelations"}, "PostProcessing": {"properties": {"table_postprocessing": {"items": {"$ref": "#/components/schemas/TablePostProcessing"}, "type": "array", "title": "Table Postprocessing"}}, "type": "object", "required": ["table_postprocessing"], "title": "PostProcessing"}, "PublishedMitMResponse": {"properties": {"url": {"type": "string", "maxLength": 2083, "minLength": 1, "format": "uri", "title": "Url"}, "relative_uri": {"type": "string", "title": "Relative Uri"}, "deletion_request_url": {"type": "string", "maxLength": 2083, "minLength": 1, "format": "uri", "title": "Deletion Request Url"}, "export_id": {"type": "integer", "title": "Export Id"}}, "type": "object", "required": ["url", "relative_uri", "deletion_request_url", "export_id"], "title": "PublishedMitMResponse"}, "RawCompiled": {"properties": {"operation": {"type": "string", "enum": ["raw"], "const": "raw", "title": "Operation", "default": "raw"}, "typed_query": {"$ref": "#/components/schemas/TypedRawQuery"}}, "type": "object", "required": ["typed_query"], "title": "RawCompiled"}, "ReselectColumns": {"properties": {"operation": {"type": "string", "enum": ["reselect_columns"], "const": "reselect_columns", "title": "Operation", "default": "reselect_columns"}, "selection": {"items": {"type": "string"}, "type": "array", "title": "Selection"}}, "type": "object", "required": ["selection"], "title": "ReselectColumns"}, "SampleSummary": {"properties": {"sample_size": {"anyOf": [{"type": "integer", "minimum": 0.0}, {"type": "null"}], "title": "Sample Size"}, "na_fraction": {"anyOf": [{"type": "number", "maximum": 1.0, "minimum": 0.0}, {"type": "null"}], "title": "Na Fraction"}, "unique_fraction": {"anyOf": [{"type": "number", "maximum": 1.0, "minimum": 0.0}, {"type": "null"}], "title": "Unique Fraction"}, "value_counts": {"anyOf": [{"additionalProperties": {"type": "integer"}, "type": "object"}, {"type": "null"}], "title": "Value Counts"}, "summary_statistics": {"anyOf": [{"$ref": "#/components/schemas/NumericSummaryStatistics"}, {"$ref": "#/components/schemas/CategoricalSummaryStatistics"}, {"$ref": "#/components/schemas/DatetimeSummaryStatistics"}, {"type": "null"}], "title": "Summary Statistics"}, "json_schema": {"anyOf": [{"type": "object"}, {"type": "null"}], "title": "Json Schema"}}, "type": "object", "title": "SampleSummary"}, "SemanticColumnCondition": {"properties": {"inferred_data_type": {"anyOf": [{"$ref": "#/components/schemas/MITMDataType"}, {"type": "null"}]}, "max_na_fraction": {"anyOf": [{"type": "number", "maximum": 1.0, "minimum": 0.0}, {"type": "null"}], "title": "Max Na Fraction"}, "value_in_range": {"anyOf": [{}, {"type": "null"}], "title": "Value In Range"}, "contained_value": {"anyOf": [{}, {"type": "null"}], "title": "Contained Value"}, "contained_datetime": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Contained Datetime"}}, "type": "object", "title": "SemanticColumnCondition"}, "SemanticTableCondition": {"properties": {"min_row_count": {"anyOf": [{"type": "integer", "minimum": 0.0}, {"type": "null"}], "title": "Min Row Count"}, "max_row_count": {"anyOf": [{"type": "integer", "minimum": 0.0}, {"type": "null"}], "title": "Max Row Count"}}, "type": "object", "title": "SemanticTableCondition"}, "SessionIdResponse": {"properties": {"session_id": {"type": "string", "format": "uuid", "title": "Session Id"}}, "type": "object", "required": ["session_id"], "title": "SessionIdResponse"}, "SimpleJoin": {"properties": {"operation": {"type": "string", "enum": ["join"], "const": "join", "title": "Operation", "default": "join"}, "left_table": {"anyOf": [{"$ref": "#/components/schemas/TableIdentifier"}, {"prefixItems": [{"$ref": "#/components/schemas/SourceDBType"}, {"type": "string"}, {"type": "string"}], "type": "array", "maxItems": 3, "minItems": 3}, {"prefixItems": [{"type": "string"}, {"type": "string"}], "type": "array", "maxItems": 2, "minItems": 2}], "title": "Left Table"}, "right_table": {"anyOf": [{"$ref": "#/components/schemas/TableIdentifier"}, {"prefixItems": [{"$ref": "#/components/schemas/SourceDBType"}, {"type": "string"}, {"type": "string"}], "type": "array", "maxItems": 3, "minItems": 3}, {"prefixItems": [{"type": "string"}, {"type": "string"}], "type": "array", "maxItems": 2, "minItems": 2}], "title": "Right Table"}, "on_cols_left": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "On Cols Left"}, "on_cols_right": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "On Cols Right"}, "is_outer": {"type": "boolean", "title": "Is Outer", "default": false}, "full": {"type": "boolean", "title": "Full", "default": false}, "selected_cols_left": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Selected Cols Left"}, "selected_cols_right": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Selected Cols Right"}, "left_alias": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Left Alias"}, "right_alias": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Right Alias"}}, "type": "object", "required": ["left_table", "right_table"], "title": "SimpleJoin"}, "SimpleSQLOperator": {"type": "string", "enum": ["ilike", "like", "=", ">=", ">", "<=", "<", "in", "notin"], "title": "SimpleSQLOperator"}, "SimpleWhere": {"properties": {"lhs": {"type": "string", "title": "Lhs"}, "operator": {"$ref": "#/components/schemas/SimpleSQLOperator"}, "rhs": {"anyOf": [{"type": "string"}, {"prefixItems": [{}, {"anyOf": [{"$ref": "#/components/schemas/WrappedMITMDataType"}, {"type": "string"}]}], "type": "array", "maxItems": 2, "minItems": 2}], "title": "Rhs"}}, "type": "object", "required": ["lhs", "operator", "rhs"], "title": "SimpleWhere"}, "SourceDBType": {"type": "string", "enum": ["original", "working", "virtual"], "title": "SourceDBType"}, "SyntacticColumnCondition": {"properties": {"name_regex": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Regex"}, "sql_data_type": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Sql Data Type"}, "mitm_data_type": {"anyOf": [{"$ref": "#/components/schemas/MITMDataType"}, {"type": "null"}]}}, "type": "object", "title": "SyntacticColumnCondition"}, "SyntacticTableCondition": {"properties": {"schema_regex": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Schema Regex"}, "name_regex": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Regex"}, "min_col_count": {"anyOf": [{"type": "integer", "minimum": 0.0}, {"type": "null"}], "title": "Min Col Count"}, "max_col_count": {"anyOf": [{"type": "integer", "minimum": 0.0}, {"type": "null"}], "title": "Max Col Count"}, "has_foreign_key": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Has Foreign Key"}}, "type": "object", "title": "SyntacticTableCondition"}, "TableFilter": {"properties": {"operation": {"type": "string", "enum": ["table_filter"], "const": "table_filter", "title": "Operation", "default": "table_filter"}, "wheres": {"items": {"$ref": "#/components/schemas/SimpleWhere"}, "type": "array", "title": "Wheres"}, "limit": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Limit"}}, "type": "object", "required": ["wheres"], "title": "TableFilter"}, "TableIdentifier": {"properties": {"source": {"allOf": [{"$ref": "#/components/schemas/SourceDBType"}], "default": "original"}, "schema": {"type": "string", "title": "Schema", "default": "main"}, "name": {"type": "string", "title": "Name"}}, "type": "object", "required": ["name"], "title": "TableIdentifier"}, "TableMetaInfoBase": {"properties": {"schema_name": {"type": "string", "title": "Schema Name", "default": "main"}, "name": {"type": "string", "title": "Name"}, "columns": {"items": {"type": "string"}, "type": "array", "title": "Columns"}, "sql_column_types": {"items": {"type": "string"}, "type": "array", "title": "Sql Column Types"}, "primary_key": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Primary Key"}, "indexes": {"anyOf": [{"items": {"items": {"type": "string"}, "type": "array"}, "type": "array"}, {"type": "null"}], "title": "Indexes"}, "foreign_key_constraints": {"items": {"$ref": "#/components/schemas/ForeignKeyConstraintBase"}, "type": "array", "title": "Foreign Key Constraints"}, "column_properties": {"additionalProperties": {"$ref": "#/components/schemas/ColumnProperties"}, "type": "object", "title": "Column Properties"}}, "type": "object", "required": ["name", "columns", "sql_column_types"], "title": "TableMetaInfoBase"}, "TablePostProcessing": {"properties": {"target_table": {"anyOf": [{"$ref": "#/components/schemas/TableIdentifier"}, {"prefixItems": [{"$ref": "#/components/schemas/SourceDBType"}, {"type": "string"}, {"type": "string"}], "type": "array", "maxItems": 3, "minItems": 3}, {"prefixItems": [{"type": "string"}, {"type": "string"}], "type": "array", "maxItems": 2, "minItems": 2}], "title": "Target Table"}, "transforms": {"items": {"oneOf": [{"$ref": "#/components/schemas/EditColumns"}, {"$ref": "#/components/schemas/ReselectColumns"}, {"$ref": "#/components/schemas/TableFilter"}, {"$ref": "#/components/schemas/Limit"}], "discriminator": {"propertyName": "operation", "mapping": {"edit_columns": "#/components/schemas/EditColumns", "limit": "#/components/schemas/Limit", "reselect_columns": "#/components/schemas/ReselectColumns", "table_filter": "#/components/schemas/TableFilter"}}}, "type": "array", "title": "Transforms"}}, "type": "object", "required": ["target_table", "transforms"], "title": "TablePostProcessing"}, "TableProbeBase": {"properties": {"row_count": {"type": "integer", "minimum": 0.0, "title": "Row Count"}, "inferred_types": {"additionalProperties": {"$ref": "#/components/schemas/MITMDataType"}, "type": "object", "title": "Inferred Types"}, "sample_summaries": {"additionalProperties": {"$ref": "#/components/schemas/SampleSummary"}, "type": "object", "title": "Sample Summaries"}, "table_meta": {"$ref": "#/components/schemas/TableMetaInfoBase"}, "sampled_values": {"additionalProperties": {"items": {}, "type": "array"}, "type": "object", "title": "Sampled Values"}}, "type": "object", "required": ["row_count", "inferred_types", "sample_summaries", "table_meta", "sampled_values"], "title": "TableProbeBase"}, "TableQueryResult": {"properties": {"table_info": {"anyOf": [{"$ref": "#/components/schemas/TableMetaInfoBase"}, {"type": "null"}]}, "rows": {"items": {"items": {}, "type": "array"}, "type": "array", "title": "Rows"}}, "type": "object", "required": ["table_info", "rows"], "title": "TableQueryResult"}, "TypedRawQuery": {"properties": {"dialect": {"type": "string", "title": "Dialect"}, "compiled_sql": {"type": "string", "title": "Compiled Sql"}, "columns": {"items": {"type": "string"}, "type": "array", "title": "Columns"}, "column_dtypes": {"items": {"anyOf": [{"$ref": "#/components/schemas/WrappedMITMDataType"}, {"type": "string"}]}, "type": "array", "title": "Column Dtypes"}}, "type": "object", "required": ["dialect", "compiled_sql", "columns", "column_dtypes"], "title": "TypedRawQuery"}, "ValidationError": {"properties": {"loc": {"items": {"anyOf": [{"type": "string"}, {"type": "integer"}]}, "type": "array", "title": "Location"}, "msg": {"type": "string", "title": "Message"}, "type": {"type": "string", "title": "Error Type"}}, "type": "object", "required": ["loc", "msg", "type"], "title": "ValidationError"}, "VirtualViewCreationRequest": {"properties": {"name": {"type": "string", "title": "Name"}, "table_creation": {"oneOf": [{"$ref": "#/components/schemas/SimpleJoin"}, {"$ref": "#/components/schemas/ExistingTable"}, {"$ref": "#/components/schemas/RawCompiled"}], "title": "Table Creation", "discriminator": {"propertyName": "operation", "mapping": {"existing": "#/components/schemas/ExistingTable", "join": "#/components/schemas/SimpleJoin", "raw": "#/components/schemas/RawCompiled"}}}, "transforms": {"anyOf": [{"items": {"oneOf": [{"$ref": "#/components/schemas/EditColumns"}, {"$ref": "#/components/schemas/ReselectColumns"}, {"$ref": "#/components/schemas/TableFilter"}, {"$ref": "#/components/schemas/Limit"}], "discriminator": {"propertyName": "operation", "mapping": {"edit_columns": "#/components/schemas/EditColumns", "limit": "#/components/schemas/Limit", "reselect_columns": "#/components/schemas/ReselectColumns", "table_filter": "#/components/schemas/TableFilter"}}}, "type": "array"}, {"type": "null"}], "title": "Transforms"}, "schema": {"type": "string", "title": "Schema", "default": "virtual"}}, "type": "object", "required": ["name", "table_creation"], "title": "VirtualViewCreationRequest"}, "VirtualViewResponse": {"properties": {"table_meta": {"$ref": "#/components/schemas/TableMetaInfoBase"}}, "type": "object", "required": ["table_meta"], "title": "VirtualViewResponse"}, "WrappedMITMDataType": {"properties": {"mitm": {"$ref": "#/components/schemas/MITMDataType"}}, "type": "object", "required": ["mitm"], "title": "WrappedMITMDataType"}}}} \ No newline at end of file diff --git a/src/services/api-schema/openapi.yaml b/src/services/api-schema/openapi.yaml index 938b2d7..977aae7 100644 --- a/src/services/api-schema/openapi.yaml +++ b/src/services/api-schema/openapi.yaml @@ -161,6 +161,19 @@ components: - schema_name title: CompiledVirtualView type: object + ConceptKind: + enum: + - concrete + - abstract + title: ConceptKind + type: string + ConceptLevel: + enum: + - main + - sub + - weak + title: ConceptLevel + type: string ConceptMapping-Input: properties: attribute_dtypes: @@ -305,13 +318,6 @@ components: - type_col title: ConceptMapping type: object - ConceptNature: - enum: - - main - - sub - - weak - title: ConceptNature - type: string ConceptProperties: properties: column_group_ordering: @@ -337,7 +343,13 @@ components: title: Key type: string nature: - $ref: '#/components/schemas/ConceptNature' + maxItems: 2 + minItems: 2 + prefixItems: + - $ref: '#/components/schemas/ConceptLevel' + - $ref: '#/components/schemas/ConceptKind' + title: Nature + type: array permit_attributes: default: true title: Permit Attributes @@ -758,11 +770,6 @@ components: type: string type: array title: Fk Columns - referred_columns: - items: - type: string - title: Referred Columns - type: array referred_table: anyOf: - $ref: '#/components/schemas/TableIdentifier' @@ -783,7 +790,6 @@ components: required: - fk_columns - referred_table - - referred_columns title: ForeignRelation type: object ForeignRelation-Output: @@ -797,11 +803,6 @@ components: type: string type: array title: Fk Columns - referred_columns: - items: - type: string - title: Referred Columns - type: array referred_table: anyOf: - $ref: '#/components/schemas/TableIdentifier' @@ -822,9 +823,45 @@ components: required: - fk_columns - referred_table - - referred_columns title: ForeignRelation type: object + ForeignRelationInfo: + properties: + fk_relations: + additionalProperties: + type: string + title: Fk Relations + type: object + target_concept: + title: Target Concept + type: string + required: + - target_concept + - fk_relations + title: ForeignRelationInfo + type: object + GroupValidationResult: + properties: + individual_validations: + additionalProperties: + items: + maxItems: 2 + minItems: 2 + prefixItems: + - $ref: '#/components/schemas/TableIdentifier' + - $ref: '#/components/schemas/IndividualValidationResult' + type: array + type: array + title: Individual Validations + type: object + is_valid: + readOnly: true + title: Is Valid + type: boolean + required: + - is_valid + title: GroupValidationResult + type: object HTTPValidationError: properties: detail: @@ -834,6 +871,19 @@ components: type: array title: HTTPValidationError type: object + IndividualValidationResult: + properties: + is_valid: + default: true + title: Is Valid + type: boolean + violations: + items: + type: string + title: Violations + type: array + title: IndividualValidationResult + type: object KeepAliveResponse: properties: server_status: @@ -963,17 +1013,20 @@ components: - parent_concepts_map title: MITMDefinition type: object - MappingValidationResult: + MappingGroupValidationResult: properties: - evaluated_mapping: + evaluated_mappings: anyOf: - - $ref: '#/components/schemas/ConceptMapping-Output' + - items: + $ref: '#/components/schemas/ConceptMapping-Output' + type: array - type: 'null' + title: Evaluated Mappings validation_result: - $ref: '#/components/schemas/ValidationResult' + $ref: '#/components/schemas/GroupValidationResult' required: - validation_result - title: MappingValidationResult + title: MappingGroupValidationResult type: object MitMDataTypeInfos: properties: @@ -1038,16 +1091,12 @@ components: type: object to_many: additionalProperties: - additionalProperties: - type: string - type: object + $ref: '#/components/schemas/ForeignRelationInfo' title: To Many type: object to_one: additionalProperties: - additionalProperties: - type: string - type: object + $ref: '#/components/schemas/ForeignRelationInfo' title: To One type: object required: @@ -1644,19 +1693,6 @@ components: - type title: ValidationError type: object - ValidationResult: - properties: - is_valid: - default: true - title: Is Valid - type: boolean - violations: - items: - type: string - title: Violations - type: array - title: ValidationResult - type: object VirtualViewCreationRequest: properties: name: @@ -2550,9 +2586,9 @@ paths: summary: Publish Mitm Export tags: - mitm - /mitm/validate-concept-mapping: + /mitm/validate-concept-mappings: post: - operationId: validate_concept_mapping + operationId: validate_concept_mappings parameters: - in: query name: include_request @@ -2571,14 +2607,17 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/ConceptMapping-Input' + items: + $ref: '#/components/schemas/ConceptMapping-Input' + title: Concept Mappings + type: array required: true responses: '200': content: application/json: schema: - $ref: '#/components/schemas/MappingValidationResult' + $ref: '#/components/schemas/MappingGroupValidationResult' description: Successful Response '422': content: @@ -2586,7 +2625,7 @@ paths: schema: $ref: '#/components/schemas/HTTPValidationError' description: Validation Error - summary: Validate Concept Mapping + summary: Validate Concept Mappings tags: - mitm /reflection/db-schema: diff --git a/src/services/api.ts b/src/services/api.ts index 86010d5..d87148d 100644 --- a/src/services/api.ts +++ b/src/services/api.ts @@ -51,6 +51,10 @@ export namespace Mappings { export type ConceptProperties = Components.Schemas.ConceptProperties export type OwnedRelations = Components.Schemas.OwnedRelations export type ForeignRelation = Components.Schemas.ForeignRelationInput + export type ForeignRelationInfo = Components.Schemas.ForeignRelationInfo + export type ForeignRelationDefs = { + [relationName: string] : ForeignRelationInfo + } } export namespace Transforms { @@ -223,8 +227,8 @@ async function getCompiledViews() { return await client.get_compiled_virtual_views().catch(errorHandler('Virtual views could not be compiled')) } -async function validateMapping(body: ConceptMapping) { - return await client.validate_concept_mapping(null, body).catch(errorHandler('Error validating MitM concept mapping')) +async function validateMappings(body: ConceptMapping[]) { + return await client.validate_concept_mappings(null, body).catch(errorHandler('Error validating MitM concept mappings')) } // @@ -279,7 +283,7 @@ export function useAPI() { createVirtualView, createVirtualViewsBatch, dropVirtualView, - validateMapping, + validateMappings, exportMitM, publishMitMExport, deleteMitMExport, diff --git a/src/services/exportStore.ts b/src/services/exportStore.ts index 4ebd21e..968bf1f 100644 --- a/src/services/exportStore.ts +++ b/src/services/exportStore.ts @@ -26,9 +26,10 @@ export const useExportStore = defineStore('exports', () => { const r = await api.publishMitMExport(exportRequest) if (r?.data) { const apiResponse = r.data + const count = publishedExports.value.length const newEntry = { - title: `${exportRequest.mitm} @ ${DateTime.now().toLocaleString(DateTime.TIME_WITH_SECONDS)}`, - value: apiResponse.export_id, + title: `${exportRequest.mitm} @${DateTime.now().toLocaleString(DateTime.TIME_WITH_SECONDS)} [ID:${apiResponse.export_id}]`, + value: [apiResponse.export_id, count], export_id: apiResponse.export_id, download_url: apiResponse.url, deletion_url: apiResponse.deletion_request_url, @@ -43,12 +44,15 @@ export const useExportStore = defineStore('exports', () => { async function deletePublishedExport(exportEntry: PublishedExportEntry) { const r = await api.deleteMitMExport(exportEntry.export_id) if (r) { - const i = publishedExports.value.findIndex(v => v.export_id === exportEntry.export_id) - publishedExports.value.splice(i, 1) + for (let i = publishedExports.value.findIndex(v => v.export_id === exportEntry.export_id); i != -1; i = publishedExports.value.findIndex(v => v.export_id === exportEntry.export_id)) { + publishedExports.value.splice(i, 1) + } } } - function $reset() {publishedExports.value = []} + function $reset() { + publishedExports.value = [] + } return {publishedExports, publishExport, deletePublishedExport, $reset} }) diff --git a/src/services/mappingStore.ts b/src/services/mappingStore.ts index 88e1344..6308f03 100644 --- a/src/services/mappingStore.ts +++ b/src/services/mappingStore.ts @@ -18,15 +18,17 @@ export const useMappingStore = defineStore('mappings', () => { const currentMappings = ref<ConceptMappingEntry[]>([] as ConceptMappingEntry[]) async function saveMappings(mappings: ConceptMapping[]) { - const validations = await Promise.all(mappings.map(cm => api.validateMapping(cm))) - if (validations.every(r => r?.data?.validation_result.is_valid)) { + const r = await api.validateMappings(mappings) + console.log("Tried to save following mappings:\n" + JSON.stringify(mappings, null, 2) + "\nValidation result was:\n" + (!!r?.data ? JSON.stringify(r.data, null, 2) : "request failed")) + if (r?.data?.validation_result.is_valid) { //currentMappings.value = [...currentMappings.value, ...mappings] currentMappings.value.push(...mappings.map(wrapMapping)) } } async function saveMapping(mapping: ConceptMapping): Promise<MappingValidationResult> { - const r = await api.validateMapping(mapping) + // to validate a new mapping, all previous mappings are resubmitted, so that dependent (foreign key) mappings are possible + const r = await api.validateMappings([...currentMappings.value.map(cme => cme.mapping), mapping]) console.log("Tried to save following mapping:\n" + JSON.stringify(mapping, null, 2) + "\nValidation result was:\n" + (!!r?.data ? JSON.stringify(r.data, null, 2) : "request failed")) if (r?.data?.validation_result.is_valid) { // currentMappings.value = [...currentMappings.value, wrapMapping(mapping)] diff --git a/src/services/mappingUtils.ts b/src/services/mappingUtils.ts new file mode 100644 index 0000000..f7a1d60 --- /dev/null +++ b/src/services/mappingUtils.ts @@ -0,0 +1,11 @@ +import {ExtendedColumnListItem} from "@/services/convenienceStore"; +import {Ref, ref} from "vue"; +import {TableIdentifier} from "@/services/api"; + +export type WithinTableMappings = { [key: string]: ExtendedColumnListItem } +export type ForeignRelationMappings = { + [fkRelName: string]: { + fk_columns: { [nameToMap: string]: ExtendedColumnListItem }, + referred_table: Ref<TableIdentifier> + } +} diff --git a/src/services/preset-definitions/synthetic-preset.json b/src/services/preset-definitions/synthetic-preset.json index d4a10de..cf91f4d 100644 --- a/src/services/preset-definitions/synthetic-preset.json +++ b/src/services/preset-definitions/synthetic-preset.json @@ -41,7 +41,8 @@ ] }, "drops": [ - "id" + "id", + "printerId" ], "renames": { "name": "object", @@ -84,7 +85,7 @@ { "operation": "add_column", "col_name": "type", - "value": "position", + "value": "'position'", "target_type": { "mitm": "text" } @@ -92,20 +93,21 @@ ] }, "drops": [ - "id" + "id", + "printerId" ], "renames": { "printer.name": "object", "timestamp": "time", - "positionX": "X", - "positionY": "Y", - "positionZ": "Z" + "positionX": "x", + "positionY": "y", + "positionZ": "z" } } ] }, { - "name": "segments", + "name": "intermediate", "schema": "main", "table_creation": { "operation": "join", @@ -138,58 +140,43 @@ { "operation": "add_column", "col_name": "concept", - "value": "job", + "value": "'job'", "target_type": { "mitm": "text" } } ] }, - "drops": [ - "geometry", - "settings" - ], "renames": { + "printer.name": "object", "id": "segment_index", "startTime": "start", "endTime": "end" - } + }, + "drops": [ + "printerId" + ] } ] }, { - "name": "intermediate", + "name": "segments", "schema": "main", "table_creation": { - "operation": "join", - "left_table": [ - "original", - "main", - "PrintJobs" - ], - "right_table": [ - "original", + "operation": "existing", + "base_table": [ + "virtual", "main", - "PrintersTable" - ], - "on_cols_left": [ - "printerId" - ], - "on_cols_right": [ - "id" - ], - "selected_cols_right": [ - "name" - ], - "right_alias": "printer" + "intermediate" + ] }, "transforms": [ { "operation": "edit_columns", - "renames": { - "printer.name": "object", - "id": "segment_index" - } + "drops": [ + "geometry", + "settings" + ] } ] }, @@ -214,10 +201,16 @@ "on_cols_right": [ "id" ], + "right_alias": "geom", "selected_cols_right": [ "name" ], - "right_alias": "geom" + "selected_cols_left": [ + "concept", + "segment_index", + "object", + "settings" + ] }, "transforms": [ { @@ -227,7 +220,7 @@ { "operation": "add_column", "col_name": "type", - "value": "job_config", + "value": "'job_config'", "target_type": { "mitm": "text" } @@ -235,7 +228,6 @@ { "operation": "extract_json", "json_col": "settings", - "col_name": "extrusion_temp", "attributes": { "extrusion_temp": [ "extrusion_temp" @@ -243,21 +235,10 @@ "extrusion_rate": [ "extrusion_rate" ], - "material": [ - "material" - ], "mode": [ "mode" ] } - }, - { - "operation": "add_column", - "col_name": "concept", - "value": "job", - "target_type": { - "mitm": "text" - } } ] }, @@ -289,8 +270,9 @@ "segment_index" ], "selected_cols_right": [ + "concept", "segment_index", - "concept" + "object" ] }, "transforms": [ @@ -301,7 +283,7 @@ { "operation": "add_column", "col_name": "type", - "value": "workpiece_qc", + "value": "'workpiece_qc'", "target_type": { "mitm": "text" } @@ -310,7 +292,8 @@ }, "renames": { "workpieceQuality": "workpiece_quality" - } + }, + "drops": ["jobId"] } ] } @@ -344,7 +327,7 @@ "main", "measurements" ], - "type_col": "status", + "type_col": "type", "inline_relations": [ "time", "object" @@ -397,14 +380,12 @@ "target_geometry", "extrusion_temp", "extrusion_rate", - "material", "mode" ], "attribute_dtypes": [ "text", "integer", "integer", - "text", "text" ] }, -- GitLab