fix #64: Se quita la estructura duplicada y se importa desde estructuras.ts en _shared
Supa-backup / run_db_backup (pull_request) Successful in 38s
CI / test (pull_request) Failing after 34s
Deploy Function / deploy (pull_request) Successful in 25s
Deploy Migrations to Production / deploy (pull_request) Successful in 11s
Supa-backup / run_db_backup (push) Successful in 33s
Deploy Function / deploy (push) Successful in 24s
Deploy Migrations to Production / deploy (push) Failing after 12s
Supa-backup / run_db_backup (pull_request) Successful in 38s
CI / test (pull_request) Failing after 34s
Deploy Function / deploy (pull_request) Successful in 25s
Deploy Migrations to Production / deploy (pull_request) Successful in 11s
Supa-backup / run_db_backup (push) Successful in 33s
Deploy Function / deploy (push) Successful in 24s
Deploy Migrations to Production / deploy (push) Failing after 12s
This commit was merged in pull request #71.
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
export type Json =
|
export type Json =
|
||||||
| string
|
| string
|
||||||
| number
|
| number
|
||||||
| boolean
|
| boolean
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ import { corsHeaders } from "../_shared/cors.ts";
|
|||||||
import { HttpError, sendError, sendSuccess } from "../_shared/utils.ts";
|
import { HttpError, sendError, sendSuccess } from "../_shared/utils.ts";
|
||||||
import { createClient } from "@supabase/supabase-js";
|
import { createClient } from "@supabase/supabase-js";
|
||||||
import type { Database, Json } from "../_shared/database.types.ts";
|
import type { Database, Json } from "../_shared/database.types.ts";
|
||||||
|
import { definicionesDeEstructurasDeColumnas } from "../_shared/estructuras.ts";
|
||||||
import { z } from "zod";
|
import { z } from "zod";
|
||||||
import {
|
import {
|
||||||
OpenAIService,
|
OpenAIService,
|
||||||
@@ -599,98 +600,3 @@ Deno.serve(async (req: Request): Promise<Response> => {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const definicionesDeEstructurasDeColumnas = {
|
|
||||||
contenido_tematico: {
|
|
||||||
"type": "object",
|
|
||||||
"properties": {
|
|
||||||
"x-column": {
|
|
||||||
"type": "string",
|
|
||||||
"enum": [
|
|
||||||
"contenido_tematico",
|
|
||||||
],
|
|
||||||
},
|
|
||||||
"x-definicion": {
|
|
||||||
"type": "array",
|
|
||||||
"items": {
|
|
||||||
"type": "object",
|
|
||||||
"properties": {
|
|
||||||
"unidad": {
|
|
||||||
"type": "integer",
|
|
||||||
},
|
|
||||||
"titulo": {
|
|
||||||
"type": "string",
|
|
||||||
},
|
|
||||||
"temas": {
|
|
||||||
"type": "array",
|
|
||||||
"items": {
|
|
||||||
"type": "object",
|
|
||||||
"properties": {
|
|
||||||
"nombre": {
|
|
||||||
"type": "string",
|
|
||||||
},
|
|
||||||
"horasEstimadas": {
|
|
||||||
"type": "integer",
|
|
||||||
"description":
|
|
||||||
"Horas del tema. La suma de todas las horasEstimadas debe ser igual a las horas académicas del prompt.",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
"required": [
|
|
||||||
"nombre",
|
|
||||||
"horasEstimadas",
|
|
||||||
],
|
|
||||||
"additionalProperties": false,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
"required": [
|
|
||||||
"unidad",
|
|
||||||
"titulo",
|
|
||||||
"temas",
|
|
||||||
],
|
|
||||||
"additionalProperties": false,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
"required": [
|
|
||||||
"x-column",
|
|
||||||
"x-definicion",
|
|
||||||
],
|
|
||||||
"additionalProperties": false,
|
|
||||||
},
|
|
||||||
criterios_de_evaluacion: {
|
|
||||||
"type": "object",
|
|
||||||
"properties": {
|
|
||||||
"x-column": {
|
|
||||||
"type": "string",
|
|
||||||
"enum": [
|
|
||||||
"criterios_de_evaluacion",
|
|
||||||
],
|
|
||||||
},
|
|
||||||
"x-definicion": {
|
|
||||||
"type": "array",
|
|
||||||
"items": {
|
|
||||||
"type": "object",
|
|
||||||
"properties": {
|
|
||||||
"criterio": {
|
|
||||||
"type": "string",
|
|
||||||
},
|
|
||||||
"porcentaje": {
|
|
||||||
"type": "integer",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
"required": [
|
|
||||||
"criterio",
|
|
||||||
"porcentaje",
|
|
||||||
],
|
|
||||||
"additionalProperties": false,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
"required": [
|
|
||||||
"x-column",
|
|
||||||
"x-definicion",
|
|
||||||
],
|
|
||||||
"additionalProperties": false,
|
|
||||||
},
|
|
||||||
};
|
|
||||||
|
|||||||
Reference in New Issue
Block a user