visorus-erp-core 10.0.1 → 10.1.0

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.
Files changed (79) hide show
  1. package/bundles/visorus-erp-core.umd.js +802 -389
  2. package/bundles/visorus-erp-core.umd.js.map +1 -1
  3. package/bundles/visorus-erp-core.umd.min.js +1 -1
  4. package/bundles/visorus-erp-core.umd.min.js.map +1 -1
  5. package/esm2015/lib/components/acreedor/services/acreedor.service.js +24 -10
  6. package/esm2015/lib/components/acreedor/services/acreedorCuentaContable.js +10 -12
  7. package/esm2015/lib/components/agente/services/agente.service.js +24 -16
  8. package/esm2015/lib/components/almacen/services/almacen.service.js +25 -12
  9. package/esm2015/lib/components/banco/services/banco.service.js +24 -9
  10. package/esm2015/lib/components/caja/sessionCaja.service.js +24 -10
  11. package/esm2015/lib/components/catalogoTipo/services/catalogoTipo.service.js +24 -9
  12. package/esm2015/lib/components/clasificadorTipo/services/clasificadorTipo.service.js +24 -9
  13. package/esm2015/lib/components/claveAumentoDisminucion/services/clave-aumento-disminucion.service.js +24 -9
  14. package/esm2015/lib/components/claveMovimiento/services/claveMovimiento.service.js +24 -9
  15. package/esm2015/lib/components/cliente/services/cliente.service.js +25 -10
  16. package/esm2015/lib/components/cliente/services/clienteCuentaBanco.service.js +25 -11
  17. package/esm2015/lib/components/cliente/services/clienteFlete.service.js +25 -11
  18. package/esm2015/lib/components/contacto/services/datoContacto.service.js +24 -9
  19. package/esm2015/lib/components/dato-direccion/services/datoDireccion.service.js +24 -9
  20. package/esm2015/lib/components/departamento/services/departamento.service.js +24 -9
  21. package/esm2015/lib/components/empresa/services/empresa.service.js +25 -12
  22. package/esm2015/lib/components/flete/services/flete.service.js +24 -10
  23. package/esm2015/lib/components/formaPago/services/FormaPago.service.js +24 -9
  24. package/esm2015/lib/components/moneda/services/moneda.service.js +24 -10
  25. package/esm2015/lib/components/persona-fisica/services/personaFisica.service.js +11 -12
  26. package/esm2015/lib/components/proveedor/services/proveedor.service.js +24 -10
  27. package/esm2015/lib/components/proveedor/services/proveedorCuentaBanco.service.js +25 -11
  28. package/esm2015/lib/components/proveedor/services/proveedorFlete.service.js +21 -10
  29. package/esm2015/lib/components/seleccion-articulo-informacion/services/articulo-informacion.service.js +25 -11
  30. package/esm2015/lib/components/selecciona-articulo/stock.service.js +14 -12
  31. package/esm2015/lib/components/serieDocumento/services/serieDocumento.service.js +23 -12
  32. package/esm2015/lib/components/tipo-contacto/services/tipoContacto.service.js +24 -9
  33. package/esm2015/lib/components/ubicacion/services/ubicacion.service.js +24 -9
  34. package/esm2015/lib/contabilidad/servicios/cuentacontable.service.js +25 -11
  35. package/esm2015/lib/services/api.service.js +69 -0
  36. package/esm2015/lib/services/catalogo-adicional.service.js +24 -10
  37. package/esm2015/lib/services/global.service.js +13 -2
  38. package/esm2015/lib/services/personaMoral.service.js +24 -9
  39. package/esm2015/public_api.js +3 -3
  40. package/fesm2015/visorus-erp-core.js +703 -242
  41. package/fesm2015/visorus-erp-core.js.map +1 -1
  42. package/lib/components/acreedor/services/acreedor.service.d.ts +12 -5
  43. package/lib/components/acreedor/services/acreedorCuentaContable.d.ts +6 -6
  44. package/lib/components/agente/services/agente.service.d.ts +14 -8
  45. package/lib/components/almacen/services/almacen.service.d.ts +13 -6
  46. package/lib/components/banco/services/banco.service.d.ts +12 -4
  47. package/lib/components/caja/sessionCaja.service.d.ts +11 -5
  48. package/lib/components/catalogoTipo/services/catalogoTipo.service.d.ts +12 -4
  49. package/lib/components/clasificadorTipo/services/clasificadorTipo.service.d.ts +12 -4
  50. package/lib/components/claveAumentoDisminucion/services/clave-aumento-disminucion.service.d.ts +11 -4
  51. package/lib/components/claveMovimiento/services/claveMovimiento.service.d.ts +12 -4
  52. package/lib/components/cliente/services/cliente.service.d.ts +13 -5
  53. package/lib/components/cliente/services/clienteCuentaBanco.service.d.ts +13 -6
  54. package/lib/components/cliente/services/clienteFlete.service.d.ts +12 -6
  55. package/lib/components/contacto/services/datoContacto.service.d.ts +11 -4
  56. package/lib/components/dato-direccion/services/datoDireccion.service.d.ts +11 -4
  57. package/lib/components/departamento/services/departamento.service.d.ts +11 -4
  58. package/lib/components/empresa/services/empresa.service.d.ts +12 -6
  59. package/lib/components/flete/services/flete.service.d.ts +11 -5
  60. package/lib/components/formaPago/services/FormaPago.service.d.ts +12 -4
  61. package/lib/components/moneda/services/moneda.service.d.ts +11 -5
  62. package/lib/components/persona-fisica/services/personaFisica.service.d.ts +8 -7
  63. package/lib/components/proveedor/services/proveedor.service.d.ts +11 -5
  64. package/lib/components/proveedor/services/proveedorCuentaBanco.service.d.ts +12 -6
  65. package/lib/components/proveedor/services/proveedorFlete.service.d.ts +11 -6
  66. package/lib/components/seleccion-articulo-informacion/services/articulo-informacion.service.d.ts +12 -6
  67. package/lib/components/selecciona-articulo/stock.service.d.ts +7 -5
  68. package/lib/components/serieDocumento/services/serieDocumento.service.d.ts +12 -7
  69. package/lib/components/tipo-contacto/services/tipoContacto.service.d.ts +11 -4
  70. package/lib/components/ubicacion/services/ubicacion.service.d.ts +11 -4
  71. package/lib/contabilidad/servicios/cuentacontable.service.d.ts +12 -6
  72. package/lib/services/api.service.d.ts +38 -0
  73. package/lib/services/catalogo-adicional.service.d.ts +11 -5
  74. package/lib/services/global.service.d.ts +4 -2
  75. package/lib/services/personaMoral.service.d.ts +11 -4
  76. package/package.json +1 -1
  77. package/public_api.d.ts +2 -2
  78. package/esm2015/lib/services/crud.service.js +0 -46
  79. package/lib/services/crud.service.d.ts +0 -20
@@ -1,5 +1,5 @@
1
+ import { HttpHeaders, HttpClient, HttpParams, HTTP_INTERCEPTORS } from '@angular/common/http';
1
2
  import { ɵɵinject, ɵɵdefineInjectable, ɵsetClassMetadata, Injectable, ɵɵelementStart, ɵɵtext, ɵɵelementEnd, ɵɵgetCurrentView, ɵɵlistener, ɵɵrestoreView, ɵɵnextContext, ɵɵelement, ɵɵtemplate, ɵɵadvance, ɵɵproperty, ɵɵtextInterpolate1, EventEmitter, ɵɵdirectiveInject, ɵɵdefineComponent, ɵɵstyleMap, ɵɵpureFunction0, Component, Input, Output, ɵɵstaticViewQuery, ɵɵqueryRefresh, ɵɵloadQuery, ɵɵpureFunction1, ViewChild, ɵɵpipe, ɵɵpropertyInterpolate, ɵɵsanitizeUrl, ɵɵpipeBind1, ElementRef, ChangeDetectorRef, ɵɵsanitizeResourceUrl, ɵɵtextInterpolate, ɵɵreference, ɵɵpropertyInterpolate1, ɵɵstyleProp, ɵɵresolveWindow, ɵɵpipeBind2, ɵɵattribute, ɵɵdefineNgModule, ɵɵdefineInjector, ɵɵsetNgModuleScope, NgModule } from '@angular/core';
2
- import { HttpHeaders, HttpClient, HTTP_INTERCEPTORS } from '@angular/common/http';
3
3
  import { DefaultValueAccessor, NgControlStatus, NgModel, ɵangular_packages_forms_forms_y, NgControlStatusGroup, NgForm, RequiredValidator, NumberValueAccessor, SelectControlValueAccessor, NgSelectOption, ɵangular_packages_forms_forms_x, FormsModule } from '@angular/forms';
4
4
  import { InputText, InputTextModule } from 'primeng/inputtext';
5
5
  import { TreeTable, TreeTableToggler, TreeTableModule } from 'primeng/treetable';
@@ -42,7 +42,6 @@ import { SplitButtonModule } from 'primeng/splitbutton';
42
42
  import { ToolbarModule } from 'primeng/toolbar';
43
43
  import { TranslateHttpLoader } from '@ngx-translate/http-loader';
44
44
  import { Router } from '@angular/router';
45
- import { CrudService as CrudService$1 } from 'projects/erp-core/src/public_api';
46
45
 
47
46
  class GlobalService {
48
47
  constructor(http) {
@@ -96,69 +95,110 @@ class GlobalService {
96
95
  return this.http.post(this.getUrl() + '/usuario/setModulo', modulo, this.buildAuth());
97
96
  }
98
97
  }
98
+ /** @nocollapse */ GlobalService.ɵfac = function GlobalService_Factory(t) { return new (t || GlobalService)(ɵɵinject(HttpClient)); };
99
+ /** @nocollapse */ GlobalService.ɵprov = ɵɵdefineInjectable({ token: GlobalService, factory: GlobalService.ɵfac, providedIn: 'root' });
100
+ /*@__PURE__*/ (function () { ɵsetClassMetadata(GlobalService, [{
101
+ type: Injectable,
102
+ args: [{
103
+ providedIn: 'root'
104
+ }]
105
+ }], function () { return [{ type: HttpClient }]; }, null); })();
99
106
 
100
- class CrudService extends GlobalService {
101
- constructor(httpCliente, url) {
102
- super(httpCliente);
103
- this.httpCliente = httpCliente;
104
- this.url = url;
105
- this.urlComponente = this.url;
106
- }
107
- //Functions for ResourcesCrud [{ param: "max", value: 10}]
108
- serializeParams(params) {
109
- let serializeString = '';
110
- params.map((e, index) => {
111
- if (e.value !== undefined)
112
- serializeString += ((index == 0) ? '?' : '&') + e.param + '=' + e.value;
113
- });
114
- return serializeString;
115
- }
116
- getHttp() {
117
- return this.httpCliente;
118
- }
119
- geturl() {
120
- return this.getUrl(this.urlComponente);
121
- }
122
- getBaseUrl() {
123
- return this.getUrl('');
107
+ // projects/erp-core/src/lib/services/api.service.ts
108
+ class ApiService {
109
+ constructor(http,
110
+ // Inyectamos GlobalService para usar sus métodos de ayuda (construir URL y cabeceras)
111
+ global) {
112
+ this.http = http;
113
+ this.global = global;
114
+ }
115
+ /**
116
+ * Realiza una petición GET genérica y autenticada usando HttpParams.
117
+ * @param endpoint El endpoint del API (ej. '/FormaDePago')
118
+ * @param queryParams Un objeto clave-valor para los parámetros de la URL.
119
+ */
120
+ get(endpoint, queryParams) {
121
+ // 1. Construye HttpParams de forma segura. Se encarga del URL encoding.
122
+ const params = new HttpParams({ fromObject: queryParams });
123
+ // 2. Combina las opciones: cabeceras de GlobalService y los nuevos params.
124
+ const options = Object.assign(Object.assign({}, this.global.buildAuth()), { params: params // Añade los HttpParams
125
+ });
126
+ const url = this.global.getUrl(endpoint);
127
+ return this.http.get(url, options);
128
+ }
129
+ /**
130
+ * Realiza una petición POST genérica y autenticada.
131
+ * @param endpoint El endpoint del API
132
+ * @param body El cuerpo de la petición
133
+ */
134
+ post(endpoint, body) {
135
+ const url = this.global.getUrl(endpoint);
136
+ const options = this.global.buildAuth();
137
+ return this.http.post(url, body, options);
138
+ }
139
+ /**
140
+ * Realiza una petición PUT genérica y autenticada.
141
+ * @param endpoint El endpoint del API
142
+ * @param id El ID del recurso a actualizar
143
+ * @param body El cuerpo de la petición
144
+ */
145
+ put(endpoint, id, body) {
146
+ const url = `<span class="math-inline">\{this\.global\.getUrl\(endpoint\)\}/</span>{id}`;
147
+ const options = this.global.buildAuth();
148
+ return this.http.put(url, body, options);
149
+ }
150
+ /**
151
+ * Realiza una petición DELETE genérica y autenticada.
152
+ * @param endpoint El endpoint del API
153
+ * @param id El ID del recurso a eliminar
154
+ */
155
+ delete(endpoint, id) {
156
+ const url = `<span class="math-inline">\{this\.global\.getUrl\(endpoint\)\}/</span>{id}`;
157
+ const options = this.global.buildAuth();
158
+ return this.http.delete(url, options);
124
159
  }
125
- getByUrl(url, params) {
126
- return this.httpCliente.get(this.getUrl(url) + this.serializeParams(params), this.buildAuth());
160
+ }
161
+ /** @nocollapse */ ApiService.ɵfac = function ApiService_Factory(t) { return new (t || ApiService)(ɵɵinject(HttpClient), ɵɵinject(GlobalService)); };
162
+ /** @nocollapse */ ApiService.ɵprov = ɵɵdefineInjectable({ token: ApiService, factory: ApiService.ɵfac, providedIn: 'root' });
163
+ /*@__PURE__*/ (function () { ɵsetClassMetadata(ApiService, [{
164
+ type: Injectable,
165
+ args: [{
166
+ providedIn: 'root'
167
+ }]
168
+ }], function () { return [{ type: HttpClient }, { type: GlobalService }]; }, null); })();
169
+
170
+ class CuentaContableService {
171
+ constructor(api) {
172
+ this.api = api;
173
+ this.endpoint = 'cuentaContable';
127
174
  }
128
175
  getAll(params) {
129
- return this.httpCliente.get(this.getUrl(this.urlComponente) + (params ? (this.serializeParams(params)) : ('')), this.buildAuth());
176
+ return this.api.get(this.endpoint, params);
177
+ }
178
+ obtieneCuentasContablesRecursivo() {
179
+ return this.api.get(`${this.endpoint}/obtieneCuentasContablesRecursivo`);
130
180
  }
131
181
  get(id) {
132
- return this.httpCliente.get(this.getUrl(this.urlComponente) + '/' + id, this.buildAuth());
182
+ return this.api.get(`${this.endpoint}/${id}`);
133
183
  }
134
184
  save(obj) {
135
- return this.httpCliente.post(this.getUrl(this.urlComponente), obj, this.buildAuth());
185
+ return this.api.post(this.endpoint, obj);
136
186
  }
137
187
  update(obj) {
138
- return this.httpCliente.put(this.getUrl(this.urlComponente) + '/' + obj.id, obj, this.buildAuth());
188
+ return this.api.put(this.endpoint, obj.id, obj);
139
189
  }
140
190
  delete(id) {
141
- return this.httpCliente.delete(this.getUrl(this.urlComponente) + '/' + id, this.buildAuth());
142
- }
143
- }
144
-
145
- class CuentaContableService extends CrudService {
146
- constructor(httpClient) {
147
- super(httpClient, 'cuentaContable');
148
- this.httpClient = httpClient;
149
- }
150
- obtieneCuentasContablesRecursivo() {
151
- return this.httpClient.get(this.getUrl('cuentaContable') + '/obtieneCuentasContablesRecursivo', this.buildAuth());
191
+ return this.api.delete(this.endpoint, id);
152
192
  }
153
193
  }
154
- /** @nocollapse */ CuentaContableService.ɵfac = function CuentaContableService_Factory(t) { return new (t || CuentaContableService)(ɵɵinject(HttpClient)); };
194
+ /** @nocollapse */ CuentaContableService.ɵfac = function CuentaContableService_Factory(t) { return new (t || CuentaContableService)(ɵɵinject(ApiService)); };
155
195
  /** @nocollapse */ CuentaContableService.ɵprov = ɵɵdefineInjectable({ token: CuentaContableService, factory: CuentaContableService.ɵfac, providedIn: 'root' });
156
196
  /*@__PURE__*/ (function () { ɵsetClassMetadata(CuentaContableService, [{
157
197
  type: Injectable,
158
198
  args: [{
159
199
  providedIn: 'root'
160
200
  }]
161
- }], function () { return [{ type: HttpClient }]; }, null); })();
201
+ }], function () { return [{ type: ApiService }]; }, null); })();
162
202
 
163
203
  function CclistaComponent_ng_template_3_Template(rf, ctx) { if (rf & 1) {
164
204
  ɵɵelementStart(0, "tr");
@@ -1353,20 +1393,35 @@ class LoginModalComponent {
1353
1393
  }]
1354
1394
  }], function () { return [{ type: LoginModalService }, { type: AuthService }]; }, null); })();
1355
1395
 
1356
- class SessionCajaService extends CrudService {
1357
- constructor(httpClient) {
1358
- super(httpClient, 'sessionCaja');
1359
- this.httpClient = httpClient;
1396
+ class SessionCajaService {
1397
+ constructor(api) {
1398
+ this.api = api;
1399
+ this.endpoint = 'sessionCaja';
1400
+ }
1401
+ getAll(params) {
1402
+ return this.api.get(this.endpoint, params);
1403
+ }
1404
+ get(id) {
1405
+ return this.api.get(`${this.endpoint}/${id}`);
1406
+ }
1407
+ save(obj) {
1408
+ return this.api.post(this.endpoint, obj);
1409
+ }
1410
+ update(obj) {
1411
+ return this.api.put(this.endpoint, obj.id, obj);
1412
+ }
1413
+ delete(id) {
1414
+ return this.api.delete(this.endpoint, id);
1360
1415
  }
1361
1416
  }
1362
- /** @nocollapse */ SessionCajaService.ɵfac = function SessionCajaService_Factory(t) { return new (t || SessionCajaService)(ɵɵinject(HttpClient)); };
1417
+ /** @nocollapse */ SessionCajaService.ɵfac = function SessionCajaService_Factory(t) { return new (t || SessionCajaService)(ɵɵinject(ApiService)); };
1363
1418
  /** @nocollapse */ SessionCajaService.ɵprov = ɵɵdefineInjectable({ token: SessionCajaService, factory: SessionCajaService.ɵfac, providedIn: 'root' });
1364
1419
  /*@__PURE__*/ (function () { ɵsetClassMetadata(SessionCajaService, [{
1365
1420
  type: Injectable,
1366
1421
  args: [{
1367
1422
  providedIn: 'root'
1368
1423
  }]
1369
- }], function () { return [{ type: HttpClient }]; }, null); })();
1424
+ }], function () { return [{ type: ApiService }]; }, null); })();
1370
1425
 
1371
1426
  function SessionCreateComponent_ng_template_1_Template(rf, ctx) { if (rf & 1) {
1372
1427
  ɵɵelementStart(0, "a", 4);
@@ -1590,22 +1645,38 @@ class Cliente {
1590
1645
  }
1591
1646
  }
1592
1647
 
1593
- class ClienteService extends CrudService {
1594
- constructor(httpCliente) {
1595
- super(httpCliente, '/cliente');
1648
+ class ClienteService {
1649
+ constructor(api) {
1650
+ this.api = api;
1651
+ this.endpoint = 'cliente';
1652
+ }
1653
+ getAll(params) {
1654
+ return this.api.get(this.endpoint, params);
1655
+ }
1656
+ get(id) {
1657
+ return this.api.get(`${this.endpoint}/${id}`);
1658
+ }
1659
+ save(obj) {
1660
+ return this.api.post(this.endpoint, obj);
1661
+ }
1662
+ update(obj) {
1663
+ return this.api.put(this.endpoint, obj.id, obj);
1664
+ }
1665
+ delete(id) {
1666
+ return this.api.delete(this.endpoint, id);
1596
1667
  }
1597
1668
  validar_archivos_bss(id) {
1598
- return this.getHttp().get(this.getUrl('/cliente/validarClienteBss/') + id, this.buildAuth());
1669
+ return this.api.get(`${this.endpoint}/validarClienteBss/${id}`);
1599
1670
  }
1600
1671
  }
1601
- /** @nocollapse */ ClienteService.ɵfac = function ClienteService_Factory(t) { return new (t || ClienteService)(ɵɵinject(HttpClient)); };
1672
+ /** @nocollapse */ ClienteService.ɵfac = function ClienteService_Factory(t) { return new (t || ClienteService)(ɵɵinject(ApiService)); };
1602
1673
  /** @nocollapse */ ClienteService.ɵprov = ɵɵdefineInjectable({ token: ClienteService, factory: ClienteService.ɵfac, providedIn: 'root' });
1603
1674
  /*@__PURE__*/ (function () { ɵsetClassMetadata(ClienteService, [{
1604
1675
  type: Injectable,
1605
1676
  args: [{
1606
1677
  providedIn: 'root'
1607
1678
  }]
1608
- }], function () { return [{ type: HttpClient }]; }, null); })();
1679
+ }], function () { return [{ type: ApiService }]; }, null); })();
1609
1680
 
1610
1681
  class PaginateService {
1611
1682
  constructor(translate) {
@@ -1886,20 +1957,35 @@ class Proveedor {
1886
1957
  }
1887
1958
  }
1888
1959
 
1889
- class ProveedorService extends CrudService {
1890
- constructor(httpClient) {
1891
- super(httpClient, '/proveedor');
1892
- this.httpClient = httpClient;
1960
+ class ProveedorService {
1961
+ constructor(api) {
1962
+ this.api = api;
1963
+ this.endpoint = 'proveedor';
1964
+ }
1965
+ getAll(params) {
1966
+ return this.api.get(this.endpoint, params);
1967
+ }
1968
+ get(id) {
1969
+ return this.api.get(`${this.endpoint}/${id}`);
1970
+ }
1971
+ save(obj) {
1972
+ return this.api.post(this.endpoint, obj);
1973
+ }
1974
+ update(obj) {
1975
+ return this.api.put(this.endpoint, obj.id, obj);
1976
+ }
1977
+ delete(id) {
1978
+ return this.api.delete(this.endpoint, id);
1893
1979
  }
1894
1980
  }
1895
- /** @nocollapse */ ProveedorService.ɵfac = function ProveedorService_Factory(t) { return new (t || ProveedorService)(ɵɵinject(HttpClient)); };
1981
+ /** @nocollapse */ ProveedorService.ɵfac = function ProveedorService_Factory(t) { return new (t || ProveedorService)(ɵɵinject(ApiService)); };
1896
1982
  /** @nocollapse */ ProveedorService.ɵprov = ɵɵdefineInjectable({ token: ProveedorService, factory: ProveedorService.ɵfac, providedIn: 'root' });
1897
1983
  /*@__PURE__*/ (function () { ɵsetClassMetadata(ProveedorService, [{
1898
1984
  type: Injectable,
1899
1985
  args: [{
1900
1986
  providedIn: 'root'
1901
1987
  }]
1902
- }], function () { return [{ type: HttpClient }]; }, null); })();
1988
+ }], function () { return [{ type: ApiService }]; }, null); })();
1903
1989
 
1904
1990
  function SelectProveedorComponent_ng_template_7_Template(rf, ctx) { if (rf & 1) {
1905
1991
  ɵɵelementStart(0, "tr");
@@ -2033,34 +2119,51 @@ class SelectProveedorComponent {
2033
2119
  type: Output
2034
2120
  }] }); })();
2035
2121
 
2036
- class AlmacenService extends CrudService {
2037
- constructor(httpClient) {
2038
- super(httpClient, '/almacen');
2039
- this.httpClient = httpClient;
2122
+ class AlmacenService {
2123
+ constructor(api) {
2124
+ this.api = api;
2125
+ this.endpoint = 'almacen';
2126
+ }
2127
+ getAll(params) {
2128
+ return this.api.get(this.endpoint, params);
2040
2129
  }
2041
2130
  obtenerAlmacenEmpresa() {
2042
- let url = this.geturl() + '/obtenerAlmacenEmpresa';
2043
- return this.getHttp().get(url, this.buildAuth());
2131
+ return this.api.get(`${this.endpoint}/obtenerAlmacenEmpresa`);
2132
+ }
2133
+ get(id) {
2134
+ return this.api.get(`${this.endpoint}/${id}`);
2135
+ }
2136
+ save(obj) {
2137
+ return this.api.post(this.endpoint, obj);
2138
+ }
2139
+ update(obj) {
2140
+ return this.api.put(this.endpoint, obj.id, obj);
2141
+ }
2142
+ delete(id) {
2143
+ return this.api.delete(this.endpoint, id);
2044
2144
  }
2045
2145
  }
2046
- /** @nocollapse */ AlmacenService.ɵfac = function AlmacenService_Factory(t) { return new (t || AlmacenService)(ɵɵinject(HttpClient)); };
2146
+ /** @nocollapse */ AlmacenService.ɵfac = function AlmacenService_Factory(t) { return new (t || AlmacenService)(ɵɵinject(ApiService)); };
2047
2147
  /** @nocollapse */ AlmacenService.ɵprov = ɵɵdefineInjectable({ token: AlmacenService, factory: AlmacenService.ɵfac, providedIn: 'root' });
2048
2148
  /*@__PURE__*/ (function () { ɵsetClassMetadata(AlmacenService, [{
2049
2149
  type: Injectable,
2050
2150
  args: [{
2051
2151
  providedIn: 'root'
2052
2152
  }]
2053
- }], function () { return [{ type: HttpClient }]; }, null); })();
2153
+ }], function () { return [{ type: ApiService }]; }, null); })();
2054
2154
 
2055
- class StockService extends CrudService {
2056
- constructor(httpClient) {
2057
- super(httpClient, 'stock');
2058
- this.httpClient = httpClient;
2155
+ class StockService {
2156
+ constructor(api) {
2157
+ this.api = api;
2158
+ this.endpoint = 'stock';
2159
+ }
2160
+ getAll(params) {
2161
+ return this.api.get(this.endpoint, params);
2059
2162
  }
2060
2163
  obtenerExistenciasArticulosDescripcion(parametros, params) {
2061
- const url = this.getBaseUrl() + '/stock/obtenerExistenciasArticulos';
2164
+ const url = `${this.endpoint}/obtenerExistenciasArticulos`;
2062
2165
  let promesa = new Promise((resolve, reject) => {
2063
- this.httpClient.post(url + this.serializeParams(params), parametros, this.buildAuth()).subscribe((data) => {
2166
+ this.api.post(url, parametros).subscribe((data) => {
2064
2167
  resolve(data);
2065
2168
  }, (err) => {
2066
2169
  reject(err);
@@ -2069,33 +2172,48 @@ class StockService extends CrudService {
2069
2172
  return promesa;
2070
2173
  }
2071
2174
  }
2072
- /** @nocollapse */ StockService.ɵfac = function StockService_Factory(t) { return new (t || StockService)(ɵɵinject(HttpClient)); };
2175
+ /** @nocollapse */ StockService.ɵfac = function StockService_Factory(t) { return new (t || StockService)(ɵɵinject(ApiService)); };
2073
2176
  /** @nocollapse */ StockService.ɵprov = ɵɵdefineInjectable({ token: StockService, factory: StockService.ɵfac, providedIn: 'root' });
2074
2177
  /*@__PURE__*/ (function () { ɵsetClassMetadata(StockService, [{
2075
2178
  type: Injectable,
2076
2179
  args: [{
2077
2180
  providedIn: 'root'
2078
2181
  }]
2079
- }], function () { return [{ type: HttpClient }]; }, null); })();
2182
+ }], function () { return [{ type: ApiService }]; }, null); })();
2080
2183
 
2081
- class ArticuloInformacionService extends CrudService {
2082
- constructor(httpClient) {
2083
- super(httpClient, 'articulo');
2084
- this.httpClient = httpClient;
2184
+ class ArticuloInformacionService {
2185
+ constructor(api) {
2186
+ this.api = api;
2187
+ this.endpoint = 'articulo';
2188
+ }
2189
+ getAll(params) {
2190
+ return this.api.get(this.endpoint, params);
2085
2191
  }
2086
2192
  obtenerExistencias(articulo) {
2087
2193
  let uRL = "/existenciasArticulo/" + articulo;
2088
- return this.httpClient.get(this.geturl() + uRL, this.buildAuth());
2194
+ return this.api.get(`${this.endpoint}${uRL}`);
2195
+ }
2196
+ get(id) {
2197
+ return this.api.get(`${this.endpoint}/${id}`);
2198
+ }
2199
+ save(obj) {
2200
+ return this.api.post(this.endpoint, obj);
2201
+ }
2202
+ update(obj) {
2203
+ return this.api.put(this.endpoint, obj.id, obj);
2204
+ }
2205
+ delete(id) {
2206
+ return this.api.delete(this.endpoint, id);
2089
2207
  }
2090
2208
  }
2091
- /** @nocollapse */ ArticuloInformacionService.ɵfac = function ArticuloInformacionService_Factory(t) { return new (t || ArticuloInformacionService)(ɵɵinject(HttpClient)); };
2209
+ /** @nocollapse */ ArticuloInformacionService.ɵfac = function ArticuloInformacionService_Factory(t) { return new (t || ArticuloInformacionService)(ɵɵinject(ApiService)); };
2092
2210
  /** @nocollapse */ ArticuloInformacionService.ɵprov = ɵɵdefineInjectable({ token: ArticuloInformacionService, factory: ArticuloInformacionService.ɵfac, providedIn: 'root' });
2093
2211
  /*@__PURE__*/ (function () { ɵsetClassMetadata(ArticuloInformacionService, [{
2094
2212
  type: Injectable,
2095
2213
  args: [{
2096
2214
  providedIn: 'root'
2097
2215
  }]
2098
- }], function () { return [{ type: HttpClient }]; }, null); })();
2216
+ }], function () { return [{ type: ApiService }]; }, null); })();
2099
2217
 
2100
2218
  function SeleccionArticuloInformacionComponent_ng_template_2_col_1_Template(rf, ctx) { if (rf & 1) {
2101
2219
  ɵɵelement(0, "col");
@@ -2746,20 +2864,35 @@ class SeleccionaArticuloComponent {
2746
2864
  type: Output
2747
2865
  }] }); })();
2748
2866
 
2749
- class AcreedorService extends CrudService {
2750
- constructor(httpClient) {
2751
- super(httpClient, 'acreedor');
2752
- this.httpClient = httpClient;
2867
+ class AcreedorService {
2868
+ constructor(api) {
2869
+ this.api = api;
2870
+ this.endpoint = 'acreedor';
2871
+ }
2872
+ getAll(params) {
2873
+ return this.api.get(this.endpoint, params);
2874
+ }
2875
+ get(id) {
2876
+ return this.api.get(`${this.endpoint}/${id}`);
2877
+ }
2878
+ save(obj) {
2879
+ return this.api.post(this.endpoint, obj);
2880
+ }
2881
+ update(obj) {
2882
+ return this.api.put(this.endpoint, obj.id, obj);
2883
+ }
2884
+ delete(id) {
2885
+ return this.api.delete(this.endpoint, id);
2753
2886
  }
2754
2887
  }
2755
- /** @nocollapse */ AcreedorService.ɵfac = function AcreedorService_Factory(t) { return new (t || AcreedorService)(ɵɵinject(HttpClient)); };
2888
+ /** @nocollapse */ AcreedorService.ɵfac = function AcreedorService_Factory(t) { return new (t || AcreedorService)(ɵɵinject(ApiService)); };
2756
2889
  /** @nocollapse */ AcreedorService.ɵprov = ɵɵdefineInjectable({ token: AcreedorService, factory: AcreedorService.ɵfac, providedIn: 'root' });
2757
2890
  /*@__PURE__*/ (function () { ɵsetClassMetadata(AcreedorService, [{
2758
2891
  type: Injectable,
2759
2892
  args: [{
2760
2893
  providedIn: 'root'
2761
2894
  }]
2762
- }], function () { return [{ type: HttpClient }]; }, null); })();
2895
+ }], function () { return [{ type: ApiService }]; }, null); })();
2763
2896
 
2764
2897
  function SelectAcreedorComponent_ng_template_6_Template(rf, ctx) { if (rf & 1) {
2765
2898
  ɵɵelementStart(0, "tr");
@@ -3223,19 +3356,35 @@ class MessageService {
3223
3356
  }]
3224
3357
  }], function () { return [{ type: ToastrService }]; }, null); })();
3225
3358
 
3226
- class PersonaMoralService extends CrudService {
3227
- constructor(http) {
3228
- super(http, '/personaMoral');
3359
+ class PersonaMoralService {
3360
+ constructor(api) {
3361
+ this.api = api;
3362
+ this.endpoint = 'personaMoral';
3363
+ }
3364
+ getAll(params) {
3365
+ return this.api.get(this.endpoint, params);
3366
+ }
3367
+ get(id) {
3368
+ return this.api.get(`${this.endpoint}/${id}`);
3369
+ }
3370
+ save(obj) {
3371
+ return this.api.post(this.endpoint, obj);
3372
+ }
3373
+ update(obj) {
3374
+ return this.api.put(this.endpoint, obj.id, obj);
3375
+ }
3376
+ delete(id) {
3377
+ return this.api.delete(this.endpoint, id);
3229
3378
  }
3230
3379
  }
3231
- /** @nocollapse */ PersonaMoralService.ɵfac = function PersonaMoralService_Factory(t) { return new (t || PersonaMoralService)(ɵɵinject(HttpClient)); };
3380
+ /** @nocollapse */ PersonaMoralService.ɵfac = function PersonaMoralService_Factory(t) { return new (t || PersonaMoralService)(ɵɵinject(ApiService)); };
3232
3381
  /** @nocollapse */ PersonaMoralService.ɵprov = ɵɵdefineInjectable({ token: PersonaMoralService, factory: PersonaMoralService.ɵfac, providedIn: 'root' });
3233
3382
  /*@__PURE__*/ (function () { ɵsetClassMetadata(PersonaMoralService, [{
3234
3383
  type: Injectable,
3235
3384
  args: [{
3236
3385
  providedIn: 'root'
3237
3386
  }]
3238
- }], function () { return [{ type: HttpClient }]; }, null); })();
3387
+ }], function () { return [{ type: ApiService }]; }, null); })();
3239
3388
 
3240
3389
  class CanActivateGuard {
3241
3390
  constructor(controlAccesoService) {
@@ -3259,20 +3408,35 @@ class CanActivateGuard {
3259
3408
  }]
3260
3409
  }], function () { return [{ type: ControlAccesoService }]; }, null); })();
3261
3410
 
3262
- class CatalogoAdicionalService extends CrudService {
3263
- constructor(httpClient) {
3264
- super(httpClient, 'catalogoAdicional');
3265
- this.httpClient = httpClient;
3411
+ class CatalogoAdicionalService {
3412
+ constructor(api) {
3413
+ this.api = api;
3414
+ this.endpoint = 'catalogoAdicional';
3415
+ }
3416
+ getAll(params) {
3417
+ return this.api.get(this.endpoint, params);
3418
+ }
3419
+ get(id) {
3420
+ return this.api.get(`${this.endpoint}/${id}`);
3421
+ }
3422
+ save(obj) {
3423
+ return this.api.post(this.endpoint, obj);
3424
+ }
3425
+ update(obj) {
3426
+ return this.api.put(this.endpoint, obj.id, obj);
3427
+ }
3428
+ delete(id) {
3429
+ return this.api.delete(this.endpoint, id);
3266
3430
  }
3267
3431
  }
3268
- /** @nocollapse */ CatalogoAdicionalService.ɵfac = function CatalogoAdicionalService_Factory(t) { return new (t || CatalogoAdicionalService)(ɵɵinject(HttpClient)); };
3432
+ /** @nocollapse */ CatalogoAdicionalService.ɵfac = function CatalogoAdicionalService_Factory(t) { return new (t || CatalogoAdicionalService)(ɵɵinject(ApiService)); };
3269
3433
  /** @nocollapse */ CatalogoAdicionalService.ɵprov = ɵɵdefineInjectable({ token: CatalogoAdicionalService, factory: CatalogoAdicionalService.ɵfac, providedIn: 'root' });
3270
3434
  /*@__PURE__*/ (function () { ɵsetClassMetadata(CatalogoAdicionalService, [{
3271
3435
  type: Injectable,
3272
3436
  args: [{
3273
3437
  providedIn: 'root'
3274
3438
  }]
3275
- }], function () { return [{ type: HttpClient }]; }, null); })();
3439
+ }], function () { return [{ type: ApiService }]; }, null); })();
3276
3440
 
3277
3441
  class Authenticated {
3278
3442
  constructor(authService, controlAccesoService, router) {
@@ -3391,32 +3555,41 @@ class VersionCheckService {
3391
3555
  }]
3392
3556
  }], function () { return [{ type: HttpClient }]; }, null); })();
3393
3557
 
3394
- class AgenteService extends CrudService {
3395
- constructor(httpClient) {
3396
- super(httpClient, 'agente');
3397
- this.httpClient = httpClient;
3558
+ class AgenteService {
3559
+ constructor(api) {
3560
+ this.api = api;
3561
+ this.endpoint = 'agente';
3398
3562
  }
3399
3563
  saveUsuarioAgente(usuario) {
3400
- let url = this.getUrl('agente') + '/usuario';
3401
- return this.getHttp().post(url, usuario, this.buildAuth());
3564
+ return this.api.post(`${this.endpoint}/usuario`, usuario);
3402
3565
  }
3403
3566
  getUsuarioAgente(id) {
3404
- let url = this.getUrl('agente') + '/usuario/' + id;
3405
- return this.getHttp().get(url, this.buildAuth());
3567
+ return this.api.get(`${this.endpoint}/usuario/${id}`);
3406
3568
  }
3407
3569
  obtenerAgenteEmpresa() {
3408
- let url = this.geturl() + '/obtenerAgenteEmpresa';
3409
- return this.getHttp().get(url, this.buildAuth());
3570
+ return this.api.get(`${this.endpoint}/obtenerAgenteEmpresa`);
3571
+ }
3572
+ get(id) {
3573
+ return this.api.get(`${this.endpoint}/${id}`);
3574
+ }
3575
+ save(obj) {
3576
+ return this.api.post(this.endpoint, obj);
3577
+ }
3578
+ update(obj) {
3579
+ return this.api.put(this.endpoint, obj.id, obj);
3580
+ }
3581
+ delete(id) {
3582
+ return this.api.delete(this.endpoint, id);
3410
3583
  }
3411
3584
  }
3412
- /** @nocollapse */ AgenteService.ɵfac = function AgenteService_Factory(t) { return new (t || AgenteService)(ɵɵinject(HttpClient)); };
3585
+ /** @nocollapse */ AgenteService.ɵfac = function AgenteService_Factory(t) { return new (t || AgenteService)(ɵɵinject(ApiService)); };
3413
3586
  /** @nocollapse */ AgenteService.ɵprov = ɵɵdefineInjectable({ token: AgenteService, factory: AgenteService.ɵfac, providedIn: 'root' });
3414
3587
  /*@__PURE__*/ (function () { ɵsetClassMetadata(AgenteService, [{
3415
3588
  type: Injectable,
3416
3589
  args: [{
3417
3590
  providedIn: 'root'
3418
3591
  }]
3419
- }], function () { return [{ type: HttpClient }]; }, null); })();
3592
+ }], function () { return [{ type: ApiService }]; }, null); })();
3420
3593
 
3421
3594
  class Almacen {
3422
3595
  constructor() { }
@@ -3433,69 +3606,133 @@ class Banco {
3433
3606
  }
3434
3607
  }
3435
3608
 
3436
- class BancoService extends CrudService {
3437
- constructor(http) {
3438
- super(http, '/banco');
3609
+ class BancoService {
3610
+ constructor(api) {
3611
+ this.api = api;
3612
+ this.endpoint = 'banco';
3613
+ }
3614
+ getAll(params) {
3615
+ return this.api.get(this.endpoint, params);
3616
+ }
3617
+ get(id) {
3618
+ return this.api.get(`${this.endpoint}/${id}`);
3619
+ }
3620
+ save(obj) {
3621
+ return this.api.post(this.endpoint, obj);
3622
+ }
3623
+ update(obj) {
3624
+ return this.api.put(this.endpoint, obj.id, obj);
3625
+ }
3626
+ delete(id) {
3627
+ return this.api.delete(this.endpoint, id);
3439
3628
  }
3440
3629
  }
3441
- /** @nocollapse */ BancoService.ɵfac = function BancoService_Factory(t) { return new (t || BancoService)(ɵɵinject(HttpClient)); };
3630
+ /** @nocollapse */ BancoService.ɵfac = function BancoService_Factory(t) { return new (t || BancoService)(ɵɵinject(ApiService)); };
3442
3631
  /** @nocollapse */ BancoService.ɵprov = ɵɵdefineInjectable({ token: BancoService, factory: BancoService.ɵfac, providedIn: 'root' });
3443
3632
  /*@__PURE__*/ (function () { ɵsetClassMetadata(BancoService, [{
3444
3633
  type: Injectable,
3445
3634
  args: [{
3446
3635
  providedIn: 'root'
3447
3636
  }]
3448
- }], function () { return [{ type: HttpClient }]; }, null); })();
3637
+ }], function () { return [{ type: ApiService }]; }, null); })();
3449
3638
 
3450
3639
  class CatalogoTipo {
3451
3640
  constructor() { }
3452
3641
  }
3453
3642
 
3454
- class CatalogoTipoService extends CrudService$1 {
3455
- constructor(htt) {
3456
- super(htt, '/catalogoTipo');
3643
+ class CatalogoTipoService {
3644
+ constructor(api) {
3645
+ this.api = api;
3646
+ this.endpoint = 'catalogoTipo';
3647
+ }
3648
+ getAll(params) {
3649
+ return this.api.get(this.endpoint, params);
3650
+ }
3651
+ get(id) {
3652
+ return this.api.get(`${this.endpoint}/${id}`);
3653
+ }
3654
+ save(obj) {
3655
+ return this.api.post(this.endpoint, obj);
3656
+ }
3657
+ update(obj) {
3658
+ return this.api.put(this.endpoint, obj.id, obj);
3659
+ }
3660
+ delete(id) {
3661
+ return this.api.delete(this.endpoint, id);
3457
3662
  }
3458
3663
  }
3459
- /** @nocollapse */ CatalogoTipoService.ɵfac = function CatalogoTipoService_Factory(t) { return new (t || CatalogoTipoService)(ɵɵinject(HttpClient)); };
3664
+ /** @nocollapse */ CatalogoTipoService.ɵfac = function CatalogoTipoService_Factory(t) { return new (t || CatalogoTipoService)(ɵɵinject(ApiService)); };
3460
3665
  /** @nocollapse */ CatalogoTipoService.ɵprov = ɵɵdefineInjectable({ token: CatalogoTipoService, factory: CatalogoTipoService.ɵfac, providedIn: 'root' });
3461
3666
  /*@__PURE__*/ (function () { ɵsetClassMetadata(CatalogoTipoService, [{
3462
3667
  type: Injectable,
3463
3668
  args: [{
3464
3669
  providedIn: 'root'
3465
3670
  }]
3466
- }], function () { return [{ type: HttpClient }]; }, null); })();
3671
+ }], function () { return [{ type: ApiService }]; }, null); })();
3467
3672
 
3468
- class ClasificadorTipoService extends CrudService {
3469
- constructor(http) {
3470
- super(http, '/clasificadorTipo');
3673
+ class ClasificadorTipoService {
3674
+ constructor(api) {
3675
+ this.api = api;
3676
+ this.endpoint = 'clasificadorTipo';
3677
+ }
3678
+ getAll(params) {
3679
+ return this.api.get(this.endpoint, params);
3680
+ }
3681
+ get(id) {
3682
+ return this.api.get(`${this.endpoint}/${id}`);
3683
+ }
3684
+ save(obj) {
3685
+ return this.api.post(this.endpoint, obj);
3686
+ }
3687
+ update(obj) {
3688
+ return this.api.put(this.endpoint, obj.id, obj);
3689
+ }
3690
+ delete(id) {
3691
+ return this.api.delete(this.endpoint, id);
3471
3692
  }
3472
3693
  }
3473
- /** @nocollapse */ ClasificadorTipoService.ɵfac = function ClasificadorTipoService_Factory(t) { return new (t || ClasificadorTipoService)(ɵɵinject(HttpClient)); };
3694
+ /** @nocollapse */ ClasificadorTipoService.ɵfac = function ClasificadorTipoService_Factory(t) { return new (t || ClasificadorTipoService)(ɵɵinject(ApiService)); };
3474
3695
  /** @nocollapse */ ClasificadorTipoService.ɵprov = ɵɵdefineInjectable({ token: ClasificadorTipoService, factory: ClasificadorTipoService.ɵfac, providedIn: 'root' });
3475
3696
  /*@__PURE__*/ (function () { ɵsetClassMetadata(ClasificadorTipoService, [{
3476
3697
  type: Injectable,
3477
3698
  args: [{
3478
3699
  providedIn: 'root'
3479
3700
  }]
3480
- }], function () { return [{ type: HttpClient }]; }, null); })();
3701
+ }], function () { return [{ type: ApiService }]; }, null); })();
3481
3702
 
3482
3703
  class ClaveMovimiento {
3483
3704
  constructor() { }
3484
3705
  }
3485
3706
 
3486
- class ClaveMovimientoService extends CrudService {
3487
- constructor(http) {
3488
- super(http, 'claveMovimiento');
3707
+ class ClaveMovimientoService {
3708
+ constructor(api) {
3709
+ this.api = api;
3710
+ this.endpoint = 'claveMovimiento';
3711
+ }
3712
+ getAll(params) {
3713
+ return this.api.get(this.endpoint, params);
3714
+ }
3715
+ get(id) {
3716
+ return this.api.get(`${this.endpoint}/${id}`);
3717
+ }
3718
+ save(obj) {
3719
+ return this.api.post(this.endpoint, obj);
3720
+ }
3721
+ update(obj) {
3722
+ return this.api.put(this.endpoint, obj.id, obj);
3723
+ }
3724
+ delete(id) {
3725
+ return this.api.delete(this.endpoint, id);
3489
3726
  }
3490
3727
  }
3491
- /** @nocollapse */ ClaveMovimientoService.ɵfac = function ClaveMovimientoService_Factory(t) { return new (t || ClaveMovimientoService)(ɵɵinject(HttpClient)); };
3728
+ /** @nocollapse */ ClaveMovimientoService.ɵfac = function ClaveMovimientoService_Factory(t) { return new (t || ClaveMovimientoService)(ɵɵinject(ApiService)); };
3492
3729
  /** @nocollapse */ ClaveMovimientoService.ɵprov = ɵɵdefineInjectable({ token: ClaveMovimientoService, factory: ClaveMovimientoService.ɵfac, providedIn: 'root' });
3493
3730
  /*@__PURE__*/ (function () { ɵsetClassMetadata(ClaveMovimientoService, [{
3494
3731
  type: Injectable,
3495
3732
  args: [{
3496
3733
  providedIn: 'root'
3497
3734
  }]
3498
- }], function () { return [{ type: HttpClient }]; }, null); })();
3735
+ }], function () { return [{ type: ApiService }]; }, null); })();
3499
3736
 
3500
3737
  class ClienteCuentaBanco {
3501
3738
  constructor() {
@@ -3516,43 +3753,73 @@ class ClienteFlete {
3516
3753
  }
3517
3754
  }
3518
3755
 
3519
- class ClienteCuentaBancoService extends CrudService {
3520
- constructor(httpClient) {
3521
- super(httpClient, '/clienteCuentaBanco');
3522
- this.httpClient = httpClient;
3756
+ class ClienteCuentaBancoService {
3757
+ constructor(api) {
3758
+ this.api = api;
3759
+ this.endpoint = 'clienteCuentaBanco';
3523
3760
  }
3524
3761
  saveAll(params) {
3525
3762
  let p = { 'cuentas': params };
3526
- return this.httpClient.post(this.geturl(), p, this.buildAuth());
3763
+ return this.api.post(this.endpoint, p);
3764
+ }
3765
+ get(id) {
3766
+ return this.api.get(`${this.endpoint}/${id}`);
3767
+ }
3768
+ delete(id) {
3769
+ return this.api.delete(this.endpoint, id);
3770
+ }
3771
+ getAll(params) {
3772
+ return this.api.get(this.endpoint, params);
3773
+ }
3774
+ save(obj) {
3775
+ return this.api.post(this.endpoint, obj);
3776
+ }
3777
+ update(obj) {
3778
+ return this.api.put(this.endpoint, obj.id, obj);
3527
3779
  }
3528
3780
  }
3529
- /** @nocollapse */ ClienteCuentaBancoService.ɵfac = function ClienteCuentaBancoService_Factory(t) { return new (t || ClienteCuentaBancoService)(ɵɵinject(HttpClient)); };
3781
+ /** @nocollapse */ ClienteCuentaBancoService.ɵfac = function ClienteCuentaBancoService_Factory(t) { return new (t || ClienteCuentaBancoService)(ɵɵinject(ApiService)); };
3530
3782
  /** @nocollapse */ ClienteCuentaBancoService.ɵprov = ɵɵdefineInjectable({ token: ClienteCuentaBancoService, factory: ClienteCuentaBancoService.ɵfac, providedIn: 'root' });
3531
3783
  /*@__PURE__*/ (function () { ɵsetClassMetadata(ClienteCuentaBancoService, [{
3532
3784
  type: Injectable,
3533
3785
  args: [{
3534
3786
  providedIn: 'root'
3535
3787
  }]
3536
- }], function () { return [{ type: HttpClient }]; }, null); })();
3788
+ }], function () { return [{ type: ApiService }]; }, null); })();
3537
3789
 
3538
- class ClienteFleteService extends CrudService {
3539
- constructor(httpClient) {
3540
- super(httpClient, '/clienteFlete');
3541
- this.httpClient = httpClient;
3790
+ class ClienteFleteService {
3791
+ constructor(api) {
3792
+ this.api = api;
3793
+ this.endpoint = 'clienteFlete';
3542
3794
  }
3543
3795
  saveAll(p) {
3544
3796
  let params = { fletes: p };
3545
- return this.save(params);
3797
+ return this.api.post(this.endpoint, params);
3798
+ }
3799
+ get(id) {
3800
+ return this.api.get(`${this.endpoint}/${id}`);
3801
+ }
3802
+ delete(id) {
3803
+ return this.api.delete(this.endpoint, id);
3804
+ }
3805
+ getAll(params) {
3806
+ return this.api.get(this.endpoint, params);
3807
+ }
3808
+ save(obj) {
3809
+ return this.api.post(this.endpoint, obj);
3810
+ }
3811
+ update(obj) {
3812
+ return this.api.put(this.endpoint, obj.id, obj);
3546
3813
  }
3547
3814
  }
3548
- /** @nocollapse */ ClienteFleteService.ɵfac = function ClienteFleteService_Factory(t) { return new (t || ClienteFleteService)(ɵɵinject(HttpClient)); };
3815
+ /** @nocollapse */ ClienteFleteService.ɵfac = function ClienteFleteService_Factory(t) { return new (t || ClienteFleteService)(ɵɵinject(ApiService)); };
3549
3816
  /** @nocollapse */ ClienteFleteService.ɵprov = ɵɵdefineInjectable({ token: ClienteFleteService, factory: ClienteFleteService.ɵfac, providedIn: 'root' });
3550
3817
  /*@__PURE__*/ (function () { ɵsetClassMetadata(ClienteFleteService, [{
3551
3818
  type: Injectable,
3552
3819
  args: [{
3553
3820
  providedIn: 'root'
3554
3821
  }]
3555
- }], function () { return [{ type: HttpClient }]; }, null); })();
3822
+ }], function () { return [{ type: ApiService }]; }, null); })();
3556
3823
 
3557
3824
  class TipoContacto {
3558
3825
  constructor() {
@@ -3566,52 +3833,100 @@ class DatoContacto {
3566
3833
  }
3567
3834
  }
3568
3835
 
3569
- class DatoContactoService extends CrudService {
3570
- constructor(http) {
3571
- super(http, '/contacto');
3836
+ class DatoContactoService {
3837
+ constructor(api) {
3838
+ this.api = api;
3839
+ this.endpoint = 'contacto';
3840
+ }
3841
+ getAll(params) {
3842
+ return this.api.get(this.endpoint, params);
3843
+ }
3844
+ get(id) {
3845
+ return this.api.get(`${this.endpoint}/${id}`);
3846
+ }
3847
+ save(obj) {
3848
+ return this.api.post(this.endpoint, obj);
3849
+ }
3850
+ update(obj) {
3851
+ return this.api.put(this.endpoint, obj.id, obj);
3852
+ }
3853
+ delete(id) {
3854
+ return this.api.delete(this.endpoint, id);
3572
3855
  }
3573
3856
  }
3574
- /** @nocollapse */ DatoContactoService.ɵfac = function DatoContactoService_Factory(t) { return new (t || DatoContactoService)(ɵɵinject(HttpClient)); };
3857
+ /** @nocollapse */ DatoContactoService.ɵfac = function DatoContactoService_Factory(t) { return new (t || DatoContactoService)(ɵɵinject(ApiService)); };
3575
3858
  /** @nocollapse */ DatoContactoService.ɵprov = ɵɵdefineInjectable({ token: DatoContactoService, factory: DatoContactoService.ɵfac, providedIn: 'root' });
3576
3859
  /*@__PURE__*/ (function () { ɵsetClassMetadata(DatoContactoService, [{
3577
3860
  type: Injectable,
3578
3861
  args: [{
3579
3862
  providedIn: 'root'
3580
3863
  }]
3581
- }], function () { return [{ type: HttpClient }]; }, null); })();
3864
+ }], function () { return [{ type: ApiService }]; }, null); })();
3582
3865
 
3583
- class DatoDireccionService extends CrudService {
3584
- constructor(http) {
3585
- super(http, '/datoDireccion');
3866
+ class DatoDireccionService {
3867
+ constructor(api) {
3868
+ this.api = api;
3869
+ this.endpoint = 'datoDireccion';
3870
+ }
3871
+ getAll(params) {
3872
+ return this.api.get(this.endpoint, params);
3873
+ }
3874
+ get(id) {
3875
+ return this.api.get(`${this.endpoint}/${id}`);
3876
+ }
3877
+ save(obj) {
3878
+ return this.api.post(this.endpoint, obj);
3879
+ }
3880
+ update(obj) {
3881
+ return this.api.put(this.endpoint, obj.id, obj);
3882
+ }
3883
+ delete(id) {
3884
+ return this.api.delete(this.endpoint, id);
3586
3885
  }
3587
3886
  }
3588
- /** @nocollapse */ DatoDireccionService.ɵfac = function DatoDireccionService_Factory(t) { return new (t || DatoDireccionService)(ɵɵinject(HttpClient)); };
3887
+ /** @nocollapse */ DatoDireccionService.ɵfac = function DatoDireccionService_Factory(t) { return new (t || DatoDireccionService)(ɵɵinject(ApiService)); };
3589
3888
  /** @nocollapse */ DatoDireccionService.ɵprov = ɵɵdefineInjectable({ token: DatoDireccionService, factory: DatoDireccionService.ɵfac, providedIn: 'root' });
3590
3889
  /*@__PURE__*/ (function () { ɵsetClassMetadata(DatoDireccionService, [{
3591
3890
  type: Injectable,
3592
3891
  args: [{
3593
3892
  providedIn: 'root'
3594
3893
  }]
3595
- }], function () { return [{ type: HttpClient }]; }, null); })();
3894
+ }], function () { return [{ type: ApiService }]; }, null); })();
3596
3895
 
3597
3896
  class Departamento {
3598
3897
  constructor() {
3599
3898
  }
3600
3899
  }
3601
3900
 
3602
- class DepartamentoService extends CrudService {
3603
- constructor(http) {
3604
- super(http, '/departamento');
3901
+ class DepartamentoService {
3902
+ constructor(api) {
3903
+ this.api = api;
3904
+ this.endpoint = 'departamento';
3905
+ }
3906
+ getAll(params) {
3907
+ return this.api.get(this.endpoint, params);
3908
+ }
3909
+ get(id) {
3910
+ return this.api.get(`${this.endpoint}/${id}`);
3911
+ }
3912
+ save(obj) {
3913
+ return this.api.post(this.endpoint, obj);
3914
+ }
3915
+ update(obj) {
3916
+ return this.api.put(this.endpoint, obj.id, obj);
3917
+ }
3918
+ delete(id) {
3919
+ return this.api.delete(this.endpoint, id);
3605
3920
  }
3606
3921
  }
3607
- /** @nocollapse */ DepartamentoService.ɵfac = function DepartamentoService_Factory(t) { return new (t || DepartamentoService)(ɵɵinject(HttpClient)); };
3922
+ /** @nocollapse */ DepartamentoService.ɵfac = function DepartamentoService_Factory(t) { return new (t || DepartamentoService)(ɵɵinject(ApiService)); };
3608
3923
  /** @nocollapse */ DepartamentoService.ɵprov = ɵɵdefineInjectable({ token: DepartamentoService, factory: DepartamentoService.ɵfac, providedIn: 'root' });
3609
3924
  /*@__PURE__*/ (function () { ɵsetClassMetadata(DepartamentoService, [{
3610
3925
  type: Injectable,
3611
3926
  args: [{
3612
3927
  providedIn: 'root'
3613
3928
  }]
3614
- }], function () { return [{ type: HttpClient }]; }, null); })();
3929
+ }], function () { return [{ type: ApiService }]; }, null); })();
3615
3930
 
3616
3931
  class FormaPago {
3617
3932
  constructor() { }
@@ -3631,72 +3946,132 @@ class ConfiguracionEmpresaAdministrativa {
3631
3946
  }
3632
3947
  }
3633
3948
 
3634
- class EmpresaService extends CrudService {
3635
- constructor(httpClient) {
3636
- super(httpClient, '/empresa');
3637
- this.httpClient = httpClient;
3949
+ class EmpresaService {
3950
+ constructor(api) {
3951
+ this.api = api;
3952
+ this.endpoint = 'empresa';
3953
+ }
3954
+ getAll(params) {
3955
+ return this.api.get(this.endpoint, params);
3638
3956
  }
3639
3957
  get() {
3640
- // return super.get(1);
3641
- return this.httpClient.get(this.getBaseUrl() + '/configuracionEmpresaAdministrativo/configuracionUsuario', this.buildAuth());
3958
+ return this.api.get(`${this.endpoint}/configuracionEmpresaAdministrativo/configuracionUsuario`);
3959
+ }
3960
+ getByEmpresa(id) {
3961
+ return this.api.get(`${this.endpoint}/configuracionEmpresaAdministrativo/configuracionUsuario/${id}`);
3962
+ }
3963
+ save(obj) {
3964
+ return this.api.post(this.endpoint, obj);
3965
+ }
3966
+ update(obj) {
3967
+ return this.api.put(this.endpoint, obj.id, obj);
3968
+ }
3969
+ delete(id) {
3970
+ return this.api.delete(this.endpoint, id);
3642
3971
  }
3643
3972
  }
3644
- /** @nocollapse */ EmpresaService.ɵfac = function EmpresaService_Factory(t) { return new (t || EmpresaService)(ɵɵinject(HttpClient)); };
3973
+ /** @nocollapse */ EmpresaService.ɵfac = function EmpresaService_Factory(t) { return new (t || EmpresaService)(ɵɵinject(ApiService)); };
3645
3974
  /** @nocollapse */ EmpresaService.ɵprov = ɵɵdefineInjectable({ token: EmpresaService, factory: EmpresaService.ɵfac, providedIn: 'root' });
3646
3975
  /*@__PURE__*/ (function () { ɵsetClassMetadata(EmpresaService, [{
3647
3976
  type: Injectable,
3648
3977
  args: [{
3649
3978
  providedIn: 'root'
3650
3979
  }]
3651
- }], function () { return [{ type: HttpClient }]; }, null); })();
3980
+ }], function () { return [{ type: ApiService }]; }, null); })();
3652
3981
 
3653
- class FleteService extends CrudService {
3654
- constructor(httpClient) {
3655
- super(httpClient, '/flete');
3656
- this.httpClient = httpClient;
3982
+ class FleteService {
3983
+ constructor(api) {
3984
+ this.api = api;
3985
+ this.endpoint = 'flete';
3986
+ }
3987
+ getAll(params) {
3988
+ return this.api.get(this.endpoint, params);
3989
+ }
3990
+ get(id) {
3991
+ return this.api.get(`${this.endpoint}/${id}`);
3992
+ }
3993
+ save(obj) {
3994
+ return this.api.post(this.endpoint, obj);
3995
+ }
3996
+ update(obj) {
3997
+ return this.api.put(this.endpoint, obj.id, obj);
3998
+ }
3999
+ delete(id) {
4000
+ return this.api.delete(this.endpoint, id);
3657
4001
  }
3658
4002
  }
3659
- /** @nocollapse */ FleteService.ɵfac = function FleteService_Factory(t) { return new (t || FleteService)(ɵɵinject(HttpClient)); };
4003
+ /** @nocollapse */ FleteService.ɵfac = function FleteService_Factory(t) { return new (t || FleteService)(ɵɵinject(ApiService)); };
3660
4004
  /** @nocollapse */ FleteService.ɵprov = ɵɵdefineInjectable({ token: FleteService, factory: FleteService.ɵfac, providedIn: 'root' });
3661
4005
  /*@__PURE__*/ (function () { ɵsetClassMetadata(FleteService, [{
3662
4006
  type: Injectable,
3663
4007
  args: [{
3664
4008
  providedIn: 'root'
3665
4009
  }]
3666
- }], function () { return [{ type: HttpClient }]; }, null); })();
4010
+ }], function () { return [{ type: ApiService }]; }, null); })();
3667
4011
 
3668
- class FormaPagoService extends CrudService {
3669
- constructor(http) {
3670
- super(http, '/FormaDePago');
4012
+ class FormaPagoService {
4013
+ constructor(api) {
4014
+ this.api = api;
4015
+ this.endpoint = 'FormaDePago';
4016
+ }
4017
+ getAll(params) {
4018
+ return this.api.get(this.endpoint, params);
4019
+ }
4020
+ get(id) {
4021
+ return this.api.get(`${this.endpoint}/${id}`);
4022
+ }
4023
+ save(obj) {
4024
+ return this.api.post(this.endpoint, obj);
4025
+ }
4026
+ update(obj) {
4027
+ return this.api.put(this.endpoint, obj.id, obj);
4028
+ }
4029
+ delete(id) {
4030
+ return this.api.delete(this.endpoint, id);
3671
4031
  }
3672
4032
  }
3673
- /** @nocollapse */ FormaPagoService.ɵfac = function FormaPagoService_Factory(t) { return new (t || FormaPagoService)(ɵɵinject(HttpClient)); };
4033
+ /** @nocollapse */ FormaPagoService.ɵfac = function FormaPagoService_Factory(t) { return new (t || FormaPagoService)(ɵɵinject(ApiService)); };
3674
4034
  /** @nocollapse */ FormaPagoService.ɵprov = ɵɵdefineInjectable({ token: FormaPagoService, factory: FormaPagoService.ɵfac, providedIn: "root" });
3675
4035
  /*@__PURE__*/ (function () { ɵsetClassMetadata(FormaPagoService, [{
3676
4036
  type: Injectable,
3677
4037
  args: [{
3678
4038
  providedIn: "root"
3679
4039
  }]
3680
- }], function () { return [{ type: HttpClient }]; }, null); })();
4040
+ }], function () { return [{ type: ApiService }]; }, null); })();
3681
4041
 
3682
4042
  class Moneda {
3683
4043
  constructor() { }
3684
4044
  }
3685
4045
 
3686
- class MonedaService extends CrudService {
3687
- constructor(httpClient) {
3688
- super(httpClient, '/moneda');
3689
- this.httpClient = httpClient;
4046
+ class MonedaService {
4047
+ constructor(api) {
4048
+ this.api = api;
4049
+ this.endpoint = 'moneda';
4050
+ }
4051
+ getAll(params) {
4052
+ return this.api.get(this.endpoint, params);
4053
+ }
4054
+ get(id) {
4055
+ return this.api.get(`${this.endpoint}/${id}`);
4056
+ }
4057
+ save(obj) {
4058
+ return this.api.post(this.endpoint, obj);
4059
+ }
4060
+ update(obj) {
4061
+ return this.api.put(this.endpoint, obj.id, obj);
4062
+ }
4063
+ delete(id) {
4064
+ return this.api.delete(this.endpoint, id);
3690
4065
  }
3691
4066
  }
3692
- /** @nocollapse */ MonedaService.ɵfac = function MonedaService_Factory(t) { return new (t || MonedaService)(ɵɵinject(HttpClient)); };
4067
+ /** @nocollapse */ MonedaService.ɵfac = function MonedaService_Factory(t) { return new (t || MonedaService)(ɵɵinject(ApiService)); };
3693
4068
  /** @nocollapse */ MonedaService.ɵprov = ɵɵdefineInjectable({ token: MonedaService, factory: MonedaService.ɵfac, providedIn: 'root' });
3694
4069
  /*@__PURE__*/ (function () { ɵsetClassMetadata(MonedaService, [{
3695
4070
  type: Injectable,
3696
4071
  args: [{
3697
4072
  providedIn: 'root'
3698
4073
  }]
3699
- }], function () { return [{ type: HttpClient }]; }, null); })();
4074
+ }], function () { return [{ type: ApiService }]; }, null); })();
3700
4075
 
3701
4076
  class EstadoCivil {
3702
4077
  constructor() { }
@@ -3706,26 +4081,26 @@ class Genero {
3706
4081
  constructor() { }
3707
4082
  }
3708
4083
 
3709
- class PersonaFisicaService extends CrudService {
3710
- constructor(httpClient) {
3711
- super(httpClient, '/PersonaFisica');
3712
- this.httpClient = httpClient;
4084
+ class PersonaFisicaService {
4085
+ constructor(api) {
4086
+ this.api = api;
4087
+ this.endpoint = 'PersonaFisica';
3713
4088
  }
3714
4089
  getGeneros() {
3715
- return this.httpClient.get(this.getBaseUrl() + '/genero', this.buildAuth());
4090
+ return this.api.get(`${this.endpoint}/genero`);
3716
4091
  }
3717
4092
  getEstadoCivil() {
3718
- return this.httpClient.get(this.getBaseUrl() + '/estadoCivil', this.buildAuth());
4093
+ return this.api.get(`${this.endpoint}/estadoCivil`);
3719
4094
  }
3720
4095
  }
3721
- /** @nocollapse */ PersonaFisicaService.ɵfac = function PersonaFisicaService_Factory(t) { return new (t || PersonaFisicaService)(ɵɵinject(HttpClient)); };
4096
+ /** @nocollapse */ PersonaFisicaService.ɵfac = function PersonaFisicaService_Factory(t) { return new (t || PersonaFisicaService)(ɵɵinject(ApiService)); };
3722
4097
  /** @nocollapse */ PersonaFisicaService.ɵprov = ɵɵdefineInjectable({ token: PersonaFisicaService, factory: PersonaFisicaService.ɵfac, providedIn: "root" });
3723
4098
  /*@__PURE__*/ (function () { ɵsetClassMetadata(PersonaFisicaService, [{
3724
4099
  type: Injectable,
3725
4100
  args: [{
3726
4101
  providedIn: "root"
3727
4102
  }]
3728
- }], function () { return [{ type: HttpClient }]; }, null); })();
4103
+ }], function () { return [{ type: ApiService }]; }, null); })();
3729
4104
 
3730
4105
  class ProveedorCuentaBanco {
3731
4106
  constructor() {
@@ -3742,138 +4117,224 @@ class ProveedorFlete {
3742
4117
  }
3743
4118
  }
3744
4119
 
3745
- class ProveedorCuentaBancoService extends CrudService {
3746
- constructor(httpClient) {
3747
- super(httpClient, '/proveedorCuentaBanco');
3748
- this.httpClient = httpClient;
4120
+ class ProveedorCuentaBancoService {
4121
+ constructor(api) {
4122
+ this.api = api;
4123
+ this.endpoint = 'proveedorCuentaBanco';
4124
+ }
4125
+ getAll(params) {
4126
+ return this.api.get(this.endpoint, params);
3749
4127
  }
3750
4128
  saveAll(params) {
3751
4129
  let p = { 'cuentas': params };
3752
- return this.httpClient.post(this.geturl(), p, this.buildAuth());
4130
+ return this.api.post(this.endpoint, p);
4131
+ }
4132
+ get(id) {
4133
+ return this.api.get(`${this.endpoint}/${id}`);
4134
+ }
4135
+ delete(id) {
4136
+ return this.api.delete(this.endpoint, id);
4137
+ }
4138
+ update(obj) {
4139
+ return this.api.put(this.endpoint, obj.id, obj);
4140
+ }
4141
+ save(obj) {
4142
+ return this.api.post(this.endpoint, obj);
3753
4143
  }
3754
4144
  }
3755
- /** @nocollapse */ ProveedorCuentaBancoService.ɵfac = function ProveedorCuentaBancoService_Factory(t) { return new (t || ProveedorCuentaBancoService)(ɵɵinject(HttpClient)); };
4145
+ /** @nocollapse */ ProveedorCuentaBancoService.ɵfac = function ProveedorCuentaBancoService_Factory(t) { return new (t || ProveedorCuentaBancoService)(ɵɵinject(ApiService)); };
3756
4146
  /** @nocollapse */ ProveedorCuentaBancoService.ɵprov = ɵɵdefineInjectable({ token: ProveedorCuentaBancoService, factory: ProveedorCuentaBancoService.ɵfac, providedIn: 'root' });
3757
4147
  /*@__PURE__*/ (function () { ɵsetClassMetadata(ProveedorCuentaBancoService, [{
3758
4148
  type: Injectable,
3759
4149
  args: [{
3760
4150
  providedIn: 'root'
3761
4151
  }]
3762
- }], function () { return [{ type: HttpClient }]; }, null); })();
4152
+ }], function () { return [{ type: ApiService }]; }, null); })();
3763
4153
 
3764
- class ProveedorFleteService extends CrudService {
3765
- constructor(httpClient) {
3766
- super(httpClient, '/proveedorFlete');
3767
- this.httpClient = httpClient;
4154
+ class ProveedorFleteService {
4155
+ constructor(api) {
4156
+ this.api = api;
4157
+ this.endpoint = 'proveedorFlete';
4158
+ }
4159
+ getAll(params) {
4160
+ return this.api.get(this.endpoint, params);
3768
4161
  }
3769
4162
  saveAll(p) {
3770
4163
  let params = { fletes: p };
3771
4164
  return this.save(params);
3772
4165
  }
4166
+ save(obj) {
4167
+ return this.api.post(this.endpoint, obj);
4168
+ }
4169
+ update(obj) {
4170
+ return this.api.put(this.endpoint, obj.id, obj);
4171
+ }
4172
+ delete(id) {
4173
+ return this.api.delete(this.endpoint, id);
4174
+ }
3773
4175
  }
3774
- /** @nocollapse */ ProveedorFleteService.ɵfac = function ProveedorFleteService_Factory(t) { return new (t || ProveedorFleteService)(ɵɵinject(HttpClient)); };
4176
+ /** @nocollapse */ ProveedorFleteService.ɵfac = function ProveedorFleteService_Factory(t) { return new (t || ProveedorFleteService)(ɵɵinject(ApiService)); };
3775
4177
  /** @nocollapse */ ProveedorFleteService.ɵprov = ɵɵdefineInjectable({ token: ProveedorFleteService, factory: ProveedorFleteService.ɵfac, providedIn: 'root' });
3776
4178
  /*@__PURE__*/ (function () { ɵsetClassMetadata(ProveedorFleteService, [{
3777
4179
  type: Injectable,
3778
4180
  args: [{
3779
4181
  providedIn: 'root'
3780
4182
  }]
3781
- }], function () { return [{ type: HttpClient }]; }, null); })();
4183
+ }], function () { return [{ type: ApiService }]; }, null); })();
3782
4184
 
3783
- class ClaveAumentoDisminucionService extends CrudService {
3784
- constructor(http) {
3785
- super(http, 'claveAumentoDisminucion');
4185
+ class ClaveAumentoDisminucionService {
4186
+ constructor(api) {
4187
+ this.api = api;
4188
+ this.endpoint = 'claveAumentoDisminucion';
4189
+ }
4190
+ getAll(params) {
4191
+ return this.api.get(this.endpoint, params);
4192
+ }
4193
+ get(id) {
4194
+ return this.api.get(`${this.endpoint}/${id}`);
4195
+ }
4196
+ save(obj) {
4197
+ return this.api.post(this.endpoint, obj);
4198
+ }
4199
+ update(obj) {
4200
+ return this.api.put(this.endpoint, obj.id, obj);
4201
+ }
4202
+ delete(id) {
4203
+ return this.api.delete(this.endpoint, id);
3786
4204
  }
3787
4205
  }
3788
- /** @nocollapse */ ClaveAumentoDisminucionService.ɵfac = function ClaveAumentoDisminucionService_Factory(t) { return new (t || ClaveAumentoDisminucionService)(ɵɵinject(HttpClient)); };
4206
+ /** @nocollapse */ ClaveAumentoDisminucionService.ɵfac = function ClaveAumentoDisminucionService_Factory(t) { return new (t || ClaveAumentoDisminucionService)(ɵɵinject(ApiService)); };
3789
4207
  /** @nocollapse */ ClaveAumentoDisminucionService.ɵprov = ɵɵdefineInjectable({ token: ClaveAumentoDisminucionService, factory: ClaveAumentoDisminucionService.ɵfac, providedIn: 'root' });
3790
4208
  /*@__PURE__*/ (function () { ɵsetClassMetadata(ClaveAumentoDisminucionService, [{
3791
4209
  type: Injectable,
3792
4210
  args: [{
3793
4211
  providedIn: 'root'
3794
4212
  }]
3795
- }], function () { return [{ type: HttpClient }]; }, null); })();
4213
+ }], function () { return [{ type: ApiService }]; }, null); })();
3796
4214
 
3797
- class SerieDocumentoService extends CrudService {
3798
- constructor(httpClient) {
3799
- super(httpClient, 'serieDocumento');
3800
- this.httpClient = httpClient;
4215
+ class SerieDocumentoService {
4216
+ constructor(api) {
4217
+ this.api = api;
4218
+ this.endpoint = 'serieDocumento';
3801
4219
  }
3802
4220
  getTipos() {
3803
- return this.httpClient.get(this.getUrl('serieDocumento') + '/tipoSerie', this.buildAuth());
4221
+ return this.api.get(`${this.endpoint}/tipoSerie`);
3804
4222
  }
3805
4223
  getReporte(params) {
3806
- return this.httpClient.get(this.getUrl('serieDocumento') + '/descargaFormatoReporte' + this.serializeParams(params), this.buildAuth());
4224
+ return this.api.get(`${this.endpoint}/descargaFormatoReporte`, params);
4225
+ }
4226
+ get(id) {
4227
+ return this.api.get(`${this.endpoint}/${id}`);
4228
+ }
4229
+ save(obj) {
4230
+ return this.api.post(this.endpoint, obj);
4231
+ }
4232
+ update(obj) {
4233
+ return this.api.put(this.endpoint, obj.id, obj);
4234
+ }
4235
+ delete(id) {
4236
+ return this.api.delete(this.endpoint, id);
3807
4237
  }
3808
4238
  }
3809
- /** @nocollapse */ SerieDocumentoService.ɵfac = function SerieDocumentoService_Factory(t) { return new (t || SerieDocumentoService)(ɵɵinject(HttpClient)); };
4239
+ /** @nocollapse */ SerieDocumentoService.ɵfac = function SerieDocumentoService_Factory(t) { return new (t || SerieDocumentoService)(ɵɵinject(ApiService)); };
3810
4240
  /** @nocollapse */ SerieDocumentoService.ɵprov = ɵɵdefineInjectable({ token: SerieDocumentoService, factory: SerieDocumentoService.ɵfac, providedIn: 'root' });
3811
4241
  /*@__PURE__*/ (function () { ɵsetClassMetadata(SerieDocumentoService, [{
3812
4242
  type: Injectable,
3813
4243
  args: [{
3814
4244
  providedIn: 'root'
3815
4245
  }]
3816
- }], function () { return [{ type: HttpClient }]; }, null); })();
4246
+ }], function () { return [{ type: ApiService }]; }, null); })();
3817
4247
 
3818
4248
  class SerieDocumento {
3819
4249
  constructor() { }
3820
4250
  }
3821
4251
 
3822
- class TipoContactoService extends CrudService {
3823
- constructor(http) {
3824
- super(http, '/tipoContacto');
4252
+ class TipoContactoService {
4253
+ constructor(api) {
4254
+ this.api = api;
4255
+ this.endpoint = 'tipoContacto';
4256
+ }
4257
+ getAll(params) {
4258
+ return this.api.get(this.endpoint, params);
4259
+ }
4260
+ get(id) {
4261
+ return this.api.get(`${this.endpoint}/${id}`);
4262
+ }
4263
+ save(obj) {
4264
+ return this.api.post(this.endpoint, obj);
4265
+ }
4266
+ update(obj) {
4267
+ return this.api.put(this.endpoint, obj.id, obj);
4268
+ }
4269
+ delete(id) {
4270
+ return this.api.delete(this.endpoint, id);
3825
4271
  }
3826
4272
  }
3827
- /** @nocollapse */ TipoContactoService.ɵfac = function TipoContactoService_Factory(t) { return new (t || TipoContactoService)(ɵɵinject(HttpClient)); };
4273
+ /** @nocollapse */ TipoContactoService.ɵfac = function TipoContactoService_Factory(t) { return new (t || TipoContactoService)(ɵɵinject(ApiService)); };
3828
4274
  /** @nocollapse */ TipoContactoService.ɵprov = ɵɵdefineInjectable({ token: TipoContactoService, factory: TipoContactoService.ɵfac, providedIn: 'root' });
3829
4275
  /*@__PURE__*/ (function () { ɵsetClassMetadata(TipoContactoService, [{
3830
4276
  type: Injectable,
3831
4277
  args: [{
3832
4278
  providedIn: 'root'
3833
4279
  }]
3834
- }], function () { return [{ type: HttpClient }]; }, null); })();
4280
+ }], function () { return [{ type: ApiService }]; }, null); })();
3835
4281
 
3836
4282
  class Ubicacion {
3837
4283
  constructor() { }
3838
4284
  }
3839
4285
 
3840
- class UbicacionService extends CrudService {
3841
- constructor(http) {
3842
- super(http, 'ubicacion');
4286
+ class UbicacionService {
4287
+ constructor(api) {
4288
+ this.api = api;
4289
+ this.endpoint = 'ubicacion';
4290
+ }
4291
+ getAll(params) {
4292
+ return this.api.get(this.endpoint, params);
4293
+ }
4294
+ get(id) {
4295
+ return this.api.get(`${this.endpoint}/${id}`);
4296
+ }
4297
+ save(obj) {
4298
+ return this.api.post(this.endpoint, obj);
4299
+ }
4300
+ update(obj) {
4301
+ return this.api.put(this.endpoint, obj.id, obj);
4302
+ }
4303
+ delete(id) {
4304
+ return this.api.delete(this.endpoint, id);
3843
4305
  }
3844
4306
  }
3845
- /** @nocollapse */ UbicacionService.ɵfac = function UbicacionService_Factory(t) { return new (t || UbicacionService)(ɵɵinject(HttpClient)); };
4307
+ /** @nocollapse */ UbicacionService.ɵfac = function UbicacionService_Factory(t) { return new (t || UbicacionService)(ɵɵinject(ApiService)); };
3846
4308
  /** @nocollapse */ UbicacionService.ɵprov = ɵɵdefineInjectable({ token: UbicacionService, factory: UbicacionService.ɵfac, providedIn: 'root' });
3847
4309
  /*@__PURE__*/ (function () { ɵsetClassMetadata(UbicacionService, [{
3848
4310
  type: Injectable,
3849
4311
  args: [{
3850
4312
  providedIn: 'root'
3851
4313
  }]
3852
- }], function () { return [{ type: HttpClient }]; }, null); })();
4314
+ }], function () { return [{ type: ApiService }]; }, null); })();
3853
4315
 
3854
4316
  class TipoCatalogo {
3855
4317
  }
3856
4318
  TipoCatalogo.ARTICULO = 2;
3857
4319
  TipoCatalogo.USO_CFDI = 11;
3858
4320
 
3859
- class AcreedorCuentaContableService extends CrudService {
3860
- constructor(httpClient) {
3861
- super(httpClient, 'acreedorCuentaContable');
3862
- this.httpClient = httpClient;
4321
+ class AcreedorCuentaContableService {
4322
+ constructor(api) {
4323
+ this.api = api;
4324
+ this.endpoint = 'acreedorCuentaContable';
3863
4325
  }
3864
4326
  cuentasContables() {
3865
- let uRL = "/cuentaContable/obtieneCuentasContablesRecursivo/";
3866
- return this.httpClient.get(this.getUrl() + uRL, this.buildAuth());
4327
+ return this.api.get(`${this.endpoint}/obtieneCuentasContablesRecursivo`);
3867
4328
  }
3868
4329
  }
3869
- /** @nocollapse */ AcreedorCuentaContableService.ɵfac = function AcreedorCuentaContableService_Factory(t) { return new (t || AcreedorCuentaContableService)(ɵɵinject(HttpClient)); };
4330
+ /** @nocollapse */ AcreedorCuentaContableService.ɵfac = function AcreedorCuentaContableService_Factory(t) { return new (t || AcreedorCuentaContableService)(ɵɵinject(ApiService)); };
3870
4331
  /** @nocollapse */ AcreedorCuentaContableService.ɵprov = ɵɵdefineInjectable({ token: AcreedorCuentaContableService, factory: AcreedorCuentaContableService.ɵfac, providedIn: 'root' });
3871
4332
  /*@__PURE__*/ (function () { ɵsetClassMetadata(AcreedorCuentaContableService, [{
3872
4333
  type: Injectable,
3873
4334
  args: [{
3874
4335
  providedIn: 'root'
3875
4336
  }]
3876
- }], function () { return [{ type: HttpClient }]; }, null); })();
4337
+ }], function () { return [{ type: ApiService }]; }, null); })();
3877
4338
 
3878
4339
  class CuentaContableModel {
3879
4340
  constructor() {
@@ -3894,5 +4355,5 @@ class NormaInformacionFinancieraModel {
3894
4355
  * Generated bundle index. Do not edit.
3895
4356
  */
3896
4357
 
3897
- export { AcreedorCuentaContableService, AcreedorService, Agente, AgenteService, Almacen, AlmacenService, Auth, AuthService, Authenticated, Banco, BancoService, CanActivateGuard, CatalogoAdicionalService, CatalogoTipo, CatalogoTipoService, CclistaComponent, CcseleccionDialogComponent, ClasificadorTipo, ClasificadorTipoService, ClaveAumentoDisminucionService, ClaveMovimiento, ClaveMovimientoService, Cliente, ClienteCuentaBanco, ClienteCuentaBancoService, ClienteFlete, ClienteFleteService, ClienteService, ConfiguracionEmpresaAdministrativa, ControlAccesoService, CoreLibModule, CrudService, CuentaContableModel, DatoContacto, DatoContactoService, DatoDireccion, DatoDireccionService, Departamento, DepartamentoService, Empresa, EmpresaService, Error404Component, EstadoCivil, FileService, Flete, FleteService, FormaPago, FormaPagoService, Genero, GlobalService, HttpLoaderFactory, InitService, LoadingComponent, LoadingScreenComponent, LoadingScreenService, LoadingService, LoginModalComponent, LoginModalService, MessageService, Moneda, MonedaService, NormaInformacionFinancieraModel, PaginateService, PdfModalComponent, PdfModalService, Persona, PersonaFisica, PersonaFisicaService, PersonaMoral, PersonaMoralService, Proveedor, ProveedorCuentaBanco, ProveedorCuentaBancoService, ProveedorFlete, ProveedorFleteService, ProveedorService, SeleccionaArticuloComponent, SelectAcreedorComponent, SelectClienteComponent, SelectProveedorComponent, SerieDocumento, SerieDocumentoService, SessionCajaService, SessionCreateComponent, StockService, TipoCatalogo, TipoContacto, TipoContactoService, Ubicacion, UbicacionService, Usuario, VersionCheckService, httpInterceptor };
4358
+ export { AcreedorCuentaContableService, AcreedorService, Agente, AgenteService, Almacen, AlmacenService, ApiService, Auth, AuthService, Authenticated, Banco, BancoService, CanActivateGuard, CatalogoAdicionalService, CatalogoTipo, CatalogoTipoService, CclistaComponent, CcseleccionDialogComponent, ClasificadorTipo, ClasificadorTipoService, ClaveAumentoDisminucionService, ClaveMovimiento, ClaveMovimientoService, Cliente, ClienteCuentaBanco, ClienteCuentaBancoService, ClienteFlete, ClienteFleteService, ClienteService, ConfiguracionEmpresaAdministrativa, ControlAccesoService, CoreLibModule, CuentaContableModel, DatoContacto, DatoContactoService, DatoDireccion, DatoDireccionService, Departamento, DepartamentoService, Empresa, EmpresaService, Error404Component, EstadoCivil, FileService, Flete, FleteService, FormaPago, FormaPagoService, Genero, GlobalService, HttpLoaderFactory, InitService, LoadingComponent, LoadingScreenComponent, LoadingScreenService, LoadingService, LoginModalComponent, LoginModalService, MessageService, Moneda, MonedaService, NormaInformacionFinancieraModel, PaginateService, PdfModalComponent, PdfModalService, Persona, PersonaFisica, PersonaFisicaService, PersonaMoral, PersonaMoralService, Proveedor, ProveedorCuentaBanco, ProveedorCuentaBancoService, ProveedorFlete, ProveedorFleteService, ProveedorService, SeleccionaArticuloComponent, SelectAcreedorComponent, SelectClienteComponent, SelectProveedorComponent, SerieDocumento, SerieDocumentoService, SessionCajaService, SessionCreateComponent, StockService, TipoCatalogo, TipoContacto, TipoContactoService, Ubicacion, UbicacionService, Usuario, VersionCheckService, httpInterceptor };
3898
4359
  //# sourceMappingURL=visorus-erp-core.js.map