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,8 +1,149 @@
1
1
  (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common/http'), require('@angular/forms'), require('primeng/inputtext'), require('primeng/treetable'), require('primeng/api'), require('@angular/common'), require('primeng/button'), require('primeng/dialog'), require('rxjs'), require('rxjs/internal/operators'), require('ngx-toastr'), require('@ngx-translate/core'), require('rxjs/operators'), require('@angular/platform-browser'), require('primeng/table'), require('primeng/paginator'), require('primeng/dropdown'), require('primeng/inputmask'), require('primeng/messages'), require('primeng/message'), require('primeng/confirmdialog'), require('primeng/progressbar'), require('primeng/tristatecheckbox'), require('primeng/keyfilter'), require('primeng/inputswitch'), require('primeng/tabview'), require('primeng/calendar'), require('primeng/panel'), require('primeng/autocomplete'), require('primeng/fieldset'), require('primeng/checkbox'), require('primeng/tree'), require('primeng/radiobutton'), require('primeng/tabmenu'), require('primeng/overlaypanel'), require('primeng/tooltip'), require('primeng/card'), require('primeng/menubar'), require('primeng/splitbutton'), require('primeng/toolbar'), require('@ngx-translate/http-loader'), require('@angular/router')) :
3
- typeof define === 'function' && define.amd ? define('visorus-erp-core', ['exports', '@angular/core', '@angular/common/http', '@angular/forms', 'primeng/inputtext', 'primeng/treetable', 'primeng/api', '@angular/common', 'primeng/button', 'primeng/dialog', 'rxjs', 'rxjs/internal/operators', 'ngx-toastr', '@ngx-translate/core', 'rxjs/operators', '@angular/platform-browser', 'primeng/table', 'primeng/paginator', 'primeng/dropdown', 'primeng/inputmask', 'primeng/messages', 'primeng/message', 'primeng/confirmdialog', 'primeng/progressbar', 'primeng/tristatecheckbox', 'primeng/keyfilter', 'primeng/inputswitch', 'primeng/tabview', 'primeng/calendar', 'primeng/panel', 'primeng/autocomplete', 'primeng/fieldset', 'primeng/checkbox', 'primeng/tree', 'primeng/radiobutton', 'primeng/tabmenu', 'primeng/overlaypanel', 'primeng/tooltip', 'primeng/card', 'primeng/menubar', 'primeng/splitbutton', 'primeng/toolbar', '@ngx-translate/http-loader', '@angular/router'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global['visorus-erp-core'] = {}, global.ng.core, global.ng.common.http, global.ng.forms, global.i6, global.i4, global.i4$1, global.ng.common, global.i7, global.i4$2, global.rxjs, global.rxjs['internal/operators'], global.i1$1, global.i3, global.rxjs.operators, global.ng.platformBrowser, global.i8$1, global.i10, global.i23, global.i24, global.i25, global.i26, global.i28, global.i29, global.i30, global.i31, global.i32, global.i34, global.i20, global.i35, global.i17, global.i38, global.i16, global.i39, global.i15, global.i40, global.i14, global.i13, global.i12, global.i41, global.i37, global.i36, global.httpLoader, global.ng.router));
5
- }(this, (function (exports, i0, i1, i5, i6, i4, i4$1, i8, i7, i4$2, rxjs, operators, i1$1, i3, operators$1, i3$1, i8$1, i10, i23, i24, i25, i26, i28, i29, i30, i31, i32, i34, i20, i35, i17, i38, i16, i39, i15, i40, i14, i13, i12, i41, i37, i36, httpLoader, i3$2) { 'use strict';
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/common/http'), require('@angular/core'), require('@angular/forms'), require('primeng/inputtext'), require('primeng/treetable'), require('primeng/api'), require('@angular/common'), require('primeng/button'), require('primeng/dialog'), require('rxjs'), require('rxjs/internal/operators'), require('ngx-toastr'), require('@ngx-translate/core'), require('rxjs/operators'), require('@angular/platform-browser'), require('primeng/table'), require('primeng/paginator'), require('primeng/dropdown'), require('primeng/inputmask'), require('primeng/messages'), require('primeng/message'), require('primeng/confirmdialog'), require('primeng/progressbar'), require('primeng/tristatecheckbox'), require('primeng/keyfilter'), require('primeng/inputswitch'), require('primeng/tabview'), require('primeng/calendar'), require('primeng/panel'), require('primeng/autocomplete'), require('primeng/fieldset'), require('primeng/checkbox'), require('primeng/tree'), require('primeng/radiobutton'), require('primeng/tabmenu'), require('primeng/overlaypanel'), require('primeng/tooltip'), require('primeng/card'), require('primeng/menubar'), require('primeng/splitbutton'), require('primeng/toolbar'), require('@ngx-translate/http-loader'), require('@angular/router')) :
3
+ typeof define === 'function' && define.amd ? define('visorus-erp-core', ['exports', '@angular/common/http', '@angular/core', '@angular/forms', 'primeng/inputtext', 'primeng/treetable', 'primeng/api', '@angular/common', 'primeng/button', 'primeng/dialog', 'rxjs', 'rxjs/internal/operators', 'ngx-toastr', '@ngx-translate/core', 'rxjs/operators', '@angular/platform-browser', 'primeng/table', 'primeng/paginator', 'primeng/dropdown', 'primeng/inputmask', 'primeng/messages', 'primeng/message', 'primeng/confirmdialog', 'primeng/progressbar', 'primeng/tristatecheckbox', 'primeng/keyfilter', 'primeng/inputswitch', 'primeng/tabview', 'primeng/calendar', 'primeng/panel', 'primeng/autocomplete', 'primeng/fieldset', 'primeng/checkbox', 'primeng/tree', 'primeng/radiobutton', 'primeng/tabmenu', 'primeng/overlaypanel', 'primeng/tooltip', 'primeng/card', 'primeng/menubar', 'primeng/splitbutton', 'primeng/toolbar', '@ngx-translate/http-loader', '@angular/router'], factory) :
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global['visorus-erp-core'] = {}, global.ng.common.http, global.ng.core, global.ng.forms, global.i6, global.i4, global.i4$1, global.ng.common, global.i7, global.i4$2, global.rxjs, global.rxjs['internal/operators'], global.i1$1, global.i3, global.rxjs.operators, global.ng.platformBrowser, global.i8$1, global.i10, global.i23, global.i24, global.i25, global.i26, global.i28, global.i29, global.i30, global.i31, global.i32, global.i34, global.i20, global.i35, global.i17, global.i38, global.i16, global.i39, global.i15, global.i40, global.i14, global.i13, global.i12, global.i41, global.i37, global.i36, global.httpLoader, global.ng.router));
5
+ }(this, (function (exports, i1, i0, i5, i6, i4, i4$1, i8, i7, i4$2, rxjs, operators, i1$1, i3, operators$1, i3$1, i8$1, i10, i23, i24, i25, i26, i28, i29, i30, i31, i32, i34, i20, i35, i17, i38, i16, i39, i15, i40, i14, i13, i12, i41, i37, i36, httpLoader, i3$2) { 'use strict';
6
+
7
+ var GlobalService = /** @class */ (function () {
8
+ function GlobalService(http) {
9
+ this.http = http;
10
+ }
11
+ GlobalService.prototype.setConfiguracion = function () {
12
+ this.http.get('assets/config.json').subscribe(function (data) {
13
+ localStorage.setItem('config', JSON.stringify(data));
14
+ });
15
+ };
16
+ GlobalService.prototype.obtieneConfiguracion = function () {
17
+ return JSON.parse(localStorage.getItem('config'));
18
+ };
19
+ GlobalService.prototype.getUrl = function (urlComponente) {
20
+ return this.obtieneConfiguracion().url + (urlComponente ? '/' + urlComponente : '');
21
+ };
22
+ GlobalService.prototype.auth = function (params) {
23
+ return this.http.post(this.getUrl() + '/login', params);
24
+ };
25
+ GlobalService.prototype.getUsuarioActual = function () {
26
+ return this.http.get(this.getUrl() + '/usuario/obtieneUsuarioActual', this.buildAuth());
27
+ };
28
+ GlobalService.prototype.buildAuth = function () {
29
+ var data = this.getUsuario();
30
+ return {
31
+ headers: new i1.HttpHeaders({
32
+ 'Authorization': data.token_type + ' ' + data.access_token,
33
+ 'Content-Type': 'application/json',
34
+ 'Accept': 'application/json'
35
+ })
36
+ };
37
+ };
38
+ GlobalService.prototype.validateEndPoint = function () {
39
+ return this.http.get(this.getUrl() + '/validate', this.buildAuth());
40
+ };
41
+ GlobalService.prototype.closeEndPoint = function () {
42
+ localStorage.removeItem('usuario');
43
+ this.setUsuarioInstance(null);
44
+ };
45
+ GlobalService.prototype.getUsuario = function () {
46
+ return JSON.parse(localStorage.getItem('usuario'));
47
+ };
48
+ GlobalService.prototype.setUsuarioInstance = function (usuarioInstance) {
49
+ this.usuarioInstance = usuarioInstance;
50
+ };
51
+ GlobalService.prototype.getLang = function () {
52
+ var lang = localStorage.getItem('lang');
53
+ return lang ? lang : 'es';
54
+ };
55
+ GlobalService.prototype.setModulo = function (modulo) {
56
+ return this.http.post(this.getUrl() + '/usuario/setModulo', modulo, this.buildAuth());
57
+ };
58
+ return GlobalService;
59
+ }());
60
+ /** @nocollapse */ GlobalService.ɵfac = function GlobalService_Factory(t) { return new (t || GlobalService)(i0.ɵɵinject(i1.HttpClient)); };
61
+ /** @nocollapse */ GlobalService.ɵprov = i0.ɵɵdefineInjectable({ token: GlobalService, factory: GlobalService.ɵfac, providedIn: 'root' });
62
+ /*@__PURE__*/ (function () {
63
+ i0.ɵsetClassMetadata(GlobalService, [{
64
+ type: i0.Injectable,
65
+ args: [{
66
+ providedIn: 'root'
67
+ }]
68
+ }], function () { return [{ type: i1.HttpClient }]; }, null);
69
+ })();
70
+
71
+ // projects/erp-core/src/lib/services/api.service.ts
72
+ var ApiService = /** @class */ (function () {
73
+ function ApiService(http,
74
+ // Inyectamos GlobalService para usar sus métodos de ayuda (construir URL y cabeceras)
75
+ global) {
76
+ this.http = http;
77
+ this.global = global;
78
+ }
79
+ /**
80
+ * Realiza una petición GET genérica y autenticada usando HttpParams.
81
+ * @param endpoint El endpoint del API (ej. '/FormaDePago')
82
+ * @param queryParams Un objeto clave-valor para los parámetros de la URL.
83
+ */
84
+ ApiService.prototype.get = function (endpoint, queryParams) {
85
+ // 1. Construye HttpParams de forma segura. Se encarga del URL encoding.
86
+ var params = new i1.HttpParams({ fromObject: queryParams });
87
+ // 2. Combina las opciones: cabeceras de GlobalService y los nuevos params.
88
+ var options = Object.assign(Object.assign({}, this.global.buildAuth()), { params: params // Añade los HttpParams
89
+ });
90
+ var url = this.global.getUrl(endpoint);
91
+ return this.http.get(url, options);
92
+ };
93
+ /**
94
+ * Realiza una petición POST genérica y autenticada.
95
+ * @param endpoint El endpoint del API
96
+ * @param body El cuerpo de la petición
97
+ */
98
+ ApiService.prototype.post = function (endpoint, body) {
99
+ var url = this.global.getUrl(endpoint);
100
+ var options = this.global.buildAuth();
101
+ return this.http.post(url, body, options);
102
+ };
103
+ /**
104
+ * Realiza una petición PUT genérica y autenticada.
105
+ * @param endpoint El endpoint del API
106
+ * @param id El ID del recurso a actualizar
107
+ * @param body El cuerpo de la petición
108
+ */
109
+ ApiService.prototype.put = function (endpoint, id, body) {
110
+ var url = "<span class=\"math-inline\">{this.global.getUrl(endpoint)}/</span>{id}";
111
+ var options = this.global.buildAuth();
112
+ return this.http.put(url, body, options);
113
+ };
114
+ /**
115
+ * Realiza una petición DELETE genérica y autenticada.
116
+ * @param endpoint El endpoint del API
117
+ * @param id El ID del recurso a eliminar
118
+ */
119
+ ApiService.prototype.delete = function (endpoint, id) {
120
+ var url = "<span class=\"math-inline\">{this.global.getUrl(endpoint)}/</span>{id}";
121
+ var options = this.global.buildAuth();
122
+ return this.http.delete(url, options);
123
+ };
124
+ /**
125
+ * Realiza una petición PATCH genérica y autenticada.
126
+ * @param endpoint El endpoint del API
127
+ * @param id El ID del recurso a actualizar parcialmente
128
+ * @param body El cuerpo con los campos a actualizar
129
+ */
130
+ ApiService.prototype.patch = function (endpoint, id, body) {
131
+ var url = "<span class=\"math-inline\">{this.global.getUrl(endpoint)}/</span>{id}";
132
+ var options = this.global.buildAuth();
133
+ return this.http.patch(url, body, options);
134
+ };
135
+ return ApiService;
136
+ }());
137
+ /** @nocollapse */ ApiService.ɵfac = function ApiService_Factory(t) { return new (t || ApiService)(i0.ɵɵinject(i1.HttpClient), i0.ɵɵinject(GlobalService)); };
138
+ /** @nocollapse */ ApiService.ɵprov = i0.ɵɵdefineInjectable({ token: ApiService, factory: ApiService.ɵfac, providedIn: 'root' });
139
+ /*@__PURE__*/ (function () {
140
+ i0.ɵsetClassMetadata(ApiService, [{
141
+ type: i0.Injectable,
142
+ args: [{
143
+ providedIn: 'root'
144
+ }]
145
+ }], function () { return [{ type: i1.HttpClient }, { type: GlobalService }]; }, null);
146
+ })();
6
147
 
7
148
  /******************************************************************************
8
149
  Copyright (c) Microsoft Corporation.
@@ -512,121 +653,32 @@
512
653
  __rewriteRelativeImportExtension: __rewriteRelativeImportExtension,
513
654
  };
514
655
 
515
- var GlobalService = /** @class */ (function () {
516
- function GlobalService(http) {
517
- this.http = http;
656
+ var CuentaContableService = /** @class */ (function () {
657
+ function CuentaContableService(api) {
658
+ this.api = api;
659
+ this.endpoint = 'cuentaContable';
518
660
  }
519
- GlobalService.prototype.setConfiguracion = function () {
520
- this.http.get('assets/config.json').subscribe(function (data) {
521
- localStorage.setItem('config', JSON.stringify(data));
522
- });
523
- };
524
- GlobalService.prototype.obtieneConfiguracion = function () {
525
- return JSON.parse(localStorage.getItem('config'));
661
+ CuentaContableService.prototype.getAll = function (params) {
662
+ return this.api.get(this.endpoint, params);
526
663
  };
527
- GlobalService.prototype.getUrl = function (urlComponente) {
528
- return this.obtieneConfiguracion().url + (urlComponente ? '/' + urlComponente : '');
529
- };
530
- GlobalService.prototype.auth = function (params) {
531
- return this.http.post(this.getUrl() + '/login', params);
532
- };
533
- GlobalService.prototype.getUsuarioActual = function () {
534
- return this.http.get(this.getUrl() + '/usuario/obtieneUsuarioActual', this.buildAuth());
535
- };
536
- GlobalService.prototype.buildAuth = function () {
537
- var data = this.getUsuario();
538
- return {
539
- headers: new i1.HttpHeaders({
540
- 'Authorization': data.token_type + ' ' + data.access_token,
541
- 'Content-Type': 'application/json',
542
- 'Accept': 'application/json'
543
- })
544
- };
545
- };
546
- GlobalService.prototype.validateEndPoint = function () {
547
- return this.http.get(this.getUrl() + '/validate', this.buildAuth());
548
- };
549
- GlobalService.prototype.closeEndPoint = function () {
550
- localStorage.removeItem('usuario');
551
- this.setUsuarioInstance(null);
552
- };
553
- GlobalService.prototype.getUsuario = function () {
554
- return JSON.parse(localStorage.getItem('usuario'));
555
- };
556
- GlobalService.prototype.setUsuarioInstance = function (usuarioInstance) {
557
- this.usuarioInstance = usuarioInstance;
558
- };
559
- GlobalService.prototype.getLang = function () {
560
- var lang = localStorage.getItem('lang');
561
- return lang ? lang : 'es';
562
- };
563
- GlobalService.prototype.setModulo = function (modulo) {
564
- return this.http.post(this.getUrl() + '/usuario/setModulo', modulo, this.buildAuth());
565
- };
566
- return GlobalService;
567
- }());
568
-
569
- var CrudService = /** @class */ (function (_super) {
570
- __extends(CrudService, _super);
571
- function CrudService(httpCliente, url) {
572
- var _this = _super.call(this, httpCliente) || this;
573
- _this.httpCliente = httpCliente;
574
- _this.url = url;
575
- _this.urlComponente = _this.url;
576
- return _this;
577
- }
578
- //Functions for ResourcesCrud [{ param: "max", value: 10}]
579
- CrudService.prototype.serializeParams = function (params) {
580
- var serializeString = '';
581
- params.map(function (e, index) {
582
- if (e.value !== undefined)
583
- serializeString += ((index == 0) ? '?' : '&') + e.param + '=' + e.value;
584
- });
585
- return serializeString;
586
- };
587
- CrudService.prototype.getHttp = function () {
588
- return this.httpCliente;
589
- };
590
- CrudService.prototype.geturl = function () {
591
- return this.getUrl(this.urlComponente);
592
- };
593
- CrudService.prototype.getBaseUrl = function () {
594
- return this.getUrl('');
595
- };
596
- CrudService.prototype.getByUrl = function (url, params) {
597
- return this.httpCliente.get(this.getUrl(url) + this.serializeParams(params), this.buildAuth());
598
- };
599
- CrudService.prototype.getAll = function (params) {
600
- return this.httpCliente.get(this.getUrl(this.urlComponente) + (params ? (this.serializeParams(params)) : ('')), this.buildAuth());
664
+ CuentaContableService.prototype.obtieneCuentasContablesRecursivo = function () {
665
+ return this.api.get(this.endpoint + "/obtieneCuentasContablesRecursivo");
601
666
  };
602
- CrudService.prototype.get = function (id) {
603
- return this.httpCliente.get(this.getUrl(this.urlComponente) + '/' + id, this.buildAuth());
667
+ CuentaContableService.prototype.get = function (id) {
668
+ return this.api.get(this.endpoint + "/" + id);
604
669
  };
605
- CrudService.prototype.save = function (obj) {
606
- return this.httpCliente.post(this.getUrl(this.urlComponente), obj, this.buildAuth());
670
+ CuentaContableService.prototype.save = function (obj) {
671
+ return this.api.post(this.endpoint, obj);
607
672
  };
608
- CrudService.prototype.update = function (obj) {
609
- return this.httpCliente.put(this.getUrl(this.urlComponente) + '/' + obj.id, obj, this.buildAuth());
673
+ CuentaContableService.prototype.update = function (obj) {
674
+ return this.api.put(this.endpoint, obj.id, obj);
610
675
  };
611
- CrudService.prototype.delete = function (id) {
612
- return this.httpCliente.delete(this.getUrl(this.urlComponente) + '/' + id, this.buildAuth());
613
- };
614
- return CrudService;
615
- }(GlobalService));
616
-
617
- var CuentaContableService = /** @class */ (function (_super) {
618
- __extends(CuentaContableService, _super);
619
- function CuentaContableService(httpClient) {
620
- var _this = _super.call(this, httpClient, 'cuentaContable') || this;
621
- _this.httpClient = httpClient;
622
- return _this;
623
- }
624
- CuentaContableService.prototype.obtieneCuentasContablesRecursivo = function () {
625
- return this.httpClient.get(this.getUrl('cuentaContable') + '/obtieneCuentasContablesRecursivo', this.buildAuth());
676
+ CuentaContableService.prototype.delete = function (id) {
677
+ return this.api.delete(this.endpoint, id);
626
678
  };
627
679
  return CuentaContableService;
628
- }(CrudService));
629
- /** @nocollapse */ CuentaContableService.ɵfac = function CuentaContableService_Factory(t) { return new (t || CuentaContableService)(i0.ɵɵinject(i1.HttpClient)); };
680
+ }());
681
+ /** @nocollapse */ CuentaContableService.ɵfac = function CuentaContableService_Factory(t) { return new (t || CuentaContableService)(i0.ɵɵinject(ApiService)); };
630
682
  /** @nocollapse */ CuentaContableService.ɵprov = i0.ɵɵdefineInjectable({ token: CuentaContableService, factory: CuentaContableService.ɵfac, providedIn: 'root' });
631
683
  /*@__PURE__*/ (function () {
632
684
  i0.ɵsetClassMetadata(CuentaContableService, [{
@@ -634,7 +686,7 @@
634
686
  args: [{
635
687
  providedIn: 'root'
636
688
  }]
637
- }], function () { return [{ type: i1.HttpClient }]; }, null);
689
+ }], function () { return [{ type: ApiService }]; }, null);
638
690
  })();
639
691
 
640
692
  function CclistaComponent_ng_template_3_Template(rf, ctx) {
@@ -1960,16 +2012,29 @@
1960
2012
  }], function () { return [{ type: LoginModalService }, { type: AuthService }]; }, null);
1961
2013
  })();
1962
2014
 
1963
- var SessionCajaService = /** @class */ (function (_super) {
1964
- __extends(SessionCajaService, _super);
1965
- function SessionCajaService(httpClient) {
1966
- var _this = _super.call(this, httpClient, 'sessionCaja') || this;
1967
- _this.httpClient = httpClient;
1968
- return _this;
2015
+ var SessionCajaService = /** @class */ (function () {
2016
+ function SessionCajaService(api) {
2017
+ this.api = api;
2018
+ this.endpoint = 'sessionCaja';
1969
2019
  }
2020
+ SessionCajaService.prototype.getAll = function (params) {
2021
+ return this.api.get(this.endpoint, params);
2022
+ };
2023
+ SessionCajaService.prototype.get = function (id) {
2024
+ return this.api.get(this.endpoint + "/" + id);
2025
+ };
2026
+ SessionCajaService.prototype.save = function (obj) {
2027
+ return this.api.post(this.endpoint, obj);
2028
+ };
2029
+ SessionCajaService.prototype.update = function (obj) {
2030
+ return this.api.put(this.endpoint, obj.id, obj);
2031
+ };
2032
+ SessionCajaService.prototype.delete = function (id) {
2033
+ return this.api.delete(this.endpoint, id);
2034
+ };
1970
2035
  return SessionCajaService;
1971
- }(CrudService));
1972
- /** @nocollapse */ SessionCajaService.ɵfac = function SessionCajaService_Factory(t) { return new (t || SessionCajaService)(i0.ɵɵinject(i1.HttpClient)); };
2036
+ }());
2037
+ /** @nocollapse */ SessionCajaService.ɵfac = function SessionCajaService_Factory(t) { return new (t || SessionCajaService)(i0.ɵɵinject(ApiService)); };
1973
2038
  /** @nocollapse */ SessionCajaService.ɵprov = i0.ɵɵdefineInjectable({ token: SessionCajaService, factory: SessionCajaService.ɵfac, providedIn: 'root' });
1974
2039
  /*@__PURE__*/ (function () {
1975
2040
  i0.ɵsetClassMetadata(SessionCajaService, [{
@@ -1977,7 +2042,7 @@
1977
2042
  args: [{
1978
2043
  providedIn: 'root'
1979
2044
  }]
1980
- }], function () { return [{ type: i1.HttpClient }]; }, null);
2045
+ }], function () { return [{ type: ApiService }]; }, null);
1981
2046
  })();
1982
2047
 
1983
2048
  function SessionCreateComponent_ng_template_1_Template(rf, ctx) {
@@ -2202,17 +2267,32 @@
2202
2267
  }] });
2203
2268
  })();
2204
2269
 
2205
- var ClienteService = /** @class */ (function (_super) {
2206
- __extends(ClienteService, _super);
2207
- function ClienteService(httpCliente) {
2208
- return _super.call(this, httpCliente, '/cliente') || this;
2270
+ var ClienteService = /** @class */ (function () {
2271
+ function ClienteService(api) {
2272
+ this.api = api;
2273
+ this.endpoint = 'cliente';
2209
2274
  }
2275
+ ClienteService.prototype.getAll = function (params) {
2276
+ return this.api.get(this.endpoint, params);
2277
+ };
2278
+ ClienteService.prototype.get = function (id) {
2279
+ return this.api.get(this.endpoint + "/" + id);
2280
+ };
2281
+ ClienteService.prototype.save = function (obj) {
2282
+ return this.api.post(this.endpoint, obj);
2283
+ };
2284
+ ClienteService.prototype.update = function (obj) {
2285
+ return this.api.put(this.endpoint, obj.id, obj);
2286
+ };
2287
+ ClienteService.prototype.delete = function (id) {
2288
+ return this.api.delete(this.endpoint, id);
2289
+ };
2210
2290
  ClienteService.prototype.validar_archivos_bss = function (id) {
2211
- return this.getHttp().get(this.getUrl('/cliente/validarClienteBss/') + id, this.buildAuth());
2291
+ return this.api.get(this.endpoint + "/validarClienteBss/" + id);
2212
2292
  };
2213
2293
  return ClienteService;
2214
- }(CrudService));
2215
- /** @nocollapse */ ClienteService.ɵfac = function ClienteService_Factory(t) { return new (t || ClienteService)(i0.ɵɵinject(i1.HttpClient)); };
2294
+ }());
2295
+ /** @nocollapse */ ClienteService.ɵfac = function ClienteService_Factory(t) { return new (t || ClienteService)(i0.ɵɵinject(ApiService)); };
2216
2296
  /** @nocollapse */ ClienteService.ɵprov = i0.ɵɵdefineInjectable({ token: ClienteService, factory: ClienteService.ɵfac, providedIn: 'root' });
2217
2297
  /*@__PURE__*/ (function () {
2218
2298
  i0.ɵsetClassMetadata(ClienteService, [{
@@ -2220,7 +2300,7 @@
2220
2300
  args: [{
2221
2301
  providedIn: 'root'
2222
2302
  }]
2223
- }], function () { return [{ type: i1.HttpClient }]; }, null);
2303
+ }], function () { return [{ type: ApiService }]; }, null);
2224
2304
  })();
2225
2305
 
2226
2306
  var PaginateService = /** @class */ (function () {
@@ -2557,16 +2637,29 @@
2557
2637
  return Proveedor;
2558
2638
  }());
2559
2639
 
2560
- var ProveedorService = /** @class */ (function (_super) {
2561
- __extends(ProveedorService, _super);
2562
- function ProveedorService(httpClient) {
2563
- var _this = _super.call(this, httpClient, '/proveedor') || this;
2564
- _this.httpClient = httpClient;
2565
- return _this;
2640
+ var ProveedorService = /** @class */ (function () {
2641
+ function ProveedorService(api) {
2642
+ this.api = api;
2643
+ this.endpoint = 'proveedor';
2566
2644
  }
2645
+ ProveedorService.prototype.getAll = function (params) {
2646
+ return this.api.get(this.endpoint, params);
2647
+ };
2648
+ ProveedorService.prototype.get = function (id) {
2649
+ return this.api.get(this.endpoint + "/" + id);
2650
+ };
2651
+ ProveedorService.prototype.save = function (obj) {
2652
+ return this.api.post(this.endpoint, obj);
2653
+ };
2654
+ ProveedorService.prototype.update = function (obj) {
2655
+ return this.api.put(this.endpoint, obj.id, obj);
2656
+ };
2657
+ ProveedorService.prototype.delete = function (id) {
2658
+ return this.api.delete(this.endpoint, id);
2659
+ };
2567
2660
  return ProveedorService;
2568
- }(CrudService));
2569
- /** @nocollapse */ ProveedorService.ɵfac = function ProveedorService_Factory(t) { return new (t || ProveedorService)(i0.ɵɵinject(i1.HttpClient)); };
2661
+ }());
2662
+ /** @nocollapse */ ProveedorService.ɵfac = function ProveedorService_Factory(t) { return new (t || ProveedorService)(i0.ɵɵinject(ApiService)); };
2570
2663
  /** @nocollapse */ ProveedorService.ɵprov = i0.ɵɵdefineInjectable({ token: ProveedorService, factory: ProveedorService.ɵfac, providedIn: 'root' });
2571
2664
  /*@__PURE__*/ (function () {
2572
2665
  i0.ɵsetClassMetadata(ProveedorService, [{
@@ -2574,7 +2667,7 @@
2574
2667
  args: [{
2575
2668
  providedIn: 'root'
2576
2669
  }]
2577
- }], function () { return [{ type: i1.HttpClient }]; }, null);
2670
+ }], function () { return [{ type: ApiService }]; }, null);
2578
2671
  })();
2579
2672
 
2580
2673
  function SelectProveedorComponent_ng_template_7_Template(rf, ctx) {
@@ -2722,18 +2815,19 @@
2722
2815
  }] });
2723
2816
  })();
2724
2817
 
2725
- var StockService = /** @class */ (function (_super) {
2726
- __extends(StockService, _super);
2727
- function StockService(httpClient) {
2728
- var _this = _super.call(this, httpClient, 'stock') || this;
2729
- _this.httpClient = httpClient;
2730
- return _this;
2818
+ var StockService = /** @class */ (function () {
2819
+ function StockService(api) {
2820
+ this.api = api;
2821
+ this.endpoint = 'stock';
2731
2822
  }
2823
+ StockService.prototype.getAll = function (params) {
2824
+ return this.api.get(this.endpoint, params);
2825
+ };
2732
2826
  StockService.prototype.obtenerExistenciasArticulosDescripcion = function (parametros, params) {
2733
2827
  var _this = this;
2734
- var url = this.getBaseUrl() + '/stock/obtenerExistenciasArticulos';
2828
+ var url = this.endpoint + "/obtenerExistenciasArticulos";
2735
2829
  var promesa = new Promise(function (resolve, reject) {
2736
- _this.httpClient.post(url + _this.serializeParams(params), parametros, _this.buildAuth()).subscribe(function (data) {
2830
+ _this.api.post(url, parametros).subscribe(function (data) {
2737
2831
  resolve(data);
2738
2832
  }, function (err) {
2739
2833
  reject(err);
@@ -2742,8 +2836,8 @@
2742
2836
  return promesa;
2743
2837
  };
2744
2838
  return StockService;
2745
- }(CrudService));
2746
- /** @nocollapse */ StockService.ɵfac = function StockService_Factory(t) { return new (t || StockService)(i0.ɵɵinject(i1.HttpClient)); };
2839
+ }());
2840
+ /** @nocollapse */ StockService.ɵfac = function StockService_Factory(t) { return new (t || StockService)(i0.ɵɵinject(ApiService)); };
2747
2841
  /** @nocollapse */ StockService.ɵprov = i0.ɵɵdefineInjectable({ token: StockService, factory: StockService.ɵfac, providedIn: 'root' });
2748
2842
  /*@__PURE__*/ (function () {
2749
2843
  i0.ɵsetClassMetadata(StockService, [{
@@ -2751,23 +2845,35 @@
2751
2845
  args: [{
2752
2846
  providedIn: 'root'
2753
2847
  }]
2754
- }], function () { return [{ type: i1.HttpClient }]; }, null);
2848
+ }], function () { return [{ type: ApiService }]; }, null);
2755
2849
  })();
2756
2850
 
2757
- var AlmacenService = /** @class */ (function (_super) {
2758
- __extends(AlmacenService, _super);
2759
- function AlmacenService(httpClient) {
2760
- var _this = _super.call(this, httpClient, '/almacen') || this;
2761
- _this.httpClient = httpClient;
2762
- return _this;
2851
+ var AlmacenService = /** @class */ (function () {
2852
+ function AlmacenService(api) {
2853
+ this.api = api;
2854
+ this.endpoint = 'almacen';
2763
2855
  }
2856
+ AlmacenService.prototype.getAll = function (params) {
2857
+ return this.api.get(this.endpoint, params);
2858
+ };
2764
2859
  AlmacenService.prototype.obtenerAlmacenEmpresa = function () {
2765
- var url = this.geturl() + '/obtenerAlmacenEmpresa';
2766
- return this.getHttp().get(url, this.buildAuth());
2860
+ return this.api.get(this.endpoint + "/obtenerAlmacenEmpresa");
2861
+ };
2862
+ AlmacenService.prototype.get = function (id) {
2863
+ return this.api.get(this.endpoint + "/" + id);
2864
+ };
2865
+ AlmacenService.prototype.save = function (obj) {
2866
+ return this.api.post(this.endpoint, obj);
2867
+ };
2868
+ AlmacenService.prototype.update = function (obj) {
2869
+ return this.api.put(this.endpoint, obj.id, obj);
2870
+ };
2871
+ AlmacenService.prototype.delete = function (id) {
2872
+ return this.api.delete(this.endpoint, id);
2767
2873
  };
2768
2874
  return AlmacenService;
2769
- }(CrudService));
2770
- /** @nocollapse */ AlmacenService.ɵfac = function AlmacenService_Factory(t) { return new (t || AlmacenService)(i0.ɵɵinject(i1.HttpClient)); };
2875
+ }());
2876
+ /** @nocollapse */ AlmacenService.ɵfac = function AlmacenService_Factory(t) { return new (t || AlmacenService)(i0.ɵɵinject(ApiService)); };
2771
2877
  /** @nocollapse */ AlmacenService.ɵprov = i0.ɵɵdefineInjectable({ token: AlmacenService, factory: AlmacenService.ɵfac, providedIn: 'root' });
2772
2878
  /*@__PURE__*/ (function () {
2773
2879
  i0.ɵsetClassMetadata(AlmacenService, [{
@@ -2775,23 +2881,36 @@
2775
2881
  args: [{
2776
2882
  providedIn: 'root'
2777
2883
  }]
2778
- }], function () { return [{ type: i1.HttpClient }]; }, null);
2884
+ }], function () { return [{ type: ApiService }]; }, null);
2779
2885
  })();
2780
2886
 
2781
- var ArticuloInformacionService = /** @class */ (function (_super) {
2782
- __extends(ArticuloInformacionService, _super);
2783
- function ArticuloInformacionService(httpClient) {
2784
- var _this = _super.call(this, httpClient, 'articulo') || this;
2785
- _this.httpClient = httpClient;
2786
- return _this;
2887
+ var ArticuloInformacionService = /** @class */ (function () {
2888
+ function ArticuloInformacionService(api) {
2889
+ this.api = api;
2890
+ this.endpoint = 'articulo';
2787
2891
  }
2892
+ ArticuloInformacionService.prototype.getAll = function (params) {
2893
+ return this.api.get(this.endpoint, params);
2894
+ };
2788
2895
  ArticuloInformacionService.prototype.obtenerExistencias = function (articulo) {
2789
2896
  var uRL = "/existenciasArticulo/" + articulo;
2790
- return this.httpClient.get(this.geturl() + uRL, this.buildAuth());
2897
+ return this.api.get("" + this.endpoint + uRL);
2898
+ };
2899
+ ArticuloInformacionService.prototype.get = function (id) {
2900
+ return this.api.get(this.endpoint + "/" + id);
2901
+ };
2902
+ ArticuloInformacionService.prototype.save = function (obj) {
2903
+ return this.api.post(this.endpoint, obj);
2904
+ };
2905
+ ArticuloInformacionService.prototype.update = function (obj) {
2906
+ return this.api.put(this.endpoint, obj.id, obj);
2907
+ };
2908
+ ArticuloInformacionService.prototype.delete = function (id) {
2909
+ return this.api.delete(this.endpoint, id);
2791
2910
  };
2792
2911
  return ArticuloInformacionService;
2793
- }(CrudService));
2794
- /** @nocollapse */ ArticuloInformacionService.ɵfac = function ArticuloInformacionService_Factory(t) { return new (t || ArticuloInformacionService)(i0.ɵɵinject(i1.HttpClient)); };
2912
+ }());
2913
+ /** @nocollapse */ ArticuloInformacionService.ɵfac = function ArticuloInformacionService_Factory(t) { return new (t || ArticuloInformacionService)(i0.ɵɵinject(ApiService)); };
2795
2914
  /** @nocollapse */ ArticuloInformacionService.ɵprov = i0.ɵɵdefineInjectable({ token: ArticuloInformacionService, factory: ArticuloInformacionService.ɵfac, providedIn: 'root' });
2796
2915
  /*@__PURE__*/ (function () {
2797
2916
  i0.ɵsetClassMetadata(ArticuloInformacionService, [{
@@ -2799,7 +2918,7 @@
2799
2918
  args: [{
2800
2919
  providedIn: 'root'
2801
2920
  }]
2802
- }], function () { return [{ type: i1.HttpClient }]; }, null);
2921
+ }], function () { return [{ type: ApiService }]; }, null);
2803
2922
  })();
2804
2923
 
2805
2924
  function SeleccionArticuloInformacionComponent_ng_template_2_col_1_Template(rf, ctx) {
@@ -3547,16 +3666,29 @@
3547
3666
  }] });
3548
3667
  })();
3549
3668
 
3550
- var AcreedorService = /** @class */ (function (_super) {
3551
- __extends(AcreedorService, _super);
3552
- function AcreedorService(httpClient) {
3553
- var _this = _super.call(this, httpClient, 'acreedor') || this;
3554
- _this.httpClient = httpClient;
3555
- return _this;
3669
+ var AcreedorService = /** @class */ (function () {
3670
+ function AcreedorService(api) {
3671
+ this.api = api;
3672
+ this.endpoint = 'acreedor';
3556
3673
  }
3674
+ AcreedorService.prototype.getAll = function (params) {
3675
+ return this.api.get(this.endpoint, params);
3676
+ };
3677
+ AcreedorService.prototype.get = function (id) {
3678
+ return this.api.get(this.endpoint + "/" + id);
3679
+ };
3680
+ AcreedorService.prototype.save = function (obj) {
3681
+ return this.api.post(this.endpoint, obj);
3682
+ };
3683
+ AcreedorService.prototype.update = function (obj) {
3684
+ return this.api.put(this.endpoint, obj.id, obj);
3685
+ };
3686
+ AcreedorService.prototype.delete = function (id) {
3687
+ return this.api.delete(this.endpoint, id);
3688
+ };
3557
3689
  return AcreedorService;
3558
- }(CrudService));
3559
- /** @nocollapse */ AcreedorService.ɵfac = function AcreedorService_Factory(t) { return new (t || AcreedorService)(i0.ɵɵinject(i1.HttpClient)); };
3690
+ }());
3691
+ /** @nocollapse */ AcreedorService.ɵfac = function AcreedorService_Factory(t) { return new (t || AcreedorService)(i0.ɵɵinject(ApiService)); };
3560
3692
  /** @nocollapse */ AcreedorService.ɵprov = i0.ɵɵdefineInjectable({ token: AcreedorService, factory: AcreedorService.ɵfac, providedIn: 'root' });
3561
3693
  /*@__PURE__*/ (function () {
3562
3694
  i0.ɵsetClassMetadata(AcreedorService, [{
@@ -3564,7 +3696,7 @@
3564
3696
  args: [{
3565
3697
  providedIn: 'root'
3566
3698
  }]
3567
- }], function () { return [{ type: i1.HttpClient }]; }, null);
3699
+ }], function () { return [{ type: ApiService }]; }, null);
3568
3700
  })();
3569
3701
 
3570
3702
  function SelectAcreedorComponent_ng_template_6_Template(rf, ctx) {
@@ -4072,14 +4204,29 @@
4072
4204
  }], function () { return [{ type: i1$1.ToastrService }]; }, null);
4073
4205
  })();
4074
4206
 
4075
- var PersonaMoralService = /** @class */ (function (_super) {
4076
- __extends(PersonaMoralService, _super);
4077
- function PersonaMoralService(http) {
4078
- return _super.call(this, http, '/personaMoral') || this;
4207
+ var PersonaMoralService = /** @class */ (function () {
4208
+ function PersonaMoralService(api) {
4209
+ this.api = api;
4210
+ this.endpoint = 'personaMoral';
4079
4211
  }
4212
+ PersonaMoralService.prototype.getAll = function (params) {
4213
+ return this.api.get(this.endpoint, params);
4214
+ };
4215
+ PersonaMoralService.prototype.get = function (id) {
4216
+ return this.api.get(this.endpoint + "/" + id);
4217
+ };
4218
+ PersonaMoralService.prototype.save = function (obj) {
4219
+ return this.api.post(this.endpoint, obj);
4220
+ };
4221
+ PersonaMoralService.prototype.update = function (obj) {
4222
+ return this.api.put(this.endpoint, obj.id, obj);
4223
+ };
4224
+ PersonaMoralService.prototype.delete = function (id) {
4225
+ return this.api.delete(this.endpoint, id);
4226
+ };
4080
4227
  return PersonaMoralService;
4081
- }(CrudService));
4082
- /** @nocollapse */ PersonaMoralService.ɵfac = function PersonaMoralService_Factory(t) { return new (t || PersonaMoralService)(i0.ɵɵinject(i1.HttpClient)); };
4228
+ }());
4229
+ /** @nocollapse */ PersonaMoralService.ɵfac = function PersonaMoralService_Factory(t) { return new (t || PersonaMoralService)(i0.ɵɵinject(ApiService)); };
4083
4230
  /** @nocollapse */ PersonaMoralService.ɵprov = i0.ɵɵdefineInjectable({ token: PersonaMoralService, factory: PersonaMoralService.ɵfac, providedIn: 'root' });
4084
4231
  /*@__PURE__*/ (function () {
4085
4232
  i0.ɵsetClassMetadata(PersonaMoralService, [{
@@ -4087,7 +4234,7 @@
4087
4234
  args: [{
4088
4235
  providedIn: 'root'
4089
4236
  }]
4090
- }], function () { return [{ type: i1.HttpClient }]; }, null);
4237
+ }], function () { return [{ type: ApiService }]; }, null);
4091
4238
  })();
4092
4239
 
4093
4240
  var CanActivateGuard = /** @class */ (function () {
@@ -4115,16 +4262,29 @@
4115
4262
  }], function () { return [{ type: ControlAccesoService }]; }, null);
4116
4263
  })();
4117
4264
 
4118
- var CatalogoAdicionalService = /** @class */ (function (_super) {
4119
- __extends(CatalogoAdicionalService, _super);
4120
- function CatalogoAdicionalService(httpClient) {
4121
- var _this = _super.call(this, httpClient, 'catalogoAdicional') || this;
4122
- _this.httpClient = httpClient;
4123
- return _this;
4265
+ var CatalogoAdicionalService = /** @class */ (function () {
4266
+ function CatalogoAdicionalService(api) {
4267
+ this.api = api;
4268
+ this.endpoint = 'catalogoAdicional';
4124
4269
  }
4270
+ CatalogoAdicionalService.prototype.getAll = function (params) {
4271
+ return this.api.get(this.endpoint, params);
4272
+ };
4273
+ CatalogoAdicionalService.prototype.get = function (id) {
4274
+ return this.api.get(this.endpoint + "/" + id);
4275
+ };
4276
+ CatalogoAdicionalService.prototype.save = function (obj) {
4277
+ return this.api.post(this.endpoint, obj);
4278
+ };
4279
+ CatalogoAdicionalService.prototype.update = function (obj) {
4280
+ return this.api.put(this.endpoint, obj.id, obj);
4281
+ };
4282
+ CatalogoAdicionalService.prototype.delete = function (id) {
4283
+ return this.api.delete(this.endpoint, id);
4284
+ };
4125
4285
  return CatalogoAdicionalService;
4126
- }(CrudService));
4127
- /** @nocollapse */ CatalogoAdicionalService.ɵfac = function CatalogoAdicionalService_Factory(t) { return new (t || CatalogoAdicionalService)(i0.ɵɵinject(i1.HttpClient)); };
4286
+ }());
4287
+ /** @nocollapse */ CatalogoAdicionalService.ɵfac = function CatalogoAdicionalService_Factory(t) { return new (t || CatalogoAdicionalService)(i0.ɵɵinject(ApiService)); };
4128
4288
  /** @nocollapse */ CatalogoAdicionalService.ɵprov = i0.ɵɵdefineInjectable({ token: CatalogoAdicionalService, factory: CatalogoAdicionalService.ɵfac, providedIn: 'root' });
4129
4289
  /*@__PURE__*/ (function () {
4130
4290
  i0.ɵsetClassMetadata(CatalogoAdicionalService, [{
@@ -4132,7 +4292,7 @@
4132
4292
  args: [{
4133
4293
  providedIn: 'root'
4134
4294
  }]
4135
- }], function () { return [{ type: i1.HttpClient }]; }, null);
4295
+ }], function () { return [{ type: ApiService }]; }, null);
4136
4296
  })();
4137
4297
 
4138
4298
  var Authenticated = /** @class */ (function () {
@@ -4269,28 +4429,35 @@
4269
4429
  return Agente;
4270
4430
  }());
4271
4431
 
4272
- var AgenteService = /** @class */ (function (_super) {
4273
- __extends(AgenteService, _super);
4274
- function AgenteService(httpClient) {
4275
- var _this = _super.call(this, httpClient, 'agente') || this;
4276
- _this.httpClient = httpClient;
4277
- return _this;
4432
+ var AgenteService = /** @class */ (function () {
4433
+ function AgenteService(api) {
4434
+ this.api = api;
4435
+ this.endpoint = 'agente';
4278
4436
  }
4279
4437
  AgenteService.prototype.saveUsuarioAgente = function (usuario) {
4280
- var url = this.getUrl('agente') + '/usuario';
4281
- return this.getHttp().post(url, usuario, this.buildAuth());
4438
+ return this.api.post(this.endpoint + "/usuario", usuario);
4282
4439
  };
4283
4440
  AgenteService.prototype.getUsuarioAgente = function (id) {
4284
- var url = this.getUrl('agente') + '/usuario/' + id;
4285
- return this.getHttp().get(url, this.buildAuth());
4441
+ return this.api.get(this.endpoint + "/usuario/" + id);
4286
4442
  };
4287
4443
  AgenteService.prototype.obtenerAgenteEmpresa = function () {
4288
- var url = this.geturl() + '/obtenerAgenteEmpresa';
4289
- return this.getHttp().get(url, this.buildAuth());
4444
+ return this.api.get(this.endpoint + "/obtenerAgenteEmpresa");
4445
+ };
4446
+ AgenteService.prototype.get = function (id) {
4447
+ return this.api.get(this.endpoint + "/" + id);
4448
+ };
4449
+ AgenteService.prototype.save = function (obj) {
4450
+ return this.api.post(this.endpoint, obj);
4451
+ };
4452
+ AgenteService.prototype.update = function (obj) {
4453
+ return this.api.put(this.endpoint, obj.id, obj);
4454
+ };
4455
+ AgenteService.prototype.delete = function (id) {
4456
+ return this.api.delete(this.endpoint, id);
4290
4457
  };
4291
4458
  return AgenteService;
4292
- }(CrudService));
4293
- /** @nocollapse */ AgenteService.ɵfac = function AgenteService_Factory(t) { return new (t || AgenteService)(i0.ɵɵinject(i1.HttpClient)); };
4459
+ }());
4460
+ /** @nocollapse */ AgenteService.ɵfac = function AgenteService_Factory(t) { return new (t || AgenteService)(i0.ɵɵinject(ApiService)); };
4294
4461
  /** @nocollapse */ AgenteService.ɵprov = i0.ɵɵdefineInjectable({ token: AgenteService, factory: AgenteService.ɵfac, providedIn: 'root' });
4295
4462
  /*@__PURE__*/ (function () {
4296
4463
  i0.ɵsetClassMetadata(AgenteService, [{
@@ -4298,7 +4465,7 @@
4298
4465
  args: [{
4299
4466
  providedIn: 'root'
4300
4467
  }]
4301
- }], function () { return [{ type: i1.HttpClient }]; }, null);
4468
+ }], function () { return [{ type: ApiService }]; }, null);
4302
4469
  })();
4303
4470
 
4304
4471
  var Almacen = /** @class */ (function () {
@@ -4320,14 +4487,29 @@
4320
4487
  return Banco;
4321
4488
  }());
4322
4489
 
4323
- var BancoService = /** @class */ (function (_super) {
4324
- __extends(BancoService, _super);
4325
- function BancoService(http) {
4326
- return _super.call(this, http, '/banco') || this;
4490
+ var BancoService = /** @class */ (function () {
4491
+ function BancoService(api) {
4492
+ this.api = api;
4493
+ this.endpoint = 'banco';
4327
4494
  }
4495
+ BancoService.prototype.getAll = function (params) {
4496
+ return this.api.get(this.endpoint, params);
4497
+ };
4498
+ BancoService.prototype.get = function (id) {
4499
+ return this.api.get(this.endpoint + "/" + id);
4500
+ };
4501
+ BancoService.prototype.save = function (obj) {
4502
+ return this.api.post(this.endpoint, obj);
4503
+ };
4504
+ BancoService.prototype.update = function (obj) {
4505
+ return this.api.put(this.endpoint, obj.id, obj);
4506
+ };
4507
+ BancoService.prototype.delete = function (id) {
4508
+ return this.api.delete(this.endpoint, id);
4509
+ };
4328
4510
  return BancoService;
4329
- }(CrudService));
4330
- /** @nocollapse */ BancoService.ɵfac = function BancoService_Factory(t) { return new (t || BancoService)(i0.ɵɵinject(i1.HttpClient)); };
4511
+ }());
4512
+ /** @nocollapse */ BancoService.ɵfac = function BancoService_Factory(t) { return new (t || BancoService)(i0.ɵɵinject(ApiService)); };
4331
4513
  /** @nocollapse */ BancoService.ɵprov = i0.ɵɵdefineInjectable({ token: BancoService, factory: BancoService.ɵfac, providedIn: 'root' });
4332
4514
  /*@__PURE__*/ (function () {
4333
4515
  i0.ɵsetClassMetadata(BancoService, [{
@@ -4335,7 +4517,7 @@
4335
4517
  args: [{
4336
4518
  providedIn: 'root'
4337
4519
  }]
4338
- }], function () { return [{ type: i1.HttpClient }]; }, null);
4520
+ }], function () { return [{ type: ApiService }]; }, null);
4339
4521
  })();
4340
4522
 
4341
4523
  var CatalogoTipo = /** @class */ (function () {
@@ -4344,14 +4526,29 @@
4344
4526
  return CatalogoTipo;
4345
4527
  }());
4346
4528
 
4347
- var CatalogoTipoService = /** @class */ (function (_super) {
4348
- __extends(CatalogoTipoService, _super);
4349
- function CatalogoTipoService(htt) {
4350
- return _super.call(this, htt, '/catalogoTipo') || this;
4529
+ var CatalogoTipoService = /** @class */ (function () {
4530
+ function CatalogoTipoService(api) {
4531
+ this.api = api;
4532
+ this.endpoint = 'catalogoTipo';
4351
4533
  }
4534
+ CatalogoTipoService.prototype.getAll = function (params) {
4535
+ return this.api.get(this.endpoint, params);
4536
+ };
4537
+ CatalogoTipoService.prototype.get = function (id) {
4538
+ return this.api.get(this.endpoint + "/" + id);
4539
+ };
4540
+ CatalogoTipoService.prototype.save = function (obj) {
4541
+ return this.api.post(this.endpoint, obj);
4542
+ };
4543
+ CatalogoTipoService.prototype.update = function (obj) {
4544
+ return this.api.put(this.endpoint, obj.id, obj);
4545
+ };
4546
+ CatalogoTipoService.prototype.delete = function (id) {
4547
+ return this.api.delete(this.endpoint, id);
4548
+ };
4352
4549
  return CatalogoTipoService;
4353
- }(CrudService));
4354
- /** @nocollapse */ CatalogoTipoService.ɵfac = function CatalogoTipoService_Factory(t) { return new (t || CatalogoTipoService)(i0.ɵɵinject(i1.HttpClient)); };
4550
+ }());
4551
+ /** @nocollapse */ CatalogoTipoService.ɵfac = function CatalogoTipoService_Factory(t) { return new (t || CatalogoTipoService)(i0.ɵɵinject(ApiService)); };
4355
4552
  /** @nocollapse */ CatalogoTipoService.ɵprov = i0.ɵɵdefineInjectable({ token: CatalogoTipoService, factory: CatalogoTipoService.ɵfac, providedIn: 'root' });
4356
4553
  /*@__PURE__*/ (function () {
4357
4554
  i0.ɵsetClassMetadata(CatalogoTipoService, [{
@@ -4359,17 +4556,32 @@
4359
4556
  args: [{
4360
4557
  providedIn: 'root'
4361
4558
  }]
4362
- }], function () { return [{ type: i1.HttpClient }]; }, null);
4559
+ }], function () { return [{ type: ApiService }]; }, null);
4363
4560
  })();
4364
4561
 
4365
- var ClasificadorTipoService = /** @class */ (function (_super) {
4366
- __extends(ClasificadorTipoService, _super);
4367
- function ClasificadorTipoService(http) {
4368
- return _super.call(this, http, '/clasificadorTipo') || this;
4562
+ var ClasificadorTipoService = /** @class */ (function () {
4563
+ function ClasificadorTipoService(api) {
4564
+ this.api = api;
4565
+ this.endpoint = 'clasificadorTipo';
4369
4566
  }
4567
+ ClasificadorTipoService.prototype.getAll = function (params) {
4568
+ return this.api.get(this.endpoint, params);
4569
+ };
4570
+ ClasificadorTipoService.prototype.get = function (id) {
4571
+ return this.api.get(this.endpoint + "/" + id);
4572
+ };
4573
+ ClasificadorTipoService.prototype.save = function (obj) {
4574
+ return this.api.post(this.endpoint, obj);
4575
+ };
4576
+ ClasificadorTipoService.prototype.update = function (obj) {
4577
+ return this.api.put(this.endpoint, obj.id, obj);
4578
+ };
4579
+ ClasificadorTipoService.prototype.delete = function (id) {
4580
+ return this.api.delete(this.endpoint, id);
4581
+ };
4370
4582
  return ClasificadorTipoService;
4371
- }(CrudService));
4372
- /** @nocollapse */ ClasificadorTipoService.ɵfac = function ClasificadorTipoService_Factory(t) { return new (t || ClasificadorTipoService)(i0.ɵɵinject(i1.HttpClient)); };
4583
+ }());
4584
+ /** @nocollapse */ ClasificadorTipoService.ɵfac = function ClasificadorTipoService_Factory(t) { return new (t || ClasificadorTipoService)(i0.ɵɵinject(ApiService)); };
4373
4585
  /** @nocollapse */ ClasificadorTipoService.ɵprov = i0.ɵɵdefineInjectable({ token: ClasificadorTipoService, factory: ClasificadorTipoService.ɵfac, providedIn: 'root' });
4374
4586
  /*@__PURE__*/ (function () {
4375
4587
  i0.ɵsetClassMetadata(ClasificadorTipoService, [{
@@ -4377,7 +4589,7 @@
4377
4589
  args: [{
4378
4590
  providedIn: 'root'
4379
4591
  }]
4380
- }], function () { return [{ type: i1.HttpClient }]; }, null);
4592
+ }], function () { return [{ type: ApiService }]; }, null);
4381
4593
  })();
4382
4594
 
4383
4595
  var ClaveMovimiento = /** @class */ (function () {
@@ -4386,14 +4598,29 @@
4386
4598
  return ClaveMovimiento;
4387
4599
  }());
4388
4600
 
4389
- var ClaveMovimientoService = /** @class */ (function (_super) {
4390
- __extends(ClaveMovimientoService, _super);
4391
- function ClaveMovimientoService(http) {
4392
- return _super.call(this, http, 'claveMovimiento') || this;
4601
+ var ClaveMovimientoService = /** @class */ (function () {
4602
+ function ClaveMovimientoService(api) {
4603
+ this.api = api;
4604
+ this.endpoint = 'claveMovimiento';
4393
4605
  }
4606
+ ClaveMovimientoService.prototype.getAll = function (params) {
4607
+ return this.api.get(this.endpoint, params);
4608
+ };
4609
+ ClaveMovimientoService.prototype.get = function (id) {
4610
+ return this.api.get(this.endpoint + "/" + id);
4611
+ };
4612
+ ClaveMovimientoService.prototype.save = function (obj) {
4613
+ return this.api.post(this.endpoint, obj);
4614
+ };
4615
+ ClaveMovimientoService.prototype.update = function (obj) {
4616
+ return this.api.put(this.endpoint, obj.id, obj);
4617
+ };
4618
+ ClaveMovimientoService.prototype.delete = function (id) {
4619
+ return this.api.delete(this.endpoint, id);
4620
+ };
4394
4621
  return ClaveMovimientoService;
4395
- }(CrudService));
4396
- /** @nocollapse */ ClaveMovimientoService.ɵfac = function ClaveMovimientoService_Factory(t) { return new (t || ClaveMovimientoService)(i0.ɵɵinject(i1.HttpClient)); };
4622
+ }());
4623
+ /** @nocollapse */ ClaveMovimientoService.ɵfac = function ClaveMovimientoService_Factory(t) { return new (t || ClaveMovimientoService)(i0.ɵɵinject(ApiService)); };
4397
4624
  /** @nocollapse */ ClaveMovimientoService.ɵprov = i0.ɵɵdefineInjectable({ token: ClaveMovimientoService, factory: ClaveMovimientoService.ɵfac, providedIn: 'root' });
4398
4625
  /*@__PURE__*/ (function () {
4399
4626
  i0.ɵsetClassMetadata(ClaveMovimientoService, [{
@@ -4401,7 +4628,7 @@
4401
4628
  args: [{
4402
4629
  providedIn: 'root'
4403
4630
  }]
4404
- }], function () { return [{ type: i1.HttpClient }]; }, null);
4631
+ }], function () { return [{ type: ApiService }]; }, null);
4405
4632
  })();
4406
4633
 
4407
4634
  var Cliente = /** @class */ (function () {
@@ -4437,20 +4664,33 @@
4437
4664
  return ClienteFlete;
4438
4665
  }());
4439
4666
 
4440
- var ClienteCuentaBancoService = /** @class */ (function (_super) {
4441
- __extends(ClienteCuentaBancoService, _super);
4442
- function ClienteCuentaBancoService(httpClient) {
4443
- var _this = _super.call(this, httpClient, '/clienteCuentaBanco') || this;
4444
- _this.httpClient = httpClient;
4445
- return _this;
4667
+ var ClienteCuentaBancoService = /** @class */ (function () {
4668
+ function ClienteCuentaBancoService(api) {
4669
+ this.api = api;
4670
+ this.endpoint = 'clienteCuentaBanco';
4446
4671
  }
4447
4672
  ClienteCuentaBancoService.prototype.saveAll = function (params) {
4448
4673
  var p = { 'cuentas': params };
4449
- return this.httpClient.post(this.geturl(), p, this.buildAuth());
4674
+ return this.api.post(this.endpoint, p);
4675
+ };
4676
+ ClienteCuentaBancoService.prototype.get = function (id) {
4677
+ return this.api.get(this.endpoint + "/" + id);
4678
+ };
4679
+ ClienteCuentaBancoService.prototype.delete = function (id) {
4680
+ return this.api.delete(this.endpoint, id);
4681
+ };
4682
+ ClienteCuentaBancoService.prototype.getAll = function (params) {
4683
+ return this.api.get(this.endpoint, params);
4684
+ };
4685
+ ClienteCuentaBancoService.prototype.save = function (obj) {
4686
+ return this.api.post(this.endpoint, obj);
4687
+ };
4688
+ ClienteCuentaBancoService.prototype.update = function (obj) {
4689
+ return this.api.put(this.endpoint, obj.id, obj);
4450
4690
  };
4451
4691
  return ClienteCuentaBancoService;
4452
- }(CrudService));
4453
- /** @nocollapse */ ClienteCuentaBancoService.ɵfac = function ClienteCuentaBancoService_Factory(t) { return new (t || ClienteCuentaBancoService)(i0.ɵɵinject(i1.HttpClient)); };
4692
+ }());
4693
+ /** @nocollapse */ ClienteCuentaBancoService.ɵfac = function ClienteCuentaBancoService_Factory(t) { return new (t || ClienteCuentaBancoService)(i0.ɵɵinject(ApiService)); };
4454
4694
  /** @nocollapse */ ClienteCuentaBancoService.ɵprov = i0.ɵɵdefineInjectable({ token: ClienteCuentaBancoService, factory: ClienteCuentaBancoService.ɵfac, providedIn: 'root' });
4455
4695
  /*@__PURE__*/ (function () {
4456
4696
  i0.ɵsetClassMetadata(ClienteCuentaBancoService, [{
@@ -4458,23 +4698,36 @@
4458
4698
  args: [{
4459
4699
  providedIn: 'root'
4460
4700
  }]
4461
- }], function () { return [{ type: i1.HttpClient }]; }, null);
4701
+ }], function () { return [{ type: ApiService }]; }, null);
4462
4702
  })();
4463
4703
 
4464
- var ClienteFleteService = /** @class */ (function (_super) {
4465
- __extends(ClienteFleteService, _super);
4466
- function ClienteFleteService(httpClient) {
4467
- var _this = _super.call(this, httpClient, '/clienteFlete') || this;
4468
- _this.httpClient = httpClient;
4469
- return _this;
4704
+ var ClienteFleteService = /** @class */ (function () {
4705
+ function ClienteFleteService(api) {
4706
+ this.api = api;
4707
+ this.endpoint = 'clienteFlete';
4470
4708
  }
4471
4709
  ClienteFleteService.prototype.saveAll = function (p) {
4472
4710
  var params = { fletes: p };
4473
- return this.save(params);
4711
+ return this.api.post(this.endpoint, params);
4712
+ };
4713
+ ClienteFleteService.prototype.get = function (id) {
4714
+ return this.api.get(this.endpoint + "/" + id);
4715
+ };
4716
+ ClienteFleteService.prototype.delete = function (id) {
4717
+ return this.api.delete(this.endpoint, id);
4718
+ };
4719
+ ClienteFleteService.prototype.getAll = function (params) {
4720
+ return this.api.get(this.endpoint, params);
4721
+ };
4722
+ ClienteFleteService.prototype.save = function (obj) {
4723
+ return this.api.post(this.endpoint, obj);
4724
+ };
4725
+ ClienteFleteService.prototype.update = function (obj) {
4726
+ return this.api.put(this.endpoint, obj.id, obj);
4474
4727
  };
4475
4728
  return ClienteFleteService;
4476
- }(CrudService));
4477
- /** @nocollapse */ ClienteFleteService.ɵfac = function ClienteFleteService_Factory(t) { return new (t || ClienteFleteService)(i0.ɵɵinject(i1.HttpClient)); };
4729
+ }());
4730
+ /** @nocollapse */ ClienteFleteService.ɵfac = function ClienteFleteService_Factory(t) { return new (t || ClienteFleteService)(i0.ɵɵinject(ApiService)); };
4478
4731
  /** @nocollapse */ ClienteFleteService.ɵprov = i0.ɵɵdefineInjectable({ token: ClienteFleteService, factory: ClienteFleteService.ɵfac, providedIn: 'root' });
4479
4732
  /*@__PURE__*/ (function () {
4480
4733
  i0.ɵsetClassMetadata(ClienteFleteService, [{
@@ -4482,7 +4735,7 @@
4482
4735
  args: [{
4483
4736
  providedIn: 'root'
4484
4737
  }]
4485
- }], function () { return [{ type: i1.HttpClient }]; }, null);
4738
+ }], function () { return [{ type: ApiService }]; }, null);
4486
4739
  })();
4487
4740
 
4488
4741
  var TipoContacto = /** @class */ (function () {
@@ -4499,14 +4752,29 @@
4499
4752
  return DatoContacto;
4500
4753
  }());
4501
4754
 
4502
- var DatoContactoService = /** @class */ (function (_super) {
4503
- __extends(DatoContactoService, _super);
4504
- function DatoContactoService(http) {
4505
- return _super.call(this, http, '/contacto') || this;
4755
+ var DatoContactoService = /** @class */ (function () {
4756
+ function DatoContactoService(api) {
4757
+ this.api = api;
4758
+ this.endpoint = 'contacto';
4506
4759
  }
4760
+ DatoContactoService.prototype.getAll = function (params) {
4761
+ return this.api.get(this.endpoint, params);
4762
+ };
4763
+ DatoContactoService.prototype.get = function (id) {
4764
+ return this.api.get(this.endpoint + "/" + id);
4765
+ };
4766
+ DatoContactoService.prototype.save = function (obj) {
4767
+ return this.api.post(this.endpoint, obj);
4768
+ };
4769
+ DatoContactoService.prototype.update = function (obj) {
4770
+ return this.api.put(this.endpoint, obj.id, obj);
4771
+ };
4772
+ DatoContactoService.prototype.delete = function (id) {
4773
+ return this.api.delete(this.endpoint, id);
4774
+ };
4507
4775
  return DatoContactoService;
4508
- }(CrudService));
4509
- /** @nocollapse */ DatoContactoService.ɵfac = function DatoContactoService_Factory(t) { return new (t || DatoContactoService)(i0.ɵɵinject(i1.HttpClient)); };
4776
+ }());
4777
+ /** @nocollapse */ DatoContactoService.ɵfac = function DatoContactoService_Factory(t) { return new (t || DatoContactoService)(i0.ɵɵinject(ApiService)); };
4510
4778
  /** @nocollapse */ DatoContactoService.ɵprov = i0.ɵɵdefineInjectable({ token: DatoContactoService, factory: DatoContactoService.ɵfac, providedIn: 'root' });
4511
4779
  /*@__PURE__*/ (function () {
4512
4780
  i0.ɵsetClassMetadata(DatoContactoService, [{
@@ -4514,17 +4782,32 @@
4514
4782
  args: [{
4515
4783
  providedIn: 'root'
4516
4784
  }]
4517
- }], function () { return [{ type: i1.HttpClient }]; }, null);
4785
+ }], function () { return [{ type: ApiService }]; }, null);
4518
4786
  })();
4519
4787
 
4520
- var DatoDireccionService = /** @class */ (function (_super) {
4521
- __extends(DatoDireccionService, _super);
4522
- function DatoDireccionService(http) {
4523
- return _super.call(this, http, '/datoDireccion') || this;
4788
+ var DatoDireccionService = /** @class */ (function () {
4789
+ function DatoDireccionService(api) {
4790
+ this.api = api;
4791
+ this.endpoint = 'datoDireccion';
4524
4792
  }
4793
+ DatoDireccionService.prototype.getAll = function (params) {
4794
+ return this.api.get(this.endpoint, params);
4795
+ };
4796
+ DatoDireccionService.prototype.get = function (id) {
4797
+ return this.api.get(this.endpoint + "/" + id);
4798
+ };
4799
+ DatoDireccionService.prototype.save = function (obj) {
4800
+ return this.api.post(this.endpoint, obj);
4801
+ };
4802
+ DatoDireccionService.prototype.update = function (obj) {
4803
+ return this.api.put(this.endpoint, obj.id, obj);
4804
+ };
4805
+ DatoDireccionService.prototype.delete = function (id) {
4806
+ return this.api.delete(this.endpoint, id);
4807
+ };
4525
4808
  return DatoDireccionService;
4526
- }(CrudService));
4527
- /** @nocollapse */ DatoDireccionService.ɵfac = function DatoDireccionService_Factory(t) { return new (t || DatoDireccionService)(i0.ɵɵinject(i1.HttpClient)); };
4809
+ }());
4810
+ /** @nocollapse */ DatoDireccionService.ɵfac = function DatoDireccionService_Factory(t) { return new (t || DatoDireccionService)(i0.ɵɵinject(ApiService)); };
4528
4811
  /** @nocollapse */ DatoDireccionService.ɵprov = i0.ɵɵdefineInjectable({ token: DatoDireccionService, factory: DatoDireccionService.ɵfac, providedIn: 'root' });
4529
4812
  /*@__PURE__*/ (function () {
4530
4813
  i0.ɵsetClassMetadata(DatoDireccionService, [{
@@ -4532,7 +4815,7 @@
4532
4815
  args: [{
4533
4816
  providedIn: 'root'
4534
4817
  }]
4535
- }], function () { return [{ type: i1.HttpClient }]; }, null);
4818
+ }], function () { return [{ type: ApiService }]; }, null);
4536
4819
  })();
4537
4820
 
4538
4821
  var Departamento = /** @class */ (function () {
@@ -4541,14 +4824,29 @@
4541
4824
  return Departamento;
4542
4825
  }());
4543
4826
 
4544
- var DepartamentoService = /** @class */ (function (_super) {
4545
- __extends(DepartamentoService, _super);
4546
- function DepartamentoService(http) {
4547
- return _super.call(this, http, '/departamento') || this;
4827
+ var DepartamentoService = /** @class */ (function () {
4828
+ function DepartamentoService(api) {
4829
+ this.api = api;
4830
+ this.endpoint = 'departamento';
4548
4831
  }
4832
+ DepartamentoService.prototype.getAll = function (params) {
4833
+ return this.api.get(this.endpoint, params);
4834
+ };
4835
+ DepartamentoService.prototype.get = function (id) {
4836
+ return this.api.get(this.endpoint + "/" + id);
4837
+ };
4838
+ DepartamentoService.prototype.save = function (obj) {
4839
+ return this.api.post(this.endpoint, obj);
4840
+ };
4841
+ DepartamentoService.prototype.update = function (obj) {
4842
+ return this.api.put(this.endpoint, obj.id, obj);
4843
+ };
4844
+ DepartamentoService.prototype.delete = function (id) {
4845
+ return this.api.delete(this.endpoint, id);
4846
+ };
4549
4847
  return DepartamentoService;
4550
- }(CrudService));
4551
- /** @nocollapse */ DepartamentoService.ɵfac = function DepartamentoService_Factory(t) { return new (t || DepartamentoService)(i0.ɵɵinject(i1.HttpClient)); };
4848
+ }());
4849
+ /** @nocollapse */ DepartamentoService.ɵfac = function DepartamentoService_Factory(t) { return new (t || DepartamentoService)(i0.ɵɵinject(ApiService)); };
4552
4850
  /** @nocollapse */ DepartamentoService.ɵprov = i0.ɵɵdefineInjectable({ token: DepartamentoService, factory: DepartamentoService.ɵfac, providedIn: 'root' });
4553
4851
  /*@__PURE__*/ (function () {
4554
4852
  i0.ɵsetClassMetadata(DepartamentoService, [{
@@ -4556,7 +4854,7 @@
4556
4854
  args: [{
4557
4855
  providedIn: 'root'
4558
4856
  }]
4559
- }], function () { return [{ type: i1.HttpClient }]; }, null);
4857
+ }], function () { return [{ type: ApiService }]; }, null);
4560
4858
  })();
4561
4859
 
4562
4860
  var FormaPago = /** @class */ (function () {
@@ -4581,20 +4879,32 @@
4581
4879
  return ConfiguracionEmpresaAdministrativa;
4582
4880
  }());
4583
4881
 
4584
- var EmpresaService = /** @class */ (function (_super) {
4585
- __extends(EmpresaService, _super);
4586
- function EmpresaService(httpClient) {
4587
- var _this = _super.call(this, httpClient, '/empresa') || this;
4588
- _this.httpClient = httpClient;
4589
- return _this;
4882
+ var EmpresaService = /** @class */ (function () {
4883
+ function EmpresaService(api) {
4884
+ this.api = api;
4885
+ this.endpoint = 'empresa';
4590
4886
  }
4887
+ EmpresaService.prototype.getAll = function (params) {
4888
+ return this.api.get(this.endpoint, params);
4889
+ };
4591
4890
  EmpresaService.prototype.get = function () {
4592
- // return super.get(1);
4593
- return this.httpClient.get(this.getBaseUrl() + '/configuracionEmpresaAdministrativo/configuracionUsuario', this.buildAuth());
4891
+ return this.api.get(this.endpoint + "/configuracionEmpresaAdministrativo/configuracionUsuario");
4892
+ };
4893
+ EmpresaService.prototype.getByEmpresa = function (id) {
4894
+ return this.api.get(this.endpoint + "/configuracionEmpresaAdministrativo/configuracionUsuario/" + id);
4895
+ };
4896
+ EmpresaService.prototype.save = function (obj) {
4897
+ return this.api.post(this.endpoint, obj);
4898
+ };
4899
+ EmpresaService.prototype.update = function (obj) {
4900
+ return this.api.put(this.endpoint, obj.id, obj);
4901
+ };
4902
+ EmpresaService.prototype.delete = function (id) {
4903
+ return this.api.delete(this.endpoint, id);
4594
4904
  };
4595
4905
  return EmpresaService;
4596
- }(CrudService));
4597
- /** @nocollapse */ EmpresaService.ɵfac = function EmpresaService_Factory(t) { return new (t || EmpresaService)(i0.ɵɵinject(i1.HttpClient)); };
4906
+ }());
4907
+ /** @nocollapse */ EmpresaService.ɵfac = function EmpresaService_Factory(t) { return new (t || EmpresaService)(i0.ɵɵinject(ApiService)); };
4598
4908
  /** @nocollapse */ EmpresaService.ɵprov = i0.ɵɵdefineInjectable({ token: EmpresaService, factory: EmpresaService.ɵfac, providedIn: 'root' });
4599
4909
  /*@__PURE__*/ (function () {
4600
4910
  i0.ɵsetClassMetadata(EmpresaService, [{
@@ -4602,19 +4912,32 @@
4602
4912
  args: [{
4603
4913
  providedIn: 'root'
4604
4914
  }]
4605
- }], function () { return [{ type: i1.HttpClient }]; }, null);
4915
+ }], function () { return [{ type: ApiService }]; }, null);
4606
4916
  })();
4607
4917
 
4608
- var FleteService = /** @class */ (function (_super) {
4609
- __extends(FleteService, _super);
4610
- function FleteService(httpClient) {
4611
- var _this = _super.call(this, httpClient, '/flete') || this;
4612
- _this.httpClient = httpClient;
4613
- return _this;
4918
+ var FleteService = /** @class */ (function () {
4919
+ function FleteService(api) {
4920
+ this.api = api;
4921
+ this.endpoint = 'flete';
4614
4922
  }
4923
+ FleteService.prototype.getAll = function (params) {
4924
+ return this.api.get(this.endpoint, params);
4925
+ };
4926
+ FleteService.prototype.get = function (id) {
4927
+ return this.api.get(this.endpoint + "/" + id);
4928
+ };
4929
+ FleteService.prototype.save = function (obj) {
4930
+ return this.api.post(this.endpoint, obj);
4931
+ };
4932
+ FleteService.prototype.update = function (obj) {
4933
+ return this.api.put(this.endpoint, obj.id, obj);
4934
+ };
4935
+ FleteService.prototype.delete = function (id) {
4936
+ return this.api.delete(this.endpoint, id);
4937
+ };
4615
4938
  return FleteService;
4616
- }(CrudService));
4617
- /** @nocollapse */ FleteService.ɵfac = function FleteService_Factory(t) { return new (t || FleteService)(i0.ɵɵinject(i1.HttpClient)); };
4939
+ }());
4940
+ /** @nocollapse */ FleteService.ɵfac = function FleteService_Factory(t) { return new (t || FleteService)(i0.ɵɵinject(ApiService)); };
4618
4941
  /** @nocollapse */ FleteService.ɵprov = i0.ɵɵdefineInjectable({ token: FleteService, factory: FleteService.ɵfac, providedIn: 'root' });
4619
4942
  /*@__PURE__*/ (function () {
4620
4943
  i0.ɵsetClassMetadata(FleteService, [{
@@ -4622,17 +4945,32 @@
4622
4945
  args: [{
4623
4946
  providedIn: 'root'
4624
4947
  }]
4625
- }], function () { return [{ type: i1.HttpClient }]; }, null);
4948
+ }], function () { return [{ type: ApiService }]; }, null);
4626
4949
  })();
4627
4950
 
4628
- var FormaPagoService = /** @class */ (function (_super) {
4629
- __extends(FormaPagoService, _super);
4630
- function FormaPagoService(http) {
4631
- return _super.call(this, http, '/FormaDePago') || this;
4951
+ var FormaPagoService = /** @class */ (function () {
4952
+ function FormaPagoService(api) {
4953
+ this.api = api;
4954
+ this.endpoint = 'FormaDePago';
4632
4955
  }
4956
+ FormaPagoService.prototype.getAll = function (params) {
4957
+ return this.api.get(this.endpoint, params);
4958
+ };
4959
+ FormaPagoService.prototype.get = function (id) {
4960
+ return this.api.get(this.endpoint + "/" + id);
4961
+ };
4962
+ FormaPagoService.prototype.save = function (obj) {
4963
+ return this.api.post(this.endpoint, obj);
4964
+ };
4965
+ FormaPagoService.prototype.update = function (obj) {
4966
+ return this.api.put(this.endpoint, obj.id, obj);
4967
+ };
4968
+ FormaPagoService.prototype.delete = function (id) {
4969
+ return this.api.delete(this.endpoint, id);
4970
+ };
4633
4971
  return FormaPagoService;
4634
- }(CrudService));
4635
- /** @nocollapse */ FormaPagoService.ɵfac = function FormaPagoService_Factory(t) { return new (t || FormaPagoService)(i0.ɵɵinject(i1.HttpClient)); };
4972
+ }());
4973
+ /** @nocollapse */ FormaPagoService.ɵfac = function FormaPagoService_Factory(t) { return new (t || FormaPagoService)(i0.ɵɵinject(ApiService)); };
4636
4974
  /** @nocollapse */ FormaPagoService.ɵprov = i0.ɵɵdefineInjectable({ token: FormaPagoService, factory: FormaPagoService.ɵfac, providedIn: "root" });
4637
4975
  /*@__PURE__*/ (function () {
4638
4976
  i0.ɵsetClassMetadata(FormaPagoService, [{
@@ -4640,7 +4978,7 @@
4640
4978
  args: [{
4641
4979
  providedIn: "root"
4642
4980
  }]
4643
- }], function () { return [{ type: i1.HttpClient }]; }, null);
4981
+ }], function () { return [{ type: ApiService }]; }, null);
4644
4982
  })();
4645
4983
 
4646
4984
  var Moneda = /** @class */ (function () {
@@ -4649,16 +4987,29 @@
4649
4987
  return Moneda;
4650
4988
  }());
4651
4989
 
4652
- var MonedaService = /** @class */ (function (_super) {
4653
- __extends(MonedaService, _super);
4654
- function MonedaService(httpClient) {
4655
- var _this = _super.call(this, httpClient, '/moneda') || this;
4656
- _this.httpClient = httpClient;
4657
- return _this;
4990
+ var MonedaService = /** @class */ (function () {
4991
+ function MonedaService(api) {
4992
+ this.api = api;
4993
+ this.endpoint = 'moneda';
4658
4994
  }
4995
+ MonedaService.prototype.getAll = function (params) {
4996
+ return this.api.get(this.endpoint, params);
4997
+ };
4998
+ MonedaService.prototype.get = function (id) {
4999
+ return this.api.get(this.endpoint + "/" + id);
5000
+ };
5001
+ MonedaService.prototype.save = function (obj) {
5002
+ return this.api.post(this.endpoint, obj);
5003
+ };
5004
+ MonedaService.prototype.update = function (obj) {
5005
+ return this.api.put(this.endpoint, obj.id, obj);
5006
+ };
5007
+ MonedaService.prototype.delete = function (id) {
5008
+ return this.api.delete(this.endpoint, id);
5009
+ };
4659
5010
  return MonedaService;
4660
- }(CrudService));
4661
- /** @nocollapse */ MonedaService.ɵfac = function MonedaService_Factory(t) { return new (t || MonedaService)(i0.ɵɵinject(i1.HttpClient)); };
5011
+ }());
5012
+ /** @nocollapse */ MonedaService.ɵfac = function MonedaService_Factory(t) { return new (t || MonedaService)(i0.ɵɵinject(ApiService)); };
4662
5013
  /** @nocollapse */ MonedaService.ɵprov = i0.ɵɵdefineInjectable({ token: MonedaService, factory: MonedaService.ɵfac, providedIn: 'root' });
4663
5014
  /*@__PURE__*/ (function () {
4664
5015
  i0.ɵsetClassMetadata(MonedaService, [{
@@ -4666,7 +5017,7 @@
4666
5017
  args: [{
4667
5018
  providedIn: 'root'
4668
5019
  }]
4669
- }], function () { return [{ type: i1.HttpClient }]; }, null);
5020
+ }], function () { return [{ type: ApiService }]; }, null);
4670
5021
  })();
4671
5022
 
4672
5023
  var EstadoCivil = /** @class */ (function () {
@@ -4681,22 +5032,20 @@
4681
5032
  return Genero;
4682
5033
  }());
4683
5034
 
4684
- var PersonaFisicaService = /** @class */ (function (_super) {
4685
- __extends(PersonaFisicaService, _super);
4686
- function PersonaFisicaService(httpClient) {
4687
- var _this = _super.call(this, httpClient, '/PersonaFisica') || this;
4688
- _this.httpClient = httpClient;
4689
- return _this;
5035
+ var PersonaFisicaService = /** @class */ (function () {
5036
+ function PersonaFisicaService(api) {
5037
+ this.api = api;
5038
+ this.endpoint = 'PersonaFisica';
4690
5039
  }
4691
5040
  PersonaFisicaService.prototype.getGeneros = function () {
4692
- return this.httpClient.get(this.getBaseUrl() + '/genero', this.buildAuth());
5041
+ return this.api.get(this.endpoint + "/genero");
4693
5042
  };
4694
5043
  PersonaFisicaService.prototype.getEstadoCivil = function () {
4695
- return this.httpClient.get(this.getBaseUrl() + '/estadoCivil', this.buildAuth());
5044
+ return this.api.get(this.endpoint + "/estadoCivil");
4696
5045
  };
4697
5046
  return PersonaFisicaService;
4698
- }(CrudService));
4699
- /** @nocollapse */ PersonaFisicaService.ɵfac = function PersonaFisicaService_Factory(t) { return new (t || PersonaFisicaService)(i0.ɵɵinject(i1.HttpClient)); };
5047
+ }());
5048
+ /** @nocollapse */ PersonaFisicaService.ɵfac = function PersonaFisicaService_Factory(t) { return new (t || PersonaFisicaService)(i0.ɵɵinject(ApiService)); };
4700
5049
  /** @nocollapse */ PersonaFisicaService.ɵprov = i0.ɵɵdefineInjectable({ token: PersonaFisicaService, factory: PersonaFisicaService.ɵfac, providedIn: "root" });
4701
5050
  /*@__PURE__*/ (function () {
4702
5051
  i0.ɵsetClassMetadata(PersonaFisicaService, [{
@@ -4704,7 +5053,7 @@
4704
5053
  args: [{
4705
5054
  providedIn: "root"
4706
5055
  }]
4707
- }], function () { return [{ type: i1.HttpClient }]; }, null);
5056
+ }], function () { return [{ type: ApiService }]; }, null);
4708
5057
  })();
4709
5058
 
4710
5059
  var ProveedorCuentaBanco = /** @class */ (function () {
@@ -4724,20 +5073,33 @@
4724
5073
  return ProveedorFlete;
4725
5074
  }());
4726
5075
 
4727
- var ProveedorCuentaBancoService = /** @class */ (function (_super) {
4728
- __extends(ProveedorCuentaBancoService, _super);
4729
- function ProveedorCuentaBancoService(httpClient) {
4730
- var _this = _super.call(this, httpClient, '/proveedorCuentaBanco') || this;
4731
- _this.httpClient = httpClient;
4732
- return _this;
5076
+ var ProveedorCuentaBancoService = /** @class */ (function () {
5077
+ function ProveedorCuentaBancoService(api) {
5078
+ this.api = api;
5079
+ this.endpoint = 'proveedorCuentaBanco';
4733
5080
  }
5081
+ ProveedorCuentaBancoService.prototype.getAll = function (params) {
5082
+ return this.api.get(this.endpoint, params);
5083
+ };
4734
5084
  ProveedorCuentaBancoService.prototype.saveAll = function (params) {
4735
5085
  var p = { 'cuentas': params };
4736
- return this.httpClient.post(this.geturl(), p, this.buildAuth());
5086
+ return this.api.post(this.endpoint, p);
5087
+ };
5088
+ ProveedorCuentaBancoService.prototype.get = function (id) {
5089
+ return this.api.get(this.endpoint + "/" + id);
5090
+ };
5091
+ ProveedorCuentaBancoService.prototype.delete = function (id) {
5092
+ return this.api.delete(this.endpoint, id);
5093
+ };
5094
+ ProveedorCuentaBancoService.prototype.update = function (obj) {
5095
+ return this.api.put(this.endpoint, obj.id, obj);
5096
+ };
5097
+ ProveedorCuentaBancoService.prototype.save = function (obj) {
5098
+ return this.api.post(this.endpoint, obj);
4737
5099
  };
4738
5100
  return ProveedorCuentaBancoService;
4739
- }(CrudService));
4740
- /** @nocollapse */ ProveedorCuentaBancoService.ɵfac = function ProveedorCuentaBancoService_Factory(t) { return new (t || ProveedorCuentaBancoService)(i0.ɵɵinject(i1.HttpClient)); };
5101
+ }());
5102
+ /** @nocollapse */ ProveedorCuentaBancoService.ɵfac = function ProveedorCuentaBancoService_Factory(t) { return new (t || ProveedorCuentaBancoService)(i0.ɵɵinject(ApiService)); };
4741
5103
  /** @nocollapse */ ProveedorCuentaBancoService.ɵprov = i0.ɵɵdefineInjectable({ token: ProveedorCuentaBancoService, factory: ProveedorCuentaBancoService.ɵfac, providedIn: 'root' });
4742
5104
  /*@__PURE__*/ (function () {
4743
5105
  i0.ɵsetClassMetadata(ProveedorCuentaBancoService, [{
@@ -4745,23 +5107,33 @@
4745
5107
  args: [{
4746
5108
  providedIn: 'root'
4747
5109
  }]
4748
- }], function () { return [{ type: i1.HttpClient }]; }, null);
5110
+ }], function () { return [{ type: ApiService }]; }, null);
4749
5111
  })();
4750
5112
 
4751
- var ProveedorFleteService = /** @class */ (function (_super) {
4752
- __extends(ProveedorFleteService, _super);
4753
- function ProveedorFleteService(httpClient) {
4754
- var _this = _super.call(this, httpClient, '/proveedorFlete') || this;
4755
- _this.httpClient = httpClient;
4756
- return _this;
5113
+ var ProveedorFleteService = /** @class */ (function () {
5114
+ function ProveedorFleteService(api) {
5115
+ this.api = api;
5116
+ this.endpoint = 'proveedorFlete';
4757
5117
  }
5118
+ ProveedorFleteService.prototype.getAll = function (params) {
5119
+ return this.api.get(this.endpoint, params);
5120
+ };
4758
5121
  ProveedorFleteService.prototype.saveAll = function (p) {
4759
5122
  var params = { fletes: p };
4760
5123
  return this.save(params);
4761
5124
  };
5125
+ ProveedorFleteService.prototype.save = function (obj) {
5126
+ return this.api.post(this.endpoint, obj);
5127
+ };
5128
+ ProveedorFleteService.prototype.update = function (obj) {
5129
+ return this.api.put(this.endpoint, obj.id, obj);
5130
+ };
5131
+ ProveedorFleteService.prototype.delete = function (id) {
5132
+ return this.api.delete(this.endpoint, id);
5133
+ };
4762
5134
  return ProveedorFleteService;
4763
- }(CrudService));
4764
- /** @nocollapse */ ProveedorFleteService.ɵfac = function ProveedorFleteService_Factory(t) { return new (t || ProveedorFleteService)(i0.ɵɵinject(i1.HttpClient)); };
5135
+ }());
5136
+ /** @nocollapse */ ProveedorFleteService.ɵfac = function ProveedorFleteService_Factory(t) { return new (t || ProveedorFleteService)(i0.ɵɵinject(ApiService)); };
4765
5137
  /** @nocollapse */ ProveedorFleteService.ɵprov = i0.ɵɵdefineInjectable({ token: ProveedorFleteService, factory: ProveedorFleteService.ɵfac, providedIn: 'root' });
4766
5138
  /*@__PURE__*/ (function () {
4767
5139
  i0.ɵsetClassMetadata(ProveedorFleteService, [{
@@ -4769,17 +5141,32 @@
4769
5141
  args: [{
4770
5142
  providedIn: 'root'
4771
5143
  }]
4772
- }], function () { return [{ type: i1.HttpClient }]; }, null);
5144
+ }], function () { return [{ type: ApiService }]; }, null);
4773
5145
  })();
4774
5146
 
4775
- var ClaveAumentoDisminucionService = /** @class */ (function (_super) {
4776
- __extends(ClaveAumentoDisminucionService, _super);
4777
- function ClaveAumentoDisminucionService(http) {
4778
- return _super.call(this, http, 'claveAumentoDisminucion') || this;
5147
+ var ClaveAumentoDisminucionService = /** @class */ (function () {
5148
+ function ClaveAumentoDisminucionService(api) {
5149
+ this.api = api;
5150
+ this.endpoint = 'claveAumentoDisminucion';
4779
5151
  }
5152
+ ClaveAumentoDisminucionService.prototype.getAll = function (params) {
5153
+ return this.api.get(this.endpoint, params);
5154
+ };
5155
+ ClaveAumentoDisminucionService.prototype.get = function (id) {
5156
+ return this.api.get(this.endpoint + "/" + id);
5157
+ };
5158
+ ClaveAumentoDisminucionService.prototype.save = function (obj) {
5159
+ return this.api.post(this.endpoint, obj);
5160
+ };
5161
+ ClaveAumentoDisminucionService.prototype.update = function (obj) {
5162
+ return this.api.put(this.endpoint, obj.id, obj);
5163
+ };
5164
+ ClaveAumentoDisminucionService.prototype.delete = function (id) {
5165
+ return this.api.delete(this.endpoint, id);
5166
+ };
4780
5167
  return ClaveAumentoDisminucionService;
4781
- }(CrudService));
4782
- /** @nocollapse */ ClaveAumentoDisminucionService.ɵfac = function ClaveAumentoDisminucionService_Factory(t) { return new (t || ClaveAumentoDisminucionService)(i0.ɵɵinject(i1.HttpClient)); };
5168
+ }());
5169
+ /** @nocollapse */ ClaveAumentoDisminucionService.ɵfac = function ClaveAumentoDisminucionService_Factory(t) { return new (t || ClaveAumentoDisminucionService)(i0.ɵɵinject(ApiService)); };
4783
5170
  /** @nocollapse */ ClaveAumentoDisminucionService.ɵprov = i0.ɵɵdefineInjectable({ token: ClaveAumentoDisminucionService, factory: ClaveAumentoDisminucionService.ɵfac, providedIn: 'root' });
4784
5171
  /*@__PURE__*/ (function () {
4785
5172
  i0.ɵsetClassMetadata(ClaveAumentoDisminucionService, [{
@@ -4787,25 +5174,35 @@
4787
5174
  args: [{
4788
5175
  providedIn: 'root'
4789
5176
  }]
4790
- }], function () { return [{ type: i1.HttpClient }]; }, null);
5177
+ }], function () { return [{ type: ApiService }]; }, null);
4791
5178
  })();
4792
5179
 
4793
- var SerieDocumentoService = /** @class */ (function (_super) {
4794
- __extends(SerieDocumentoService, _super);
4795
- function SerieDocumentoService(httpClient) {
4796
- var _this = _super.call(this, httpClient, 'serieDocumento') || this;
4797
- _this.httpClient = httpClient;
4798
- return _this;
5180
+ var SerieDocumentoService = /** @class */ (function () {
5181
+ function SerieDocumentoService(api) {
5182
+ this.api = api;
5183
+ this.endpoint = 'serieDocumento';
4799
5184
  }
4800
5185
  SerieDocumentoService.prototype.getTipos = function () {
4801
- return this.httpClient.get(this.getUrl('serieDocumento') + '/tipoSerie', this.buildAuth());
5186
+ return this.api.get(this.endpoint + "/tipoSerie");
4802
5187
  };
4803
5188
  SerieDocumentoService.prototype.getReporte = function (params) {
4804
- return this.httpClient.get(this.getUrl('serieDocumento') + '/descargaFormatoReporte' + this.serializeParams(params), this.buildAuth());
5189
+ return this.api.get(this.endpoint + "/descargaFormatoReporte", params);
5190
+ };
5191
+ SerieDocumentoService.prototype.get = function (id) {
5192
+ return this.api.get(this.endpoint + "/" + id);
5193
+ };
5194
+ SerieDocumentoService.prototype.save = function (obj) {
5195
+ return this.api.post(this.endpoint, obj);
5196
+ };
5197
+ SerieDocumentoService.prototype.update = function (obj) {
5198
+ return this.api.put(this.endpoint, obj.id, obj);
5199
+ };
5200
+ SerieDocumentoService.prototype.delete = function (id) {
5201
+ return this.api.delete(this.endpoint, id);
4805
5202
  };
4806
5203
  return SerieDocumentoService;
4807
- }(CrudService));
4808
- /** @nocollapse */ SerieDocumentoService.ɵfac = function SerieDocumentoService_Factory(t) { return new (t || SerieDocumentoService)(i0.ɵɵinject(i1.HttpClient)); };
5204
+ }());
5205
+ /** @nocollapse */ SerieDocumentoService.ɵfac = function SerieDocumentoService_Factory(t) { return new (t || SerieDocumentoService)(i0.ɵɵinject(ApiService)); };
4809
5206
  /** @nocollapse */ SerieDocumentoService.ɵprov = i0.ɵɵdefineInjectable({ token: SerieDocumentoService, factory: SerieDocumentoService.ɵfac, providedIn: 'root' });
4810
5207
  /*@__PURE__*/ (function () {
4811
5208
  i0.ɵsetClassMetadata(SerieDocumentoService, [{
@@ -4813,7 +5210,7 @@
4813
5210
  args: [{
4814
5211
  providedIn: 'root'
4815
5212
  }]
4816
- }], function () { return [{ type: i1.HttpClient }]; }, null);
5213
+ }], function () { return [{ type: ApiService }]; }, null);
4817
5214
  })();
4818
5215
 
4819
5216
  var SerieDocumento = /** @class */ (function () {
@@ -4822,14 +5219,29 @@
4822
5219
  return SerieDocumento;
4823
5220
  }());
4824
5221
 
4825
- var TipoContactoService = /** @class */ (function (_super) {
4826
- __extends(TipoContactoService, _super);
4827
- function TipoContactoService(http) {
4828
- return _super.call(this, http, '/tipoContacto') || this;
5222
+ var TipoContactoService = /** @class */ (function () {
5223
+ function TipoContactoService(api) {
5224
+ this.api = api;
5225
+ this.endpoint = 'tipoContacto';
4829
5226
  }
5227
+ TipoContactoService.prototype.getAll = function (params) {
5228
+ return this.api.get(this.endpoint, params);
5229
+ };
5230
+ TipoContactoService.prototype.get = function (id) {
5231
+ return this.api.get(this.endpoint + "/" + id);
5232
+ };
5233
+ TipoContactoService.prototype.save = function (obj) {
5234
+ return this.api.post(this.endpoint, obj);
5235
+ };
5236
+ TipoContactoService.prototype.update = function (obj) {
5237
+ return this.api.put(this.endpoint, obj.id, obj);
5238
+ };
5239
+ TipoContactoService.prototype.delete = function (id) {
5240
+ return this.api.delete(this.endpoint, id);
5241
+ };
4830
5242
  return TipoContactoService;
4831
- }(CrudService));
4832
- /** @nocollapse */ TipoContactoService.ɵfac = function TipoContactoService_Factory(t) { return new (t || TipoContactoService)(i0.ɵɵinject(i1.HttpClient)); };
5243
+ }());
5244
+ /** @nocollapse */ TipoContactoService.ɵfac = function TipoContactoService_Factory(t) { return new (t || TipoContactoService)(i0.ɵɵinject(ApiService)); };
4833
5245
  /** @nocollapse */ TipoContactoService.ɵprov = i0.ɵɵdefineInjectable({ token: TipoContactoService, factory: TipoContactoService.ɵfac, providedIn: 'root' });
4834
5246
  /*@__PURE__*/ (function () {
4835
5247
  i0.ɵsetClassMetadata(TipoContactoService, [{
@@ -4837,7 +5249,7 @@
4837
5249
  args: [{
4838
5250
  providedIn: 'root'
4839
5251
  }]
4840
- }], function () { return [{ type: i1.HttpClient }]; }, null);
5252
+ }], function () { return [{ type: ApiService }]; }, null);
4841
5253
  })();
4842
5254
 
4843
5255
  var Ubicacion = /** @class */ (function () {
@@ -4846,14 +5258,29 @@
4846
5258
  return Ubicacion;
4847
5259
  }());
4848
5260
 
4849
- var UbicacionService = /** @class */ (function (_super) {
4850
- __extends(UbicacionService, _super);
4851
- function UbicacionService(http) {
4852
- return _super.call(this, http, 'ubicacion') || this;
5261
+ var UbicacionService = /** @class */ (function () {
5262
+ function UbicacionService(api) {
5263
+ this.api = api;
5264
+ this.endpoint = 'ubicacion';
4853
5265
  }
5266
+ UbicacionService.prototype.getAll = function (params) {
5267
+ return this.api.get(this.endpoint, params);
5268
+ };
5269
+ UbicacionService.prototype.get = function (id) {
5270
+ return this.api.get(this.endpoint + "/" + id);
5271
+ };
5272
+ UbicacionService.prototype.save = function (obj) {
5273
+ return this.api.post(this.endpoint, obj);
5274
+ };
5275
+ UbicacionService.prototype.update = function (obj) {
5276
+ return this.api.put(this.endpoint, obj.id, obj);
5277
+ };
5278
+ UbicacionService.prototype.delete = function (id) {
5279
+ return this.api.delete(this.endpoint, id);
5280
+ };
4854
5281
  return UbicacionService;
4855
- }(CrudService));
4856
- /** @nocollapse */ UbicacionService.ɵfac = function UbicacionService_Factory(t) { return new (t || UbicacionService)(i0.ɵɵinject(i1.HttpClient)); };
5282
+ }());
5283
+ /** @nocollapse */ UbicacionService.ɵfac = function UbicacionService_Factory(t) { return new (t || UbicacionService)(i0.ɵɵinject(ApiService)); };
4857
5284
  /** @nocollapse */ UbicacionService.ɵprov = i0.ɵɵdefineInjectable({ token: UbicacionService, factory: UbicacionService.ɵfac, providedIn: 'root' });
4858
5285
  /*@__PURE__*/ (function () {
4859
5286
  i0.ɵsetClassMetadata(UbicacionService, [{
@@ -4861,7 +5288,7 @@
4861
5288
  args: [{
4862
5289
  providedIn: 'root'
4863
5290
  }]
4864
- }], function () { return [{ type: i1.HttpClient }]; }, null);
5291
+ }], function () { return [{ type: ApiService }]; }, null);
4865
5292
  })();
4866
5293
 
4867
5294
  var TipoCatalogo = /** @class */ (function () {
@@ -4872,20 +5299,17 @@
4872
5299
  TipoCatalogo.ARTICULO = 2;
4873
5300
  TipoCatalogo.USO_CFDI = 11;
4874
5301
 
4875
- var AcreedorCuentaContableService = /** @class */ (function (_super) {
4876
- __extends(AcreedorCuentaContableService, _super);
4877
- function AcreedorCuentaContableService(httpClient) {
4878
- var _this = _super.call(this, httpClient, 'acreedorCuentaContable') || this;
4879
- _this.httpClient = httpClient;
4880
- return _this;
5302
+ var AcreedorCuentaContableService = /** @class */ (function () {
5303
+ function AcreedorCuentaContableService(api) {
5304
+ this.api = api;
5305
+ this.endpoint = 'acreedorCuentaContable';
4881
5306
  }
4882
5307
  AcreedorCuentaContableService.prototype.cuentasContables = function () {
4883
- var uRL = "/cuentaContable/obtieneCuentasContablesRecursivo/";
4884
- return this.httpClient.get(this.getUrl() + uRL, this.buildAuth());
5308
+ return this.api.get(this.endpoint + "/obtieneCuentasContablesRecursivo");
4885
5309
  };
4886
5310
  return AcreedorCuentaContableService;
4887
- }(CrudService));
4888
- /** @nocollapse */ AcreedorCuentaContableService.ɵfac = function AcreedorCuentaContableService_Factory(t) { return new (t || AcreedorCuentaContableService)(i0.ɵɵinject(i1.HttpClient)); };
5311
+ }());
5312
+ /** @nocollapse */ AcreedorCuentaContableService.ɵfac = function AcreedorCuentaContableService_Factory(t) { return new (t || AcreedorCuentaContableService)(i0.ɵɵinject(ApiService)); };
4889
5313
  /** @nocollapse */ AcreedorCuentaContableService.ɵprov = i0.ɵɵdefineInjectable({ token: AcreedorCuentaContableService, factory: AcreedorCuentaContableService.ɵfac, providedIn: 'root' });
4890
5314
  /*@__PURE__*/ (function () {
4891
5315
  i0.ɵsetClassMetadata(AcreedorCuentaContableService, [{
@@ -4893,7 +5317,7 @@
4893
5317
  args: [{
4894
5318
  providedIn: 'root'
4895
5319
  }]
4896
- }], function () { return [{ type: i1.HttpClient }]; }, null);
5320
+ }], function () { return [{ type: ApiService }]; }, null);
4897
5321
  })();
4898
5322
 
4899
5323
  var CuentaContableModel = /** @class */ (function () {
@@ -4924,6 +5348,7 @@
4924
5348
  exports.AgenteService = AgenteService;
4925
5349
  exports.Almacen = Almacen;
4926
5350
  exports.AlmacenService = AlmacenService;
5351
+ exports.ApiService = ApiService;
4927
5352
  exports.Auth = Auth;
4928
5353
  exports.AuthService = AuthService;
4929
5354
  exports.Authenticated = Authenticated;
@@ -4949,7 +5374,6 @@
4949
5374
  exports.ConfiguracionEmpresaAdministrativa = ConfiguracionEmpresaAdministrativa;
4950
5375
  exports.ControlAccesoService = ControlAccesoService;
4951
5376
  exports.CoreLibModule = CoreLibModule;
4952
- exports.CrudService = CrudService;
4953
5377
  exports.CuentaContableModel = CuentaContableModel;
4954
5378
  exports.DatoContacto = DatoContacto;
4955
5379
  exports.DatoContactoService = DatoContactoService;