UNPKG

@experteam-mx/ngx-services

Version:

Angular common services for Experteam apps

1,409 lines (1,384 loc) 297 kB
import * as i0 from '@angular/core'; import { InjectionToken, ModuleWithProviders, EnvironmentProviders } from '@angular/core'; import { Observable } from 'rxjs'; import { HttpResponse, HttpRequest, HttpHandlerFn, HttpEvent, HttpParams, HttpHeaders } from '@angular/common/http'; import { Channel } from 'pusher-js'; /** * Represents the configuration settings for the application's environment. * This type includes various API endpoint URLs, authentication details, caching options, and other relevant settings. * * Properties: * - apiCompaniesUrl: The URL for the companies API endpoint. * - apiEventsUrl: The URL for the events API endpoint. * - apiInvoicesUrl: The URL for the invoices API endpoint. * - apiReportsUrl: The URL for the reports API endpoint. * - apiSecurityUrl: The URL for the security-related API endpoint. * - apiShipmentUrl: The URL for the shipment API endpoint. * - authCookie: The name of the authentication cookie used for user sessions. * - cacheTtl: Optional. Specifies the time-to-live (TTL) for cached items. * - printUrl: Optional. The URL used for generating or downloading printable documents. * - secretKey: A secret key used for authentication or other secure operations. */ type Environment = { apiBillingDO?: string; apiBillingGT?: string; apiBillingMX?: string; apiBillingPA?: string; apiBillingSV?: string; apiCashOperationsUrl?: string; apiCatalogsUrl?: string; apiCompaniesUrl?: string; apiCompositionUrl?: string; apiCustomsUrl?: string; apiDiscountsUrl?: string; apiEToolsAutoBilling?: string; apiEventsUrl?: string; apiExternalOperationsKey?: string; apiExternalOperationsUrl?: string; apiInventoriesUrl?: string; apiInvoicesUrl?: string; apiNotificationsUrl?: string; apiOpenItemsUrl?: string; apiQuotesUrl?: string; apiReportsUrl?: string; apiSecurityUrl?: string; apiServicesUrl?: string; apiShipmentUrl?: string; apiSuppliesUrl?: string; apiSurveysUrl?: string; authCookie?: string; cacheTtl?: number; printUrl?: string; secretKey?: string; sockets?: { app_key: string; debug?: boolean; port: number; url: string; }; }; /** * Injection token used to inject environment configurations. * * `ENVIRONMENT_TOKEN` is a dependency injection token that allows * for the provision and retrieval of environment-specific configurations * within the application. This token is typically associated with an * `Environment` type that defines the structure of the configuration. */ declare const ENVIRONMENT_TOKEN: InjectionToken<Environment>; declare class NgxServicesModule { /** * Returns a module with providers for the NgxServicesModule. * * @param {Environment} environment - The environment configuration object. * * @return {ModuleWithProviders<NgxServicesModule>} The module with providers for the NgxServicesModule. * * @deprecated Use `provideNgxServices(environment)` in `ApplicationConfig.providers` * for standalone applications. This API will be removed in `20.2.0`. */ static forRoot(environment: Environment): ModuleWithProviders<NgxServicesModule>; static ɵfac: i0.ɵɵFactoryDeclaration<NgxServicesModule, never>; static ɵmod: i0.ɵɵNgModuleDeclaration<NgxServicesModule, never, never, never>; static ɵinj: i0.ɵɵInjectorDeclaration<NgxServicesModule>; } /** * Provides ngx-services dependencies for standalone Angular applications. * * Register this provider in `ApplicationConfig.providers` so all services in * this library can resolve the environment-based configuration. */ declare function provideNgxServices(environment: Environment): EnvironmentProviders; interface ApiResponse { status: 'success' | 'fail' | 'error'; } interface ApiSuccess<T> extends ApiResponse { status: 'success'; data: T; } interface ApiModel { id: number; } interface LaravelModel extends ApiModel { is_active: boolean; created_at: string; updated_at: string; } interface ActiveLessLaravelModel extends ApiModel { created_at: string; updated_at: string; } interface SymfonyModel extends ApiModel { isActive: boolean; createdAt: string; updatedAt: string; } interface ActiveLessSymfonyModel extends ApiModel { createdAt: string; updatedAt: string; } type QueryParams = { [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>; }; interface Translations { [key: string]: TranslateLang; } interface TranslateLang { [langCode: string]: string; } interface IncomeType extends LaravelModel { code: string; name: string; billing_code: string; } type IncomeTypesOut = { income_types: IncomeType[]; total: number; }; declare class ApiBillingDOService { private environments; private http; /** * Gets the base URL for Billing DO API endpoints. * * @returns {string} Billing DO API base URL, or an empty string when it is not configured. */ get url(): string; /** * Retrieves the list of income types from Billing DO. * * @returns {Observable<IncomeTypesOut>} Observable that emits the income types payload. */ getIncomeTypes(): Observable<IncomeTypesOut>; static ɵfac: i0.ɵɵFactoryDeclaration<ApiBillingDOService, never>; static ɵprov: i0.ɵɵInjectableDeclaration<ApiBillingDOService>; } interface BillingPaCustomer { document_id: number; name: string; number: string; type_ruc: number; type_ruc_code: string; verification_code: string; type_rec: string; identification_type_id: number; } interface District extends LaravelModel { code: string; name: string; province_id: number; } interface Parish extends LaravelModel { code: string; name: string; district_id: number; province_id: number; } interface Province extends LaravelModel { code: string; name: string; } type DistrictsOut = { total: number; districts: District[]; }; type BillingPaCustomerOut = { customer: BillingPaCustomer; }; type ParishesOut = { total: number; parishes: Parish[]; }; type ProvincesOut = { total: number; provinces: Province[]; }; interface ApiBillingConfigurable { getConfigs(): Observable<BillingConfigsOut>; getConfig(id: number): Observable<BillingConfigOut>; postConfigs(body: BillingConfigIn): Observable<BillingConfigOut>; getDistricts?(params: QueryParams): Observable<DistrictsOut>; getParishes?(params: QueryParams): Observable<ParishesOut>; getProvinces?(params: QueryParams): Observable<ProvincesOut>; } type BillingConfig = { label: string; field: string; is_required: boolean; type?: string; }; type BillingConfigsOut = { configurations: BillingConfig[]; total: number; }; type BillingConfigIn = { [key: string]: string | number; }; type BillingConfigOut = { [key: string]: [key: string | number][]; }; declare class ApiBillingGtService implements ApiBillingConfigurable { private environments; private http; /** * Gets the base URL for Billing GT API endpoints. * * @returns {string} Billing GT API base URL, or an empty string when it is not configured. */ get url(): string; /** * Retrieves the list of billing configurations by location. * * @returns {Observable<BillingConfigsOut>} Observable that emits the billing configurations payload. */ getConfigs(): Observable<BillingConfigsOut>; /** * Retrieves billing configuration details for a location. * * @param {number} id - Location identifier to fetch. * @returns {Observable<BillingConfigOut>} Observable that emits the location billing configuration payload. */ getConfig(id: number): Observable<BillingConfigOut>; /** * Creates a billing configuration for a location. * * @param {BillingConfigIn} body - Billing configuration payload for the location. * @returns {Observable<BillingConfigOut>} Observable that emits the created billing configuration payload. */ postConfigs(body: BillingConfigIn): Observable<BillingConfigOut>; static ɵfac: i0.ɵɵFactoryDeclaration<ApiBillingGtService, never>; static ɵprov: i0.ɵɵInjectableDeclaration<ApiBillingGtService>; } interface CFDI extends LaravelModel { code: string; description: string; fiscal_regimen_receptor: string; moral_person: string; physical_person: string; } interface FiscalRegimen extends LaravelModel { code: string; description: string; moral_person: string; physical_person: string; } interface PostalCodeBillings extends LaravelModel { city: string; municipality: string; state: string; suburb: string; postal_code_number: string; } type FiscalRegimensAcceptedOut = { total: number; cfdi_use: CFDI[]; }; type FiscalRegimensOut = { total: number; fiscal_regimen: FiscalRegimen[]; }; type PostalCodesOut = { postal_code: PostalCodeBillings[]; total: number; }; declare class ApiBillingMxService { private environments; private http; /** * Gets the base URL for Billing MX API endpoints. * * @returns {string} Billing MX API base URL, or an empty string when it is not configured. */ get url(): string; /** * Retrieves the list of fiscal regimens from Billing MX. * * @returns {Observable<FiscalRegimensOut>} Observable that emits the fiscal regimens payload. */ getFiscalRegimens(): Observable<FiscalRegimensOut>; /** * Retrieves the CFDI uses accepted for a fiscal regimen. * * @param {number} fiscalRegimen Fiscal regimen identifier used to filter accepted CFDI uses. * @returns {Observable<FiscalRegimensAcceptedOut>} Observable that emits the accepted CFDI uses payload. */ getFiscalRegimensAccepted(fiscalRegimen: number): Observable<FiscalRegimensAcceptedOut>; /** * Retrieves postal code information from Billing MX. * * @param {QueryParams} params Query parameters used by the postal codes endpoint. * @returns {Observable<PostalCodesOut>} Observable that emits the postal code data payload. */ getPostalCodes(params: QueryParams): Observable<PostalCodesOut>; static ɵfac: i0.ɵɵFactoryDeclaration<ApiBillingMxService, never>; static ɵprov: i0.ɵɵInjectableDeclaration<ApiBillingMxService>; } declare class ApiBillingPaService implements ApiBillingConfigurable { private environments; private http; /** * Gets the base URL for Billing PA API endpoints. * * @returns {string} Billing PA API base URL, or an empty string when it is not configured. */ get url(): string; /** * Retrieves the list of districts. * * @param {QueryParams} params Query parameters used by the districts endpoint. * @returns {Observable<DistrictsOut>} Observable that emits the districts payload. */ getDistricts(params: QueryParams): Observable<DistrictsOut>; /** * Retrieves the list of parishes. * * @param {QueryParams} params Query parameters used by the parishes endpoint. * @returns {Observable<ParishesOut>} Observable that emits the parishes payload. */ getParishes(params: QueryParams): Observable<ParishesOut>; /** * Retrieves the list of provinces. * * @param {QueryParams} params Query parameters used by the provinces endpoint. * @returns {Observable<ProvincesOut>} Observable that emits the provinces payload. */ getProvinces(params: QueryParams): Observable<ProvincesOut>; /** * Validates a customer using Billing PA. * * @param {QueryParams} params Query parameters used by the customer validation endpoint. * @returns {Observable<BillingPaCustomerOut>} Observable that emits customer validation data. */ getValidateCustomer(params: QueryParams): Observable<BillingPaCustomerOut>; /** * Retrieves billing configurations by location. * * @returns {Observable<BillingConfigsOut>} Observable that emits billing configuration items. */ getConfigs(): Observable<BillingConfigsOut>; /** * Retrieves the billing configuration for a location. * * @param {number} id Location identifier. * @returns {Observable<BillingConfigOut>} Observable that emits the location billing configuration payload. */ getConfig(id: number): Observable<BillingConfigOut>; /** * Creates a billing configuration for a location. * * @param {BillingConfigIn} body Billing configuration payload for the new location. * @returns {Observable<BillingConfigOut>} Observable that emits the created billing configuration payload. */ postConfigs(body: BillingConfigIn): Observable<BillingConfigOut>; static ɵfac: i0.ɵɵFactoryDeclaration<ApiBillingPaService, never>; static ɵprov: i0.ɵɵInjectableDeclaration<ApiBillingPaService>; } interface PersonType extends LaravelModel { code: string; name: string; } interface EconomicActivity extends LaravelModel { code: string; name: string; } interface EstablishmentType extends LaravelModel { code: string; name: string; } interface Department extends LaravelModel { code: string; name: string; } interface Municipality extends LaravelModel { code: string; name: string; department_code: string; } type EconomicActivitiesOut = { economic_activities: EconomicActivity[]; total: number; }; type PersonTypesOut = { person_types: PersonType[]; total: number; }; type EstablishmentTypesOut = { establishment_types: EstablishmentType[]; total: number; }; type DepartmentsOut = { departments: Department[]; total: number; }; type MunicipalitiesOut = { municipalities: Municipality[]; total: number; }; declare class ApiBillingSvService { private environments; private http; /** * Retrieves the URL for the billing API. * If the URL is not defined in the environments configuration, returns an empty string. * * @returns {string} The billing API URL or an empty string if not set. */ get url(): string; /** * Fetches the list of economic activities based on the provided query parameters. * * @param {QueryParams} params - The query parameters used to filter the economic activities. * @returns {Observable<EconomicActivitiesOut>} An observable that emits the list of economic activities. */ getEconomicActivities(params: QueryParams): Observable<EconomicActivitiesOut>; /** * Retrieves the list of person types based on given query parameters. * * @param {QueryParams} params - The query parameters used to filter the person types. * @returns {Observable<PersonTypesOut>} An observable that emits a list of person types. */ getPersonTypes(params: QueryParams): Observable<PersonTypesOut>; /** * Fetches the list of establishment types. * * @param {QueryParams} params The query parameters to be sent with the HTTP request. * @returns {Observable<EstablishmentTypesOut>} An observable that emits the establishment types data. */ getEstablishmentTypes(params: QueryParams): Observable<EstablishmentTypesOut>; /** * Fetches the list of departments based on the provided query parameters. * * @param {QueryParams} params - The query parameters to filter or modify the departments fetch request. * @returns {Observable<DepartmentsOut>} An observable emitting the list of departments. */ getDepartments(params: QueryParams): Observable<DepartmentsOut>; /** * Retrieves a list of municipalities based on the provided query parameters. * * @param {QueryParams} params - The query parameters used to filter the municipalities. * @returns {Observable<MunicipalitiesOut>} An observable that emits the retrieved municipalities data. */ getMunicipalities(params: QueryParams): Observable<MunicipalitiesOut>; static ɵfac: i0.ɵɵFactoryDeclaration<ApiBillingSvService, never>; static ɵprov: i0.ɵɵInjectableDeclaration<ApiBillingSvService>; } interface InstallationCountryReferenceCurrency extends ActiveLessSymfonyModel { installationId?: number; countryReferenceCurrencyId: number; minCashValue?: number; maxCashValue?: number; } interface CashValueSummary { countryReferenceCurrencyId: number; currencyCode: string; balanceInitial: number; transfers: number; payments: number; totalBalance: number; minCashValue: number; maxAmount: number; } interface OpeningTransference extends ActiveLessSymfonyModel { openingId: number; openingReferenceId: number; transferenceTypeId: number; userId: number; amount: number; countryReferenceCurrencyId: number; transferenceCode: string; receiptNumber: string; userName: string | null; userUsername: string | null; currencyCode: string | null; maxCashExceeded: boolean; transferenceType: TransferenceType; } interface ReceiptFile { format: string; base64: string; } interface TransferenceType extends SymfonyModel { code: string; name: string; } type InstallationCountryReferenceCurrenciesOut = { total: number; installationCountryReferenceCurrencies: InstallationCountryReferenceCurrency[]; }; type InstallationCountryReferenceCurrencyIn = { installationId?: number; countryReferenceCurrencyId: number; minCashValue?: number; maxCashValue?: number; }; type InstallationCountryReferenceCurrencyOut = { installationCountryReferenceCurrencies: InstallationCountryReferenceCurrency; }; type CashValueSummaryOut = { total: number; cashValueSummary: CashValueSummary[]; }; type OpeningTransferenceIn = { openingId: number; amount: number; countryReferenceCurrencyId: number; transferenceTypeCode: string; }; type OpeningTransferenceOut = { openingTransference: OpeningTransference; }; type ReceiptFileOut = { receipt: ReceiptFile; }; type DepositSlipOut = { depositSlip: { format: string; base64: string; }; }; declare class ApiCashOperationsService { private environments; private http; /** * Retrieves the URL for the cash operations API from the environment configurations. * * @returns {string} The URL of the cash operations API. */ get url(): string; /** * Creates a new installation country reference currency. * * @param {InstallationCountryReferenceCurrencyIn} body - The data for the new reference currency. * @returns {Observable<InstallationCountryReferenceCurrencyOut>} The created reference currency. */ postInstallationCountryReferenceCurrency(body: InstallationCountryReferenceCurrencyIn): Observable<InstallationCountryReferenceCurrencyOut>; /** * Updates an existing installation country reference currency. * * @param {number} id - The ID of the reference currency to update. * @param {InstallationCountryReferenceCurrencyIn} body - The updated data for the reference currency. * @returns {Observable<InstallationCountryReferenceCurrencyOut>} The updated reference currency. */ putInstallationCountryReferenceCurrency(id: number, body: InstallationCountryReferenceCurrencyIn): Observable<InstallationCountryReferenceCurrencyOut>; /** * Retrieves a list of installation country reference currencies based on query parameters. * * @param {QueryParams} params - Query parameters for filtering the currencies. * @returns {Observable<InstallationCountryReferenceCurrenciesOut>} The list of reference currencies. */ getInstallationCompanyCountryCurrencies(params: QueryParams): Observable<InstallationCountryReferenceCurrenciesOut>; /** * Retrieves the cash value summary for a specific opening ID. * * @param {number} id - The ID of the opening for which to retrieve the cash value summary. * @returns {Observable<CashValueSummaryOut>} An observable that emits the cash value summary data. */ getOpeningCashValueSummary(id: number): Observable<CashValueSummaryOut>; /** * Creates a new opening transference record. * * @param {OpeningTransferenceIn} body - The data to create the new opening transference. * @returns {Observable<OpeningTransferenceOut>} An observable that emits the newly created opening transference. */ postOpeningTransferences(body: OpeningTransferenceIn): Observable<OpeningTransferenceOut>; /** * Retrieves the receipt file associated with the given opening transference ID. * * @param {number} id - The ID of the opening transference whose receipt is to be retrieved. * @returns {Observable<ReceiptFileOut>} An observable that emits the receipt file data. */ getOpeningTransferenceReceipt(id: number): Observable<ReceiptFileOut>; /** * Retrieves a deposit slip by its ID. * @param id - The unique identifier of the deposit slip to retrieve * @returns An Observable that emits the deposit slip data */ getDepositSlip(id: number): Observable<DepositSlipOut>; static ɵfac: i0.ɵɵFactoryDeclaration<ApiCashOperationsService, never>; static ɵprov: i0.ɵɵInjectableDeclaration<ApiCashOperationsService>; } declare enum ViewSectionOption { SHIPMENT = "shipment", PICKUP = "pickup", EMPLOYEE_DHL = "employeeDhl", BILLING = "billing", CUSTOMER_RESTRICTION = "customerRestriction" } interface Country extends SymfonyModel { name: string; code: string; codeAndName: string; isoCode: string; codePhone: string; locale: string; locationType: LocationType; unit: Unit; timezone: string; hasImportService: boolean; phoneDigits: number; locationTypeFields: LocationTypeFields; postalCodeSuffixRegex: string; decimalPoint: number; max_quantity_document_piece: number; max_quantity_package_piece: number; weight_restriction_piece: number; restriction_shipment: number; restriction_dimension: number; max_declared_value: number; decimal_separator: string; thousands_separator: string; label_printer_name: string; receipt_printer_name: string; others_printer_name: string; territories: number[]; use_billing?: boolean; translations: Translations; } interface LocationType extends SymfonyModel { code: string; name: string; priority: number; } interface LocationTypeFields { city: City; postalCode: PostalCode; suburb: Suburb; } interface City { enabled: boolean; required: boolean; } interface PostalCode { enabled: boolean; required: boolean; } interface Suburb { enabled: boolean; required: boolean; } interface Language extends SymfonyModel { code: string; name: string; } interface State extends SymfonyModel { country: Country; code: string; name: string; } interface IdentificationType extends SymfonyModel { code: string; countryId: number; identificationType: number | null; name: string; viewSection?: Record<ViewSectionOption, boolean>; regex: string[] | null; isExternalValidation: boolean; } interface OperationType extends SymfonyModel { code: string; name: string; translations?: Translations; } interface BoardingProcessStatus { id: number; code: string; createdAt: string; updatedAt: string; } interface ExtraCharge extends SymfonyModel { code: string; name: string; isDiscount: boolean; aggregated: boolean; } interface Region extends SymfonyModel { code: string; name: string; country: Country; } interface Zone extends SymfonyModel { code: string; name: string; country: Country; } interface ManagementArea extends SymfonyModel { name: string; country: Country; } interface CancellationReason extends SymfonyModel { code: string; name: string; eventReasonCode: string; countryId: number; } interface Currency extends SymfonyModel { code: string; name: string; symbol: string; } interface Currency extends SymfonyModel { code: string; name: string; symbol: string; } interface Unit extends SymfonyModel { name: string; weight: string; dimension: string; } interface Unit extends SymfonyModel { name: string; weight: string; dimension: string; } interface ShipmentScope extends SymfonyModel { code: string; name: string; } interface ShipmentContentType extends SymfonyModel { code: string; name: string; } interface GenericFolio extends SymfonyModel { countryId: number; code: string; customer: string; accountNumber: string; content: string; packaging: true; destinationFullName: string; destinationAddressLine1: string; destinationAddressLine2: string; destinationAddressLine3: string; destinationCountryId: number; destinationCountryCode: string; destinationPostalCode: string; destinationCityName: string; destinationCountyName: string; destinationStateCode: string; destinationPhoneCode: string; destinationPhoneNumber: string; destinationEmail: string; countryReferenceProductIds: number[]; productLocalCodes: string; } interface Product extends SymfonyModel { globalCode: number; localCode: string; globalName: string; localName: string; isDocument: string; restrictedAccounts: { id: string; number: string; isActive: boolean; }[]; discounts: []; } interface ShipmentIncomeType extends SymfonyModel { countryId: number; code: string; name: string; } interface UniqueFolio extends SymfonyModel { code: number; customer: string; content: string; kad: string | null; executive: string; } interface ShipmentGroup extends SymfonyModel { code: string; name: string; } interface ShipmentStatus extends SymfonyModel { code: string; description: string; } interface Question extends SymfonyModel { description: string; type: string; questionOrder: number; countryId: number; isRequiredValue: boolean; } interface Holiday extends SymfonyModel { date: string; description: string; country: Country; } interface BusinessPartyTraderType extends SymfonyModel { code: string; name: string; description: string | null; category: string | null; esbCode: string; } interface PackageLocation extends SymfonyModel { name: string; } type OperationTypesOut = { total: number; operationTypes: OperationType[]; }; interface IdentificationTypesOut { total: number; identificationTypes: IdentificationType[]; } type IdentificationTypeOut = { IdentificationType: IdentificationType; }; type IdentificationTypeIn = { code: string; countryId: number; identificationType?: number | null; name: string; viewSection: Record<ViewSectionOption, boolean>; regex: string[] | null; isExternalValidation?: boolean; isActive: boolean; }; type ExtraChargesOut = { total: number; extracharges: ExtraCharge[]; }; type CountriesOut = { total: number; countries: Country[]; }; type CountryIn = { code: string; name: string; locationTypeId: number; unitId: number; timezone: string; hasImportService: boolean; isActive: boolean; isoCode: string; codePhone: string; phoneDigits: number; }; type CountryOut = { country: Country; }; type RegionsOut = { total: number; regions: Region[]; }; type ZonesOut = { total: number; zones: Zone[]; }; type ManagementAreasOut = { total: number; managementAreas: ManagementArea[]; }; type CancellationReasonsOut = { total: number; cancellationReasons: CancellationReason[]; }; type CancellationReasonIn = { code: string; name: string; eventReasonCode: string | null; isActive: boolean; countryId: number; }; type CancellationReasonOut = { cancellationReason: CancellationReason; }; type CurrenciesOut = { total: number; currencies: Currency[]; }; type CurrencyOut = { currency: Currency; }; type LanguagesOut = { total: number; languages: Language[]; }; type UnitsOut = { total: number; units: Unit[]; }; type ShipmentScopesOut = { total: number; shipmentScopes: ShipmentScope[]; }; type ShipmentContentTypesOut = { total: number; shipmentContentTypes: ShipmentContentType[]; }; type ExtraChargeIn = { code: string; name: string; isDiscount: boolean; aggregated: boolean; }; type ExtraChargeOut = { extraCharge: ExtraCharge; }; type GenericFoliosOut = { total: number; genericFolios: GenericFolio[]; }; type GenericFolioIn = { accountNumber: string; code: string; content: string; countryReferenceProductIds: number[]; customer: string; destinationAddressLine1: string; destinationAddressLine2: string; destinationAddressLine3: string; destinationCityName?: string; destinationCountryId: number; destinationCountyName?: string; destinationEmail: string; destinationFullName: string; destinationPhoneCode: string; destinationPhoneNumber: string; destinationPostalCode?: string; destinationStateCode?: string; isActive: boolean; packaging: boolean; countryId: number; }; type GenericFolioOut = { genericFolio: GenericFolio; }; type ProductIn = { globalCode: number; localCode: string; globalName: string; localName: string; isDocument: boolean; }; type ProductOut = { product: Product; }; type ShipmentIncomeTypesOut = { total: number; shipmentIncomeTypes: ShipmentIncomeType[]; }; type ShipmentIncomeTypeIn = { countryId: number; code: string; name: string; isActive: boolean; }; type ShipmentIncomeTypeOut = { shipmentIncomeType: ShipmentIncomeType; }; type UniqueFolioIn = { code: number; customer: string; content: string; kad: string | null; executive: string; isActive: boolean; }; type UniqueFolioOut = { uniqueFolio: UniqueFolio; }; type UniqueFoliosOut = { total: number; uniqueFolios: UniqueFolio[]; }; type ShipmentGroupsOut = { shipmentGroups: ShipmentGroup[]; total: number; }; type ShipmentStatusesOut = { shipmentStatuses: ShipmentStatus[]; total: number; }; type QuestionsOut = { questions: Question[]; total: number; }; type QuestionOut = { question: Question; }; type QuestionIn = { description: string; type: 'marketing'; questionOrder: number; isActive: boolean; countryId: number; isRequiredValue: boolean; }; type HolidaysOut = { holidays: Holiday[]; total: number; }; type HolidayOut = { holiday: Holiday; }; type HolidayIn = { date: string; description: string; countryId: number; isActive: boolean; }; type IdentificationTypeNumberValidationIn = { identificationTypeId: number; identificationNumber: string; section: string; }; type IdentificationTypeNumberValidationOut = {}; type BusinessPartyTraderTypesOut = { total: number; businessPartyTraderTypes: BusinessPartyTraderType[]; }; type PackageLocationsData = { total: number; packageLocations: PackageLocation[]; }; declare class ApiCatalogsService { private environments; private http; /** * Retrieves the URL for the reports API from the environment configurations. * * @return {string} The URL of the reports API. */ get url(): string; /** * Retrieves the list of collection payments * * @param {QueryParams} params - The query parameters used to fetch the operation types. * @return {Observable<OperationTypesOut[]>} An observable that emits an array of operation type. */ getOperationTypes(params: QueryParams): Observable<OperationTypesOut>; /** * Retrieves the list of identificatios types * * @param {QueryParams} params - The query parameters used to fetch the identification types. * @return {Observable<IdentificationTypesOut[]>} An observable that emits an array of identification type. */ getIdentificationTypes(params: QueryParams): Observable<IdentificationTypesOut>; /** * Retrieve a single identification type by its id. * * Sends an HTTP GET request to the indentification type endpoint and returns an Observable that emits * the IdentificationTypeOut payload extracted from the API success envelope. * * @param id - The numeric identifier of the identification type to fetch. * @returns An Observable that emits the requested IdentificationTypeOut. The Observable will error * if the HTTP request fails (for example network issues or non-2xx responses). */ getIdentificationType(id: number): Observable<IdentificationTypeOut>; /** * Sends a POST request to create a new identification type and returns the created resource. * * The request payload is sent as an object with a `body` property containing the provided * IdentificationTypeIn value (i.e. { body: IdentificationTypeIn }). On success the HTTP response is expected * to follow the ApiSuccess<T> shape; the operator maps that response to the inner `data` * object and emits it as a IdentificationTypeOut. * * @param body - The identification type payload to create (IdentificationTypeIn). * @returns Observable<IdentificationTypeOut> that emits the created identification type on success. */ postIdentificationType(body: IdentificationTypeIn): Observable<IdentificationTypeOut>; /** * Update a identification type by its ID. * * Sends an HTTP PUT to `${this.url}/identification-types/${id}` with the provided payload. * The request body is sent as an object with a `body` property containing the * `IdentificationTypeIn` data. The server response is expected to be an `ApiSuccess<IdentificationTypeOut>` * and this method returns an Observable that emits the unwrapped `IdentificationTypeOut`. * * @param id - The identifier of the identification type to update. * @param body - The update payload for the identification type. * @returns An Observable that emits the updated `IdentificationTypeOut` on success. */ putIdentificationType(id: number, body: IdentificationTypeIn): Observable<IdentificationTypeOut>; /** * Delete a identification type by its ID. * * Sends an HTTP DELETE request to the backend endpoint `/identification-types/{id}` and * returns an Observable that emits the API response's `data` payload (typically an empty object). * * The implementation maps an ApiSuccess wrapper to its `data` property before emitting. * * @param id - The numeric identifier of the identification type to delete. * @returns An Observable that emits the deleted resource payload ({} expected) on success. * The Observable will emit an error if the HTTP request fails. */ deleteIdentificationType(id: number): Observable<{}>; /** * Sends a POST request to validate identification type number. * * The request payload is sent as an object with a `body` property containing the provided * IdentificationTypeNumberValidationIn value (i.e. { body: IdentificationTypeNumberValidationIn }). On success the HTTP response is expected * to follow the ApiSuccess<T> shape; the operator maps that response to the inner `data` * object and emits it as a IdentificationTypeNumberValidationOut. * * @param body - The identification type number validation payload to validate (IdentificationTypeNumberValidationIn). * @returns Observable<IdentificationTypeNumberValidationOut> that emits the validate status. */ postIdentificationTypeNumberValidation(body: IdentificationTypeNumberValidationIn): Observable<IdentificationTypeNumberValidationOut>; /** * Fetches the extra charges based on the provided query parameters. * * @param {QueryParams} params - The query parameters to filter the results. * @return {Observable<ExtraChargesOut>} An observable emitting the extra charges data. */ getExtraCharges(params: QueryParams): Observable<ExtraChargesOut>; /** * Submits an extra charge request to the server and returns the created extra charge details. * * @param {ExtraChargeIn} body - The data for the extra charge to be created. * @return {Observable<ExtraChargeOut>} An observable that emits the details of the created extra charge. */ postExtraCharge(body: ExtraChargeIn): Observable<ExtraChargeOut>; /** * Updates an extra charge entity with new data and returns the updated entity. * * @param {number} id - The unique identifier of the extra charge to update. * @param {ExtraChargeIn} body - The new data for the extra charge. * @return {Observable<ExtraChargeOut>} An observable emitting the updated extra charge entity. */ putExtraCharge(id: number, body: ExtraChargeIn): Observable<ExtraChargeOut>; /** * Fetches a list of countries from the API. * * @param {QueryParams} params - The query parameters to be passed to the API request. * @return {Observable<CountriesOut>} An observable containing the list of countries. */ getCountries(params: QueryParams): Observable<CountriesOut>; /** * Retrieves the details of a country based on its ID. * * @param {number} id - The identifier of the country to fetch. * @return {Observable<CountryOut>} An observable that emits the country data. */ getCountry(id: number): Observable<CountryOut>; /** * Updates the details of a specific country by its ID. * * @param {number} id - The unique identifier of the country to be updated. * @param {CountryIn} body - The data to update the country with. * @return {Observable<CountryOut>} An observable that emits the updated country data. */ putCountry(id: number, body: CountryIn): Observable<CountryOut>; /** * Fetches a list of regions based on the provided query parameters. * * @param {QueryParams} params - The query parameters used to filter the regions. * @return {Observable<RegionsOut>} An observable that emits the list of regions. */ getRegions(params: QueryParams): Observable<RegionsOut>; /** * Fetches the zones data based on the provided query parameters. * * @param {QueryParams} params - The query parameters used to filter the zones data. * @return {Observable<ZonesOut>} An observable that emits the fetched zones data. */ getZones(params: QueryParams): Observable<ZonesOut>; /** * Fetches the management areas based on the provided query parameters. * * @param {QueryParams} params - The query parameters to filter the management areas. * @return {Observable<ManagementAreasOut>} An observable that emits the management areas data. */ getManagementAreas(params: QueryParams): Observable<ManagementAreasOut>; /** * Retrieves cancellation reasons from the server based on the provided query parameters. * * @param {QueryParams} params - The query parameters to filter the cancellation reasons. * @return {Observable<CancellationReasonsOut>} An observable containing the retrieved cancellation reasons. */ getCancellationReasons(params: QueryParams): Observable<CancellationReasonsOut>; /** * Sends a cancellation reason to the server. * * @param {CancellationReasonIn} body - The cancellation reason object to be sent. * @return {Observable<CancellationReasonOut>} An observable containing the server's response with the processed cancellation reason. */ postCancellationReason(body: CancellationReasonIn): Observable<CancellationReasonOut>; /** * Updates the cancellation reason for the specified ID with the provided data. * * @param {number} id - The unique identifier of the cancellation reason to update. * @param {CancellationReasonIn} body - The details of the cancellation reason to be updated. * @return {Observable<CancellationReasonOut>} An observable containing the updated cancellation reason. */ putCancellationReason(id: number, body: CancellationReasonIn): Observable<CancellationReasonOut>; /** * Retrieves a list of currencies based on the provided query parameters. * * @param {QueryParams} params - The query parameters to customize the currency retrieval request. * @return {Observable<CurrenciesOut>} An observable that emits the retrieved currencies data. */ getCurrencies(params: QueryParams): Observable<CurrenciesOut>; /** * Retrieves currency information by ID. * @param id - The unique identifier of the currency to retrieve. * @returns An Observable that emits the currency data. */ getCurrency(id: number): Observable<CurrencyOut>; /** * Fetches the list of available languages based on the provided query parameters. * * @param {QueryParams} params - The query parameters to pass with the HTTP request. * @return {Observable<LanguagesOut>} An observable that emits the available languages. */ getLanguages(params: QueryParams): Observable<LanguagesOut>; /** * Fetches the available units from the API based on the provided query parameters. * * @param {QueryParams} params - The query parameters to filter the units being fetched. * @return {Observable<UnitsOut>} An observable that emits the retrieved units data. */ getUnits(params: QueryParams): Observable<UnitsOut>; /** * Retrieves the shipment scopes based on the provided query parameters. * * @param {QueryParams} params The query parameters to filter or modify the request for shipment scopes. * @return {Observable<ShipmentScopesOut>} An observable that emits the shipment scopes data. */ getShipmentScopes(params: QueryParams): Observable<ShipmentScopesOut>; /** * Fetches the available shipment content types based on the provided query parameters. * * @param {QueryParams} params - The query parameters to filter the shipment content types. * @return {Observable<ShipmentContentTypesOut>} An observable that emits the shipment content types data. */ getShipmentContentTypes(params: QueryParams): Observable<ShipmentContentTypesOut>; /** * Fetches a list of generic folios based on the given query parameters. * * @param {QueryParams} params - The query parameters used to filter the generic folios. * @return {Observable<GenericFoliosOut>} An observable containing the fetched generic folios. */ getGenericFolios(params: QueryParams): Observable<GenericFoliosOut>; /** * Sends a POST request to create or update a generic folio. * * @param {GenericFolioIn} body - The payload containing the details of the generic folio to be created or updated. * @return {Observable<GenericFolioOut>} An observable containing the response data of the created or updated generic folio. */ postGenericFolio(body: GenericFolioIn): Observable<GenericFolioOut>; /** * Updates a generic folio with the specified ID using the provided data. * * @param {number} id - The unique identifier of the generic folio to update. * @param {GenericFolioIn} body - The data to update the generic folio with. * @return {Observable<GenericFolioOut>} An observable containing the updated generic folio. */ putGenericFolio(id: number, body: GenericFolioIn): Observable<GenericFolioOut>; /** * Sends a PUT request to update a Generic Folio resource with the specified ID and body data, and returns the updated resource. * * @param {number} id - The unique identifier of the Generic Folio to be updated. * @param {Partial<GenericFolioIn>} body - The partial data representing the changes to be applied to the Generic Folio. * @return {Observable<GenericFolioOut>} An observable containing the updated Generic Folio resource. */ pathGenericFolio(id: number, body: Partial<GenericFolioIn>): Observable<GenericFolioOut>; /** * Sends a POST request to create a new product. * * @param {ProductIn} body - The product data to be sent in the request body. * @return {Observable<ProductOut>} An observable emitting the created product data. */ postProduct(body: ProductIn): Observable<ProductOut>; /** * Updates an existing product with the given ID using the provided data. * * @param {number} id - The unique identifier of the product to update. * @param {ProductIn} body - The product data to update. * @return {Observable<ProductOut>} An observable containing the updated product data. */ putProduct(id: number, body: ProductIn): Observable<ProductOut>; /** * Retrieves a list of shipment income types based on the provided query parameters. * * @param {QueryParams} params - The query parameters to filter the shipment income types. * @return {Observable<ShipmentIncomeTypesOut>} An observable containing the shipment income types data. */ getShipmentIncomeTypes(params: QueryParams): Observable<ShipmentIncomeTypesOut>; /** * Sends a POST request to create a new shipment income type. * * @param {ShipmentIncomeTypeIn} body The payload containing the details of the shipment income type to be created. * @return {Observable<ShipmentIncomeTypeOut>} An observable that emits the created shipment income type data. */ postShipmentIncomeType(body: ShipmentIncomeTypeIn): Observable<ShipmentIncomeTypeOut>; /** * Updates the shipment income type with the specified ID. * * @param {number} id - The identifier of the shipment income type to update. * @param {ShipmentIncomeTypeIn} body - The data to update the shipment income type with. * @return {Observable<ShipmentIncomeTypeOut>} An observable emitting the updated shipment income type. */ putShipmentIncomeType(id: number, body: ShipmentIncomeTypeIn): Observable<ShipmentIncomeTypeOut>; /** * Retrieves a list of unique folios based on the provided query parameters. * * @param {QueryParams} params - The query parameters used to filter and fetch unique folios. * @return {Observable<UniqueFoliosOut>} An observable that emits the unique folios data. */ getUniqueFolios(params: QueryParams): Observable<UniqueFoliosOut>; /** * Sends a POST request to create a unique folio. * * @param {UniqueFolioIn} body - The data object containing details for the unique folio to be created. * @return {Observable<UniqueFolioOut>} An observable that emits the created unique folio details. */ postUniqueFolio(body: UniqueFolioIn): Observable<UniqueFolioOut>; /** * Updates a unique folio with the given data using the provided ID. * * @param {number} id - The ID of the unique folio to be updated. * @param {UniqueFolioIn} body - The payload containing the details of the unique folio to update. * @return {Observable<UniqueFolioOut>} An observable that emits the updated unique folio. */ putUniqueFolio(id: number, body: UniqueFolioIn): Observable<UniqueFolioOut>; /** * Updates a unique folio by its identifier with the provided data. * * @param {number} id - The identifier of the unique folio to update. * @param {Partial<UniqueFolioIn>} body - The partial data of the unique folio to update. * @return {Observable<UniqueFolioOut>} An observable emitting the updated unique folio data. */ pathUniqueFolio(id: number, body: Partial<UniqueFolioIn>): Observable<UniqueFolioOut>; /** * Retrieves shipment groups based on the provided query parameters. * * @param params - The query parameters to filter the shipment groups. * @returns An Observable that emits the shipment groups data. */ getShipmentGroups(params: QueryParams): Observable<ShipmentGroupsOut>; /** * Retrieves the shipment statuses from the API. * * @param params - The query parameters to filter or modify the request. * @returns An Observable that emits the shipment statuses output. */ getShipmentStatuses(params: QueryParams): Observable<ShipmentStatusesOut>; /** * Fetches questions from the catalogs API. * * Sends an HTTP GET request to `${this.url}/questions` using the supplied query parameters * and returns the unwrapped payload (`data`) from the API response. * * @param params - Query parameters to include in the request (e.g. paging, filters, sorting). * @returns An Observable that emits the QuestionsOut payload (the `data` field from ApiSuccess<QuestionsOut>). */ getQuestions(params: QueryParams): Observable<QuestionsOut>; /** * Retrieve a single question by its id. * * Sends an HTTP GET request to the questions endpoint and returns an Observable that emits * the QuestionOut payload extracted from the API success envelope. * * @param id - The numeric identifier of the question to fetch. * @returns An Observable that emits the requested QuestionOut. The Observable will error * if the HTTP request fails (for example network issues or non-2xx responses). */ getQuestion(id: number): Observable<QuestionOut>; /** * Sends a POST request to create a new question