@experteam-mx/ngx-services 20.7.0 → 20.7.1

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.
@@ -3400,6 +3400,56 @@ class ApiInventoriesService {
3400
3400
  return this.http.get(`${this.url}/stock-update/packages/${id}`)
3401
3401
  .pipe(map(({ data }) => data));
3402
3402
  }
3403
+ /**
3404
+ * Retrieves a list of courier routes based on query parameters.
3405
+ *
3406
+ * @param {QueryParams} params - Query parameters for filtering the courier routes.
3407
+ * @returns {Observable<CourierRoutesOut>} An observable that emits the list of courier routes.
3408
+ */
3409
+ getCourierRoutes(params) {
3410
+ return this.http.get(`${this.url}/courier-routes`, {
3411
+ params
3412
+ }).pipe(map(({ data }) => data));
3413
+ }
3414
+ /**
3415
+ * Fetches the courier route details based on the provided courier route ID.
3416
+ *
3417
+ * @param {number} id - The courier route id
3418
+ * @return {Observable<CourierRouteOut>} An observable that emits the courier route data.
3419
+ */
3420
+ getCourierRoute(id) {
3421
+ return this.http.get(`${this.url}/courier-routes/${id}`)
3422
+ .pipe(map(({ data }) => data));
3423
+ }
3424
+ /**
3425
+ * Creates a new courier route.
3426
+ *
3427
+ * @param {CourierRouteIn} body - The data for the new courier route.
3428
+ * @returns {Observable<CourierRouteOut>} An observable the created courier route detail.
3429
+ */
3430
+ postCourierRoute(body) {
3431
+ return this.http.post(`${this.url}/courier-routes`, body).pipe(map(({ data }) => data));
3432
+ }
3433
+ /**
3434
+ * Update an existing courier route.
3435
+ *
3436
+ * @param {number} id - The identifier of the courier route record to update.
3437
+ * @param {CourierRouteIn} body - The courier route data to be updated.
3438
+ * @returns {Observable<CourierRouteOut>} An observable detail of the updated courier route.
3439
+ */
3440
+ putCourierRoute(id, body) {
3441
+ return this.http.put(`${this.url}/courier-routes/${id}`, body).pipe(map(({ data }) => data));
3442
+ }
3443
+ /**
3444
+ * Delete an existing courier route.
3445
+ *
3446
+ * @param {number} id - The unique identifier of the courier route to be deleted.
3447
+ * @returns {Observable<CourierRouteOut>} An observable that emits the result of the delete courier route.
3448
+ */
3449
+ deleteCourierRoute(id) {
3450
+ return this.http.delete(`${this.url}/courier-routes/${id}`)
3451
+ .pipe(map(({ data }) => data));
3452
+ }
3403
3453
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: ApiInventoriesService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
3404
3454
  static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: ApiInventoriesService, providedIn: 'root' });
3405
3455
  }