From 55c4e0b17385fc29f68637780ee4ac0ca5168984 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roberto=20Trevi=C3=B1o?= Date: Sun, 29 Nov 2026 12:39:07 -0600 Subject: [PATCH] OpenAPI client: model titles, run termination, Patient name and identifier --- openapi.json | 104 +++++++++++++++++++++++++- src/app/api/fn/fhir/search-patient.ts | 12 +++ src/app/api/fn/models/models.ts | 5 +- src/app/api/fn/runs/terminate-run.ts | 35 +++++++++ src/app/api/functions.ts | 2 + src/app/api/models.ts | 1 + src/app/api/models/model.ts | 7 ++ 7 files changed, 163 insertions(+), 3 deletions(-) create mode 100644 src/app/api/fn/runs/terminate-run.ts create mode 100644 src/app/api/models/model.ts diff --git a/openapi.json b/openapi.json index f21f897..4f8abae 100644 --- a/openapi.json +++ b/openapi.json @@ -1173,6 +1173,24 @@ "title": "Metric", "type": "object" }, + "Model": { + "properties": { + "name": { + "title": "Name", + "type": "string" + }, + "title": { + "title": "Title", + "type": "string" + } + }, + "required": [ + "name", + "title" + ], + "title": "Model", + "type": "object" + }, "Option": { "additionalProperties": false, "properties": { @@ -3398,6 +3416,7 @@ }, "/models/{domain}": { "get": { + "description": "The domain's registered models, with their names on screen.", "operationId": "models", "parameters": [ { @@ -3415,7 +3434,7 @@ "application/json": { "schema": { "items": { - "type": "string" + "$ref": "#/components/schemas/Model" }, "title": "Response Models", "type": "array" @@ -4263,6 +4282,53 @@ ] } }, + "/runs/{run_id}/terminate": { + "post": { + "description": "Stop a run (one started by mistake): Dagster cancels it.", + "operationId": "terminate_run", + "parameters": [ + { + "in": "path", + "name": "run_id", + "required": true, + "schema": { + "title": "Run Id", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "additionalProperties": { + "type": "string" + }, + "title": "Response Terminate Run", + "type": "object" + } + } + }, + "description": "Successful Response" + }, + "422": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + }, + "description": "Validation Error" + } + }, + "summary": "Terminate Run", + "tags": [ + "runs" + ] + } + }, "/tea/eegs": { "get": { "operationId": "studies", @@ -5443,6 +5509,42 @@ "title": "Follow-Up-Status" } }, + { + "description": "each word starts a word of her name (case and accents ignored)", + "in": "query", + "name": "name", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "each word starts a word of her name (case and accents ignored)", + "title": "Name" + } + }, + { + "description": "[system|]value: a CURP or record number (case ignored)", + "in": "query", + "name": "identifier", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "[system|]value: a CURP or record number (case ignored)", + "title": "Identifier" + } + }, { "description": "-recent or -risk-", "in": "query", diff --git a/src/app/api/fn/fhir/search-patient.ts b/src/app/api/fn/fhir/search-patient.ts index dd908e2..bf25154 100644 --- a/src/app/api/fn/fhir/search-patient.ts +++ b/src/app/api/fn/fhir/search-patient.ts @@ -24,6 +24,16 @@ export interface SearchPatient$Params { 'follow-up-cutoff'?: (string | null); 'follow-up-status'?: (string | null); +/** + * each word starts a word of her name (case and accents ignored) + */ + name?: (string | null); + +/** + * [system|]value: a CURP or record number (case ignored) + */ + identifier?: (string | null); + /** * -recent or -risk- */ @@ -56,6 +66,8 @@ export function searchPatient(http: HttpClient, rootUrl: string, params: SearchP rb.query('follow-up-window', params['follow-up-window'], {}); rb.query('follow-up-cutoff', params['follow-up-cutoff'], {}); rb.query('follow-up-status', params['follow-up-status'], {}); + rb.query('name', params.name, {}); + rb.query('identifier', params.identifier, {}); rb.query('_sort', params['_sort'], {}); rb.query('risk-horizon', params['risk-horizon'], {}); rb.query('_revinclude', params['_revinclude'], {}); diff --git a/src/app/api/fn/models/models.ts b/src/app/api/fn/models/models.ts index 8489857..f64e379 100644 --- a/src/app/api/fn/models/models.ts +++ b/src/app/api/fn/models/models.ts @@ -8,12 +8,13 @@ import { StrictHttpResponse } from '../../strict-http-response'; import { RequestBuilder } from '../../request-builder'; import { Domain } from '../../models/domain'; +import { Model } from '../../models/model'; export interface Models$Params { domain: Domain; } -export function models(http: HttpClient, rootUrl: string, params: Models$Params, context?: HttpContext): Observable>> { +export function models(http: HttpClient, rootUrl: string, params: Models$Params, context?: HttpContext): Observable>> { const rb = new RequestBuilder(rootUrl, models.PATH, 'get'); if (params) { rb.path('domain', params.domain, {}); @@ -24,7 +25,7 @@ export function models(http: HttpClient, rootUrl: string, params: Models$Params, ).pipe( filter((r: any): r is HttpResponse => r instanceof HttpResponse), map((r: HttpResponse) => { - return r as StrictHttpResponse>; + return r as StrictHttpResponse>; }) ); } diff --git a/src/app/api/fn/runs/terminate-run.ts b/src/app/api/fn/runs/terminate-run.ts new file mode 100644 index 0000000..c4c97b1 --- /dev/null +++ b/src/app/api/fn/runs/terminate-run.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 TerminateRun$Params { + run_id: string; +} + +export function terminateRun(http: HttpClient, rootUrl: string, params: TerminateRun$Params, context?: HttpContext): Observable> { + const rb = new RequestBuilder(rootUrl, terminateRun.PATH, 'post'); + 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<{ + [key: string]: string; + }>; + }) + ); +} + +terminateRun.PATH = '/runs/{run_id}/terminate'; diff --git a/src/app/api/functions.ts b/src/app/api/functions.ts index 2e4b639..422bdb6 100644 --- a/src/app/api/functions.ts +++ b/src/app/api/functions.ts @@ -75,6 +75,8 @@ export type { Unrecognised$Params as Unrecognised$Params } from './fn/review/unr export { unrecognised as unrecognised } from './fn/review/unrecognised'; export type { RunStatus$Params as RunStatus$Params } from './fn/runs/run-status'; export { runStatus as runStatus } from './fn/runs/run-status'; +export type { TerminateRun$Params as TerminateRun$Params } from './fn/runs/terminate-run'; +export { terminateRun as terminateRun } from './fn/runs/terminate-run'; export type { Studies$Params as Studies$Params } from './fn/eeg/studies'; export { studies as studies } from './fn/eeg/studies'; export type { Study$Params as Study$Params } from './fn/eeg/study'; diff --git a/src/app/api/models.ts b/src/app/api/models.ts index 92dcda7..c0d0dac 100644 --- a/src/app/api/models.ts +++ b/src/app/api/models.ts @@ -24,6 +24,7 @@ export type { Listing } from './models/listing'; export type { Login } from './models/login'; export type { Map } from './models/map'; export type { Metric } from './models/metric'; +export type { Model } from './models/model'; export type { Option } from './models/option'; export type { PersonDecision } from './models/person-decision'; export type { Pipeline } from './models/pipeline'; diff --git a/src/app/api/models/model.ts b/src/app/api/models/model.ts new file mode 100644 index 0000000..fdc242a --- /dev/null +++ b/src/app/api/models/model.ts @@ -0,0 +1,7 @@ +/* eslint-disable */ +/* Code generated by ng-openapi-gen DO NOT EDIT. */ + +export interface Model { + name: string; + title: string; +}