@experteam-mx/ngx-services
Version:
Angular common services for Experteam apps
231 lines (230 loc) • 12.7 kB
TypeScript
import { Environment } from '../ngx-services.models';
import { HttpClient } from '@angular/common/http';
import { AccountEntitiesActivesOut, BoardingProcessIdIn, BoardingProcessIn, CompanyCountriesOut, CompanyCountryOut, CompanyCountryTaxesOut, CountryReferenceCurrenciesOut, CountryReferenceOut, CountryReferencesOut, EmployeeCustomersIn, EmployeeCustomersOut, EmployeeOut, EmployeesCustomersOut, EmployeesOut, ExchangesOut, InstallationOut, InstallationsOut, LocationEmployeesOut, LocationOut, LocationsOut, ParametersIn, ParametersValuesOut, ParameterValueIn, ParameterValueOut, SupplyEntitiesActivesOut, WorkflowsOut } from './models/api-companies.types';
import { QueryParams } from './models/api.models';
import { Observable } from 'rxjs';
import { CountryCurrencyRate, EmployeeCustomerDhl } from './models/api-companies.interfaces';
import * as i0 from "@angular/core";
export declare class ApiCompaniesService {
private environments;
private http;
constructor(environments: Environment, http: HttpClient);
/**
* Retrieves the URL for the companies API from the environment configurations.
*
* @return {string} The URL of the companies API.
*/
get url(): string;
/**
* Fetches the installations based on the provided query parameters.
*
* @param {QueryParams} params - The parameters used to filter the installations query.
* @return {Observable<InstallationsOut>} An observable that emits the installation's data.
*/
getInstallations(params: QueryParams): Observable<InstallationsOut>;
/**
* Retrieves the installation details based on the given installation ID.
*
* @param {number} id - The unique identifier of the installation to retrieve.
* @returns {Observable<InstallationOut>} An observable of the installation details.
*/
getInstallation(id: number): Observable<InstallationOut>;
/**
* Retrieves a list of locations based on the provided query parameters.
*
* @param {QueryParams} params - The parameters to use for querying locations.
* @return {Observable<LocationsOut>} An observable that emits the location's data.
*/
getLocations(params: QueryParams): Observable<LocationsOut>;
/**
* Fetches the location details for a given location ID.
*
* @param {number} id - The unique identifier of the location.
* @return {Observable<LocationOut>} An Observable containing the location details.
*/
getLocation(id: number): Observable<LocationOut>;
/**
* Retrieves a list of active supply entities.
*
* @param {QueryParams} params - The query parameters to filter supply entities.
* @return {Observable<SupplyEntitiesActivesOut>} Observable emitting supply entities data.
*/
getSupplyEntitiesActives(params: QueryParams): Observable<SupplyEntitiesActivesOut>;
/**
* Fetches a list of employees based on the specified query parameters.
*
* @param {QueryParams} params - The parameters to filter and sort the employees.
* @return {Observable<EmployeesOut>} An observable that emits the list of employees.
*/
getEmployees(params: QueryParams): Observable<EmployeesOut>;
/**
* Fetches an employee's details based on the provided employee ID.
*
* @param {number} id - The unique identifier of the employee.
* @return {Observable<EmployeeOut>} An observable that emits the employee's details.
*/
getEmployee(id: number): Observable<EmployeeOut>;
/**
* Retrieves the list of employees for a specified location based on provided query parameters.
*
* @param {QueryParams} params - The query parameters used to filter and retrieve the location employees.
* @returns {Observable<LocationEmployeesOut>} An observable that emits the list of employees for the specified location.
*/
getLocationEmployees(params: QueryParams): Observable<LocationEmployeesOut>;
/**
* Retrieves a list of countries where the company operates.
*
* @param {QueryParams} params - The query parameters for the API request.
* @return {Observable<CompanyCountriesOut>} An observable containing the list of company countries.
*/
getCompanyCountries(params: QueryParams): Observable<CompanyCountriesOut>;
/**
* Retrieves the country information for a specified company by its ID.
*
* @param {number} id - The unique identifier of the company.
* @return {Observable<CompanyCountryOut>} An observable containing the country information of the company.
*/
getCompanyCountry(id: number): Observable<CompanyCountryOut>;
/**
* Fetches the reference currencies for a given country.
*
* @param {QueryParams} params - The query parameters to include in the request.
* @return {Observable<CountryReferenceCurrenciesOut>} The observable containing the country reference currencies data.
*/
getCountryReferenceCurrencies(params: QueryParams): Observable<CountryReferenceCurrenciesOut>;
/**
* Retrieves a list of currencies for different countries along with their current exchange rates.
*
* @param {QueryParams} params - The query parameters used to fetch the country reference currencies.
* @return {Observable<CountryCurrencyRate[]>} An observable that emits an array of country currency rates.
*/
getCountryCurrenciesWithRate(params: QueryParams): Observable<CountryCurrencyRate[]>;
/**
* Fetches exchange data based on the provided query parameters.
*
* @param {QueryParams} params - The query parameters for retrieving exchange data.
* @return {Observable<ExchangesOut>} An observable containing the exchange data.
*/
getExchanges(params: QueryParams): Observable<ExchangesOut>;
/**
* Retrieves the current exchanges based on the given query parameters.
*
* @param {QueryParams} params - The query parameters to filter the exchanges.
*
* @returns {Observable<ExchangesOut>} - An observable that emits the API response data containing the current exchanges.
*/
getCurrentExchanges(params: QueryParams): Observable<ExchangesOut>;
/**
* Fetches the country-specific tax information for a company.
*
* @param {QueryParams} params - The parameters used to filter and query the taxes.
* @return {Observable<CompanyCountryTaxesOut>} An observable that emits the tax information.
*/
getCompanyCountryTaxes(params: QueryParams): Observable<CompanyCountryTaxesOut>;
/**
* Retrieves the list of active account entities based on the provided query parameters.
*
* @param {QueryParams} params - The parameters to filter and query active account entities.
* @return {Observable<AccountEntitiesActivesOut>} An observable that emits the list of active account entities.
*/
getAccountEntitiesActives(params: QueryParams): Observable<AccountEntitiesActivesOut>;
/**
* Retrieves the parameter values based on the provided parameter names.
*
* @param {Object} params - An object containing the required parameters.
* @param {string[]} params.paramNames - An array of parameter names for which the values need to be fetched.
* @return {Observable<ParametersValuesOut>} An observable that emits the fetched parameter values.
*/
getParametersValues({ paramNames, }: ParametersIn): Observable<ParametersValuesOut>;
/**
* Retrieves the value of a specified parameter.
*
* @param {Object} input - The input object containing the parameter details.
* @param {string} input.paramName - The name of the parameter whose value is to be retrieved.
* @return {Observable<ParameterValueOut>} An observable emitting the value of the specified parameter.
*/
getParameterValue({ paramName, }: ParameterValueIn): Observable<ParameterValueOut>;
/**
* Retrieves a list of country references based on the given query parameters.
*
* @param {QueryParams} params - The query parameters for retrieving country references.
* @return {Observable<CountryReferencesOut>} An observable containing the country reference data.
*/
getCountryReferences(params: QueryParams): Observable<CountryReferencesOut>;
/**
* Fetches the country reference data for a given country ID.
*
* @param {number} id - The unique identifier of the country for which the reference data is to be retrieved.
* @return {Observable<CountryReferenceOut>} An observable containing the country reference data.
*/
getCountryReference(id: number): Observable<CountryReferenceOut>;
/**
* Fetches the list of workflows based on the provided query parameters.
*
* @param {QueryParams} params - The query parameters used to filter workflows.
* @return {Observable<WorkflowsOut>} An observable containing the workflow data.
*/
getWorkflows(params: QueryParams): Observable<WorkflowsOut>;
/**
* Fetches the list of employee customer
*
* @param {QueryParams} params - The query parameters used to filter employee customers.
* @return {Observable<EmployeeCustomersOut>} An observable containing the employee customer data.
*/
getEmployeesCustomers(params: QueryParams): Observable<EmployeesCustomersOut>;
/**
* Sends a POST request to create or update employee customer records and processes the server response.
*
* @param {EmployeeCustomersIn} body - The request payload containing employee customer data to be sent to the server.
* @return {Observable<EmployeeCustomersOut>} An observable that emits the updated employee customer data on successful response.
*/
postEmployeeCustomers(body: EmployeeCustomersIn): Observable<EmployeeCustomersOut>;
/**
* Updates the employee-customer association record identified by the given ID with the provided data.
*
* @param {number} id - The identifier of the employee-customer record to update.
* @param {EmployeeCustomersIn} body - The data to update the employee-customer record with.
* @return {Observable<EmployeeCustomersOut>} An observable that emits the updated employee-customer data.
*/
putEmployeeCustomers(id: number, body: EmployeeCustomersIn): Observable<EmployeeCustomersOut>;
/**
* Fetches the employee-customer details based on the provided employee customer ID.
*
* @param {number} id - The identifier of the employee-customer record to update.
* @return {Observable<EmployeeCustomersOut>} An observable that emits the updated employee-customer data.
*/
getEmployeeCustomer(id: number): Observable<EmployeeCustomersOut>;
/**
* Enables or disables an employee customer's active state.
*
* @param {EmployeeCustomerDhl} employee - The employee customer object to be updated.
* @param {boolean} [isActive] - Optional parameter to explicitly set the active state.
* If null or undefined, the active state will be toggled.
* @return {Observable<EmployeeCustomersOut>} An observable containing the updated employee customer output.
*/
enableDisableEmployeeCustomers(employee: EmployeeCustomerDhl, isActive?: boolean): Observable<EmployeeCustomersOut>;
/**
* Submits a file containing employee customer data for a specific country to the server.
*
* @param {number} countryId - The identifier of the country for which the data is being uploaded.
* @param {File} file - The file containing employee customer data to be uploaded.
* @return {Observable<BoardingProcessIdIn>} Observable that emits the processed boarding process ID on success.
*/
postEmployeeCustomersLoad(countryId: number, file: File): Observable<BoardingProcessIdIn>;
/**
* Downloads a file containing customer data for a specific employee based on the provided country ID.
*
* @param {number} id - The ID of the country used as a filter for fetching the employee's customers.
* @return {Observable<Blob>} An observable that emits the file blob containing the customer data.
*/
getEmployeeCustomersDownload(id: number): Observable<Blob>;
/**
* Retrieves the boarding process details for a given ID.
*
* @param {number} id - The unique identifier of the boarding process to retrieve.
* @return {Observable<BoardingProcessIn>} An observable containing the boarding process details.
*/
getBoardingProcess(id: number): Observable<BoardingProcessIn>;
static ɵfac: i0.ɵɵFactoryDeclaration<ApiCompaniesService, never>;
static ɵprov: i0.ɵɵInjectableDeclaration<ApiCompaniesService>;
}