@experteam-mx/ngx-services 20.1.17-alpha.2 → 20.1.17-dev1.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.
@@ -1563,8 +1563,35 @@ class ApiCompaniesService {
1563
1563
  return this.http.put(`${this.url}/accounts/${id}`, body)
1564
1564
  .pipe(map(({ data }) => data));
1565
1565
  }
1566
- patchAccount(id, body) {
1567
- return this.http.patch(`${this.url}/accounts/${id}`, body);
1566
+ /**
1567
+ * Updates the status of an account.
1568
+ *
1569
+ * This method sends an HTTP PATCH request to the accounts endpoint
1570
+ * in order to activate or deactivate a specific account.
1571
+ *
1572
+ * @param id Unique identifier of the account.
1573
+ * @param isActive Status to assign to the account.
1574
+ * - `true`: activates the account.
1575
+ * - `false`: deactivates the account.
1576
+ */
1577
+ patchAccount(id, isActive) {
1578
+ return this.http.patch(`${this.url}/accounts/${id}`, {
1579
+ is_active: isActive
1580
+ })
1581
+ .pipe(map(({ data }) => data));
1582
+ }
1583
+ /**
1584
+ * Retrieves the list of active accounts.
1585
+ *
1586
+ * This method sends an HTTP GET request to the active accounts endpoint,
1587
+ * allowing query parameters for filtering or pagination.
1588
+ *
1589
+ * @param params Query parameters used to filter
1590
+ * or paginate the results.
1591
+ */
1592
+ getAccountsActives(params) {
1593
+ return this.http.get(`${this.url}/accounts/actives`, { params })
1594
+ .pipe(map(({ data }) => data));
1568
1595
  }
1569
1596
  /**
1570
1597
  * Fetches account entity data from the server based on the provided query parameters.