visorus-erp-core 10.0.2 → 10.1.2

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