@experteam-mx/ngx-services 20.1.11 → 20.1.12

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.
@@ -1890,6 +1890,24 @@ class ApiCompaniesService {
1890
1890
  return this.http.post(`${this.url}/workflow-configs/batch`, body)
1891
1891
  .pipe(map(({ data }) => data));
1892
1892
  }
1893
+ /**
1894
+ * Retrieves a list of companies based on the provided query parameters.
1895
+ * @param params - The query parameters to filter and paginate the companies list
1896
+ * @returns An Observable that emits the companies data
1897
+ */
1898
+ getCompanies(params) {
1899
+ return this.http.get(`${this.url}/companies`, { params })
1900
+ .pipe(map(({ data }) => data));
1901
+ }
1902
+ /**
1903
+ * Retrieves a company by its ID.
1904
+ * @param id - The unique identifier of the company to retrieve.
1905
+ * @returns An Observable that emits the company data.
1906
+ */
1907
+ getCompany(id) {
1908
+ return this.http.get(`${this.url}/companies/${id}`)
1909
+ .pipe(map(({ data }) => data));
1910
+ }
1893
1911
  /**
1894
1912
  * Sends a POST request to create a new company and returns the created company's details.
1895
1913
  *