UNPKG

@experteam-mx/ngx-services

Version:

Angular common services for Experteam apps

39 lines (38 loc) 1.5 kB
import { HttpHeaders, HttpParams } from '@angular/common/http'; import { QueryParams } from '../apis/models/api.models'; /** * Convert an object of key-value pairs into a URL query string. * * @param {Object} params - The key-value pairs to converted into a query string. * * @return {string} - The generated query string. */ export declare const queryString: (params: QueryParams) => string; /** * Creates an instance of HttpParams using the provided params object. * * @param {Object} params - The object containing the params to the HttpParams constructor. * * @returns {HttpParams} - An instance of HttpParams created from the params object. */ export declare const httpParams: (params: QueryParams) => HttpParams; /** * Returns the headers for generating PDF files. * * @param {string} format - The format of the headers, 'object' or 'http_header'. * * @returns {HttpHeaders | { [header: string]: string | string[] }} - The headers for generating PDF files. */ export declare const pdfHeaders: (format?: "object" | "http_header") => HttpHeaders | { [header: string]: string | string[]; }; /** * Returns the headers for generating XML files. * * @param {string} format - The format of the headers, 'object' or 'http_header'. * * @returns {HttpHeaders | { [header: string]: string | string[] }} - The headers for generating XML files. */ export declare const xmlHeaders: (format?: "object" | "http_header") => HttpHeaders | { [header: string]: string | string[]; };