@dative-gpi/foundation-shared-services 1.0.167-terminalv2 → 1.0.167-tree-view

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.
@@ -4,7 +4,7 @@ export * from "./useLanguages";
4
4
  export * from "./useLegalInformations";
5
5
  export * from "./useNotifications";
6
6
  export * from "./useOrganisations";
7
- export * from "./useTerminalApplications";
7
+ export * from "./useTerminals";
8
8
  export * from "./useTimeZones";
9
9
  export * from "./useTranslations";
10
10
  export * from "./useUserLegalInformations";
@@ -0,0 +1,17 @@
1
+ import { type CreateTerminalDTO, TerminalDetails, type TerminalDetailsDTO, type TerminalFilters, TerminalInfos, type TerminalInfosDTO, type UpdateTerminalDTO } from "@dative-gpi/foundation-shared-domain/models";
2
+ import { ComposableFactory, ServiceFactory } from "@dative-gpi/bones-ui/core";
3
+
4
+ import { TERMINALS_URL, TERMINAL_URL } from "../../config/urls";
5
+
6
+ const TerminalServiceFactory = new ServiceFactory<TerminalDetailsDTO, TerminalDetails>("terminal", TerminalDetails).create(factory => factory.build(
7
+ factory.addGetMany<TerminalInfosDTO, TerminalInfos, TerminalFilters>(TERMINALS_URL, TerminalInfos),
8
+ factory.addCreate<CreateTerminalDTO>(TERMINALS_URL),
9
+ factory.addUpdate<UpdateTerminalDTO>(TERMINAL_URL),
10
+ factory.addRemove(TERMINAL_URL),
11
+ factory.addNotify()
12
+ ));
13
+
14
+ export const useTerminals = ComposableFactory.getMany(TerminalServiceFactory);
15
+ export const useCreateTerminal = ComposableFactory.create(TerminalServiceFactory);
16
+ export const useUpdateTerminal = ComposableFactory.update(TerminalServiceFactory);
17
+ export const useRemoveTerminal = ComposableFactory.remove(TerminalServiceFactory);
@@ -5,7 +5,7 @@ export * from "./languages";
5
5
  export * from "./legalInformations";
6
6
  export * from "./notifications";
7
7
  export * from "./organisations";
8
- export * from "./terminalApplications";
8
+ export * from "./terminals";
9
9
  export * from "./timeZones";
10
10
  export * from "./translations";
11
11
  export * from "./userLegalInformations";
@@ -0,0 +1,4 @@
1
+ import { GATEWAY_URL } from "./base";
2
+
3
+ export const TERMINALS_URL = () => `${GATEWAY_URL()}/terminals`;
4
+ export const TERMINAL_URL = (terminalId: string) => `${TERMINALS_URL()}/${encodeURIComponent(terminalId)}`;
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.167-terminalv2",
4
+ "version": "1.0.167-tree-view",
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.167-terminalv2"
13
+ "@dative-gpi/foundation-shared-domain": "1.0.167-tree-view"
14
14
  },
15
15
  "peerDependencies": {
16
16
  "@dative-gpi/bones-ui": "^1.0.0",
@@ -18,5 +18,5 @@
18
18
  "vue": "^3.4.38",
19
19
  "vue-router": "^4.3.0"
20
20
  },
21
- "gitHead": "fb3d46495efdfd047f02e72d56a426f746e0a987"
21
+ "gitHead": "9cf5322e67afdaed766615c2ec9723c8784e9bfa"
22
22
  }
@@ -1,17 +0,0 @@
1
- import { type CreateApplicationTerminalDTO, TerminalApplicationDetails, type TerminalApplicationDetailsDTO, type TerminalApplicationFilters, TerminalApplicationInfos, type TerminalApplicationInfosDTO, type UpdateTerminalApplicationDTO } from "@dative-gpi/foundation-shared-domain/models";
2
- import { ComposableFactory, ServiceFactory } from "@dative-gpi/bones-ui/core";
3
-
4
- import { TERMINAL_APPLICATIONS_URL, TERMINAL_APPLICATION_URL } from "../../config/urls";
5
-
6
- const TerminalServiceFactory = new ServiceFactory<TerminalApplicationDetailsDTO, TerminalApplicationDetails>("terminalApplication", TerminalApplicationDetails).create(factory => factory.build(
7
- factory.addGetMany<TerminalApplicationInfosDTO, TerminalApplicationInfos, TerminalApplicationFilters>(TERMINAL_APPLICATIONS_URL, TerminalApplicationInfos),
8
- factory.addCreate<CreateApplicationTerminalDTO>(TERMINAL_APPLICATIONS_URL),
9
- factory.addUpdate<UpdateTerminalApplicationDTO>(TERMINAL_APPLICATION_URL),
10
- factory.addRemove(TERMINAL_APPLICATION_URL),
11
- factory.addNotify()
12
- ));
13
-
14
- export const useTerminalApplications = ComposableFactory.getMany(TerminalServiceFactory);
15
- export const useCreateTerminalApplication = ComposableFactory.create(TerminalServiceFactory);
16
- export const useUpdateTerminalApplication = ComposableFactory.update(TerminalServiceFactory);
17
- export const useRemoveTerminalApplication = ComposableFactory.remove(TerminalServiceFactory);
@@ -1,4 +0,0 @@
1
- import { GATEWAY_URL } from "./base";
2
-
3
- export const TERMINAL_APPLICATIONS_URL = () => `${GATEWAY_URL()}/terminal-applications`;
4
- export const TERMINAL_APPLICATION_URL = (terminalApplicationId: string) => `${TERMINAL_APPLICATIONS_URL()}/${encodeURIComponent(terminalApplicationId)}`;