@dative-gpi/foundation-shared-services 0.0.56 → 0.0.57
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.
|
@@ -6,10 +6,10 @@ import { USER_CURRENT_URL } from "../../config/urls";
|
|
|
6
6
|
|
|
7
7
|
const UserServiceFactory = new ServiceFactory<UserDetailsDTO, UserDetails>("user", UserDetails).create(factory => factory.build(
|
|
8
8
|
ServiceFactory.addCustom("getCurrent", (axios) => axios.get(USER_CURRENT_URL()), (dto: UserDetailsDTO) => new UserDetails(dto)),
|
|
9
|
-
factory.addNotify(
|
|
9
|
+
factory.addNotify(notifyService => ({
|
|
10
10
|
...ServiceFactory.addCustom("updateCurrent", (axios, payload: UpdateUserDTO) => axios.post(USER_CURRENT_URL(), payload), (dto: UserDetailsDTO) => {
|
|
11
11
|
const result = new UserDetails(dto);
|
|
12
|
-
|
|
12
|
+
notifyService.notify("update", result);
|
|
13
13
|
return result;
|
|
14
14
|
})
|
|
15
15
|
}))
|
package/config/urls/index.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dative-gpi/foundation-shared-services",
|
|
3
3
|
"sideEffects": false,
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.57",
|
|
5
5
|
"description": "",
|
|
6
6
|
"publishConfig": {
|
|
7
7
|
"access": "public"
|
|
@@ -11,10 +11,10 @@
|
|
|
11
11
|
"license": "ISC",
|
|
12
12
|
"dependencies": {
|
|
13
13
|
"@dative-gpi/bones-ui": "^0.0.73",
|
|
14
|
-
"@dative-gpi/foundation-shared-domain": "0.0.
|
|
14
|
+
"@dative-gpi/foundation-shared-domain": "0.0.57",
|
|
15
15
|
"@microsoft/signalr": "^8.0.0",
|
|
16
16
|
"vue": "^3.2.0",
|
|
17
17
|
"vue-router": "^4.2.5"
|
|
18
18
|
},
|
|
19
|
-
"gitHead": "
|
|
19
|
+
"gitHead": "98fa5fc3463c71d1cf0e34d7ece8e874f7343e44"
|
|
20
20
|
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { ApplicationDetails, ApplicationDetailsDTO } from "@dative-gpi/foundation-shared-domain/models";
|
|
2
|
-
import { ComposableFactory, ServiceFactory } from "@dative-gpi/bones-ui";
|
|
3
|
-
|
|
4
|
-
import { APPLICATION_CURRENT_URL } from "../../config/urls";
|
|
5
|
-
|
|
6
|
-
const ApplicationServiceFactory = {
|
|
7
|
-
...ServiceFactory.addCustom("getCurrent", (axios) => axios.get(APPLICATION_CURRENT_URL()), (dto: ApplicationDetailsDTO) => new ApplicationDetails(dto))
|
|
8
|
-
};
|
|
9
|
-
|
|
10
|
-
export const useCurrentApplication = ComposableFactory.custom(ApplicationServiceFactory.getCurrent);
|