@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.
- package/dist/@types/base/configs/endpoints.config/dm/config/user.d.ts +4 -0
- package/dist/@types/base/configs/endpoints.config/dm/config/user.d.ts.map +1 -1
- package/dist/@types/base/configs/endpoints.config/dm/dm.d.ts +4 -0
- package/dist/@types/base/configs/endpoints.config/dm/dm.d.ts.map +1 -1
- package/dist/@types/base/configs/endpoints.config/endpoints.navigation.d.ts +4 -0
- package/dist/@types/base/configs/endpoints.config/endpoints.navigation.d.ts.map +1 -1
- package/dist/@types/base/services/modules/dm/user/UserService.d.ts +1 -0
- package/dist/@types/base/services/modules/dm/user/UserService.d.ts.map +1 -1
- package/dist/base/configs/endpoints.config/dm/config/user.js +7 -3
- package/dist/base/configs/endpoints.config/dm/config/user.js.map +1 -1
- package/dist/base/index.js +357 -356
- package/dist/base/services/index.js +353 -352
- package/dist/base/services/modules/dm/index.js +17 -16
- package/dist/base/services/modules/dm/user/UserService.js +22 -14
- package/dist/base/services/modules/dm/user/UserService.js.map +1 -1
- package/dist/base/services/modules/index.js +353 -352
- package/lib/base/configs/endpoints.config/dm/config/user.ts +6 -2
- package/lib/base/services/modules/dm/user/UserService.tsx +9 -0
- package/package.json +1 -1
|
@@ -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