Client for otherwise routes and unrecognised documents
This commit is contained in:
+58
-3
@@ -878,7 +878,7 @@
|
|||||||
},
|
},
|
||||||
"Route": {
|
"Route": {
|
||||||
"additionalProperties": false,
|
"additionalProperties": false,
|
||||||
"description": "Only the rows where every condition holds (e.g. reports titled \"Citolog\u00eda\").",
|
"description": "Only the rows where every condition holds (e.g. reports titled \"Citolog\u00eda\"). An\n`otherwise` route takes the rows of its input that none of the other routes on that\ninput take (documents nobody recognises, for a reviewer), then its own conditions.",
|
||||||
"properties": {
|
"properties": {
|
||||||
"id": {
|
"id": {
|
||||||
"maxLength": 40,
|
"maxLength": 40,
|
||||||
@@ -907,6 +907,11 @@
|
|||||||
"title": "Label",
|
"title": "Label",
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
|
"otherwise": {
|
||||||
|
"default": false,
|
||||||
|
"title": "Otherwise",
|
||||||
|
"type": "boolean"
|
||||||
|
},
|
||||||
"position": {
|
"position": {
|
||||||
"anyOf": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
@@ -918,6 +923,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"when": {
|
"when": {
|
||||||
|
"default": [],
|
||||||
"items": {
|
"items": {
|
||||||
"$ref": "#/components/schemas/Condition"
|
"$ref": "#/components/schemas/Condition"
|
||||||
},
|
},
|
||||||
@@ -926,8 +932,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"required": [
|
"required": [
|
||||||
"id",
|
"id"
|
||||||
"when"
|
|
||||||
],
|
],
|
||||||
"title": "Route",
|
"title": "Route",
|
||||||
"type": "object"
|
"type": "object"
|
||||||
@@ -2730,6 +2735,56 @@
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"/review/unrecognised": {
|
||||||
|
"get": {
|
||||||
|
"description": "Documents a pipeline's routes don't recognise (what its `otherwise` routes took):\na new layout, a study the platform doesn't know, a scan nothing could read.",
|
||||||
|
"operationId": "unrecognised",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"in": "query",
|
||||||
|
"name": "pipeline",
|
||||||
|
"required": true,
|
||||||
|
"schema": {
|
||||||
|
"maxLength": 40,
|
||||||
|
"pattern": "^[a-z][a-z0-9_]*$",
|
||||||
|
"title": "Pipeline",
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"items": {
|
||||||
|
"additionalProperties": true,
|
||||||
|
"type": "object"
|
||||||
|
},
|
||||||
|
"title": "Response Unrecognised",
|
||||||
|
"type": "array"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"description": "Successful Response"
|
||||||
|
},
|
||||||
|
"422": {
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/HTTPValidationError"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"description": "Validation Error"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"summary": "Unrecognised",
|
||||||
|
"tags": [
|
||||||
|
"review"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
"/runs/{run_id}": {
|
"/runs/{run_id}": {
|
||||||
"get": {
|
"get": {
|
||||||
"operationId": "run_status",
|
"operationId": "run_status",
|
||||||
|
|||||||
@@ -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 Unrecognised$Params {
|
||||||
|
pipeline: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export function unrecognised(http: HttpClient, rootUrl: string, params: Unrecognised$Params, context?: HttpContext): Observable<StrictHttpResponse<Array<{
|
||||||
|
[key: string]: any;
|
||||||
|
}>>> {
|
||||||
|
const rb = new RequestBuilder(rootUrl, unrecognised.PATH, 'get');
|
||||||
|
if (params) {
|
||||||
|
rb.query('pipeline', params.pipeline, {});
|
||||||
|
}
|
||||||
|
|
||||||
|
return http.request(
|
||||||
|
rb.build({ responseType: 'json', accept: 'application/json', context })
|
||||||
|
).pipe(
|
||||||
|
filter((r: any): r is HttpResponse<any> => r instanceof HttpResponse),
|
||||||
|
map((r: HttpResponse<any>) => {
|
||||||
|
return r as StrictHttpResponse<Array<{
|
||||||
|
[key: string]: any;
|
||||||
|
}>>;
|
||||||
|
})
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
unrecognised.PATH = '/review/unrecognised';
|
||||||
@@ -59,6 +59,8 @@ export type { DecidePersons$Params as DecidePersons$Params } from './fn/review/d
|
|||||||
export { decidePersons as decidePersons } from './fn/review/decide-persons';
|
export { decidePersons as decidePersons } from './fn/review/decide-persons';
|
||||||
export type { Reject$Params as Reject$Params } from './fn/review/reject';
|
export type { Reject$Params as Reject$Params } from './fn/review/reject';
|
||||||
export { reject as reject } from './fn/review/reject';
|
export { reject as reject } from './fn/review/reject';
|
||||||
|
export type { Unrecognised$Params as Unrecognised$Params } from './fn/review/unrecognised';
|
||||||
|
export { unrecognised as unrecognised } from './fn/review/unrecognised';
|
||||||
export type { RunStatus$Params as RunStatus$Params } from './fn/runs/run-status';
|
export type { RunStatus$Params as RunStatus$Params } from './fn/runs/run-status';
|
||||||
export { runStatus as runStatus } from './fn/runs/run-status';
|
export { runStatus as runStatus } from './fn/runs/run-status';
|
||||||
export type { Studies$Params as Studies$Params } from './fn/eeg/studies';
|
export type { Studies$Params as Studies$Params } from './fn/eeg/studies';
|
||||||
|
|||||||
@@ -5,13 +5,16 @@ import { Condition } from '../models/condition';
|
|||||||
import { Position } from '../models/position';
|
import { Position } from '../models/position';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Only the rows where every condition holds (e.g. reports titled "Citología").
|
* Only the rows where every condition holds (e.g. reports titled "Citología"). An
|
||||||
|
* `otherwise` route takes the rows of its input that none of the other routes on that
|
||||||
|
* input take (documents nobody recognises, for a reviewer), then its own conditions.
|
||||||
*/
|
*/
|
||||||
export interface Route {
|
export interface Route {
|
||||||
id: string;
|
id: string;
|
||||||
inputs?: Array<string>;
|
inputs?: Array<string>;
|
||||||
kind?: 'route';
|
kind?: 'route';
|
||||||
label?: string;
|
label?: string;
|
||||||
|
otherwise?: boolean;
|
||||||
position?: (Position | null);
|
position?: (Position | null);
|
||||||
when: Array<Condition>;
|
when?: Array<Condition>;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user