@doolehealth/service-lib 1.0.0 → 1.0.2

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/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # ServiceLib
2
2
 
3
- This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 17.3.0.
3
+ This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 19.2.9.
4
4
 
5
5
  ## Code scaffolding
6
6
 
@@ -1143,6 +1143,14 @@ class DooleService {
1143
1143
  return res;
1144
1144
  }));
1145
1145
  }
1146
+ getPatientData(params) {
1147
+ let path = 'patient/data';
1148
+ const endpoint = this.api.getEndpoint(path);
1149
+ return this.http.post(endpoint, params).pipe(map((res) => {
1150
+ //////console.log(`[DooleService] postAPIpasswordRecovery(${path}) res: `, res);
1151
+ return res;
1152
+ }));
1153
+ }
1146
1154
  getAPIStaffSlots(params) {
1147
1155
  let path = `staff/${params.id}/availability`;
1148
1156
  let endpoint;
@@ -1735,7 +1743,8 @@ class DooleService {
1735
1743
  let path = `diet/${id}`;
1736
1744
  const endpoint = this.api.getEndpoint(path);
1737
1745
  let httpParams = new HttpParams()
1738
- .set('interactions', 1);
1746
+ .set('interactions', 1)
1747
+ .set('tags', 1);
1739
1748
  return this.http.get(endpoint, httpParams).pipe(map((res) => {
1740
1749
  //////console.log(`[DooleService] getAPIdetailDiets(${path}) res: `, res);
1741
1750
  return res;
@@ -1744,7 +1753,8 @@ class DooleService {
1744
1753
  getAPIdetailRecipe(id) {
1745
1754
  let path = `diet/receipt/${id}`;
1746
1755
  let httpParams = new HttpParams()
1747
- .set('interactions', 1);
1756
+ .set('interactions', 1)
1757
+ .set('tags', 1);
1748
1758
  const endpoint = this.api.getEndpoint(path);
1749
1759
  return this.http.get(endpoint, httpParams).pipe(map((res) => {
1750
1760
  //////console.log(`[DooleService] getAPIdetailRecipe(${path}) res: `, res);
@@ -1806,6 +1816,7 @@ class DooleService {
1806
1816
  let path = `user/new/${id}`;
1807
1817
  const endpoint = this.api.getEndpoint(path);
1808
1818
  let httpParams = new HttpParams()
1819
+ .set('tags', 1)
1809
1820
  .set('interactions', 1);
1810
1821
  return this.http.get(endpoint, httpParams).pipe(map((res) => {
1811
1822
  //////console.log(`[DooleService] getAPIdetailNew(${path}) res: `, res);
@@ -1816,6 +1827,7 @@ class DooleService {
1816
1827
  let path = `advice/${id}`;
1817
1828
  const endpoint = this.api.getEndpoint(path);
1818
1829
  let httpParams = new HttpParams()
1830
+ .set('tags', 1)
1819
1831
  .set('interactions', 1);
1820
1832
  return this.http.get(endpoint, httpParams).pipe(map((res) => {
1821
1833
  return res;
@@ -2426,6 +2438,12 @@ class DooleService {
2426
2438
  return res;
2427
2439
  }));
2428
2440
  }
2441
+ put(endpt, items) {
2442
+ const endpoint = this.api.getEndpoint(endpt);
2443
+ return this.http.put(endpoint, items).pipe(map((res) => {
2444
+ return res;
2445
+ }));
2446
+ }
2429
2447
  setPushNotification(pushNotification) {
2430
2448
  this.pushNotification = pushNotification;
2431
2449
  }
@@ -2435,14 +2453,20 @@ class DooleService {
2435
2453
  getAPIExerciseDetail(id, params) {
2436
2454
  let path = `user/exercise/${id}`;
2437
2455
  let httpParams = new HttpParams();
2438
- httpParams = (params?.programable_play) ? httpParams.append('programable_play', params?.programable_play) : httpParams;
2439
- httpParams = (params?.challenge_id) ? httpParams.append('challenge_id', params?.challenge_id) : httpParams;
2440
- httpParams = (params?.programable_id) ? httpParams.append('programable_id', params?.programable_id) : httpParams;
2441
- // Agregar el parámetro 'interactions'
2456
+ if (params?.programable_play) {
2457
+ httpParams = httpParams.append('programable_play', params.programable_play);
2458
+ }
2459
+ if (params?.challenge_id) {
2460
+ httpParams = httpParams.append('challenge_id', params.challenge_id);
2461
+ }
2462
+ if (params?.programable_id) {
2463
+ httpParams = httpParams.append('programable_id', params.programable_id);
2464
+ }
2465
+ // Agregar correctamente los parámetros
2442
2466
  httpParams = httpParams.set('interactions', '1');
2467
+ httpParams = httpParams.set('tags', '1');
2443
2468
  const endpoint = this.api.getEndpoint(path);
2444
2469
  return this.http.get(endpoint, httpParams).pipe(map((res) => {
2445
- ////console.log(`[DooleService] getAPIExercises(${path}) res: `, res);
2446
2470
  return res;
2447
2471
  }));
2448
2472
  }