@dative-gpi/foundation-core-domain 0.0.190 → 0.0.192

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/models/index.ts CHANGED
@@ -31,6 +31,7 @@ export * from "./enums"; // No service
31
31
  export * from "./extensionApplications";
32
32
  export * from "./folders";
33
33
  export * from "./groups";
34
+ export * from "./locations";
34
35
  export * from "./manufacturers";
35
36
  export * from "./models";
36
37
  export * from "./modelStatuses"; // No service
@@ -0,0 +1,2 @@
1
+ export * from "./locationDetails";
2
+ export * from "./locationInfos";
@@ -0,0 +1,34 @@
1
+ import { type AddressDTO } from "@dative-gpi/foundation-shared-domain/models";
2
+ import { LocationInfos, type LocationInfosDTO } from "./locationInfos";
3
+
4
+ export class LocationDetails extends LocationInfos {
5
+ description: string;
6
+
7
+ constructor(params: LocationDetailsDTO) {
8
+ super(params);
9
+
10
+ this.description = params.description;
11
+ }
12
+ }
13
+
14
+ export interface LocationDetailsDTO extends LocationInfosDTO {
15
+ description: string;
16
+ }
17
+
18
+ export interface CreateLocationDTO {
19
+ icon: string;
20
+ code: string;
21
+ label: string;
22
+ description: string;
23
+ tags: string[];
24
+ address: AddressDTO | null;
25
+ }
26
+
27
+ export interface UpdateLocationDTO {
28
+ icon: string;
29
+ code: string;
30
+ label: string;
31
+ description: string;
32
+ tags: string[];
33
+ address: AddressDTO | null;
34
+ }
@@ -0,0 +1,46 @@
1
+ import { Address, type AddressDTO } from "@dative-gpi/foundation-shared-domain/models";
2
+
3
+ export class LocationInfos {
4
+ id: string;
5
+ organisationId: string;
6
+ icon: string;
7
+ code: string;
8
+ label: string;
9
+ tags: string[];
10
+ address: Address;
11
+ modelsIds: string[];
12
+ deviceOrganisationsIds: string[];
13
+ deviceOrganisationsCount: number;
14
+
15
+ constructor(params: LocationInfosDTO) {
16
+ this.id = params.id;
17
+ this.organisationId = params.organisationId;
18
+ this.icon = params.icon;
19
+ this.code = params.code;
20
+ this.label = params.label;
21
+ this.tags = params.tags.slice();
22
+ this.address = new Address(params.address);
23
+ this.modelsIds = params.modelsIds.slice();
24
+ this.deviceOrganisationsIds = params.deviceOrganisationsIds.slice();
25
+ this.deviceOrganisationsCount = params.deviceOrganisationsCount;
26
+ }
27
+ }
28
+
29
+ export interface LocationInfosDTO {
30
+ id: string;
31
+ organisationId: string;
32
+ icon: string;
33
+ code: string;
34
+ label: string;
35
+ tags: string[];
36
+ address: AddressDTO;
37
+ modelsIds: string[];
38
+ deviceOrganisationsIds: string[];
39
+ deviceOrganisationsCount: number;
40
+ }
41
+
42
+ export interface LocationFilters {
43
+ locationsIds?: string[] | null;
44
+ modelsIds?: string[] | null;
45
+ search?: string | null;
46
+ }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@dative-gpi/foundation-core-domain",
3
3
  "sideEffects": false,
4
- "version": "0.0.190",
4
+ "version": "0.0.192",
5
5
  "description": "",
6
6
  "publishConfig": {
7
7
  "access": "public"
@@ -9,5 +9,5 @@
9
9
  "main": "index.ts",
10
10
  "author": "",
11
11
  "license": "ISC",
12
- "gitHead": "226125292c2f5ed27334b3bdee88b1877a9d9d6a"
12
+ "gitHead": "e87b84b757a4c7c46fbba96fd3d3620265768a9e"
13
13
  }