recator placement of code

This commit is contained in:
2026-02-17 11:46:57 -06:00
parent 31f8c368d9
commit 23c000fa7f
77 changed files with 4528 additions and 2697 deletions

View File

@@ -0,0 +1,81 @@
import type { OpenAPIV3_1 } from "openapi-types";
export const datamartUpdateSpec: OpenAPIV3_1.PathsObject = {
"/api/datamart": {
patch: {
summary: "Update datamart query",
description:
"Update query entry in the datamart. Must be called on the main server. The SQL must be provided as a file upload.",
tags: ["Datamart"],
requestBody: {
required: true,
content: {
"multipart/form-data": {
schema: {
type: "object",
properties: {
name: {
type: "string",
example: "active_av",
description: "Unique name for the query",
},
description: {
type: "string",
example: "Gets active articles",
description: "Short explanation of what this query does",
},
options: {
type: "string",
example: "foo,baz",
description:
"Optional comma separated options string passed to the query",
},
queryFile: {
type: "string",
format: "binary",
description: "SQL file containing the query text",
},
},
},
},
},
},
responses: {
"200": {
description: "Query successfully created",
content: {
"application/json": {
schema: {
type: "object",
properties: {
success: { type: "boolean", example: true },
message: {
type: "string",
example: "active_av was just added",
},
},
},
},
},
},
"400": {
description: "Validation or input error",
content: {
"application/json": {
schema: {
type: "object",
properties: {
success: { type: "boolean", example: false },
message: {
type: "string",
example: "Validation failed",
},
},
},
},
},
},
},
},
},
};