@experteam-mx/ngx-services 18.7.16 → 18.7.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,38 @@
1
+ import { Environment } from '../ngx-services.models';
2
+ import { HttpClient } from '@angular/common/http';
3
+ import { Observable } from 'rxjs';
4
+ import { ApiBillingConfigurable, BillingConfigIn, BillingConfigOut, BillingConfigsOut } from './models/api-billing.models';
5
+ import * as i0 from "@angular/core";
6
+ export declare class ApiBillingGtService implements ApiBillingConfigurable {
7
+ private environments;
8
+ private http;
9
+ constructor(environments: Environment, http: HttpClient);
10
+ /**
11
+ * Retrieves the URL for the billing GT API from the environment configurations.
12
+ *
13
+ * @return {string} The URL of the shipments API.
14
+ */
15
+ get url(): string;
16
+ /**
17
+ * RRetrieves the list of billing configurations to locations
18
+ *
19
+ * @return {Observable<BillingConfigsOut>} An observable that emits an array of billing configurations to locations
20
+ */
21
+ getConfigs(): Observable<BillingConfigsOut>;
22
+ /**
23
+ * Retrieves the details of a location in billing configurations
24
+ *
25
+ * @param {number} id - The id of the location to fetch.
26
+ * @return {Observable<BillingConfigOut>} An observable that emits the location billing configuration data.
27
+ */
28
+ getConfig(id: number): Observable<BillingConfigOut>;
29
+ /**
30
+ * Sends a POST request to create a new billing configuration location.
31
+ *
32
+ * @param {BillingConfigIn} body - The billing configuration to location data to be sent in the request body.
33
+ * @return {Observable<BillingConfigOut>} An observable emitting the created billing configuration to location data.
34
+ */
35
+ postConfigs(body: BillingConfigIn): Observable<BillingConfigOut>;
36
+ static ɵfac: i0.ɵɵFactoryDeclaration<ApiBillingGtService, never>;
37
+ static ɵprov: i0.ɵɵInjectableDeclaration<ApiBillingGtService>;
38
+ }
@@ -0,0 +1,55 @@
1
+ import { Environment } from '../ngx-services.models';
2
+ import { HttpClient } from '@angular/common/http';
3
+ import { QueryParams } from './models/api.models';
4
+ import { Observable } from 'rxjs';
5
+ import { DepartmentsOut, EconomicActivitiesOut, EstablishmentTypesOut, MunicipalitiesOut, PersonTypesOut } from './models/api-billing-sv.types';
6
+ import * as i0 from "@angular/core";
7
+ export declare class ApiBillingSvService {
8
+ private environments;
9
+ private http;
10
+ constructor(environments: Environment, http: HttpClient);
11
+ /**
12
+ * Retrieves the URL for the billing API.
13
+ * If the URL is not defined in the environments configuration, returns an empty string.
14
+ *
15
+ * @return {string} The billing API URL or an empty string if not set.
16
+ */
17
+ get url(): string;
18
+ /**
19
+ * Fetches the list of economic activities based on the provided query parameters.
20
+ *
21
+ * @param {QueryParams} params - The query parameters used to filter the economic activities.
22
+ * @return {Observable<EconomicActivitiesOut>} An observable that emits the list of economic activities.
23
+ */
24
+ getEconomicActivities(params: QueryParams): Observable<EconomicActivitiesOut>;
25
+ /**
26
+ * Retrieves the list of person types based on given query parameters.
27
+ *
28
+ * @param {QueryParams} params - The query parameters used to filter the person types.
29
+ * @return {Observable<PersonTypesOut>} An observable that emits a list of person types.
30
+ */
31
+ getPersonTypes(params: QueryParams): Observable<PersonTypesOut>;
32
+ /**
33
+ * Fetches the list of establishment types.
34
+ *
35
+ * @param {QueryParams} params The query parameters to be sent with the HTTP request.
36
+ * @return {Observable<EstablishmentTypesOut>} An observable that emits the establishment types data.
37
+ */
38
+ getEstablishmentTypes(params: QueryParams): Observable<EstablishmentTypesOut>;
39
+ /**
40
+ * Fetches the list of departments based on the provided query parameters.
41
+ *
42
+ * @param {QueryParams} params - The query parameters to filter or modify the departments fetch request.
43
+ * @return {Observable<DepartmentsOut>} An observable emitting the list of departments.
44
+ */
45
+ getDepartments(params: QueryParams): Observable<DepartmentsOut>;
46
+ /**
47
+ * Retrieves a list of municipalities based on the provided query parameters.
48
+ *
49
+ * @param {QueryParams} params - The query parameters used to filter the municipalities.
50
+ * @return {Observable<MunicipalitiesOut>} An observable that emits the retrieved municipalities data.
51
+ */
52
+ getMunicipalities(params: QueryParams): Observable<MunicipalitiesOut>;
53
+ static ɵfac: i0.ɵɵFactoryDeclaration<ApiBillingSvService, never>;
54
+ static ɵprov: i0.ɵɵInjectableDeclaration<ApiBillingSvService>;
55
+ }
@@ -0,0 +1,22 @@
1
+ import { LaravelModel } from './api.models';
2
+ export interface PersonType extends LaravelModel {
3
+ code: string;
4
+ name: string;
5
+ }
6
+ export interface EconomicActivity extends LaravelModel {
7
+ code: string;
8
+ name: string;
9
+ }
10
+ export interface EstablishmentType extends LaravelModel {
11
+ code: string;
12
+ name: string;
13
+ }
14
+ export interface Department extends LaravelModel {
15
+ code: string;
16
+ name: string;
17
+ }
18
+ export interface Municipality extends LaravelModel {
19
+ code: string;
20
+ name: string;
21
+ department_code: string;
22
+ }
@@ -0,0 +1,21 @@
1
+ import { Department, EconomicActivity, EstablishmentType, Municipality, PersonType } from './api-billing-sv.interfaces';
2
+ export type EconomicActivitiesOut = {
3
+ economic_activities: EconomicActivity[];
4
+ total: number;
5
+ };
6
+ export type PersonTypesOut = {
7
+ person_types: PersonType[];
8
+ total: number;
9
+ };
10
+ export type EstablishmentTypesOut = {
11
+ establishment_types: EstablishmentType[];
12
+ total: number;
13
+ };
14
+ export type DepartmentsOut = {
15
+ departments: Department[];
16
+ total: number;
17
+ };
18
+ export type MunicipalitiesOut = {
19
+ municipalities: Municipality[];
20
+ total: number;
21
+ };
@@ -0,0 +1,21 @@
1
+ import { Observable } from 'rxjs';
2
+ export interface ApiBillingConfigurable {
3
+ getConfigs(): Observable<BillingConfigsOut>;
4
+ getConfig(id: number): Observable<BillingConfigOut>;
5
+ postConfigs(body: BillingConfigIn): Observable<BillingConfigOut>;
6
+ }
7
+ export type BillingConfig = {
8
+ label: string;
9
+ field: string;
10
+ is_required: boolean;
11
+ };
12
+ export type BillingConfigsOut = {
13
+ configurations: BillingConfig[];
14
+ total: number;
15
+ };
16
+ export type BillingConfigIn = {
17
+ [key: string]: string | number;
18
+ };
19
+ export type BillingConfigOut = {
20
+ [key: string]: [key: string | number][];
21
+ };
@@ -16,6 +16,7 @@ import { InjectionToken } from '@angular/core';
16
16
  */
17
17
  export type Environment = {
18
18
  apiBillingDO?: string;
19
+ apiBillingGT?: string;
19
20
  apiBillingMX?: string;
20
21
  apiBillingPA?: string;
21
22
  apiCashOperationsUrl?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@experteam-mx/ngx-services",
3
- "version": "18.7.16",
3
+ "version": "18.7.17",
4
4
  "description": "Angular common services for Experteam apps",
5
5
  "author": "Experteam Cía. Ltda.",
6
6
  "keywords": [
package/public-api.d.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  export * from './lib/ngx-services.models';
2
2
  export * from './lib/ngx-services.module';
3
3
  export * from './lib/apis/api-billing-do.service';
4
+ export * from './lib/apis/api-billing-gt.service';
4
5
  export * from './lib/apis/api-billing-mx.service';
5
6
  export * from './lib/apis/api-billing-pa.service';
6
7
  export * from './lib/apis/api-cash-operations.service';
@@ -19,6 +20,7 @@ export * from './lib/apis/api-security.service';
19
20
  export * from './lib/apis/api-services.service';
20
21
  export * from './lib/apis/api-shipments.service';
21
22
  export * from './lib/apis/api-supplies.service';
23
+ export * from './lib/apis/models/api-billing.models';
22
24
  export * from './lib/apis/models/api-billing-do.interfaces';
23
25
  export * from './lib/apis/models/api-billing-do.types';
24
26
  export * from './lib/apis/models/api-billing-mx.interfaces';