@experteam-mx/ngx-services 20.7.0-dev1.1 → 20.7.0-dev1.11
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.
- package/README.md +8 -2
- package/fesm2022/experteam-mx-ngx-services.mjs +335 -50
- package/fesm2022/experteam-mx-ngx-services.mjs.map +1 -1
- package/index.d.ts +641 -63
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -22,8 +22,12 @@ import { routes } from './app.routes'
|
|
|
22
22
|
|
|
23
23
|
const envs = {
|
|
24
24
|
...environment,
|
|
25
|
-
authCookie: 'token'
|
|
26
|
-
|
|
25
|
+
authCookie: 'token'
|
|
26
|
+
// cacheRoutes is opt-in; omit or leave empty until routes are registered:
|
|
27
|
+
// cacheRoutes: [
|
|
28
|
+
// { pattern: '/api/catalogs', ttl: 60_000 },
|
|
29
|
+
// { pattern: '/api/companies/.+/branches', ttl: 30_000 }
|
|
30
|
+
// ]
|
|
27
31
|
} as Environment
|
|
28
32
|
|
|
29
33
|
export const appConfig: ApplicationConfig = {
|
|
@@ -41,6 +45,8 @@ export const appConfig: ApplicationConfig = {
|
|
|
41
45
|
|
|
42
46
|
`provideNgxServices` registers `ENVIRONMENT_TOKEN`, which is required by the API services and some interceptors in this package.
|
|
43
47
|
|
|
48
|
+
`httpCachingInterceptor` caches only GET requests whose URL matches an entry in `cacheRoutes` (first matching RegExp pattern wins). With no routes configured, nothing is cached.
|
|
49
|
+
|
|
44
50
|
## NgModule compatibility
|
|
45
51
|
|
|
46
52
|
`NgxServicesModule.forRoot(environment)` is still available for compatibility, but it is deprecated for new standalone applications and will be removed in `20.2.0`.
|
|
@@ -1430,6 +1430,53 @@ class ApiCatalogsService {
|
|
|
1430
1430
|
return this.http.get(`${this.url}/export-reason-types`, { params })
|
|
1431
1431
|
.pipe(map(({ data }) => data));
|
|
1432
1432
|
}
|
|
1433
|
+
/**
|
|
1434
|
+
* Retrieves the list of upselling indicators.
|
|
1435
|
+
* @param params - Query parameters used to filter or paginate the results
|
|
1436
|
+
* @returns An Observable that emits the upselling indicators and total count
|
|
1437
|
+
*/
|
|
1438
|
+
getUpsellingIndicators(params) {
|
|
1439
|
+
return this.http.get(`${this.url}/upselling-indicators`, { params })
|
|
1440
|
+
.pipe(map(({ data }) => data));
|
|
1441
|
+
}
|
|
1442
|
+
/**
|
|
1443
|
+
* Creates a new upselling indicator.
|
|
1444
|
+
* @param body - Upselling indicator data
|
|
1445
|
+
* @returns An Observable that emits the created upselling indicator
|
|
1446
|
+
*/
|
|
1447
|
+
postUpsellingIndicator(body) {
|
|
1448
|
+
return this.http.post(`${this.url}/upselling-indicators`, body)
|
|
1449
|
+
.pipe(map(({ data }) => data));
|
|
1450
|
+
}
|
|
1451
|
+
/**
|
|
1452
|
+
* Updates an existing upselling indicator.
|
|
1453
|
+
* @param id - Identifier of the upselling indicator to update
|
|
1454
|
+
* @param body - Updated upselling indicator data
|
|
1455
|
+
* @returns An Observable that emits the updated upselling indicator
|
|
1456
|
+
*/
|
|
1457
|
+
putUpsellingIndicator(id, body) {
|
|
1458
|
+
return this.http.put(`${this.url}/upselling-indicators/${id}`, body)
|
|
1459
|
+
.pipe(map(({ data }) => data));
|
|
1460
|
+
}
|
|
1461
|
+
/**
|
|
1462
|
+
* Deletes an upselling indicator by its identifier.
|
|
1463
|
+
* @param id - Identifier of the upselling indicator to delete
|
|
1464
|
+
* @returns An Observable that emits the operation result
|
|
1465
|
+
*/
|
|
1466
|
+
deleteUpsellingIndicator(id) {
|
|
1467
|
+
return this.http.delete(`${this.url}/upselling-indicators/${id}`)
|
|
1468
|
+
.pipe(map(({ data }) => data));
|
|
1469
|
+
}
|
|
1470
|
+
/**
|
|
1471
|
+
* Updates the active status of an upselling indicator.
|
|
1472
|
+
* @param id - Identifier of the upselling indicator
|
|
1473
|
+
* @param isActive - Indicates whether the upselling indicator should be active or inactive
|
|
1474
|
+
* @returns An Observable that emits the operation result
|
|
1475
|
+
*/
|
|
1476
|
+
patchUpsellingIndicator(id, isActive) {
|
|
1477
|
+
return this.http.patch(`${this.url}/upselling-indicators/${id}`, { isActive })
|
|
1478
|
+
.pipe(map(({ data }) => data));
|
|
1479
|
+
}
|
|
1433
1480
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: ApiCatalogsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1434
1481
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: ApiCatalogsService, providedIn: 'root' });
|
|
1435
1482
|
}
|
|
@@ -1440,6 +1487,47 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
1440
1487
|
}]
|
|
1441
1488
|
}] });
|
|
1442
1489
|
|
|
1490
|
+
class ApiCheckpointsService {
|
|
1491
|
+
environments = inject(ENVIRONMENT_TOKEN);
|
|
1492
|
+
http = inject(HttpClient);
|
|
1493
|
+
/**
|
|
1494
|
+
* Retrieves the API checkpoints URL from the environment configuration.
|
|
1495
|
+
*
|
|
1496
|
+
* @returns {string} The API checkpoints URL.
|
|
1497
|
+
*/
|
|
1498
|
+
get url() {
|
|
1499
|
+
return this.environments.apiCheckpointsUrl ?? '';
|
|
1500
|
+
}
|
|
1501
|
+
/**
|
|
1502
|
+
* Retrieves event registers from the checkpoints API.
|
|
1503
|
+
*
|
|
1504
|
+
* @param {QueryParams} params - Query parameters for filtering and pagination.
|
|
1505
|
+
* @returns {Observable<EventRegistersOut>} An observable containing the event registers data.
|
|
1506
|
+
*/
|
|
1507
|
+
getEventRegisters(params) {
|
|
1508
|
+
return this.http.get(`${this.url}/event-registers`, { params })
|
|
1509
|
+
.pipe(map(({ data }) => data));
|
|
1510
|
+
}
|
|
1511
|
+
/**
|
|
1512
|
+
* Retrieves checkpoints from the checkpoints API.
|
|
1513
|
+
*
|
|
1514
|
+
* @param {QueryParams} params - Query parameters for filtering and pagination.
|
|
1515
|
+
* @returns {Observable<CheckpointsInventoryOut>} An observable containing the checkpoints data.
|
|
1516
|
+
*/
|
|
1517
|
+
getCheckpoints(params) {
|
|
1518
|
+
return this.http.get(`${this.url}/checkpoints`, { params })
|
|
1519
|
+
.pipe(map(({ data }) => data));
|
|
1520
|
+
}
|
|
1521
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: ApiCheckpointsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1522
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: ApiCheckpointsService, providedIn: 'root' });
|
|
1523
|
+
}
|
|
1524
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: ApiCheckpointsService, decorators: [{
|
|
1525
|
+
type: Injectable,
|
|
1526
|
+
args: [{
|
|
1527
|
+
providedIn: 'root'
|
|
1528
|
+
}]
|
|
1529
|
+
}] });
|
|
1530
|
+
|
|
1443
1531
|
class ApiCompaniesService {
|
|
1444
1532
|
environments = inject(ENVIRONMENT_TOKEN);
|
|
1445
1533
|
http = inject(HttpClient);
|
|
@@ -2047,19 +2135,18 @@ class ApiCompaniesService {
|
|
|
2047
2135
|
/**
|
|
2048
2136
|
* Retrieves the parameter values based on the provided parameter names.
|
|
2049
2137
|
*
|
|
2050
|
-
* @param {
|
|
2051
|
-
* @param {string[]} params.paramNames - An array of parameter names for which the values need to be fetched.
|
|
2138
|
+
* @param {string[]} names - An array of parameter names for which the values need to be fetched.
|
|
2052
2139
|
* @return {Observable<ParametersValuesOut>} An observable that emits the fetched parameter values.
|
|
2053
2140
|
*/
|
|
2054
|
-
postParametersValues(
|
|
2055
|
-
const parameters =
|
|
2141
|
+
postParametersValues(names) {
|
|
2142
|
+
const parameters = names.map((name) => ({ name }));
|
|
2056
2143
|
return this.http.post(`${this.url}/parameters-values`, { parameters })
|
|
2057
2144
|
.pipe(map(({ data }) => data));
|
|
2058
2145
|
}
|
|
2059
2146
|
/**
|
|
2060
|
-
* Retrieves parameter values based on the provided
|
|
2147
|
+
* Retrieves parameter values based on the provided model configuration.
|
|
2061
2148
|
*
|
|
2062
|
-
* @param {
|
|
2149
|
+
* @param {ParametersByModelIn} parameters - The input object containing the criteria or model details to retrieve the parameters.
|
|
2063
2150
|
* @return {Observable<ParametersValuesOut>} An observable that emits the parameter values fetched from the server.
|
|
2064
2151
|
*/
|
|
2065
2152
|
postParameterValueByModel(parameters) {
|
|
@@ -2069,12 +2156,11 @@ class ApiCompaniesService {
|
|
|
2069
2156
|
/**
|
|
2070
2157
|
* Retrieves the value of a specified parameter.
|
|
2071
2158
|
*
|
|
2072
|
-
* @param {
|
|
2073
|
-
* @param {string} input.paramName - The name of the parameter whose value is to be retrieved.
|
|
2159
|
+
* @param {string} name - The name of the parameter whose value is to be retrieved.
|
|
2074
2160
|
* @return {Observable<ParameterValueOut>} An observable emitting the value of the specified parameter.
|
|
2075
2161
|
*/
|
|
2076
|
-
getParameterValue(
|
|
2077
|
-
return this.http.get(`${this.url}/parameters-values/${
|
|
2162
|
+
getParameterValue(name) {
|
|
2163
|
+
return this.http.get(`${this.url}/parameters-values/${name}`)
|
|
2078
2164
|
.pipe(map(({ data }) => data));
|
|
2079
2165
|
}
|
|
2080
2166
|
/**
|
|
@@ -2491,22 +2577,6 @@ class ApiCompaniesService {
|
|
|
2491
2577
|
return this.http.put(`${this.url}/tdx-account-settings/${id}`, body)
|
|
2492
2578
|
.pipe(map(({ data }) => data));
|
|
2493
2579
|
}
|
|
2494
|
-
/**
|
|
2495
|
-
* Retrieves the employees of a specific location using a provided token.
|
|
2496
|
-
*
|
|
2497
|
-
* @param params - Input parameters for the request, defined by the `LocationEmployeesIn` interface.
|
|
2498
|
-
* @returns An `Observable<LocationEmployeesOut>` that emits the employees
|
|
2499
|
-
* associated with the given location.
|
|
2500
|
-
* @returns The response type is `ApiSuccess<LocationEmployeesOut>`, from which the `data` field is extracted.
|
|
2501
|
-
*/
|
|
2502
|
-
getLocationEmployeesByToken(params) {
|
|
2503
|
-
return this.http.get(`${this.url}/location-employees`, {
|
|
2504
|
-
params: params.queryParams,
|
|
2505
|
-
headers: {
|
|
2506
|
-
Authorization: `Bearer ${params.token}`
|
|
2507
|
-
}
|
|
2508
|
-
}).pipe(map(({ data }) => data));
|
|
2509
|
-
}
|
|
2510
2580
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: ApiCompaniesService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2511
2581
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: ApiCompaniesService, providedIn: 'root' });
|
|
2512
2582
|
}
|
|
@@ -2935,6 +3005,43 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
2935
3005
|
}]
|
|
2936
3006
|
}] });
|
|
2937
3007
|
|
|
3008
|
+
class ApiDropoffsService {
|
|
3009
|
+
environments = inject(ENVIRONMENT_TOKEN);
|
|
3010
|
+
http = inject(HttpClient);
|
|
3011
|
+
/**
|
|
3012
|
+
* Retrieves the URL for the Inventories API from the environment configurations.
|
|
3013
|
+
*
|
|
3014
|
+
* @return {string} The URL of the Inventories API.
|
|
3015
|
+
*/
|
|
3016
|
+
get url() {
|
|
3017
|
+
return this.environments.apiDropoffUrl ?? '';
|
|
3018
|
+
}
|
|
3019
|
+
/**
|
|
3020
|
+
* Send a Courier Request for Shipment.
|
|
3021
|
+
*
|
|
3022
|
+
* @param {ShipmentsBookingIn} body - The courier for shipment data.
|
|
3023
|
+
*/
|
|
3024
|
+
postShipmentsBooking(body) {
|
|
3025
|
+
return this.http.post(`${this.url}/shipments/booking`, body).pipe(map(({ data }) => data));
|
|
3026
|
+
}
|
|
3027
|
+
/**
|
|
3028
|
+
* Send a EReceipt for Shipment.
|
|
3029
|
+
*
|
|
3030
|
+
* @param {ShipmentsEReceiptIn} body - The EReceipt for Shipment data.
|
|
3031
|
+
*/
|
|
3032
|
+
postShipmentsEReceipt(body) {
|
|
3033
|
+
return this.http.post(`${this.url}/shipments/ereceipt`, body).pipe(map(({ data }) => data));
|
|
3034
|
+
}
|
|
3035
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: ApiDropoffsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
3036
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: ApiDropoffsService, providedIn: 'root' });
|
|
3037
|
+
}
|
|
3038
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: ApiDropoffsService, decorators: [{
|
|
3039
|
+
type: Injectable,
|
|
3040
|
+
args: [{
|
|
3041
|
+
providedIn: 'root'
|
|
3042
|
+
}]
|
|
3043
|
+
}] });
|
|
3044
|
+
|
|
2938
3045
|
class ApiEToolsAutoBillingService {
|
|
2939
3046
|
environments = inject(ENVIRONMENT_TOKEN);
|
|
2940
3047
|
http = inject(HttpClient);
|
|
@@ -3089,7 +3196,7 @@ class ApiExternalOperationsService {
|
|
|
3089
3196
|
* Retrieves delivery confirmation details based on the provided OTP code.
|
|
3090
3197
|
*
|
|
3091
3198
|
* @param {string} otpCode - The OTP code used to search for delivery confirmation.
|
|
3092
|
-
* @return {Observable<
|
|
3199
|
+
* @return {Observable<DeliveryConfirmationSearchOut>} An observable containing the delivery confirmation data.
|
|
3093
3200
|
*/
|
|
3094
3201
|
getDeliveryConfirmation(otpCode) {
|
|
3095
3202
|
return this.http.get(`${this.url}/delivery-confirmation/search/${otpCode}`)
|
|
@@ -3130,6 +3237,38 @@ class ApiExternalOperationsService {
|
|
|
3130
3237
|
return this.http.put(`${this.url}/delivery-confirmation/confirmation/${otp}`, body)
|
|
3131
3238
|
.pipe(map$1(({ data }) => data));
|
|
3132
3239
|
}
|
|
3240
|
+
/**
|
|
3241
|
+
* Retrieves signature page confirmation information associated with an OTP code.
|
|
3242
|
+
*
|
|
3243
|
+
* @param {string} otpCode - OTP code used to search for the signature page confirmation.
|
|
3244
|
+
* @returns {Observable<SignaturePageConfirmationOut>} An observable containing the signature page confirmation details.
|
|
3245
|
+
*/
|
|
3246
|
+
getSignaturePageConfirmationSearch(otpCode) {
|
|
3247
|
+
return this.http.get(`${this.url}/signature-page-confirmation/search/${otpCode}`)
|
|
3248
|
+
.pipe(map$1(({ data }) => data));
|
|
3249
|
+
}
|
|
3250
|
+
/**
|
|
3251
|
+
* Generates a signature page confirmation request for a shipment.
|
|
3252
|
+
*
|
|
3253
|
+
* @param {ShipmentSignaturePageIn} payload - Shipment data required to generate the signature page confirmation.
|
|
3254
|
+
* @returns {Observable<SignaturePageConfirmationGenerateOut>} An observable containing the generated confirmation information.
|
|
3255
|
+
*/
|
|
3256
|
+
postSignaturePageConfirmationGenerate(payload) {
|
|
3257
|
+
return this.http.post(`${this.url}/signature-page-confirmation/generate`, payload)
|
|
3258
|
+
.pipe(map$1(({ data }) => data));
|
|
3259
|
+
}
|
|
3260
|
+
/**
|
|
3261
|
+
* Confirms a shipment signature page using an OTP code.
|
|
3262
|
+
*
|
|
3263
|
+
* @param {ShipmentSignaturePageConfirmationIn} input - Signature page confirmation data.
|
|
3264
|
+
* @param {string} input.otp - OTP code used to validate the confirmation.
|
|
3265
|
+
* @param {...Object} input.body - Additional confirmation information sent in the request body.
|
|
3266
|
+
* @returns {Observable<{}>} An observable that emits the API response data.
|
|
3267
|
+
*/
|
|
3268
|
+
putSignaturePageConfirmation({ otp, ...body }) {
|
|
3269
|
+
return this.http.put(`${this.url}/signature-page-confirmation/${otp}`, body)
|
|
3270
|
+
.pipe(map$1(({ data }) => data));
|
|
3271
|
+
}
|
|
3133
3272
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: ApiExternalOperationsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
3134
3273
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: ApiExternalOperationsService, providedIn: 'root' });
|
|
3135
3274
|
}
|
|
@@ -3155,7 +3294,7 @@ class ApiInventoriesService {
|
|
|
3155
3294
|
* Retrieves a list of checkpoints based on query parameters.
|
|
3156
3295
|
*
|
|
3157
3296
|
* @param {QueryParams} params - Query parameters for filtering the checkpoints.
|
|
3158
|
-
* @returns {Observable<
|
|
3297
|
+
* @returns {Observable<CheckpointsInventoryOut>} The list of checkpoints.
|
|
3159
3298
|
*/
|
|
3160
3299
|
getCheckpoints(params) {
|
|
3161
3300
|
return this.http.get(`${this.url}/checkpoints`, {
|
|
@@ -3400,6 +3539,101 @@ class ApiInventoriesService {
|
|
|
3400
3539
|
return this.http.get(`${this.url}/stock-update/packages/${id}`)
|
|
3401
3540
|
.pipe(map(({ data }) => data));
|
|
3402
3541
|
}
|
|
3542
|
+
/**
|
|
3543
|
+
* Retrieves a list of courier routes based on query parameters.
|
|
3544
|
+
*
|
|
3545
|
+
* @param {QueryParams} params - Query parameters for filtering the courier routes.
|
|
3546
|
+
* @returns {Observable<CourierRoutesOut>} An observable that emits the list of courier routes.
|
|
3547
|
+
*/
|
|
3548
|
+
getCourierRoutes(params) {
|
|
3549
|
+
return this.http.get(`${this.url}/courier-routes`, {
|
|
3550
|
+
params
|
|
3551
|
+
}).pipe(map(({ data }) => data));
|
|
3552
|
+
}
|
|
3553
|
+
/**
|
|
3554
|
+
* Fetches the courier route details based on the provided courier route ID.
|
|
3555
|
+
*
|
|
3556
|
+
* @param {number} id - The courier route id
|
|
3557
|
+
* @return {Observable<CourierRouteOut>} An observable that emits the courier route data.
|
|
3558
|
+
*/
|
|
3559
|
+
getCourierRoute(id) {
|
|
3560
|
+
return this.http.get(`${this.url}/courier-routes/${id}`)
|
|
3561
|
+
.pipe(map(({ data }) => data));
|
|
3562
|
+
}
|
|
3563
|
+
/**
|
|
3564
|
+
* Creates a new courier route.
|
|
3565
|
+
*
|
|
3566
|
+
* @param {CourierRouteIn} body - The data for the new courier route.
|
|
3567
|
+
* @returns {Observable<CourierRouteOut>} An observable the created courier route detail.
|
|
3568
|
+
*/
|
|
3569
|
+
postCourierRoute(body) {
|
|
3570
|
+
return this.http.post(`${this.url}/courier-routes`, body).pipe(map(({ data }) => data));
|
|
3571
|
+
}
|
|
3572
|
+
/**
|
|
3573
|
+
* Update an existing courier route.
|
|
3574
|
+
*
|
|
3575
|
+
* @param {number} id - The identifier of the courier route record to update.
|
|
3576
|
+
* @param {CourierRouteIn} body - The courier route data to be updated.
|
|
3577
|
+
* @returns {Observable<CourierRouteOut>} An observable detail of the updated courier route.
|
|
3578
|
+
*/
|
|
3579
|
+
putCourierRoute(id, body) {
|
|
3580
|
+
return this.http.put(`${this.url}/courier-routes/${id}`, body).pipe(map(({ data }) => data));
|
|
3581
|
+
}
|
|
3582
|
+
/**
|
|
3583
|
+
* Delete an existing courier route.
|
|
3584
|
+
*
|
|
3585
|
+
* @param {number} id - The unique identifier of the courier route to be deleted.
|
|
3586
|
+
* @returns {Observable<CourierRouteOut>} An observable that emits the result of the delete courier route.
|
|
3587
|
+
*/
|
|
3588
|
+
deleteCourierRoute(id) {
|
|
3589
|
+
return this.http.delete(`${this.url}/courier-routes/${id}`)
|
|
3590
|
+
.pipe(map(({ data }) => data));
|
|
3591
|
+
}
|
|
3592
|
+
/**
|
|
3593
|
+
* Get a package/shipment enabled to perform an action.
|
|
3594
|
+
*
|
|
3595
|
+
* @param {PackageValidationActionIn} body - package/shipment number to validate.
|
|
3596
|
+
* @returns {Observable<PackageValidationActionOut>} An observable with the package/shipment validated.
|
|
3597
|
+
*/
|
|
3598
|
+
postPackageValidationActions(body) {
|
|
3599
|
+
return this.http.post(`${this.url}/package-validation/actions`, body).pipe(map(({ data }) => data));
|
|
3600
|
+
}
|
|
3601
|
+
/**
|
|
3602
|
+
* Edit return first mile resource.
|
|
3603
|
+
*
|
|
3604
|
+
* @param {ReturnFirstMileIn} body - The first mile data to be updated.
|
|
3605
|
+
* @returns {Observable<ReturnFirstMileOut>} An observable with the first mile updated.
|
|
3606
|
+
*/
|
|
3607
|
+
putReturnFirstMile(body) {
|
|
3608
|
+
return this.http.put(`${this.url}/return-first-mile`, body).pipe(map(({ data }) => data));
|
|
3609
|
+
}
|
|
3610
|
+
/**
|
|
3611
|
+
* Replaces a Package Reassign Position resource.
|
|
3612
|
+
*
|
|
3613
|
+
* @param {PackageReassignPositionIn} body - The Package Reassign Position resource data to be updated.
|
|
3614
|
+
* @returns {Observable<PackageReassignPositionOut>} An observable with the Package Reassign Position resource updated.
|
|
3615
|
+
*/
|
|
3616
|
+
putPackageReassignPositions(body) {
|
|
3617
|
+
return this.http.put(`${this.url}/package-reassign-positions`, body).pipe(map(({ data }) => data));
|
|
3618
|
+
}
|
|
3619
|
+
/**
|
|
3620
|
+
* Edit missing package resource.
|
|
3621
|
+
*
|
|
3622
|
+
* @param {MissingPackagesIn} body - The missing package resource data to be updated.
|
|
3623
|
+
* @returns {Observable<MissingPackagesOut>} An observable with the missing package resource updated.
|
|
3624
|
+
*/
|
|
3625
|
+
putMissingPackages(body) {
|
|
3626
|
+
return this.http.put(`${this.url}/missing-packages`, body).pipe(map(({ data }) => data));
|
|
3627
|
+
}
|
|
3628
|
+
/**
|
|
3629
|
+
* Edit package on hold resource..
|
|
3630
|
+
*
|
|
3631
|
+
* @param {PackageOnHoldIn} body - The package on hold resource data to be updated.
|
|
3632
|
+
* @returns {Observable<PackageOnHoldOut>} An observable with the package on hold resource updated.
|
|
3633
|
+
*/
|
|
3634
|
+
putPackageOnHold(body) {
|
|
3635
|
+
return this.http.put(`${this.url}/package-on-hold`, body).pipe(map(({ data }) => data));
|
|
3636
|
+
}
|
|
3403
3637
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: ApiInventoriesService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
3404
3638
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: ApiInventoriesService, providedIn: 'root' });
|
|
3405
3639
|
}
|
|
@@ -4406,19 +4640,6 @@ class ApiSecurityService {
|
|
|
4406
4640
|
return this.http.get(`${this.url}/auth/me`)
|
|
4407
4641
|
.pipe(map(({ data }) => data));
|
|
4408
4642
|
}
|
|
4409
|
-
/**
|
|
4410
|
-
* Fetches the authenticated user's details from the server.
|
|
4411
|
-
*
|
|
4412
|
-
* @param token The JWT token used for authorization.
|
|
4413
|
-
* @return An Observable that emits the user's details encapsulated in a MeOut object.
|
|
4414
|
-
*/
|
|
4415
|
-
getOtherMe(token) {
|
|
4416
|
-
return this.http.get(`${this.url}/auth/me`, {
|
|
4417
|
-
headers: {
|
|
4418
|
-
Authorization: `Bearer ${token}`
|
|
4419
|
-
}
|
|
4420
|
-
}).pipe(map(({ data }) => data));
|
|
4421
|
-
}
|
|
4422
4643
|
/**
|
|
4423
4644
|
* Fetches a user by their unique ID.
|
|
4424
4645
|
*
|
|
@@ -4834,7 +5055,7 @@ class ApiShipmentsService {
|
|
|
4834
5055
|
* @returns {Observable<ShipmentDocumentsOut>} observable containing the shipment documents
|
|
4835
5056
|
* */
|
|
4836
5057
|
getDocuments(id) {
|
|
4837
|
-
return this.http.get(`${this.url}/${id}/documents`)
|
|
5058
|
+
return this.http.get(`${this.url}/shipments/${id}/documents`)
|
|
4838
5059
|
.pipe(map(({ data }) => data));
|
|
4839
5060
|
}
|
|
4840
5061
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: ApiShipmentsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
@@ -5305,6 +5526,24 @@ var ShipmentIncomeTypeCode;
|
|
|
5305
5526
|
ShipmentIncomeTypeCode["EMBASSY"] = "EMB";
|
|
5306
5527
|
})(ShipmentIncomeTypeCode || (ShipmentIncomeTypeCode = {}));
|
|
5307
5528
|
|
|
5529
|
+
var AccountTypeId;
|
|
5530
|
+
(function (AccountTypeId) {
|
|
5531
|
+
AccountTypeId[AccountTypeId["CASH"] = 1] = "CASH";
|
|
5532
|
+
AccountTypeId[AccountTypeId["COMAT"] = 2] = "COMAT";
|
|
5533
|
+
AccountTypeId[AccountTypeId["FOC"] = 3] = "FOC";
|
|
5534
|
+
AccountTypeId[AccountTypeId["EMPLOYEE"] = 4] = "EMPLOYEE";
|
|
5535
|
+
AccountTypeId[AccountTypeId["RPA"] = 5] = "RPA";
|
|
5536
|
+
AccountTypeId[AccountTypeId["GL"] = 6] = "GL";
|
|
5537
|
+
AccountTypeId[AccountTypeId["CUS"] = 7] = "CUS";
|
|
5538
|
+
AccountTypeId[AccountTypeId["VENDOR"] = 8] = "VENDOR";
|
|
5539
|
+
AccountTypeId[AccountTypeId["WPX"] = 9] = "WPX";
|
|
5540
|
+
AccountTypeId[AccountTypeId["DHL"] = 12] = "DHL";
|
|
5541
|
+
})(AccountTypeId || (AccountTypeId = {}));
|
|
5542
|
+
var AccountTypeName;
|
|
5543
|
+
(function (AccountTypeName) {
|
|
5544
|
+
AccountTypeName["EMBASSY"] = "EMBASSY";
|
|
5545
|
+
})(AccountTypeName || (AccountTypeName = {}));
|
|
5546
|
+
|
|
5308
5547
|
var OperationModuleStatus;
|
|
5309
5548
|
(function (OperationModuleStatus) {
|
|
5310
5549
|
OperationModuleStatus["CANCELED"] = "canceled";
|
|
@@ -5342,6 +5581,35 @@ var Group;
|
|
|
5342
5581
|
Group["expiration"] = "expiration";
|
|
5343
5582
|
Group["verification"] = "verification";
|
|
5344
5583
|
})(Group || (Group = {}));
|
|
5584
|
+
var InventoryActions;
|
|
5585
|
+
(function (InventoryActions) {
|
|
5586
|
+
InventoryActions["INVENTORY_CHECK_OUT"] = "inventoryCheckOut";
|
|
5587
|
+
InventoryActions["INVENTORY_COURIER_PICK_UP"] = "inventoryCourierPickUp";
|
|
5588
|
+
InventoryActions["INVENTORY_LOCATION_BACKROOM"] = "inventoryLocationBackroom";
|
|
5589
|
+
InventoryActions["INVENTORY_MISSING_PIECES"] = "inventoryMissingPieces";
|
|
5590
|
+
InventoryActions["INVENTORY_RE_ENTRY_MISSING_PIECES"] = "inventoryReEntryMissingPieces";
|
|
5591
|
+
InventoryActions["INVENTORY_ODD_NOTIFICATION"] = "inventoryOddNotifications";
|
|
5592
|
+
InventoryActions["INVENTORY_ON_HOLD_MISSED_CONNECTION"] = "inventoryOnHoldMissed";
|
|
5593
|
+
})(InventoryActions || (InventoryActions = {}));
|
|
5594
|
+
var InventoryErrorCodes;
|
|
5595
|
+
(function (InventoryErrorCodes) {
|
|
5596
|
+
InventoryErrorCodes["CODE_SHP_FORMAT"] = "INV-E001";
|
|
5597
|
+
InventoryErrorCodes["CODE_PCKG_FORMAT"] = "INV-E002";
|
|
5598
|
+
InventoryErrorCodes["CODE_PACKAGE_NOT_FOUND"] = "INV-E101";
|
|
5599
|
+
InventoryErrorCodes["CODE_EXISTS_INVENTORY_DIFFERENT_LOCATION"] = "INV-E007";
|
|
5600
|
+
InventoryErrorCodes["CODE_PACKAGE_NOT_IN_STOCK"] = "INV-E105";
|
|
5601
|
+
InventoryErrorCodes["CODE_PACKAGE_NOT_MISSING"] = "INV-E107";
|
|
5602
|
+
InventoryErrorCodes["CODE_ACTION_NOT_VALID"] = "INV-E108";
|
|
5603
|
+
InventoryErrorCodes["CODE_MULTIPLE_PACKAGES"] = "INV-E109";
|
|
5604
|
+
InventoryErrorCodes["CODE_PACKAGE_NOT_CHECK_IN"] = "INV-E110";
|
|
5605
|
+
InventoryErrorCodes["CODE_PACKAGE_NOT_DROP_OFF"] = "INV-E111";
|
|
5606
|
+
})(InventoryErrorCodes || (InventoryErrorCodes = {}));
|
|
5607
|
+
var RouteModelType;
|
|
5608
|
+
(function (RouteModelType) {
|
|
5609
|
+
RouteModelType["ROUTE_ID"] = "RouteId";
|
|
5610
|
+
RouteModelType["COURIER"] = "Courier";
|
|
5611
|
+
RouteModelType["COURIER_ROUTE"] = "CourierRoute";
|
|
5612
|
+
})(RouteModelType || (RouteModelType = {}));
|
|
5345
5613
|
|
|
5346
5614
|
var PaymentTypeCode;
|
|
5347
5615
|
(function (PaymentTypeCode) {
|
|
@@ -5612,23 +5880,40 @@ function apiTokenInterceptor(req, next) {
|
|
|
5612
5880
|
return next(req);
|
|
5613
5881
|
}
|
|
5614
5882
|
|
|
5615
|
-
const DEFAULT_TTL = 10000; // ttl in ms
|
|
5616
5883
|
const cache = new Map();
|
|
5617
5884
|
const inFlightRequests = new Map();
|
|
5618
5885
|
/**
|
|
5619
|
-
*
|
|
5620
|
-
*
|
|
5886
|
+
* Resolves the TTL for a URL from the first matching `cacheRoutes` entry.
|
|
5887
|
+
* Returns `null` when there is no match or no routes configured.
|
|
5888
|
+
*/
|
|
5889
|
+
function resolveCacheTtl(url, cacheRoutes) {
|
|
5890
|
+
if (!cacheRoutes?.length)
|
|
5891
|
+
return null;
|
|
5892
|
+
for (const route of cacheRoutes) {
|
|
5893
|
+
if (new RegExp(route.pattern).test(url)) {
|
|
5894
|
+
return route.ttl;
|
|
5895
|
+
}
|
|
5896
|
+
}
|
|
5897
|
+
return null;
|
|
5898
|
+
}
|
|
5899
|
+
/**
|
|
5900
|
+
* Interceptor function to handle opt-in HTTP caching for GET requests that match
|
|
5901
|
+
* a configured `cacheRoutes` pattern. Non-matching GETs pass through uncached.
|
|
5902
|
+
* Concurrent in-flight requests for the same key are deduplicated via `shareReplay`.
|
|
5621
5903
|
*
|
|
5622
|
-
* @param {HttpRequest<
|
|
5904
|
+
* @param {HttpRequest<unknown>} req - The HTTP request object being intercepted.
|
|
5623
5905
|
* @param {HttpHandlerFn} next - The next HTTP handler function in the chain to process the request.
|
|
5624
|
-
* @return {Observable<HttpEvent<
|
|
5906
|
+
* @return {Observable<HttpEvent<unknown>>} An observable that emits the HTTP event, either from cache
|
|
5625
5907
|
* or by invoking the next handler.
|
|
5626
5908
|
*/
|
|
5627
5909
|
function httpCachingInterceptor(req, next) {
|
|
5628
|
-
const {
|
|
5910
|
+
const { cacheRoutes } = inject(ENVIRONMENT_TOKEN);
|
|
5629
5911
|
if (req.method !== 'GET')
|
|
5630
5912
|
return next(req);
|
|
5631
5913
|
const key = req.urlWithParams;
|
|
5914
|
+
const routeTtl = resolveCacheTtl(key, cacheRoutes);
|
|
5915
|
+
if (routeTtl === null)
|
|
5916
|
+
return next(req);
|
|
5632
5917
|
const cached = cache.get(key);
|
|
5633
5918
|
if (cached) {
|
|
5634
5919
|
const isExpired = Date.now() > cached.ttl;
|
|
@@ -5645,7 +5930,7 @@ function httpCachingInterceptor(req, next) {
|
|
|
5645
5930
|
if (!(res instanceof HttpResponse)) {
|
|
5646
5931
|
return;
|
|
5647
5932
|
}
|
|
5648
|
-
const ttl = Date.now() +
|
|
5933
|
+
const ttl = Date.now() + routeTtl;
|
|
5649
5934
|
cache.set(key, { res, ttl });
|
|
5650
5935
|
}), finalize(() => {
|
|
5651
5936
|
inFlightRequests.delete(key);
|
|
@@ -5727,5 +6012,5 @@ const xmlHeaders = (format = 'object') => {
|
|
|
5727
6012
|
* Generated bundle index. Do not edit.
|
|
5728
6013
|
*/
|
|
5729
6014
|
|
|
5730
|
-
export { AlphaNumeric, ApiBillingCOService, 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, DepositTypeCode, DocumentStatusCode, ENVIRONMENT_TOKEN, Event, Group, NgxServicesModule, OpeningStatusCode, OperationModuleStatus, PaymentTypeCode, PrintMode, PrintableFormat, PrintersService, PrintersType, ShipmentIncomeTypeCode, TransferenceTypeCode, ViewSectionOption, WebSocketsService, apiHeadersInterceptor, apiTokenInterceptor, base64PdfToUrl, downloadBase64Pdf, httpCachingInterceptor, httpParams, pdfHeaders, provideNgxServices, queryString, xmlHeaders };
|
|
6015
|
+
export { AccountTypeId, AccountTypeName, AlphaNumeric, ApiBillingCOService, ApiBillingDOService, ApiBillingGtService, ApiBillingMxService, ApiBillingPaService, ApiBillingSvService, ApiCashOperationsService, ApiCatalogsService, ApiCheckpointsService, ApiCompaniesService, ApiCompositionService, ApiCustomsService, ApiDiscountsService, ApiDropoffsService, ApiEToolsAutoBillingService, ApiEventsService, ApiExternalOperationsService, ApiInventoriesService, ApiInvoicesService, ApiNotificationsService, ApiOpenItemsService, ApiQuoteService, ApiReportsService, ApiSecurityService, ApiServicesService, ApiShipmentsService, ApiSuppliesService, ApiSurveysService, CryptoService, DefaultValueType, DepositTypeCode, DocumentStatusCode, ENVIRONMENT_TOKEN, Event, Group, InventoryActions, InventoryErrorCodes, NgxServicesModule, OpeningStatusCode, OperationModuleStatus, PaymentTypeCode, PrintMode, PrintableFormat, PrintersService, PrintersType, RouteModelType, ShipmentIncomeTypeCode, TransferenceTypeCode, ViewSectionOption, WebSocketsService, apiHeadersInterceptor, apiTokenInterceptor, base64PdfToUrl, downloadBase64Pdf, httpCachingInterceptor, httpParams, pdfHeaders, provideNgxServices, queryString, xmlHeaders };
|
|
5731
6016
|
//# sourceMappingURL=experteam-mx-ngx-services.mjs.map
|