@dative-gpi/foundation-core-services 0.0.165 → 0.0.166
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/composables/services/index.ts +2 -2
- package/composables/services/useServiceAccountOrganisationAuthTokens.ts +19 -0
- package/composables/services/useServiceAccountOrganisations.ts +13 -0
- package/config/urls/index.ts +2 -2
- package/config/urls/serviceAccountOrganisationAuthTokens.ts +5 -0
- package/config/urls/serviceAccountOrganisations.ts +4 -0
- package/package.json +3 -3
- package/composables/services/useServiceAccountAuthTokens.ts +0 -19
- package/composables/services/useServiceAccounts.ts +0 -13
- package/config/urls/serviceAccountAuthTokens.ts +0 -5
- package/config/urls/serviceAccounts.ts +0 -4
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
export * from "./useActions";
|
|
2
2
|
export * from "./useAlerts";
|
|
3
3
|
export * from "./useArticles";
|
|
4
|
-
export * from "./useServiceAccountAuthTokens";
|
|
5
4
|
export * from "./useChartCategories";
|
|
6
5
|
export * from "./useChartOrganisationTypes";
|
|
7
6
|
export * from "./useChartOrganisations";
|
|
@@ -31,7 +30,8 @@ export * from "./useRoleOrganisations";
|
|
|
31
30
|
export * from "./useRoleOrganisationTypes";
|
|
32
31
|
export * from "./useScenarioOrganisations";
|
|
33
32
|
export * from "./useScenarioOrganisationTypes";
|
|
34
|
-
export * from "./
|
|
33
|
+
export * from "./useServiceAccountOrganisationAuthTokens";
|
|
34
|
+
export * from "./useServiceAccountOrganisations";
|
|
35
35
|
export * from "./useUserOrganisations";
|
|
36
36
|
export * from "./useUserOrganisationTables";
|
|
37
37
|
export * from "./useWidgetTemplates";
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ServiceAccountOrganisationAuthTokenDetails, ServiceAccountOrganisationAuthTokenDetailsDTO, ServiceAccountOrganisationAuthTokenFilters, CreateServiceAccountOrganisationAuthTokenDTO } from "@dative-gpi/foundation-core-domain/models";
|
|
2
|
+
import { ComposableFactory, ServiceFactory } from "@dative-gpi/bones-ui/core";
|
|
3
|
+
|
|
4
|
+
import { SERVICE_ACCOUNT_ORGANISATION_AUTH_TOKENS_URL, SERVICE_ACCOUNT_ORGANISATION_AUTH_TOKEN_URL } from "../../config/urls";
|
|
5
|
+
|
|
6
|
+
const ServiceAccountOrganisationAuthTokenServiceFactory = new ServiceFactory<ServiceAccountOrganisationAuthTokenDetailsDTO, ServiceAccountOrganisationAuthTokenDetails>("serviceAccountOrganisationAuthToken", ServiceAccountOrganisationAuthTokenDetails).create(factory => factory.build(
|
|
7
|
+
ServiceFactory.addCustom("getMany", (axios, serviceAccountOrganisationId: string, filters: ServiceAccountOrganisationAuthTokenFilters) => axios.get(SERVICE_ACCOUNT_ORGANISATION_AUTH_TOKENS_URL(serviceAccountOrganisationId), filters), (dtos: ServiceAccountOrganisationAuthTokenDetailsDTO[]) => dtos.map((dto: ServiceAccountOrganisationAuthTokenDetailsDTO) => new ServiceAccountOrganisationAuthTokenDetails(dto))),
|
|
8
|
+
factory.addNotify(notifyService => ({
|
|
9
|
+
...ServiceFactory.addCustom("create", (axios, serviceAccountOrganisationId: string, data: CreateServiceAccountOrganisationAuthTokenDTO) => axios.post(SERVICE_ACCOUNT_ORGANISATION_AUTH_TOKENS_URL(serviceAccountOrganisationId), data), (dto: ServiceAccountOrganisationAuthTokenDetailsDTO) => {
|
|
10
|
+
const result = new ServiceAccountOrganisationAuthTokenDetails(dto);
|
|
11
|
+
notifyService.notify("add", result);
|
|
12
|
+
}),
|
|
13
|
+
...ServiceFactory.addCustom("remove", (axios, serviceAccountOrganisationId: string, authTokenId: string) => axios.delete(SERVICE_ACCOUNT_ORGANISATION_AUTH_TOKEN_URL(serviceAccountOrganisationId, authTokenId)), () => {})
|
|
14
|
+
}))
|
|
15
|
+
));
|
|
16
|
+
|
|
17
|
+
export const useServiceAccountOrganisationAuthTokens = ComposableFactory.custom(ServiceAccountOrganisationAuthTokenServiceFactory.getMany);
|
|
18
|
+
export const useCreateServiceAccountOrganisationAuthToken = ComposableFactory.custom(ServiceAccountOrganisationAuthTokenServiceFactory.create);
|
|
19
|
+
export const useRemoveServiceAccountOrganisationAuthToken = ComposableFactory.custom(ServiceAccountOrganisationAuthTokenServiceFactory.remove);
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ComposableFactory, ServiceFactory } from "@dative-gpi/bones-ui/core";
|
|
2
|
+
import { CreateServiceAccountOrganisationDTO, UpdateServiceAccountOrganisationDTO, ServiceAccountOrganisationDetails, ServiceAccountOrganisationDetailsDTO, ServiceAccountOrganisationFilters, ServiceAccountOrganisationInfos, ServiceAccountOrganisationInfosDTO } from "@dative-gpi/foundation-core-domain/models";
|
|
3
|
+
|
|
4
|
+
import { SERVICE_ACCOUNT_ORGANISATIONS_URL, SERVICE_ACCOUNT_ORGANISATION_URL } from "../../config/urls";
|
|
5
|
+
|
|
6
|
+
const ServiceAccountOrganisationServiceFactory = new ServiceFactory<ServiceAccountOrganisationDetailsDTO, ServiceAccountOrganisationDetails>("serviceAccountOrganisation", ServiceAccountOrganisationDetails)
|
|
7
|
+
.createComplete<ServiceAccountOrganisationInfos, ServiceAccountOrganisationInfosDTO, CreateServiceAccountOrganisationDTO, UpdateServiceAccountOrganisationDTO, ServiceAccountOrganisationFilters>(SERVICE_ACCOUNT_ORGANISATIONS_URL, SERVICE_ACCOUNT_ORGANISATION_URL, ServiceAccountOrganisationInfos);
|
|
8
|
+
|
|
9
|
+
export const useServiceAccountOrganisation = ComposableFactory.get(ServiceAccountOrganisationServiceFactory);
|
|
10
|
+
export const useServiceAccountOrganisations = ComposableFactory.getMany(ServiceAccountOrganisationServiceFactory);
|
|
11
|
+
export const useCreateServiceAccountOrganisation = ComposableFactory.create(ServiceAccountOrganisationServiceFactory);
|
|
12
|
+
export const useUpdateServiceAccountOrganisation = ComposableFactory.update(ServiceAccountOrganisationServiceFactory);
|
|
13
|
+
export const useRemoveServiceAccountOrganisation = ComposableFactory.remove(ServiceAccountOrganisationServiceFactory);
|
package/config/urls/index.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
export * from "./actions";
|
|
2
2
|
export * from "./alerts";
|
|
3
3
|
export * from "./articles";
|
|
4
|
-
export * from "./serviceAccountAuthTokens";
|
|
5
4
|
export * from "./charts";
|
|
6
5
|
export * from "./chartCategories";
|
|
7
6
|
export * from "./chartOrganisations";
|
|
@@ -31,7 +30,8 @@ export * from "./roleOrganisations";
|
|
|
31
30
|
export * from "./roleOrganisationTypes";
|
|
32
31
|
export * from "./scenarioOrganisations";
|
|
33
32
|
export * from "./scenarioOrganisationTypes";
|
|
34
|
-
export * from "./
|
|
33
|
+
export * from "./serviceAccountOrganisationAuthTokens";
|
|
34
|
+
export * from "./serviceAccountOrganisations";
|
|
35
35
|
export * from "./userOrganisations";
|
|
36
36
|
export * from "./userOrganisationTables";
|
|
37
37
|
export * from "./widgetTemplates";
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { SERVICE_ACCOUNT_ORGANISATION_URL } from "./serviceAccountOrganisations";
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
export const SERVICE_ACCOUNT_ORGANISATION_AUTH_TOKENS_URL = (serviceAccountOrganisationId: string) => `${SERVICE_ACCOUNT_ORGANISATION_URL(serviceAccountOrganisationId)}/pats`;
|
|
5
|
+
export const SERVICE_ACCOUNT_ORGANISATION_AUTH_TOKEN_URL = (serviceAccountOrganisationId: string, authTokenId: string) => `${SERVICE_ACCOUNT_ORGANISATION_AUTH_TOKENS_URL(serviceAccountOrganisationId)}/${encodeURIComponent(authTokenId)}`;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { CORE_URL } from "./base";
|
|
2
|
+
|
|
3
|
+
export const SERVICE_ACCOUNT_ORGANISATIONS_URL = () => `${CORE_URL()}/service-accounts`;
|
|
4
|
+
export const SERVICE_ACCOUNT_ORGANISATION_URL = (serviceAccountOrganisationId: string) => `${SERVICE_ACCOUNT_ORGANISATIONS_URL()}/${encodeURIComponent(serviceAccountOrganisationId)}`;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dative-gpi/foundation-core-services",
|
|
3
3
|
"sideEffects": false,
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.166",
|
|
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-core-domain": "0.0.
|
|
14
|
+
"@dative-gpi/foundation-core-domain": "0.0.166",
|
|
15
15
|
"@microsoft/signalr": "8.0.0",
|
|
16
16
|
"vue": "3.4.23",
|
|
17
17
|
"vue-router": "4.3.0"
|
|
18
18
|
},
|
|
19
|
-
"gitHead": "
|
|
19
|
+
"gitHead": "1ba8f680febcc23d230b890ed81dcfd451fd009b"
|
|
20
20
|
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { ServiceAccountAuthTokenDetails, ServiceAccountAuthTokenDetailsDTO, ServiceAccountAuthTokenFilters, ServiceAccountAuthTokenInfos, ServiceAccountAuthTokenInfosDTO, CreateServiceAccountAuthTokenDTO } from "@dative-gpi/foundation-core-domain/models";
|
|
2
|
-
import { ComposableFactory, ServiceFactory } from "@dative-gpi/bones-ui/core";
|
|
3
|
-
|
|
4
|
-
import { SERVICE_ACCOUNT_AUTH_TOKENS_URL, SERVICE_ACCOUNT_AUTH_TOKEN_URL } from "../../config/urls";
|
|
5
|
-
|
|
6
|
-
const ServiceAccountAuthTokenServiceFactory = new ServiceFactory<ServiceAccountAuthTokenDetailsDTO, ServiceAccountAuthTokenDetails>("serviceAccountAuthToken", ServiceAccountAuthTokenDetails).create(factory => factory.build(
|
|
7
|
-
ServiceFactory.addCustom("getMany", (axios, serviceAccountId: string, filters: ServiceAccountAuthTokenFilters) => axios.get(SERVICE_ACCOUNT_AUTH_TOKENS_URL(serviceAccountId), filters), (dtos: ServiceAccountAuthTokenDetailsDTO[]) => dtos.map((dto: ServiceAccountAuthTokenDetailsDTO) => new ServiceAccountAuthTokenDetails(dto))),
|
|
8
|
-
factory.addNotify(notifyService => ({
|
|
9
|
-
...ServiceFactory.addCustom("create", (axios, serviceAccountId: string, data: CreateServiceAccountAuthTokenDTO) => axios.post(SERVICE_ACCOUNT_AUTH_TOKENS_URL(serviceAccountId), data), (dto: ServiceAccountAuthTokenDetailsDTO) => {
|
|
10
|
-
const result = new ServiceAccountAuthTokenDetails(dto);
|
|
11
|
-
notifyService.notify("add", result);
|
|
12
|
-
}),
|
|
13
|
-
...ServiceFactory.addCustom("remove", (axios, serviceAccountId: string, authTokenId: string) => axios.delete(SERVICE_ACCOUNT_AUTH_TOKEN_URL(serviceAccountId, authTokenId)), () => {})
|
|
14
|
-
}))
|
|
15
|
-
));
|
|
16
|
-
|
|
17
|
-
export const useServiceAccountAuthTokens = ComposableFactory.custom(ServiceAccountAuthTokenServiceFactory.getMany);
|
|
18
|
-
export const useCreateServiceAccountAuthToken = ComposableFactory.custom(ServiceAccountAuthTokenServiceFactory.create);
|
|
19
|
-
export const useRemoveServiceAccountAuthToken = ComposableFactory.custom(ServiceAccountAuthTokenServiceFactory.remove);
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { ComposableFactory, ServiceFactory } from "@dative-gpi/bones-ui/core";
|
|
2
|
-
import { CreateServiceAccountDTO, UpdateServiceAccountDTO, ServiceAccountDetails, ServiceAccountDetailsDTO, ServiceAccountFilters, ServiceAccountInfos, ServiceAccountInfosDTO } from "@dative-gpi/foundation-core-domain/models";
|
|
3
|
-
|
|
4
|
-
import { SERVICE_ACCOUNTS_URL, SERVICE_ACCOUNT_URL } from "../../config/urls";
|
|
5
|
-
|
|
6
|
-
const ServiceAccountServiceFactory = new ServiceFactory<ServiceAccountDetailsDTO, ServiceAccountDetails>("serviceAccount", ServiceAccountDetails)
|
|
7
|
-
.createComplete<ServiceAccountInfos, ServiceAccountInfosDTO, CreateServiceAccountDTO, UpdateServiceAccountDTO, ServiceAccountFilters>(SERVICE_ACCOUNTS_URL, SERVICE_ACCOUNT_URL, ServiceAccountInfos);
|
|
8
|
-
|
|
9
|
-
export const useServiceAccount = ComposableFactory.get(ServiceAccountServiceFactory);
|
|
10
|
-
export const useServiceAccounts = ComposableFactory.getMany(ServiceAccountServiceFactory);
|
|
11
|
-
export const useCreateServiceAccount = ComposableFactory.create(ServiceAccountServiceFactory);
|
|
12
|
-
export const useUpdateServiceAccount = ComposableFactory.update(ServiceAccountServiceFactory);
|
|
13
|
-
export const useRemoveServiceAccount = ComposableFactory.remove(ServiceAccountServiceFactory);
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { SERVICE_ACCOUNT_URL } from "./serviceAccounts";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export const SERVICE_ACCOUNT_AUTH_TOKENS_URL = (serviceAccountId: string) => `${SERVICE_ACCOUNT_URL(serviceAccountId)}/pats`;
|
|
5
|
-
export const SERVICE_ACCOUNT_AUTH_TOKEN_URL = (serviceAccountId: string, authTokenId: string) => `${SERVICE_ACCOUNT_AUTH_TOKENS_URL(serviceAccountId)}/${encodeURIComponent(authTokenId)}`;
|