@experteam-mx/ngx-services 18.9.20 → 20.0.0-beta

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 (180) hide show
  1. package/README.md +80 -24
  2. package/fesm2022/experteam-mx-ngx-services.mjs +580 -438
  3. package/fesm2022/experteam-mx-ngx-services.mjs.map +1 -1
  4. package/index.d.ts +7667 -3
  5. package/package.json +6 -8
  6. package/esm2022/experteam-mx-ngx-services.mjs +0 -5
  7. package/esm2022/lib/apis/api-billing-do.service.mjs +0 -41
  8. package/esm2022/lib/apis/api-billing-gt.service.mjs +0 -61
  9. package/esm2022/lib/apis/api-billing-mx.service.mjs +0 -62
  10. package/esm2022/lib/apis/api-billing-pa.service.mjs +0 -105
  11. package/esm2022/lib/apis/api-billing-sv.service.mjs +0 -83
  12. package/esm2022/lib/apis/api-cash-operations.service.mjs +0 -93
  13. package/esm2022/lib/apis/api-catalogs.service.mjs +0 -616
  14. package/esm2022/lib/apis/api-companies.service.mjs +0 -1031
  15. package/esm2022/lib/apis/api-composition.service.mjs +0 -55
  16. package/esm2022/lib/apis/api-customs.service.mjs +0 -157
  17. package/esm2022/lib/apis/api-discounts.service.mjs +0 -243
  18. package/esm2022/lib/apis/api-e-tools-auto-billing.service.mjs +0 -75
  19. package/esm2022/lib/apis/api-events.service.mjs +0 -53
  20. package/esm2022/lib/apis/api-external-ops.service.mjs +0 -87
  21. package/esm2022/lib/apis/api-inventories.service.mjs +0 -208
  22. package/esm2022/lib/apis/api-invoices.service.mjs +0 -453
  23. package/esm2022/lib/apis/api-notifications.service.mjs +0 -104
  24. package/esm2022/lib/apis/api-open-items.service.mjs +0 -62
  25. package/esm2022/lib/apis/api-quote.service.mjs +0 -87
  26. package/esm2022/lib/apis/api-reports.service.mjs +0 -172
  27. package/esm2022/lib/apis/api-security.service.mjs +0 -245
  28. package/esm2022/lib/apis/api-services.service.mjs +0 -103
  29. package/esm2022/lib/apis/api-shipments.service.mjs +0 -116
  30. package/esm2022/lib/apis/api-supplies.service.mjs +0 -133
  31. package/esm2022/lib/apis/models/api-billing-do.interfaces.mjs +0 -2
  32. package/esm2022/lib/apis/models/api-billing-do.types.mjs +0 -2
  33. package/esm2022/lib/apis/models/api-billing-mx.interfaces.mjs +0 -2
  34. package/esm2022/lib/apis/models/api-billing-mx.types.mjs +0 -2
  35. package/esm2022/lib/apis/models/api-billing-pa.interfaces.mjs +0 -2
  36. package/esm2022/lib/apis/models/api-billing-pa.types.mjs +0 -2
  37. package/esm2022/lib/apis/models/api-billing-sv.interfaces.mjs +0 -2
  38. package/esm2022/lib/apis/models/api-billing-sv.types.mjs +0 -2
  39. package/esm2022/lib/apis/models/api-billing.models.mjs +0 -2
  40. package/esm2022/lib/apis/models/api-cash-operations.interfaces.mjs +0 -2
  41. package/esm2022/lib/apis/models/api-cash-operations.types.mjs +0 -2
  42. package/esm2022/lib/apis/models/api-catalog.enum.mjs +0 -9
  43. package/esm2022/lib/apis/models/api-catalog.interfaces.mjs +0 -2
  44. package/esm2022/lib/apis/models/api-catalog.types.mjs +0 -2
  45. package/esm2022/lib/apis/models/api-companies.interfaces.mjs +0 -2
  46. package/esm2022/lib/apis/models/api-companies.types.mjs +0 -2
  47. package/esm2022/lib/apis/models/api-composition.interfaces.mjs +0 -2
  48. package/esm2022/lib/apis/models/api-composition.types.mjs +0 -2
  49. package/esm2022/lib/apis/models/api-customs.interfaces.mjs +0 -2
  50. package/esm2022/lib/apis/models/api-customs.types.mjs +0 -2
  51. package/esm2022/lib/apis/models/api-discounts.interfaces.mjs +0 -2
  52. package/esm2022/lib/apis/models/api-discounts.types.mjs +0 -2
  53. package/esm2022/lib/apis/models/api-e-tools-auto-billing.interfaces.mjs +0 -2
  54. package/esm2022/lib/apis/models/api-e-tools-auto-billing.types.mjs +0 -2
  55. package/esm2022/lib/apis/models/api-events.enum.mjs +0 -7
  56. package/esm2022/lib/apis/models/api-events.interfaces.mjs +0 -2
  57. package/esm2022/lib/apis/models/api-events.types.mjs +0 -2
  58. package/esm2022/lib/apis/models/api-external-ops.interfaces.mjs +0 -2
  59. package/esm2022/lib/apis/models/api-external-ops.types.mjs +0 -2
  60. package/esm2022/lib/apis/models/api-inventories.enum.mjs +0 -22
  61. package/esm2022/lib/apis/models/api-inventories.interfaces.mjs +0 -2
  62. package/esm2022/lib/apis/models/api-inventories.types.mjs +0 -2
  63. package/esm2022/lib/apis/models/api-invoices.interfaces.mjs +0 -2
  64. package/esm2022/lib/apis/models/api-invoices.types.mjs +0 -2
  65. package/esm2022/lib/apis/models/api-notifications.interfaces.mjs +0 -2
  66. package/esm2022/lib/apis/models/api-notifications.types.mjs +0 -2
  67. package/esm2022/lib/apis/models/api-open-items.interfaces.mjs +0 -2
  68. package/esm2022/lib/apis/models/api-open-items.types.mjs +0 -2
  69. package/esm2022/lib/apis/models/api-quote.interfaces.mjs +0 -2
  70. package/esm2022/lib/apis/models/api-quote.types.mjs +0 -2
  71. package/esm2022/lib/apis/models/api-reports.interfaces.mjs +0 -2
  72. package/esm2022/lib/apis/models/api-reports.types.mjs +0 -2
  73. package/esm2022/lib/apis/models/api-security.interfaces.mjs +0 -2
  74. package/esm2022/lib/apis/models/api-security.types.mjs +0 -2
  75. package/esm2022/lib/apis/models/api-services.interfaces.mjs +0 -2
  76. package/esm2022/lib/apis/models/api-services.types.mjs +0 -2
  77. package/esm2022/lib/apis/models/api-shipments.enums.mjs +0 -8
  78. package/esm2022/lib/apis/models/api-shipments.interfaces.mjs +0 -2
  79. package/esm2022/lib/apis/models/api-shipments.types.mjs +0 -2
  80. package/esm2022/lib/apis/models/api-supplies.interfaces.mjs +0 -2
  81. package/esm2022/lib/apis/models/api-supplies.types.mjs +0 -2
  82. package/esm2022/lib/apis/models/api.models.mjs +0 -2
  83. package/esm2022/lib/cypher/crypto.service.mjs +0 -93
  84. package/esm2022/lib/helpers/files.mjs +0 -9
  85. package/esm2022/lib/helpers/http.mjs +0 -66
  86. package/esm2022/lib/interceptors/api-headers.interceptor.mjs +0 -24
  87. package/esm2022/lib/interceptors/api-key.interceptor.mjs +0 -48
  88. package/esm2022/lib/interceptors/api-token.interceptor.mjs +0 -28
  89. package/esm2022/lib/interceptors/http-caching.interceptor.mjs +0 -37
  90. package/esm2022/lib/ngx-services.models.mjs +0 -11
  91. package/esm2022/lib/ngx-services.module.mjs +0 -33
  92. package/esm2022/lib/websockets/web-sockets.service.mjs +0 -115
  93. package/esm2022/public-api.mjs +0 -94
  94. package/lib/apis/api-billing-do.service.d.ts +0 -24
  95. package/lib/apis/api-billing-gt.service.d.ts +0 -38
  96. package/lib/apis/api-billing-mx.service.d.ts +0 -39
  97. package/lib/apis/api-billing-pa.service.d.ts +0 -68
  98. package/lib/apis/api-billing-sv.service.d.ts +0 -55
  99. package/lib/apis/api-cash-operations.service.d.ts +0 -62
  100. package/lib/apis/api-catalogs.service.d.ts +0 -451
  101. package/lib/apis/api-companies.service.d.ts +0 -714
  102. package/lib/apis/api-composition.service.d.ts +0 -35
  103. package/lib/apis/api-customs.service.d.ts +0 -110
  104. package/lib/apis/api-discounts.service.d.ts +0 -167
  105. package/lib/apis/api-e-tools-auto-billing.service.d.ts +0 -49
  106. package/lib/apis/api-events.service.d.ts +0 -33
  107. package/lib/apis/api-external-ops.service.d.ts +0 -54
  108. package/lib/apis/api-inventories.service.d.ts +0 -145
  109. package/lib/apis/api-invoices.service.d.ts +0 -317
  110. package/lib/apis/api-notifications.service.d.ts +0 -70
  111. package/lib/apis/api-open-items.service.d.ts +0 -41
  112. package/lib/apis/api-quote.service.d.ts +0 -65
  113. package/lib/apis/api-reports.service.d.ts +0 -120
  114. package/lib/apis/api-security.service.d.ts +0 -162
  115. package/lib/apis/api-services.service.d.ts +0 -67
  116. package/lib/apis/api-shipments.service.d.ts +0 -77
  117. package/lib/apis/api-supplies.service.d.ts +0 -93
  118. package/lib/apis/models/api-billing-do.interfaces.d.ts +0 -6
  119. package/lib/apis/models/api-billing-do.types.d.ts +0 -5
  120. package/lib/apis/models/api-billing-mx.interfaces.d.ts +0 -21
  121. package/lib/apis/models/api-billing-mx.types.d.ts +0 -13
  122. package/lib/apis/models/api-billing-pa.interfaces.d.ts +0 -26
  123. package/lib/apis/models/api-billing-pa.types.d.ts +0 -16
  124. package/lib/apis/models/api-billing-sv.interfaces.d.ts +0 -22
  125. package/lib/apis/models/api-billing-sv.types.d.ts +0 -21
  126. package/lib/apis/models/api-billing.models.d.ts +0 -27
  127. package/lib/apis/models/api-cash-operations.interfaces.d.ts +0 -40
  128. package/lib/apis/models/api-cash-operations.types.d.ts +0 -30
  129. package/lib/apis/models/api-catalog.enum.d.ts +0 -7
  130. package/lib/apis/models/api-catalog.interfaces.d.ts +0 -211
  131. package/lib/apis/models/api-catalog.types.d.ts +0 -213
  132. package/lib/apis/models/api-companies.interfaces.d.ts +0 -346
  133. package/lib/apis/models/api-companies.types.d.ts +0 -461
  134. package/lib/apis/models/api-composition.interfaces.d.ts +0 -272
  135. package/lib/apis/models/api-composition.types.d.ts +0 -9
  136. package/lib/apis/models/api-customs.interfaces.d.ts +0 -125
  137. package/lib/apis/models/api-customs.types.d.ts +0 -90
  138. package/lib/apis/models/api-discounts.interfaces.d.ts +0 -78
  139. package/lib/apis/models/api-discounts.types.d.ts +0 -89
  140. package/lib/apis/models/api-e-tools-auto-billing.interfaces.d.ts +0 -45
  141. package/lib/apis/models/api-e-tools-auto-billing.types.d.ts +0 -30
  142. package/lib/apis/models/api-events.enum.d.ts +0 -5
  143. package/lib/apis/models/api-events.interfaces.d.ts +0 -21
  144. package/lib/apis/models/api-events.types.d.ts +0 -14
  145. package/lib/apis/models/api-external-ops.interfaces.d.ts +0 -21
  146. package/lib/apis/models/api-external-ops.types.d.ts +0 -35
  147. package/lib/apis/models/api-inventories.enum.d.ts +0 -18
  148. package/lib/apis/models/api-inventories.interfaces.d.ts +0 -40
  149. package/lib/apis/models/api-inventories.types.d.ts +0 -62
  150. package/lib/apis/models/api-invoices.interfaces.d.ts +0 -277
  151. package/lib/apis/models/api-invoices.types.d.ts +0 -236
  152. package/lib/apis/models/api-notifications.interfaces.d.ts +0 -36
  153. package/lib/apis/models/api-notifications.types.d.ts +0 -34
  154. package/lib/apis/models/api-open-items.interfaces.d.ts +0 -32
  155. package/lib/apis/models/api-open-items.types.d.ts +0 -58
  156. package/lib/apis/models/api-quote.interfaces.d.ts +0 -13
  157. package/lib/apis/models/api-quote.types.d.ts +0 -17
  158. package/lib/apis/models/api-reports.interfaces.d.ts +0 -353
  159. package/lib/apis/models/api-reports.types.d.ts +0 -59
  160. package/lib/apis/models/api-security.interfaces.d.ts +0 -68
  161. package/lib/apis/models/api-security.types.d.ts +0 -72
  162. package/lib/apis/models/api-services.interfaces.d.ts +0 -49
  163. package/lib/apis/models/api-services.types.d.ts +0 -67
  164. package/lib/apis/models/api-shipments.enums.d.ts +0 -6
  165. package/lib/apis/models/api-shipments.interfaces.d.ts +0 -41
  166. package/lib/apis/models/api-shipments.types.d.ts +0 -121
  167. package/lib/apis/models/api-supplies.interfaces.d.ts +0 -40
  168. package/lib/apis/models/api-supplies.types.d.ts +0 -50
  169. package/lib/apis/models/api.models.d.ts +0 -36
  170. package/lib/cypher/crypto.service.d.ts +0 -15
  171. package/lib/helpers/files.d.ts +0 -2
  172. package/lib/helpers/http.d.ts +0 -38
  173. package/lib/interceptors/api-headers.interceptor.d.ts +0 -12
  174. package/lib/interceptors/api-key.interceptor.d.ts +0 -35
  175. package/lib/interceptors/api-token.interceptor.d.ts +0 -11
  176. package/lib/interceptors/http-caching.interceptor.d.ts +0 -12
  177. package/lib/ngx-services.models.d.ts +0 -63
  178. package/lib/ngx-services.module.d.ts +0 -16
  179. package/lib/websockets/web-sockets.service.d.ts +0 -49
  180. package/public-api.d.ts +0 -84
@@ -1,11 +1,9 @@
1
1
  import * as i0 from '@angular/core';
2
- import { InjectionToken, NgModule, Injectable, Inject, inject } from '@angular/core';
3
- import * as i1 from '@angular/common/http';
4
- import { provideHttpClient, HttpHeaders, HttpResponse, HttpParams } from '@angular/common/http';
2
+ import { InjectionToken, makeEnvironmentProviders, NgModule, inject, Injectable } from '@angular/core';
3
+ import { provideHttpClient, HttpClient, HttpHeaders, HttpResponse, HttpParams } from '@angular/common/http';
5
4
  import { map, mergeMap, forkJoin, tap, Observable, of } from 'rxjs';
6
- import * as i1$1 from 'ngx-cookie-service';
7
- import { CookieService } from 'ngx-cookie-service';
8
5
  import { map as map$1, tap as tap$1 } from 'rxjs/operators';
6
+ import { CookieService } from 'ngx-cookie-service';
9
7
  import Pusher from 'pusher-js';
10
8
 
11
9
  /**
@@ -16,7 +14,22 @@ import Pusher from 'pusher-js';
16
14
  * within the application. This token is typically associated with an
17
15
  * `Environment` type that defines the structure of the configuration.
18
16
  */
19
- const ENVIRONMENT_TOKEN = new InjectionToken('Environments token');
17
+ const ENVIRONMENT_TOKEN = new InjectionToken('ENVIRONMENT_TOKEN');
18
+
19
+ /**
20
+ * Provides ngx-services dependencies for standalone Angular applications.
21
+ *
22
+ * Register this provider in `ApplicationConfig.providers` so all services in
23
+ * this library can resolve the environment-based configuration.
24
+ */
25
+ function provideNgxServices(environment) {
26
+ return makeEnvironmentProviders([
27
+ {
28
+ provide: ENVIRONMENT_TOKEN,
29
+ useValue: environment
30
+ }
31
+ ]);
32
+ }
20
33
 
21
34
  class NgxServicesModule {
22
35
  /**
@@ -25,23 +38,21 @@ class NgxServicesModule {
25
38
  * @param {Environment} environment - The environment configuration object.
26
39
  *
27
40
  * @return {ModuleWithProviders<NgxServicesModule>} The module with providers for the NgxServicesModule.
41
+ *
42
+ * @deprecated Use `provideNgxServices(environment)` in `ApplicationConfig.providers`
43
+ * for standalone applications. This API will be removed in `20.2.0`.
28
44
  */
29
45
  static forRoot(environment) {
30
46
  return {
31
47
  ngModule: NgxServicesModule,
32
- providers: [
33
- {
34
- provide: 'env',
35
- useValue: environment
36
- }
37
- ]
48
+ providers: [provideNgxServices(environment)]
38
49
  };
39
50
  }
40
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: NgxServicesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
41
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.13", ngImport: i0, type: NgxServicesModule });
42
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: NgxServicesModule, providers: [provideHttpClient()] });
51
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: NgxServicesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
52
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.18", ngImport: i0, type: NgxServicesModule });
53
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: NgxServicesModule, providers: [provideHttpClient()] });
43
54
  }
44
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: NgxServicesModule, decorators: [{
55
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: NgxServicesModule, decorators: [{
45
56
  type: NgModule,
46
57
  args: [{
47
58
  providers: [provideHttpClient()]
@@ -49,128 +60,110 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
49
60
  }] });
50
61
 
51
62
  class ApiBillingDOService {
52
- environments;
53
- http;
54
- constructor(environments, http) {
55
- this.environments = environments;
56
- this.http = http;
57
- }
63
+ environments = inject(ENVIRONMENT_TOKEN);
64
+ http = inject(HttpClient);
58
65
  /**
59
- * Retrieves the URL for the shipments API from the environment configurations.
66
+ * Gets the base URL for Billing DO API endpoints.
60
67
  *
61
- * @return {string} The URL of the shipments API.
68
+ * @returns {string} Billing DO API base URL, or an empty string when it is not configured.
62
69
  */
63
70
  get url() {
64
71
  return this.environments.apiBillingDO ?? '';
65
72
  }
66
73
  /**
67
- * Retrieves a list of income types
74
+ * Retrieves the list of income types from Billing DO.
68
75
  *
69
- * @return {Observable<ApiSuccess<IncomeTypesOut>>} An observable that emits the income types data.
76
+ * @returns {Observable<IncomeTypesOut>} Observable that emits the income types payload.
70
77
  */
71
78
  getIncomeTypes() {
72
79
  return this.http.get(`${this.url}/income-types`)
73
80
  .pipe(map(({ data }) => data));
74
81
  }
75
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ApiBillingDOService, deps: [{ token: 'env' }, { token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
76
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ApiBillingDOService, providedIn: 'root' });
82
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ApiBillingDOService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
83
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ApiBillingDOService, providedIn: 'root' });
77
84
  }
78
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ApiBillingDOService, decorators: [{
85
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ApiBillingDOService, decorators: [{
79
86
  type: Injectable,
80
87
  args: [{
81
88
  providedIn: 'root'
82
89
  }]
83
- }], ctorParameters: () => [{ type: undefined, decorators: [{
84
- type: Inject,
85
- args: ['env']
86
- }] }, { type: i1.HttpClient }] });
90
+ }] });
87
91
 
88
92
  class ApiBillingGtService {
89
- environments;
90
- http;
91
- constructor(environments, http) {
92
- this.environments = environments;
93
- this.http = http;
94
- }
93
+ environments = inject(ENVIRONMENT_TOKEN);
94
+ http = inject(HttpClient);
95
95
  /**
96
- * Retrieves the URL for the billing GT API from the environment configurations.
96
+ * Gets the base URL for Billing GT API endpoints.
97
97
  *
98
- * @return {string} The URL of the shipments API.
98
+ * @returns {string} Billing GT API base URL, or an empty string when it is not configured.
99
99
  */
100
100
  get url() {
101
101
  return this.environments.apiBillingGT ?? '';
102
102
  }
103
103
  /**
104
- * RRetrieves the list of billing configurations to locations
104
+ * Retrieves the list of billing configurations by location.
105
105
  *
106
- * @return {Observable<BillingConfigsOut>} An observable that emits an array of billing configurations to locations
106
+ * @returns {Observable<BillingConfigsOut>} Observable that emits the billing configurations payload.
107
107
  */
108
108
  getConfigs() {
109
109
  return this.http.get(`${this.url}/location/configs`)
110
110
  .pipe(map(({ data }) => data));
111
111
  }
112
112
  /**
113
- * Retrieves the details of a location in billing configurations
113
+ * Retrieves billing configuration details for a location.
114
114
  *
115
- * @param {number} id - The id of the location to fetch.
116
- * @return {Observable<BillingConfigOut>} An observable that emits the location billing configuration data.
115
+ * @param {number} id - Location identifier to fetch.
116
+ * @returns {Observable<BillingConfigOut>} Observable that emits the location billing configuration payload.
117
117
  */
118
118
  getConfig(id) {
119
119
  return this.http.get(`${this.url}/locations/${id}`)
120
120
  .pipe(map(({ data }) => data));
121
121
  }
122
122
  /**
123
- * Sends a POST request to create a new billing configuration location.
123
+ * Creates a billing configuration for a location.
124
124
  *
125
- * @param {BillingConfigIn} body - The billing configuration to location data to be sent in the request body.
126
- * @return {Observable<BillingConfigOut>} An observable emitting the created billing configuration to location data.
125
+ * @param {BillingConfigIn} body - Billing configuration payload for the location.
126
+ * @returns {Observable<BillingConfigOut>} Observable that emits the created billing configuration payload.
127
127
  */
128
128
  postConfigs(body) {
129
129
  return this.http.post(`${this.url}/locations`, body)
130
130
  .pipe(map(({ data }) => data));
131
131
  }
132
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ApiBillingGtService, deps: [{ token: 'env' }, { token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
133
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ApiBillingGtService, providedIn: 'root' });
132
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ApiBillingGtService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
133
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ApiBillingGtService, providedIn: 'root' });
134
134
  }
135
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ApiBillingGtService, decorators: [{
135
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ApiBillingGtService, decorators: [{
136
136
  type: Injectable,
137
137
  args: [{
138
138
  providedIn: 'root'
139
139
  }]
140
- }], ctorParameters: () => [{ type: undefined, decorators: [{
141
- type: Inject,
142
- args: ['env']
143
- }] }, { type: i1.HttpClient }] });
140
+ }] });
144
141
 
145
142
  class ApiBillingMxService {
146
- environments;
147
- http;
148
- constructor(environments, http) {
149
- this.environments = environments;
150
- this.http = http;
151
- }
143
+ environments = inject(ENVIRONMENT_TOKEN);
144
+ http = inject(HttpClient);
152
145
  /**
153
- * Retrieves the URL for the shipments API from the environment configurations.
146
+ * Gets the base URL for Billing MX API endpoints.
154
147
  *
155
- * @return {string} The URL of the shipments API.
148
+ * @returns {string} Billing MX API base URL, or an empty string when it is not configured.
156
149
  */
157
150
  get url() {
158
151
  return this.environments.apiBillingMX ?? '';
159
152
  }
160
153
  /**
161
- * Fetches the tax regimen data from the server.
154
+ * Retrieves the list of fiscal regimens from Billing MX.
162
155
  *
163
- * @return {Observable<FiscalRegimensOut>} An observable that emits the fiscal regimen data.
156
+ * @returns {Observable<FiscalRegimensOut>} Observable that emits the fiscal regimens payload.
164
157
  */
165
158
  getFiscalRegimens() {
166
159
  return this.http.get(`${this.url}/fiscal-regimens`)
167
160
  .pipe(map(({ data }) => data));
168
161
  }
169
162
  /**
170
- * Fetches a paginated list of CFDIs (Comprobante Fiscal Digital por Internet) based on the provided fiscal regimen.
163
+ * Retrieves the CFDI uses accepted for a fiscal regimen.
171
164
  *
172
- * @param {number} fiscalRegimen - The fiscal regimen identifier to filter the CFDIs.
173
- * @return {Observable<FiscalRegimensAcceptedOut>} An observable containing the paginated list of CFDIs.
165
+ * @param {number} fiscalRegimen Fiscal regimen identifier used to filter accepted CFDI uses.
166
+ * @returns {Observable<FiscalRegimensAcceptedOut>} Observable that emits the accepted CFDI uses payload.
174
167
  */
175
168
  getFiscalRegimensAccepted(fiscalRegimen) {
176
169
  const params = { 'fiscal-regimen': fiscalRegimen };
@@ -178,48 +171,41 @@ class ApiBillingMxService {
178
171
  .pipe(map(({ data }) => data));
179
172
  }
180
173
  /**
181
- * Fetches and validates postal code data from the server.
174
+ * Retrieves postal code information from Billing MX.
182
175
  *
183
- * @param {QueryParams} params - Query parameters used to filter the postal code data.
184
- * @return {Observable<PostalCodesOut>} - An observable emitting the validated postal code data.
176
+ * @param {QueryParams} params Query parameters used by the postal codes endpoint.
177
+ * @returns {Observable<PostalCodesOut>} Observable that emits the postal code data payload.
185
178
  */
186
179
  getPostalCodes(params) {
187
180
  return this.http.get(`${this.url}/postal-codes`, { params })
188
181
  .pipe(map(({ data }) => data));
189
182
  }
190
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ApiBillingMxService, deps: [{ token: 'env' }, { token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
191
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ApiBillingMxService, providedIn: 'root' });
183
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ApiBillingMxService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
184
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ApiBillingMxService, providedIn: 'root' });
192
185
  }
193
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ApiBillingMxService, decorators: [{
186
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ApiBillingMxService, decorators: [{
194
187
  type: Injectable,
195
188
  args: [{
196
189
  providedIn: 'root'
197
190
  }]
198
- }], ctorParameters: () => [{ type: undefined, decorators: [{
199
- type: Inject,
200
- args: ['env']
201
- }] }, { type: i1.HttpClient }] });
191
+ }] });
202
192
 
203
193
  class ApiBillingPaService {
204
- environments;
205
- http;
206
- constructor(environments, http) {
207
- this.environments = environments;
208
- this.http = http;
209
- }
194
+ environments = inject(ENVIRONMENT_TOKEN);
195
+ http = inject(HttpClient);
210
196
  /**
211
- * Retrieves the URL for the Billing Pa API from the environment configurations.
197
+ * Gets the base URL for Billing PA API endpoints.
212
198
  *
213
- * @return {string} The URL of the Billing Pa API.
199
+ * @returns {string} Billing PA API base URL, or an empty string when it is not configured.
214
200
  */
215
201
  get url() {
216
202
  return this.environments.apiBillingPA ?? '';
217
203
  }
218
204
  /**
219
- * Retrieves a list of districts based on query parameters.
205
+ * Retrieves the list of districts.
220
206
  *
221
- * @param {QueryParams} params - Query parameters for filtering the districts.
222
- * @returns {Observable<DistrictsOut>} The list of districts.
207
+ * @param {QueryParams} params Query parameters used by the districts endpoint.
208
+ * @returns {Observable<DistrictsOut>} Observable that emits the districts payload.
223
209
  */
224
210
  getDistricts(params) {
225
211
  return this.http.get(`${this.url}/districts`, {
@@ -227,10 +213,10 @@ class ApiBillingPaService {
227
213
  }).pipe(map(({ data }) => data));
228
214
  }
229
215
  /**
230
- * Retrieves a list of parishes based on query parameters.
216
+ * Retrieves the list of parishes.
231
217
  *
232
- * @param {QueryParams} params - Query parameters for filtering the parishes.
233
- * @returns {Observable<ParishesOut>} The list of parishes.
218
+ * @param {QueryParams} params Query parameters used by the parishes endpoint.
219
+ * @returns {Observable<ParishesOut>} Observable that emits the parishes payload.
234
220
  */
235
221
  getParishes(params) {
236
222
  return this.http.get(`${this.url}/parishes`, {
@@ -238,10 +224,10 @@ class ApiBillingPaService {
238
224
  }).pipe(map(({ data }) => data));
239
225
  }
240
226
  /**
241
- * Retrieves a list of provinces based on query parameters.
227
+ * Retrieves the list of provinces.
242
228
  *
243
- * @param {QueryParams} params - Query parameters for filtering the provinces.
244
- * @returns {Observable<ProvincesOut>} The list of provinces.
229
+ * @param {QueryParams} params Query parameters used by the provinces endpoint.
230
+ * @returns {Observable<ProvincesOut>} Observable that emits the provinces payload.
245
231
  */
246
232
  getProvinces(params) {
247
233
  return this.http.get(`${this.url}/provinces`, {
@@ -249,10 +235,10 @@ class ApiBillingPaService {
249
235
  }).pipe(map(({ data }) => data));
250
236
  }
251
237
  /**
252
- * Retrieves the details of a customer based on query parameters.
238
+ * Validates a customer using Billing PA.
253
239
  *
254
- * @param {QueryParams} params - Query parameters for get customer.
255
- * @return {Observable<BillingPaCustomerOut>} An observable that emits customer data.
240
+ * @param {QueryParams} params Query parameters used by the customer validation endpoint.
241
+ * @returns {Observable<BillingPaCustomerOut>} Observable that emits customer validation data.
256
242
  */
257
243
  getValidateCustomer(params) {
258
244
  return this.http.get(`${this.url}/validate-customer`, {
@@ -260,59 +246,52 @@ class ApiBillingPaService {
260
246
  }).pipe(map(({ data }) => data));
261
247
  }
262
248
  /**
263
- * RRetrieves the list of billing configurations to locations
249
+ * Retrieves billing configurations by location.
264
250
  *
265
- * @return {Observable<BillingConfigsOut>} An observable that emits an array of billing configurations to locations
251
+ * @returns {Observable<BillingConfigsOut>} Observable that emits billing configuration items.
266
252
  */
267
253
  getConfigs() {
268
254
  return this.http.get(`${this.url}/location/configs`)
269
255
  .pipe(map(({ data }) => data));
270
256
  }
271
257
  /**
272
- * Retrieves the details of a location in billing configurations
258
+ * Retrieves the billing configuration for a location.
273
259
  *
274
- * @param {number} id - The id of the location to fetch.
275
- * @return {Observable<BillingConfigOut>} An observable that emits the location billing configuration data.
260
+ * @param {number} id Location identifier.
261
+ * @returns {Observable<BillingConfigOut>} Observable that emits the location billing configuration payload.
276
262
  */
277
263
  getConfig(id) {
278
264
  return this.http.get(`${this.url}/locations/${id}`)
279
265
  .pipe(map(({ data }) => data));
280
266
  }
281
267
  /**
282
- * Sends a POST request to create a new billing configuration location.
268
+ * Creates a billing configuration for a location.
283
269
  *
284
- * @param {BillingConfigIn} body - The billing configuration to location data to be sent in the request body.
285
- * @return {Observable<BillingConfigOut>} An observable emitting the created billing configuration to location data.
270
+ * @param {BillingConfigIn} body Billing configuration payload for the new location.
271
+ * @returns {Observable<BillingConfigOut>} Observable that emits the created billing configuration payload.
286
272
  */
287
273
  postConfigs(body) {
288
274
  return this.http.post(`${this.url}/locations`, body)
289
275
  .pipe(map(({ data }) => data));
290
276
  }
291
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ApiBillingPaService, deps: [{ token: 'env' }, { token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
292
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ApiBillingPaService, providedIn: 'root' });
277
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ApiBillingPaService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
278
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ApiBillingPaService, providedIn: 'root' });
293
279
  }
294
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ApiBillingPaService, decorators: [{
280
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ApiBillingPaService, decorators: [{
295
281
  type: Injectable,
296
282
  args: [{
297
283
  providedIn: 'root'
298
284
  }]
299
- }], ctorParameters: () => [{ type: undefined, decorators: [{
300
- type: Inject,
301
- args: ['env']
302
- }] }, { type: i1.HttpClient }] });
285
+ }] });
303
286
 
304
287
  class ApiBillingSvService {
305
- environments;
306
- http;
307
- constructor(environments, http) {
308
- this.environments = environments;
309
- this.http = http;
310
- }
288
+ environments = inject(ENVIRONMENT_TOKEN);
289
+ http = inject(HttpClient);
311
290
  /**
312
291
  * Retrieves the URL for the billing API.
313
292
  * If the URL is not defined in the environments configuration, returns an empty string.
314
293
  *
315
- * @return {string} The billing API URL or an empty string if not set.
294
+ * @returns {string} The billing API URL or an empty string if not set.
316
295
  */
317
296
  get url() {
318
297
  return this.environments.apiBillingSV ?? '';
@@ -321,7 +300,7 @@ class ApiBillingSvService {
321
300
  * Fetches the list of economic activities based on the provided query parameters.
322
301
  *
323
302
  * @param {QueryParams} params - The query parameters used to filter the economic activities.
324
- * @return {Observable<EconomicActivitiesOut>} An observable that emits the list of economic activities.
303
+ * @returns {Observable<EconomicActivitiesOut>} An observable that emits the list of economic activities.
325
304
  */
326
305
  getEconomicActivities(params) {
327
306
  return this.http.get(`${this.url}/economic-activities`, { params })
@@ -331,7 +310,7 @@ class ApiBillingSvService {
331
310
  * Retrieves the list of person types based on given query parameters.
332
311
  *
333
312
  * @param {QueryParams} params - The query parameters used to filter the person types.
334
- * @return {Observable<PersonTypesOut>} An observable that emits a list of person types.
313
+ * @returns {Observable<PersonTypesOut>} An observable that emits a list of person types.
335
314
  */
336
315
  getPersonTypes(params) {
337
316
  return this.http.get(`${this.url}/person-types`, { params })
@@ -341,7 +320,7 @@ class ApiBillingSvService {
341
320
  * Fetches the list of establishment types.
342
321
  *
343
322
  * @param {QueryParams} params The query parameters to be sent with the HTTP request.
344
- * @return {Observable<EstablishmentTypesOut>} An observable that emits the establishment types data.
323
+ * @returns {Observable<EstablishmentTypesOut>} An observable that emits the establishment types data.
345
324
  */
346
325
  getEstablishmentTypes(params) {
347
326
  return this.http.get(`${this.url}/establishment-types`, { params })
@@ -351,7 +330,7 @@ class ApiBillingSvService {
351
330
  * Fetches the list of departments based on the provided query parameters.
352
331
  *
353
332
  * @param {QueryParams} params - The query parameters to filter or modify the departments fetch request.
354
- * @return {Observable<DepartmentsOut>} An observable emitting the list of departments.
333
+ * @returns {Observable<DepartmentsOut>} An observable emitting the list of departments.
355
334
  */
356
335
  getDepartments(params) {
357
336
  return this.http.get(`${this.url}/departments`, { params })
@@ -361,36 +340,29 @@ class ApiBillingSvService {
361
340
  * Retrieves a list of municipalities based on the provided query parameters.
362
341
  *
363
342
  * @param {QueryParams} params - The query parameters used to filter the municipalities.
364
- * @return {Observable<MunicipalitiesOut>} An observable that emits the retrieved municipalities data.
343
+ * @returns {Observable<MunicipalitiesOut>} An observable that emits the retrieved municipalities data.
365
344
  */
366
345
  getMunicipalities(params) {
367
346
  return this.http.get(`${this.url}/municipalities`, { params })
368
347
  .pipe(map(({ data }) => data));
369
348
  }
370
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ApiBillingSvService, deps: [{ token: 'env' }, { token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
371
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ApiBillingSvService, providedIn: 'root' });
349
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ApiBillingSvService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
350
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ApiBillingSvService, providedIn: 'root' });
372
351
  }
373
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ApiBillingSvService, decorators: [{
352
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ApiBillingSvService, decorators: [{
374
353
  type: Injectable,
375
354
  args: [{
376
355
  providedIn: 'root'
377
356
  }]
378
- }], ctorParameters: () => [{ type: undefined, decorators: [{
379
- type: Inject,
380
- args: ['env']
381
- }] }, { type: i1.HttpClient }] });
357
+ }] });
382
358
 
383
359
  class ApiCashOperationsService {
384
- environments;
385
- http;
386
- constructor(environments, http) {
387
- this.environments = environments;
388
- this.http = http;
389
- }
360
+ environments = inject(ENVIRONMENT_TOKEN);
361
+ http = inject(HttpClient);
390
362
  /**
391
363
  * Retrieves the URL for the cash operations API from the environment configurations.
392
364
  *
393
- * @return {string} The URL of the cash operations API.
365
+ * @returns {string} The URL of the cash operations API.
394
366
  */
395
367
  get url() {
396
368
  return this.environments.apiCashOperationsUrl ?? '';
@@ -456,26 +428,28 @@ class ApiCashOperationsService {
456
428
  return this.http.get(`${this.url}/opening-transferences/${id}/receipt`)
457
429
  .pipe(map(({ data }) => data));
458
430
  }
459
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ApiCashOperationsService, deps: [{ token: 'env' }, { token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
460
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ApiCashOperationsService, providedIn: 'root' });
431
+ /**
432
+ * Retrieves a deposit slip by its ID.
433
+ * @param id - The unique identifier of the deposit slip to retrieve
434
+ * @returns An Observable that emits the deposit slip data
435
+ */
436
+ getDepositSlip(id) {
437
+ return this.http.get(`${this.url}/deposits/${id}/slip`)
438
+ .pipe(map(({ data }) => data));
439
+ }
440
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ApiCashOperationsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
441
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ApiCashOperationsService, providedIn: 'root' });
461
442
  }
462
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ApiCashOperationsService, decorators: [{
443
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ApiCashOperationsService, decorators: [{
463
444
  type: Injectable,
464
445
  args: [{
465
446
  providedIn: 'root'
466
447
  }]
467
- }], ctorParameters: () => [{ type: undefined, decorators: [{
468
- type: Inject,
469
- args: ['env']
470
- }] }, { type: i1.HttpClient }] });
448
+ }] });
471
449
 
472
450
  class ApiCatalogsService {
473
- environments;
474
- http;
475
- constructor(environments, http) {
476
- this.environments = environments;
477
- this.http = http;
478
- }
451
+ environments = inject(ENVIRONMENT_TOKEN);
452
+ http = inject(HttpClient);
479
453
  /**
480
454
  * Retrieves the URL for the reports API from the environment configurations.
481
455
  *
@@ -531,7 +505,7 @@ class ApiCatalogsService {
531
505
  * @param body - The identification type payload to create (IdentificationTypeIn).
532
506
  * @returns Observable<IdentificationTypeOut> that emits the created identification type on success.
533
507
  */
534
- postIdentificationtType(body) {
508
+ postIdentificationType(body) {
535
509
  return this.http.post(`${this.url}/identification-types`, body)
536
510
  .pipe(map(({ data }) => data));
537
511
  }
@@ -578,7 +552,7 @@ class ApiCatalogsService {
578
552
  * @param body - The identification type number validation payload to validate (IdentificationTypeNumberValidationIn).
579
553
  * @returns Observable<IdentificationTypeNumberValidationOut> that emits the validate status.
580
554
  */
581
- postIdentificationtTypeNumberValidation(body) {
555
+ postIdentificationTypeNumberValidation(body) {
582
556
  return this.http.post(`${this.url}/identification-types/number-validation`, body)
583
557
  .pipe(map(({ data }) => data));
584
558
  }
@@ -716,6 +690,15 @@ class ApiCatalogsService {
716
690
  return this.http.get(`${this.url}/currencies`, { params })
717
691
  .pipe(map(({ data }) => data));
718
692
  }
693
+ /**
694
+ * Retrieves currency information by ID.
695
+ * @param id - The unique identifier of the currency to retrieve.
696
+ * @returns An Observable that emits the currency data.
697
+ */
698
+ getCurrency(id) {
699
+ return this.http.get(`${this.url}/currencies/${id}`)
700
+ .pipe(map(({ data }) => data));
701
+ }
719
702
  /**
720
703
  * Fetches the list of available languages based on the provided query parameters.
721
704
  *
@@ -1068,26 +1051,28 @@ class ApiCatalogsService {
1068
1051
  getBusinessPartyTraderTypes(params) {
1069
1052
  return this.http.get(`${this.url}/business-party-trader-types`, { params }).pipe(map(({ data }) => data));
1070
1053
  }
1071
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ApiCatalogsService, deps: [{ token: 'env' }, { token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
1072
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ApiCatalogsService, providedIn: 'root' });
1054
+ /**
1055
+ * Retrieves package locations based on the provided query parameters.
1056
+ * @param params - Query parameters to filter or configure the package locations request
1057
+ * @returns An Observable that emits the package locations data
1058
+ */
1059
+ getPackageLocations(params) {
1060
+ return this.http.get(`${this.url}/package-locations`, { params })
1061
+ .pipe(map(({ data }) => data));
1062
+ }
1063
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ApiCatalogsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1064
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ApiCatalogsService, providedIn: 'root' });
1073
1065
  }
1074
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ApiCatalogsService, decorators: [{
1066
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ApiCatalogsService, decorators: [{
1075
1067
  type: Injectable,
1076
1068
  args: [{
1077
1069
  providedIn: 'root'
1078
1070
  }]
1079
- }], ctorParameters: () => [{ type: undefined, decorators: [{
1080
- type: Inject,
1081
- args: ['env']
1082
- }] }, { type: i1.HttpClient }] });
1071
+ }] });
1083
1072
 
1084
1073
  class ApiCompaniesService {
1085
- environments;
1086
- http;
1087
- constructor(environments, http) {
1088
- this.environments = environments;
1089
- this.http = http;
1090
- }
1074
+ environments = inject(ENVIRONMENT_TOKEN);
1075
+ http = inject(HttpClient);
1091
1076
  /**
1092
1077
  * Retrieves the URL for the companies API from the environment configurations.
1093
1078
  *
@@ -1270,6 +1255,25 @@ class ApiCompaniesService {
1270
1255
  return this.http.put(`${this.url}/employees/${id}`, body)
1271
1256
  .pipe(map(({ data }) => data));
1272
1257
  }
1258
+ /**
1259
+ * Updates an employee with the specified ID using the provided partial data.
1260
+ * @param id - The unique identifier of the employee to update
1261
+ * @param body - Partial employee data containing the fields to update
1262
+ * @returns An Observable that emits the updated employee data
1263
+ */
1264
+ patchEmployee(id, body) {
1265
+ return this.http.patch(`${this.url}/employees/${id}`, body)
1266
+ .pipe(map(({ data }) => data));
1267
+ }
1268
+ /**
1269
+ * Enable an employee with the specified ID.
1270
+ * @param id - The unique identifier of the employee to update
1271
+ * @returns An Observable that emits the enabled employee data
1272
+ */
1273
+ patchEmployeeEnable(id) {
1274
+ return this.http.patch(`${this.url}/employees/${id}/enable`, {})
1275
+ .pipe(map(({ data }) => data));
1276
+ }
1273
1277
  /**
1274
1278
  * Deletes an employee based on the provided ID.
1275
1279
  *
@@ -1895,6 +1899,24 @@ class ApiCompaniesService {
1895
1899
  return this.http.post(`${this.url}/workflow-configs/batch`, body)
1896
1900
  .pipe(map(({ data }) => data));
1897
1901
  }
1902
+ /**
1903
+ * Retrieves a list of companies based on the provided query parameters.
1904
+ * @param params - The query parameters to filter and paginate the companies list
1905
+ * @returns An Observable that emits the companies data
1906
+ */
1907
+ getCompanies(params) {
1908
+ return this.http.get(`${this.url}/companies`, { params })
1909
+ .pipe(map(({ data }) => data));
1910
+ }
1911
+ /**
1912
+ * Retrieves a company by its ID.
1913
+ * @param id - The unique identifier of the company to retrieve.
1914
+ * @returns An Observable that emits the company data.
1915
+ */
1916
+ getCompany(id) {
1917
+ return this.http.get(`${this.url}/companies/${id}`)
1918
+ .pipe(map(({ data }) => data));
1919
+ }
1898
1920
  /**
1899
1921
  * Sends a POST request to create a new company and returns the created company's details.
1900
1922
  *
@@ -2095,32 +2117,23 @@ class ApiCompaniesService {
2095
2117
  }
2096
2118
  }).pipe(map(({ data }) => data));
2097
2119
  }
2098
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ApiCompaniesService, deps: [{ token: 'env' }, { token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
2099
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ApiCompaniesService, providedIn: 'root' });
2120
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ApiCompaniesService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
2121
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ApiCompaniesService, providedIn: 'root' });
2100
2122
  }
2101
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ApiCompaniesService, decorators: [{
2123
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ApiCompaniesService, decorators: [{
2102
2124
  type: Injectable,
2103
2125
  args: [{
2104
2126
  providedIn: 'root'
2105
2127
  }]
2106
- }], ctorParameters: () => [{ type: undefined, decorators: [{
2107
- type: Inject,
2108
- args: ['env']
2109
- }] }, { type: i1.HttpClient }] });
2128
+ }] });
2110
2129
 
2111
2130
  class ApiCompositionService {
2112
- environments;
2113
- cookie;
2114
- http;
2115
- constructor(environments, cookie, http) {
2116
- this.environments = environments;
2117
- this.cookie = cookie;
2118
- this.http = http;
2119
- }
2131
+ environments = inject(ENVIRONMENT_TOKEN);
2132
+ http = inject(HttpClient);
2120
2133
  /**
2121
2134
  * Retrieves the API security URL from the environment configuration.
2122
2135
  *
2123
- * @return {string} The API security URL.
2136
+ * @returns {string} The API security URL.
2124
2137
  */
2125
2138
  get url() {
2126
2139
  return this.environments.apiCompositionUrl ?? '';
@@ -2129,7 +2142,7 @@ class ApiCompositionService {
2129
2142
  * Retrieves shipment details based on the provided shipment ID.
2130
2143
  *
2131
2144
  * @param {number} id - The unique identifier of the shipment to retrieve.
2132
- * @return {Observable<ShipmentOut>} An observable that emits the details of the shipment.
2145
+ * @returns {Observable<ShipmentOut>} An observable that emits the details of the shipment.
2133
2146
  */
2134
2147
  getShipment(id) {
2135
2148
  return this.http.get(`${this.url}/shipments/${id}`)
@@ -2139,32 +2152,25 @@ class ApiCompositionService {
2139
2152
  * Fetches the country references data based on the provided query parameters.
2140
2153
  *
2141
2154
  * @param {QueryParams} params - The query parameters for the API request.
2142
- * @return {Observable<CompositionCountryReferencesOut>} - An observable emitting the country references.
2155
+ * @returns {Observable<CompositionCountryReferencesOut>} An observable emitting the country references.
2143
2156
  */
2144
2157
  getCountryReferences(params) {
2145
2158
  return this.http.get(`${this.url}/country-references`, { params })
2146
2159
  .pipe(map(({ data }) => data));
2147
2160
  }
2148
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ApiCompositionService, deps: [{ token: 'env' }, { token: i1$1.CookieService }, { token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
2149
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ApiCompositionService, providedIn: 'root' });
2161
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ApiCompositionService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
2162
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ApiCompositionService, providedIn: 'root' });
2150
2163
  }
2151
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ApiCompositionService, decorators: [{
2164
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ApiCompositionService, decorators: [{
2152
2165
  type: Injectable,
2153
2166
  args: [{
2154
2167
  providedIn: 'root'
2155
2168
  }]
2156
- }], ctorParameters: () => [{ type: undefined, decorators: [{
2157
- type: Inject,
2158
- args: ['env']
2159
- }] }, { type: i1$1.CookieService }, { type: i1.HttpClient }] });
2169
+ }] });
2160
2170
 
2161
2171
  class ApiCustomsService {
2162
- environments;
2163
- http;
2164
- constructor(environments, http) {
2165
- this.environments = environments;
2166
- this.http = http;
2167
- }
2172
+ environments = inject(ENVIRONMENT_TOKEN);
2173
+ http = inject(HttpClient);
2168
2174
  /**
2169
2175
  * Retrieves the URL for the cash operations API from the environment configurations.
2170
2176
  *
@@ -2298,26 +2304,19 @@ class ApiCustomsService {
2298
2304
  params
2299
2305
  }).pipe(map(({ data }) => data));
2300
2306
  }
2301
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ApiCustomsService, deps: [{ token: 'env' }, { token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
2302
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ApiCustomsService, providedIn: 'root' });
2307
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ApiCustomsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
2308
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ApiCustomsService, providedIn: 'root' });
2303
2309
  }
2304
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ApiCustomsService, decorators: [{
2310
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ApiCustomsService, decorators: [{
2305
2311
  type: Injectable,
2306
2312
  args: [{
2307
2313
  providedIn: 'root'
2308
2314
  }]
2309
- }], ctorParameters: () => [{ type: undefined, decorators: [{
2310
- type: Inject,
2311
- args: ['env']
2312
- }] }, { type: i1.HttpClient }] });
2315
+ }] });
2313
2316
 
2314
2317
  class ApiDiscountsService {
2315
- environments;
2316
- http;
2317
- constructor(environments, http) {
2318
- this.environments = environments;
2319
- this.http = http;
2320
- }
2318
+ environments = inject(ENVIRONMENT_TOKEN);
2319
+ http = inject(HttpClient);
2321
2320
  /**
2322
2321
  * Gets the API endpoint URL for discounts from the environments configuration.
2323
2322
  *
@@ -2404,13 +2403,12 @@ class ApiDiscountsService {
2404
2403
  .pipe(map(({ data }) => data));
2405
2404
  }
2406
2405
  /**
2407
- * Sends a PUT request to update the loyalty period with the provided data.
2408
- *
2409
- * @param {LoyaltyPeriodIn} body - The data for the loyalty period to be updated.
2410
- * @return {Observable<LoyaltyPeriodOut>} An observable that emits the updated loyalty period data.
2406
+ * Creates a new loyalty period.
2407
+ * @param body - The loyalty period input data
2408
+ * @returns An observable that emits the created loyalty period output data
2411
2409
  */
2412
2410
  postLoyaltyPeriod(body) {
2413
- return this.http.put(`${this.url}/loyalty-periods`, body)
2411
+ return this.http.post(`${this.url}/loyalty-periods`, body)
2414
2412
  .pipe(map(({ data }) => data));
2415
2413
  }
2416
2414
  /**
@@ -2451,7 +2449,7 @@ class ApiDiscountsService {
2451
2449
  * @return {Observable<LoyaltyRuleOut>} An observable that emits the updated loyalty rule details.
2452
2450
  */
2453
2451
  postLoyaltyRule(body) {
2454
- return this.http.put(`${this.url}/loyalty-rules`, body)
2452
+ return this.http.post(`${this.url}/loyalty-rules`, body)
2455
2453
  .pipe(map(({ data }) => data));
2456
2454
  }
2457
2455
  /**
@@ -2537,26 +2535,19 @@ class ApiDiscountsService {
2537
2535
  return this.http.put(`${this.url}/customer-restrictions/V2/${id}`, body)
2538
2536
  .pipe(map(({ data }) => data));
2539
2537
  }
2540
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ApiDiscountsService, deps: [{ token: 'env' }, { token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
2541
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ApiDiscountsService, providedIn: 'root' });
2538
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ApiDiscountsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
2539
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ApiDiscountsService, providedIn: 'root' });
2542
2540
  }
2543
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ApiDiscountsService, decorators: [{
2541
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ApiDiscountsService, decorators: [{
2544
2542
  type: Injectable,
2545
2543
  args: [{
2546
2544
  providedIn: 'root'
2547
2545
  }]
2548
- }], ctorParameters: () => [{ type: undefined, decorators: [{
2549
- type: Inject,
2550
- args: ['env']
2551
- }] }, { type: i1.HttpClient }] });
2546
+ }] });
2552
2547
 
2553
2548
  class ApiEToolsAutoBillingService {
2554
- environments;
2555
- http;
2556
- constructor(environments, http) {
2557
- this.environments = environments;
2558
- this.http = http;
2559
- }
2549
+ environments = inject(ENVIRONMENT_TOKEN);
2550
+ http = inject(HttpClient);
2560
2551
  /**
2561
2552
  * Retrieves the URL for the shipments API from the environment configurations.
2562
2553
  *
@@ -2608,30 +2599,54 @@ class ApiEToolsAutoBillingService {
2608
2599
  params
2609
2600
  }).pipe(map(({ data }) => data));
2610
2601
  }
2611
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ApiEToolsAutoBillingService, deps: [{ token: 'env' }, { token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
2612
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ApiEToolsAutoBillingService, providedIn: 'root' });
2602
+ /**
2603
+ * Cancels the billing of an external shipment.
2604
+ *
2605
+ * This method sends a POST request to the backend in order to cancel
2606
+ *
2607
+ * @param params Object containing the required cancellation data
2608
+ * @param params.id External shipment ID
2609
+ * @param params.documentId Billing document ID
2610
+ * @param params.cancellationReasonId Cancellation reason ID
2611
+ *
2612
+ * @returns Observable that emits an empty array when the operation is successful
2613
+ */
2614
+ postExternalShipmentCancelBilling({ id, documentId, cancellationReasonId }) {
2615
+ return this.http.post(`${this.url}/external-shipments/${id}/cancel-billing`, {
2616
+ documentId,
2617
+ cancellationReasonId
2618
+ })
2619
+ .pipe(map(({ data }) => data));
2620
+ }
2621
+ /**
2622
+ * Re-bills an external shipment.
2623
+ *
2624
+ * This method sends a POST request to the backend to regenerate
2625
+ * @param id External shipment ID
2626
+ * @param body Data required to perform the re-billing
2627
+ * @returns Observable that emits an empty array when the operation is successful
2628
+ */
2629
+ postExternalShipmentReBilling(id, body) {
2630
+ return this.http.post(`${this.url}/external-shipments/${id}/re-billing`, body)
2631
+ .pipe(map(({ data }) => data));
2632
+ }
2633
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ApiEToolsAutoBillingService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
2634
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ApiEToolsAutoBillingService, providedIn: 'root' });
2613
2635
  }
2614
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ApiEToolsAutoBillingService, decorators: [{
2636
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ApiEToolsAutoBillingService, decorators: [{
2615
2637
  type: Injectable,
2616
2638
  args: [{
2617
2639
  providedIn: 'root'
2618
2640
  }]
2619
- }], ctorParameters: () => [{ type: undefined, decorators: [{
2620
- type: Inject,
2621
- args: ['env']
2622
- }] }, { type: i1.HttpClient }] });
2641
+ }] });
2623
2642
 
2624
2643
  class ApiEventsService {
2625
- environments;
2626
- http;
2627
- constructor(environments, http) {
2628
- this.environments = environments;
2629
- this.http = http;
2630
- }
2644
+ environments = inject(ENVIRONMENT_TOKEN);
2645
+ http = inject(HttpClient);
2631
2646
  /**
2632
2647
  * Gets the API endpoint URL for Events from the environments configuration.
2633
2648
  *
2634
- * @return {string} The URL for the Events API. Returns an empty string if not defined.
2649
+ * @returns {string} The URL for the Events API. Returns an empty string if not defined.
2635
2650
  */
2636
2651
  get url() {
2637
2652
  return this.environments.apiEventsUrl ?? '';
@@ -2640,7 +2655,7 @@ class ApiEventsService {
2640
2655
  * Sends a request to start an event
2641
2656
  *
2642
2657
  * @param {OperationModuleStartIn} body - The event information to be submitted.
2643
- * @return {Observable<OperationModuleOut>} An Observable emitting the server's response containing the created event details.
2658
+ * @returns {Observable<OperationModuleOut>} An Observable emitting the server's response containing the created event details.
2644
2659
  */
2645
2660
  postOperationModulesStart(body) {
2646
2661
  return this.http.post(`${this.url}/operation-modules/start`, body)
@@ -2651,34 +2666,26 @@ class ApiEventsService {
2651
2666
  *
2652
2667
  * @param {number} id - The unique identifier of the item whose event is to be updated.
2653
2668
  * @param {OperationModuleEndIn} body - The payload containing the updated event details.
2654
- * @return {Observable<OperationModuleOut>} An observable emitting the updated event details.
2669
+ * @returns {Observable<OperationModuleOut>} An observable emitting the updated event details.
2655
2670
  */
2656
2671
  putOperationModulesEnd(id, body) {
2657
2672
  return this.http.put(`${this.url}/operation-modules/${id}/end`, body)
2658
2673
  .pipe(map(({ data }) => data));
2659
2674
  }
2660
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ApiEventsService, deps: [{ token: 'env' }, { token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
2661
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ApiEventsService, providedIn: 'root' });
2675
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ApiEventsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
2676
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ApiEventsService, providedIn: 'root' });
2662
2677
  }
2663
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ApiEventsService, decorators: [{
2678
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ApiEventsService, decorators: [{
2664
2679
  type: Injectable,
2665
2680
  args: [{
2666
2681
  providedIn: 'root'
2667
2682
  }]
2668
- }], ctorParameters: () => [{ type: undefined, decorators: [{
2669
- type: Inject,
2670
- args: ['env']
2671
- }] }, { type: i1.HttpClient }] });
2683
+ }] });
2672
2684
 
2673
2685
  class ApiExternalOperationsService {
2674
- http;
2675
- environment;
2676
- appKey;
2677
- constructor(http, environment) {
2678
- this.http = http;
2679
- this.environment = environment;
2680
- this.appKey = environment.apiExternalOperationsKey ?? '';
2681
- }
2686
+ http = inject(HttpClient);
2687
+ environment = inject(ENVIRONMENT_TOKEN);
2688
+ appKey = this.environment.apiExternalOperationsKey ?? '';
2682
2689
  /**
2683
2690
  * Getter method to retrieve the API's external operations URL.
2684
2691
  * Fetches the URL from the `apiExternalOperationsUrl` property of the environment object.
@@ -2740,26 +2747,19 @@ class ApiExternalOperationsService {
2740
2747
  getAppKeyHeader() {
2741
2748
  return { ...(this.appKey && { AppKey: this.appKey }) };
2742
2749
  }
2743
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ApiExternalOperationsService, deps: [{ token: i1.HttpClient }, { token: 'env' }], target: i0.ɵɵFactoryTarget.Injectable });
2744
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ApiExternalOperationsService, providedIn: 'root' });
2750
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ApiExternalOperationsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
2751
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ApiExternalOperationsService, providedIn: 'root' });
2745
2752
  }
2746
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ApiExternalOperationsService, decorators: [{
2753
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ApiExternalOperationsService, decorators: [{
2747
2754
  type: Injectable,
2748
2755
  args: [{
2749
2756
  providedIn: 'root'
2750
2757
  }]
2751
- }], ctorParameters: () => [{ type: i1.HttpClient }, { type: undefined, decorators: [{
2752
- type: Inject,
2753
- args: ['env']
2754
- }] }] });
2758
+ }] });
2755
2759
 
2756
2760
  class ApiInventoriesService {
2757
- environments;
2758
- http;
2759
- constructor(environments, http) {
2760
- this.environments = environments;
2761
- this.http = http;
2762
- }
2761
+ environments = inject(ENVIRONMENT_TOKEN);
2762
+ http = inject(HttpClient);
2763
2763
  /**
2764
2764
  * Retrieves the URL for the Inventories API from the environment configurations.
2765
2765
  *
@@ -2944,26 +2944,39 @@ class ApiInventoriesService {
2944
2944
  return this.http.post(`${this.url}/packages/in-stock`, body)
2945
2945
  .pipe(map(({ data }) => data));
2946
2946
  }
2947
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ApiInventoriesService, deps: [{ token: 'env' }, { token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
2948
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ApiInventoriesService, providedIn: 'root' });
2947
+ /**
2948
+ * Fetches the missing package details based on query parameters.
2949
+ *
2950
+ * @param {QueryParams} params - The query parameters for filtering the missing package details.
2951
+ * @return {Observable<ReEntryOfMissingPackageOut>} An observable that emits the detail missing package data.
2952
+ */
2953
+ getReEntryOfMissingPackages(params) {
2954
+ return this.http.get(`${this.url}/re-entry-of-missing-packages`, {
2955
+ params
2956
+ }).pipe(map(({ data }) => data));
2957
+ }
2958
+ /**
2959
+ * Re-entry missing packages
2960
+ *
2961
+ * @param {ReEntryOfMissingPackagesIn} body - The missing packages data to be re-entry.
2962
+ * @returns {Observable<ReEntryOfMissingPackagesOut>} An observable detail of the updated incident reason complement.
2963
+ */
2964
+ putReEntryOfMissingPackages(body) {
2965
+ return this.http.put(`${this.url}/re-entry-of-missing-packages`, body).pipe(map(({ data }) => data));
2966
+ }
2967
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ApiInventoriesService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
2968
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ApiInventoriesService, providedIn: 'root' });
2949
2969
  }
2950
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ApiInventoriesService, decorators: [{
2970
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ApiInventoriesService, decorators: [{
2951
2971
  type: Injectable,
2952
2972
  args: [{
2953
2973
  providedIn: 'root'
2954
2974
  }]
2955
- }], ctorParameters: () => [{ type: undefined, decorators: [{
2956
- type: Inject,
2957
- args: ['env']
2958
- }] }, { type: i1.HttpClient }] });
2975
+ }] });
2959
2976
 
2960
2977
  class ApiInvoicesService {
2961
- environments;
2962
- http;
2963
- constructor(environments, http) {
2964
- this.environments = environments;
2965
- this.http = http;
2966
- }
2978
+ environments = inject(ENVIRONMENT_TOKEN);
2979
+ http = inject(HttpClient);
2967
2980
  /**
2968
2981
  * Retrieves the API URL for invoices from the environments configuration.
2969
2982
  *
@@ -3356,6 +3369,15 @@ class ApiInvoicesService {
3356
3369
  return this.http.get(`${this.url}/document-type-ranges`, { params })
3357
3370
  .pipe(map(({ data }) => data));
3358
3371
  }
3372
+ /**
3373
+ * Retrieves the currently active document type ranges.
3374
+ *
3375
+ * @returns {Observable<DocumentsTypesRangesCurrentStatusOut>} An observable that emits the currently active document type ranges data.
3376
+ */
3377
+ getDocumentsTypesRangesCurrentStatus() {
3378
+ return this.http.get(`${this.url}/document-type-ranges/current-status`)
3379
+ .pipe(map(({ data }) => data));
3380
+ }
3359
3381
  /**
3360
3382
  * Creates a new document type range.
3361
3383
  * @param body - The document type range data to create
@@ -3393,26 +3415,19 @@ class ApiInvoicesService {
3393
3415
  return this.http.get(`${this.url}/country-document-types`, { params })
3394
3416
  .pipe(map(({ data }) => data));
3395
3417
  }
3396
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ApiInvoicesService, deps: [{ token: 'env' }, { token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
3397
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ApiInvoicesService, providedIn: 'root' });
3418
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ApiInvoicesService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
3419
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ApiInvoicesService, providedIn: 'root' });
3398
3420
  }
3399
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ApiInvoicesService, decorators: [{
3421
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ApiInvoicesService, decorators: [{
3400
3422
  type: Injectable,
3401
3423
  args: [{
3402
3424
  providedIn: 'root'
3403
3425
  }]
3404
- }], ctorParameters: () => [{ type: undefined, decorators: [{
3405
- type: Inject,
3406
- args: ['env']
3407
- }] }, { type: i1.HttpClient }] });
3426
+ }] });
3408
3427
 
3409
3428
  class ApiNotificationsService {
3410
- environments;
3411
- http;
3412
- constructor(environments, http) {
3413
- this.environments = environments;
3414
- this.http = http;
3415
- }
3429
+ environments = inject(ENVIRONMENT_TOKEN);
3430
+ http = inject(HttpClient);
3416
3431
  /**
3417
3432
  * Retrieves the URL for the notifications API from the environment settings.
3418
3433
  * If the URL is not defined, an empty string is returned.
@@ -3493,30 +3508,23 @@ class ApiNotificationsService {
3493
3508
  return this.http.get(`${this.url}/notification-types`, { params })
3494
3509
  .pipe(map(({ data }) => data));
3495
3510
  }
3496
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ApiNotificationsService, deps: [{ token: 'env' }, { token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
3497
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ApiNotificationsService, providedIn: 'root' });
3511
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ApiNotificationsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
3512
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ApiNotificationsService, providedIn: 'root' });
3498
3513
  }
3499
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ApiNotificationsService, decorators: [{
3514
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ApiNotificationsService, decorators: [{
3500
3515
  type: Injectable,
3501
3516
  args: [{
3502
3517
  providedIn: 'root'
3503
3518
  }]
3504
- }], ctorParameters: () => [{ type: undefined, decorators: [{
3505
- type: Inject,
3506
- args: ['env']
3507
- }] }, { type: i1.HttpClient }] });
3519
+ }] });
3508
3520
 
3509
3521
  class ApiOpenItemsService {
3510
- environments;
3511
- http;
3512
- constructor(environments, http) {
3513
- this.environments = environments;
3514
- this.http = http;
3515
- }
3522
+ environments = inject(ENVIRONMENT_TOKEN);
3523
+ http = inject(HttpClient);
3516
3524
  /**
3517
3525
  * Retrieves the API URL for open-items from the environments' configuration.
3518
3526
  *
3519
- * @return {string} The API URL for open-items.
3527
+ * @returns {string} The API URL for open-items.
3520
3528
  */
3521
3529
  get url() {
3522
3530
  return this.environments.apiOpenItemsUrl ?? '';
@@ -3525,7 +3533,7 @@ class ApiOpenItemsService {
3525
3533
  * Retrieves a list of open-items based on the provided query parameters.
3526
3534
  *
3527
3535
  * @param {QueryParams} params - The parameters to use for querying open-items.
3528
- * @return {Observable<OpenItemsOut>} An observable that emits the open-item's data.
3536
+ * @returns {Observable<OpenItemsOut>} An observable that emits the open-item data.
3529
3537
  */
3530
3538
  getOpenItems(params) {
3531
3539
  return this.http.get(`${this.url}/open-items`, { params })
@@ -3535,7 +3543,7 @@ class ApiOpenItemsService {
3535
3543
  * Processes a payment for an open item.
3536
3544
  *
3537
3545
  * @param {PaymentOpenItemIn} body - The payment details for the open item.
3538
- * @return {Observable<PaymentOut>} An observable that emits the result of the payment processing.
3546
+ * @returns {Observable<PaymentOut>} An observable that emits the result of the payment processing.
3539
3547
  */
3540
3548
  postPayment(body) {
3541
3549
  return this.http.post(`${this.url}/payment`, body)
@@ -3545,38 +3553,25 @@ class ApiOpenItemsService {
3545
3553
  * Processes a payment for other invoice.
3546
3554
  *
3547
3555
  * @param {OtherInvoiceIn} body - The payment details for the other invoice.
3548
- * @return {Observable<OtherInvoiceOut>} An observable that emits the result of the payment processing.
3556
+ * @returns {Observable<OtherInvoiceOut>} An observable that emits the result of the payment processing.
3549
3557
  */
3550
3558
  postOtherInvoice(body) {
3551
3559
  return this.http.post(`${this.url}/other-invoices`, body)
3552
3560
  .pipe(map(({ data }) => data));
3553
3561
  }
3554
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ApiOpenItemsService, deps: [{ token: 'env' }, { token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
3555
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ApiOpenItemsService, providedIn: 'root' });
3562
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ApiOpenItemsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
3563
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ApiOpenItemsService, providedIn: 'root' });
3556
3564
  }
3557
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ApiOpenItemsService, decorators: [{
3565
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ApiOpenItemsService, decorators: [{
3558
3566
  type: Injectable,
3559
3567
  args: [{
3560
3568
  providedIn: 'root'
3561
3569
  }]
3562
- }], ctorParameters: () => [{ type: undefined, decorators: [{
3563
- type: Inject,
3564
- args: ['env']
3565
- }] }, { type: i1.HttpClient }] });
3570
+ }] });
3566
3571
 
3567
- /**
3568
- * Service to manage quote-related events.
3569
- *
3570
- * This service provides methods to retrieve, create, and get event types
3571
- * related to quote processes.
3572
- */
3573
3572
  class ApiQuoteService {
3574
- environments;
3575
- http;
3576
- constructor(environments, http) {
3577
- this.environments = environments;
3578
- this.http = http;
3579
- }
3573
+ environments = inject(ENVIRONMENT_TOKEN);
3574
+ http = inject(HttpClient);
3580
3575
  /**
3581
3576
  * Base URL for the Quotes API.
3582
3577
  */
@@ -3634,26 +3629,19 @@ class ApiQuoteService {
3634
3629
  return this.http.get(`${this.url}/quote-event-types`, { params })
3635
3630
  .pipe(map(({ data }) => data));
3636
3631
  }
3637
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ApiQuoteService, deps: [{ token: 'env' }, { token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
3638
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ApiQuoteService, providedIn: 'root' });
3632
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ApiQuoteService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
3633
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ApiQuoteService, providedIn: 'root' });
3639
3634
  }
3640
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ApiQuoteService, decorators: [{
3635
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ApiQuoteService, decorators: [{
3641
3636
  type: Injectable,
3642
3637
  args: [{
3643
3638
  providedIn: 'root'
3644
3639
  }]
3645
- }], ctorParameters: () => [{ type: undefined, decorators: [{
3646
- type: Inject,
3647
- args: ['env']
3648
- }] }, { type: i1.HttpClient }] });
3640
+ }] });
3649
3641
 
3650
3642
  class ApiReportsService {
3651
- environments;
3652
- http;
3653
- constructor(environments, http) {
3654
- this.environments = environments;
3655
- this.http = http;
3656
- }
3643
+ environments = inject(ENVIRONMENT_TOKEN);
3644
+ http = inject(HttpClient);
3657
3645
  /**
3658
3646
  * Retrieves the URL for the reports API from the environment configurations.
3659
3647
  *
@@ -3802,28 +3790,20 @@ class ApiReportsService {
3802
3790
  return this.http.get(`${this.url}/sales-book-report`, { params })
3803
3791
  .pipe(map(({ data }) => data));
3804
3792
  }
3805
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ApiReportsService, deps: [{ token: 'env' }, { token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
3806
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ApiReportsService, providedIn: 'root' });
3793
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ApiReportsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
3794
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ApiReportsService, providedIn: 'root' });
3807
3795
  }
3808
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ApiReportsService, decorators: [{
3796
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ApiReportsService, decorators: [{
3809
3797
  type: Injectable,
3810
3798
  args: [{
3811
3799
  providedIn: 'root'
3812
3800
  }]
3813
- }], ctorParameters: () => [{ type: undefined, decorators: [{
3814
- type: Inject,
3815
- args: ['env']
3816
- }] }, { type: i1.HttpClient }] });
3801
+ }] });
3817
3802
 
3818
3803
  class ApiSecurityService {
3819
- environments;
3820
- cookie;
3821
- http;
3822
- constructor(environments, cookie, http) {
3823
- this.environments = environments;
3824
- this.cookie = cookie;
3825
- this.http = http;
3826
- }
3804
+ cookie = inject(CookieService);
3805
+ http = inject(HttpClient);
3806
+ environments = inject(ENVIRONMENT_TOKEN);
3827
3807
  /**
3828
3808
  * Retrieves the API security URL from the environments configuration.
3829
3809
  *
@@ -3840,7 +3820,11 @@ class ApiSecurityService {
3840
3820
  */
3841
3821
  postAuthLogin(body) {
3842
3822
  return this.http.post(`${this.url}/auth/login`, body)
3843
- .pipe(map(({ data }) => data), tap(({ access_token }) => this.cookie.set(this.environments.authCookie, access_token, { path: '/' })));
3823
+ .pipe(map(({ data }) => data), tap(({ access_token }) => {
3824
+ if (this.environments.authCookie) {
3825
+ this.cookie.set(this.environments.authCookie, access_token, { path: '/' });
3826
+ }
3827
+ }));
3844
3828
  }
3845
3829
  /**
3846
3830
  * Handles the user login process by sending user credentials to the authentication endpoint.
@@ -3861,7 +3845,11 @@ class ApiSecurityService {
3861
3845
  */
3862
3846
  postAuthLogout() {
3863
3847
  return this.http.post(`${this.url}/auth/logout`, null)
3864
- .pipe(map(({ data }) => data), tap(() => this.cookie.delete(this.environments.authCookie, '/')));
3848
+ .pipe(map(({ data }) => data), tap(() => {
3849
+ if (this.environments.authCookie) {
3850
+ this.cookie.delete(this.environments.authCookie, '/');
3851
+ }
3852
+ }));
3865
3853
  }
3866
3854
  /**
3867
3855
  * Creates a new session for a specified model.
@@ -4041,26 +4029,19 @@ class ApiSecurityService {
4041
4029
  }
4042
4030
  }).pipe(map(({ data }) => data));
4043
4031
  }
4044
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ApiSecurityService, deps: [{ token: 'env' }, { token: i1$1.CookieService }, { token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
4045
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ApiSecurityService, providedIn: 'root' });
4032
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ApiSecurityService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
4033
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ApiSecurityService, providedIn: 'root' });
4046
4034
  }
4047
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ApiSecurityService, decorators: [{
4035
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ApiSecurityService, decorators: [{
4048
4036
  type: Injectable,
4049
4037
  args: [{
4050
4038
  providedIn: 'root'
4051
4039
  }]
4052
- }], ctorParameters: () => [{ type: undefined, decorators: [{
4053
- type: Inject,
4054
- args: ['env']
4055
- }] }, { type: i1$1.CookieService }, { type: i1.HttpClient }] });
4040
+ }] });
4056
4041
 
4057
4042
  class ApiServicesService {
4058
- environments;
4059
- http;
4060
- constructor(environments, http) {
4061
- this.environments = environments;
4062
- this.http = http;
4063
- }
4043
+ environments = inject(ENVIRONMENT_TOKEN);
4044
+ http = inject(HttpClient);
4064
4045
  /**
4065
4046
  * Retrieves the URL for the services API from the environment settings.
4066
4047
  * If the URL is not defined, an empty string is returned.
@@ -4140,26 +4121,39 @@ class ApiServicesService {
4140
4121
  params: queryParams
4141
4122
  }).pipe(map(({ data }) => data));
4142
4123
  }
4143
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ApiServicesService, deps: [{ token: 'env' }, { token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
4144
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ApiServicesService, providedIn: 'root' });
4124
+ /**
4125
+ * Fetches address suggestions based on the provided query parameters.
4126
+ * @param {AddressSuggestionIn} queryParams - The query parameters to filter and fetch address suggestions.
4127
+ * @return {Observable<AddressSuggestionsOut>} An observable that emits the address suggestions.
4128
+ */
4129
+ getAddressSuggestions(queryParams) {
4130
+ return this.http.get(`${this.url}/address-details/suggestions`, {
4131
+ params: queryParams
4132
+ }).pipe(map(({ data }) => data));
4133
+ }
4134
+ /**
4135
+ * Fetches address place details based on the provided query parameters.
4136
+ * @param {AddressPlaceDetailIn} queryParams - The query parameters to filter and fetch address place details.
4137
+ * @return {Observable<AddressPlaceDetailsOut>} An observable that emits the address place details.
4138
+ */
4139
+ getAddressPlaceDetails(queryParams) {
4140
+ return this.http.get(`${this.url}/address-details/place-details`, {
4141
+ params: queryParams
4142
+ }).pipe(map(({ data }) => data));
4143
+ }
4144
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ApiServicesService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
4145
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ApiServicesService, providedIn: 'root' });
4145
4146
  }
4146
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ApiServicesService, decorators: [{
4147
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ApiServicesService, decorators: [{
4147
4148
  type: Injectable,
4148
4149
  args: [{
4149
4150
  providedIn: 'root'
4150
4151
  }]
4151
- }], ctorParameters: () => [{ type: undefined, decorators: [{
4152
- type: Inject,
4153
- args: ['env']
4154
- }] }, { type: i1.HttpClient }] });
4152
+ }] });
4155
4153
 
4156
4154
  class ApiShipmentsService {
4157
- environments;
4158
- http;
4159
- constructor(environments, http) {
4160
- this.environments = environments;
4161
- this.http = http;
4162
- }
4155
+ environments = inject(ENVIRONMENT_TOKEN);
4156
+ http = inject(HttpClient);
4163
4157
  /**
4164
4158
  * Retrieves the URL for the shipments API from the environment configurations.
4165
4159
  *
@@ -4198,6 +4192,15 @@ class ApiShipmentsService {
4198
4192
  getEmployeeCustomer(id) {
4199
4193
  return this.http.get(`${this.url}/shipments/employee-customer/${id}`).pipe(map(({ data }) => data));
4200
4194
  }
4195
+ /**
4196
+ * Generate signature page PDF for one shipment
4197
+ *
4198
+ * @return {Observable<ShipmentSignaturePageOut>} An observable containing base64 file generated
4199
+ * @param id - the shipment id.
4200
+ */
4201
+ postShipmentSignaturePage(id) {
4202
+ return this.http.post(`${this.url}/shipments/${id}/signature-page`, {}).pipe(map(({ data }) => data));
4203
+ }
4201
4204
  /**
4202
4205
  * Cancels a specific shipment by providing its ID and a reason for cancellation.
4203
4206
  * Sends a PATCH request to update the shipment's cancellation status with the specified reason.
@@ -4252,26 +4255,57 @@ class ApiShipmentsService {
4252
4255
  return this.http.put(`${this.url}/embassy-shipments/${id}`, body)
4253
4256
  .pipe(map(({ data }) => data));
4254
4257
  }
4255
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ApiShipmentsService, deps: [{ token: 'env' }, { token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
4256
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ApiShipmentsService, providedIn: 'root' });
4258
+ /**
4259
+ * Retrieves a paginated list of signature page settings
4260
+ * @param {QueryParams} params - Query parameters for filtering and pagination
4261
+ * @returns {Observable<SignaturePageSettingsOut>} Observable containing the list of signature page settings and pagination metadata
4262
+ */
4263
+ getSignaturePageSettings(params) {
4264
+ return this.http.get(`${this.url}/signature-page-settings`, {
4265
+ params
4266
+ }).pipe(map(({ data }) => data));
4267
+ }
4268
+ /**
4269
+ * Retrieves the details of a signature page setting based on its ID.
4270
+ *
4271
+ * @param {number} id - The identifier of the signature page setting to fetch.
4272
+ * @return {Observable<SignaturePageSettingOut>} An observable that emits the signature page setting data.
4273
+ */
4274
+ getSignaturePageSetting(id) {
4275
+ return this.http.get(`${this.url}/signature-page-settings/${id}`).pipe(map(({ data }) => data));
4276
+ }
4277
+ /**
4278
+ * Creates a new signature page setting
4279
+ * @param {SignaturePageSettingIn} body - The signature page setting data to create
4280
+ * @returns {Observable<SignaturePageSettingOut>} Observable containing the created signature page setting with its assigned ID
4281
+ */
4282
+ postSignaturePageSetting(body) {
4283
+ return this.http.post(`${this.url}/signature-page-settings`, body)
4284
+ .pipe(map(({ data }) => data));
4285
+ }
4286
+ /**
4287
+ * Updates an existing signature page setting
4288
+ * @param {number} id - The unique identifier of the signature page setting to update
4289
+ * @param {SignaturePageSettingIn} body - The updated signature page setting data
4290
+ * @returns {Observable<SignaturePageSettingOut>} Observable containing the updated signature page setting
4291
+ */
4292
+ putSignaturePageSetting(id, body) {
4293
+ return this.http.put(`${this.url}/signature-page-settings/${id}`, body)
4294
+ .pipe(map(({ data }) => data));
4295
+ }
4296
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ApiShipmentsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
4297
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ApiShipmentsService, providedIn: 'root' });
4257
4298
  }
4258
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ApiShipmentsService, decorators: [{
4299
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ApiShipmentsService, decorators: [{
4259
4300
  type: Injectable,
4260
4301
  args: [{
4261
4302
  providedIn: 'root'
4262
4303
  }]
4263
- }], ctorParameters: () => [{ type: undefined, decorators: [{
4264
- type: Inject,
4265
- args: ['env']
4266
- }] }, { type: i1.HttpClient }] });
4304
+ }] });
4267
4305
 
4268
4306
  class ApiSuppliesService {
4269
- environments;
4270
- http;
4271
- constructor(environments, http) {
4272
- this.environments = environments;
4273
- this.http = http;
4274
- }
4307
+ environments = inject(ENVIRONMENT_TOKEN);
4308
+ http = inject(HttpClient);
4275
4309
  /**
4276
4310
  * Retrieves the URL for the API supplies endpoint.
4277
4311
  *
@@ -4381,18 +4415,122 @@ class ApiSuppliesService {
4381
4415
  return this.http.get(`${this.url}/supply-locations/export/excel`, { params })
4382
4416
  .pipe(map(({ data }) => data));
4383
4417
  }
4384
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ApiSuppliesService, deps: [{ token: 'env' }, { token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
4385
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ApiSuppliesService, providedIn: 'root' });
4418
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ApiSuppliesService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
4419
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ApiSuppliesService, providedIn: 'root' });
4386
4420
  }
4387
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ApiSuppliesService, decorators: [{
4421
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ApiSuppliesService, decorators: [{
4388
4422
  type: Injectable,
4389
4423
  args: [{
4390
4424
  providedIn: 'root'
4391
4425
  }]
4392
- }], ctorParameters: () => [{ type: undefined, decorators: [{
4393
- type: Inject,
4394
- args: ['env']
4395
- }] }, { type: i1.HttpClient }] });
4426
+ }] });
4427
+
4428
+ class ApiSurveysService {
4429
+ environments = inject(ENVIRONMENT_TOKEN);
4430
+ http = inject(HttpClient);
4431
+ /**
4432
+ * Base URL for surveys API endpoints.
4433
+ * @returns The configured surveys API URL or an empty string.
4434
+ */
4435
+ get url() {
4436
+ return this.environments.apiSurveysUrl ?? '';
4437
+ }
4438
+ /**
4439
+ * Retrieves surveys list based on query parameters.
4440
+ * @param params Query parameters used to filter, paginate, or sort surveys.
4441
+ * @returns Observable stream with surveys response data.
4442
+ */
4443
+ getSurveys(params) {
4444
+ return this.http.get(`${this.url}/surveys`, { params })
4445
+ .pipe(map(({ data }) => data));
4446
+ }
4447
+ /**
4448
+ * Creates a new survey.
4449
+ * @param body Survey payload to create.
4450
+ * @returns Observable stream with created survey data.
4451
+ */
4452
+ postSurvey(body) {
4453
+ return this.http.post(`${this.url}/surveys`, body)
4454
+ .pipe(map(({ data }) => data));
4455
+ }
4456
+ /**
4457
+ * Replaces an existing survey by id.
4458
+ * @param id Survey identifier.
4459
+ * @param body Survey payload used to replace the resource.
4460
+ * @returns Observable stream with updated survey data.
4461
+ */
4462
+ putSurvey(id, body) {
4463
+ return this.http.put(`${this.url}/surveys/${id}`, body)
4464
+ .pipe(map(({ data }) => data));
4465
+ }
4466
+ /**
4467
+ * Partially updates an existing survey by id.
4468
+ * @param id Survey identifier.
4469
+ * @param body Partial survey payload with fields to update.
4470
+ * @returns Observable stream with updated survey data.
4471
+ */
4472
+ patchSurvey(id, body) {
4473
+ return this.http.patch(`${this.url}/surveys/${id}`, body)
4474
+ .pipe(map(({ data }) => data));
4475
+ }
4476
+ /**
4477
+ * Retrieves the questions for a survey.
4478
+ * @param id Survey identifier.
4479
+ * @param params Query parameters used to filter, paginate, or sort questions.
4480
+ * @returns Observable stream with survey questions response data.
4481
+ */
4482
+ getSurveyQuestions(id, params) {
4483
+ return this.http.get(`${this.url}/surveys/${id}/questions`, { params })
4484
+ .pipe(map(({ data }) => data));
4485
+ }
4486
+ /**
4487
+ * Creates a new question for a survey.
4488
+ * @param surveyId Parent survey identifier.
4489
+ * @param body Survey question payload to create.
4490
+ * @returns Observable stream with created survey question data.
4491
+ */
4492
+ postSurveyQuestion(surveyId, body) {
4493
+ return this.http.post(`${this.url}/surveys/${surveyId}/questions`, body)
4494
+ .pipe(map(({ data }) => data));
4495
+ }
4496
+ /**
4497
+ * Replaces an existing survey question by id.
4498
+ * @param questionId Survey question identifier.
4499
+ * @param body Survey question payload used to replace the resource.
4500
+ * @returns Observable stream with updated survey question data.
4501
+ */
4502
+ putSurveyQuestion(questionId, body) {
4503
+ return this.http.put(`${this.url}/questions/${questionId}`, body)
4504
+ .pipe(map(({ data }) => data));
4505
+ }
4506
+ /**
4507
+ * Partially updates an existing survey question by id.
4508
+ * @param questionId Survey question identifier.
4509
+ * @param body Partial survey question payload with fields to update.
4510
+ * @returns Observable stream with updated survey question data.
4511
+ */
4512
+ patchSurveyQuestion(questionId, body) {
4513
+ return this.http.patch(`${this.url}/questions/${questionId}`, body)
4514
+ .pipe(map(({ data }) => data));
4515
+ }
4516
+ /**
4517
+ * Retrieves the available question types.
4518
+ * @param params Query parameters used to filter, paginate, or sort question types.
4519
+ * @returns Observable stream with question types response data.
4520
+ */
4521
+ getQuestionTypes(params) {
4522
+ return this.http.get(`${this.url}/question-types`, { params })
4523
+ .pipe(map(({ data }) => data));
4524
+ }
4525
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ApiSurveysService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
4526
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ApiSurveysService, providedIn: 'root' });
4527
+ }
4528
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ApiSurveysService, decorators: [{
4529
+ type: Injectable,
4530
+ args: [{
4531
+ providedIn: 'root'
4532
+ }]
4533
+ }] });
4396
4534
 
4397
4535
  var ViewSectionOption;
4398
4536
  (function (ViewSectionOption) {
@@ -4433,10 +4571,9 @@ var AlphaNumeric;
4433
4571
  })(AlphaNumeric || (AlphaNumeric = {}));
4434
4572
 
4435
4573
  class WebSocketsService {
4436
- environments;
4437
4574
  pusher;
4438
- constructor(environments) {
4439
- this.environments = environments;
4575
+ environments = inject(ENVIRONMENT_TOKEN);
4576
+ constructor() {
4440
4577
  this.pusher = null;
4441
4578
  this.connect()
4442
4579
  .then((pusher) => {
@@ -4530,24 +4667,19 @@ class WebSocketsService {
4530
4667
  const waitTime = 3 * 1000;
4531
4668
  return new Promise((resolve) => setTimeout(resolve, waitTime));
4532
4669
  }
4533
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: WebSocketsService, deps: [{ token: 'env' }], target: i0.ɵɵFactoryTarget.Injectable });
4534
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: WebSocketsService, providedIn: 'root' });
4670
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: WebSocketsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
4671
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: WebSocketsService, providedIn: 'root' });
4535
4672
  }
4536
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: WebSocketsService, decorators: [{
4673
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: WebSocketsService, decorators: [{
4537
4674
  type: Injectable,
4538
4675
  args: [{
4539
4676
  providedIn: 'root',
4540
4677
  }]
4541
- }], ctorParameters: () => [{ type: undefined, decorators: [{
4542
- type: Inject,
4543
- args: ['env']
4544
- }] }] });
4678
+ }], ctorParameters: () => [] });
4545
4679
 
4680
+ const AES_KEY_USAGES = ['encrypt', 'decrypt'];
4546
4681
  class CryptoService {
4547
- environments;
4548
- constructor(environments) {
4549
- this.environments = environments;
4550
- }
4682
+ environments = inject(ENVIRONMENT_TOKEN);
4551
4683
  async encryptAES(plaintext) {
4552
4684
  const cryptoKey = await this.loadKey();
4553
4685
  // Convert the plaintext in Uint8Array
@@ -4581,10 +4713,13 @@ class CryptoService {
4581
4713
  return decoder.decode(decrypted);
4582
4714
  }
4583
4715
  async loadKey() {
4716
+ if (!this.environments.secretKey) {
4717
+ throw new Error('The secret key is not defined in the environment configuration.');
4718
+ }
4584
4719
  // Decode the base64 key to Uint8Array
4585
4720
  const rawKey = this.base64ToUint8Array(this.environments.secretKey);
4586
4721
  // Import the key to API Crypto
4587
- return await crypto.subtle.importKey('raw', rawKey, { name: 'AES-GCM' }, true, ['encrypt', 'decrypt']);
4722
+ return await crypto.subtle.importKey('raw', rawKey, { name: 'AES-GCM' }, true, AES_KEY_USAGES);
4588
4723
  }
4589
4724
  uint8ArrayToBase64(data) {
4590
4725
  let binary = '';
@@ -4621,19 +4756,19 @@ class CryptoService {
4621
4756
  }
4622
4757
  return bytes.buffer;
4623
4758
  }
4624
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CryptoService, deps: [{ token: 'env' }], target: i0.ɵɵFactoryTarget.Injectable });
4625
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CryptoService, providedIn: 'root' });
4759
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: CryptoService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
4760
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: CryptoService, providedIn: 'root' });
4626
4761
  }
4627
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CryptoService, decorators: [{
4762
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: CryptoService, decorators: [{
4628
4763
  type: Injectable,
4629
4764
  args: [{
4630
4765
  providedIn: 'root'
4631
4766
  }]
4632
- }], ctorParameters: () => [{ type: undefined, decorators: [{
4633
- type: Inject,
4634
- args: ['env']
4635
- }] }] });
4767
+ }] });
4636
4768
 
4769
+ function isStaticAsset$1(url) {
4770
+ return url.startsWith('assets/') || url.includes('/i18n/');
4771
+ }
4637
4772
  /**
4638
4773
  * Intercepts an outgoing HTTP request and modifies its headers to include default values
4639
4774
  * for Cache-Control, Expires, Pragma, Content-Type, Accept, and Accept-Language if they
@@ -4644,7 +4779,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
4644
4779
  * @return {Observable<HttpEvent<unknown>>} An observable of the HTTP event resulting from the processed request.
4645
4780
  */
4646
4781
  function apiHeadersInterceptor(req, next) {
4647
- let { headers } = req;
4782
+ if (isStaticAsset$1(req.url)) {
4783
+ return next(req);
4784
+ }
4785
+ let headers = req.headers;
4648
4786
  if (!headers.has('Content-Type') && !(req.body instanceof FormData)) {
4649
4787
  headers = headers.set('Content-Type', 'application/json');
4650
4788
  }
@@ -4658,6 +4796,7 @@ function apiHeadersInterceptor(req, next) {
4658
4796
  return next(req);
4659
4797
  }
4660
4798
 
4799
+ const isStaticAsset = (url) => url.startsWith('assets/') || url.includes('/i18n/');
4661
4800
  /**
4662
4801
  * HTTP interceptor that injects the external operations API key into outbound requests.
4663
4802
  *
@@ -4691,6 +4830,9 @@ function apiHeadersInterceptor(req, next) {
4691
4830
  * @see HttpHandlerFn
4692
4831
  */
4693
4832
  function apiKeyInterceptor(request, next) {
4833
+ if (isStaticAsset(request.url)) {
4834
+ return next(request);
4835
+ }
4694
4836
  const { apiExternalOperationsKey } = inject(ENVIRONMENT_TOKEN);
4695
4837
  if (!apiExternalOperationsKey)
4696
4838
  return next(request);
@@ -4715,7 +4857,7 @@ function apiKeyInterceptor(request, next) {
4715
4857
  function apiTokenInterceptor(req, next) {
4716
4858
  const { authCookie } = inject(ENVIRONMENT_TOKEN);
4717
4859
  const cookie = inject(CookieService);
4718
- if (req.headers.has('Authorization') || req.headers.has('AppKey')) {
4860
+ if (req.headers.has('Authorization') || req.headers.has('AppKey') || !authCookie) {
4719
4861
  return next(req);
4720
4862
  }
4721
4863
  const token = cookie.get(authCookie);
@@ -4843,5 +4985,5 @@ const xmlHeaders = (format = 'object') => {
4843
4985
  * Generated bundle index. Do not edit.
4844
4986
  */
4845
4987
 
4846
- export { AlphaNumeric, ApiBillingDOService, ApiBillingGtService, ApiBillingMxService, ApiBillingPaService, ApiBillingSvService, ApiCashOperationsService, ApiCatalogsService, ApiCompaniesService, ApiCompositionService, ApiCustomsService, ApiDiscountsService, ApiEToolsAutoBillingService, ApiEventsService, ApiExternalOperationsService, ApiInventoriesService, ApiInvoicesService, ApiNotificationsService, ApiOpenItemsService, ApiQuoteService, ApiReportsService, ApiSecurityService, ApiServicesService, ApiShipmentsService, ApiSuppliesService, CryptoService, DefaultValueType, ENVIRONMENT_TOKEN, Event, NgxServicesModule, OperationModuleStatus, ViewSectionOption, WebSocketsService, apiHeadersInterceptor, apiKeyInterceptor, apiTokenInterceptor, base64PdfToUrl, downloadBase64Pdf, httpCachingInterceptor, httpParams, pdfHeaders, queryString, xmlHeaders };
4988
+ export { AlphaNumeric, ApiBillingDOService, ApiBillingGtService, ApiBillingMxService, ApiBillingPaService, ApiBillingSvService, ApiCashOperationsService, ApiCatalogsService, ApiCompaniesService, ApiCompositionService, ApiCustomsService, ApiDiscountsService, ApiEToolsAutoBillingService, ApiEventsService, ApiExternalOperationsService, ApiInventoriesService, ApiInvoicesService, ApiNotificationsService, ApiOpenItemsService, ApiQuoteService, ApiReportsService, ApiSecurityService, ApiServicesService, ApiShipmentsService, ApiSuppliesService, ApiSurveysService, CryptoService, DefaultValueType, ENVIRONMENT_TOKEN, Event, NgxServicesModule, OperationModuleStatus, ViewSectionOption, WebSocketsService, apiHeadersInterceptor, apiKeyInterceptor, apiTokenInterceptor, base64PdfToUrl, downloadBase64Pdf, httpCachingInterceptor, httpParams, pdfHeaders, provideNgxServices, queryString, xmlHeaders };
4847
4989
  //# sourceMappingURL=experteam-mx-ngx-services.mjs.map