@housebookgroup/shared-types 1.0.0
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/dist/authTypes.d.ts +8 -0
- package/dist/index.d.ts +4 -0
- package/dist/onboardingTypes.d.ts +28 -0
- package/dist/propertyTypes.d.ts +27 -0
- package/dist/userTypes.d.ts +6 -0
- package/package.json +23 -0
- package/src/authTypes.ts +8 -0
- package/src/index.ts +4 -0
- package/src/onboardingTypes.ts +36 -0
- package/src/propertyTypes.ts +29 -0
- package/src/userTypes.ts +6 -0
- package/tsconfig.json +11 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export interface OwnerData {
|
|
2
|
+
firstName: string;
|
|
3
|
+
lastName: string;
|
|
4
|
+
email: string;
|
|
5
|
+
phone: string;
|
|
6
|
+
}
|
|
7
|
+
export interface FormData {
|
|
8
|
+
propertyName: string;
|
|
9
|
+
propertyDescription: string;
|
|
10
|
+
address: string;
|
|
11
|
+
floorPlans: File[];
|
|
12
|
+
buildingPlans: File[];
|
|
13
|
+
}
|
|
14
|
+
export interface AssetFeature {
|
|
15
|
+
name: string;
|
|
16
|
+
value: string;
|
|
17
|
+
}
|
|
18
|
+
export interface AssetInt {
|
|
19
|
+
typeId: string;
|
|
20
|
+
name: string;
|
|
21
|
+
description: string;
|
|
22
|
+
features: AssetFeature[];
|
|
23
|
+
}
|
|
24
|
+
export interface SpaceInt {
|
|
25
|
+
type: string;
|
|
26
|
+
name: string;
|
|
27
|
+
assets: AssetInt[];
|
|
28
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export type Property = {
|
|
2
|
+
property_id: string;
|
|
3
|
+
address: string;
|
|
4
|
+
description: string;
|
|
5
|
+
pin: string;
|
|
6
|
+
name: string;
|
|
7
|
+
type: string;
|
|
8
|
+
status: string;
|
|
9
|
+
lastUpdated: string;
|
|
10
|
+
completionStatus: number;
|
|
11
|
+
totalFloorArea?: number;
|
|
12
|
+
spaces?: Space[];
|
|
13
|
+
images?: string[];
|
|
14
|
+
created_at: string;
|
|
15
|
+
splash_image?: string;
|
|
16
|
+
};
|
|
17
|
+
export type Space = {
|
|
18
|
+
space_id: string;
|
|
19
|
+
name: string;
|
|
20
|
+
type: string;
|
|
21
|
+
assets: Asset[];
|
|
22
|
+
};
|
|
23
|
+
export type Asset = {
|
|
24
|
+
asset_id: string;
|
|
25
|
+
type: string;
|
|
26
|
+
description: string;
|
|
27
|
+
};
|
package/package.json
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@housebookgroup/shared-types",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"private": false,
|
|
7
|
+
"types": "dist/index.d.ts",
|
|
8
|
+
"scripts": {
|
|
9
|
+
"test": "echo \"Error: no test specified\" && exit 1",
|
|
10
|
+
"build": "tsc"
|
|
11
|
+
},
|
|
12
|
+
"repository": {
|
|
13
|
+
"type": "git",
|
|
14
|
+
"url": "git+https://github.com/SSIEK-unimelb/housebook-shared-types.git"
|
|
15
|
+
},
|
|
16
|
+
"keywords": [],
|
|
17
|
+
"author": "",
|
|
18
|
+
"license": "ISC",
|
|
19
|
+
"bugs": {
|
|
20
|
+
"url": "https://github.com/SSIEK-unimelb/housebook-shared-types/issues"
|
|
21
|
+
},
|
|
22
|
+
"homepage": "https://github.com/SSIEK-unimelb/housebook-shared-types#readme"
|
|
23
|
+
}
|
package/src/authTypes.ts
ADDED
package/src/index.ts
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
export interface OwnerData {
|
|
2
|
+
firstName: string,
|
|
3
|
+
lastName: string,
|
|
4
|
+
email: string,
|
|
5
|
+
phone: string
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
// Setting what FormData looks like
|
|
9
|
+
export interface FormData {
|
|
10
|
+
// Basic Information
|
|
11
|
+
propertyName: string,
|
|
12
|
+
propertyDescription: string,
|
|
13
|
+
address: string,
|
|
14
|
+
// Plans & Documents
|
|
15
|
+
floorPlans: File[],
|
|
16
|
+
buildingPlans: File[]
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
// Setting what an Asset or Space looks like
|
|
20
|
+
export interface AssetFeature {
|
|
21
|
+
name: string;
|
|
22
|
+
value: string;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export interface AssetInt {
|
|
26
|
+
typeId: string;
|
|
27
|
+
name: string; // Only to display in the frontend, name is not stored in database
|
|
28
|
+
description: string; // description is stored in database
|
|
29
|
+
features: AssetFeature[];
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export interface SpaceInt {
|
|
33
|
+
type: string;
|
|
34
|
+
name: string;
|
|
35
|
+
assets: AssetInt[];
|
|
36
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export type Property = {
|
|
2
|
+
property_id: string;
|
|
3
|
+
address: string;
|
|
4
|
+
description: string;
|
|
5
|
+
pin: string;
|
|
6
|
+
name: string;
|
|
7
|
+
type: string;
|
|
8
|
+
status: string;
|
|
9
|
+
lastUpdated: string;
|
|
10
|
+
completionStatus: number;
|
|
11
|
+
totalFloorArea?: number;
|
|
12
|
+
spaces?: Space[];
|
|
13
|
+
images?: string[];
|
|
14
|
+
created_at: string;
|
|
15
|
+
splash_image?: string;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export type Space = {
|
|
19
|
+
space_id: string;
|
|
20
|
+
name: string;
|
|
21
|
+
type: string;
|
|
22
|
+
assets: Asset[];
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export type Asset = {
|
|
26
|
+
asset_id: string;
|
|
27
|
+
type: string;
|
|
28
|
+
description: string;
|
|
29
|
+
};
|
package/src/userTypes.ts
ADDED