@experteam-mx/ngx-services 18.5.10 → 18.6.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.
- package/esm2022/lib/apis/api-billing-pa.service.mjs +76 -0
- package/esm2022/lib/apis/api-companies.service.mjs +672 -51
- package/esm2022/lib/apis/models/api-billing-pa.interfaces.mjs +2 -0
- package/esm2022/lib/apis/models/api-billing-pa.types.mjs +2 -0
- package/esm2022/lib/apis/models/api-companies.interfaces.mjs +1 -1
- package/esm2022/lib/apis/models/api-companies.types.mjs +1 -1
- package/esm2022/lib/ngx-services.models.mjs +1 -1
- package/esm2022/public-api.mjs +4 -1
- package/fesm2022/experteam-mx-ngx-services.mjs +744 -51
- package/fesm2022/experteam-mx-ngx-services.mjs.map +1 -1
- package/lib/apis/api-billing-pa.service.d.ts +47 -0
- package/lib/apis/api-companies.service.d.ts +452 -9
- package/lib/apis/models/api-billing-pa.interfaces.d.ts +26 -0
- package/lib/apis/models/api-billing-pa.types.d.ts +16 -0
- package/lib/apis/models/api-companies.interfaces.d.ts +97 -9
- package/lib/apis/models/api-companies.types.d.ts +332 -5
- package/lib/ngx-services.models.d.ts +1 -0
- package/package.json +1 -1
- package/public-api.d.ts +3 -0
|
@@ -143,6 +143,78 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
143
143
|
args: ['env']
|
|
144
144
|
}] }, { type: i1.HttpClient }] });
|
|
145
145
|
|
|
146
|
+
class ApiBillingPaService {
|
|
147
|
+
environments;
|
|
148
|
+
http;
|
|
149
|
+
constructor(environments, http) {
|
|
150
|
+
this.environments = environments;
|
|
151
|
+
this.http = http;
|
|
152
|
+
}
|
|
153
|
+
/**
|
|
154
|
+
* Retrieves the URL for the Billing Pa API from the environment configurations.
|
|
155
|
+
*
|
|
156
|
+
* @return {string} The URL of the Billing Pa API.
|
|
157
|
+
*/
|
|
158
|
+
get url() {
|
|
159
|
+
return this.environments.apiBillingPA ?? '';
|
|
160
|
+
}
|
|
161
|
+
/**
|
|
162
|
+
* Retrieves a list of districts based on query parameters.
|
|
163
|
+
*
|
|
164
|
+
* @param {QueryParams} params - Query parameters for filtering the districts.
|
|
165
|
+
* @returns {Observable<DistrictsOut>} The list of districts.
|
|
166
|
+
*/
|
|
167
|
+
getDistricts(params) {
|
|
168
|
+
return this.http.get(`${this.url}/districts`, {
|
|
169
|
+
params
|
|
170
|
+
}).pipe(map(({ data }) => data));
|
|
171
|
+
}
|
|
172
|
+
/**
|
|
173
|
+
* Retrieves a list of parishes based on query parameters.
|
|
174
|
+
*
|
|
175
|
+
* @param {QueryParams} params - Query parameters for filtering the parishes.
|
|
176
|
+
* @returns {Observable<ParishesOut>} The list of parishes.
|
|
177
|
+
*/
|
|
178
|
+
getParishes(params) {
|
|
179
|
+
return this.http.get(`${this.url}/parishes`, {
|
|
180
|
+
params
|
|
181
|
+
}).pipe(map(({ data }) => data));
|
|
182
|
+
}
|
|
183
|
+
/**
|
|
184
|
+
* Retrieves a list of provinces based on query parameters.
|
|
185
|
+
*
|
|
186
|
+
* @param {QueryParams} params - Query parameters for filtering the provinces.
|
|
187
|
+
* @returns {Observable<ProvincesOut>} The list of provinces.
|
|
188
|
+
*/
|
|
189
|
+
getProvinces(params) {
|
|
190
|
+
return this.http.get(`${this.url}/provinces`, {
|
|
191
|
+
params
|
|
192
|
+
}).pipe(map(({ data }) => data));
|
|
193
|
+
}
|
|
194
|
+
/**
|
|
195
|
+
* Retrieves the details of a customer based on query parameters.
|
|
196
|
+
*
|
|
197
|
+
* @param {QueryParams} params - Query parameters for get customer.
|
|
198
|
+
* @return {Observable<BillingPaCustomerOut>} An observable that emits customer data.
|
|
199
|
+
*/
|
|
200
|
+
getValidateCustomer(params) {
|
|
201
|
+
return this.http.get(`${this.url}/validate-customer`, {
|
|
202
|
+
params
|
|
203
|
+
}).pipe(map(({ data }) => data));
|
|
204
|
+
}
|
|
205
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ApiBillingPaService, deps: [{ token: 'env' }, { token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
206
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ApiBillingPaService, providedIn: 'root' });
|
|
207
|
+
}
|
|
208
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ApiBillingPaService, decorators: [{
|
|
209
|
+
type: Injectable,
|
|
210
|
+
args: [{
|
|
211
|
+
providedIn: 'root'
|
|
212
|
+
}]
|
|
213
|
+
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
214
|
+
type: Inject,
|
|
215
|
+
args: ['env']
|
|
216
|
+
}] }, { type: i1.HttpClient }] });
|
|
217
|
+
|
|
146
218
|
class ApiCashOperationsService {
|
|
147
219
|
environments;
|
|
148
220
|
http;
|
|
@@ -594,9 +666,8 @@ class ApiCompaniesService {
|
|
|
594
666
|
* @return {Observable<InstallationsOut>} An observable that emits the installation's data.
|
|
595
667
|
*/
|
|
596
668
|
getInstallations(params) {
|
|
597
|
-
return this.http.get(`${this.url}/installations`, {
|
|
598
|
-
|
|
599
|
-
}).pipe(map(({ data }) => data));
|
|
669
|
+
return this.http.get(`${this.url}/installations`, { params })
|
|
670
|
+
.pipe(map(({ data }) => data));
|
|
600
671
|
}
|
|
601
672
|
/**
|
|
602
673
|
* Retrieves the installation details based on the given installation ID.
|
|
@@ -608,6 +679,37 @@ class ApiCompaniesService {
|
|
|
608
679
|
return this.http.get(`${this.url}/installations/${id}`)
|
|
609
680
|
.pipe(map(({ data }) => data));
|
|
610
681
|
}
|
|
682
|
+
/**
|
|
683
|
+
* Sends a post-installation request to the server and retrieves the installation details.
|
|
684
|
+
*
|
|
685
|
+
* @param {InstallationIn} body - The installation details to be sent in the request body.
|
|
686
|
+
* @return {Observable<InstallationOut>} An observable that emits the response containing installation output details.
|
|
687
|
+
*/
|
|
688
|
+
postInstallation(body) {
|
|
689
|
+
return this.http.post(`${this.url}/installations`, body)
|
|
690
|
+
.pipe(map(({ data }) => data));
|
|
691
|
+
}
|
|
692
|
+
/**
|
|
693
|
+
* Updates an existing installation record by its ID.
|
|
694
|
+
*
|
|
695
|
+
* @param id The unique identifier of the installation to update.
|
|
696
|
+
* @param body The data payload containing the updated installation information.
|
|
697
|
+
* @return An observable that emits the updated installation data upon a successful update.
|
|
698
|
+
*/
|
|
699
|
+
putInstallation(id, body) {
|
|
700
|
+
return this.http.put(`${this.url}/installations/${id}`, body)
|
|
701
|
+
.pipe(map(({ data }) => data));
|
|
702
|
+
}
|
|
703
|
+
/**
|
|
704
|
+
* Deletes an installation by its unique identifier.
|
|
705
|
+
*
|
|
706
|
+
* @param {number} id - The unique identifier of the installation to be deleted.
|
|
707
|
+
* @return {Observable<{}>} An observable that emits the response after the installation is deleted.
|
|
708
|
+
*/
|
|
709
|
+
deleteInstallation(id) {
|
|
710
|
+
return this.http.delete(`${this.url}/installations/${id}`)
|
|
711
|
+
.pipe(map(({ data }) => data));
|
|
712
|
+
}
|
|
611
713
|
/**
|
|
612
714
|
* Retrieves a list of locations based on the provided query parameters.
|
|
613
715
|
*
|
|
@@ -615,9 +717,8 @@ class ApiCompaniesService {
|
|
|
615
717
|
* @return {Observable<LocationsOut>} An observable that emits the location's data.
|
|
616
718
|
*/
|
|
617
719
|
getLocations(params) {
|
|
618
|
-
return this.http.get(`${this.url}/locations`, {
|
|
619
|
-
|
|
620
|
-
}).pipe(map(({ data }) => data));
|
|
720
|
+
return this.http.get(`${this.url}/locations`, { params })
|
|
721
|
+
.pipe(map(({ data }) => data));
|
|
621
722
|
}
|
|
622
723
|
/**
|
|
623
724
|
* Fetches the location details for a given location ID.
|
|
@@ -629,16 +730,66 @@ class ApiCompaniesService {
|
|
|
629
730
|
return this.http.get(`${this.url}/locations/${id}`)
|
|
630
731
|
.pipe(map(({ data }) => data));
|
|
631
732
|
}
|
|
733
|
+
/**
|
|
734
|
+
* Sends a location object to the server and returns the created location data.
|
|
735
|
+
*
|
|
736
|
+
* @param {LocationIn} body - The location input object to be sent in the request body.
|
|
737
|
+
* @return {Observable<LocationOut>} An observable emitting the created location output object.
|
|
738
|
+
*/
|
|
739
|
+
postLocation(body) {
|
|
740
|
+
return this.http.post(`${this.url}/locations`, body)
|
|
741
|
+
.pipe(map(({ data }) => data));
|
|
742
|
+
}
|
|
743
|
+
/**
|
|
744
|
+
* Updates the location information for the specified ID.
|
|
745
|
+
*
|
|
746
|
+
* @param {number} id - The unique identifier of the location to be updated.
|
|
747
|
+
* @param {LocationIn} body - The updated location data to be sent in the request body.
|
|
748
|
+
* @return {Observable<LocationOut>} An observable containing the updated location information.
|
|
749
|
+
*/
|
|
750
|
+
putLocation(id, body) {
|
|
751
|
+
return this.http.put(`${this.url}/locations/${id}`, body)
|
|
752
|
+
.pipe(map(({ data }) => data));
|
|
753
|
+
}
|
|
754
|
+
/**
|
|
755
|
+
* Deletes a location by its unique identifier.
|
|
756
|
+
*
|
|
757
|
+
* @param {number} id - The unique identifier of the location to be deleted.
|
|
758
|
+
* @return {Observable<{}>} An observable that emits an empty object upon successful deletion.
|
|
759
|
+
*/
|
|
760
|
+
deleteLocation(id) {
|
|
761
|
+
return this.http.delete(`${this.url}/locations/${id}`)
|
|
762
|
+
.pipe(map(({ data }) => data));
|
|
763
|
+
}
|
|
632
764
|
/**
|
|
633
765
|
* Retrieves a list of active supply entities.
|
|
634
766
|
*
|
|
635
767
|
* @param {QueryParams} params - The query parameters to filter supply entities.
|
|
636
|
-
* @return {Observable<
|
|
768
|
+
* @return {Observable<SupplyEntitiesOut>} Observable emitting supply entities data.
|
|
637
769
|
*/
|
|
638
770
|
getSupplyEntitiesActives(params) {
|
|
639
|
-
return this.http.get(`${this.url}/supply-entities/actives`, {
|
|
640
|
-
|
|
641
|
-
|
|
771
|
+
return this.http.get(`${this.url}/supply-entities/actives`, { params })
|
|
772
|
+
.pipe(map(({ data }) => data));
|
|
773
|
+
}
|
|
774
|
+
/**
|
|
775
|
+
* Retrieves supply entities based on the provided query parameters.
|
|
776
|
+
*
|
|
777
|
+
* @param {QueryParams} params - The query parameters used to filter and fetch the supply entities.
|
|
778
|
+
* @return {Observable<SupplyEntitiesOut>} An observable that emits the supply entities data.
|
|
779
|
+
*/
|
|
780
|
+
getSupplyEntities(params) {
|
|
781
|
+
return this.http.get(`${this.url}/supply-entities`, { params })
|
|
782
|
+
.pipe(map(({ data }) => data));
|
|
783
|
+
}
|
|
784
|
+
/**
|
|
785
|
+
* Sends supply entities information to the server and receives the processed supply entities data in response.
|
|
786
|
+
*
|
|
787
|
+
* @param {SupplyEntitiesIn} body - The supply entities data to be sent to the server.
|
|
788
|
+
* @return {Observable<SupplyEntitiesOut>} An observable containing the processed supply entities data.
|
|
789
|
+
*/
|
|
790
|
+
putSupplyEntities(body) {
|
|
791
|
+
return this.http.post(`${this.url}/accounts`, body)
|
|
792
|
+
.pipe(map(({ data }) => data));
|
|
642
793
|
}
|
|
643
794
|
/**
|
|
644
795
|
* Fetches a list of employees based on the specified query parameters.
|
|
@@ -661,6 +812,37 @@ class ApiCompaniesService {
|
|
|
661
812
|
return this.http.get(`${this.url}/employees/${id}`)
|
|
662
813
|
.pipe(map(({ data }) => data));
|
|
663
814
|
}
|
|
815
|
+
/**
|
|
816
|
+
* Sends a POST request to create a new employee record.
|
|
817
|
+
*
|
|
818
|
+
* @param {EmployeeIn} body - The data of the employee to be created.
|
|
819
|
+
* @return {Observable<EmployeeOut>} An observable containing the created employee data.
|
|
820
|
+
*/
|
|
821
|
+
postEmployee(body) {
|
|
822
|
+
return this.http.post(`${this.url}/employees`, body)
|
|
823
|
+
.pipe(map(({ data }) => data));
|
|
824
|
+
}
|
|
825
|
+
/**
|
|
826
|
+
* Updates an existing employee record with the specified data.
|
|
827
|
+
*
|
|
828
|
+
* @param {number} id - The unique identifier of the employee to be updated.
|
|
829
|
+
* @param {EmployeeIn} body - The employee data to update the record with.
|
|
830
|
+
* @return {Observable<EmployeeOut>} An observable containing the updated employee data.
|
|
831
|
+
*/
|
|
832
|
+
putEmployee(id, body) {
|
|
833
|
+
return this.http.put(`${this.url}/employees/${id}`, body)
|
|
834
|
+
.pipe(map(({ data }) => data));
|
|
835
|
+
}
|
|
836
|
+
/**
|
|
837
|
+
* Deletes an employee based on the provided ID.
|
|
838
|
+
*
|
|
839
|
+
* @param {number} id - The unique identifier of the employee to delete.
|
|
840
|
+
* @return {Observable<{}>} An observable containing the response data after the employee is deleted.
|
|
841
|
+
*/
|
|
842
|
+
deleteEmployee(id) {
|
|
843
|
+
return this.http.delete(`${this.url}/employees/${id}`)
|
|
844
|
+
.pipe(map(({ data }) => data));
|
|
845
|
+
}
|
|
664
846
|
/**
|
|
665
847
|
* Retrieves the list of employees for a specified location based on provided query parameters.
|
|
666
848
|
*
|
|
@@ -672,6 +854,36 @@ class ApiCompaniesService {
|
|
|
672
854
|
params,
|
|
673
855
|
}).pipe(map(({ data }) => data));
|
|
674
856
|
}
|
|
857
|
+
/**
|
|
858
|
+
* Fetches the location employee details for a given employee ID.
|
|
859
|
+
*
|
|
860
|
+
* @param {number} id - The unique identifier of the employee whose location details are to be retrieved.
|
|
861
|
+
* @return {Observable<LocationEmployeeOut>} An observable containing the location employee details.
|
|
862
|
+
*/
|
|
863
|
+
getLocationEmployee(id) {
|
|
864
|
+
return this.http.get(`${this.url}/location-employees/${id}`)
|
|
865
|
+
.pipe(map(({ data }) => data));
|
|
866
|
+
}
|
|
867
|
+
/**
|
|
868
|
+
* Deletes a specific location employee by their unique identifier.
|
|
869
|
+
*
|
|
870
|
+
* @param {number} id - The unique identifier of the employee to be deleted.
|
|
871
|
+
* @return {Observable<{}>} - An observable emitting the server's response after the deletion.
|
|
872
|
+
*/
|
|
873
|
+
deleteLocationEmployee(id) {
|
|
874
|
+
return this.http.delete(`${this.url}/location-employees/${id}`)
|
|
875
|
+
.pipe(map(({ data }) => data));
|
|
876
|
+
}
|
|
877
|
+
/**
|
|
878
|
+
* Sends a batch of location-employee associations to the server for processing.
|
|
879
|
+
*
|
|
880
|
+
* @param {LocationEmployeeBatchIn} body - The object containing a batch of location-employee data to be posted.
|
|
881
|
+
* @return {Observable<EmployeeOut>} An observable emitting the processed employee data from the server's response.
|
|
882
|
+
*/
|
|
883
|
+
postLocationEmployeeBatch(body) {
|
|
884
|
+
return this.http.post(`${this.url}/location-employees/batch`, body)
|
|
885
|
+
.pipe(map(({ data }) => data));
|
|
886
|
+
}
|
|
675
887
|
/**
|
|
676
888
|
* Retrieves a list of countries where the company operates.
|
|
677
889
|
*
|
|
@@ -679,9 +891,8 @@ class ApiCompaniesService {
|
|
|
679
891
|
* @return {Observable<CompanyCountriesOut>} An observable containing the list of company countries.
|
|
680
892
|
*/
|
|
681
893
|
getCompanyCountries(params) {
|
|
682
|
-
return this.http.get(`${this.url}/company-countries`, {
|
|
683
|
-
|
|
684
|
-
}).pipe(map(({ data }) => data));
|
|
894
|
+
return this.http.get(`${this.url}/company-countries`, { params })
|
|
895
|
+
.pipe(map(({ data }) => data));
|
|
685
896
|
}
|
|
686
897
|
/**
|
|
687
898
|
* Retrieves the country information for a specified company by its ID.
|
|
@@ -693,6 +904,37 @@ class ApiCompaniesService {
|
|
|
693
904
|
return this.http.get(`${this.url}/company-countries/${id}`)
|
|
694
905
|
.pipe(map(({ data }) => data));
|
|
695
906
|
}
|
|
907
|
+
/**
|
|
908
|
+
* Sends a request to update or create a company country entry on the server.
|
|
909
|
+
*
|
|
910
|
+
* @param {CompanyCountryIn} body The data object representing the company country information to be sent to the server.
|
|
911
|
+
* @return {Observable<CompanyCountryOut>} An observable containing the server response with the updated or created company country data.
|
|
912
|
+
*/
|
|
913
|
+
postCompanyCountry(body) {
|
|
914
|
+
return this.http.put(`${this.url}/company-countries`, body)
|
|
915
|
+
.pipe(map(({ data }) => data));
|
|
916
|
+
}
|
|
917
|
+
/**
|
|
918
|
+
* Updates the country information for a specific company.
|
|
919
|
+
*
|
|
920
|
+
* @param {number} id - The unique identifier of the company whose country information needs to be updated.
|
|
921
|
+
* @param {CompanyCountryIn} body - The updated country information to be applied to the company.
|
|
922
|
+
* @return {Observable<CompanyCountryOut>} An observable that emits the updated company country information.
|
|
923
|
+
*/
|
|
924
|
+
putCompanyCountry(id, body) {
|
|
925
|
+
return this.http.put(`${this.url}/company-countries/${id}`, body)
|
|
926
|
+
.pipe(map(({ data }) => data));
|
|
927
|
+
}
|
|
928
|
+
/**
|
|
929
|
+
* Deletes a company-country association by its unique identifier.
|
|
930
|
+
*
|
|
931
|
+
* @param {number} id - The unique identifier of the company-country record to be deleted.
|
|
932
|
+
* @return {Observable<{}>} An observable emitting the result of the delete operation.
|
|
933
|
+
*/
|
|
934
|
+
deleteCompanyCountry(id) {
|
|
935
|
+
return this.http.delete(`${this.url}/company-countries/${id}`)
|
|
936
|
+
.pipe(map(({ data }) => data));
|
|
937
|
+
}
|
|
696
938
|
/**
|
|
697
939
|
* Fetches the reference currencies for a given country.
|
|
698
940
|
*
|
|
@@ -700,7 +942,18 @@ class ApiCompaniesService {
|
|
|
700
942
|
* @return {Observable<CountryReferenceCurrenciesOut>} The observable containing the country reference currencies data.
|
|
701
943
|
*/
|
|
702
944
|
getCountryReferenceCurrencies(params) {
|
|
703
|
-
return this.http.get(`${this.url}/country-reference-currencies`, { params })
|
|
945
|
+
return this.http.get(`${this.url}/country-reference-currencies`, { params })
|
|
946
|
+
.pipe(map(({ data }) => data));
|
|
947
|
+
}
|
|
948
|
+
/**
|
|
949
|
+
* Retrieves the reference currency details for a specific country using its ID.
|
|
950
|
+
*
|
|
951
|
+
* @param {number} id - The unique identifier of the country.
|
|
952
|
+
* @return {Observable<CountryReferenceCurrencyOut>} An observable emitting the country's reference currency details.
|
|
953
|
+
*/
|
|
954
|
+
getCountryReferenceCurrency(id) {
|
|
955
|
+
return this.http.get(`${this.url}/country-reference-currencies/${id}`)
|
|
956
|
+
.pipe(map(({ data }) => data));
|
|
704
957
|
}
|
|
705
958
|
/**
|
|
706
959
|
* Retrieves a list of currencies for different countries along with their current exchange rates.
|
|
@@ -721,6 +974,61 @@ class ApiCompaniesService {
|
|
|
721
974
|
return forkJoin($observables);
|
|
722
975
|
}));
|
|
723
976
|
}
|
|
977
|
+
/**
|
|
978
|
+
* Updates the reference currency for a specified country.
|
|
979
|
+
*
|
|
980
|
+
* @param {number} id - The unique identifier of the country.
|
|
981
|
+
* @param {CountryReferenceCurrencyIn} body - The data for updating the country's reference currency.
|
|
982
|
+
* @return {Observable<CountryReferenceCurrencyOut>} An Observable emitting the updated country reference currency data.
|
|
983
|
+
*/
|
|
984
|
+
putCountryReferenceCurrency(id, body) {
|
|
985
|
+
return this.http.put(`${this.url}/country-reference-currencies/${id}`, body)
|
|
986
|
+
.pipe(map(({ data }) => data));
|
|
987
|
+
}
|
|
988
|
+
/**
|
|
989
|
+
* Sends a POST request to create a country reference currency.
|
|
990
|
+
*
|
|
991
|
+
* @param {CountryReferenceCurrencyIn} body - The payload containing the country reference currency data.
|
|
992
|
+
* @return {Observable<CountryReferenceCurrencyOut>} An observable emitting the created country reference currency.
|
|
993
|
+
*/
|
|
994
|
+
postCountryReferenceCurrency(body) {
|
|
995
|
+
return this.http.post(`${this.url}/country-reference-currencies`, body)
|
|
996
|
+
.pipe(map(({ data }) => data));
|
|
997
|
+
}
|
|
998
|
+
/**
|
|
999
|
+
* Sends a POST request to create or update a country reference extra charge.
|
|
1000
|
+
*
|
|
1001
|
+
* @param {CountryReferenceExtraChargeIn} body - The request payload containing details about the country reference extra charge.
|
|
1002
|
+
* @return {Observable<CountryReferenceExtraChargeOut>} An observable containing the response with the created or updated country reference extra charge.
|
|
1003
|
+
*/
|
|
1004
|
+
postCountryReferenceExtraCharge(body) {
|
|
1005
|
+
return this.http.post(`${this.url}/country-reference-extra-charges`, body)
|
|
1006
|
+
.pipe(map(({ data }) => data));
|
|
1007
|
+
}
|
|
1008
|
+
/**
|
|
1009
|
+
* Updates a country reference extra charge by its ID.
|
|
1010
|
+
*
|
|
1011
|
+
* @param {number} id - The unique identifier of the country reference extra charge to be updated.
|
|
1012
|
+
* @param {CountryReferenceExtraChargeIn} body - The data to update the country reference extra charge with.
|
|
1013
|
+
* @return {Observable<CountryReferenceExtraChargeOut>} An observable that emits the updated country reference extra charge.
|
|
1014
|
+
*/
|
|
1015
|
+
putCountryReferenceExtraCharge(id, body) {
|
|
1016
|
+
return this.http.put(`${this.url}/country-reference-extra-charges/${id}`, body)
|
|
1017
|
+
.pipe(map(({ data }) => data));
|
|
1018
|
+
}
|
|
1019
|
+
/**
|
|
1020
|
+
* Enables or disables a country reference extra charge based on the provided parameters.
|
|
1021
|
+
*
|
|
1022
|
+
* @param {CountryReferenceExtraCharge} extraCharge - The country reference extra charge object to be updated.
|
|
1023
|
+
* @param {boolean} [isActive] - Optional parameter to explicitly set the active status of the extra charge.
|
|
1024
|
+
* If not provided, the current active status will be toggled.
|
|
1025
|
+
* @return {Observable<EmployeeCustomersOut>} An Observable that emits the updated employee customers output.
|
|
1026
|
+
*/
|
|
1027
|
+
patchCountryReferenceExtraCharge(extraCharge, isActive) {
|
|
1028
|
+
return this.http.patch(`${this.url}/country-reference-extra-charges/${extraCharge.id}`, {
|
|
1029
|
+
is_active: isActive ?? !extraCharge.is_active
|
|
1030
|
+
}).pipe(map(({ data }) => data));
|
|
1031
|
+
}
|
|
724
1032
|
/**
|
|
725
1033
|
* Fetches exchange data based on the provided query parameters.
|
|
726
1034
|
*
|
|
@@ -728,9 +1036,29 @@ class ApiCompaniesService {
|
|
|
728
1036
|
* @return {Observable<ExchangesOut>} An observable containing the exchange data.
|
|
729
1037
|
*/
|
|
730
1038
|
getExchanges(params) {
|
|
731
|
-
return this.http.get(`${this.url}/exchanges`, {
|
|
732
|
-
|
|
733
|
-
|
|
1039
|
+
return this.http.get(`${this.url}/exchanges`, { params })
|
|
1040
|
+
.pipe(map(({ data }) => data));
|
|
1041
|
+
}
|
|
1042
|
+
/**
|
|
1043
|
+
* Sends a POST request to create or update an exchange.
|
|
1044
|
+
*
|
|
1045
|
+
* @param {ExchangeIn} body - The request body containing the exchange data to be sent.
|
|
1046
|
+
* @return {Observable<ExchangeOut>} An observable that emits the response containing the created or updated exchange data.
|
|
1047
|
+
*/
|
|
1048
|
+
postExchange(body) {
|
|
1049
|
+
return this.http.put(`${this.url}/exchanges`, body)
|
|
1050
|
+
.pipe(map(({ data }) => data));
|
|
1051
|
+
}
|
|
1052
|
+
/**
|
|
1053
|
+
* Updates an existing exchange with new data.
|
|
1054
|
+
*
|
|
1055
|
+
* @param {number} id - The unique identifier of the exchange to update.
|
|
1056
|
+
* @param {ExchangeIn} body - The data to update the exchange with.
|
|
1057
|
+
* @return {Observable<ExchangeOut>} An observable that emits the updated exchange data.
|
|
1058
|
+
*/
|
|
1059
|
+
putExchange(id, body) {
|
|
1060
|
+
return this.http.put(`${this.url}/exchanges/${id}`, body)
|
|
1061
|
+
.pipe(map(({ data }) => data));
|
|
734
1062
|
}
|
|
735
1063
|
/**
|
|
736
1064
|
* Retrieves the current exchanges based on the given query parameters.
|
|
@@ -740,9 +1068,8 @@ class ApiCompaniesService {
|
|
|
740
1068
|
* @returns {Observable<ExchangesOut>} - An observable that emits the API response data containing the current exchanges.
|
|
741
1069
|
*/
|
|
742
1070
|
getCurrentExchanges(params) {
|
|
743
|
-
return this.http.get(`${this.url}/exchanges/current`, {
|
|
744
|
-
|
|
745
|
-
}).pipe(map(({ data }) => data));
|
|
1071
|
+
return this.http.get(`${this.url}/exchanges/current`, { params })
|
|
1072
|
+
.pipe(map(({ data }) => data));
|
|
746
1073
|
}
|
|
747
1074
|
/**
|
|
748
1075
|
* Fetches the country-specific tax information for a company.
|
|
@@ -751,20 +1078,140 @@ class ApiCompaniesService {
|
|
|
751
1078
|
* @return {Observable<CompanyCountryTaxesOut>} An observable that emits the tax information.
|
|
752
1079
|
*/
|
|
753
1080
|
getCompanyCountryTaxes(params) {
|
|
754
|
-
return this.http.get(`${this.url}/company-country-taxes`, {
|
|
755
|
-
|
|
756
|
-
|
|
1081
|
+
return this.http.get(`${this.url}/company-country-taxes`, { params })
|
|
1082
|
+
.pipe(map(({ data }) => data));
|
|
1083
|
+
}
|
|
1084
|
+
/**
|
|
1085
|
+
* Fetches account information based on the provided query parameters.
|
|
1086
|
+
*
|
|
1087
|
+
* @param {QueryParams} params - The query parameters for fetching account data.
|
|
1088
|
+
* @return {Observable<AccountsOut>} An observable emitting the account data.
|
|
1089
|
+
*/
|
|
1090
|
+
getAccounts(params) {
|
|
1091
|
+
return this.http.get(`${this.url}/accounts`)
|
|
1092
|
+
.pipe(map(({ data }) => data));
|
|
1093
|
+
}
|
|
1094
|
+
/**
|
|
1095
|
+
* Fetches the account information for the specified account ID.
|
|
1096
|
+
*
|
|
1097
|
+
* @param {number} id - The unique identifier of the account to retrieve.
|
|
1098
|
+
* @return {Observable<AccountOut>} An observable that emits the account details.
|
|
1099
|
+
*/
|
|
1100
|
+
getAccount(id) {
|
|
1101
|
+
return this.http.get(`${this.url}/accounts/${id}`)
|
|
1102
|
+
.pipe(map(({ data }) => data));
|
|
1103
|
+
}
|
|
1104
|
+
/**
|
|
1105
|
+
* Creates a new account by sending account details in the body.
|
|
1106
|
+
*
|
|
1107
|
+
* @param {AccountIn} body - The account information to be sent in the request body.
|
|
1108
|
+
* @return {Observable<AccountOut>} Observable that emits the created account details upon success.
|
|
1109
|
+
*/
|
|
1110
|
+
postAccount(body) {
|
|
1111
|
+
return this.http.post(`${this.url}/accounts`, body)
|
|
1112
|
+
.pipe(map(({ data }) => data));
|
|
1113
|
+
}
|
|
1114
|
+
/**
|
|
1115
|
+
* Updates an account with the specified ID using the provided data.
|
|
1116
|
+
*
|
|
1117
|
+
* @param {number} id - The unique identifier of the account to be updated.
|
|
1118
|
+
* @param {AccountIn} body - The data to update the account with.
|
|
1119
|
+
* @return {Observable<AccountOut>} An observable emitting the updated account details.
|
|
1120
|
+
*/
|
|
1121
|
+
putAccount(id, body) {
|
|
1122
|
+
return this.http.post(`${this.url}/accounts/${id}`, body)
|
|
1123
|
+
.pipe(map(({ data }) => data));
|
|
1124
|
+
}
|
|
1125
|
+
/**
|
|
1126
|
+
* Fetches account entity data from the server based on the provided query parameters.
|
|
1127
|
+
*
|
|
1128
|
+
* @param {QueryParams} params - The query parameters to be sent with the HTTP request.
|
|
1129
|
+
* @return {Observable<AccountEntitiesOut>} An observable that emits the account entities data.
|
|
1130
|
+
*/
|
|
1131
|
+
getAccountEntities(params) {
|
|
1132
|
+
return this.http.get(`${this.url}/account-entities`, { params })
|
|
1133
|
+
.pipe(map(({ data }) => data));
|
|
1134
|
+
}
|
|
1135
|
+
/**
|
|
1136
|
+
* Updates an account entity using the provided details.
|
|
1137
|
+
*
|
|
1138
|
+
* @param {AccountEntitiesIn} body The account entity data to be updated.
|
|
1139
|
+
* @return {Observable<AccountEntitiesOut>} An observable containing the updated account entity details.
|
|
1140
|
+
*/
|
|
1141
|
+
putAccountEntity(body) {
|
|
1142
|
+
return this.http.put(`${this.url}/account-entities`, body)
|
|
1143
|
+
.pipe(map(({ data }) => data));
|
|
757
1144
|
}
|
|
758
1145
|
/**
|
|
759
1146
|
* Retrieves the list of active account entities based on the provided query parameters.
|
|
760
1147
|
*
|
|
761
1148
|
* @param {QueryParams} params - The parameters to filter and query active account entities.
|
|
762
|
-
* @return {Observable<
|
|
1149
|
+
* @return {Observable<AccountEntitiesOut>} An observable that emits the list of active account entities.
|
|
763
1150
|
*/
|
|
764
1151
|
getAccountEntitiesActives(params) {
|
|
765
|
-
return this.http.get(`${this.url}/account-entities/actives`, {
|
|
766
|
-
|
|
767
|
-
|
|
1152
|
+
return this.http.get(`${this.url}/account-entities/actives`, { params })
|
|
1153
|
+
.pipe(map(({ data }) => data));
|
|
1154
|
+
}
|
|
1155
|
+
/**
|
|
1156
|
+
* Fetches a list of account categories based on the provided query parameters.
|
|
1157
|
+
*
|
|
1158
|
+
* @param {QueryParams} params - The query parameters used to filter the account categories.
|
|
1159
|
+
* @return {Observable<AccountCategoriesOut>} An observable that emits the fetched account categories data.
|
|
1160
|
+
*/
|
|
1161
|
+
getAccountCategories(params) {
|
|
1162
|
+
return this.http.get(`${this.url}/account-categories`, { params, })
|
|
1163
|
+
.pipe(map(({ data }) => data));
|
|
1164
|
+
}
|
|
1165
|
+
/**
|
|
1166
|
+
* Retrieves a list of account types from the server.
|
|
1167
|
+
*
|
|
1168
|
+
* @param {QueryParams} params - The query parameters to filter or customize the request.
|
|
1169
|
+
* @return {Observable<AccountTypesOut>} An observable emitting the account types data.
|
|
1170
|
+
*/
|
|
1171
|
+
getAccountTypes(params) {
|
|
1172
|
+
return this.http.get(`${this.url}/account-types`, { params, })
|
|
1173
|
+
.pipe(map(({ data }) => data));
|
|
1174
|
+
}
|
|
1175
|
+
/**
|
|
1176
|
+
* Retrieves the account type for the given account ID.
|
|
1177
|
+
*
|
|
1178
|
+
* @param {number} id - The unique identifier of the account.
|
|
1179
|
+
* @return {Observable<AccountTypeOut>} An observable that emits the account type data.
|
|
1180
|
+
*/
|
|
1181
|
+
getAccountType(id) {
|
|
1182
|
+
return this.http.get(`${this.url}/account-types/${id}`)
|
|
1183
|
+
.pipe(map(({ data }) => data));
|
|
1184
|
+
}
|
|
1185
|
+
/**
|
|
1186
|
+
* Sends a POST request to create a new account type.
|
|
1187
|
+
*
|
|
1188
|
+
* @param {AccountTypeIn} body - The data for the account type to be created.
|
|
1189
|
+
* @return {Observable<AccountTypeOut>} An observable that emits the created account type object.
|
|
1190
|
+
*/
|
|
1191
|
+
postAccountType(body) {
|
|
1192
|
+
return this.http.post(`${this.url}/account-types`, body)
|
|
1193
|
+
.pipe(map(({ data }) => data));
|
|
1194
|
+
}
|
|
1195
|
+
/**
|
|
1196
|
+
* Updates an account type with the specified ID using the provided data.
|
|
1197
|
+
*
|
|
1198
|
+
* @param {number} id - The unique identifier of the account type to update.
|
|
1199
|
+
* @param {AccountTypeIn} body - The data to update the account type with.
|
|
1200
|
+
* @return {Observable<AccountTypeOut>} An observable containing the updated account type data.
|
|
1201
|
+
*/
|
|
1202
|
+
putAccountType(id, body) {
|
|
1203
|
+
return this.http.put(`${this.url}/account-types/${id}`, body)
|
|
1204
|
+
.pipe(map(({ data }) => data));
|
|
1205
|
+
}
|
|
1206
|
+
/**
|
|
1207
|
+
* Retrieves parameters based on the provided query parameters.
|
|
1208
|
+
*
|
|
1209
|
+
* @param {QueryParams} params - The query parameters used to filter or fetch the desired parameters.
|
|
1210
|
+
* @return {Observable<ParametersOut>} An observable that emits the fetched parameters.
|
|
1211
|
+
*/
|
|
1212
|
+
getParameters(params) {
|
|
1213
|
+
return this.http.get(`${this.url}/parameters`, { params, })
|
|
1214
|
+
.pipe(map(({ data }) => data));
|
|
768
1215
|
}
|
|
769
1216
|
/**
|
|
770
1217
|
* Retrieves the parameter values based on the provided parameter names.
|
|
@@ -773,11 +1220,20 @@ class ApiCompaniesService {
|
|
|
773
1220
|
* @param {string[]} params.paramNames - An array of parameter names for which the values need to be fetched.
|
|
774
1221
|
* @return {Observable<ParametersValuesOut>} An observable that emits the fetched parameter values.
|
|
775
1222
|
*/
|
|
776
|
-
getParametersValues({ paramNames
|
|
1223
|
+
getParametersValues({ paramNames }) {
|
|
777
1224
|
const parameters = paramNames.map((p) => ({ name: p }));
|
|
778
|
-
return this.http.post(`${this.url}/parameters-values`, {
|
|
779
|
-
|
|
780
|
-
|
|
1225
|
+
return this.http.post(`${this.url}/parameters-values`, { parameters })
|
|
1226
|
+
.pipe(map(({ data }) => data));
|
|
1227
|
+
}
|
|
1228
|
+
/**
|
|
1229
|
+
* Retrieves parameter values based on the provided level configuration.
|
|
1230
|
+
*
|
|
1231
|
+
* @param {ParametersByLevelIn} parameters - The input object containing the criteria or level details to retrieve the parameters.
|
|
1232
|
+
* @return {Observable<ParametersValuesOut>} An observable that emits the parameter values fetched from the server.
|
|
1233
|
+
*/
|
|
1234
|
+
getParameterValueByModel(parameters) {
|
|
1235
|
+
return this.http.post(`${this.url}/parameters-values`, { parameters })
|
|
1236
|
+
.pipe(map(({ data }) => data));
|
|
781
1237
|
}
|
|
782
1238
|
/**
|
|
783
1239
|
* Retrieves the value of a specified parameter.
|
|
@@ -797,9 +1253,8 @@ class ApiCompaniesService {
|
|
|
797
1253
|
* @return {Observable<CountryReferencesOut>} An observable containing the country reference data.
|
|
798
1254
|
*/
|
|
799
1255
|
getCountryReferences(params) {
|
|
800
|
-
return this.http.get(`${this.url}/country-references`, {
|
|
801
|
-
|
|
802
|
-
}).pipe(map(({ data }) => data));
|
|
1256
|
+
return this.http.get(`${this.url}/country-references`, { params })
|
|
1257
|
+
.pipe(map(({ data }) => data));
|
|
803
1258
|
}
|
|
804
1259
|
/**
|
|
805
1260
|
* Fetches the country reference data for a given country ID.
|
|
@@ -811,6 +1266,17 @@ class ApiCompaniesService {
|
|
|
811
1266
|
return this.http.get(`${this.url}/country-references/${id}`)
|
|
812
1267
|
.pipe(map(({ data }) => data));
|
|
813
1268
|
}
|
|
1269
|
+
/**
|
|
1270
|
+
* Updates a country reference resource with the specified ID and data.
|
|
1271
|
+
*
|
|
1272
|
+
* @param {number} id - The unique identifier of the country reference to be updated.
|
|
1273
|
+
* @param {CountryReferenceIn} body - The data to update the country reference with.
|
|
1274
|
+
* @return {Observable<CountryReferenceOut>} An observable that emits the updated country reference object.
|
|
1275
|
+
*/
|
|
1276
|
+
putCountryReference(id, body) {
|
|
1277
|
+
return this.http.put(`${this.url}/country-references/${id}`, body)
|
|
1278
|
+
.pipe(map(({ data }) => data));
|
|
1279
|
+
}
|
|
814
1280
|
/**
|
|
815
1281
|
* Fetches the list of workflows based on the provided query parameters.
|
|
816
1282
|
*
|
|
@@ -818,9 +1284,8 @@ class ApiCompaniesService {
|
|
|
818
1284
|
* @return {Observable<WorkflowsOut>} An observable containing the workflow data.
|
|
819
1285
|
*/
|
|
820
1286
|
getWorkflows(params) {
|
|
821
|
-
return this.http.get(`${this.url}/workflows`, {
|
|
822
|
-
|
|
823
|
-
}).pipe(map(({ data }) => data));
|
|
1287
|
+
return this.http.get(`${this.url}/workflows`, { params })
|
|
1288
|
+
.pipe(map(({ data }) => data));
|
|
824
1289
|
}
|
|
825
1290
|
/**
|
|
826
1291
|
* Fetches the list of employee customer
|
|
@@ -829,9 +1294,8 @@ class ApiCompaniesService {
|
|
|
829
1294
|
* @return {Observable<EmployeeCustomersOut>} An observable containing the employee customer data.
|
|
830
1295
|
*/
|
|
831
1296
|
getEmployeesCustomers(params) {
|
|
832
|
-
return this.http.get(`${this.url}/employee-customers`, {
|
|
833
|
-
|
|
834
|
-
}).pipe(map(({ data }) => data));
|
|
1297
|
+
return this.http.get(`${this.url}/employee-customers`, { params })
|
|
1298
|
+
.pipe(map(({ data }) => data));
|
|
835
1299
|
}
|
|
836
1300
|
/**
|
|
837
1301
|
* Sends a POST request to create or update employee customer records and processes the server response.
|
|
@@ -840,7 +1304,8 @@ class ApiCompaniesService {
|
|
|
840
1304
|
* @return {Observable<EmployeeCustomersOut>} An observable that emits the updated employee customer data on successful response.
|
|
841
1305
|
*/
|
|
842
1306
|
postEmployeeCustomers(body) {
|
|
843
|
-
return this.http.post(`${this.url}/employee-customers`, body)
|
|
1307
|
+
return this.http.post(`${this.url}/employee-customers`, body)
|
|
1308
|
+
.pipe(map(({ data }) => data));
|
|
844
1309
|
}
|
|
845
1310
|
/**
|
|
846
1311
|
* Updates the employee-customer association record identified by the given ID with the provided data.
|
|
@@ -850,7 +1315,8 @@ class ApiCompaniesService {
|
|
|
850
1315
|
* @return {Observable<EmployeeCustomersOut>} An observable that emits the updated employee-customer data.
|
|
851
1316
|
*/
|
|
852
1317
|
putEmployeeCustomers(id, body) {
|
|
853
|
-
return this.http.put(`${this.url}/employee-customers/${id}`, body)
|
|
1318
|
+
return this.http.put(`${this.url}/employee-customers/${id}`, body)
|
|
1319
|
+
.pipe(map(({ data }) => data));
|
|
854
1320
|
}
|
|
855
1321
|
/**
|
|
856
1322
|
* Fetches the employee-customer details based on the provided employee customer ID.
|
|
@@ -859,7 +1325,8 @@ class ApiCompaniesService {
|
|
|
859
1325
|
* @return {Observable<EmployeeCustomersOut>} An observable that emits the updated employee-customer data.
|
|
860
1326
|
*/
|
|
861
1327
|
getEmployeeCustomer(id) {
|
|
862
|
-
return this.http.get(`${this.url}/employee-customers/${id}`)
|
|
1328
|
+
return this.http.get(`${this.url}/employee-customers/${id}`)
|
|
1329
|
+
.pipe(map(({ data }) => data));
|
|
863
1330
|
}
|
|
864
1331
|
/**
|
|
865
1332
|
* Enables or disables an employee customer's active state.
|
|
@@ -869,7 +1336,7 @@ class ApiCompaniesService {
|
|
|
869
1336
|
* If null or undefined, the active state will be toggled.
|
|
870
1337
|
* @return {Observable<EmployeeCustomersOut>} An observable containing the updated employee customer output.
|
|
871
1338
|
*/
|
|
872
|
-
|
|
1339
|
+
patchEmployeeCustomers(employee, isActive) {
|
|
873
1340
|
return this.http.patch(`${this.url}/employee-customers/${employee.id}`, {
|
|
874
1341
|
is_active: isActive ?? !employee.is_active
|
|
875
1342
|
}).pipe(map(({ data }) => data));
|
|
@@ -878,14 +1345,15 @@ class ApiCompaniesService {
|
|
|
878
1345
|
* Submits a file containing employee customer data for a specific country to the server.
|
|
879
1346
|
*
|
|
880
1347
|
* @param {number} countryId - The identifier of the country for which the data is being uploaded.
|
|
881
|
-
* @param {File} file - The file
|
|
1348
|
+
* @param {File} file - The file contains employee customer data to be uploaded.
|
|
882
1349
|
* @return {Observable<BoardingProcessIdIn>} Observable that emits the processed boarding process ID on success.
|
|
883
1350
|
*/
|
|
884
1351
|
postEmployeeCustomersLoad(countryId, file) {
|
|
885
|
-
const
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
return this.http.post(`${this.url}/employee-customers/load`,
|
|
1352
|
+
const body = new FormData();
|
|
1353
|
+
body.append('file', file);
|
|
1354
|
+
body.append('country_id', countryId.toString());
|
|
1355
|
+
return this.http.post(`${this.url}/employee-customers/load`, body)
|
|
1356
|
+
.pipe(map(({ data }) => data));
|
|
889
1357
|
}
|
|
890
1358
|
/**
|
|
891
1359
|
* Downloads a file containing customer data for a specific employee based on the provided country ID.
|
|
@@ -906,7 +1374,232 @@ class ApiCompaniesService {
|
|
|
906
1374
|
* @return {Observable<BoardingProcessIn>} An observable containing the boarding process details.
|
|
907
1375
|
*/
|
|
908
1376
|
getBoardingProcess(id) {
|
|
909
|
-
return this.http.get(`${this.url}/boarding-process/${id}`)
|
|
1377
|
+
return this.http.get(`${this.url}/boarding-process/${id}`)
|
|
1378
|
+
.pipe(map(({ data }) => data));
|
|
1379
|
+
}
|
|
1380
|
+
/**
|
|
1381
|
+
* Fetches a list of systems based on the provided query parameters.
|
|
1382
|
+
*
|
|
1383
|
+
* @param {QueryParams} params - The parameters used to filter the systems.
|
|
1384
|
+
* @return {Observable<SystemsOut>} An observable that emits the retrieved systems data.
|
|
1385
|
+
*/
|
|
1386
|
+
getSystems(params) {
|
|
1387
|
+
return this.http.get(`${this.url}/systems`, { params })
|
|
1388
|
+
.pipe(map(({ data }) => data));
|
|
1389
|
+
}
|
|
1390
|
+
/**
|
|
1391
|
+
* Retrieves the system by the specified ID.
|
|
1392
|
+
*
|
|
1393
|
+
* @param {number} id - The unique identifier of the system to be retrieved.
|
|
1394
|
+
* @return {Observable<SystemOut>} An observable that emits the requested system information.
|
|
1395
|
+
*/
|
|
1396
|
+
getSystem(id) {
|
|
1397
|
+
return this.http.get(`${this.url}/systems/${id}`)
|
|
1398
|
+
.pipe(map(({ data }) => data));
|
|
1399
|
+
}
|
|
1400
|
+
/**
|
|
1401
|
+
* Sends a POST request to create or update a system.
|
|
1402
|
+
*
|
|
1403
|
+
* @param {SystemIn} body - The data representing the system to be created or updated.
|
|
1404
|
+
* @return {Observable<SystemOut>} An observable emitting the resulting system output after the API request succeeds.
|
|
1405
|
+
*/
|
|
1406
|
+
postSystem(body) {
|
|
1407
|
+
return this.http.post(`${this.url}/systems`, body)
|
|
1408
|
+
.pipe(map(({ data }) => data));
|
|
1409
|
+
}
|
|
1410
|
+
/**
|
|
1411
|
+
* Updates the system identified by the given ID with the provided request body and returns the updated system details.
|
|
1412
|
+
*
|
|
1413
|
+
* @param {number} id - The unique identifier of the system to be updated.
|
|
1414
|
+
* @param {SystemIn} body - The payload containing the updated system details.
|
|
1415
|
+
* @return {Observable<SystemOut>} An observable emitting the updated system data.
|
|
1416
|
+
*/
|
|
1417
|
+
putSystem(id, body) {
|
|
1418
|
+
return this.http.post(`${this.url}/systems/${id}`, body)
|
|
1419
|
+
.pipe(map(({ data }) => data));
|
|
1420
|
+
}
|
|
1421
|
+
/**
|
|
1422
|
+
* Retrieves a list of system entities based on the specified query parameters.
|
|
1423
|
+
*
|
|
1424
|
+
* @param {QueryParams} params - The query parameters used to filter or specify the system entities to retrieve.
|
|
1425
|
+
* @return {Observable<SystemEntitiesOut>} An Observable that emits the retrieved system entities.
|
|
1426
|
+
*/
|
|
1427
|
+
getSystemEntities(params) {
|
|
1428
|
+
return this.http.get(`${this.url}/system-entities`, { params })
|
|
1429
|
+
.pipe(map(({ data }) => data));
|
|
1430
|
+
}
|
|
1431
|
+
/**
|
|
1432
|
+
* Updates the system entities by sending the provided data to the server.
|
|
1433
|
+
*
|
|
1434
|
+
* @param {SystemEntitiesIn} body - The data object representing the system entities to be updated.
|
|
1435
|
+
* @return {Observable<SystemEntitiesOut>} An observable containing the updated system entities data.
|
|
1436
|
+
*/
|
|
1437
|
+
putSystemEntities(body) {
|
|
1438
|
+
return this.http.put(`${this.url}/system-entities`, body)
|
|
1439
|
+
.pipe(map(({ data }) => data));
|
|
1440
|
+
}
|
|
1441
|
+
/**
|
|
1442
|
+
* Retrieves workflow configurations based on the provided query parameters.
|
|
1443
|
+
*
|
|
1444
|
+
* @param {QueryParams} params - The query parameters to filter the workflow configurations.
|
|
1445
|
+
* @return {Observable<WorkflowConfigsOut>} An observable emitting the workflow configurations.
|
|
1446
|
+
*/
|
|
1447
|
+
getWorkflowConfigs(params) {
|
|
1448
|
+
return this.http.get(`${this.url}/workflow-configs`, { params })
|
|
1449
|
+
.pipe(map(({ data }) => data));
|
|
1450
|
+
}
|
|
1451
|
+
/**
|
|
1452
|
+
* Sends a batch of workflow configuration data to the server for processing.
|
|
1453
|
+
*
|
|
1454
|
+
* @param {WorkflowConfigsBatchIn} body - The input data containing a batch of workflow configurations to be sent.
|
|
1455
|
+
* @return {Observable<WorkflowConfigsOut>} An observable that emits the processed batch of workflow configuration data as a response.
|
|
1456
|
+
*/
|
|
1457
|
+
postWorkflowConfigsBatch(body) {
|
|
1458
|
+
return this.http.post(`${this.url}/workflow-configs/batch`, body)
|
|
1459
|
+
.pipe(map(({ data }) => data));
|
|
1460
|
+
}
|
|
1461
|
+
/**
|
|
1462
|
+
* Sends a POST request to create a new company and returns the created company's details.
|
|
1463
|
+
*
|
|
1464
|
+
* @param {CompanyIn} body - The payload containing the details of the company to be created.
|
|
1465
|
+
* @return {Observable<CompanyOut>} An Observable emitting the response with the created company's details.
|
|
1466
|
+
*/
|
|
1467
|
+
postCompany(body) {
|
|
1468
|
+
return this.http.post(`${this.url}/companies`, body)
|
|
1469
|
+
.pipe(map(({ data }) => data));
|
|
1470
|
+
}
|
|
1471
|
+
/**
|
|
1472
|
+
* Updates the details of an existing company using its ID.
|
|
1473
|
+
*
|
|
1474
|
+
* @param {number} id - The unique identifier of the company to update.
|
|
1475
|
+
* @param {CompanyIn} body - The object containing the updated company data.
|
|
1476
|
+
* @return {Observable<CompanyOut>} An observable that emits the updated company details.
|
|
1477
|
+
*/
|
|
1478
|
+
putCompany(id, body) {
|
|
1479
|
+
return this.http.put(`${this.url}/companies/${id}`, body)
|
|
1480
|
+
.pipe(map(({ data }) => data));
|
|
1481
|
+
}
|
|
1482
|
+
/**
|
|
1483
|
+
* Deletes a company by its unique identifier.
|
|
1484
|
+
*
|
|
1485
|
+
* @param {number} id - The unique identifier of the company to be deleted.
|
|
1486
|
+
* @return {Observable<{}>} An observable that emits an empty object upon successful deletion or an error if the operation fails.
|
|
1487
|
+
*/
|
|
1488
|
+
deleteCompany(id) {
|
|
1489
|
+
return this.http.delete(`${this.url}/companies/${id}`)
|
|
1490
|
+
.pipe(map(({ data }) => data));
|
|
1491
|
+
}
|
|
1492
|
+
/**
|
|
1493
|
+
* Fetches product entities from the server based on the provided query parameters.
|
|
1494
|
+
*
|
|
1495
|
+
* @param {QueryParams} params The query parameters used to modify the request for product entities.
|
|
1496
|
+
* @return {Observable<ProductEntitiesOut>} An observable that emits the product entities retrieved from the server.
|
|
1497
|
+
*/
|
|
1498
|
+
getProductEntities(params) {
|
|
1499
|
+
return this.http.get(`${this.url}/product-entities`, { params })
|
|
1500
|
+
.pipe(map(({ data }) => data));
|
|
1501
|
+
}
|
|
1502
|
+
/**
|
|
1503
|
+
* Sends a PUT request to update product entities and returns the updated entity.
|
|
1504
|
+
*
|
|
1505
|
+
* @param {ProductEntitiesIn} body - The payload containing the data to update the product entity.
|
|
1506
|
+
* @return {Observable<ProductEntitiesOut>} Observable that emits the updated product entity.
|
|
1507
|
+
*/
|
|
1508
|
+
putProductEntities(body) {
|
|
1509
|
+
return this.http.put(`${this.url}/product-entities`, body)
|
|
1510
|
+
.pipe(map(({ data }) => data));
|
|
1511
|
+
}
|
|
1512
|
+
/**
|
|
1513
|
+
* Retrieves the country reference products based on the given query parameters.
|
|
1514
|
+
*
|
|
1515
|
+
* @param {QueryParams} params The query parameters used to filter and retrieve the country reference products.
|
|
1516
|
+
* @return {Observable<CountryReferenceProductsOut>} An observable emitting the fetched country reference products data.
|
|
1517
|
+
*/
|
|
1518
|
+
getCountryReferenceProducts(params) {
|
|
1519
|
+
return this.http.get(`${this.url}/country-reference-products`, { params })
|
|
1520
|
+
.pipe(map(({ data }) => data));
|
|
1521
|
+
}
|
|
1522
|
+
/**
|
|
1523
|
+
* Sends a request to update or create country reference products.
|
|
1524
|
+
*
|
|
1525
|
+
* @param {CountryReferenceProductIn} body - The payload containing the details of the country reference products to post.
|
|
1526
|
+
* @return {Observable<CountryReferenceProductOut>} An observable that emits the updated or created country reference product data.
|
|
1527
|
+
*/
|
|
1528
|
+
postCountryReferenceProducts(body) {
|
|
1529
|
+
return this.http.put(`${this.url}/country-reference-products`, body)
|
|
1530
|
+
.pipe(map(({ data }) => data));
|
|
1531
|
+
}
|
|
1532
|
+
/**
|
|
1533
|
+
* Updates a country reference product with the specified ID using the provided data.
|
|
1534
|
+
*
|
|
1535
|
+
* @param {number} id - The unique identifier of the country reference product to update.
|
|
1536
|
+
* @param {CountryReferenceProductIn} body - The updated country reference product data to be sent in the request body.
|
|
1537
|
+
* @return {Observable<CountryReferenceProductOut>} An observable emitting the updated country reference product.
|
|
1538
|
+
*/
|
|
1539
|
+
putCountryReferenceProducts(id, body) {
|
|
1540
|
+
return this.http.put(`${this.url}/country-reference-products/${id}`, body)
|
|
1541
|
+
.pipe(map(({ data }) => data));
|
|
1542
|
+
}
|
|
1543
|
+
/**
|
|
1544
|
+
* Fetches the extra charge entities from the server based on the provided query parameters.
|
|
1545
|
+
*
|
|
1546
|
+
* @param {QueryParams} params - An object containing the query parameters to filter the extra charge entities.
|
|
1547
|
+
* @return {Observable<ExtraChargeEntitiesOut>} An observable that emits the extra charge entities retrieved from the server.
|
|
1548
|
+
*/
|
|
1549
|
+
getExtraChargeEntities(params) {
|
|
1550
|
+
return this.http.get(`${this.url}/extracharge-entities`, { params })
|
|
1551
|
+
.pipe(map(({ data }) => data));
|
|
1552
|
+
}
|
|
1553
|
+
/**
|
|
1554
|
+
* Updates extra charge entities by sending the provided data to the server.
|
|
1555
|
+
*
|
|
1556
|
+
* @param {ExtraChargeEntitiesIn} body - The data to update the extra charge entities.
|
|
1557
|
+
* @return {Observable<ExtraChargeEntitiesOut>} An observable that emits the updated extra charge entities.
|
|
1558
|
+
*/
|
|
1559
|
+
putExtraChargeEntities(body) {
|
|
1560
|
+
return this.http.put(`${this.url}/extracharge-entities`, body)
|
|
1561
|
+
.pipe(map(({ data }) => data));
|
|
1562
|
+
}
|
|
1563
|
+
/**
|
|
1564
|
+
* Retrieves the parameter configurations based on the provided query parameters.
|
|
1565
|
+
*
|
|
1566
|
+
* @param {QueryParams} params - The query parameters to filter the parameter configurations.
|
|
1567
|
+
* @return {Observable<ParameterConfigsOut>} An observable that emits the parameter configurations data.
|
|
1568
|
+
*/
|
|
1569
|
+
getParameterConfigs(params) {
|
|
1570
|
+
return this.http.get(`${this.url}/parameter-configs`, { params })
|
|
1571
|
+
.pipe(map(({ data }) => data));
|
|
1572
|
+
}
|
|
1573
|
+
/**
|
|
1574
|
+
* Submits a configuration for parameters to the server.
|
|
1575
|
+
*
|
|
1576
|
+
* @param {ParameterConfigIn} body - The input configuration object containing the parameters to be submitted.
|
|
1577
|
+
* @return {Observable<ParameterConfigOut>} An observable emitting the server's response containing the updated parameter configuration.
|
|
1578
|
+
*/
|
|
1579
|
+
postParameterConfig(body) {
|
|
1580
|
+
return this.http.delete(`${this.url}/parameter-configs`)
|
|
1581
|
+
.pipe(map(({ data }) => data));
|
|
1582
|
+
}
|
|
1583
|
+
/**
|
|
1584
|
+
* Updates the configuration of a parameter with the provided ID and input data.
|
|
1585
|
+
*
|
|
1586
|
+
* @param {number} id - The unique identifier of the parameter configuration to be updated.
|
|
1587
|
+
* @param {ParameterConfigIn} body - The input data containing the updated configuration for the parameter.
|
|
1588
|
+
* @return {Observable<ParameterConfigOut>} An observable that emits the updated parameter configuration.
|
|
1589
|
+
*/
|
|
1590
|
+
putParameterConfig(id, body) {
|
|
1591
|
+
return this.http.delete(`${this.url}/parameter-configs/${id}`)
|
|
1592
|
+
.pipe(map(({ data }) => data));
|
|
1593
|
+
}
|
|
1594
|
+
/**
|
|
1595
|
+
* Deletes a parameter configuration specified by its ID.
|
|
1596
|
+
*
|
|
1597
|
+
* @param {number} id - The unique identifier of the parameter configuration to be deleted.
|
|
1598
|
+
* @return {Observable<ParameterConfigOut>} An observable containing the deleted parameter configuration data.
|
|
1599
|
+
*/
|
|
1600
|
+
deleteParameterConfig(id) {
|
|
1601
|
+
return this.http.delete(`${this.url}/parameter-configs/${id}`)
|
|
1602
|
+
.pipe(map(({ data }) => data));
|
|
910
1603
|
}
|
|
911
1604
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ApiCompaniesService, deps: [{ token: 'env' }, { token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
912
1605
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ApiCompaniesService, providedIn: 'root' });
|
|
@@ -2401,5 +3094,5 @@ const xmlHeaders = (format = 'object') => {
|
|
|
2401
3094
|
* Generated bundle index. Do not edit.
|
|
2402
3095
|
*/
|
|
2403
3096
|
|
|
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 };
|
|
3097
|
+
export { AlphaNumeric, ApiBillingDOService, ApiBillingMxService, ApiBillingPaService, 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 };
|
|
2405
3098
|
//# sourceMappingURL=experteam-mx-ngx-services.mjs.map
|