@dative-gpi/foundation-admin-services 0.0.8 → 0.0.9

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.
@@ -0,0 +1 @@
1
+ export * from "./services";
@@ -0,0 +1 @@
1
+ export * from "./useFamilies";
@@ -0,0 +1,13 @@
1
+ import { FamilyDetails, FamilyDetailsDTO, FamilyFilters, FamilyInfos, FamilyInfosDTO } from "@dative-gpi/foundation-admin-domain";
2
+ import { ComposableFactory, ServiceFactory } from "@dative-gpi/bones-ui";
3
+
4
+ import { FAMILIES_URL, FAMILY_URL } from "../../config/urls";
5
+
6
+ const FamilieserviceFactory = new ServiceFactory<FamilyDetailsDTO, FamilyDetails>("family", FamilyDetails).create(factory => factory.build(
7
+ factory.addGet(FAMILY_URL),
8
+ factory.addGetMany<FamilyInfosDTO, FamilyInfos, FamilyFilters>(FAMILIES_URL, FamilyInfos),
9
+ factory.addNotify()
10
+ ));
11
+
12
+ export const useFamily = ComposableFactory.get(FamilieserviceFactory);
13
+ export const useFamilies = ComposableFactory.getMany(FamilieserviceFactory);
@@ -0,0 +1 @@
1
+ export * from "./urls";
@@ -0,0 +1 @@
1
+ export const ADMIN_URL = () => `/api/admin/v1`;
@@ -0,0 +1,4 @@
1
+ import { ADMIN_URL } from "./base";
2
+
3
+ export const FAMILIES_URL = () => `${ADMIN_URL()}/families`;
4
+ export const FAMILY_URL = (familyId: string) => `${FAMILIES_URL()}/${encodeURIComponent(familyId)}`;
@@ -0,0 +1 @@
1
+ export * from "./families";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dative-gpi/foundation-admin-services",
3
- "version": "0.0.8",
3
+ "version": "0.0.9",
4
4
  "description": "",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -9,11 +9,11 @@
9
9
  "author": "",
10
10
  "license": "ISC",
11
11
  "dependencies": {
12
- "@dative-gpi/bones-ui": "^0.0.50",
13
- "@dative-gpi/foundation-admin-domain": "0.0.8",
12
+ "@dative-gpi/bones-ui": "^0.0.58",
13
+ "@dative-gpi/foundation-admin-domain": "0.0.9",
14
14
  "@microsoft/signalr": "^8.0.0",
15
15
  "vue": "^3.2.0",
16
16
  "vue-router": "^4.2.5"
17
17
  },
18
- "gitHead": "b3393ad0a66fda249e1b2d3582af86e961553453"
18
+ "gitHead": "d079d93c7d8677f8269b97bc71820bc35dc46921"
19
19
  }