@experteam-mx/ngx-services 18.9.14 → 18.9.15
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/esm2022/lib/apis/api-inventories.service.mjs +15 -1
- package/esm2022/lib/apis/api-quote.service.mjs +87 -0
- package/esm2022/lib/apis/api-reports.service.mjs +29 -1
- package/esm2022/lib/apis/models/api-inventories.types.mjs +1 -1
- package/esm2022/lib/apis/models/api-quote.interfaces.mjs +2 -0
- package/esm2022/lib/apis/models/api-quote.types.mjs +2 -0
- package/esm2022/lib/apis/models/api-reports.interfaces.mjs +1 -1
- package/esm2022/lib/apis/models/api-reports.types.mjs +1 -1
- package/esm2022/lib/ngx-services.models.mjs +1 -1
- package/esm2022/public-api.mjs +5 -1
- package/fesm2022/experteam-mx-ngx-services.mjs +126 -1
- package/fesm2022/experteam-mx-ngx-services.mjs.map +1 -1
- package/lib/apis/api-inventories.service.d.ts +12 -1
- package/lib/apis/api-quote.service.d.ts +65 -0
- package/lib/apis/api-reports.service.d.ts +26 -1
- package/lib/apis/models/api-inventories.types.d.ts +6 -0
- package/lib/apis/models/api-quote.interfaces.d.ts +13 -0
- package/lib/apis/models/api-quote.types.d.ts +17 -0
- package/lib/apis/models/api-reports.interfaces.d.ts +78 -3
- package/lib/apis/models/api-reports.types.d.ts +5 -1
- package/lib/ngx-services.models.d.ts +1 -0
- package/package.json +1 -1
- package/public-api.d.ts +4 -0
|
@@ -2907,6 +2907,20 @@ class ApiInventoriesService {
|
|
|
2907
2907
|
return this.http.delete(`${this.url}/incident-reason-complements/${id}`)
|
|
2908
2908
|
.pipe(map(({ data }) => data));
|
|
2909
2909
|
}
|
|
2910
|
+
/**
|
|
2911
|
+
* Posts packages that are currently in stock.
|
|
2912
|
+
*
|
|
2913
|
+
* @param body - The input data containing package stock information
|
|
2914
|
+
* @returns {Observable<PackagesInStockOut>} An Observable that emits the packages in stock output data
|
|
2915
|
+
*
|
|
2916
|
+
* @remarks
|
|
2917
|
+
* This method sends a POST request to the `/packages/in-stock` endpoint and
|
|
2918
|
+
* extracts the data property from the API success response.
|
|
2919
|
+
*/
|
|
2920
|
+
postPackagesInStock(body) {
|
|
2921
|
+
return this.http.post(`${this.url}/packages/in-stock`, body)
|
|
2922
|
+
.pipe(map(({ data }) => data));
|
|
2923
|
+
}
|
|
2910
2924
|
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 });
|
|
2911
2925
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ApiInventoriesService, providedIn: 'root' });
|
|
2912
2926
|
}
|
|
@@ -3472,6 +3486,89 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
3472
3486
|
args: ['env']
|
|
3473
3487
|
}] }, { type: i1.HttpClient }] });
|
|
3474
3488
|
|
|
3489
|
+
/**
|
|
3490
|
+
* Service to manage quote-related events.
|
|
3491
|
+
*
|
|
3492
|
+
* This service provides methods to retrieve, create, and get event types
|
|
3493
|
+
* related to quote processes.
|
|
3494
|
+
*/
|
|
3495
|
+
class ApiQuoteService {
|
|
3496
|
+
environments;
|
|
3497
|
+
http;
|
|
3498
|
+
constructor(environments, http) {
|
|
3499
|
+
this.environments = environments;
|
|
3500
|
+
this.http = http;
|
|
3501
|
+
}
|
|
3502
|
+
/**
|
|
3503
|
+
* Base URL for the Quotes API.
|
|
3504
|
+
*/
|
|
3505
|
+
get url() {
|
|
3506
|
+
return this.environments.apiQuotesUrl ?? '';
|
|
3507
|
+
}
|
|
3508
|
+
/**
|
|
3509
|
+
* Retrieves all registered events for a specific quote.
|
|
3510
|
+
*
|
|
3511
|
+
* @param id - Quote identifier.
|
|
3512
|
+
* @param params - Optional query parameters such as pagination or filtering.
|
|
3513
|
+
* @returns Observable containing the list of quote events.
|
|
3514
|
+
*
|
|
3515
|
+
* @example
|
|
3516
|
+
* ```ts
|
|
3517
|
+
* this.apiQuoteService.getQuoteEvents(10, { page: 1 })
|
|
3518
|
+
* .subscribe((events) => console.log(events))
|
|
3519
|
+
* ```
|
|
3520
|
+
*/
|
|
3521
|
+
getQuoteEvents(id, params) {
|
|
3522
|
+
return this.http.get(`${this.url}/quotes/${id}/quote-events`, { params })
|
|
3523
|
+
.pipe(map(({ data }) => data));
|
|
3524
|
+
}
|
|
3525
|
+
/**
|
|
3526
|
+
* Registers a new event related to a specific quote.
|
|
3527
|
+
*
|
|
3528
|
+
* @param id - Quote identifier.
|
|
3529
|
+
* @param body - Event payload to be created.
|
|
3530
|
+
* @returns Observable containing the newly created event.
|
|
3531
|
+
*
|
|
3532
|
+
* @example
|
|
3533
|
+
* ```ts
|
|
3534
|
+
* const event: QuoteEventIn = { code: 'WON', note: 'Client approved' }
|
|
3535
|
+
* this.apiQuoteService.postQuoteEvents(10, event)
|
|
3536
|
+
* .subscribe((response) => console.log(response))
|
|
3537
|
+
* ```
|
|
3538
|
+
*/
|
|
3539
|
+
postQuoteEvents(id, body) {
|
|
3540
|
+
return this.http.post(`${this.url}/quotes/${id}/quote-events`, body)
|
|
3541
|
+
.pipe(map(({ data }) => data));
|
|
3542
|
+
}
|
|
3543
|
+
/**
|
|
3544
|
+
* Retrieves the available quote event types.
|
|
3545
|
+
*
|
|
3546
|
+
* @param params - Optional query parameters such as pagination or filtering.
|
|
3547
|
+
* @returns Observable containing the list of event types.
|
|
3548
|
+
*
|
|
3549
|
+
* @example
|
|
3550
|
+
* ```ts
|
|
3551
|
+
* this.apiQuoteService.getQuoteEventTypes({ page: 1 })
|
|
3552
|
+
* .subscribe((types) => console.log(types))
|
|
3553
|
+
* ```
|
|
3554
|
+
*/
|
|
3555
|
+
getQuoteEventTypes(params) {
|
|
3556
|
+
return this.http.get(`${this.url}/quote-event-types`, { params })
|
|
3557
|
+
.pipe(map(({ data }) => data));
|
|
3558
|
+
}
|
|
3559
|
+
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 });
|
|
3560
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ApiQuoteService, providedIn: 'root' });
|
|
3561
|
+
}
|
|
3562
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ApiQuoteService, decorators: [{
|
|
3563
|
+
type: Injectable,
|
|
3564
|
+
args: [{
|
|
3565
|
+
providedIn: 'root'
|
|
3566
|
+
}]
|
|
3567
|
+
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
3568
|
+
type: Inject,
|
|
3569
|
+
args: ['env']
|
|
3570
|
+
}] }, { type: i1.HttpClient }] });
|
|
3571
|
+
|
|
3475
3572
|
class ApiReportsService {
|
|
3476
3573
|
environments;
|
|
3477
3574
|
http;
|
|
@@ -3508,6 +3605,34 @@ class ApiReportsService {
|
|
|
3508
3605
|
return this.http.get(`${this.url}/shipments-report`, { params })
|
|
3509
3606
|
.pipe(map(({ data }) => data));
|
|
3510
3607
|
}
|
|
3608
|
+
/**
|
|
3609
|
+
* Retrieves the shipments landing report from the reports API.
|
|
3610
|
+
*
|
|
3611
|
+
* Sends a GET request to the `/shipments-landing-report` endpoint with the provided query parameters.
|
|
3612
|
+
* The HTTP response is expected to be wrapped in an `ApiSuccess` envelope, from which the `data`
|
|
3613
|
+
* payload is extracted and returned as the stream value.
|
|
3614
|
+
*
|
|
3615
|
+
* @param params - Query parameters used to filter or paginate the shipments landing report.
|
|
3616
|
+
* @returns An observable that emits the parsed `ShipmentsLandingReportOut` data from the API response.
|
|
3617
|
+
*
|
|
3618
|
+
* @remarks
|
|
3619
|
+
* - The underlying HTTP call uses `HttpClient.get` with `params` serialized as query string values.
|
|
3620
|
+
* - The response is piped through `map` to unwrap `data` from `ApiSuccess<T>`.
|
|
3621
|
+
* - Errors from the HTTP request are propagated through the observable stream.
|
|
3622
|
+
*
|
|
3623
|
+
* @example
|
|
3624
|
+
* ```ts
|
|
3625
|
+
* // Basic usage:
|
|
3626
|
+
* service.getShipmentsLandingReport({ page: 1, perPage: 25 })
|
|
3627
|
+
* .subscribe(report => {
|
|
3628
|
+
* // handle ShipmentsLandingReportOut
|
|
3629
|
+
* });
|
|
3630
|
+
* ```
|
|
3631
|
+
*/
|
|
3632
|
+
getShipmentsLandingReport(params) {
|
|
3633
|
+
return this.http.get(`${this.url}/shipments-landing-report`, { params })
|
|
3634
|
+
.pipe(map(({ data }) => data));
|
|
3635
|
+
}
|
|
3511
3636
|
/**
|
|
3512
3637
|
* Retrieves a report of external shipments based on the provided query parameters.
|
|
3513
3638
|
*
|
|
@@ -4595,5 +4720,5 @@ const xmlHeaders = (format = 'object') => {
|
|
|
4595
4720
|
* Generated bundle index. Do not edit.
|
|
4596
4721
|
*/
|
|
4597
4722
|
|
|
4598
|
-
export { AlphaNumeric, ApiBillingDOService, ApiBillingGtService, ApiBillingMxService, ApiBillingPaService, ApiBillingSvService, ApiCashOperationsService, ApiCatalogsService, ApiCompaniesService, ApiCompositionService, ApiCustomsService, ApiDiscountsService, ApiEToolsAutoBillingService, ApiEventsService, ApiExternalOperationsService, ApiInventoriesService, ApiInvoicesService, ApiNotificationsService, ApiOpenItemsService, ApiReportsService, ApiSecurityService, ApiServicesService, ApiShipmentsService, ApiSuppliesService, CryptoService, DefaultValueType, ENVIRONMENT_TOKEN, Event, NgxServicesModule, OperationModuleStatus, ViewSectionOption, WebSocketsService, apiHeadersInterceptor, apiKeyInterceptor, apiTokenInterceptor, base64PdfToUrl, downloadBase64Pdf, httpCachingInterceptor, httpParams, pdfHeaders, queryString, xmlHeaders };
|
|
4723
|
+
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 };
|
|
4599
4724
|
//# sourceMappingURL=experteam-mx-ngx-services.mjs.map
|