diff --git a/openapi.json b/openapi.json index f14c00a..f65af56 100644 --- a/openapi.json +++ b/openapi.json @@ -14,6 +14,14 @@ ], "title": "Age Months" }, + "checks": { + "items": { + "additionalProperties": true, + "type": "object" + }, + "title": "Checks", + "type": "array" + }, "id": { "title": "Id", "type": "string" @@ -36,6 +44,14 @@ "title": "Metrics", "type": "array" }, + "regions": { + "items": { + "additionalProperties": true, + "type": "object" + }, + "title": "Regions", + "type": "array" + }, "valid": { "anyOf": [ { @@ -53,7 +69,9 @@ "valid", "level", "age_months", - "metrics" + "metrics", + "checks", + "regions" ], "title": "Analysis", "type": "object" @@ -125,6 +143,49 @@ "title": "Body_import_models", "type": "object" }, + "Body_start_preview": { + "properties": { + "ados2": { + "anyOf": [ + { + "format": "binary", + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Ados2" + }, + "birth_date": { + "anyOf": [ + { + "format": "date", + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Birth Date" + }, + "edf": { + "format": "binary", + "title": "Edf", + "type": "string" + }, + "pipeline": { + "default": "tea", + "title": "Pipeline", + "type": "string" + } + }, + "required": [ + "edf" + ], + "title": "Body_start_preview", + "type": "object" + }, "Body_upload": { "properties": { "file": { @@ -139,6 +200,24 @@ "title": "Body_upload", "type": "object" }, + "Body_upload_training_inputs": { + "properties": { + "files": { + "items": { + "format": "binary", + "type": "string" + }, + "minItems": 1, + "title": "Files", + "type": "array" + } + }, + "required": [ + "files" + ], + "title": "Body_upload_training_inputs", + "type": "object" + }, "Cancel": { "properties": { "id": { @@ -1127,6 +1206,364 @@ "title": "Position", "type": "object" }, + "PreviewAdos2": { + "properties": { + "classification": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Classification" + }, + "css": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Css" + }, + "evaluation_date": { + "anyOf": [ + { + "format": "date", + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Evaluation Date" + }, + "items": { + "additionalProperties": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ] + }, + "title": "Items", + "type": "object" + }, + "module": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Module" + }, + "read": { + "items": { + "type": "string" + }, + "title": "Read", + "type": "array" + } + }, + "required": [ + "module", + "evaluation_date", + "items", + "css", + "classification", + "read" + ], + "title": "PreviewAdos2", + "type": "object" + }, + "PreviewEeg": { + "properties": { + "age_months": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "title": "Age Months" + }, + "bad_channels": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Bad Channels" + }, + "channels": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Channels" + }, + "checks": { + "items": { + "additionalProperties": true, + "type": "object" + }, + "title": "Checks", + "type": "array" + }, + "clean_fraction": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "title": "Clean Fraction" + }, + "duration_min": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "title": "Duration Min" + }, + "error": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Error" + }, + "level": { + "title": "Level", + "type": "string" + }, + "line_noise_db": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "title": "Line Noise Db" + }, + "metrics": { + "items": { + "$ref": "#/components/schemas/PreviewMetric" + }, + "title": "Metrics", + "type": "array" + }, + "recorded_on": { + "anyOf": [ + { + "format": "date", + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Recorded On" + }, + "sleep": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Sleep" + }, + "valid": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Valid" + } + }, + "required": [ + "valid", + "level", + "recorded_on", + "age_months", + "clean_fraction", + "bad_channels", + "channels", + "duration_min", + "line_noise_db", + "sleep", + "checks", + "metrics", + "error" + ], + "title": "PreviewEeg", + "type": "object" + }, + "PreviewMetric": { + "properties": { + "code": { + "title": "Code", + "type": "string" + }, + "electrodes": { + "additionalProperties": { + "$ref": "#/components/schemas/Site" + }, + "title": "Electrodes", + "type": "object" + }, + "model": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Model" + }, + "score": { + "anyOf": [ + { + "$ref": "#/components/schemas/Score" + }, + { + "type": "null" + } + ] + }, + "value": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "title": "Value" + }, + "zones": { + "additionalProperties": { + "$ref": "#/components/schemas/Site" + }, + "title": "Zones", + "type": "object" + } + }, + "required": [ + "code", + "value", + "score", + "model", + "electrodes", + "zones" + ], + "title": "PreviewMetric", + "type": "object" + }, + "PreviewResult": { + "properties": { + "ados2": { + "anyOf": [ + { + "$ref": "#/components/schemas/PreviewAdos2" + }, + { + "type": "null" + } + ] + }, + "eeg": { + "$ref": "#/components/schemas/PreviewEeg" + }, + "warnings": { + "items": { + "type": "string" + }, + "title": "Warnings", + "type": "array" + } + }, + "required": [ + "eeg", + "ados2", + "warnings" + ], + "title": "PreviewResult", + "type": "object" + }, + "PreviewStatus": { + "properties": { + "result": { + "anyOf": [ + { + "$ref": "#/components/schemas/PreviewResult" + }, + { + "type": "null" + } + ] + }, + "state": { + "enum": [ + "queued", + "running", + "succeeded", + "failed", + "cancelling", + "cancelled" + ], + "title": "State", + "type": "string" + } + }, + "required": [ + "state", + "result" + ], + "title": "PreviewStatus", + "type": "object" + }, "Progress": { "description": "The run tag's JSON; the API returns it as it is.", "properties": { @@ -1658,6 +2095,105 @@ "title": "Scope", "type": "object" }, + "Score": { + "properties": { + "median": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "title": "Median" + }, + "outside": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "title": "Outside" + }, + "p5": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "title": "P5" + }, + "p95": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "title": "P95" + }, + "z": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "title": "Z" + } + }, + "required": [ + "z", + "outside", + "p5", + "median", + "p95" + ], + "title": "Score", + "type": "object" + }, + "Site": { + "properties": { + "score": { + "anyOf": [ + { + "$ref": "#/components/schemas/Score" + }, + { + "type": "null" + } + ] + }, + "value": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "title": "Value" + } + }, + "required": [ + "value", + "score" + ], + "title": "Site", + "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.", @@ -2123,6 +2659,15 @@ "title": "Reports", "type": "array" }, + "status": { + "enum": [ + "champion", + "retired", + "candidate" + ], + "title": "Status", + "type": "string" + }, "version": { "title": "Version", "type": "integer" @@ -2134,7 +2679,8 @@ "aliases", "metrics", "params", - "reports" + "reports", + "status" ], "title": "Version", "type": "object" @@ -3268,6 +3814,129 @@ ] } }, + "/models/{domain}/{name}/inputs": { + "get": { + "operationId": "training_inputs", + "parameters": [ + { + "in": "path", + "name": "domain", + "required": true, + "schema": { + "$ref": "#/components/schemas/Domain" + } + }, + { + "in": "path", + "name": "name", + "required": true, + "schema": { + "title": "Name", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "additionalProperties": true, + "title": "Response Training Inputs", + "type": "object" + } + } + }, + "description": "Successful Response" + }, + "422": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + }, + "description": "Validation Error" + } + }, + "summary": "Training Inputs", + "tags": [ + "models" + ] + } + }, + "/models/{domain}/{name}/inputs/{set}/files": { + "post": { + "operationId": "upload_training_inputs", + "parameters": [ + { + "in": "path", + "name": "domain", + "required": true, + "schema": { + "$ref": "#/components/schemas/Domain" + } + }, + { + "in": "path", + "name": "name", + "required": true, + "schema": { + "title": "Name", + "type": "string" + } + }, + { + "in": "path", + "name": "set", + "required": true, + "schema": { + "title": "Set", + "type": "string" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/Body_upload_training_inputs" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "additionalProperties": true, + "title": "Response Upload Training Inputs", + "type": "object" + } + } + }, + "description": "Successful Response" + }, + "422": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + }, + "description": "Validation Error" + } + }, + "summary": "Upload Training Inputs", + "tags": [ + "models" + ] + } + }, "/models/{domain}/{name}/training-config": { "get": { "operationId": "training_config", @@ -3372,6 +4041,202 @@ ] } }, + "/models/{domain}/{name}/versions/{version}/checks": { + "get": { + "operationId": "version_checks", + "parameters": [ + { + "in": "path", + "name": "domain", + "required": true, + "schema": { + "$ref": "#/components/schemas/Domain" + } + }, + { + "in": "path", + "name": "name", + "required": true, + "schema": { + "title": "Name", + "type": "string" + } + }, + { + "in": "path", + "name": "version", + "required": true, + "schema": { + "title": "Version", + "type": "integer" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "additionalProperties": true, + "title": "Response Version Checks", + "type": "object" + } + } + }, + "description": "Successful Response" + }, + "422": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + }, + "description": "Validation Error" + } + }, + "summary": "Version Checks", + "tags": [ + "models" + ] + } + }, + "/models/{domain}/{name}/versions/{version}/curve": { + "get": { + "operationId": "curve", + "parameters": [ + { + "in": "path", + "name": "domain", + "required": true, + "schema": { + "$ref": "#/components/schemas/Domain" + } + }, + { + "in": "path", + "name": "name", + "required": true, + "schema": { + "title": "Name", + "type": "string" + } + }, + { + "in": "path", + "name": "version", + "required": true, + "schema": { + "title": "Version", + "type": "integer" + } + }, + { + "in": "query", + "name": "feature", + "required": false, + "schema": { + "default": "value", + "title": "Feature", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "additionalProperties": true, + "type": "object" + }, + "title": "Response Curve", + "type": "array" + } + } + }, + "description": "Successful Response" + }, + "422": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + }, + "description": "Validation Error" + } + }, + "summary": "Curve", + "tags": [ + "models" + ] + } + }, + "/models/{domain}/{name}/versions/{version}/lineage": { + "get": { + "operationId": "lineage", + "parameters": [ + { + "in": "path", + "name": "domain", + "required": true, + "schema": { + "$ref": "#/components/schemas/Domain" + } + }, + { + "in": "path", + "name": "name", + "required": true, + "schema": { + "title": "Name", + "type": "string" + } + }, + { + "in": "path", + "name": "version", + "required": true, + "schema": { + "title": "Version", + "type": "integer" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "additionalProperties": true, + "title": "Response Lineage", + "type": "object" + } + } + }, + "description": "Successful Response" + }, + "422": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + }, + "description": "Validation Error" + } + }, + "summary": "Lineage", + "tags": [ + "models" + ] + } + }, "/models/{domain}/{name}/versions/{version}/promote": { "post": { "description": "The version risk batches come from from now on; refused (409) without its three\nreports: technical validation, interpretability and clinical validation.", @@ -3572,6 +4437,69 @@ ] } }, + "/models/{domain}/{name}/versions/{version}/retire": { + "post": { + "operationId": "retire", + "parameters": [ + { + "in": "path", + "name": "domain", + "required": true, + "schema": { + "$ref": "#/components/schemas/Domain" + } + }, + { + "in": "path", + "name": "name", + "required": true, + "schema": { + "title": "Name", + "type": "string" + } + }, + { + "in": "path", + "name": "version", + "required": true, + "schema": { + "title": "Version", + "type": "integer" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "additionalProperties": { + "type": "string" + }, + "title": "Response Retire", + "type": "object" + } + } + }, + "description": "Successful Response" + }, + "422": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + }, + "description": "Validation Error" + } + }, + "summary": "Retire", + "tags": [ + "models" + ] + } + }, "/review/conflicts": { "get": { "description": "Rows of one person and date that disagree; reject the wrong ones.", @@ -4156,6 +5084,31 @@ ] } }, + "/tea/eegs/summary": { + "get": { + "operationId": "eeg_summary", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "additionalProperties": { + "type": "integer" + }, + "title": "Response Eeg Summary", + "type": "object" + } + } + }, + "description": "Successful Response" + } + }, + "summary": "Eeg Summary", + "tags": [ + "eeg" + ] + } + }, "/tea/eegs/{eeg_id}": { "get": { "operationId": "study", @@ -4198,6 +5151,93 @@ ] } }, + "/tea/preview": { + "post": { + "operationId": "start_preview", + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/Body_start_preview" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "additionalProperties": { + "type": "string" + }, + "title": "Response Start Preview", + "type": "object" + } + } + }, + "description": "Successful Response" + }, + "422": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + }, + "description": "Validation Error" + } + }, + "summary": "Start Preview", + "tags": [ + "preview" + ] + } + }, + "/tea/preview/{run_id}": { + "get": { + "operationId": "preview_status", + "parameters": [ + { + "in": "path", + "name": "run_id", + "required": true, + "schema": { + "title": "Run Id", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PreviewStatus" + } + } + }, + "description": "Successful Response" + }, + "422": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + }, + "description": "Validation Error" + } + }, + "summary": "Preview Status", + "tags": [ + "preview" + ] + } + }, "/{domain}/fhir": { "post": { "description": "A standard hospital's Bundle: checked as FHIR, kept as sent in the sender's inbox,\nand placed by the sender's pipeline (a run starts; follow it at the Location).", diff --git a/src/app/api/fn/eeg/eeg-summary.ts b/src/app/api/fn/eeg/eeg-summary.ts new file mode 100644 index 0000000..1e98f03 --- /dev/null +++ b/src/app/api/fn/eeg/eeg-summary.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 EegSummary$Params { +} + +export function eegSummary(http: HttpClient, rootUrl: string, params?: EegSummary$Params, context?: HttpContext): Observable> { + const rb = new RequestBuilder(rootUrl, eegSummary.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]: number; + }>; + }) + ); +} + +eegSummary.PATH = '/tea/eegs/summary'; diff --git a/src/app/api/fn/models/curve.ts b/src/app/api/fn/models/curve.ts new file mode 100644 index 0000000..78fc2c0 --- /dev/null +++ b/src/app/api/fn/models/curve.ts @@ -0,0 +1,42 @@ +/* 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 { Domain } from '../../models/domain'; + +export interface Curve$Params { + domain: Domain; + name: string; + version: number; + feature?: string; +} + +export function curve(http: HttpClient, rootUrl: string, params: Curve$Params, context?: HttpContext): Observable>> { + const rb = new RequestBuilder(rootUrl, curve.PATH, 'get'); + if (params) { + rb.path('domain', params.domain, {}); + rb.path('name', params.name, {}); + rb.path('version', params.version, {}); + rb.query('feature', params.feature, {}); + } + + 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>; + }) + ); +} + +curve.PATH = '/models/{domain}/{name}/versions/{version}/curve'; diff --git a/src/app/api/fn/models/lineage.ts b/src/app/api/fn/models/lineage.ts new file mode 100644 index 0000000..62d0b29 --- /dev/null +++ b/src/app/api/fn/models/lineage.ts @@ -0,0 +1,40 @@ +/* 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 { Domain } from '../../models/domain'; + +export interface Lineage$Params { + domain: Domain; + name: string; + version: number; +} + +export function lineage(http: HttpClient, rootUrl: string, params: Lineage$Params, context?: HttpContext): Observable> { + const rb = new RequestBuilder(rootUrl, lineage.PATH, 'get'); + if (params) { + rb.path('domain', params.domain, {}); + rb.path('name', params.name, {}); + rb.path('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<{ + [key: string]: any; + }>; + }) + ); +} + +lineage.PATH = '/models/{domain}/{name}/versions/{version}/lineage'; diff --git a/src/app/api/fn/models/retire.ts b/src/app/api/fn/models/retire.ts new file mode 100644 index 0000000..042036e --- /dev/null +++ b/src/app/api/fn/models/retire.ts @@ -0,0 +1,40 @@ +/* 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 { Domain } from '../../models/domain'; + +export interface Retire$Params { + domain: Domain; + name: string; + version: number; +} + +export function retire(http: HttpClient, rootUrl: string, params: Retire$Params, context?: HttpContext): Observable> { + const rb = new RequestBuilder(rootUrl, retire.PATH, 'post'); + if (params) { + rb.path('domain', params.domain, {}); + rb.path('name', params.name, {}); + rb.path('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<{ + [key: string]: string; + }>; + }) + ); +} + +retire.PATH = '/models/{domain}/{name}/versions/{version}/retire'; diff --git a/src/app/api/fn/models/training-inputs.ts b/src/app/api/fn/models/training-inputs.ts new file mode 100644 index 0000000..f4fb379 --- /dev/null +++ b/src/app/api/fn/models/training-inputs.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 { Domain } from '../../models/domain'; + +export interface TrainingInputs$Params { + domain: Domain; + name: string; +} + +export function trainingInputs(http: HttpClient, rootUrl: string, params: TrainingInputs$Params, context?: HttpContext): Observable> { + const rb = new RequestBuilder(rootUrl, trainingInputs.PATH, 'get'); + if (params) { + rb.path('domain', params.domain, {}); + rb.path('name', params.name, {}); + } + + 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; + }>; + }) + ); +} + +trainingInputs.PATH = '/models/{domain}/{name}/inputs'; diff --git a/src/app/api/fn/models/upload-training-inputs.ts b/src/app/api/fn/models/upload-training-inputs.ts new file mode 100644 index 0000000..c483dcc --- /dev/null +++ b/src/app/api/fn/models/upload-training-inputs.ts @@ -0,0 +1,43 @@ +/* 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 { BodyUploadTrainingInputs } from '../../models/body-upload-training-inputs'; +import { Domain } from '../../models/domain'; + +export interface UploadTrainingInputs$Params { + domain: Domain; + name: string; + set: string; + body: BodyUploadTrainingInputs +} + +export function uploadTrainingInputs(http: HttpClient, rootUrl: string, params: UploadTrainingInputs$Params, context?: HttpContext): Observable> { + const rb = new RequestBuilder(rootUrl, uploadTrainingInputs.PATH, 'post'); + if (params) { + rb.path('domain', params.domain, {}); + rb.path('name', params.name, {}); + rb.path('set', params.set, {}); + 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]: any; + }>; + }) + ); +} + +uploadTrainingInputs.PATH = '/models/{domain}/{name}/inputs/{set}/files'; diff --git a/src/app/api/fn/models/version-checks.ts b/src/app/api/fn/models/version-checks.ts new file mode 100644 index 0000000..9464985 --- /dev/null +++ b/src/app/api/fn/models/version-checks.ts @@ -0,0 +1,40 @@ +/* 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 { Domain } from '../../models/domain'; + +export interface VersionChecks$Params { + domain: Domain; + name: string; + version: number; +} + +export function versionChecks(http: HttpClient, rootUrl: string, params: VersionChecks$Params, context?: HttpContext): Observable> { + const rb = new RequestBuilder(rootUrl, versionChecks.PATH, 'get'); + if (params) { + rb.path('domain', params.domain, {}); + rb.path('name', params.name, {}); + rb.path('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<{ + [key: string]: any; + }>; + }) + ); +} + +versionChecks.PATH = '/models/{domain}/{name}/versions/{version}/checks'; diff --git a/src/app/api/fn/preview/preview-status.ts b/src/app/api/fn/preview/preview-status.ts new file mode 100644 index 0000000..eaa8c67 --- /dev/null +++ b/src/app/api/fn/preview/preview-status.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 { PreviewStatus } from '../../models/preview-status'; + +export interface PreviewStatus$Params { + run_id: string; +} + +export function previewStatus(http: HttpClient, rootUrl: string, params: PreviewStatus$Params, context?: HttpContext): Observable> { + const rb = new RequestBuilder(rootUrl, previewStatus.PATH, 'get'); + if (params) { + rb.path('run_id', params.run_id, {}); + } + + 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; + }) + ); +} + +previewStatus.PATH = '/tea/preview/{run_id}'; diff --git a/src/app/api/fn/preview/start-preview.ts b/src/app/api/fn/preview/start-preview.ts new file mode 100644 index 0000000..f57e303 --- /dev/null +++ b/src/app/api/fn/preview/start-preview.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 { BodyStartPreview } from '../../models/body-start-preview'; + +export interface StartPreview$Params { + body: BodyStartPreview +} + +export function startPreview(http: HttpClient, rootUrl: string, params: StartPreview$Params, context?: HttpContext): Observable> { + const rb = new RequestBuilder(rootUrl, startPreview.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; + }>; + }) + ); +} + +startPreview.PATH = '/tea/preview'; diff --git a/src/app/api/functions.ts b/src/app/api/functions.ts index c54b2ff..9fb9646 100644 --- a/src/app/api/functions.ts +++ b/src/app/api/functions.ts @@ -45,10 +45,20 @@ export type { Score$Params as Score$Params } from './fn/models/score'; export { score as score } from './fn/models/score'; export type { Train$Params as Train$Params } from './fn/models/train'; export { train as train } from './fn/models/train'; +export type { TrainingInputs$Params as TrainingInputs$Params } from './fn/models/training-inputs'; +export { trainingInputs as trainingInputs } from './fn/models/training-inputs'; +export type { UploadTrainingInputs$Params as UploadTrainingInputs$Params } from './fn/models/upload-training-inputs'; +export { uploadTrainingInputs as uploadTrainingInputs } from './fn/models/upload-training-inputs'; export type { TrainingConfig$Params as TrainingConfig$Params } from './fn/models/training-config'; export { trainingConfig as trainingConfig } from './fn/models/training-config'; export type { Versions$Params as Versions$Params } from './fn/models/versions'; export { versions as versions } from './fn/models/versions'; +export type { VersionChecks$Params as VersionChecks$Params } from './fn/models/version-checks'; +export { versionChecks as versionChecks } from './fn/models/version-checks'; +export type { Curve$Params as Curve$Params } from './fn/models/curve'; +export { curve as curve } from './fn/models/curve'; +export type { Lineage$Params as Lineage$Params } from './fn/models/lineage'; +export { lineage as lineage } from './fn/models/lineage'; export type { Promote$Params as Promote$Params } from './fn/models/promote'; export { promote as promote } from './fn/models/promote'; export type { AddClinicalValidation$Params as AddClinicalValidation$Params } from './fn/models/add-clinical-validation'; @@ -57,6 +67,8 @@ export type { ReadReport$Json$Params as ReadReport$Json$Params } from './fn/mode export { readReport$Json as readReport$Json } from './fn/models/read-report-json'; export type { ReadReport$Any$Params as ReadReport$Any$Params } from './fn/models/read-report-any'; export { readReport$Any as readReport$Any } from './fn/models/read-report-any'; +export type { Retire$Params as Retire$Params } from './fn/models/retire'; +export { retire as retire } from './fn/models/retire'; export type { Conflicts$Params as Conflicts$Params } from './fn/review/conflicts'; export { conflicts as conflicts } from './fn/review/conflicts'; export type { Correct$Params as Correct$Params } from './fn/review/correct'; @@ -79,8 +91,14 @@ export type { Studies$Params as Studies$Params } from './fn/eeg/studies'; export { studies as studies } from './fn/eeg/studies'; export type { AnalyzeEegs$Params as AnalyzeEegs$Params } from './fn/eeg/analyze-eegs'; export { analyzeEegs as analyzeEegs } from './fn/eeg/analyze-eegs'; +export type { EegSummary$Params as EegSummary$Params } from './fn/eeg/eeg-summary'; +export { eegSummary as eegSummary } from './fn/eeg/eeg-summary'; export type { Study$Params as Study$Params } from './fn/eeg/study'; export { study as study } from './fn/eeg/study'; +export type { StartPreview$Params as StartPreview$Params } from './fn/preview/start-preview'; +export { startPreview as startPreview } from './fn/preview/start-preview'; +export type { PreviewStatus$Params as PreviewStatus$Params } from './fn/preview/preview-status'; +export { previewStatus as previewStatus } from './fn/preview/preview-status'; export type { PostBundle$Params as PostBundle$Params } from './fn/fhir/post-bundle'; export { postBundle as postBundle } from './fn/fhir/post-bundle'; export type { SearchCondition$Params as SearchCondition$Params } from './fn/fhir/search-condition'; diff --git a/src/app/api/models.ts b/src/app/api/models.ts index 6b3c8ac..64f8ce5 100644 --- a/src/app/api/models.ts +++ b/src/app/api/models.ts @@ -6,7 +6,9 @@ export type { Analyze } from './models/analyze'; export type { AnalyzeRequest } from './models/analyze-request'; export type { BodyAddClinicalValidation } from './models/body-add-clinical-validation'; export type { BodyImportModels } from './models/body-import-models'; +export type { BodyStartPreview } from './models/body-start-preview'; export type { BodyUpload } from './models/body-upload'; +export type { BodyUploadTrainingInputs } from './models/body-upload-training-inputs'; export type { Cancel } from './models/cancel'; export type { Condition } from './models/condition'; export type { Correction } from './models/correction'; @@ -25,6 +27,11 @@ export type { Options } from './models/options'; export type { PersonDecision } from './models/person-decision'; export type { Pipeline } from './models/pipeline'; export type { Position } from './models/position'; +export type { PreviewAdos2 } from './models/preview-ados-2'; +export type { PreviewEeg } from './models/preview-eeg'; +export type { PreviewMetric } from './models/preview-metric'; +export type { PreviewResult } from './models/preview-result'; +export type { PreviewStatus } from './models/preview-status'; export type { Progress } from './models/progress'; export type { Read } from './models/read'; export type { Reference } from './models/reference'; @@ -35,6 +42,8 @@ export type { RunRequest } from './models/run-request'; export type { RunSummary } from './models/run-summary'; export type { SavedPipeline } from './models/saved-pipeline'; export type { Scope } from './models/scope'; +export type { Score } from './models/score'; +export type { Site } from './models/site'; export type { Source } from './models/source'; export type { SourceRef } from './models/source-ref'; export type { Step } from './models/step'; diff --git a/src/app/api/models/analysis.ts b/src/app/api/models/analysis.ts index 6f4a06d..eee29c9 100644 --- a/src/app/api/models/analysis.ts +++ b/src/app/api/models/analysis.ts @@ -4,8 +4,14 @@ import { Metric } from '../models/metric'; export interface Analysis { age_months: (number | null); + checks: Array<{ +[key: string]: any; +}>; id: string; level: (string | null); metrics: Array; + regions: Array<{ +[key: string]: any; +}>; valid: (boolean | null); } diff --git a/src/app/api/models/body-start-preview.ts b/src/app/api/models/body-start-preview.ts new file mode 100644 index 0000000..6e3bb38 --- /dev/null +++ b/src/app/api/models/body-start-preview.ts @@ -0,0 +1,9 @@ +/* eslint-disable */ +/* Code generated by ng-openapi-gen DO NOT EDIT. */ + +export interface BodyStartPreview { + ados2?: (Blob | null); + birth_date?: (string | null); + edf: Blob; + pipeline?: string; +} diff --git a/src/app/api/models/body-upload-training-inputs.ts b/src/app/api/models/body-upload-training-inputs.ts new file mode 100644 index 0000000..56fd3a3 --- /dev/null +++ b/src/app/api/models/body-upload-training-inputs.ts @@ -0,0 +1,6 @@ +/* eslint-disable */ +/* Code generated by ng-openapi-gen DO NOT EDIT. */ + +export interface BodyUploadTrainingInputs { + files: Array; +} diff --git a/src/app/api/models/preview-ados-2.ts b/src/app/api/models/preview-ados-2.ts new file mode 100644 index 0000000..90ff71c --- /dev/null +++ b/src/app/api/models/preview-ados-2.ts @@ -0,0 +1,13 @@ +/* eslint-disable */ +/* Code generated by ng-openapi-gen DO NOT EDIT. */ + +export interface PreviewAdos2 { + classification: (string | null); + css: (number | null); + evaluation_date: (string | null); + items: { +[key: string]: (number | null); +}; + module: (string | null); + read: Array; +} diff --git a/src/app/api/models/preview-eeg.ts b/src/app/api/models/preview-eeg.ts new file mode 100644 index 0000000..aad7b72 --- /dev/null +++ b/src/app/api/models/preview-eeg.ts @@ -0,0 +1,21 @@ +/* eslint-disable */ +/* Code generated by ng-openapi-gen DO NOT EDIT. */ + +import { PreviewMetric } from '../models/preview-metric'; +export interface PreviewEeg { + age_months: (number | null); + bad_channels: (number | null); + channels: (number | null); + checks: Array<{ +[key: string]: any; +}>; + clean_fraction: (number | null); + duration_min: (number | null); + error: (string | null); + level: string; + line_noise_db: (number | null); + metrics: Array; + recorded_on: (string | null); + sleep: (boolean | null); + valid: (boolean | null); +} diff --git a/src/app/api/models/preview-metric.ts b/src/app/api/models/preview-metric.ts new file mode 100644 index 0000000..de3a6f3 --- /dev/null +++ b/src/app/api/models/preview-metric.ts @@ -0,0 +1,17 @@ +/* eslint-disable */ +/* Code generated by ng-openapi-gen DO NOT EDIT. */ + +import { Score } from '../models/score'; +import { Site } from '../models/site'; +export interface PreviewMetric { + code: string; + electrodes: { +[key: string]: Site; +}; + model: (string | null); + score: (Score | null); + value: (number | null); + zones: { +[key: string]: Site; +}; +} diff --git a/src/app/api/models/preview-result.ts b/src/app/api/models/preview-result.ts new file mode 100644 index 0000000..7824bca --- /dev/null +++ b/src/app/api/models/preview-result.ts @@ -0,0 +1,10 @@ +/* eslint-disable */ +/* Code generated by ng-openapi-gen DO NOT EDIT. */ + +import { PreviewAdos2 } from '../models/preview-ados-2'; +import { PreviewEeg } from '../models/preview-eeg'; +export interface PreviewResult { + ados2: (PreviewAdos2 | null); + eeg: PreviewEeg; + warnings: Array; +} diff --git a/src/app/api/models/preview-status.ts b/src/app/api/models/preview-status.ts new file mode 100644 index 0000000..fdd9c70 --- /dev/null +++ b/src/app/api/models/preview-status.ts @@ -0,0 +1,8 @@ +/* eslint-disable */ +/* Code generated by ng-openapi-gen DO NOT EDIT. */ + +import { PreviewResult } from '../models/preview-result'; +export interface PreviewStatus { + result: (PreviewResult | null); + state: 'queued' | 'running' | 'succeeded' | 'failed' | 'cancelling' | 'cancelled'; +} diff --git a/src/app/api/models/score.ts b/src/app/api/models/score.ts new file mode 100644 index 0000000..11c015f --- /dev/null +++ b/src/app/api/models/score.ts @@ -0,0 +1,10 @@ +/* eslint-disable */ +/* Code generated by ng-openapi-gen DO NOT EDIT. */ + +export interface Score { + median: (number | null); + outside: (number | null); + p5: (number | null); + p95: (number | null); + z: (number | null); +} diff --git a/src/app/api/models/site.ts b/src/app/api/models/site.ts new file mode 100644 index 0000000..229df97 --- /dev/null +++ b/src/app/api/models/site.ts @@ -0,0 +1,8 @@ +/* eslint-disable */ +/* Code generated by ng-openapi-gen DO NOT EDIT. */ + +import { Score } from '../models/score'; +export interface Site { + score: (Score | null); + value: (number | null); +} diff --git a/src/app/api/models/version.ts b/src/app/api/models/version.ts index e48c1c4..9739907 100644 --- a/src/app/api/models/version.ts +++ b/src/app/api/models/version.ts @@ -11,5 +11,6 @@ export interface Version { [key: string]: string; }; reports: Array; + status: 'champion' | 'retired' | 'candidate'; version: number; }