@dative-gpi/foundation-shared-services 0.0.149 → 0.0.150
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.
|
@@ -1,11 +1,15 @@
|
|
|
1
|
-
import { AuthTokenDetails, AuthTokenDetailsDTO, CreateAuthTokenDTO } from "@dative-gpi/foundation-shared-domain/models";
|
|
1
|
+
import { AuthTokenDetails, AuthTokenDetailsDTO, AuthTokenFilters, AuthTokenInfos, AuthTokenInfosDTO, CreateAuthTokenDTO } from "@dative-gpi/foundation-shared-domain/models";
|
|
2
2
|
import { ComposableFactory, ServiceFactory } from "@dative-gpi/bones-ui/core";
|
|
3
3
|
|
|
4
|
-
import { AUTH_TOKENS_URL } from "../../config/urls";
|
|
4
|
+
import { AUTH_TOKENS_URL, AUTH_TOKEN_URL } from "../../config/urls";
|
|
5
5
|
|
|
6
6
|
const AuthTokenServiceFactory = new ServiceFactory<AuthTokenDetailsDTO, AuthTokenDetails>("authToken", AuthTokenDetails).create(factory => factory.build(
|
|
7
|
+
factory.addGetMany<AuthTokenInfosDTO, AuthTokenInfos, AuthTokenFilters>(AUTH_TOKENS_URL, AuthTokenInfos),
|
|
7
8
|
factory.addCreate<CreateAuthTokenDTO>(AUTH_TOKENS_URL),
|
|
9
|
+
factory.addRemove(AUTH_TOKEN_URL),
|
|
8
10
|
factory.addNotify()
|
|
9
11
|
));
|
|
10
12
|
|
|
11
|
-
export const
|
|
13
|
+
export const useAuthTokens = ComposableFactory.getMany(AuthTokenServiceFactory);
|
|
14
|
+
export const useCreateAuthToken = ComposableFactory.create(AuthTokenServiceFactory);
|
|
15
|
+
export const useRemoveAuthToken = ComposableFactory.remove(AuthTokenServiceFactory);
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import { GATEWAY_URL } from "./base";
|
|
2
2
|
|
|
3
|
-
export const AUTH_TOKENS_URL = () => `${GATEWAY_URL()}/
|
|
3
|
+
export const AUTH_TOKENS_URL = () => `${GATEWAY_URL()}/pats`;
|
|
4
|
+
export const AUTH_TOKEN_URL = (tokenId: string) => `${AUTH_TOKENS_URL()}/${encodeURIComponent(tokenId)}`;
|
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.150",
|
|
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.74",
|
|
14
|
-
"@dative-gpi/foundation-shared-domain": "0.0.
|
|
14
|
+
"@dative-gpi/foundation-shared-domain": "0.0.150",
|
|
15
15
|
"@microsoft/signalr": "^8.0.0",
|
|
16
16
|
"vue": "^3.4.23",
|
|
17
17
|
"vue-router": "^4.2.5"
|
|
18
18
|
},
|
|
19
|
-
"gitHead": "
|
|
19
|
+
"gitHead": "72eab513b6316bf5c8f573c7faff46ace455090d"
|
|
20
20
|
}
|