@orbe-agro/client-core 5.3.244 → 5.3.245

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.
@@ -2,7 +2,11 @@ const USER_BASE_URL = '/dados-mestres/api/user'
2
2
 
3
3
  const user = {
4
4
  find: { endpoint: `${USER_BASE_URL}/find`, httpMethod: 'post' },
5
- findByIds: { endpoint: `${USER_BASE_URL}/find-by-ids`, httpMethod: 'post' }
5
+ findByIds: { endpoint: `${USER_BASE_URL}/find-by-ids`, httpMethod: 'post' },
6
+ findCentros: (userId: string | number) => ({
7
+ endpoint: `${USER_BASE_URL}/${userId}/centros`,
8
+ httpMethod: 'get' as const,
9
+ }),
6
10
  }
7
11
 
8
- export default user
12
+ export default user
@@ -18,4 +18,13 @@ export async function apiFindByIds(filters?: IFilterParams) {
18
18
  method: USER_ENDPOINT.findByIds.httpMethod,
19
19
  data: filters,
20
20
  })
21
+ }
22
+
23
+ export async function apiFindCentrosByUserId(userId: string | number) {
24
+ const { endpoint, httpMethod } = USER_ENDPOINT.findCentros(userId)
25
+
26
+ return ApiService.fetchDataWithAxios<TQueryResponse<any>>({
27
+ url: endpoint,
28
+ method: httpMethod,
29
+ })
21
30
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@orbe-agro/client-core",
3
- "version": "5.3.244",
3
+ "version": "5.3.245",
4
4
  "description": "Biblioteca principal de componentes e utilidades para os microfrontends do Orbe Agro.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",