diff --git a/openapi.json b/openapi.json index 2e2e346..4b1c97c 100644 --- a/openapi.json +++ b/openapi.json @@ -1,6 +1,49 @@ { "components": { "schemas": { + "Body_upload": { + "properties": { + "file": { + "contentMediaType": "application/octet-stream", + "title": "File", + "type": "string" + } + }, + "required": [ + "file" + ], + "title": "Body_upload", + "type": "object" + }, + "Condition": { + "properties": { + "column": { + "title": "Column", + "type": "string" + }, + "op": { + "enum": [ + "equals", + "contains", + "matches", + "present" + ], + "title": "Op", + "type": "string" + }, + "value": { + "default": "", + "title": "Value", + "type": "string" + } + }, + "required": [ + "column", + "op" + ], + "title": "Condition", + "type": "object" + }, "Domain": { "enum": [ "cacu", @@ -10,6 +53,105 @@ "title": "Domain", "type": "string" }, + "Extract": { + "additionalProperties": false, + "description": "Platform fields read from text, each kept with the text it was read from.\n\n`auto` asks the LLM when one is configured and answering, else applies `patterns`;\nwith neither, the row is held. Patterns are regexes with one group, per field (the\nLLM can propose them from sample documents); their values go through `values` and\n`formats` as in `map`.", + "properties": { + "column": { + "title": "Column", + "type": "string" + }, + "entity": { + "enum": [ + "identity", + "death", + "clinical_note", + "cervical_cytology", + "cervical_biopsy", + "mammography", + "breast_biopsy" + ], + "title": "Entity", + "type": "string" + }, + "formats": { + "additionalProperties": { + "type": "string" + }, + "default": {}, + "title": "Formats", + "type": "object" + }, + "hints": { + "default": "", + "title": "Hints", + "type": "string" + }, + "id": { + "maxLength": 40, + "pattern": "^[a-z][a-z0-9_]*$", + "title": "Id", + "type": "string" + }, + "inputs": { + "default": [], + "items": { + "maxLength": 40, + "pattern": "^[a-z][a-z0-9_]*$", + "type": "string" + }, + "title": "Inputs", + "type": "array" + }, + "kind": { + "const": "extract", + "default": "extract", + "title": "Kind", + "type": "string" + }, + "label": { + "default": "", + "title": "Label", + "type": "string" + }, + "method": { + "default": "auto", + "enum": [ + "auto", + "llm", + "patterns" + ], + "title": "Method", + "type": "string" + }, + "patterns": { + "additionalProperties": { + "type": "string" + }, + "default": {}, + "title": "Patterns", + "type": "object" + }, + "values": { + "additionalProperties": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "default": {}, + "title": "Values", + "type": "object" + } + }, + "required": [ + "id", + "column", + "entity" + ], + "title": "Extract", + "type": "object" + }, "HTTPValidationError": { "properties": { "detail": { @@ -23,6 +165,566 @@ "title": "HTTPValidationError", "type": "object" }, + "Join": { + "additionalProperties": false, + "description": "Two inputs side by side where their columns match.", + "properties": { + "how": { + "default": "inner", + "enum": [ + "inner", + "left" + ], + "title": "How", + "type": "string" + }, + "id": { + "maxLength": 40, + "pattern": "^[a-z][a-z0-9_]*$", + "title": "Id", + "type": "string" + }, + "inputs": { + "default": [], + "items": { + "maxLength": 40, + "pattern": "^[a-z][a-z0-9_]*$", + "type": "string" + }, + "title": "Inputs", + "type": "array" + }, + "kind": { + "const": "join", + "default": "join", + "title": "Kind", + "type": "string" + }, + "label": { + "default": "", + "title": "Label", + "type": "string" + }, + "on": { + "items": { + "maxItems": 2, + "minItems": 2, + "prefixItems": [ + { + "type": "string" + }, + { + "type": "string" + } + ], + "type": "array" + }, + "title": "On", + "type": "array" + } + }, + "required": [ + "id", + "on" + ], + "title": "Join", + "type": "object" + }, + "Link": { + "additionalProperties": false, + "description": "Identity rows from every input, grouped into persons (Splink).\n\nTwo records are the same person when any rule holds (Splink's SQL rule syntax, `l.`\nand `r.` for the two records); persons are the connected groups. A person whose\nrecords disagree on birth date or sex is held for review as a whole. Pairs Splink\nscores above `review` that ended up apart are queued as possible matches.", + "properties": { + "fields": { + "default": [ + "record_number", + "full_name", + "curp", + "nss", + "birth_date", + "sex" + ], + "items": { + "type": "string" + }, + "title": "Fields", + "type": "array" + }, + "id": { + "maxLength": 40, + "pattern": "^[a-z][a-z0-9_]*$", + "title": "Id", + "type": "string" + }, + "inputs": { + "default": [], + "items": { + "maxLength": 40, + "pattern": "^[a-z][a-z0-9_]*$", + "type": "string" + }, + "title": "Inputs", + "type": "array" + }, + "kind": { + "const": "link", + "default": "link", + "title": "Kind", + "type": "string" + }, + "label": { + "default": "", + "title": "Label", + "type": "string" + }, + "review": { + "default": 0.5, + "exclusiveMinimum": 0.0, + "maximum": 1.0, + "title": "Review", + "type": "number" + }, + "rules": { + "default": [], + "items": { + "type": "string" + }, + "title": "Rules", + "type": "array" + } + }, + "required": [ + "id" + ], + "title": "Link", + "type": "object" + }, + "Map": { + "additionalProperties": false, + "description": "Columns to platform fields, with the site's codes and date formats.", + "properties": { + "fields": { + "additionalProperties": { + "type": "string" + }, + "title": "Fields", + "type": "object" + }, + "formats": { + "additionalProperties": { + "type": "string" + }, + "default": {}, + "title": "Formats", + "type": "object" + }, + "id": { + "maxLength": 40, + "pattern": "^[a-z][a-z0-9_]*$", + "title": "Id", + "type": "string" + }, + "inputs": { + "default": [], + "items": { + "maxLength": 40, + "pattern": "^[a-z][a-z0-9_]*$", + "type": "string" + }, + "title": "Inputs", + "type": "array" + }, + "kind": { + "const": "map", + "default": "map", + "title": "Kind", + "type": "string" + }, + "label": { + "default": "", + "title": "Label", + "type": "string" + }, + "values": { + "additionalProperties": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "default": {}, + "title": "Values", + "type": "object" + } + }, + "required": [ + "id", + "fields" + ], + "title": "Map", + "type": "object" + }, + "Pipeline": { + "properties": { + "nodes": { + "items": { + "discriminator": { + "mapping": { + "extract": "#/components/schemas/Extract", + "join": "#/components/schemas/Join", + "link": "#/components/schemas/Link", + "map": "#/components/schemas/Map", + "read": "#/components/schemas/Read", + "route": "#/components/schemas/Route", + "source": "#/components/schemas/Source", + "target": "#/components/schemas/Target" + }, + "propertyName": "kind" + }, + "oneOf": [ + { + "$ref": "#/components/schemas/Source" + }, + { + "$ref": "#/components/schemas/Read" + }, + { + "$ref": "#/components/schemas/Route" + }, + { + "$ref": "#/components/schemas/Map" + }, + { + "$ref": "#/components/schemas/Extract" + }, + { + "$ref": "#/components/schemas/Join" + }, + { + "$ref": "#/components/schemas/Link" + }, + { + "$ref": "#/components/schemas/Target" + } + ] + }, + "title": "Nodes", + "type": "array" + } + }, + "required": [ + "nodes" + ], + "title": "Pipeline", + "type": "object" + }, + "Read": { + "additionalProperties": false, + "description": "Files in a column (PDF, Word, Excel, scans...) to text (MarkItDown, OCRmyPDF).", + "properties": { + "column": { + "title": "Column", + "type": "string" + }, + "id": { + "maxLength": 40, + "pattern": "^[a-z][a-z0-9_]*$", + "title": "Id", + "type": "string" + }, + "inputs": { + "default": [], + "items": { + "maxLength": 40, + "pattern": "^[a-z][a-z0-9_]*$", + "type": "string" + }, + "title": "Inputs", + "type": "array" + }, + "kind": { + "const": "read", + "default": "read", + "title": "Kind", + "type": "string" + }, + "label": { + "default": "", + "title": "Label", + "type": "string" + } + }, + "required": [ + "id", + "column" + ], + "title": "Read", + "type": "object" + }, + "Rejection": { + "properties": { + "entity": { + "enum": [ + "identity", + "death", + "clinical_note", + "cervical_cytology", + "cervical_biopsy", + "mammography", + "breast_biopsy" + ], + "title": "Entity", + "type": "string" + }, + "reason": { + "title": "Reason", + "type": "string" + }, + "record": { + "title": "Record", + "type": "string" + } + }, + "required": [ + "entity", + "record", + "reason" + ], + "title": "Rejection", + "type": "object" + }, + "Route": { + "additionalProperties": false, + "description": "Only the rows where every condition holds (e.g. reports titled \"Citolog\u00eda\").", + "properties": { + "id": { + "maxLength": 40, + "pattern": "^[a-z][a-z0-9_]*$", + "title": "Id", + "type": "string" + }, + "inputs": { + "default": [], + "items": { + "maxLength": 40, + "pattern": "^[a-z][a-z0-9_]*$", + "type": "string" + }, + "title": "Inputs", + "type": "array" + }, + "kind": { + "const": "route", + "default": "route", + "title": "Kind", + "type": "string" + }, + "label": { + "default": "", + "title": "Label", + "type": "string" + }, + "when": { + "items": { + "$ref": "#/components/schemas/Condition" + }, + "title": "When", + "type": "array" + } + }, + "required": [ + "id", + "when" + ], + "title": "Route", + "type": "object" + }, + "RunRequest": { + "properties": { + "version": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Version" + } + }, + "title": "RunRequest", + "type": "object" + }, + "SavedPipeline": { + "properties": { + "pipeline": { + "$ref": "#/components/schemas/Pipeline" + }, + "version": { + "title": "Version", + "type": "integer" + } + }, + "required": [ + "version", + "pipeline" + ], + "title": "SavedPipeline", + "type": "object" + }, + "Source": { + "additionalProperties": false, + "description": "One table, file set or API resource, copied as it is (dlt). Merged on the source's\nown primary key or `primary_key`; replaced whole when it has none.", + "properties": { + "args": { + "additionalProperties": true, + "default": {}, + "title": "Args", + "type": "object" + }, + "id": { + "maxLength": 40, + "pattern": "^[a-z][a-z0-9_]*$", + "title": "Id", + "type": "string" + }, + "inputs": { + "default": [], + "items": { + "maxLength": 40, + "pattern": "^[a-z][a-z0-9_]*$", + "type": "string" + }, + "title": "Inputs", + "type": "array" + }, + "kind": { + "const": "source", + "default": "source", + "title": "Kind", + "type": "string" + }, + "label": { + "default": "", + "title": "Label", + "type": "string" + }, + "primary_key": { + "default": [], + "items": { + "type": "string" + }, + "title": "Primary Key", + "type": "array" + }, + "resource": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Resource" + }, + "source": { + "pattern": "^[A-Za-z_][\\w.]*:[A-Za-z_]\\w*$", + "title": "Source", + "type": "string" + }, + "then": { + "anyOf": [ + { + "pattern": "^[A-Za-z_][\\w.]*:[A-Za-z_]\\w*$", + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Then" + } + }, + "required": [ + "id", + "source" + ], + "title": "Source", + "type": "object" + }, + "SourceRef": { + "properties": { + "args": { + "additionalProperties": true, + "default": {}, + "title": "Args", + "type": "object" + }, + "source": { + "pattern": "^[A-Za-z_][\\w.]*:[A-Za-z_]\\w*$", + "title": "Source", + "type": "string" + } + }, + "required": [ + "source" + ], + "title": "SourceRef", + "type": "object" + }, + "Target": { + "additionalProperties": false, + "description": "Rows of platform fields into one platform entity, each row given its person by the\none `link` node among the inputs. Rule breaks are held for review.", + "properties": { + "entity": { + "enum": [ + "identity", + "death", + "clinical_note", + "cervical_cytology", + "cervical_biopsy", + "mammography", + "breast_biopsy" + ], + "title": "Entity", + "type": "string" + }, + "id": { + "maxLength": 40, + "pattern": "^[a-z][a-z0-9_]*$", + "title": "Id", + "type": "string" + }, + "inputs": { + "default": [], + "items": { + "maxLength": 40, + "pattern": "^[a-z][a-z0-9_]*$", + "type": "string" + }, + "title": "Inputs", + "type": "array" + }, + "kind": { + "const": "target", + "default": "target", + "title": "Kind", + "type": "string" + }, + "label": { + "default": "", + "title": "Label", + "type": "string" + } + }, + "required": [ + "id", + "entity" + ], + "title": "Target", + "type": "object" + }, "ValidationError": { "properties": { "ctx": { @@ -115,6 +817,680 @@ "summary": "Health" } }, + "/ingest/pipelines": { + "get": { + "operationId": "pipelines", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "additionalProperties": true, + "type": "object" + }, + "title": "Response Pipelines", + "type": "array" + } + } + }, + "description": "Successful Response" + } + }, + "summary": "Pipelines", + "tags": [ + "ingest" + ] + } + }, + "/ingest/pipelines/{pipeline_id}": { + "get": { + "description": "A saved pipeline (latest by default), with its secrets masked.", + "operationId": "pipeline", + "parameters": [ + { + "in": "path", + "name": "pipeline_id", + "required": true, + "schema": { + "maxLength": 40, + "pattern": "^[a-z][a-z0-9_]*$", + "title": "Pipeline Id", + "type": "string" + } + }, + { + "in": "query", + "name": "version", + "required": false, + "schema": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Version" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SavedPipeline" + } + } + }, + "description": "Successful Response" + }, + "422": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + }, + "description": "Validation Error" + } + }, + "summary": "Pipeline", + "tags": [ + "ingest" + ] + }, + "put": { + "description": "Saves a new version. Masked secrets sent back are kept as they were saved.", + "operationId": "save_pipeline", + "parameters": [ + { + "in": "path", + "name": "pipeline_id", + "required": true, + "schema": { + "maxLength": 40, + "pattern": "^[a-z][a-z0-9_]*$", + "title": "Pipeline Id", + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Pipeline" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "additionalProperties": { + "type": "integer" + }, + "title": "Response Save Pipeline", + "type": "object" + } + } + }, + "description": "Successful Response" + }, + "422": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + }, + "description": "Validation Error" + } + }, + "summary": "Save Pipeline", + "tags": [ + "ingest" + ] + } + }, + "/ingest/pipelines/{pipeline_id}/nodes/{node_id}/rows": { + "get": { + "description": "What a node produced in the last run (empty if it produced nothing yet).", + "operationId": "node_rows", + "parameters": [ + { + "in": "path", + "name": "pipeline_id", + "required": true, + "schema": { + "maxLength": 40, + "pattern": "^[a-z][a-z0-9_]*$", + "title": "Pipeline Id", + "type": "string" + } + }, + { + "in": "path", + "name": "node_id", + "required": true, + "schema": { + "maxLength": 40, + "pattern": "^[a-z][a-z0-9_]*$", + "title": "Node Id", + "type": "string" + } + }, + { + "in": "query", + "name": "limit", + "required": false, + "schema": { + "default": 50, + "maximum": 500, + "minimum": 1, + "title": "Limit", + "type": "integer" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "additionalProperties": true, + "type": "object" + }, + "title": "Response Node Rows", + "type": "array" + } + } + }, + "description": "Successful Response" + }, + "422": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + }, + "description": "Validation Error" + } + }, + "summary": "Node Rows", + "tags": [ + "ingest" + ] + } + }, + "/ingest/pipelines/{pipeline_id}/runs": { + "post": { + "description": "Starts the `ingest` job for this pipeline; follow it at /runs/{run_id}.", + "operationId": "start_run", + "parameters": [ + { + "in": "path", + "name": "pipeline_id", + "required": true, + "schema": { + "maxLength": 40, + "pattern": "^[a-z][a-z0-9_]*$", + "title": "Pipeline Id", + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RunRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "additionalProperties": { + "type": "string" + }, + "title": "Response Start Run", + "type": "object" + } + } + }, + "description": "Successful Response" + }, + "422": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + }, + "description": "Validation Error" + } + }, + "summary": "Start Run", + "tags": [ + "ingest" + ] + } + }, + "/ingest/schema": { + "get": { + "description": "What the canvas draws with: every node kind's form, and the platform entities.", + "operationId": "schema", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "additionalProperties": true, + "title": "Response Schema", + "type": "object" + } + } + }, + "description": "Successful Response" + } + }, + "summary": "Schema", + "tags": [ + "ingest" + ] + } + }, + "/ingest/sources/preview": { + "post": { + "description": "The first rows a source node would load.", + "operationId": "source_preview", + "parameters": [ + { + "in": "query", + "name": "limit", + "required": false, + "schema": { + "default": 20, + "maximum": 200, + "minimum": 1, + "title": "Limit", + "type": "integer" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Source" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "additionalProperties": true, + "type": "object" + }, + "title": "Response Source Preview", + "type": "array" + } + } + }, + "description": "Successful Response" + }, + "422": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + }, + "description": "Validation Error" + } + }, + "summary": "Source Preview", + "tags": [ + "ingest" + ] + } + }, + "/ingest/sources/resources": { + "post": { + "description": "What a source offers (a database's tables...): also tests that it can be reached.", + "operationId": "source_resources", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SourceRef" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "type": "string" + }, + "title": "Response Source Resources", + "type": "array" + } + } + }, + "description": "Successful Response" + }, + "422": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + }, + "description": "Validation Error" + } + }, + "summary": "Source Resources", + "tags": [ + "ingest" + ] + } + }, + "/ingest/uploads": { + "post": { + "description": "A CSV, Excel or document file for a `filesystem` source: use `bucket_url`.", + "operationId": "upload", + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/Body_upload" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "additionalProperties": { + "type": "string" + }, + "title": "Response Upload", + "type": "object" + } + } + }, + "description": "Successful Response" + }, + "422": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + }, + "description": "Validation Error" + } + }, + "summary": "Upload", + "tags": [ + "ingest" + ] + } + }, + "/review/conflicts": { + "get": { + "description": "Rows of one person and date that disagree; reject the wrong ones.", + "operationId": "conflicts", + "parameters": [ + { + "in": "query", + "name": "entity", + "required": true, + "schema": { + "enum": [ + "identity", + "death", + "clinical_note", + "cervical_cytology", + "cervical_biopsy", + "mammography", + "breast_biopsy" + ], + "title": "Entity", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "additionalProperties": true, + "type": "object" + }, + "title": "Response Conflicts", + "type": "array" + } + } + }, + "description": "Successful Response" + }, + "422": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + }, + "description": "Validation Error" + } + }, + "summary": "Conflicts", + "tags": [ + "review" + ] + } + }, + "/review/held": { + "get": { + "description": "Rows a rule held, with the reasons and the values as they came.", + "operationId": "held", + "parameters": [ + { + "in": "query", + "name": "entity", + "required": true, + "schema": { + "enum": [ + "identity", + "death", + "clinical_note", + "cervical_cytology", + "cervical_biopsy", + "mammography", + "breast_biopsy" + ], + "title": "Entity", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "additionalProperties": true, + "type": "object" + }, + "title": "Response Held", + "type": "array" + } + } + }, + "description": "Successful Response" + }, + "422": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + }, + "description": "Validation Error" + } + }, + "summary": "Held", + "tags": [ + "review" + ] + } + }, + "/review/links": { + "get": { + "description": "Records that may be the same person but were left apart.", + "operationId": "links", + "parameters": [ + { + "in": "query", + "name": "pipeline", + "required": true, + "schema": { + "maxLength": 40, + "pattern": "^[a-z][a-z0-9_]*$", + "title": "Pipeline", + "type": "string" + } + }, + { + "in": "query", + "name": "node", + "required": true, + "schema": { + "maxLength": 40, + "pattern": "^[a-z][a-z0-9_]*$", + "title": "Node", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "additionalProperties": true, + "type": "object" + }, + "title": "Response Links", + "type": "array" + } + } + }, + "description": "Successful Response" + }, + "422": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + }, + "description": "Validation Error" + } + }, + "summary": "Links", + "tags": [ + "review" + ] + } + }, + "/review/rejections": { + "post": { + "description": "This record's row must not reach silver; applied on the next run.", + "operationId": "reject", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Rejection" + } + } + }, + "required": true + }, + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "additionalProperties": { + "type": "string" + }, + "title": "Response Reject", + "type": "object" + } + } + }, + "description": "Successful Response" + }, + "422": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + }, + "description": "Validation Error" + } + }, + "summary": "Reject", + "tags": [ + "review" + ] + } + }, "/runs/{run_id}": { "get": { "operationId": "run_status", @@ -155,7 +1531,10 @@ "description": "Validation Error" } }, - "summary": "Run Status" + "summary": "Run Status", + "tags": [ + "runs" + ] } } } diff --git a/src/app/api/fn/ingest/node-rows.ts b/src/app/api/fn/ingest/node-rows.ts new file mode 100644 index 0000000..c3135b8 --- /dev/null +++ b/src/app/api/fn/ingest/node-rows.ts @@ -0,0 +1,39 @@ +/* eslint-disable */ +/* Code generated by ng-openapi-gen DO NOT EDIT. */ + +import { HttpClient, HttpContext, HttpResponse } from '@angular/common/http'; +import { Observable } from 'rxjs'; +import { filter, map } from 'rxjs/operators'; +import { StrictHttpResponse } from '../../strict-http-response'; +import { RequestBuilder } from '../../request-builder'; + + +export interface NodeRows$Params { + pipeline_id: string; + node_id: string; + limit?: number; +} + +export function nodeRows(http: HttpClient, rootUrl: string, params: NodeRows$Params, context?: HttpContext): Observable>> { + const rb = new RequestBuilder(rootUrl, nodeRows.PATH, 'get'); + if (params) { + rb.path('pipeline_id', params.pipeline_id, {}); + rb.path('node_id', params.node_id, {}); + rb.query('limit', params.limit, {}); + } + + return http.request( + rb.build({ responseType: 'json', accept: 'application/json', context }) + ).pipe( + filter((r: any): r is HttpResponse => r instanceof HttpResponse), + map((r: HttpResponse) => { + return r as StrictHttpResponse>; + }) + ); +} + +nodeRows.PATH = '/ingest/pipelines/{pipeline_id}/nodes/{node_id}/rows'; diff --git a/src/app/api/fn/ingest/pipeline.ts b/src/app/api/fn/ingest/pipeline.ts new file mode 100644 index 0000000..fabd415 --- /dev/null +++ b/src/app/api/fn/ingest/pipeline.ts @@ -0,0 +1,34 @@ +/* eslint-disable */ +/* Code generated by ng-openapi-gen DO NOT EDIT. */ + +import { HttpClient, HttpContext, HttpResponse } from '@angular/common/http'; +import { Observable } from 'rxjs'; +import { filter, map } from 'rxjs/operators'; +import { StrictHttpResponse } from '../../strict-http-response'; +import { RequestBuilder } from '../../request-builder'; + +import { SavedPipeline } from '../../models/saved-pipeline'; + +export interface Pipeline$Params { + pipeline_id: string; + version?: (number | null); +} + +export function pipeline(http: HttpClient, rootUrl: string, params: Pipeline$Params, context?: HttpContext): Observable> { + const rb = new RequestBuilder(rootUrl, pipeline.PATH, 'get'); + if (params) { + rb.path('pipeline_id', params.pipeline_id, {}); + rb.query('version', params.version, {}); + } + + return http.request( + rb.build({ responseType: 'json', accept: 'application/json', context }) + ).pipe( + filter((r: any): r is HttpResponse => r instanceof HttpResponse), + map((r: HttpResponse) => { + return r as StrictHttpResponse; + }) + ); +} + +pipeline.PATH = '/ingest/pipelines/{pipeline_id}'; diff --git a/src/app/api/fn/ingest/pipelines.ts b/src/app/api/fn/ingest/pipelines.ts new file mode 100644 index 0000000..8ce8692 --- /dev/null +++ b/src/app/api/fn/ingest/pipelines.ts @@ -0,0 +1,33 @@ +/* eslint-disable */ +/* Code generated by ng-openapi-gen DO NOT EDIT. */ + +import { HttpClient, HttpContext, HttpResponse } from '@angular/common/http'; +import { Observable } from 'rxjs'; +import { filter, map } from 'rxjs/operators'; +import { StrictHttpResponse } from '../../strict-http-response'; +import { RequestBuilder } from '../../request-builder'; + + +export interface Pipelines$Params { +} + +export function pipelines(http: HttpClient, rootUrl: string, params?: Pipelines$Params, context?: HttpContext): Observable>> { + const rb = new RequestBuilder(rootUrl, pipelines.PATH, 'get'); + if (params) { + } + + return http.request( + rb.build({ responseType: 'json', accept: 'application/json', context }) + ).pipe( + filter((r: any): r is HttpResponse => r instanceof HttpResponse), + map((r: HttpResponse) => { + return r as StrictHttpResponse>; + }) + ); +} + +pipelines.PATH = '/ingest/pipelines'; diff --git a/src/app/api/fn/ingest/save-pipeline.ts b/src/app/api/fn/ingest/save-pipeline.ts new file mode 100644 index 0000000..defc877 --- /dev/null +++ b/src/app/api/fn/ingest/save-pipeline.ts @@ -0,0 +1,38 @@ +/* eslint-disable */ +/* Code generated by ng-openapi-gen DO NOT EDIT. */ + +import { HttpClient, HttpContext, HttpResponse } from '@angular/common/http'; +import { Observable } from 'rxjs'; +import { filter, map } from 'rxjs/operators'; +import { StrictHttpResponse } from '../../strict-http-response'; +import { RequestBuilder } from '../../request-builder'; + +import { Pipeline } from '../../models/pipeline'; + +export interface SavePipeline$Params { + pipeline_id: string; + body: Pipeline +} + +export function savePipeline(http: HttpClient, rootUrl: string, params: SavePipeline$Params, context?: HttpContext): Observable> { + const rb = new RequestBuilder(rootUrl, savePipeline.PATH, 'put'); + if (params) { + rb.path('pipeline_id', params.pipeline_id, {}); + rb.body(params.body, 'application/json'); + } + + return http.request( + rb.build({ responseType: 'json', accept: 'application/json', context }) + ).pipe( + filter((r: any): r is HttpResponse => r instanceof HttpResponse), + map((r: HttpResponse) => { + return r as StrictHttpResponse<{ + [key: string]: number; + }>; + }) + ); +} + +savePipeline.PATH = '/ingest/pipelines/{pipeline_id}'; diff --git a/src/app/api/fn/ingest/schema.ts b/src/app/api/fn/ingest/schema.ts new file mode 100644 index 0000000..88601f2 --- /dev/null +++ b/src/app/api/fn/ingest/schema.ts @@ -0,0 +1,33 @@ +/* eslint-disable */ +/* Code generated by ng-openapi-gen DO NOT EDIT. */ + +import { HttpClient, HttpContext, HttpResponse } from '@angular/common/http'; +import { Observable } from 'rxjs'; +import { filter, map } from 'rxjs/operators'; +import { StrictHttpResponse } from '../../strict-http-response'; +import { RequestBuilder } from '../../request-builder'; + + +export interface Schema$Params { +} + +export function schema(http: HttpClient, rootUrl: string, params?: Schema$Params, context?: HttpContext): Observable> { + const rb = new RequestBuilder(rootUrl, schema.PATH, 'get'); + if (params) { + } + + return http.request( + rb.build({ responseType: 'json', accept: 'application/json', context }) + ).pipe( + filter((r: any): r is HttpResponse => r instanceof HttpResponse), + map((r: HttpResponse) => { + return r as StrictHttpResponse<{ + [key: string]: any; + }>; + }) + ); +} + +schema.PATH = '/ingest/schema'; diff --git a/src/app/api/fn/ingest/source-preview.ts b/src/app/api/fn/ingest/source-preview.ts new file mode 100644 index 0000000..91c0e19 --- /dev/null +++ b/src/app/api/fn/ingest/source-preview.ts @@ -0,0 +1,38 @@ +/* eslint-disable */ +/* Code generated by ng-openapi-gen DO NOT EDIT. */ + +import { HttpClient, HttpContext, HttpResponse } from '@angular/common/http'; +import { Observable } from 'rxjs'; +import { filter, map } from 'rxjs/operators'; +import { StrictHttpResponse } from '../../strict-http-response'; +import { RequestBuilder } from '../../request-builder'; + +import { Source } from '../../models/source'; + +export interface SourcePreview$Params { + limit?: number; + body: Source +} + +export function sourcePreview(http: HttpClient, rootUrl: string, params: SourcePreview$Params, context?: HttpContext): Observable>> { + const rb = new RequestBuilder(rootUrl, sourcePreview.PATH, 'post'); + if (params) { + rb.query('limit', params.limit, {}); + rb.body(params.body, 'application/json'); + } + + return http.request( + rb.build({ responseType: 'json', accept: 'application/json', context }) + ).pipe( + filter((r: any): r is HttpResponse => r instanceof HttpResponse), + map((r: HttpResponse) => { + return r as StrictHttpResponse>; + }) + ); +} + +sourcePreview.PATH = '/ingest/sources/preview'; diff --git a/src/app/api/fn/ingest/source-resources.ts b/src/app/api/fn/ingest/source-resources.ts new file mode 100644 index 0000000..90716fb --- /dev/null +++ b/src/app/api/fn/ingest/source-resources.ts @@ -0,0 +1,32 @@ +/* eslint-disable */ +/* Code generated by ng-openapi-gen DO NOT EDIT. */ + +import { HttpClient, HttpContext, HttpResponse } from '@angular/common/http'; +import { Observable } from 'rxjs'; +import { filter, map } from 'rxjs/operators'; +import { StrictHttpResponse } from '../../strict-http-response'; +import { RequestBuilder } from '../../request-builder'; + +import { SourceRef } from '../../models/source-ref'; + +export interface SourceResources$Params { + body: SourceRef +} + +export function sourceResources(http: HttpClient, rootUrl: string, params: SourceResources$Params, context?: HttpContext): Observable>> { + const rb = new RequestBuilder(rootUrl, sourceResources.PATH, 'post'); + if (params) { + rb.body(params.body, 'application/json'); + } + + return http.request( + rb.build({ responseType: 'json', accept: 'application/json', context }) + ).pipe( + filter((r: any): r is HttpResponse => r instanceof HttpResponse), + map((r: HttpResponse) => { + return r as StrictHttpResponse>; + }) + ); +} + +sourceResources.PATH = '/ingest/sources/resources'; diff --git a/src/app/api/fn/ingest/start-run.ts b/src/app/api/fn/ingest/start-run.ts new file mode 100644 index 0000000..93d2725 --- /dev/null +++ b/src/app/api/fn/ingest/start-run.ts @@ -0,0 +1,38 @@ +/* eslint-disable */ +/* Code generated by ng-openapi-gen DO NOT EDIT. */ + +import { HttpClient, HttpContext, HttpResponse } from '@angular/common/http'; +import { Observable } from 'rxjs'; +import { filter, map } from 'rxjs/operators'; +import { StrictHttpResponse } from '../../strict-http-response'; +import { RequestBuilder } from '../../request-builder'; + +import { RunRequest } from '../../models/run-request'; + +export interface StartRun$Params { + pipeline_id: string; + body: RunRequest +} + +export function startRun(http: HttpClient, rootUrl: string, params: StartRun$Params, context?: HttpContext): Observable> { + const rb = new RequestBuilder(rootUrl, startRun.PATH, 'post'); + if (params) { + rb.path('pipeline_id', params.pipeline_id, {}); + rb.body(params.body, 'application/json'); + } + + return http.request( + rb.build({ responseType: 'json', accept: 'application/json', context }) + ).pipe( + filter((r: any): r is HttpResponse => r instanceof HttpResponse), + map((r: HttpResponse) => { + return r as StrictHttpResponse<{ + [key: string]: string; + }>; + }) + ); +} + +startRun.PATH = '/ingest/pipelines/{pipeline_id}/runs'; diff --git a/src/app/api/fn/ingest/upload.ts b/src/app/api/fn/ingest/upload.ts new file mode 100644 index 0000000..f5055fe --- /dev/null +++ b/src/app/api/fn/ingest/upload.ts @@ -0,0 +1,36 @@ +/* eslint-disable */ +/* Code generated by ng-openapi-gen DO NOT EDIT. */ + +import { HttpClient, HttpContext, HttpResponse } from '@angular/common/http'; +import { Observable } from 'rxjs'; +import { filter, map } from 'rxjs/operators'; +import { StrictHttpResponse } from '../../strict-http-response'; +import { RequestBuilder } from '../../request-builder'; + +import { BodyUpload } from '../../models/body-upload'; + +export interface Upload$Params { + body: BodyUpload +} + +export function upload(http: HttpClient, rootUrl: string, params: Upload$Params, context?: HttpContext): Observable> { + const rb = new RequestBuilder(rootUrl, upload.PATH, 'post'); + if (params) { + rb.body(params.body, 'multipart/form-data'); + } + + return http.request( + rb.build({ responseType: 'json', accept: 'application/json', context }) + ).pipe( + filter((r: any): r is HttpResponse => r instanceof HttpResponse), + map((r: HttpResponse) => { + return r as StrictHttpResponse<{ + [key: string]: string; + }>; + }) + ); +} + +upload.PATH = '/ingest/uploads'; diff --git a/src/app/api/fn/review/conflicts.ts b/src/app/api/fn/review/conflicts.ts new file mode 100644 index 0000000..eed56cb --- /dev/null +++ b/src/app/api/fn/review/conflicts.ts @@ -0,0 +1,35 @@ +/* eslint-disable */ +/* Code generated by ng-openapi-gen DO NOT EDIT. */ + +import { HttpClient, HttpContext, HttpResponse } from '@angular/common/http'; +import { Observable } from 'rxjs'; +import { filter, map } from 'rxjs/operators'; +import { StrictHttpResponse } from '../../strict-http-response'; +import { RequestBuilder } from '../../request-builder'; + + +export interface Conflicts$Params { + entity: 'identity' | 'death' | 'clinical_note' | 'cervical_cytology' | 'cervical_biopsy' | 'mammography' | 'breast_biopsy'; +} + +export function conflicts(http: HttpClient, rootUrl: string, params: Conflicts$Params, context?: HttpContext): Observable>> { + const rb = new RequestBuilder(rootUrl, conflicts.PATH, 'get'); + if (params) { + rb.query('entity', params.entity, {}); + } + + return http.request( + rb.build({ responseType: 'json', accept: 'application/json', context }) + ).pipe( + filter((r: any): r is HttpResponse => r instanceof HttpResponse), + map((r: HttpResponse) => { + return r as StrictHttpResponse>; + }) + ); +} + +conflicts.PATH = '/review/conflicts'; diff --git a/src/app/api/fn/review/held.ts b/src/app/api/fn/review/held.ts new file mode 100644 index 0000000..64531b0 --- /dev/null +++ b/src/app/api/fn/review/held.ts @@ -0,0 +1,35 @@ +/* eslint-disable */ +/* Code generated by ng-openapi-gen DO NOT EDIT. */ + +import { HttpClient, HttpContext, HttpResponse } from '@angular/common/http'; +import { Observable } from 'rxjs'; +import { filter, map } from 'rxjs/operators'; +import { StrictHttpResponse } from '../../strict-http-response'; +import { RequestBuilder } from '../../request-builder'; + + +export interface Held$Params { + entity: 'identity' | 'death' | 'clinical_note' | 'cervical_cytology' | 'cervical_biopsy' | 'mammography' | 'breast_biopsy'; +} + +export function held(http: HttpClient, rootUrl: string, params: Held$Params, context?: HttpContext): Observable>> { + const rb = new RequestBuilder(rootUrl, held.PATH, 'get'); + if (params) { + rb.query('entity', params.entity, {}); + } + + return http.request( + rb.build({ responseType: 'json', accept: 'application/json', context }) + ).pipe( + filter((r: any): r is HttpResponse => r instanceof HttpResponse), + map((r: HttpResponse) => { + return r as StrictHttpResponse>; + }) + ); +} + +held.PATH = '/review/held'; diff --git a/src/app/api/fn/review/links.ts b/src/app/api/fn/review/links.ts new file mode 100644 index 0000000..c7038e7 --- /dev/null +++ b/src/app/api/fn/review/links.ts @@ -0,0 +1,37 @@ +/* eslint-disable */ +/* Code generated by ng-openapi-gen DO NOT EDIT. */ + +import { HttpClient, HttpContext, HttpResponse } from '@angular/common/http'; +import { Observable } from 'rxjs'; +import { filter, map } from 'rxjs/operators'; +import { StrictHttpResponse } from '../../strict-http-response'; +import { RequestBuilder } from '../../request-builder'; + + +export interface Links$Params { + pipeline: string; + node: string; +} + +export function links(http: HttpClient, rootUrl: string, params: Links$Params, context?: HttpContext): Observable>> { + const rb = new RequestBuilder(rootUrl, links.PATH, 'get'); + if (params) { + rb.query('pipeline', params.pipeline, {}); + rb.query('node', params.node, {}); + } + + return http.request( + rb.build({ responseType: 'json', accept: 'application/json', context }) + ).pipe( + filter((r: any): r is HttpResponse => r instanceof HttpResponse), + map((r: HttpResponse) => { + return r as StrictHttpResponse>; + }) + ); +} + +links.PATH = '/review/links'; diff --git a/src/app/api/fn/review/reject.ts b/src/app/api/fn/review/reject.ts new file mode 100644 index 0000000..0eee258 --- /dev/null +++ b/src/app/api/fn/review/reject.ts @@ -0,0 +1,36 @@ +/* eslint-disable */ +/* Code generated by ng-openapi-gen DO NOT EDIT. */ + +import { HttpClient, HttpContext, HttpResponse } from '@angular/common/http'; +import { Observable } from 'rxjs'; +import { filter, map } from 'rxjs/operators'; +import { StrictHttpResponse } from '../../strict-http-response'; +import { RequestBuilder } from '../../request-builder'; + +import { Rejection } from '../../models/rejection'; + +export interface Reject$Params { + body: Rejection +} + +export function reject(http: HttpClient, rootUrl: string, params: Reject$Params, context?: HttpContext): Observable> { + const rb = new RequestBuilder(rootUrl, reject.PATH, 'post'); + if (params) { + rb.body(params.body, 'application/json'); + } + + return http.request( + rb.build({ responseType: 'json', accept: 'application/json', context }) + ).pipe( + filter((r: any): r is HttpResponse => r instanceof HttpResponse), + map((r: HttpResponse) => { + return r as StrictHttpResponse<{ + [key: string]: string; + }>; + }) + ); +} + +reject.PATH = '/review/rejections'; diff --git a/src/app/api/fn/operations/run-status.ts b/src/app/api/fn/runs/run-status.ts similarity index 100% rename from src/app/api/fn/operations/run-status.ts rename to src/app/api/fn/runs/run-status.ts diff --git a/src/app/api/functions.ts b/src/app/api/functions.ts index 6e47ecf..09e8eca 100644 --- a/src/app/api/functions.ts +++ b/src/app/api/functions.ts @@ -5,5 +5,31 @@ export type { Domains$Params as Domains$Params } from './fn/operations/domains'; export { domains as domains } from './fn/operations/domains'; export type { Health$Params as Health$Params } from './fn/operations/health'; export { health as health } from './fn/operations/health'; -export type { RunStatus$Params as RunStatus$Params } from './fn/operations/run-status'; -export { runStatus as runStatus } from './fn/operations/run-status'; +export type { Pipelines$Params as Pipelines$Params } from './fn/ingest/pipelines'; +export { pipelines as pipelines } from './fn/ingest/pipelines'; +export type { Pipeline$Params as Pipeline$Params } from './fn/ingest/pipeline'; +export { pipeline as pipeline } from './fn/ingest/pipeline'; +export type { SavePipeline$Params as SavePipeline$Params } from './fn/ingest/save-pipeline'; +export { savePipeline as savePipeline } from './fn/ingest/save-pipeline'; +export type { NodeRows$Params as NodeRows$Params } from './fn/ingest/node-rows'; +export { nodeRows as nodeRows } from './fn/ingest/node-rows'; +export type { StartRun$Params as StartRun$Params } from './fn/ingest/start-run'; +export { startRun as startRun } from './fn/ingest/start-run'; +export type { Schema$Params as Schema$Params } from './fn/ingest/schema'; +export { schema as schema } from './fn/ingest/schema'; +export type { SourcePreview$Params as SourcePreview$Params } from './fn/ingest/source-preview'; +export { sourcePreview as sourcePreview } from './fn/ingest/source-preview'; +export type { SourceResources$Params as SourceResources$Params } from './fn/ingest/source-resources'; +export { sourceResources as sourceResources } from './fn/ingest/source-resources'; +export type { Upload$Params as Upload$Params } from './fn/ingest/upload'; +export { upload as upload } from './fn/ingest/upload'; +export type { Conflicts$Params as Conflicts$Params } from './fn/review/conflicts'; +export { conflicts as conflicts } from './fn/review/conflicts'; +export type { Held$Params as Held$Params } from './fn/review/held'; +export { held as held } from './fn/review/held'; +export type { Links$Params as Links$Params } from './fn/review/links'; +export { links as links } from './fn/review/links'; +export type { Reject$Params as Reject$Params } from './fn/review/reject'; +export { reject as reject } from './fn/review/reject'; +export type { RunStatus$Params as RunStatus$Params } from './fn/runs/run-status'; +export { runStatus as runStatus } from './fn/runs/run-status'; diff --git a/src/app/api/models.ts b/src/app/api/models.ts index 73120cb..724418c 100644 --- a/src/app/api/models.ts +++ b/src/app/api/models.ts @@ -1,6 +1,21 @@ /* eslint-disable */ /* Code generated by ng-openapi-gen DO NOT EDIT. */ +export type { BodyUpload } from './models/body-upload'; +export type { Condition } from './models/condition'; export type { Domain } from './models/domain'; +export type { Extract } from './models/extract'; export type { HttpValidationError } from './models/http-validation-error'; +export type { Join } from './models/join'; +export type { Link } from './models/link'; +export type { Map } from './models/map'; +export type { Pipeline } from './models/pipeline'; +export type { Read } from './models/read'; +export type { Rejection } from './models/rejection'; +export type { Route } from './models/route'; +export type { RunRequest } from './models/run-request'; +export type { SavedPipeline } from './models/saved-pipeline'; +export type { Source } from './models/source'; +export type { SourceRef } from './models/source-ref'; +export type { Target } from './models/target'; export type { ValidationError } from './models/validation-error'; diff --git a/src/app/api/models/body-upload.ts b/src/app/api/models/body-upload.ts new file mode 100644 index 0000000..0600f02 --- /dev/null +++ b/src/app/api/models/body-upload.ts @@ -0,0 +1,6 @@ +/* eslint-disable */ +/* Code generated by ng-openapi-gen DO NOT EDIT. */ + +export interface BodyUpload { + file: string; +} diff --git a/src/app/api/models/condition.ts b/src/app/api/models/condition.ts new file mode 100644 index 0000000..7e39071 --- /dev/null +++ b/src/app/api/models/condition.ts @@ -0,0 +1,8 @@ +/* eslint-disable */ +/* Code generated by ng-openapi-gen DO NOT EDIT. */ + +export interface Condition { + column: string; + op: 'equals' | 'contains' | 'matches' | 'present'; + value?: string; +} diff --git a/src/app/api/models/extract.ts b/src/app/api/models/extract.ts new file mode 100644 index 0000000..a6ecb5c --- /dev/null +++ b/src/app/api/models/extract.ts @@ -0,0 +1,33 @@ +/* eslint-disable */ +/* Code generated by ng-openapi-gen DO NOT EDIT. */ + + +/** + * Platform fields read from text, each kept with the text it was read from. + * + * `auto` asks the LLM when one is configured and answering, else applies `patterns`; + * with neither, the row is held. Patterns are regexes with one group, per field (the + * LLM can propose them from sample documents); their values go through `values` and + * `formats` as in `map`. + */ +export interface Extract { + column: string; + entity: 'identity' | 'death' | 'clinical_note' | 'cervical_cytology' | 'cervical_biopsy' | 'mammography' | 'breast_biopsy'; + formats?: { +[key: string]: string; +}; + hints?: string; + id: string; + inputs?: Array; + kind?: 'extract'; + label?: string; + method?: 'auto' | 'llm' | 'patterns'; + patterns?: { +[key: string]: string; +}; + values?: { +[key: string]: { +[key: string]: string; +}; +}; +} diff --git a/src/app/api/models/join.ts b/src/app/api/models/join.ts new file mode 100644 index 0000000..ee77f9e --- /dev/null +++ b/src/app/api/models/join.ts @@ -0,0 +1,15 @@ +/* eslint-disable */ +/* Code generated by ng-openapi-gen DO NOT EDIT. */ + + +/** + * Two inputs side by side where their columns match. + */ +export interface Join { + how?: 'inner' | 'left'; + id: string; + inputs?: Array; + kind?: 'join'; + label?: string; + on: Array<[string, string]>; +} diff --git a/src/app/api/models/link.ts b/src/app/api/models/link.ts new file mode 100644 index 0000000..df3b501 --- /dev/null +++ b/src/app/api/models/link.ts @@ -0,0 +1,21 @@ +/* eslint-disable */ +/* Code generated by ng-openapi-gen DO NOT EDIT. */ + + +/** + * Identity rows from every input, grouped into persons (Splink). + * + * Two records are the same person when any rule holds (Splink's SQL rule syntax, `l.` + * and `r.` for the two records); persons are the connected groups. A person whose + * records disagree on birth date or sex is held for review as a whole. Pairs Splink + * scores above `review` that ended up apart are queued as possible matches. + */ +export interface Link { + fields?: Array; + id: string; + inputs?: Array; + kind?: 'link'; + label?: string; + review?: number; + rules?: Array; +} diff --git a/src/app/api/models/map.ts b/src/app/api/models/map.ts new file mode 100644 index 0000000..f5f0bee --- /dev/null +++ b/src/app/api/models/map.ts @@ -0,0 +1,24 @@ +/* eslint-disable */ +/* Code generated by ng-openapi-gen DO NOT EDIT. */ + + +/** + * Columns to platform fields, with the site's codes and date formats. + */ +export interface Map { + fields: { +[key: string]: string; +}; + formats?: { +[key: string]: string; +}; + id: string; + inputs?: Array; + kind?: 'map'; + label?: string; + values?: { +[key: string]: { +[key: string]: string; +}; +}; +} diff --git a/src/app/api/models/pipeline.ts b/src/app/api/models/pipeline.ts new file mode 100644 index 0000000..c7b6707 --- /dev/null +++ b/src/app/api/models/pipeline.ts @@ -0,0 +1,14 @@ +/* eslint-disable */ +/* Code generated by ng-openapi-gen DO NOT EDIT. */ + +import { Extract } from '../models/extract'; +import { Join } from '../models/join'; +import { Link } from '../models/link'; +import { Map } from '../models/map'; +import { Read } from '../models/read'; +import { Route } from '../models/route'; +import { Source } from '../models/source'; +import { Target } from '../models/target'; +export interface Pipeline { + nodes: Array<(Source | Read | Route | Map | Extract | Join | Link | Target)>; +} diff --git a/src/app/api/models/read.ts b/src/app/api/models/read.ts new file mode 100644 index 0000000..d1586b0 --- /dev/null +++ b/src/app/api/models/read.ts @@ -0,0 +1,14 @@ +/* eslint-disable */ +/* Code generated by ng-openapi-gen DO NOT EDIT. */ + + +/** + * Files in a column (PDF, Word, Excel, scans...) to text (MarkItDown, OCRmyPDF). + */ +export interface Read { + column: string; + id: string; + inputs?: Array; + kind?: 'read'; + label?: string; +} diff --git a/src/app/api/models/rejection.ts b/src/app/api/models/rejection.ts new file mode 100644 index 0000000..233a577 --- /dev/null +++ b/src/app/api/models/rejection.ts @@ -0,0 +1,8 @@ +/* eslint-disable */ +/* Code generated by ng-openapi-gen DO NOT EDIT. */ + +export interface Rejection { + entity: 'identity' | 'death' | 'clinical_note' | 'cervical_cytology' | 'cervical_biopsy' | 'mammography' | 'breast_biopsy'; + reason: string; + record: string; +} diff --git a/src/app/api/models/route.ts b/src/app/api/models/route.ts new file mode 100644 index 0000000..2b435d4 --- /dev/null +++ b/src/app/api/models/route.ts @@ -0,0 +1,15 @@ +/* eslint-disable */ +/* Code generated by ng-openapi-gen DO NOT EDIT. */ + +import { Condition } from '../models/condition'; + +/** + * Only the rows where every condition holds (e.g. reports titled "CitologĂ­a"). + */ +export interface Route { + id: string; + inputs?: Array; + kind?: 'route'; + label?: string; + when: Array; +} diff --git a/src/app/api/models/run-request.ts b/src/app/api/models/run-request.ts new file mode 100644 index 0000000..11fac9d --- /dev/null +++ b/src/app/api/models/run-request.ts @@ -0,0 +1,6 @@ +/* eslint-disable */ +/* Code generated by ng-openapi-gen DO NOT EDIT. */ + +export interface RunRequest { + version?: (number | null); +} diff --git a/src/app/api/models/saved-pipeline.ts b/src/app/api/models/saved-pipeline.ts new file mode 100644 index 0000000..84a352e --- /dev/null +++ b/src/app/api/models/saved-pipeline.ts @@ -0,0 +1,8 @@ +/* eslint-disable */ +/* Code generated by ng-openapi-gen DO NOT EDIT. */ + +import { Pipeline } from '../models/pipeline'; +export interface SavedPipeline { + pipeline: Pipeline; + version: number; +} diff --git a/src/app/api/models/source-ref.ts b/src/app/api/models/source-ref.ts new file mode 100644 index 0000000..e476d3e --- /dev/null +++ b/src/app/api/models/source-ref.ts @@ -0,0 +1,9 @@ +/* eslint-disable */ +/* Code generated by ng-openapi-gen DO NOT EDIT. */ + +export interface SourceRef { + args?: { +[key: string]: any; +}; + source: string; +} diff --git a/src/app/api/models/source.ts b/src/app/api/models/source.ts new file mode 100644 index 0000000..e2e5966 --- /dev/null +++ b/src/app/api/models/source.ts @@ -0,0 +1,21 @@ +/* eslint-disable */ +/* Code generated by ng-openapi-gen DO NOT EDIT. */ + + +/** + * One table, file set or API resource, copied as it is (dlt). Merged on the source's + * own primary key or `primary_key`; replaced whole when it has none. + */ +export interface Source { + args?: { +[key: string]: any; +}; + id: string; + inputs?: Array; + kind?: 'source'; + label?: string; + primary_key?: Array; + resource?: (string | null); + source: string; + then?: (string | null); +} diff --git a/src/app/api/models/target.ts b/src/app/api/models/target.ts new file mode 100644 index 0000000..6397ce2 --- /dev/null +++ b/src/app/api/models/target.ts @@ -0,0 +1,15 @@ +/* eslint-disable */ +/* Code generated by ng-openapi-gen DO NOT EDIT. */ + + +/** + * Rows of platform fields into one platform entity, each row given its person by the + * one `link` node among the inputs. Rule breaks are held for review. + */ +export interface Target { + entity: 'identity' | 'death' | 'clinical_note' | 'cervical_cytology' | 'cervical_biopsy' | 'mammography' | 'breast_biopsy'; + id: string; + inputs?: Array; + kind?: 'target'; + label?: string; +}