UNPKG

@experteam-mx/ngx-services

Version:

Angular common services for Experteam apps

135 lines (134 loc) 6.78 kB
import { Environment } from '../ngx-services.models'; import { HttpClient } from '@angular/common/http'; import { QueryParams } from './models/api.models'; import { Observable } from 'rxjs'; import { CheckpointEventReasonsOut, CheckpointsOut, IncidentIn, IncidentOut, IncidentReasonComplementIn, IncidentReasonComplementOut, IncidentReasonComplementsOut, IncidentReasonIn, IncidentReasonOut, IncidentReasonsOut, IncidentsOut } from './models/api-inventories.types'; import * as i0 from "@angular/core"; export declare class ApiInventoriesService { private environments; private http; constructor(environments: Environment, http: HttpClient); /** * Retrieves the URL for the Inventories API from the environment configurations. * * @return {string} The URL of the Inventories API. */ get url(): string; /** * Retrieves a list of checkpoints based on query parameters. * * @param {QueryParams} params - Query parameters for filtering the checkpoints. * @returns {Observable<CheckpointsOut>} The list of checkpoints. */ getCheckpoints(params: QueryParams): Observable<CheckpointsOut>; /** * Retrieves a list of checkpoint event reasons based on query parameters. * * @param {QueryParams} params - Query parameters for filtering the checkpoint event reasons. * @returns {Observable<CheckpointEventReasonsOut>} The list of checkpoint event reasons. */ getCheckpointEventReasons(params: QueryParams): Observable<CheckpointEventReasonsOut>; /** * Retrieves a list of incidents based on query parameters. * * @param {QueryParams} params - Query parameters for filtering the incidents. * @returns {Observable<IncidentsOut>} An observable that emits the list of incidents. */ getIncidents(params: QueryParams): Observable<IncidentsOut>; /** * Fetches the incident details based on the provided incident ID. * * @param {number} id - The identifier of the incident record to get detail. * @return {Observable<IncidentOut>} An observable that emits the detail incident data. */ getIncident(id: Number): Observable<IncidentOut>; /** * Creates a new incident. * * @param {IncidentIn} body - The data for the new incident. * @returns {Observable<IncidentOut>} An observable the created incident detail. */ postIncident(body: IncidentIn): Observable<IncidentOut>; /** * Updates an existing incident. * * @param {number} id - The identifier of the incident record to update. * @param {IncidentIn} body - The incident data to be updated. * @returns {Observable<IncidentOut>} An observable detail of the updated incident. */ putIncident(id: Number, body: IncidentIn): Observable<IncidentOut>; /** * Delete an existing incident. * * @param {number} id - The unique identifier of the incident to be deleted. * @returns {Observable<IncidentOut>} An observable that emits the result of the delete incident. */ deleteIncident(id: Number): Observable<IncidentOut>; /** * Retrieves a list of incident reasons based on query parameters. * * @param {QueryParams} params - Query parameters for filtering the incident reasons. * @returns {Observable<IncidentReasonsOut>} An observable that emits the list of incident reasons. */ getIncidentReasons(params: QueryParams): Observable<IncidentReasonsOut>; /** * Fetches the incident reason details based on the provided incident reason ID. * * @param {number} id - The identifier of the incident reason record to get detail. * @return {Observable<IncidentReasonOut>} An observable that emits the detail incident reason data. */ getIncidentReason(id: Number): Observable<IncidentReasonOut>; /** * Creates a new incident reason. * * @param {IncidentReasonIn} body - The data for the new incident reason. * @returns {Observable<IncidentReasonOut>} An observable the created incident reason detail. */ postIncidentReason(body: IncidentReasonIn): Observable<IncidentReasonOut>; /** * Updates an existing incident reason. * * @param {number} id - The identifier of the incident reason record to update. * @param {IncidentIn} body - The incident reason data to be updated. * @returns {Observable<IncidentReasonOut>} An observable detail of the updated incident reason. */ putIncidentReason(id: Number, body: IncidentReasonIn): Observable<IncidentReasonOut>; /** * Delete an existing incident reason. * * @param {number} id - The unique identifier of the incident reason to be deleted. * @returns {Observable<IncidentReasonOut>} An observable that emits the result of the delete incident reason. */ deleteIncidentReason(id: Number): Observable<IncidentReasonOut>; /** * Retrieves a list of incident reason complements based on query parameters. * * @param {QueryParams} params - Query parameters for filtering the incident reason complements. * @returns {Observable<IncidentReasonComplementsOut>} An observable that emits the list of incident reason complements. */ getIncidentReasonComplements(params: QueryParams): Observable<IncidentReasonComplementsOut>; /** * Creates a new incident reason complement. * * @param {IncidentReasonIn} body - The data for the new incident reason complement. * @returns {Observable<IncidentReasonComplementOut>} An observable the created incident reason complement detail. */ postIncidentReasonComplement(body: IncidentReasonComplementIn): Observable<IncidentReasonComplementOut>; /** * Updates an existing incident reason complement. * * @param {number} id - The identifier of the incident reason complement record to update. * @param {IncidentIn} body - The incident reason complement data to be updated. * @returns {Observable<IncidentReasonComplementOut>} An observable detail of the updated incident reason complement. */ putIncidentReasonComplement(id: Number, body: IncidentReasonComplementIn): Observable<IncidentReasonComplementOut>; /** * Delete an existing incident reason complement. * * @param {number} id - The unique identifier of the incident reason complement to be deleted. * @returns {Observable<IncidentReasonComplementOut>} An observable that emits the result of the delete incident reason complement. */ deleteIncidentReasonComplement(id: Number): Observable<IncidentReasonComplementOut>; static ɵfac: i0.ɵɵFactoryDeclaration<ApiInventoriesService, never>; static ɵprov: i0.ɵɵInjectableDeclaration<ApiInventoriesService>; }