Regenerate the API client for person review and corrections

This commit is contained in:
Roberto Treviño
2026-11-24 22:35:13 -06:00
parent 0ee30d67f7
commit 4f858fc686
8 changed files with 264 additions and 18 deletions
+157 -9
View File
@@ -44,6 +44,38 @@
"title": "Condition",
"type": "object"
},
"Correction": {
"properties": {
"field": {
"enum": [
"record_number",
"full_name",
"curp",
"nss",
"birth_date",
"sex",
"postal_code"
],
"title": "Field",
"type": "string"
},
"record": {
"title": "Record",
"type": "string"
},
"value": {
"title": "Value",
"type": "string"
}
},
"required": [
"record",
"field",
"value"
],
"title": "Correction",
"type": "object"
},
"Domain": {
"enum": [
"cacu",
@@ -363,6 +395,29 @@
"title": "Map",
"type": "object"
},
"PersonDecision": {
"properties": {
"candidate": {
"title": "Candidate",
"type": "string"
},
"person": {
"title": "Person",
"type": "string"
},
"same": {
"title": "Same",
"type": "boolean"
}
},
"required": [
"person",
"candidate",
"same"
],
"title": "PersonDecision",
"type": "object"
},
"Pipeline": {
"properties": {
"nodes": {
@@ -1327,6 +1382,52 @@
]
}
},
"/review/corrections": {
"post": {
"description": "A corrected identity field of one record (e.g. a mistyped record number); linking\nuses it on the next run. Fixing the source too is still worth it.",
"operationId": "correct",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Correction"
}
}
},
"required": true
},
"responses": {
"201": {
"content": {
"application/json": {
"schema": {
"additionalProperties": {
"type": "string"
},
"title": "Response Correct",
"type": "object"
}
}
},
"description": "Successful Response"
},
"422": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
},
"description": "Validation Error"
}
},
"summary": "Correct",
"tags": [
"review"
]
}
},
"/review/held": {
"get": {
"description": "Rows a rule held, with the reasons and the values as they came.",
@@ -1384,10 +1485,10 @@
]
}
},
"/review/links": {
"/review/persons": {
"get": {
"description": "Records that may be the same person but were left apart.",
"operationId": "links",
"description": "Persons to settle (with their possible owners) and torn persons (with their\nrecords) left by a pipeline's link node.",
"operationId": "persons",
"parameters": [
{
"in": "query",
@@ -1417,12 +1518,15 @@
"content": {
"application/json": {
"schema": {
"items": {
"additionalProperties": true,
"type": "object"
"additionalProperties": {
"items": {
"additionalProperties": true,
"type": "object"
},
"type": "array"
},
"title": "Response Links",
"type": "array"
"title": "Response Persons",
"type": "object"
}
}
},
@@ -1439,7 +1543,51 @@
"description": "Validation Error"
}
},
"summary": "Links",
"summary": "Persons",
"tags": [
"review"
]
},
"post": {
"description": "Whether a person and a possible owner are one patient; applied on the next run.",
"operationId": "decide_persons",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PersonDecision"
}
}
},
"required": true
},
"responses": {
"201": {
"content": {
"application/json": {
"schema": {
"additionalProperties": {
"type": "string"
},
"title": "Response Decide Persons",
"type": "object"
}
}
},
"description": "Successful Response"
},
"422": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
},
"description": "Validation Error"
}
},
"summary": "Decide Persons",
"tags": [
"review"
]
+36
View File
@@ -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 { Correction } from '../../models/correction';
export interface Correct$Params {
body: Correction
}
export function correct(http: HttpClient, rootUrl: string, params: Correct$Params, context?: HttpContext): Observable<StrictHttpResponse<{
[key: string]: string;
}>> {
const rb = new RequestBuilder(rootUrl, correct.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<any> => r instanceof HttpResponse),
map((r: HttpResponse<any>) => {
return r as StrictHttpResponse<{
[key: string]: string;
}>;
})
);
}
correct.PATH = '/review/corrections';
+36
View File
@@ -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 { PersonDecision } from '../../models/person-decision';
export interface DecidePersons$Params {
body: PersonDecision
}
export function decidePersons(http: HttpClient, rootUrl: string, params: DecidePersons$Params, context?: HttpContext): Observable<StrictHttpResponse<{
[key: string]: string;
}>> {
const rb = new RequestBuilder(rootUrl, decidePersons.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<any> => r instanceof HttpResponse),
map((r: HttpResponse<any>) => {
return r as StrictHttpResponse<{
[key: string]: string;
}>;
})
);
}
decidePersons.PATH = '/review/persons';
@@ -8,15 +8,17 @@ import { StrictHttpResponse } from '../../strict-http-response';
import { RequestBuilder } from '../../request-builder';
export interface Links$Params {
export interface Persons$Params {
pipeline: string;
node: string;
}
export function links(http: HttpClient, rootUrl: string, params: Links$Params, context?: HttpContext): Observable<StrictHttpResponse<Array<{
export function persons(http: HttpClient, rootUrl: string, params: Persons$Params, context?: HttpContext): Observable<StrictHttpResponse<{
[key: string]: Array<{
[key: string]: any;
}>>> {
const rb = new RequestBuilder(rootUrl, links.PATH, 'get');
}>;
}>> {
const rb = new RequestBuilder(rootUrl, persons.PATH, 'get');
if (params) {
rb.query('pipeline', params.pipeline, {});
rb.query('node', params.node, {});
@@ -27,11 +29,13 @@ export function links(http: HttpClient, rootUrl: string, params: Links$Params, c
).pipe(
filter((r: any): r is HttpResponse<any> => r instanceof HttpResponse),
map((r: HttpResponse<any>) => {
return r as StrictHttpResponse<Array<{
return r as StrictHttpResponse<{
[key: string]: Array<{
[key: string]: any;
}>>;
}>;
}>;
})
);
}
links.PATH = '/review/links';
persons.PATH = '/review/persons';
+6 -2
View File
@@ -25,10 +25,14 @@ 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 { Correct$Params as Correct$Params } from './fn/review/correct';
export { correct as correct } from './fn/review/correct';
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 { Persons$Params as Persons$Params } from './fn/review/persons';
export { persons as persons } from './fn/review/persons';
export type { DecidePersons$Params as DecidePersons$Params } 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 { reject as reject } from './fn/review/reject';
export type { RunStatus$Params as RunStatus$Params } from './fn/runs/run-status';
+2
View File
@@ -3,12 +3,14 @@
export type { BodyUpload } from './models/body-upload';
export type { Condition } from './models/condition';
export type { Correction } from './models/correction';
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 { PersonDecision } from './models/person-decision';
export type { Pipeline } from './models/pipeline';
export type { Read } from './models/read';
export type { Rejection } from './models/rejection';
+8
View File
@@ -0,0 +1,8 @@
/* eslint-disable */
/* Code generated by ng-openapi-gen DO NOT EDIT. */
export interface Correction {
field: 'record_number' | 'full_name' | 'curp' | 'nss' | 'birth_date' | 'sex' | 'postal_code';
record: string;
value: string;
}
+8
View File
@@ -0,0 +1,8 @@
/* eslint-disable */
/* Code generated by ng-openapi-gen DO NOT EDIT. */
export interface PersonDecision {
candidate: string;
person: string;
same: boolean;
}