@dative-gpi/foundation-shared-services 1.0.73 → 1.0.75

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,9 +1,11 @@
1
1
  export * from "./useAuthTokens";
2
2
  export * from "./useImages";
3
3
  export * from "./useLanguages";
4
+ export * from "./useLegalInformations";
4
5
  export * from "./useNotifications";
5
6
  export * from "./useOrganisations";
6
7
  export * from "./useTerminals";
7
8
  export * from "./useTimeZones";
8
9
  export * from "./useTranslations";
10
+ export * from "./useUserLegalInformations";
9
11
  export * from "./useUsers";
@@ -0,0 +1,10 @@
1
+ import { LegalInformationDetails, type LegalInformationDetailsDTO } from "@dative-gpi/foundation-shared-domain/models";
2
+ import { ComposableFactory, ServiceFactory } from "@dative-gpi/bones-ui";
3
+
4
+ import { LEGAL_INFORMATION_CURRENT_URL } from "../../config/urls";
5
+
6
+ const LegalInformationServiceFactory = {
7
+ ...ServiceFactory.addCustom("getCurrent", axios => axios.get(LEGAL_INFORMATION_CURRENT_URL()), (dto: LegalInformationDetailsDTO) => new LegalInformationDetails(dto))
8
+ };
9
+
10
+ export const useCurrentLegalInformation = ComposableFactory.custom(LegalInformationServiceFactory.getCurrent);
@@ -0,0 +1,11 @@
1
+ import { type CreateUserLegalInformationDTO, UserLegalInformationDetails, type UserLegalInformationDetailsDTO } from "@dative-gpi/foundation-shared-domain/models";
2
+ import { ComposableFactory, ServiceFactory } from "@dative-gpi/bones-ui/core";
3
+
4
+ import { USER_LEGAL_INFORMATIONS_URL } from "../../config/urls";
5
+
6
+ const UserLegalInformationServiceFactory = new ServiceFactory<UserLegalInformationDetailsDTO, UserLegalInformationDetails>("userLegalInformation", UserLegalInformationDetails).create(factory => factory.build(
7
+ factory.addCreate<CreateUserLegalInformationDTO>(USER_LEGAL_INFORMATIONS_URL),
8
+ factory.addNotify()
9
+ ));
10
+
11
+ export const useCreateUserLegalInformation = ComposableFactory.create(UserLegalInformationServiceFactory);
@@ -2,9 +2,11 @@ export * from "./authTokens";
2
2
  export * from "./files";
3
3
  export * from "./images";
4
4
  export * from "./languages";
5
+ export * from "./legalInformations";
5
6
  export * from "./notifications";
6
7
  export * from "./organisations";
7
8
  export * from "./terminals";
8
9
  export * from "./timeZones";
9
10
  export * from "./translations";
11
+ export * from "./userLegalInformations";
10
12
  export * from "./users";
@@ -0,0 +1,4 @@
1
+ import { GATEWAY_URL } from "./base";
2
+
3
+ export const LEGAL_INFORMATIONS_URL = () => `${GATEWAY_URL()}/legal-informations`;
4
+ export const LEGAL_INFORMATION_CURRENT_URL = () => `${LEGAL_INFORMATIONS_URL()}/current`;
@@ -0,0 +1,3 @@
1
+ import { GATEWAY_URL } from "./base";
2
+
3
+ export const USER_LEGAL_INFORMATIONS_URL = () => `${GATEWAY_URL()}/user-legal-informations`;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@dative-gpi/foundation-shared-services",
3
3
  "sideEffects": false,
4
- "version": "1.0.73",
4
+ "version": "1.0.75",
5
5
  "description": "",
6
6
  "publishConfig": {
7
7
  "access": "public"
@@ -10,7 +10,7 @@
10
10
  "author": "",
11
11
  "license": "ISC",
12
12
  "dependencies": {
13
- "@dative-gpi/foundation-shared-domain": "1.0.73"
13
+ "@dative-gpi/foundation-shared-domain": "1.0.75"
14
14
  },
15
15
  "peerDependencies": {
16
16
  "@dative-gpi/bones-ui": "^1.0.0",
@@ -18,5 +18,5 @@
18
18
  "vue": "^3.4.29",
19
19
  "vue-router": "^4.3.0"
20
20
  },
21
- "gitHead": "b603eafcaf25f621ed41de64599ffabe0e58ced4"
21
+ "gitHead": "ef20cc0c223aabf078f1383104e2651a9f6b290c"
22
22
  }