C1a: code only, no comments, no Markdown

Remove 125 JavaScript, TypeScript, and stylesheet comments and nine configuration comments. The submodule had zero tracked Markdown files. Remove the Markdown-only EditorConfig section.

Keep the generated client headers and tool directives. Delete other comments in place without regenerating the client or changing OpenAPI data.
This commit is contained in:
2026-12-01 16:55:32 -06:00
parent c2d4747d69
commit 8ca3b053bd
41 changed files with 0 additions and 363 deletions
-5
View File
@@ -1,4 +1,3 @@
# Editor configuration, see https://editorconfig.org
root = true
[*]
@@ -11,7 +10,3 @@ trim_trailing_whitespace = true
[*.ts]
quote_type = single
ij_typescript_use_double_quotes = false
[*.md]
max_line_length = off
trim_trailing_whitespace = false
-9
View File
@@ -1,17 +1,12 @@
# See https://docs.github.com/get-started/getting-started-with-git/ignoring-files for more about ignoring files.
# Compiled output
/dist
/tmp
/out-tsc
/bazel-out
# Node
/node_modules
npm-debug.log
yarn-error.log
# IDEs and editors
.idea/
.project
.classpath
@@ -20,7 +15,6 @@ yarn-error.log
.settings/
*.sublime-workspace
# Visual Studio Code
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
@@ -29,7 +23,6 @@ yarn-error.log
!.vscode/mcp.json
.history/*
# Miscellaneous
/.angular/cache
.sass-cache/
/connect.lock
@@ -39,10 +32,8 @@ testem.log
/typings
__screenshots__/
# System files
.DS_Store
Thumbs.db
# Playwright
/test-results/
/playwright-report/
-4
View File
@@ -1,10 +1,6 @@
// This file was generated by running 'ng generate @angular/material:theme-color'.
// Proceed with caution if making changes to this file.
@use 'sass:map';
@use '@angular/material' as mat;
// Note: Color palettes are generated from primary: #a8c243, tertiary: #5f9ea0
$_palettes: (
primary: (
0: #000000,
-6
View File
@@ -3,9 +3,6 @@
import { Injectable } from '@angular/core';
/**
* Provides the ApiConfiguration configuration object with a given root URL.
*/
export function provideApiConfiguration(rootUrl: string) {
var config = new ApiConfiguration();
config.rootUrl = rootUrl;
@@ -15,9 +12,6 @@ export function provideApiConfiguration(rootUrl: string) {
};
}
/**
* Global configuration
*/
@Injectable({
providedIn: 'root',
})
-16
View File
@@ -11,9 +11,6 @@ import { StrictHttpResponse } from './strict-http-response';
export type ApiFnOptional<P, R> = (http: HttpClient, rootUrl: string, params?: P, context?: HttpContext) => Observable<StrictHttpResponse<R>>;
export type ApiFnRequired<P, R> = (http: HttpClient, rootUrl: string, params: P, context?: HttpContext) => Observable<StrictHttpResponse<R>>;
/**
* Helper service to call API functions directly
*/
@Injectable({ providedIn: 'root' })
export class Api {
constructor(
@@ -24,24 +21,14 @@ export class Api {
private _rootUrl?: string;
/**
* Returns the root url for API operations. If not set directly here,
* will fallback to `ApiConfiguration.rootUrl`.
*/
get rootUrl(): string {
return this._rootUrl || this.config.rootUrl;
}
/**
* Sets the root URL for API operations
*/
set rootUrl(rootUrl: string) {
this._rootUrl = rootUrl;
}
/**
* Executes an API call, returning the response body only
*/
invoke<P, R>(fn: ApiFnRequired<P, R>, params: P, context?: HttpContext): Promise<R>;
invoke<P, R>(fn: ApiFnOptional<P, R>, params?: P, context?: HttpContext): Promise<R>;
async invoke<P, R>(fn: ApiFnRequired<P, R> | ApiFnOptional<P, R>, params: P, context?: HttpContext): Promise<R> {
@@ -49,9 +36,6 @@ export class Api {
return (await resp).body;
}
/**
* Executes an API call, returning the entire response
*/
invoke$Response<P, R>(fn: ApiFnRequired<P, R>, params: P, context?: HttpContext): Promise<StrictHttpResponse<R>>;
invoke$Response<P, R>(fn: ApiFnOptional<P, R>, params?: P, context?: HttpContext): Promise<StrictHttpResponse<R>>;
invoke$Response<P, R>(fn: ApiFnRequired<P, R> | ApiFnOptional<P, R>, params: P, context?: HttpContext): Promise<StrictHttpResponse<R>> {
-9
View File
@@ -12,19 +12,10 @@ import { Domain } from '../../models/domain';
export interface EegSummary$Params {
domain: Domain;
/**
* months: the domain's follow-up list over that window up to the cut-off
*/
'follow-up-window'?: (number | null);
/**
* explicit window start that overrides follow-up-window
*/
'follow-up-start'?: (string | null);
/**
* default: the last day with data
*/
'follow-up-cutoff'?: (string | null);
'follow-up-status'?: (string | null);
}
-3
View File
@@ -12,9 +12,6 @@ import { Domain } from '../../models/domain';
export interface PostBundle$Params {
domain: Domain;
/**
* the sender's pipeline (its fhir nodes read this inbox)
*/
sender: string;
body: {
[key: string]: any;
-3
View File
@@ -12,9 +12,6 @@ import { Domain } from '../../models/domain';
export interface SearchCondition$Params {
domain: Domain;
/**
* Patient/<id>, comma-separated
*/
subject?: (string | null);
'_count'?: (number | null);
'_offset'?: number;
@@ -12,9 +12,6 @@ import { Domain } from '../../models/domain';
export interface SearchDiagnosticReport$Params {
domain: Domain;
/**
* Patient/<id>, comma-separated
*/
subject?: (string | null);
'_count'?: (number | null);
'_offset'?: number;
-3
View File
@@ -12,9 +12,6 @@ import { Domain } from '../../models/domain';
export interface SearchEncounter$Params {
domain: Domain;
/**
* Patient/<id>, comma-separated
*/
subject?: (string | null);
'_count'?: (number | null);
'_offset'?: number;
@@ -12,24 +12,12 @@ import { Domain } from '../../models/domain';
export interface SearchMeasureReport$Params {
domain: Domain;
/**
* the Measure's id or canonical URL
*/
measure: string;
/**
* semesters (2025-S1) or months (2025-03), comma-separated
*/
'reporting-period': string;
/**
* count only what was known by then
*/
'as-of'?: (string | null);
/**
* durations count to this day
*/
'event-cutoff'?: (string | null);
'_count'?: (number | null);
'_offset'?: number;
@@ -12,9 +12,6 @@ import { Domain } from '../../models/domain';
export interface SearchObservation$Params {
domain: Domain;
/**
* Patient/<id>, comma-separated
*/
subject?: (string | null);
'_count'?: (number | null);
'_offset'?: number;
-27
View File
@@ -13,50 +13,23 @@ export interface SearchPatient$Params {
domain: Domain;
'_id'?: (string | null);
/**
* months: the domain's follow-up list over that window up to the cut-off
*/
'follow-up-window'?: (number | null);
/**
* explicit window start that overrides follow-up-window
*/
'follow-up-start'?: (string | null);
/**
* default: the last day with data
*/
'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-<outcome>
*/
'_sort'?: string;
/**
* years
*/
'risk-horizon'?: (number | null);
/**
* any of ('DiagnosticReport:subject', 'RiskAssessment:subject', 'Observation:subject')
*/
'_revinclude'?: Array<string>;
/**
* DiagnosticReport:result
*/
'_include:iterate'?: Array<string>;
'_count'?: (number | null);
'_offset'?: number;
-3
View File
@@ -12,9 +12,6 @@ import { Domain } from '../../models/domain';
export interface SearchProcedure$Params {
domain: Domain;
/**
* Patient/<id>, comma-separated
*/
subject?: (string | null);
'_count'?: (number | null);
'_offset'?: number;
@@ -12,9 +12,6 @@ import { Domain } from '../../models/domain';
export interface SearchRiskAssessment$Params {
domain: Domain;
/**
* Patient/<id>, comma-separated
*/
subject?: (string | null);
'_count'?: (number | null);
'_offset'?: number;
-6
View File
@@ -3,14 +3,8 @@
export interface Condition {
/**
* Por ejemplo «text», el texto leído del documento.
*/
column: string;
op: 'equals' | 'contains' | 'matches' | 'present';
/**
* Lo que se busca; por ejemplo «citología».
*/
value?: string;
}
-4
View File
@@ -2,10 +2,6 @@
/* Code generated by ng-openapi-gen DO NOT EDIT. */
/**
* One field of one record as a reviewer read it in the source document: an identity
* field (a mistyped record number) or a study's (a stage the scan made unreadable).
*/
export interface Correction {
entity?: 'identity' | 'cervical_cytology' | 'cervical_biopsy' | 'mammography' | 'breast_biopsy' | 'breast_treatment' | 'breast_recurrence' | 'clinical_note' | 'death' | 'mchat' | 'ados2' | 'eeg';
field: string;
-3
View File
@@ -3,9 +3,6 @@
import { Domain } from './domain';
/**
* Each possible value of `Domain`
*/
export const DOMAIN: Domain[] = [
'cacu',
'cama',
-18
View File
@@ -3,30 +3,12 @@
import { Position } from '../models/position';
/**
* EDF files (a column of file hashes) to the facts their header holds: patient code, sex,
* birth date, recording date, record code, duration and channel count, as `edf_*` columns.
* An unreadable file keeps its row with `edf_error` set.
*
* Use a filesystem source (`dlt.sources.filesystem:filesystem`) with the uploads folder as
* `bucket_url`, `file_glob: "*.edf"`, and `then: "persistance.readers:read_bytes"`. Read its
* `content` column with this node. Map `edf_patient_code`, `edf_birth_date`, and `edf_sex` to
* identity's `record_number`, `birth_date`, and `sex`, using the site's formats and ConceptMap.
*
* The patient code must match the hospital's record number including its prefix. Feed the
* identity map into the pipeline's link node alongside the hospital identity source. Map
* `edf_study_date` to `study_date` (format `%Y-%m-%d`), `edf_record_code` to `lab_record_id`,
* and `content` to `edf`, then feed that map and the link into a target with entity `eeg`.
*/
export interface Edf {
column: string;
id: string;
inputs?: Array<string>;
kind?: 'edf';
/**
* Cómo se ve en el diagrama.
*/
label?: string;
position?: (Position | null);
}
-3
View File
@@ -2,9 +2,6 @@
/* Code generated by ng-openapi-gen DO NOT EDIT. */
/**
* What a request or a job config carries: None means the deployment's default.
*/
export interface Execution {
mode?: ('sync' | 'local' | 'remote' | null);
scheduler?: (string | null);
-23
View File
@@ -3,50 +3,27 @@
import { Position } from '../models/position';
/**
* 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 the ConceptMap
* and `formats` as in `map`.
*/
export interface Extract {
column: (string | Array<string>);
/**
* Dato → columna, sin leer el texto.
*/
columns?: {
[key: string]: string;
};
concept_map?: (string | null);
/**
* Qué estudio se saca del documento.
*/
entity: 'identity' | 'cervical_cytology' | 'cervical_biopsy' | 'mammography' | 'breast_biopsy' | 'breast_treatment' | 'breast_recurrence' | 'clinical_note' | 'death' | 'mchat' | 'ados2' | 'eeg';
formats?: {
[key: string]: string;
};
/**
* Para el modelo de lenguaje.
*/
hints?: string;
id: string;
inputs?: Array<string>;
kind?: 'extract';
/**
* Cómo se ve en el diagrama.
*/
label?: string;
method?: 'auto' | 'llm' | 'patterns';
/**
* Dato → expresión con un grupo ( ).
*/
patterns?: {
[key: string]: string;
};
-8
View File
@@ -3,11 +3,6 @@
import { Position } from '../models/position';
/**
* FHIR R4 Bundles a standard hospital sent (a column of their JSON) as rows of one
* entity: identity, death or a study (core.fhir_in). The sender's own codes go through
* its ConceptMap.
*/
export interface Fhir {
column?: string;
concept_map?: (string | null);
@@ -16,9 +11,6 @@ export interface Fhir {
inputs?: Array<string>;
kind?: 'fhir';
/**
* Cómo se ve en el diagrama.
*/
label?: string;
position?: (Position | null);
}
@@ -3,9 +3,6 @@
export interface FolderTrainingSource {
/**
* Carpeta dentro de TEA_REFERENCE_ROOT
*/
folder: string;
kind: 'folder';
line_hz?: 50 | 60;
-4
View File
@@ -2,10 +2,6 @@
/* Code generated by ng-openapi-gen DO NOT EDIT. */
/**
* How the Conectar dialog drew a source: its type (core.sources) and the answers given.
* The node's dlt fields are made from them; drawn by hand ("Avanzado"), a node has none.
*/
export interface Guided {
answers?: {
[key: string]: any;
-9
View File
@@ -3,23 +3,14 @@
import { Position } from '../models/position';
/**
* Two inputs side by side where their columns match.
*/
export interface Join {
how?: 'inner' | 'left';
id: string;
inputs?: Array<string>;
kind?: 'join';
/**
* Cómo se ve en el diagrama.
*/
label?: string;
/**
* Columna de la primera entrada = columna de la segunda.
*/
on: Array<[string, string]>;
position?: (Position | null);
}
-17
View File
@@ -3,33 +3,16 @@
import { Position } from '../models/position';
/**
* 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<string>;
id: string;
inputs?: Array<string>;
kind?: 'link';
/**
* Cómo se ve en el diagrama.
*/
label?: string;
position?: (Position | null);
/**
* Parecidos por encima de esto los ve un revisor.
*/
review?: number;
/**
* Vacío: las de siempre (mismo identificador, o misma fecha de nacimiento y nombre).
*/
rules?: Array<string>;
}
-4
View File
@@ -2,10 +2,6 @@
/* Code generated by ng-openapi-gen DO NOT EDIT. */
/**
* What "Probar conexión" shows: a database's tables (the resources of `source`, built
* from `args`), or the first rows the type's own node reads (files, records).
*/
export interface Listing {
args?: {
[key: string]: any;
-19
View File
@@ -3,27 +3,14 @@
import { Position } from '../models/position';
/**
* Columns to platform fields, the site's codes translated by its ConceptMap
* (core.concept_map), and its date formats.
*/
export interface Map {
/**
* La tabla de códigos del sitio.
*/
concept_map?: (string | null);
/**
* Dato de la plataforma → columna del sitio.
*/
fields: {
[key: string]: string;
};
/**
* Por ejemplo %d/%m/%Y.
*/
formats?: {
[key: string]: string;
};
@@ -31,15 +18,9 @@ export interface Map {
inputs?: Array<string>;
kind?: 'map';
/**
* Cómo se ve en el diagrama.
*/
label?: string;
position?: (Position | null);
/**
* Un dato igual para todas las filas.
*/
values?: {
[key: string]: string;
};
-3
View File
@@ -4,9 +4,6 @@
import { Tasks } from '../models/tasks';
import { Worker } from '../models/worker';
/**
* The run tag's JSON; the API returns it as it is.
*/
export interface Progress {
done: number;
elapsed_s: number;
-3
View File
@@ -2,9 +2,6 @@
/* Code generated by ng-openapi-gen DO NOT EDIT. */
/**
* A sign-in button's OAuth 2.0 provider (authorization code flow).
*/
export interface Provider {
authorize_params?: {
[key: string]: string;
-9
View File
@@ -3,22 +3,13 @@
import { Position } from '../models/position';
/**
* Files in a column (PDF, Word, Excel, scans...) to text (MarkItDown, OCRmyPDF).
*/
export interface Read {
/**
* Donde la entrada trae cada documento.
*/
column: string;
id: string;
inputs?: Array<string>;
kind?: 'read';
/**
* Cómo se ve en el diagrama.
*/
label?: string;
position?: (Position | null);
}
-11
View File
@@ -4,24 +4,13 @@
import { Condition } from '../models/condition';
import { Position } from '../models/position';
/**
* 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 {
id: string;
inputs?: Array<string>;
kind?: 'route';
/**
* Cómo se ve en el diagrama.
*/
label?: string;
/**
* Recoge lo que nadie reconoce, para revisarlo.
*/
otherwise?: boolean;
position?: (Position | null);
when?: Array<Condition>;
-4
View File
@@ -2,10 +2,6 @@
/* Code generated by ng-openapi-gen DO NOT EDIT. */
/**
* Which EEGs an analysis takes: the pending ones, the first `n` of them, or the named
* ones (re-analysis), each named by the `id` that `/tea/eegs` shows.
*/
export interface Scope {
ids?: Array<string>;
mode?: 'pending' | 'first_n' | 'ids';
-22
View File
@@ -4,15 +4,8 @@
import { Guided } from '../models/guided';
import { Position } from '../models/position';
/**
* 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 {
/**
* Los de la fuente dlt.
*/
args?: {
[key: string]: any;
};
@@ -21,29 +14,14 @@ export interface Source {
inputs?: Array<string>;
kind?: 'source';
/**
* Cómo se ve en el diagrama.
*/
label?: string;
position?: (Position | null);
/**
* Columnas que identifican una fila.
*/
primary_key?: Array<string>;
/**
* Cuál, si la fuente ofrece varios (una tabla).
*/
resource?: (string | null);
/**
* Módulo:función de la fuente dlt.
*/
source: string;
/**
* Transformador dlt para los archivos.
*/
then?: (string | null);
}
-10
View File
@@ -3,23 +3,13 @@
import { Position } from '../models/position';
/**
* 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 {
/**
* En qué estudio de la plataforma se guarda.
*/
entity: 'identity' | 'cervical_cytology' | 'cervical_biopsy' | 'mammography' | 'breast_biopsy' | 'breast_treatment' | 'breast_recurrence' | 'clinical_note' | 'death' | 'mchat' | 'ados2' | 'eeg';
id: string;
inputs?: Array<string>;
kind?: 'target';
/**
* Cómo se ve en el diagrama.
*/
label?: string;
position?: (Position | null);
}
-3
View File
@@ -5,9 +5,6 @@ import { Execution } from '../models/execution';
import { TrainingSource } from '../models/training-source';
export interface Training {
/**
* Fecha de corte de los datos (por omisión, hoy)
*/
as_of?: (string | null);
execution?: (Execution | null);
models?: Array<string>;
-59
View File
@@ -3,10 +3,6 @@
import { HttpRequest, HttpParameterCodec, HttpParams, HttpHeaders, HttpContext } from '@angular/common/http';
/**
* Custom parameter codec to correctly handle the plus sign in parameter
* values. See https://github.com/angular/angular/issues/18261
*/
class ParameterCodec implements HttpParameterCodec {
encodeKey(key: string): string {
return encodeURIComponent(key);
@@ -26,17 +22,11 @@ class ParameterCodec implements HttpParameterCodec {
}
const ParameterCodecInstance = new ParameterCodec();
/**
* Defines the options for appending a parameter
*/
interface ParameterOptions {
style?: string;
explode?: boolean;
}
/**
* Base class for a parameter
*/
abstract class Parameter {
constructor(public name: string, public value: any, public options: ParameterOptions, defaultStyle: string, defaultExplode: boolean) {
this.options = options || {};
@@ -74,9 +64,6 @@ abstract class Parameter {
}
}
/**
* A parameter in the operation path
*/
class PathParameter extends Parameter {
constructor(name: string, value: any, options: ParameterOptions) {
super(name, value, options, 'simple', false);
@@ -91,24 +78,20 @@ class PathParameter extends Parameter {
let separator = this.options.explode ? prefix === '' ? ',' : prefix : ',';
let alreadySerialized = false;
if (this.options.style === 'matrix') {
// The parameter name is just used as prefix, except in some cases...
prefix = `;${this.name}=`;
if (this.options.explode && typeof value === 'object') {
prefix = ';';
if (value instanceof Array) {
// For arrays we have to repeat the name for each element
value = value.map(v => `${this.name}=${this.serializeValue(v, ';')}`);
value = value.join(';');
alreadySerialized = true;
} else {
// For objects we have to put each the key / value pairs
value = this.serializeValue(value, ';');
alreadySerialized = true
}
}
}
value = prefix + (alreadySerialized ? value : this.serializeValue(value, separator));
// Replace both the plain variable and the corresponding variant taking in the prefix and explode into account
path = path.replace(`{${this.name}}`, value);
path = path.replace(`{${prefix}${this.name}${this.options.explode ? '*' : ''}}`, value);
return path;
@@ -124,9 +107,6 @@ class PathParameter extends Parameter {
}
}
/**
* A parameter in the query
*/
class QueryParameter extends Parameter {
constructor(name: string, value: any, options: ParameterOptions) {
super(name, value, options, 'form', true);
@@ -134,7 +114,6 @@ class QueryParameter extends Parameter {
append(params: HttpParams): HttpParams {
if (this.value instanceof Array) {
// Array serialization
if (this.options.explode) {
for (const v of this.value) {
params = params.append(this.name, this.serializeValue(v));
@@ -146,9 +125,7 @@ class QueryParameter extends Parameter {
return params.append(this.name, this.serializeValue(this.value, separator));
}
} else if (this.value !== null && typeof this.value === 'object') {
// Object serialization
if (this.options.style === 'deepObject') {
// Append a parameter for each key, in the form `name[key]`
for (const key of Object.keys(this.value)) {
const propVal = this.value[key];
if (propVal !== null && propVal !== undefined) {
@@ -156,7 +133,6 @@ class QueryParameter extends Parameter {
}
}
} else if (this.options.explode) {
// Append a parameter for each key without using the parameter name
for (const key of Object.keys(this.value)) {
const propVal = this.value[key];
if (propVal !== null && propVal !== undefined) {
@@ -164,7 +140,6 @@ class QueryParameter extends Parameter {
}
}
} else {
// Append a single parameter whose values are a comma-separated list of key,value,key,value...
const array: any[] = [];
for (const key of Object.keys(this.value)) {
const propVal = this.value[key];
@@ -176,16 +151,12 @@ class QueryParameter extends Parameter {
params = params.append(this.name, this.serializeValue(array));
}
} else if (this.value !== null && this.value !== undefined) {
// Plain value
params = params.append(this.name, this.serializeValue(this.value));
}
return params;
}
}
/**
* A parameter in the HTTP request header
*/
class HeaderParameter extends Parameter {
constructor(name: string, value: any, options: ParameterOptions) {
super(name, value, options, 'simple', false);
@@ -205,9 +176,6 @@ class HeaderParameter extends Parameter {
}
}
/**
* Helper to build http requests from parameters
*/
export class RequestBuilder {
private _path = new Map<string, PathParameter>();
@@ -222,30 +190,18 @@ export class RequestBuilder {
public method: string) {
}
/**
* Sets a path parameter
*/
path(name: string, value: any, options?: ParameterOptions): void {
this._path.set(name, new PathParameter(name, value, options || {}));
}
/**
* Sets a query parameter
*/
query(name: string, value: any, options?: ParameterOptions): void {
this._query.set(name, new QueryParameter(name, value, options || {}));
}
/**
* Sets a header parameter
*/
header(name: string, value: any, options?: ParameterOptions): void {
this._header.set(name, new HeaderParameter(name, value, options || {}));
}
/**
* Sets the body content, along with the content type
*/
body(value: any, contentType = 'application/json'): void {
if (value instanceof Blob) {
this._bodyContentType = value.type;
@@ -253,7 +209,6 @@ export class RequestBuilder {
this._bodyContentType = contentType;
}
if (this._bodyContentType === 'application/x-www-form-urlencoded' && value !== null && typeof value === 'object') {
// Handle URL-encoded data
const pairs: Array<[string, string]> = [];
for (const key of Object.keys(value)) {
let val = value[key];
@@ -269,7 +224,6 @@ export class RequestBuilder {
}
this._bodyContent = pairs.map(p => `${encodeURIComponent(p[0])}=${encodeURIComponent(p[1])}`).join('&');
} else if (this._bodyContentType === 'multipart/form-data') {
// Handle multipart form data
const formData = new FormData();
if (value !== null && value !== undefined) {
for (const key of Object.keys(value)) {
@@ -291,7 +245,6 @@ export class RequestBuilder {
}
this._bodyContent = formData;
} else {
// The body is the plain content
this._bodyContent = value;
}
}
@@ -309,33 +262,24 @@ export class RequestBuilder {
return String(value);
}
/**
* Builds the request with the current set parameters
*/
build<T = any>(options?: {
/** Which content types to accept */
accept?: string;
/** The expected response type */
responseType?: 'json' | 'text' | 'blob' | 'arraybuffer';
/** Whether to report progress on uploads / downloads */
reportProgress?: boolean;
/** Allow passing HttpContext for HttpClient */
context?: HttpContext;
}): HttpRequest<T> {
options = options || {};
// Path parameters
let path = this.operationPath;
for (const pathParam of this._path.values()) {
path = pathParam.append(path);
}
const url = this.rootUrl + path;
// Query parameters
let httpParams = new HttpParams({
encoder: ParameterCodecInstance
});
@@ -343,7 +287,6 @@ export class RequestBuilder {
httpParams = queryParam.append(httpParams);
}
// Header parameters
let httpHeaders = new HttpHeaders();
if (options.accept) {
httpHeaders = httpHeaders.append('Accept', options.accept);
@@ -352,12 +295,10 @@ export class RequestBuilder {
httpHeaders = headerParam.append(httpHeaders);
}
// Request content headers
if (this._bodyContentType && !(this._bodyContent instanceof FormData)) {
httpHeaders = httpHeaders.set('Content-Type', this._bodyContentType);
}
// Perform the request
return new HttpRequest<T>(this.method.toUpperCase(), url, this._bodyContent, {
params: httpParams,
headers: httpHeaders,
-3
View File
@@ -3,9 +3,6 @@
import { HttpResponse } from '@angular/common/http';
/**
* Constrains the http response to not have the body defined as `T | null`, but `T` only.
*/
export type StrictHttpResponse<T> = HttpResponse<T> & {
readonly body: T;
}
-2
View File
@@ -1,5 +1,3 @@
/* To learn more about Typescript configuration file: https://www.typescriptlang.org/docs/handbook/tsconfig-json.html. */
/* To learn more about Angular compiler options: https://angular.dev/reference/configs/angular-compiler-options. */
{
"extends": "./tsconfig.json",
"compilerOptions": {
-2
View File
@@ -1,5 +1,3 @@
/* To learn more about Typescript configuration file: https://www.typescriptlang.org/docs/handbook/tsconfig-json.html. */
/* To learn more about Angular compiler options: https://angular.dev/reference/configs/angular-compiler-options. */
{
"compileOnSave": false,
"compilerOptions": {
-2
View File
@@ -1,5 +1,3 @@
/* To learn more about Typescript configuration file: https://www.typescriptlang.org/docs/handbook/tsconfig-json.html. */
/* To learn more about Angular compiler options: https://angular.dev/reference/configs/angular-compiler-options. */
{
"extends": "./tsconfig.json",
"compilerOptions": {