@turndown/library 0.1.16 → 0.1.20
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/helpers/date/index.d.ts +113 -0
- package/dist/helpers/date/index.js +171 -0
- package/dist/helpers/index.d.ts +3 -1
- package/dist/helpers/index.js +2 -1
- package/dist/helpers/object/index.d.ts +160 -75
- package/dist/helpers/object/index.js +355 -168
- package/dist/helpers/string/index.d.ts +227 -74
- package/dist/helpers/string/index.js +448 -114
- package/dist/types/api/index.d.ts +22 -11
- package/dist/types/api/index.js +9 -2
- package/dist/types/auth/index.d.ts +56 -18
- package/dist/types/auth/index.js +7 -0
- package/dist/types/auth/routes.d.ts +52 -43
- package/dist/types/auth/routes.js +0 -1
- package/dist/types/base/index.d.ts +188 -69
- package/dist/types/base/index.js +116 -0
- package/dist/types/base/paging.types.d.ts +11 -11
- package/dist/types/checklist-template/index.d.ts +8 -8
- package/dist/types/checklist-template/routes.d.ts +28 -28
- package/dist/types/company/index.d.ts +5 -5
- package/dist/types/company/routes.d.ts +23 -23
- package/dist/types/damage-report/index.d.ts +9 -9
- package/dist/types/damage-report/routes.d.ts +38 -38
- package/dist/types/errors/index.d.ts +15 -16
- package/dist/types/errors/index.js +17 -7
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.js +1 -0
- package/dist/types/inventory/index.d.ts +19 -19
- package/dist/types/inventory/routes.d.ts +36 -36
- package/dist/types/job/index.d.ts +7 -0
- package/dist/types/job/index.js +1 -0
- package/dist/types/property/index.d.ts +88 -29
- package/dist/types/property/index.js +23 -23
- package/dist/types/property/routes.d.ts +41 -14
- package/dist/types/property/routes.js +0 -1
- package/dist/types/room/index.d.ts +4 -4
- package/dist/types/room/routes.d.ts +8 -8
- package/dist/types/room-checklist/index.d.ts +9 -9
- package/dist/types/room-checklist/routes.d.ts +28 -28
- package/dist/types/user/index.d.ts +12 -12
- package/dist/types/user/routes.d.ts +15 -15
- package/dist/types/work-session/index.d.ts +12 -12
- package/dist/types/work-session/routes.d.ts +34 -34
- package/package.json +13 -4
|
@@ -2,30 +2,40 @@
|
|
|
2
2
|
* Error Types
|
|
3
3
|
* Custom error types and validation error structures
|
|
4
4
|
*/
|
|
5
|
+
const isErrorLike = (error) => {
|
|
6
|
+
return typeof error === "object" && error !== null;
|
|
7
|
+
};
|
|
5
8
|
/**
|
|
6
9
|
* Type guard for ValidationError
|
|
7
10
|
*/
|
|
8
11
|
export function isValidationError(error) {
|
|
9
|
-
return error
|
|
12
|
+
return (isErrorLike(error) &&
|
|
13
|
+
error.code === "VALIDATION_ERROR" &&
|
|
14
|
+
Array.isArray(error.details));
|
|
10
15
|
}
|
|
11
16
|
/**
|
|
12
17
|
* Type guard for MissingFieldsError
|
|
13
18
|
*/
|
|
14
19
|
export function isMissingFieldsError(error) {
|
|
15
|
-
return (error
|
|
16
|
-
|
|
20
|
+
return (isErrorLike(error) &&
|
|
21
|
+
error.code === "MISSING_FIELDS" &&
|
|
22
|
+
typeof error.details === "object" &&
|
|
23
|
+
error.details !== null &&
|
|
24
|
+
"missingFields" in error.details &&
|
|
25
|
+
Array.isArray(error.details.missingFields));
|
|
17
26
|
}
|
|
18
27
|
/**
|
|
19
28
|
* Type guard for RateLimitError
|
|
20
29
|
*/
|
|
21
30
|
export function isRateLimitError(error) {
|
|
22
|
-
return error
|
|
31
|
+
return isErrorLike(error) && error.code === "RATE_LIMIT_EXCEEDED";
|
|
23
32
|
}
|
|
24
33
|
/**
|
|
25
34
|
* Type guard for authentication errors
|
|
26
35
|
*/
|
|
27
36
|
export function isAuthError(error) {
|
|
28
|
-
return (error
|
|
29
|
-
error
|
|
30
|
-
|
|
37
|
+
return (isErrorLike(error) &&
|
|
38
|
+
(error.code === "UNAUTHORIZED" ||
|
|
39
|
+
error.code === "INVALID_TOKEN" ||
|
|
40
|
+
error.code === "INVALID_CREDENTIALS"));
|
|
31
41
|
}
|
package/dist/types/index.d.ts
CHANGED
package/dist/types/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IMetaData, TRecordValue } from "../index";
|
|
2
2
|
export * from "./routes";
|
|
3
3
|
declare const INVENTORY_RESTOCK_ORDER_STATUS: {
|
|
4
4
|
readonly PENDING: "PENDING";
|
|
@@ -6,7 +6,7 @@ declare const INVENTORY_RESTOCK_ORDER_STATUS: {
|
|
|
6
6
|
readonly SHIPPED: "SHIPPED";
|
|
7
7
|
readonly RECEIVED: "RECEIVED";
|
|
8
8
|
};
|
|
9
|
-
export type
|
|
9
|
+
export type TInventoryRestockOrderStatus = TRecordValue<typeof INVENTORY_RESTOCK_ORDER_STATUS>;
|
|
10
10
|
export declare const INVENTORY_UNITS: {
|
|
11
11
|
COUNT: string;
|
|
12
12
|
ROLLS: string;
|
|
@@ -26,19 +26,19 @@ export declare const INVENTORY_UNITS: {
|
|
|
26
26
|
CARTONS: string;
|
|
27
27
|
OTHER: string;
|
|
28
28
|
};
|
|
29
|
-
export type
|
|
29
|
+
export type TInventoryUnitType = TRecordValue<typeof INVENTORY_UNITS>;
|
|
30
30
|
export declare const INVENTORY_ITEM_TYPE: {
|
|
31
31
|
readonly CONSUMABLE: "CONSUMABLE";
|
|
32
32
|
readonly FIXED: "FIXED";
|
|
33
33
|
};
|
|
34
|
-
export type
|
|
35
|
-
export interface
|
|
34
|
+
export type TInventoryItemType = TRecordValue<typeof INVENTORY_ITEM_TYPE>;
|
|
35
|
+
export interface IInventoryItem extends IMetaData {
|
|
36
36
|
id: string;
|
|
37
37
|
companyId: string;
|
|
38
38
|
name: string;
|
|
39
39
|
description?: string;
|
|
40
|
-
itemType:
|
|
41
|
-
unit:
|
|
40
|
+
itemType: TInventoryItemType;
|
|
41
|
+
unit: TInventoryUnitType;
|
|
42
42
|
unitCustom?: string;
|
|
43
43
|
minimumLevel: number;
|
|
44
44
|
reorderLevel: number;
|
|
@@ -48,7 +48,7 @@ export interface InventoryItem extends MetaData {
|
|
|
48
48
|
sku?: string;
|
|
49
49
|
barcode?: string;
|
|
50
50
|
}
|
|
51
|
-
export interface
|
|
51
|
+
export interface IRoomInventory extends IMetaData {
|
|
52
52
|
id: string;
|
|
53
53
|
roomId: string;
|
|
54
54
|
inventoryItemId: string;
|
|
@@ -63,7 +63,7 @@ export interface RoomInventory extends MetaData {
|
|
|
63
63
|
autoReorder: boolean;
|
|
64
64
|
locationNotes?: string;
|
|
65
65
|
}
|
|
66
|
-
export interface
|
|
66
|
+
export interface IPropertyInventory extends IMetaData {
|
|
67
67
|
id: string;
|
|
68
68
|
propertyId: string;
|
|
69
69
|
inventoryItemId: string;
|
|
@@ -78,7 +78,7 @@ export interface PropertyInventory extends MetaData {
|
|
|
78
78
|
autoReorder: boolean;
|
|
79
79
|
locationNotes?: string;
|
|
80
80
|
}
|
|
81
|
-
export interface
|
|
81
|
+
export interface IInventoryCount {
|
|
82
82
|
id: string;
|
|
83
83
|
checklistExecutionId: string;
|
|
84
84
|
roomInventoryId: string;
|
|
@@ -93,11 +93,11 @@ export interface InventoryCount {
|
|
|
93
93
|
notes?: string;
|
|
94
94
|
createdAt: Date;
|
|
95
95
|
}
|
|
96
|
-
export interface
|
|
96
|
+
export interface IInventoryRestockOrder {
|
|
97
97
|
id: string;
|
|
98
98
|
companyId: string;
|
|
99
99
|
orderNumber?: string;
|
|
100
|
-
status:
|
|
100
|
+
status: TInventoryRestockOrderStatus;
|
|
101
101
|
totalItems?: number;
|
|
102
102
|
totalCost?: number;
|
|
103
103
|
orderedBy?: string;
|
|
@@ -110,7 +110,7 @@ export interface InventoryRestockOrder {
|
|
|
110
110
|
createdAt: Date;
|
|
111
111
|
updatedAt: Date;
|
|
112
112
|
}
|
|
113
|
-
export interface
|
|
113
|
+
export interface IInventoryRestockOrderItem {
|
|
114
114
|
id: string;
|
|
115
115
|
orderId: string;
|
|
116
116
|
inventoryItemId: string;
|
|
@@ -122,7 +122,7 @@ export interface InventoryRestockOrderItem {
|
|
|
122
122
|
totalCost?: number;
|
|
123
123
|
createdAt: Date;
|
|
124
124
|
}
|
|
125
|
-
export interface
|
|
125
|
+
export interface IRoomInventory extends IMetaData {
|
|
126
126
|
id: string;
|
|
127
127
|
roomId: string;
|
|
128
128
|
inventoryItemId: string;
|
|
@@ -137,7 +137,7 @@ export interface RoomInventory extends MetaData {
|
|
|
137
137
|
autoReorder: boolean;
|
|
138
138
|
locationNotes?: string;
|
|
139
139
|
}
|
|
140
|
-
export interface
|
|
140
|
+
export interface IPropertyInventory extends IMetaData {
|
|
141
141
|
id: string;
|
|
142
142
|
propertyId: string;
|
|
143
143
|
inventoryItemId: string;
|
|
@@ -152,7 +152,7 @@ export interface PropertyInventory extends MetaData {
|
|
|
152
152
|
autoReorder: boolean;
|
|
153
153
|
locationNotes?: string;
|
|
154
154
|
}
|
|
155
|
-
export interface
|
|
155
|
+
export interface IInventoryCount {
|
|
156
156
|
id: string;
|
|
157
157
|
checklistExecutionId: string;
|
|
158
158
|
roomInventoryId: string;
|
|
@@ -167,11 +167,11 @@ export interface InventoryCount {
|
|
|
167
167
|
notes?: string;
|
|
168
168
|
createdAt: Date;
|
|
169
169
|
}
|
|
170
|
-
export interface
|
|
170
|
+
export interface IInventoryRestockOrder {
|
|
171
171
|
id: string;
|
|
172
172
|
companyId: string;
|
|
173
173
|
orderNumber?: string;
|
|
174
|
-
status:
|
|
174
|
+
status: TInventoryRestockOrderStatus;
|
|
175
175
|
totalItems?: number;
|
|
176
176
|
totalCost?: number;
|
|
177
177
|
orderedBy?: string;
|
|
@@ -184,7 +184,7 @@ export interface InventoryRestockOrder {
|
|
|
184
184
|
createdAt: Date;
|
|
185
185
|
updatedAt: Date;
|
|
186
186
|
}
|
|
187
|
-
export interface
|
|
187
|
+
export interface IInventoryRestockOrderItem {
|
|
188
188
|
id: string;
|
|
189
189
|
orderId: string;
|
|
190
190
|
inventoryItemId: string;
|
|
@@ -1,72 +1,72 @@
|
|
|
1
|
-
export interface
|
|
1
|
+
export interface ICreateInventoryItemRequest {
|
|
2
2
|
}
|
|
3
|
-
export interface
|
|
3
|
+
export interface ICreateInventoryItemResponse {
|
|
4
4
|
}
|
|
5
|
-
export interface
|
|
5
|
+
export interface IGetInventoryItemByIdRequest {
|
|
6
6
|
}
|
|
7
|
-
export interface
|
|
7
|
+
export interface IGetInventoryItemByIdResponse {
|
|
8
8
|
}
|
|
9
|
-
export interface
|
|
9
|
+
export interface IUpdateInventoryItemRequest {
|
|
10
10
|
}
|
|
11
|
-
export interface
|
|
11
|
+
export interface IUpdateInventoryItemResponse {
|
|
12
12
|
}
|
|
13
|
-
export interface
|
|
13
|
+
export interface IDeleteInventoryItemRequest {
|
|
14
14
|
}
|
|
15
|
-
export interface
|
|
15
|
+
export interface IDeleteInventoryItemResponse {
|
|
16
16
|
}
|
|
17
|
-
export interface
|
|
17
|
+
export interface IGetInventoryByCompanyIdRequest {
|
|
18
18
|
}
|
|
19
|
-
export interface
|
|
19
|
+
export interface IGetInventoryByCompanyIdResponse {
|
|
20
20
|
}
|
|
21
|
-
export interface
|
|
21
|
+
export interface IAddInventoryToPropertyRequest {
|
|
22
22
|
}
|
|
23
|
-
export interface
|
|
23
|
+
export interface IAddInventoryToPropertyResponse {
|
|
24
24
|
}
|
|
25
|
-
export interface
|
|
25
|
+
export interface IGetPropertyInventoryRequest {
|
|
26
26
|
}
|
|
27
|
-
export interface
|
|
27
|
+
export interface IGetPropertyInventoryResponse {
|
|
28
28
|
}
|
|
29
|
-
export interface
|
|
29
|
+
export interface IGetPropertyInventoryNeedingRestockRequest {
|
|
30
30
|
}
|
|
31
|
-
export interface
|
|
31
|
+
export interface IGetPropertyInventoryNeedingRestockResponse {
|
|
32
32
|
}
|
|
33
|
-
export interface
|
|
33
|
+
export interface IAddInventoryToRoomRequest {
|
|
34
34
|
}
|
|
35
|
-
export interface
|
|
35
|
+
export interface IAddInventoryToRoomResponse {
|
|
36
36
|
}
|
|
37
|
-
export interface
|
|
37
|
+
export interface IGetRoomInventoryRequest {
|
|
38
38
|
}
|
|
39
|
-
export interface
|
|
39
|
+
export interface IGetRoomInventoryResponse {
|
|
40
40
|
}
|
|
41
|
-
export interface
|
|
41
|
+
export interface IUpdateRoomInventoryRequest {
|
|
42
42
|
}
|
|
43
|
-
export interface
|
|
43
|
+
export interface IUpdateRoomInventoryResponse {
|
|
44
44
|
}
|
|
45
|
-
export interface
|
|
45
|
+
export interface IGetRoomInventoryNeedingRestockRequest {
|
|
46
46
|
}
|
|
47
|
-
export interface
|
|
47
|
+
export interface IGetRoomInventoryNeedingRestockResponse {
|
|
48
48
|
}
|
|
49
|
-
export interface
|
|
49
|
+
export interface IRecordInventoryCountRequest {
|
|
50
50
|
}
|
|
51
|
-
export interface
|
|
51
|
+
export interface IRecordInventoryCountResponse {
|
|
52
52
|
}
|
|
53
|
-
export interface
|
|
53
|
+
export interface IGetInventoryCountsByExecutionIdRequest {
|
|
54
54
|
}
|
|
55
|
-
export interface
|
|
55
|
+
export interface IGetInventoryCountsByExecutionIdResponse {
|
|
56
56
|
}
|
|
57
|
-
export interface
|
|
57
|
+
export interface ICreateRestockOrderRequest {
|
|
58
58
|
}
|
|
59
|
-
export interface
|
|
59
|
+
export interface ICreateRestockOrderResponse {
|
|
60
60
|
}
|
|
61
|
-
export interface
|
|
61
|
+
export interface IGetRestockOrdersByCompanyIdRequest {
|
|
62
62
|
}
|
|
63
|
-
export interface
|
|
63
|
+
export interface IGetRestockOrdersByCompanyIdResponse {
|
|
64
64
|
}
|
|
65
|
-
export interface
|
|
65
|
+
export interface IGetRestockOrderItemsRequest {
|
|
66
66
|
}
|
|
67
|
-
export interface
|
|
67
|
+
export interface IGetRestockOrderItemsResponse {
|
|
68
68
|
}
|
|
69
|
-
export interface
|
|
69
|
+
export interface IUpdateRestockOrderStatusRequest {
|
|
70
70
|
}
|
|
71
|
-
export interface
|
|
71
|
+
export interface IUpdateRestockOrderStatusResponse {
|
|
72
72
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,47 +1,33 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ISelectOption, IMetaData, TRecordValue, TStatus, TUnitedStatesStateCode } from "../index";
|
|
2
2
|
export * from "./routes";
|
|
3
|
-
declare const
|
|
4
|
-
readonly
|
|
5
|
-
readonly
|
|
6
|
-
readonly CONDO: "Condo";
|
|
7
|
-
readonly TOWNHOUSE: "Townhouse";
|
|
8
|
-
readonly VILLA: "Villa";
|
|
9
|
-
readonly CABIN: "Cabin";
|
|
10
|
-
readonly COTTAGE: "Cottage";
|
|
11
|
-
readonly BUNGALOW: "Bungalow";
|
|
12
|
-
readonly FARMHOUSE: "Farmhouse";
|
|
13
|
-
readonly RANCH: "Ranch";
|
|
14
|
-
readonly LOFT: "Loft";
|
|
15
|
-
readonly STUDIO: "Studio";
|
|
16
|
-
readonly DUPLEX: "Duplex";
|
|
17
|
-
readonly TRIPLEX: "Triplex";
|
|
18
|
-
readonly PENTHOUSE: "Penthouse";
|
|
19
|
-
readonly CHALET: "Chalet";
|
|
20
|
-
readonly CASTLE: "Castle";
|
|
21
|
-
readonly BEACH_HOUSE: "Beach House";
|
|
22
|
-
readonly HOUSEBOAT: "Houseboat";
|
|
23
|
-
readonly YURT: "Yurt";
|
|
24
|
-
readonly TREEHOUSE: "Treehouse";
|
|
25
|
-
readonly OTHER: "Other";
|
|
3
|
+
export declare const PROPERTY_STATUS: {
|
|
4
|
+
readonly Active: "Active";
|
|
5
|
+
readonly Inactive: "Inactive";
|
|
26
6
|
};
|
|
27
|
-
export type
|
|
28
|
-
export
|
|
7
|
+
export type TPropertyStatus = TRecordValue<typeof PROPERTY_STATUS>;
|
|
8
|
+
export declare const PropertyStatusOptions: ISelectOption<TPropertyStatus>[];
|
|
9
|
+
export declare const PROPERTY_TYPES: readonly ["Apartment", "Commercial", "Condo", "House"];
|
|
10
|
+
export type TPropertyType = (typeof PROPERTY_TYPES)[number];
|
|
11
|
+
export declare const PropertyTypeOptions: ISelectOption<TPropertyType>[];
|
|
12
|
+
export interface IProperty extends IMetaData {
|
|
29
13
|
id: string;
|
|
30
14
|
displayName: string;
|
|
31
15
|
addressLine1?: string;
|
|
32
16
|
addressLine2?: string;
|
|
33
17
|
city?: string;
|
|
34
|
-
stateCode?:
|
|
35
|
-
propertyType?:
|
|
18
|
+
stateCode?: TUnitedStatesStateCode | string;
|
|
19
|
+
propertyType?: TPropertyType;
|
|
20
|
+
status?: TPropertyStatus;
|
|
36
21
|
sqft?: number;
|
|
37
22
|
postalCode?: string;
|
|
38
23
|
country?: string;
|
|
39
24
|
timezone?: string;
|
|
25
|
+
imageUrl?: string;
|
|
40
26
|
photoUrl?: string;
|
|
41
27
|
companyId: string;
|
|
42
28
|
specialNotes?: string;
|
|
43
29
|
}
|
|
44
|
-
export interface
|
|
30
|
+
export interface IPropertyAccessInformation {
|
|
45
31
|
propertyId: string;
|
|
46
32
|
entryInstructions?: string;
|
|
47
33
|
accessCode?: string;
|
|
@@ -51,3 +37,76 @@ export interface PropertyAccessInformation {
|
|
|
51
37
|
parkingInfo?: string;
|
|
52
38
|
specialNotes?: string;
|
|
53
39
|
}
|
|
40
|
+
export interface IPropertyBase {
|
|
41
|
+
id: string;
|
|
42
|
+
name: string;
|
|
43
|
+
address?: string;
|
|
44
|
+
propertyType?: string;
|
|
45
|
+
imageUrl?: string;
|
|
46
|
+
status?: TPropertyStatus;
|
|
47
|
+
}
|
|
48
|
+
export interface IPropertyMetric {
|
|
49
|
+
id: string;
|
|
50
|
+
label: string;
|
|
51
|
+
value: string | number;
|
|
52
|
+
iconName?: string;
|
|
53
|
+
}
|
|
54
|
+
export interface IPropertyAccessItem {
|
|
55
|
+
id: string;
|
|
56
|
+
label: string;
|
|
57
|
+
value?: string;
|
|
58
|
+
iconName?: string;
|
|
59
|
+
}
|
|
60
|
+
export interface IPropertyRoomSummaryItem {
|
|
61
|
+
id: string;
|
|
62
|
+
name: string;
|
|
63
|
+
roomType?: string;
|
|
64
|
+
imageUrl?: string;
|
|
65
|
+
checklistCount?: number;
|
|
66
|
+
inventoryCount?: number;
|
|
67
|
+
}
|
|
68
|
+
export interface IPropertyJobSummaryItem {
|
|
69
|
+
id: string;
|
|
70
|
+
title: string;
|
|
71
|
+
description?: string;
|
|
72
|
+
status?: TStatus;
|
|
73
|
+
}
|
|
74
|
+
export interface IPropertyFormValues {
|
|
75
|
+
displayName: string;
|
|
76
|
+
propertyType: string;
|
|
77
|
+
status: string;
|
|
78
|
+
addressLine1: string;
|
|
79
|
+
city: string;
|
|
80
|
+
stateCode: string;
|
|
81
|
+
postalCode: string;
|
|
82
|
+
specialNotes: string;
|
|
83
|
+
}
|
|
84
|
+
export interface IPropertyAccessFormValues {
|
|
85
|
+
entryInstructions: string;
|
|
86
|
+
accessCode: string;
|
|
87
|
+
wifiName: string;
|
|
88
|
+
wifiPassword: string;
|
|
89
|
+
parkingInfo: string;
|
|
90
|
+
specialNotes: string;
|
|
91
|
+
}
|
|
92
|
+
export interface IPropertyFilterValues {
|
|
93
|
+
status: string;
|
|
94
|
+
propertyType: TPropertyType;
|
|
95
|
+
}
|
|
96
|
+
export interface IPropertySummary {
|
|
97
|
+
id: string;
|
|
98
|
+
displayName: string;
|
|
99
|
+
propertyType: TPropertyType;
|
|
100
|
+
addressLine1?: string;
|
|
101
|
+
city?: string;
|
|
102
|
+
stateCode?: string;
|
|
103
|
+
postalCode?: string;
|
|
104
|
+
imageUrl?: string;
|
|
105
|
+
status?: string;
|
|
106
|
+
}
|
|
107
|
+
export interface IPropertyDetail extends IPropertySummary {
|
|
108
|
+
specialNotes?: string;
|
|
109
|
+
roomCount?: number;
|
|
110
|
+
createdAt?: string;
|
|
111
|
+
updatedAt?: string;
|
|
112
|
+
}
|
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
export * from "./routes";
|
|
2
|
-
const
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
CONDO: "Condo",
|
|
6
|
-
TOWNHOUSE: "Townhouse",
|
|
7
|
-
VILLA: "Villa",
|
|
8
|
-
CABIN: "Cabin",
|
|
9
|
-
COTTAGE: "Cottage",
|
|
10
|
-
BUNGALOW: "Bungalow",
|
|
11
|
-
FARMHOUSE: "Farmhouse",
|
|
12
|
-
RANCH: "Ranch",
|
|
13
|
-
LOFT: "Loft",
|
|
14
|
-
STUDIO: "Studio",
|
|
15
|
-
DUPLEX: "Duplex",
|
|
16
|
-
TRIPLEX: "Triplex",
|
|
17
|
-
PENTHOUSE: "Penthouse",
|
|
18
|
-
CHALET: "Chalet",
|
|
19
|
-
CASTLE: "Castle",
|
|
20
|
-
BEACH_HOUSE: "Beach House",
|
|
21
|
-
HOUSEBOAT: "Houseboat",
|
|
22
|
-
YURT: "Yurt",
|
|
23
|
-
TREEHOUSE: "Treehouse",
|
|
24
|
-
OTHER: "Other",
|
|
2
|
+
export const PROPERTY_STATUS = {
|
|
3
|
+
Active: "Active",
|
|
4
|
+
Inactive: "Inactive",
|
|
25
5
|
};
|
|
6
|
+
export const PropertyStatusOptions = [
|
|
7
|
+
{
|
|
8
|
+
label: "Active",
|
|
9
|
+
value: PROPERTY_STATUS.Active,
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
label: "Inactive",
|
|
13
|
+
value: PROPERTY_STATUS.Inactive,
|
|
14
|
+
},
|
|
15
|
+
];
|
|
16
|
+
export const PROPERTY_TYPES = [
|
|
17
|
+
"Apartment",
|
|
18
|
+
"Commercial",
|
|
19
|
+
"Condo",
|
|
20
|
+
"House",
|
|
21
|
+
];
|
|
22
|
+
export const PropertyTypeOptions = PROPERTY_TYPES.map((propertyType) => ({
|
|
23
|
+
label: propertyType,
|
|
24
|
+
value: propertyType,
|
|
25
|
+
}));
|
|
@@ -1,28 +1,55 @@
|
|
|
1
|
-
|
|
1
|
+
import type { IPropertyAccessInformation, IPropertyDetail, IPropertySummary } from ".";
|
|
2
|
+
export interface ICreatePropertyRequest {
|
|
3
|
+
displayName: string;
|
|
4
|
+
propertyType: string;
|
|
5
|
+
status: string;
|
|
6
|
+
addressLine1: string;
|
|
7
|
+
city: string;
|
|
8
|
+
stateCode: string;
|
|
9
|
+
postalCode: string;
|
|
10
|
+
specialNotes?: string;
|
|
2
11
|
}
|
|
3
|
-
export interface
|
|
12
|
+
export interface IUpdatePropertyRequest extends Partial<ICreatePropertyRequest> {
|
|
4
13
|
}
|
|
5
|
-
export interface
|
|
14
|
+
export interface IGetPropertiesRequest {
|
|
15
|
+
companyId?: string;
|
|
6
16
|
}
|
|
7
|
-
export interface
|
|
17
|
+
export interface IGetPropertyByIdRequest {
|
|
18
|
+
id: string;
|
|
8
19
|
}
|
|
9
|
-
export interface
|
|
20
|
+
export interface IDeletePropertyRequest {
|
|
21
|
+
id: string;
|
|
10
22
|
}
|
|
11
|
-
export interface
|
|
23
|
+
export interface IGetPropertiesResponse {
|
|
24
|
+
properties: IPropertySummary[];
|
|
12
25
|
}
|
|
13
|
-
export interface
|
|
26
|
+
export interface IGetPropertyResponse {
|
|
27
|
+
property: IPropertyDetail;
|
|
14
28
|
}
|
|
15
|
-
export interface
|
|
29
|
+
export interface ICreatePropertyResponse {
|
|
30
|
+
property: IPropertyDetail;
|
|
16
31
|
}
|
|
17
|
-
export interface
|
|
32
|
+
export interface IUpdatePropertyResponse {
|
|
33
|
+
property: IPropertyDetail;
|
|
18
34
|
}
|
|
19
|
-
export interface
|
|
35
|
+
export interface IDeletePropertyResponse {
|
|
36
|
+
message?: string;
|
|
20
37
|
}
|
|
21
|
-
export interface
|
|
38
|
+
export interface IUpdatePropertyAccessInformationRequest extends Partial<IPropertyAccessInformation> {
|
|
39
|
+
propertyId: string;
|
|
22
40
|
}
|
|
23
|
-
export interface
|
|
41
|
+
export interface IUpdatePropertyAccessInformationResponse {
|
|
42
|
+
propertyAccessInformation: IPropertyAccessInformation;
|
|
24
43
|
}
|
|
25
|
-
export interface
|
|
44
|
+
export interface IGetPropertyAccessInformationRequest {
|
|
45
|
+
propertyId: string;
|
|
26
46
|
}
|
|
27
|
-
export interface
|
|
47
|
+
export interface IGetPropertyAccessInformationResponse {
|
|
48
|
+
propertyAccessInformation: IPropertyAccessInformation | null;
|
|
49
|
+
}
|
|
50
|
+
export interface IGetPropertyByIdResponse extends IGetPropertyResponse {
|
|
51
|
+
}
|
|
52
|
+
export interface IGetPropertiesByCompanyIdRequest extends IGetPropertiesRequest {
|
|
53
|
+
}
|
|
54
|
+
export interface IGetPropertiesByCompanyIdResponse extends IGetPropertiesResponse {
|
|
28
55
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IMetaData, TRecordValue } from "../index";
|
|
2
2
|
export * from "./routes";
|
|
3
3
|
declare const ROOM_TYPE: {
|
|
4
4
|
BEDROOM: string;
|
|
@@ -16,12 +16,12 @@ declare const ROOM_TYPE: {
|
|
|
16
16
|
GARDEN: string;
|
|
17
17
|
OTHER: string;
|
|
18
18
|
};
|
|
19
|
-
export type
|
|
20
|
-
export interface
|
|
19
|
+
export type TRoomType = TRecordValue<typeof ROOM_TYPE>;
|
|
20
|
+
export interface IRoom extends IMetaData {
|
|
21
21
|
id: string;
|
|
22
22
|
displayName: string;
|
|
23
23
|
checklistTemplateId?: string;
|
|
24
|
-
roomType?:
|
|
24
|
+
roomType?: TRoomType;
|
|
25
25
|
heroPhoto?: string;
|
|
26
26
|
propertyId: string;
|
|
27
27
|
description?: string;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
export interface
|
|
1
|
+
export interface ICreateRoomRequest {
|
|
2
2
|
}
|
|
3
|
-
export interface
|
|
3
|
+
export interface ICreateRoomResponse {
|
|
4
4
|
}
|
|
5
|
-
export interface
|
|
5
|
+
export interface IGetRoomsByPropertyIdRequest {
|
|
6
6
|
}
|
|
7
|
-
export interface
|
|
7
|
+
export interface IGetRoomsByPropertyIdResponse {
|
|
8
8
|
}
|
|
9
|
-
export interface
|
|
9
|
+
export interface IUpdateRoomRequest {
|
|
10
10
|
}
|
|
11
|
-
export interface
|
|
11
|
+
export interface IUpdateRoomResponse {
|
|
12
12
|
}
|
|
13
|
-
export interface
|
|
13
|
+
export interface IDeleteRoomRequest {
|
|
14
14
|
}
|
|
15
|
-
export interface
|
|
15
|
+
export interface IDeleteRoomResponse {
|
|
16
16
|
}
|