@dative-gpi/foundation-core-services 0.0.11 → 0.0.12

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.
Files changed (36) hide show
  1. package/composables/hubs/useAlertsHub.ts +1 -1
  2. package/composables/hubs/useConnectivityAlertsHub.ts +1 -1
  3. package/composables/hubs/useDeviceConnectivitiesHub.ts +1 -1
  4. package/composables/hubs/useDeviceStatusesHub.ts +1 -1
  5. package/composables/services/useActions.ts +1 -1
  6. package/composables/services/useAlerts.ts +10 -11
  7. package/composables/services/useArticles.ts +1 -1
  8. package/composables/services/useAuthTokens.ts +1 -1
  9. package/composables/services/useComments.ts +1 -1
  10. package/composables/services/useConnectivityAlerts.ts +6 -7
  11. package/composables/services/useCustomProperties.ts +1 -1
  12. package/composables/services/useCustomPropertyValues.ts +6 -7
  13. package/composables/services/useDataCategories.ts +1 -1
  14. package/composables/services/useDataDefinitions.ts +1 -1
  15. package/composables/services/useDeviceConnectivities.ts +6 -6
  16. package/composables/services/useDeviceOrganisations.ts +10 -10
  17. package/composables/services/useDeviceStatuses.ts +6 -7
  18. package/composables/services/useGroups.ts +6 -6
  19. package/composables/services/useLanguages.ts +1 -1
  20. package/composables/services/useLocations.ts +1 -1
  21. package/composables/services/useManufacturers.ts +1 -1
  22. package/composables/services/useModels.ts +1 -1
  23. package/composables/services/useOrganisationTypes.ts +1 -1
  24. package/composables/services/useOrganisations.ts +7 -7
  25. package/composables/services/usePermissionCategories.ts +1 -1
  26. package/composables/services/usePermissions.ts +6 -7
  27. package/composables/services/useRoleOrganisationTypes.ts +1 -1
  28. package/composables/services/useRoleOrganisations.ts +1 -1
  29. package/composables/services/useTables.ts +1 -1
  30. package/composables/services/useUserOrganisations.ts +10 -10
  31. package/composables/services/useUsers.ts +1 -1
  32. package/composables/useCore.ts +1 -1
  33. package/composables/useOrganisationId.ts +0 -4
  34. package/config/urls/customPropertyValues.ts +1 -1
  35. package/package.json +5 -4
  36. package/index.ts +0 -2
@@ -15,7 +15,7 @@ export const useAlertsHub = () => {
15
15
  onMounted(async () => {
16
16
  if (!connection.value) {
17
17
  connection.value = new signalR.HubConnectionBuilder()
18
- .withUrl(ALERTS_HUB_URL)
18
+ .withUrl(ALERTS_HUB_URL())
19
19
  .configureLogging(signalR.LogLevel.Warning)
20
20
  .withAutomaticReconnect()
21
21
  .build();
@@ -15,7 +15,7 @@ export const useConnectivityAlertsHub = () => {
15
15
  onMounted(async () => {
16
16
  if (!connection.value) {
17
17
  connection.value = new signalR.HubConnectionBuilder()
18
- .withUrl(CONNECTIVITY_ALERTS_HUB_URL)
18
+ .withUrl(CONNECTIVITY_ALERTS_HUB_URL())
19
19
  .configureLogging(signalR.LogLevel.Warning)
20
20
  .withAutomaticReconnect()
21
21
  .build();
@@ -15,7 +15,7 @@ export const useDeviceConnectivitiesHub = () => {
15
15
  onMounted(async () => {
16
16
  if (!connection.value) {
17
17
  connection.value = new signalR.HubConnectionBuilder()
18
- .withUrl(DEVICE_CONNECTIVITIES_HUB_URL)
18
+ .withUrl(DEVICE_CONNECTIVITIES_HUB_URL())
19
19
  .configureLogging(signalR.LogLevel.Warning)
20
20
  .withAutomaticReconnect()
21
21
  .build();
@@ -15,7 +15,7 @@ export const useDeviceStatusesHub = () => {
15
15
  onMounted(async () => {
16
16
  if (!connection.value) {
17
17
  connection.value = new signalR.HubConnectionBuilder()
18
- .withUrl(DEVICE_STATUSES_HUB_URL)
18
+ .withUrl(DEVICE_STATUSES_HUB_URL())
19
19
  .configureLogging(signalR.LogLevel.Warning)
20
20
  .withAutomaticReconnect()
21
21
  .build();
@@ -1,4 +1,4 @@
1
- import { ActionDetails, ActionDetailsDTO, ActionInfos, ActionInfosDTO } from "@dative-gpi/foundation-core-domain";
1
+ import { ActionDetails, ActionDetailsDTO, ActionInfos, ActionInfosDTO } from "@dative-gpi/foundation-core-domain/models";
2
2
  import { ComposableFactory, ServiceFactory } from "@dative-gpi/bones-ui";
3
3
 
4
4
  import { ACTIONS_URL } from "../../config/urls";
@@ -1,6 +1,6 @@
1
- import { Ref, onUnmounted, readonly, ref } from "vue";
1
+ import { onUnmounted, ref } from "vue";
2
2
 
3
- import { AlertDetails, AlertDetailsDTO, AlertFilters, AlertInfos, AlertInfosDTO } from "@dative-gpi/foundation-core-domain";
3
+ import { AlertDetails, AlertDetailsDTO, AlertFilters, AlertInfos, AlertInfosDTO } from "@dative-gpi/foundation-core-domain/models";
4
4
  import { ComposableFactory, onEntityChanged , ServiceFactory } from "@dative-gpi/bones-ui";
5
5
 
6
6
  import { ALERTS_URL, ALERT_URL } from "../../config/urls";
@@ -40,7 +40,7 @@ export const useAcknowledgeAlert = () => {
40
40
  const subscribersIds : number[] = [];
41
41
 
42
42
  const changing = ref(false);
43
- const changed = ref<AlertDetails | null>(null) as Ref<AlertDetails | null>;
43
+ const changed = ref<AlertDetails | null>(null);
44
44
 
45
45
  onUnmounted(() => {
46
46
  subscribersIds.forEach(id => service.unsubscribe(id));
@@ -56,20 +56,20 @@ export const useAcknowledgeAlert = () => {
56
56
  changing.value = false;
57
57
  }
58
58
  subscribersIds.push(service.subscribe("all", onEntityChanged(changed)));
59
- return readonly(changed as Ref<AlertDetails>);
59
+ return changed;
60
60
  }
61
61
 
62
62
  return {
63
- changing: readonly(changing),
63
+ changing,
64
64
  change,
65
- changed: readonly(changed)
65
+ changed
66
66
  };
67
67
  }
68
68
  export const useNotifyAlert = () => {
69
69
  const service = AlertServiceFactory();
70
70
 
71
71
  const fetching = ref(false);
72
- const fetched = ref<AlertDetails | null>(null) as Ref<AlertDetails | null>;
72
+ const fetched = ref<AlertDetails | null>(null);
73
73
 
74
74
  const fetch = async (alertId: string) => {
75
75
  fetching.value = true;
@@ -79,14 +79,13 @@ export const useNotifyAlert = () => {
79
79
  finally {
80
80
  fetching.value = false;
81
81
  }
82
-
83
- return readonly(fetched as Ref<AlertDetails>);
82
+ return fetched;
84
83
  }
85
84
 
86
85
  return {
87
- fetching: readonly(fetching),
86
+ fetching,
88
87
  fetch,
89
- fetched: readonly(fetched)
88
+ fetched
90
89
  };
91
90
  }
92
91
  export const useNotifyRemoveAlert = () => {
@@ -1,4 +1,4 @@
1
- import { ArticleDetails, ArticleDetailsDTO, ArticleFilters, ArticleInfos, ArticleInfosDTO } from "@dative-gpi/foundation-core-domain";
1
+ import { ArticleDetails, ArticleDetailsDTO, ArticleFilters, ArticleInfos, ArticleInfosDTO } from "@dative-gpi/foundation-core-domain/models";
2
2
  import { ComposableFactory, ServiceFactory } from "@dative-gpi/bones-ui";
3
3
 
4
4
  import { ARTICLES_URL, ARTICLE_URL } from "../../config/urls";
@@ -1,4 +1,4 @@
1
- import { AuthTokenDetails, AuthTokenDetailsDTO, AuthTokenFilters, AuthTokenInfos, AuthTokenInfosDTO } from "@dative-gpi/foundation-core-domain";
1
+ import { AuthTokenDetails, AuthTokenDetailsDTO, AuthTokenFilters, AuthTokenInfos, AuthTokenInfosDTO } from "@dative-gpi/foundation-core-domain/models";
2
2
  import { ComposableFactory, ServiceFactory } from "@dative-gpi/bones-ui";
3
3
 
4
4
  import { AUTH_TOKENS_URL, AUTH_TOKEN_URL } from "../../config/urls";
@@ -1,4 +1,4 @@
1
- import { CreateCommentDTO, CommentDetails, CommentDetailsDTO, CommentFilters, CommentInfos, CommentInfosDTO, UpdateCommentDTO } from "@dative-gpi/foundation-core-domain";
1
+ import { CreateCommentDTO, CommentDetails, CommentDetailsDTO, CommentFilters, CommentInfos, CommentInfosDTO, UpdateCommentDTO } from "@dative-gpi/foundation-core-domain/models";
2
2
  import { ComposableFactory, ServiceFactory } from "@dative-gpi/bones-ui";
3
3
 
4
4
  import { COMMENTS_URL, COMMENT_URL } from "../../config/urls";
@@ -1,6 +1,6 @@
1
- import { Ref, readonly, ref } from "vue";
1
+ import { ref } from "vue";
2
2
 
3
- import { ConnectivityAlertDetails, ConnectivityAlertDetailsDTO, ConnectivityAlertFilters, ConnectivityAlertInfos, ConnectivityAlertInfosDTO } from "@dative-gpi/foundation-core-domain";
3
+ import { ConnectivityAlertDetails, ConnectivityAlertDetailsDTO, ConnectivityAlertFilters, ConnectivityAlertInfos, ConnectivityAlertInfosDTO } from "@dative-gpi/foundation-core-domain/models";
4
4
  import { ComposableFactory, ServiceFactory } from "@dative-gpi/bones-ui";
5
5
 
6
6
  import { CONNECTIVITY_ALERTS_URL, CONNECTIVITY_ALERT_URL } from "../../config/urls";
@@ -31,7 +31,7 @@ export const useNotifyConnectivityAlert = () => {
31
31
  const service = ConnectivityAlertServiceFactory();
32
32
 
33
33
  const fetching = ref(false);
34
- const fetched = ref<ConnectivityAlertDetails | null>(null) as Ref<ConnectivityAlertDetails | null>;
34
+ const fetched = ref<ConnectivityAlertDetails | null>(null);
35
35
 
36
36
  const fetch = async (connectivityAlertId: string) => {
37
37
  fetching.value = true;
@@ -41,14 +41,13 @@ export const useNotifyConnectivityAlert = () => {
41
41
  finally {
42
42
  fetching.value = false;
43
43
  }
44
-
45
- return readonly(fetched as Ref<ConnectivityAlertDetails>);
44
+ return fetched;
46
45
  }
47
46
 
48
47
  return {
49
- fetching: readonly(fetching),
48
+ fetching,
50
49
  fetch,
51
- notified: readonly(fetched)
50
+ fetched
52
51
  };
53
52
  }
54
53
  export const useNotifyRemoveConnectivityAlert = () => {
@@ -1,4 +1,4 @@
1
- import { CustomPropertyDetails, CustomPropertyDetailsDTO, CustomPropertyFilters, CustomPropertyInfos, CustomPropertyInfosDTO } from "@dative-gpi/foundation-core-domain";
1
+ import { CustomPropertyDetails, CustomPropertyDetailsDTO, CustomPropertyFilters, CustomPropertyInfos, CustomPropertyInfosDTO } from "@dative-gpi/foundation-core-domain/models";
2
2
  import { ComposableFactory, ServiceFactory } from "@dative-gpi/bones-ui";
3
3
 
4
4
  import { CUSTOM_PROPERTIES_URL } from "../../config/urls";
@@ -1,6 +1,6 @@
1
- import { Ref, readonly, ref } from "vue";
1
+ import { ref } from "vue";
2
2
 
3
- import { CustomPropertyValueDetails, CustomPropertyValueDetailsDTO, CustomPropertyValueInfos, CustomPropertyValueInfosDTO, PropertyEntity } from "@dative-gpi/foundation-core-domain";
3
+ import { CustomPropertyValueDetails, CustomPropertyValueDetailsDTO, CustomPropertyValueInfos, CustomPropertyValueInfosDTO, PropertyEntity } from "@dative-gpi/foundation-core-domain/models";
4
4
  import { ServiceFactory } from "@dative-gpi/bones-ui";
5
5
 
6
6
  import { CUSTOM_PROPERTY_VALUES_URL } from "../../config/urls";
@@ -20,7 +20,7 @@ export const useCustomPropertyValues = () => {
20
20
  const service = CustomPropertyValueServiceFactory();
21
21
 
22
22
  const fetching = ref(false);
23
- const fetched = ref<CustomPropertyValueInfos[] | null>(null) as Ref<CustomPropertyValueInfos[] | null>;
23
+ const fetched = ref<CustomPropertyValueInfos[] | null>(null);
24
24
 
25
25
  const fetch = async (entity: PropertyEntity, entityId: string, code: string) => {
26
26
  fetching.value = true;
@@ -30,13 +30,12 @@ export const useCustomPropertyValues = () => {
30
30
  finally {
31
31
  fetching.value = false;
32
32
  }
33
-
34
- return readonly(fetched as Ref<CustomPropertyValueInfos[]>);
33
+ return fetched;
35
34
  }
36
35
 
37
36
  return {
38
- fetching: readonly(fetching),
37
+ fetching,
39
38
  fetch,
40
- fetched: readonly(fetched)
39
+ fetched
41
40
  }
42
41
  }
@@ -1,4 +1,4 @@
1
- import { DataCategoryDetails, DataCategoryDetailsDTO, DataCategoryFilters, DataCategoryInfos, DataCategoryInfosDTO } from "@dative-gpi/foundation-core-domain";
1
+ import { DataCategoryDetails, DataCategoryDetailsDTO, DataCategoryFilters, DataCategoryInfos, DataCategoryInfosDTO } from "@dative-gpi/foundation-core-domain/models";
2
2
  import { ComposableFactory, ServiceFactory } from "@dative-gpi/bones-ui";
3
3
 
4
4
  import { DATA_CATEGORIES_URL, DATA_CATEGORY_URL } from "../../config/urls";
@@ -1,4 +1,4 @@
1
- import { DataDefinitionDetails, DataDefinitionDetailsDTO, DataDefinitionFilters, DataDefinitionInfos, DataDefinitionInfosDTO } from "@dative-gpi/foundation-core-domain";
1
+ import { DataDefinitionDetails, DataDefinitionDetailsDTO, DataDefinitionFilters, DataDefinitionInfos, DataDefinitionInfosDTO } from "@dative-gpi/foundation-core-domain/models";
2
2
  import { ComposableFactory, ServiceFactory } from "@dative-gpi/bones-ui";
3
3
 
4
4
  import { DATA_DEFINITIONS_URL, DATA_DEFINITION_URL } from "../../config/urls";
@@ -1,6 +1,6 @@
1
- import { Ref, readonly, ref } from "vue";
1
+ import { ref } from "vue";
2
2
 
3
- import { DeviceConnectivityDetails, DeviceConnectivityDetailsDTO } from "@dative-gpi/foundation-core-domain";
3
+ import { DeviceConnectivityDetails, DeviceConnectivityDetailsDTO } from "@dative-gpi/foundation-core-domain/models";
4
4
  import { ComposableFactory, ServiceFactory } from "@dative-gpi/bones-ui";
5
5
 
6
6
  import { DEVICE_CONNECTIVITY_URL } from "../../config/urls";
@@ -24,7 +24,7 @@ export const useNotifyDeviceConnectivity = () => {
24
24
  const service = DeviceConnectivityServiceFactory();
25
25
 
26
26
  const fetching = ref(false);
27
- const fetched = ref<DeviceConnectivityDetails | null>(null) as Ref<DeviceConnectivityDetails | null>;
27
+ const fetched = ref<DeviceConnectivityDetails | null>(null);
28
28
 
29
29
  const fetch = async (deviceConnectivityId: string) => {
30
30
  fetching.value = true;
@@ -35,12 +35,12 @@ export const useNotifyDeviceConnectivity = () => {
35
35
  fetching.value = false;
36
36
  }
37
37
 
38
- return readonly(fetched as Ref<DeviceConnectivityDetails>);
38
+ return fetched;
39
39
  }
40
40
 
41
41
  return {
42
- fetching: readonly(fetching),
42
+ fetching,
43
43
  fetch,
44
- fetched: readonly(fetched)
44
+ fetched
45
45
  };
46
46
  }
@@ -1,6 +1,6 @@
1
- import { Ref, onUnmounted, readonly, ref } from "vue";
1
+ import { onUnmounted, ref } from "vue";
2
2
 
3
- import { ChangeDeviceOrganisationGroupDTO, ChangeDeviceOrganisationLocationDTO, CreateDeviceOrganisationDTO, DeviceOrganisationDetails, DeviceOrganisationDetailsDTO, DeviceOrganisationFilters, DeviceOrganisationInfos, DeviceOrganisationInfosDTO, UpdateDeviceOrganisationDTO } from "@dative-gpi/foundation-core-domain";
3
+ import { ChangeDeviceOrganisationGroupDTO, ChangeDeviceOrganisationLocationDTO, CreateDeviceOrganisationDTO, DeviceOrganisationDetails, DeviceOrganisationDetailsDTO, DeviceOrganisationFilters, DeviceOrganisationInfos, DeviceOrganisationInfosDTO, UpdateDeviceOrganisationDTO } from "@dative-gpi/foundation-core-domain/models";
4
4
  import { ComposableFactory, onEntityChanged , ServiceFactory } from "@dative-gpi/bones-ui";
5
5
 
6
6
  import { DEVICE_ORGANISATIONS_URL, DEVICE_ORGANISATION_URL, DEVICE_ORGANISATION_GROUP_URL, DEVICE_ORGANISATION_LOCATION_URL } from "../../config/urls";
@@ -41,7 +41,7 @@ export const useChangeDeviceOrganisationGroup = () => {
41
41
  const subscriberIds: number[] = [];
42
42
 
43
43
  const changing = ref(false);
44
- const changed = ref<DeviceOrganisationDetails | null>(null) as Ref<DeviceOrganisationDetails | null>;
44
+ const changed = ref<DeviceOrganisationDetails | null>(null);
45
45
 
46
46
  onUnmounted(() => {
47
47
  subscriberIds.forEach(id => service.unsubscribe(id));
@@ -57,13 +57,13 @@ export const useChangeDeviceOrganisationGroup = () => {
57
57
  changing.value = false;
58
58
  }
59
59
  subscriberIds.push(service.subscribe("all", onEntityChanged(changed)));
60
- return readonly(changed as Ref<DeviceOrganisationDetails>);
60
+ return changed;
61
61
  }
62
62
 
63
63
  return {
64
- changing: readonly(changing),
64
+ changing,
65
65
  change,
66
- changed: readonly(changed)
66
+ changed
67
67
  }
68
68
  }
69
69
  export const useChangeDeviceOrganisationLocation = () => {
@@ -71,7 +71,7 @@ export const useChangeDeviceOrganisationLocation = () => {
71
71
  const subscriberIds: number[] = [];
72
72
 
73
73
  const changing = ref(false);
74
- const changed = ref<DeviceOrganisationDetails | null>(null) as Ref<DeviceOrganisationDetails | null>;
74
+ const changed = ref<DeviceOrganisationDetails | null>(null);
75
75
 
76
76
  onUnmounted(() => {
77
77
  subscriberIds.forEach(id => service.unsubscribe(id));
@@ -87,12 +87,12 @@ export const useChangeDeviceOrganisationLocation = () => {
87
87
  changing.value = false;
88
88
  }
89
89
  subscriberIds.push(service.subscribe("all", onEntityChanged(changed)));
90
- return readonly(changed as Ref<DeviceOrganisationDetails>);
90
+ return changed;
91
91
  }
92
92
 
93
93
  return {
94
- changing: readonly(changing),
94
+ changing,
95
95
  change,
96
- changed: readonly(changed)
96
+ changed
97
97
  }
98
98
  }
@@ -1,6 +1,6 @@
1
- import { Ref, readonly, ref } from "vue";
1
+ import { ref } from "vue";
2
2
 
3
- import { DeviceStatusDetails, DeviceStatusDetailsDTO } from "@dative-gpi/foundation-core-domain";
3
+ import { DeviceStatusDetails, DeviceStatusDetailsDTO } from "@dative-gpi/foundation-core-domain/models";
4
4
  import { ComposableFactory, ServiceFactory } from "@dative-gpi/bones-ui";
5
5
 
6
6
  import { DEVICE_STATUS_URL } from "../../config/urls";
@@ -24,7 +24,7 @@ export const useNotifyDeviceStatus = () => {
24
24
  const service = DeviceStatusServiceFactory();
25
25
 
26
26
  const fetching = ref(false);
27
- const fetched = ref<DeviceStatusDetails | null>(null) as Ref<DeviceStatusDetails | null>;
27
+ const fetched = ref<DeviceStatusDetails | null>(null);
28
28
 
29
29
  const fetch = async (deviceStatusId: string) => {
30
30
  fetching.value = true;
@@ -34,13 +34,12 @@ export const useNotifyDeviceStatus = () => {
34
34
  finally {
35
35
  fetching.value = false;
36
36
  }
37
-
38
- return readonly(fetched as Ref<DeviceStatusDetails>);
37
+ return fetched;
39
38
  }
40
39
 
41
40
  return {
42
- fetching: readonly(fetching),
41
+ fetching,
43
42
  fetch,
44
- fetched: readonly(fetched)
43
+ fetched
45
44
  };
46
45
  }
@@ -1,6 +1,6 @@
1
- import { Ref, onUnmounted, readonly, ref } from "vue";
1
+ import { onUnmounted, ref } from "vue";
2
2
 
3
- import { ChangeGroupParentDTO, CreateGroupDTO, GroupDetails, GroupDetailsDTO, GroupFilters, GroupInfos, GroupInfosDTO, UpdateGroupDTO } from "@dative-gpi/foundation-core-domain";
3
+ import { ChangeGroupParentDTO, CreateGroupDTO, GroupDetails, GroupDetailsDTO, GroupFilters, GroupInfos, GroupInfosDTO, UpdateGroupDTO } from "@dative-gpi/foundation-core-domain/models";
4
4
  import { ComposableFactory, onEntityChanged , ServiceFactory } from "@dative-gpi/bones-ui";
5
5
 
6
6
  import { GROUPS_URL, GROUP_URL } from "../../config/urls";
@@ -33,7 +33,7 @@ export const useChangeGroupParent = () => {
33
33
  const subscriberIds: number[] = [];
34
34
 
35
35
  const changing = ref(false);
36
- const changed = ref<GroupDetails | null>(null) as Ref<GroupDetails | null>;
36
+ const changed = ref<GroupDetails | null>(null);
37
37
 
38
38
  onUnmounted(() => {
39
39
  subscriberIds.forEach(id => service.unsubscribe(id));
@@ -49,12 +49,12 @@ export const useChangeGroupParent = () => {
49
49
  changing.value = false;
50
50
  }
51
51
  subscriberIds.push(service.subscribe("all", onEntityChanged(changed)));
52
- return readonly(changed as Ref<GroupDetails>);
52
+ return changed;
53
53
  }
54
54
 
55
55
  return {
56
- changing: readonly(changing),
56
+ changing,
57
57
  change,
58
- changed: readonly(changed)
58
+ changed
59
59
  }
60
60
  }
@@ -1,4 +1,4 @@
1
- import { LanguageDetails, LanguageDetailsDTO, LanguageFilters, LanguageInfos, LanguageInfosDTO } from "@dative-gpi/foundation-shared-domain";
1
+ import { LanguageDetails, LanguageDetailsDTO, LanguageFilters, LanguageInfos, LanguageInfosDTO } from "@dative-gpi/foundation-shared-domain/models";
2
2
  import { ComposableFactory, ServiceFactory } from "@dative-gpi/bones-ui";
3
3
 
4
4
  import { LANGUAGES_URL, LANGUAGE_URL } from "../../config/urls";
@@ -1,4 +1,4 @@
1
- import { CreateLocationDTO, LocationDetails, LocationDetailsDTO, LocationFilters, LocationInfos, LocationInfosDTO, UpdateLocationDTO } from "@dative-gpi/foundation-core-domain";
1
+ import { CreateLocationDTO, LocationDetails, LocationDetailsDTO, LocationFilters, LocationInfos, LocationInfosDTO, UpdateLocationDTO } from "@dative-gpi/foundation-core-domain/models";
2
2
  import { ComposableFactory, ServiceFactory } from "@dative-gpi/bones-ui";
3
3
 
4
4
  import { LOCATIONS_URL, LOCATION_URL } from "../../config/urls";
@@ -1,4 +1,4 @@
1
- import { ManufacturerDetails, ManufacturerDetailsDTO, ManufacturerFilters, ManufacturerInfos, ManufacturerInfosDTO } from "@dative-gpi/foundation-core-domain";
1
+ import { ManufacturerDetails, ManufacturerDetailsDTO, ManufacturerFilters, ManufacturerInfos, ManufacturerInfosDTO } from "@dative-gpi/foundation-core-domain/models";
2
2
  import { ComposableFactory, ServiceFactory } from "@dative-gpi/bones-ui";
3
3
 
4
4
  import { MANUFACTURERS_URL, MANUFACTURER_URL } from "../../config/urls";
@@ -1,4 +1,4 @@
1
- import { ModelDetails, ModelDetailsDTO, ModelFilters, ModelInfos, ModelInfosDTO } from "@dative-gpi/foundation-core-domain";
1
+ import { ModelDetails, ModelDetailsDTO, ModelFilters, ModelInfos, ModelInfosDTO } from "@dative-gpi/foundation-core-domain/models";
2
2
  import { ComposableFactory, ServiceFactory } from "@dative-gpi/bones-ui";
3
3
 
4
4
  import { MODELS_URL, MODEL_URL } from "../../config/urls";
@@ -1,4 +1,4 @@
1
- import { OrganisationTypeDetails, OrganisationTypeDetailsDTO, OrganisationTypeFilters, OrganisationTypeInfos, OrganisationTypeInfosDTO } from "@dative-gpi/foundation-core-domain";
1
+ import { OrganisationTypeDetails, OrganisationTypeDetailsDTO, OrganisationTypeFilters, OrganisationTypeInfos, OrganisationTypeInfosDTO } from "@dative-gpi/foundation-core-domain/models";
2
2
  import { ComposableFactory, ServiceFactory } from "@dative-gpi/bones-ui";
3
3
 
4
4
  import { ORGANISATION_TYPES_URL, ORGANISATION_TYPE_URL } from "../../config/urls";
@@ -1,7 +1,7 @@
1
- import { Ref, onUnmounted, readonly, ref } from "vue";
1
+ import { onUnmounted, ref } from "vue";
2
2
 
3
- import { OrganisationDetails, OrganisationDetailsDTO } from "@dative-gpi/foundation-shared-domain";
4
- import { ChangeOrganisationDashboardDTO } from "@dative-gpi/foundation-core-domain";
3
+ import { OrganisationDetails, OrganisationDetailsDTO } from "@dative-gpi/foundation-shared-domain/models";
4
+ import { ChangeOrganisationDashboardDTO } from "@dative-gpi/foundation-core-domain/models";
5
5
  import { onEntityChanged , ServiceFactory } from "@dative-gpi/bones-ui";
6
6
 
7
7
  import { ORGANISATION_DASHBOARD_URL } from "../../config/urls";
@@ -24,7 +24,7 @@ export const useChangeDashboardOrganisation = () => {
24
24
  const subscribersIds: number[] = [];
25
25
 
26
26
  const changing = ref(false);
27
- const changed = ref<OrganisationDetails | null>(null) as Ref<OrganisationDetails | null>;
27
+ const changed = ref<OrganisationDetails | null>(null);
28
28
 
29
29
  onUnmounted(() => {
30
30
  subscribersIds.forEach(id => service.unsubscribe(id));
@@ -40,12 +40,12 @@ export const useChangeDashboardOrganisation = () => {
40
40
  changing.value = false;
41
41
  }
42
42
  subscribersIds.push(service.subscribe("all", onEntityChanged(changed)));
43
- return readonly(changed as Ref<OrganisationDetails>);
43
+ return changed;
44
44
  }
45
45
 
46
46
  return {
47
- changing: readonly(changing),
47
+ changing,
48
48
  change,
49
- changed: readonly(changed)
49
+ changed
50
50
  }
51
51
  }
@@ -1,4 +1,4 @@
1
- import { PermissionCategoryDetails, PermissionCategoryDetailsDTO, PermissionCategoryFilters, PermissionCategoryInfos, PermissionCategoryInfosDTO } from "@dative-gpi/foundation-core-domain";
1
+ import { PermissionCategoryDetails, PermissionCategoryDetailsDTO, PermissionCategoryFilters, PermissionCategoryInfos, PermissionCategoryInfosDTO } from "@dative-gpi/foundation-core-domain/models";
2
2
  import { ComposableFactory, ServiceFactory } from "@dative-gpi/bones-ui";
3
3
 
4
4
  import { PERMISSION_CATEGORIES_URL } from "../../config/urls";
@@ -1,6 +1,6 @@
1
- import { Ref, readonly, ref } from "vue";
1
+ import { ref } from "vue";
2
2
 
3
- import { PermissionDetails, PermissionDetailsDTO, PermissionInfos } from "@dative-gpi/foundation-shared-domain";
3
+ import { PermissionDetails, PermissionDetailsDTO, PermissionInfos } from "@dative-gpi/foundation-shared-domain/models";
4
4
  import { ServiceFactory } from "@dative-gpi/bones-ui";
5
5
 
6
6
  import { PERMISSIONS_CURRENT_URL } from "../../config/urls";
@@ -20,7 +20,7 @@ export const useCurrentPermissions = () => {
20
20
  const service = PermissionServiceFactory();
21
21
 
22
22
  const fetching = ref(false);
23
- const fetched = ref<PermissionInfos[] | null>(null) as Ref<PermissionInfos[] | null>;
23
+ const fetched = ref<PermissionInfos[] | null>(null);
24
24
 
25
25
  const fetch = async () => {
26
26
  fetching.value = true;
@@ -30,13 +30,12 @@ export const useCurrentPermissions = () => {
30
30
  finally {
31
31
  fetching.value = false;
32
32
  }
33
-
34
- return readonly(fetched as Ref<PermissionInfos[]>);
33
+ return fetched;
35
34
  }
36
35
 
37
36
  return {
38
- fetching: readonly(fetching),
37
+ fetching,
39
38
  fetch,
40
- fetched: readonly(fetched)
39
+ fetched
41
40
  }
42
41
  }
@@ -1,4 +1,4 @@
1
- import { RoleOrganisationTypeDetails, RoleOrganisationTypeDetailsDTO, RoleOrganisationTypeFilters, RoleOrganisationTypeInfos, RoleOrganisationTypeInfosDTO } from "@dative-gpi/foundation-core-domain";
1
+ import { RoleOrganisationTypeDetails, RoleOrganisationTypeDetailsDTO, RoleOrganisationTypeFilters, RoleOrganisationTypeInfos, RoleOrganisationTypeInfosDTO } from "@dative-gpi/foundation-core-domain/models";
2
2
  import { ComposableFactory, ServiceFactory } from "@dative-gpi/bones-ui";
3
3
 
4
4
  import { ROLE_ORGANISATION_TYPES_URL, ROLE_ORGANISATION_TYPE_URL } from "../../config/urls";
@@ -1,4 +1,4 @@
1
- import { CreateRoleOrganisationDTO, RoleOrganisationDetails, RoleOrganisationDetailsDTO, RoleOrganisationFilters, RoleOrganisationInfos, RoleOrganisationInfosDTO, UpdateRoleOrganisationDTO } from "@dative-gpi/foundation-core-domain";
1
+ import { CreateRoleOrganisationDTO, RoleOrganisationDetails, RoleOrganisationDetailsDTO, RoleOrganisationFilters, RoleOrganisationInfos, RoleOrganisationInfosDTO, UpdateRoleOrganisationDTO } from "@dative-gpi/foundation-core-domain/models";
2
2
  import { ComposableFactory, ServiceFactory } from "@dative-gpi/bones-ui";
3
3
 
4
4
  import { ROLE_ORGANISATIONS_URL, ROLE_ORGANISATION_URL } from "../../config/urls";
@@ -1,4 +1,4 @@
1
- import { TableDetails, TableDetailsDTO, UpdateTableDTO } from "@dative-gpi/foundation-core-domain";
1
+ import { TableDetails, TableDetailsDTO, UpdateTableDTO } from "@dative-gpi/foundation-core-domain/models";
2
2
  import { ComposableFactory, ServiceFactory } from "@dative-gpi/bones-ui";
3
3
 
4
4
  import { TABLE_URL } from "../../config/urls";
@@ -1,6 +1,6 @@
1
- import { Ref, onUnmounted, readonly, ref } from "vue";
1
+ import { onUnmounted, ref } from "vue";
2
2
 
3
- import { CreateUserOrganisationDTO, UpdateUserOrganisationDTO, UserOrganisationDetails, UserOrganisationDetailsDTO, UserOrganisationFilters, UserOrganisationInfos, UserOrganisationInfosDTO } from "@dative-gpi/foundation-core-domain";
3
+ import { CreateUserOrganisationDTO, UpdateUserOrganisationDTO, UserOrganisationDetails, UserOrganisationDetailsDTO, UserOrganisationFilters, UserOrganisationInfos, UserOrganisationInfosDTO } from "@dative-gpi/foundation-core-domain/models";
4
4
  import { ComposableFactory, onEntityChanged, ServiceFactory } from "@dative-gpi/bones-ui";
5
5
 
6
6
  import { USER_ORGANISATIONS_URL, USER_ORGANISATION_CURRENT_URL, USER_ORGANISATION_URL } from "../../config/urls";
@@ -41,7 +41,7 @@ export const useCurrentUserOrganisation = () => {
41
41
  const subscribersIds: number[] = [];
42
42
 
43
43
  const fetching = ref(false);
44
- const fetched = ref<UserOrganisationDetails | null>(null) as Ref<UserOrganisationDetails | null>;
44
+ const fetched = ref<UserOrganisationDetails | null>(null);
45
45
 
46
46
  onUnmounted(() => {
47
47
  subscribersIds.forEach(id => service.unsubscribe(id));
@@ -57,13 +57,13 @@ export const useCurrentUserOrganisation = () => {
57
57
  fetching.value = false;
58
58
  }
59
59
  subscribersIds.push(service.subscribe("all", onEntityChanged(fetched)));
60
- return readonly(fetched as Ref<UserOrganisationDetails>);
60
+ return fetched;
61
61
  }
62
62
 
63
63
  return {
64
- fetching: readonly(fetching),
64
+ fetching,
65
65
  fetch,
66
- fetched: readonly(fetched)
66
+ fetched
67
67
  }
68
68
  }
69
69
  export const useUpdateCurrentUserOrganisation = () => {
@@ -71,7 +71,7 @@ export const useUpdateCurrentUserOrganisation = () => {
71
71
  const subscribersIds: number[] = [];
72
72
 
73
73
  const updating = ref(false);
74
- const updated = ref<UserOrganisationDetails | null>(null) as Ref<UserOrganisationDetails | null>;
74
+ const updated = ref<UserOrganisationDetails | null>(null);
75
75
 
76
76
  onUnmounted(() => {
77
77
  subscribersIds.forEach(id => service.unsubscribe(id));
@@ -87,12 +87,12 @@ export const useUpdateCurrentUserOrganisation = () => {
87
87
  updating.value = false;
88
88
  }
89
89
  subscribersIds.push(service.subscribe("all", onEntityChanged(updated)));
90
- return readonly(updated as Ref<UserOrganisationDetails>);
90
+ return updated;
91
91
  }
92
92
 
93
93
  return {
94
- updating: readonly(updating),
94
+ updating,
95
95
  update,
96
- updated: readonly(updated)
96
+ updated
97
97
  }
98
98
  }
@@ -1,4 +1,4 @@
1
- import { UpdateUserDTO, UserDetails, UserDetailsDTO } from "@dative-gpi/foundation-shared-domain";
1
+ import { UpdateUserDTO, UserDetails, UserDetailsDTO } from "@dative-gpi/foundation-shared-domain/models";
2
2
  import { ComposableFactory, ServiceFactory } from "@dative-gpi/bones-ui";
3
3
 
4
4
  import { USER_URL } from "../../config/urls";
@@ -1,6 +1,6 @@
1
1
  import { onMounted, ref } from "vue";
2
2
 
3
- import { useOrganisationId } from "@dative-gpi/foundation-core-services/composables";
3
+ import { useOrganisationId } from "./useOrganisationId";
4
4
 
5
5
  let called = false;
6
6
 
@@ -1,7 +1,5 @@
1
1
  import { ref, watch } from "vue";
2
2
 
3
- let initialized = false;
4
-
5
3
  const organisationId = ref<string | null>(null);
6
4
 
7
5
  export const useOrganisationId = () => {
@@ -9,8 +7,6 @@ export const useOrganisationId = () => {
9
7
  organisationId.value = payload;
10
8
  };
11
9
 
12
- initialized = true;
13
-
14
10
  const ready = new Promise((resolve) => {
15
11
  if (organisationId.value) {
16
12
  resolve(organisationId.value);
@@ -1,4 +1,4 @@
1
- import { PropertyEntity } from "@dative-gpi/foundation-core-domain";
1
+ import { PropertyEntity } from "@dative-gpi/foundation-core-domain/models";
2
2
 
3
3
  import { CORE_URL } from "./base";
4
4
 
package/package.json CHANGED
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "name": "@dative-gpi/foundation-core-services",
3
- "version": "0.0.11",
3
+ "sideEffects": false,
4
+ "version": "0.0.12",
4
5
  "description": "",
5
6
  "publishConfig": {
6
7
  "access": "public"
@@ -9,11 +10,11 @@
9
10
  "author": "",
10
11
  "license": "ISC",
11
12
  "dependencies": {
12
- "@dative-gpi/bones-ui": "^0.0.60",
13
- "@dative-gpi/foundation-core-domain": "0.0.11",
13
+ "@dative-gpi/bones-ui": "^0.0.61",
14
+ "@dative-gpi/foundation-core-domain": "0.0.12",
14
15
  "@microsoft/signalr": "^8.0.0",
15
16
  "vue": "^3.2.0",
16
17
  "vue-router": "^4.2.5"
17
18
  },
18
- "gitHead": "4f28939e7d42ab1ef8319c614fbc210b1291fd79"
19
+ "gitHead": "73c686b3b0343ac4b42d34c2aa7cf7604ad0d298"
19
20
  }
package/index.ts DELETED
@@ -1,2 +0,0 @@
1
- export * from "./config";
2
- export * from "./composables";