UNPKG

@experteam-mx/ngx-services

Version:

Angular common services for Experteam apps

62 lines (61 loc) 3.2 kB
import { Environment } from '../ngx-services.models'; import { HttpClient } from '@angular/common/http'; import { Observable } from 'rxjs'; import { ValidateFacilityIn, ValidateFacilityOut, ServiceAreasOut, EmailErrorIn, PromotionIn, PromotionOut, ValidateNIPOut, ValidateNIPIn, ValidateIdentificationBROut, ValidateIdentificationBRIn, ServiceAreaIn } from './models/api-services.types'; import * as i0 from "@angular/core"; export declare class ApiServicesService { private environments; private http; constructor(environments: Environment, http: HttpClient); /** * Retrieves the URL for the services API from the environment settings. * If the URL is not defined, an empty string is returned. * * @return {string} The API Services URL or an empty string if not defined. */ get url(): string; /** * Retrieves service areas based on the provided query parameters. * * @param {ServiceAreaIn} body - The query parameters used to filter and retrieve service areas. * @return {Observable<NotificationsOut>} An observable that emits the fetched service areas. */ postServiceAreas(body: ServiceAreaIn): Observable<ServiceAreasOut>; /** * Validate facility values based on the provided parameter. * * @param {ValidateFacilityIn} body - The facility data to be sent in the request body * @return {Observable<ValidateFacilityOut>} An observable emitting the response containing the facility validated output data. */ postValidateFacility(body: ValidateFacilityIn): Observable<ValidateFacilityOut>; /** * Create an email resource. * * @param {EmailErrorIn} body - The email data to be sent in the request body * @return {Observable<{}>} An observable emitting the response data. */ postEmailError(body: EmailErrorIn): Observable<{}>; /** * Sends a promotion request to the server using the provided body. * * @param {PromotionIn} body - The promotion data to be sent in the request body. * @return {Observable<PromotionOut>} An observable emitting the response containing the promotion output data. */ postPromotion(body: PromotionIn): Observable<PromotionOut>; /** * Validate NIP account value based on the provided parameter. * * @param {ValidateNIPIn} body - The NIP account data to be sent in the request body * @return {Observable<ValidateNIPOut>} An observable emitting the response containing the NIP account validated data. */ postValidateNIP(body: ValidateNIPIn): Observable<ValidateNIPOut>; /** * Validate BR Identification value based on the provided parameter. * * @param {ValidateIdentificationBRIn} body - The BR Identification data to be sent in the request body * @return {Observable<ValidateIdentificationBROut>} An observable emitting the response containing the BR Identification validated data. */ postValidateIdentificationBR(body: ValidateIdentificationBRIn): Observable<ValidateIdentificationBROut>; static ɵfac: i0.ɵɵFactoryDeclaration<ApiServicesService, never>; static ɵprov: i0.ɵɵInjectableDeclaration<ApiServicesService>; }