@experteam-mx/ngx-services 18.5.7 → 18.5.9

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.
@@ -1062,6 +1062,196 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
1062
1062
  args: ['env']
1063
1063
  }] }] });
1064
1064
 
1065
+ class ApiInventoriesService {
1066
+ environments;
1067
+ http;
1068
+ constructor(environments, http) {
1069
+ this.environments = environments;
1070
+ this.http = http;
1071
+ }
1072
+ /**
1073
+ * Retrieves the URL for the Inventories API from the environment configurations.
1074
+ *
1075
+ * @return {string} The URL of the Inventories API.
1076
+ */
1077
+ get url() {
1078
+ return this.environments.apiInventoriesUrl ?? '';
1079
+ }
1080
+ /**
1081
+ * Retrieves a list of checkpoints based on query parameters.
1082
+ *
1083
+ * @param {QueryParams} params - Query parameters for filtering the checkpoints.
1084
+ * @returns {Observable<CheckpointsOut>} The list of checkpoints.
1085
+ */
1086
+ getCheckpoints(params) {
1087
+ return this.http.get(`${this.url}/checkpoints`, {
1088
+ params
1089
+ }).pipe(map(({ data }) => data));
1090
+ }
1091
+ /**
1092
+ * Retrieves a list of checkpoint event reasons based on query parameters.
1093
+ *
1094
+ * @param {QueryParams} params - Query parameters for filtering the checkpoint event reasons.
1095
+ * @returns {Observable<CheckpointEventReasonsOut>} The list of checkpoint event reasons.
1096
+ */
1097
+ getCheckpointEventReasons(params) {
1098
+ return this.http.get(`${this.url}/checkpoint-event-reasons`, {
1099
+ params
1100
+ }).pipe(map(({ data }) => data));
1101
+ }
1102
+ /**
1103
+ * Retrieves a list of incidents based on query parameters.
1104
+ *
1105
+ * @param {QueryParams} params - Query parameters for filtering the incidents.
1106
+ * @returns {Observable<IncidentsOut>} An observable that emits the list of incidents.
1107
+ */
1108
+ getIncidents(params) {
1109
+ return this.http.get(`${this.url}/incidents`, {
1110
+ params
1111
+ }).pipe(map(({ data }) => data));
1112
+ }
1113
+ /**
1114
+ * Fetches the incident details based on the provided incident ID.
1115
+ *
1116
+ * @param {number} id - The identifier of the incident record to get detail.
1117
+ * @return {Observable<IncidentOut>} An observable that emits the detail incident data.
1118
+ */
1119
+ getIncident(id) {
1120
+ return this.http.get(`${this.url}/incidents/${id}`)
1121
+ .pipe(map(({ data }) => data));
1122
+ }
1123
+ /**
1124
+ * Creates a new incident.
1125
+ *
1126
+ * @param {IncidentIn} body - The data for the new incident.
1127
+ * @returns {Observable<IncidentOut>} An observable the created incident detail.
1128
+ */
1129
+ postIncident(body) {
1130
+ return this.http.post(`${this.url}/incidents`, body).pipe(map(({ data }) => data));
1131
+ }
1132
+ /**
1133
+ * Updates an existing incident.
1134
+ *
1135
+ * @param {number} id - The identifier of the incident record to update.
1136
+ * @param {IncidentIn} body - The incident data to be updated.
1137
+ * @returns {Observable<IncidentOut>} An observable detail of the updated incident.
1138
+ */
1139
+ putIncident(id, body) {
1140
+ return this.http.put(`${this.url}/incidents/${id}`, body).pipe(map(({ data }) => data));
1141
+ }
1142
+ /**
1143
+ * Delete an existing incident.
1144
+ *
1145
+ * @param {number} id - The unique identifier of the incident to be deleted.
1146
+ * @returns {Observable<IncidentOut>} An observable that emits the result of the delete incident.
1147
+ */
1148
+ deleteIncident(id) {
1149
+ return this.http.delete(`${this.url}/incidents/${id}`)
1150
+ .pipe(map(({ data }) => data));
1151
+ }
1152
+ /**
1153
+ * Retrieves a list of incident reasons based on query parameters.
1154
+ *
1155
+ * @param {QueryParams} params - Query parameters for filtering the incident reasons.
1156
+ * @returns {Observable<IncidentReasonsOut>} An observable that emits the list of incident reasons.
1157
+ */
1158
+ getIncidentReasons(params) {
1159
+ return this.http.get(`${this.url}/incident-reasons`, {
1160
+ params
1161
+ }).pipe(map(({ data }) => data));
1162
+ }
1163
+ /**
1164
+ * Fetches the incident reason details based on the provided incident reason ID.
1165
+ *
1166
+ * @param {number} id - The identifier of the incident reason record to get detail.
1167
+ * @return {Observable<IncidentReasonOut>} An observable that emits the detail incident reason data.
1168
+ */
1169
+ getIncidentReason(id) {
1170
+ return this.http.get(`${this.url}/incident-reasons/${id}`)
1171
+ .pipe(map(({ data }) => data));
1172
+ }
1173
+ /**
1174
+ * Creates a new incident reason.
1175
+ *
1176
+ * @param {IncidentReasonIn} body - The data for the new incident reason.
1177
+ * @returns {Observable<IncidentReasonOut>} An observable the created incident reason detail.
1178
+ */
1179
+ postIncidentReason(body) {
1180
+ return this.http.post(`${this.url}/incident-reasons`, body).pipe(map(({ data }) => data));
1181
+ }
1182
+ /**
1183
+ * Updates an existing incident reason.
1184
+ *
1185
+ * @param {number} id - The identifier of the incident reason record to update.
1186
+ * @param {IncidentIn} body - The incident reason data to be updated.
1187
+ * @returns {Observable<IncidentReasonOut>} An observable detail of the updated incident reason.
1188
+ */
1189
+ putIncidentReason(id, body) {
1190
+ return this.http.put(`${this.url}/incident-reasons/${id}`, body).pipe(map(({ data }) => data));
1191
+ }
1192
+ /**
1193
+ * Delete an existing incident reason.
1194
+ *
1195
+ * @param {number} id - The unique identifier of the incident reason to be deleted.
1196
+ * @returns {Observable<IncidentReasonOut>} An observable that emits the result of the delete incident reason.
1197
+ */
1198
+ deleteIncidentReason(id) {
1199
+ return this.http.delete(`${this.url}/incident-reasons/${id}`)
1200
+ .pipe(map(({ data }) => data));
1201
+ }
1202
+ /**
1203
+ * Retrieves a list of incident reason complements based on query parameters.
1204
+ *
1205
+ * @param {QueryParams} params - Query parameters for filtering the incident reason complements.
1206
+ * @returns {Observable<IncidentReasonComplementsOut>} An observable that emits the list of incident reason complements.
1207
+ */
1208
+ getIncidentReasonComplements(params) {
1209
+ return this.http.get(`${this.url}/incident-reason-complements`, {
1210
+ params
1211
+ }).pipe(map(({ data }) => data));
1212
+ }
1213
+ /**
1214
+ * Creates a new incident reason complement.
1215
+ *
1216
+ * @param {IncidentReasonIn} body - The data for the new incident reason complement.
1217
+ * @returns {Observable<IncidentReasonComplementOut>} An observable the created incident reason complement detail.
1218
+ */
1219
+ postIncidentReasonComplement(body) {
1220
+ return this.http.post(`${this.url}/incident-reason-complements`, body).pipe(map(({ data }) => data));
1221
+ }
1222
+ /**
1223
+ * Updates an existing incident reason complement.
1224
+ *
1225
+ * @param {number} id - The identifier of the incident reason complement record to update.
1226
+ * @param {IncidentIn} body - The incident reason complement data to be updated.
1227
+ * @returns {Observable<IncidentReasonComplementOut>} An observable detail of the updated incident reason complement.
1228
+ */
1229
+ putIncidentReasonComplement(id, body) {
1230
+ return this.http.put(`${this.url}/incident-reason-complements/${id}`, body).pipe(map(({ data }) => data));
1231
+ }
1232
+ /**
1233
+ * Delete an existing incident reason complement.
1234
+ *
1235
+ * @param {number} id - The unique identifier of the incident reason complement to be deleted.
1236
+ * @returns {Observable<IncidentReasonComplementOut>} An observable that emits the result of the delete incident reason complement.
1237
+ */
1238
+ deleteIncidentReasonComplement(id) {
1239
+ return this.http.delete(`${this.url}/incident-reason-complements/${id}`)
1240
+ .pipe(map(({ data }) => data));
1241
+ }
1242
+ 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 });
1243
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ApiInventoriesService, providedIn: 'root' });
1244
+ }
1245
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ApiInventoriesService, decorators: [{
1246
+ type: Injectable,
1247
+ args: [{
1248
+ providedIn: 'root'
1249
+ }]
1250
+ }], ctorParameters: () => [{ type: undefined, decorators: [{
1251
+ type: Inject,
1252
+ args: ['env']
1253
+ }] }, { type: i1.HttpClient }] });
1254
+
1065
1255
  class ApiInvoicesService {
1066
1256
  environments;
1067
1257
  http;
@@ -1120,10 +1310,12 @@ class ApiInvoicesService {
1120
1310
  .pipe(map(({ data }) => data));
1121
1311
  }
1122
1312
  /**
1123
- * Cancels an invoice based on the provided invoice ID and additional parameters.
1313
+ * Sends a POST request to cancel billing for a specific operation.
1124
1314
  *
1125
- * @param {Object} parameters - The parameters required to cancel the invoice, encapsulated in a CancelBillingIn object.
1126
- * @return {Observable<Object>} An observable that emits the response of the cancellation operation.
1315
+ * @param {Object} params - The parameters for the cancellation request.
1316
+ * @param {string} params.invoiceId - The ID of the invoice to be canceled.
1317
+ * @param {Object} params.body - Additional data to be sent in the request body.
1318
+ * @return {Observable<OperationCancelBillingOut>} An observable emitting the result of the cancellation operation.
1127
1319
  */
1128
1320
  postOperationCancelBilling({ invoiceId, ...body }) {
1129
1321
  return this.http.post(`${this.url}/operation/cancel-billing/${invoiceId}`, body)
@@ -1798,8 +1990,8 @@ class ApiShipmentsService {
1798
1990
  /**
1799
1991
  * Validates and obtains the number of shipments allowed by an employee customer
1800
1992
  *
1801
- * @param {id} params - The id employee customer
1802
1993
  * @return {Observable<ShipmentEmployeeCustomer>} An observable containing the shipments allowed by an employee
1994
+ * @param id
1803
1995
  */
1804
1996
  getEmployeeCustomer(id) {
1805
1997
  return this.http.get(`${this.url}/shipments/employee-customer/${id}`).pipe(map(({ data }) => data));
@@ -1831,6 +2023,28 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
1831
2023
  args: ['env']
1832
2024
  }] }, { type: i1.HttpClient }] });
1833
2025
 
2026
+ var Event;
2027
+ (function (Event) {
2028
+ Event["damage"] = "damage";
2029
+ Event["lost"] = "lost";
2030
+ Event["rejected"] = "rejected";
2031
+ Event["return"] = "return ";
2032
+ })(Event || (Event = {}));
2033
+ var DefaultValueType;
2034
+ (function (DefaultValueType) {
2035
+ DefaultValueType["payment_type"] = "payment_type";
2036
+ DefaultValueType["currency_code"] = "currency_code";
2037
+ DefaultValueType["destination"] = "destination";
2038
+ DefaultValueType["payment_amount"] = "payment_amount";
2039
+ })(DefaultValueType || (DefaultValueType = {}));
2040
+ var AlphaNumeric;
2041
+ (function (AlphaNumeric) {
2042
+ AlphaNumeric["alpha_numeric"] = "alpha_numeric";
2043
+ AlphaNumeric["numeric"] = "numeric";
2044
+ AlphaNumeric["alphabetic"] = "alphabetic";
2045
+ AlphaNumeric["amount"] = "amount";
2046
+ })(AlphaNumeric || (AlphaNumeric = {}));
2047
+
1834
2048
  class WebSocketsService {
1835
2049
  environments;
1836
2050
  pusher;
@@ -2187,5 +2401,5 @@ const xmlHeaders = (format = 'object') => {
2187
2401
  * Generated bundle index. Do not edit.
2188
2402
  */
2189
2403
 
2190
- export { ApiBillingDOService, ApiBillingMxService, ApiCashOperationsService, ApiCatalogsService, ApiCompaniesService, ApiEToolsAutoBillingService, ApiExternalPickupsService, ApiInvoicesService, ApiOpenItemsService, ApiReportsService, ApiSecurityService, ApiShipmentsService, CryptoService, ENVIRONMENT_TOKEN, NgxServicesModule, WebSocketsService, apiHeadersInterceptor, apiTokenInterceptor, httpCachingInterceptor, httpParams, pdfHeaders, queryString, xmlHeaders };
2404
+ export { AlphaNumeric, ApiBillingDOService, ApiBillingMxService, ApiCashOperationsService, ApiCatalogsService, ApiCompaniesService, ApiEToolsAutoBillingService, ApiExternalPickupsService, ApiInventoriesService, ApiInvoicesService, ApiOpenItemsService, ApiReportsService, ApiSecurityService, ApiShipmentsService, CryptoService, DefaultValueType, ENVIRONMENT_TOKEN, Event, NgxServicesModule, WebSocketsService, apiHeadersInterceptor, apiTokenInterceptor, httpCachingInterceptor, httpParams, pdfHeaders, queryString, xmlHeaders };
2191
2405
  //# sourceMappingURL=experteam-mx-ngx-services.mjs.map