@experteam-mx/ngx-services 18.7.21 → 18.7.22

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,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
+ };
@@ -150,7 +150,7 @@ export interface CommercialInvoice extends ActiveLessSymfonyModel {
150
150
  number: string;
151
151
  remarks: string;
152
152
  items: Item[];
153
- documentType: DocumentType;
153
+ documentType: DocumentTypeComposition;
154
154
  tradingTransactionType: TradingTransactionType;
155
155
  documentFunction: DocumentFunction;
156
156
  }
@@ -188,7 +188,7 @@ export interface Commodity extends SymfonyModel {
188
188
  name: string;
189
189
  countryId: number;
190
190
  }
191
- export interface DocumentType extends SymfonyModel {
191
+ export interface DocumentTypeComposition extends SymfonyModel {
192
192
  code: string;
193
193
  name: string;
194
194
  description: string;
@@ -1,6 +1,5 @@
1
1
  import { LaravelModel, Translations } from './api.models';
2
2
  import { Currency, IdentificationType } from './api-catalog.interfaces';
3
- import { DocumentCategory } from './api-reports.interfaces';
4
3
  export interface Document extends LaravelModel {
5
4
  document_type_range_id: number;
6
5
  document_number: number;
@@ -230,3 +229,15 @@ export interface CountryDocumentType extends LaravelModel {
230
229
  document_type: DocumentType;
231
230
  document_category: DocumentCategory;
232
231
  }
232
+ export interface DocumentType extends LaravelModel {
233
+ name: string;
234
+ code: string;
235
+ movement_type: number;
236
+ local_code: string;
237
+ }
238
+ export interface DocumentCategory extends LaravelModel {
239
+ name: string;
240
+ code: string;
241
+ is_electronic: boolean;
242
+ taxable: number;
243
+ }
@@ -20,7 +20,7 @@ export interface CollectionPayment extends LaravelModel {
20
20
  document_type_id: number;
21
21
  document_type: DocumentTypeReports;
22
22
  document_category_id: number;
23
- document_category: DocumentCategory;
23
+ document_category: DocumentCategoryReports;
24
24
  receipt_number: string;
25
25
  customer_name: string;
26
26
  account: string;
@@ -38,7 +38,7 @@ export interface DocumentTypeReports extends LaravelModel {
38
38
  local_code: string;
39
39
  translations: Translations;
40
40
  }
41
- export interface DocumentCategory extends LaravelModel {
41
+ export interface DocumentCategoryReports extends LaravelModel {
42
42
  _id: number;
43
43
  name: string;
44
44
  is_electronic: true;
@@ -19,6 +19,7 @@ export type Environment = {
19
19
  apiBillingGT?: string;
20
20
  apiBillingMX?: string;
21
21
  apiBillingPA?: string;
22
+ apiBillingSV?: string;
22
23
  apiCashOperationsUrl?: string;
23
24
  apiCatalogsUrl?: string;
24
25
  apiCompaniesUrl?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@experteam-mx/ngx-services",
3
- "version": "18.7.21",
3
+ "version": "18.7.22",
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
@@ -4,6 +4,7 @@ export * from './lib/apis/api-billing-do.service';
4
4
  export * from './lib/apis/api-billing-gt.service';
5
5
  export * from './lib/apis/api-billing-mx.service';
6
6
  export * from './lib/apis/api-billing-pa.service';
7
+ export * from './lib/apis/api-billing-sv.service';
7
8
  export * from './lib/apis/api-cash-operations.service';
8
9
  export * from './lib/apis/api-catalogs.service';
9
10
  export * from './lib/apis/api-companies.service';
@@ -27,6 +28,8 @@ export * from './lib/apis/models/api-billing-mx.interfaces';
27
28
  export * from './lib/apis/models/api-billing-mx.types';
28
29
  export * from './lib/apis/models/api-billing-pa.interfaces';
29
30
  export * from './lib/apis/models/api-billing-pa.types';
31
+ export * from './lib/apis/models/api-billing-sv.interfaces';
32
+ export * from './lib/apis/models/api-billing-sv.types';
30
33
  export * from './lib/apis/models/api-cash-operations.interfaces';
31
34
  export * from './lib/apis/models/api-cash-operations.types';
32
35
  export * from './lib/apis/models/api-catalog.interfaces';