@experteam-mx/ngx-services 20.2.2-dev3.1 → 20.2.3-dev3.0
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.
|
@@ -3810,6 +3810,56 @@ class ApiReportsService {
|
|
|
3810
3810
|
return this.http.get(`${this.url}/sales-book-report`, { params })
|
|
3811
3811
|
.pipe(map(({ data }) => data));
|
|
3812
3812
|
}
|
|
3813
|
+
/**
|
|
3814
|
+
* Retrieves a list of shipment histories based on the provided query parameters.
|
|
3815
|
+
*
|
|
3816
|
+
* @param params - The query parameters used to filter the shipment histories.
|
|
3817
|
+
* @returns An observable that emits the list of shipment histories.
|
|
3818
|
+
*/
|
|
3819
|
+
getHistoriesReport(params) {
|
|
3820
|
+
return this.http.get(`${this.url}/histories-report`, { params })
|
|
3821
|
+
.pipe(map(({ data }) => data));
|
|
3822
|
+
}
|
|
3823
|
+
/**
|
|
3824
|
+
* Retrieves a list of parcels based on the provided query parameters.
|
|
3825
|
+
*
|
|
3826
|
+
* @param params - The query parameters used to filter the parcels.
|
|
3827
|
+
* @returns An observable that emits the list of parcels.
|
|
3828
|
+
*/
|
|
3829
|
+
getParcelsReport(params) {
|
|
3830
|
+
return this.http.get(`${this.url}/parcels-report`, { params })
|
|
3831
|
+
.pipe(map(({ data }) => data));
|
|
3832
|
+
}
|
|
3833
|
+
/**
|
|
3834
|
+
* Retrieves a list of operations based on the provided query parameters.
|
|
3835
|
+
*
|
|
3836
|
+
* @param params - The query parameters used to filter the operations.
|
|
3837
|
+
* @returns An observable that emits the list of operations.
|
|
3838
|
+
*/
|
|
3839
|
+
getOperationsReport(params) {
|
|
3840
|
+
return this.http.get(`${this.url}/operations-report`, { params })
|
|
3841
|
+
.pipe(map(({ data }) => data));
|
|
3842
|
+
}
|
|
3843
|
+
/**
|
|
3844
|
+
* Retrieves a list of operations based on the provided query parameters.
|
|
3845
|
+
*
|
|
3846
|
+
* @param params - The query parameters used to filter the operations.
|
|
3847
|
+
* @returns An observable that emits the list of operations.
|
|
3848
|
+
*/
|
|
3849
|
+
getPackagesReport(params) {
|
|
3850
|
+
return this.http.get(`${this.url}/packages-report`, { params })
|
|
3851
|
+
.pipe(map(({ data }) => data));
|
|
3852
|
+
}
|
|
3853
|
+
/**
|
|
3854
|
+
* Retrieves a list of inventories based on the provided query parameters.
|
|
3855
|
+
*
|
|
3856
|
+
* @param params - The query parameters used to filter the inventories.
|
|
3857
|
+
* @returns An observable that emits the list of inventories.
|
|
3858
|
+
*/
|
|
3859
|
+
getInventoriesReport(params) {
|
|
3860
|
+
return this.http.get(`${this.url}/inventories-report`, { params })
|
|
3861
|
+
.pipe(map(({ data }) => data));
|
|
3862
|
+
}
|
|
3813
3863
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ApiReportsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
3814
3864
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ApiReportsService, providedIn: 'root' });
|
|
3815
3865
|
}
|
|
@@ -4448,6 +4498,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImpo
|
|
|
4448
4498
|
class ApiSurveysService {
|
|
4449
4499
|
environments = inject(ENVIRONMENT_TOKEN);
|
|
4450
4500
|
http = inject(HttpClient);
|
|
4501
|
+
appKey = this.environments.apiExternalOperationsKey ?? ''; // TODO: review
|
|
4451
4502
|
/**
|
|
4452
4503
|
* Base URL for surveys API endpoints.
|
|
4453
4504
|
* @returns The configured surveys API URL or an empty string.
|
|
@@ -4455,6 +4506,9 @@ class ApiSurveysService {
|
|
|
4455
4506
|
get url() {
|
|
4456
4507
|
return this.environments.apiSurveysUrl ?? '';
|
|
4457
4508
|
}
|
|
4509
|
+
appKeyHeader() {
|
|
4510
|
+
return { ...(this.appKey && { AppKey: this.appKey }) };
|
|
4511
|
+
}
|
|
4458
4512
|
/**
|
|
4459
4513
|
* Retrieves surveys list based on query parameters.
|
|
4460
4514
|
* @param params Query parameters used to filter, paginate, or sort surveys.
|
|
@@ -4542,6 +4596,38 @@ class ApiSurveysService {
|
|
|
4542
4596
|
return this.http.get(`${this.url}/question-types`, { params })
|
|
4543
4597
|
.pipe(map(({ data }) => data));
|
|
4544
4598
|
}
|
|
4599
|
+
/**
|
|
4600
|
+
* Retrieves a customer survey by UUID.
|
|
4601
|
+
* @param uuid Customer survey identifier.
|
|
4602
|
+
* @returns Observable stream with customer survey data.
|
|
4603
|
+
*/
|
|
4604
|
+
getCustomerSurvey(uuid) {
|
|
4605
|
+
return this.http.get(`${this.url}/customer-surveys/${uuid}`, {
|
|
4606
|
+
headers: this.appKeyHeader(),
|
|
4607
|
+
}).pipe(map(({ data }) => data));
|
|
4608
|
+
}
|
|
4609
|
+
/**
|
|
4610
|
+
* Updates an existing customer survey by UUID.
|
|
4611
|
+
* @param uuid Customer survey identifier.
|
|
4612
|
+
* @param body Customer survey payload used to update the resource.
|
|
4613
|
+
* @returns Observable stream with updated customer survey data.
|
|
4614
|
+
*/
|
|
4615
|
+
putCustomerSurvey(uuid, body) {
|
|
4616
|
+
return this.http.put(`${this.url}/customer-surveys/${uuid}`, body, {
|
|
4617
|
+
headers: this.appKeyHeader(),
|
|
4618
|
+
}).pipe(map(({ data }) => data));
|
|
4619
|
+
}
|
|
4620
|
+
/**
|
|
4621
|
+
* Marks a customer survey as finished by UUID.
|
|
4622
|
+
* @param uuid Customer survey identifier.
|
|
4623
|
+
* @param body Customer survey finish payload.
|
|
4624
|
+
* @returns Observable stream with updated customer survey data.
|
|
4625
|
+
*/
|
|
4626
|
+
postCustomerSurveyFinish(uuid, body) {
|
|
4627
|
+
return this.http.post(`${this.url}/customer-surveys/${uuid}/finish`, body, {
|
|
4628
|
+
headers: this.appKeyHeader(),
|
|
4629
|
+
}).pipe(map(({ data }) => data));
|
|
4630
|
+
}
|
|
4545
4631
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ApiSurveysService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
4546
4632
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ApiSurveysService, providedIn: 'root' });
|
|
4547
4633
|
}
|