@turndown/library 0.1.16 → 0.1.22
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 +76 -47
- package/dist/types/auth/routes.js +0 -1
- package/dist/types/base/index.d.ts +200 -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 +57 -28
- package/dist/types/checklist-template/routes.js +0 -1
- package/dist/types/company/index.d.ts +5 -5
- package/dist/types/company/routes.d.ts +81 -33
- package/dist/types/company/routes.js +0 -1
- package/dist/types/damage-report/index.d.ts +9 -9
- package/dist/types/damage-report/routes.d.ts +128 -51
- package/dist/types/damage-report/routes.js +0 -1
- package/dist/types/errors/index.d.ts +15 -16
- package/dist/types/errors/index.js +17 -7
- package/dist/types/health/index.d.ts +20 -0
- package/dist/types/health/index.js +1 -0
- package/dist/types/health/routes.d.ts +10 -0
- package/dist/types/health/routes.js +1 -0
- package/dist/types/image/index.d.ts +34 -0
- package/dist/types/image/index.js +11 -0
- package/dist/types/image/routes.d.ts +32 -0
- package/dist/types/image/routes.js +1 -0
- package/dist/types/index.d.ts +3 -0
- package/dist/types/index.js +3 -0
- package/dist/types/inventory/index.d.ts +13 -87
- package/dist/types/inventory/routes.d.ts +73 -36
- package/dist/types/inventory/routes.js +0 -1
- 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 +40 -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 +27 -8
- package/dist/types/room/routes.js +0 -1
- package/dist/types/room-checklist/index.d.ts +9 -9
- package/dist/types/room-checklist/routes.d.ts +50 -28
- package/dist/types/room-checklist/routes.js +0 -1
- package/dist/types/user/index.d.ts +12 -12
- package/dist/types/user/routes.d.ts +26 -16
- package/dist/types/user/routes.js +0 -1
- package/dist/types/work-session/index.d.ts +12 -12
- package/dist/types/work-session/routes.d.ts +55 -34
- package/dist/types/work-session/routes.js +0 -1
- package/package.json +14 -5
|
@@ -1,72 +1,109 @@
|
|
|
1
|
-
|
|
1
|
+
import type { IInventoryCount, IInventoryItem, IInventoryRestockOrder, IInventoryRestockOrderItem, IPropertyInventory, IRoomInventory, TInventoryRestockOrderStatus } from ".";
|
|
2
|
+
import type { IMessageResponse } from "../base";
|
|
3
|
+
export interface IInventoryCompanyRouteParams {
|
|
4
|
+
companyId: string;
|
|
2
5
|
}
|
|
3
|
-
export interface
|
|
6
|
+
export interface IInventoryItemRouteParams {
|
|
7
|
+
itemId: string;
|
|
4
8
|
}
|
|
5
|
-
export interface
|
|
9
|
+
export interface IInventoryRoomRouteParams {
|
|
10
|
+
roomId: string;
|
|
6
11
|
}
|
|
7
|
-
export interface
|
|
12
|
+
export interface IInventoryPropertyRouteParams {
|
|
13
|
+
propertyId: string;
|
|
8
14
|
}
|
|
9
|
-
export interface
|
|
15
|
+
export interface IInventoryExecutionRouteParams {
|
|
16
|
+
executionId: string;
|
|
10
17
|
}
|
|
11
|
-
export interface
|
|
18
|
+
export interface IRoomInventoryIdParams {
|
|
19
|
+
roomInventoryId: string;
|
|
12
20
|
}
|
|
13
|
-
export interface
|
|
21
|
+
export interface IInventoryOrderRouteParams {
|
|
22
|
+
orderId: string;
|
|
14
23
|
}
|
|
15
|
-
export interface
|
|
24
|
+
export interface ICreateInventoryItemRequest extends Partial<IInventoryItem> {
|
|
25
|
+
companyId: string;
|
|
26
|
+
name: string;
|
|
16
27
|
}
|
|
17
|
-
export interface
|
|
28
|
+
export interface ICreateInventoryItemResponse extends IInventoryItem {
|
|
18
29
|
}
|
|
19
|
-
export interface
|
|
30
|
+
export interface IGetInventoryItemByIdRequest extends IInventoryItemRouteParams {
|
|
20
31
|
}
|
|
21
|
-
export interface
|
|
32
|
+
export interface IGetInventoryItemByIdResponse extends IInventoryItem {
|
|
22
33
|
}
|
|
23
|
-
export interface
|
|
34
|
+
export interface IUpdateInventoryItemRequest extends Partial<IInventoryItem> {
|
|
24
35
|
}
|
|
25
|
-
export interface
|
|
36
|
+
export interface IUpdateInventoryItemResponse extends IInventoryItem {
|
|
26
37
|
}
|
|
27
|
-
export interface
|
|
38
|
+
export interface IDeleteInventoryItemRequest extends IInventoryItemRouteParams {
|
|
28
39
|
}
|
|
29
|
-
export interface
|
|
40
|
+
export interface IDeleteInventoryItemResponse extends IMessageResponse {
|
|
30
41
|
}
|
|
31
|
-
export interface
|
|
42
|
+
export interface IGetInventoryByCompanyIdRequest extends IInventoryCompanyRouteParams {
|
|
32
43
|
}
|
|
33
|
-
export
|
|
44
|
+
export type IGetInventoryByCompanyIdResponse = IInventoryItem[];
|
|
45
|
+
export interface IAddInventoryToPropertyRequest extends Partial<IPropertyInventory> {
|
|
46
|
+
propertyId: string;
|
|
47
|
+
inventoryItemId: string;
|
|
34
48
|
}
|
|
35
|
-
export interface
|
|
49
|
+
export interface IAddInventoryToPropertyResponse extends IPropertyInventory {
|
|
36
50
|
}
|
|
37
|
-
export interface
|
|
51
|
+
export interface IGetPropertyInventoryRequest extends IInventoryPropertyRouteParams {
|
|
38
52
|
}
|
|
39
|
-
export
|
|
53
|
+
export type IGetPropertyInventoryResponse = IPropertyInventory[];
|
|
54
|
+
export interface IGetPropertyInventoryNeedingRestockRequest extends IInventoryPropertyRouteParams {
|
|
40
55
|
}
|
|
41
|
-
export
|
|
56
|
+
export type IGetPropertyInventoryNeedingRestockResponse = IPropertyInventory[];
|
|
57
|
+
export interface IAddInventoryToRoomRequest extends Partial<IRoomInventory> {
|
|
58
|
+
roomId: string;
|
|
59
|
+
inventoryItemId: string;
|
|
42
60
|
}
|
|
43
|
-
export interface
|
|
61
|
+
export interface IAddInventoryToRoomResponse extends IRoomInventory {
|
|
44
62
|
}
|
|
45
|
-
export interface
|
|
63
|
+
export interface IGetRoomInventoryRequest extends IInventoryRoomRouteParams {
|
|
46
64
|
}
|
|
47
|
-
export
|
|
65
|
+
export type IGetRoomInventoryResponse = IRoomInventory[];
|
|
66
|
+
export interface IUpdateRoomInventoryRequest extends Partial<IRoomInventory> {
|
|
48
67
|
}
|
|
49
|
-
export interface
|
|
68
|
+
export interface IUpdateRoomInventoryResponse extends IRoomInventory {
|
|
50
69
|
}
|
|
51
|
-
export interface
|
|
70
|
+
export interface IGetRoomInventoryNeedingRestockRequest extends IInventoryRoomRouteParams {
|
|
52
71
|
}
|
|
53
|
-
export
|
|
72
|
+
export type IGetRoomInventoryNeedingRestockResponse = IRoomInventory[];
|
|
73
|
+
export interface IRecordInventoryCountRequest extends Partial<IInventoryCount> {
|
|
74
|
+
checklistExecutionId: string;
|
|
75
|
+
roomInventoryId: string;
|
|
76
|
+
countedLevel: number;
|
|
77
|
+
countedBy: string;
|
|
54
78
|
}
|
|
55
|
-
export interface
|
|
79
|
+
export interface IRecordInventoryCountResponse extends IInventoryCount {
|
|
56
80
|
}
|
|
57
|
-
export interface
|
|
81
|
+
export interface IGetInventoryCountsByExecutionIdRequest extends IInventoryExecutionRouteParams {
|
|
58
82
|
}
|
|
59
|
-
export
|
|
83
|
+
export type IGetInventoryCountsByExecutionIdResponse = IInventoryCount[];
|
|
84
|
+
export interface IRestockOrderItemInput {
|
|
85
|
+
inventoryItemId: string;
|
|
86
|
+
roomInventoryId?: string;
|
|
87
|
+
propertyInventoryId?: string;
|
|
88
|
+
quantityOrdered: number;
|
|
89
|
+
unitCost?: number;
|
|
60
90
|
}
|
|
61
|
-
export interface
|
|
91
|
+
export interface ICreateRestockOrderRequest extends Partial<IInventoryRestockOrder> {
|
|
92
|
+
companyId: string;
|
|
93
|
+
orderedBy: string;
|
|
94
|
+
items: IRestockOrderItemInput[];
|
|
62
95
|
}
|
|
63
|
-
export interface
|
|
96
|
+
export interface ICreateRestockOrderResponse extends IInventoryRestockOrder {
|
|
64
97
|
}
|
|
65
|
-
export interface
|
|
98
|
+
export interface IGetRestockOrdersByCompanyIdRequest extends IInventoryCompanyRouteParams {
|
|
66
99
|
}
|
|
67
|
-
export
|
|
100
|
+
export type IGetRestockOrdersByCompanyIdResponse = IInventoryRestockOrder[];
|
|
101
|
+
export interface IGetRestockOrderItemsRequest extends IInventoryOrderRouteParams {
|
|
68
102
|
}
|
|
69
|
-
export
|
|
103
|
+
export type IGetRestockOrderItemsResponse = IInventoryRestockOrderItem[];
|
|
104
|
+
export interface IUpdateRestockOrderStatusRequest {
|
|
105
|
+
status: TInventoryRestockOrderStatus;
|
|
106
|
+
receivedBy?: string;
|
|
70
107
|
}
|
|
71
|
-
export interface
|
|
108
|
+
export interface IUpdateRestockOrderStatusResponse extends IInventoryRestockOrder {
|
|
72
109
|
}
|
|
@@ -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,54 @@
|
|
|
1
|
-
|
|
1
|
+
import type { IProperty, IPropertyAccessInformation, IPropertyDetail, IPropertySummary } from ".";
|
|
2
|
+
import type { IMessageResponse } from "../base";
|
|
3
|
+
export interface IPropertyIdParams {
|
|
4
|
+
propertyId: string;
|
|
2
5
|
}
|
|
3
|
-
export interface
|
|
6
|
+
export interface ICompanyIdParams {
|
|
7
|
+
companyId: string;
|
|
4
8
|
}
|
|
5
|
-
export interface
|
|
9
|
+
export interface ICreatePropertyRequest {
|
|
10
|
+
companyId: string;
|
|
11
|
+
displayName: string;
|
|
12
|
+
propertyType: string;
|
|
13
|
+
status?: string;
|
|
14
|
+
addressLine1: string;
|
|
15
|
+
addressLine2?: string;
|
|
16
|
+
city: string;
|
|
17
|
+
stateCode: string;
|
|
18
|
+
postalCode: string;
|
|
19
|
+
country?: string;
|
|
20
|
+
sqft?: number;
|
|
21
|
+
timezone?: string;
|
|
22
|
+
photoUrl?: string;
|
|
23
|
+
specialNotes?: string;
|
|
6
24
|
}
|
|
7
|
-
export interface
|
|
25
|
+
export interface IUpdatePropertyRequest extends Partial<ICreatePropertyRequest> {
|
|
8
26
|
}
|
|
9
|
-
export interface
|
|
27
|
+
export interface IGetPropertiesRequest {
|
|
28
|
+
companyId?: string;
|
|
10
29
|
}
|
|
11
|
-
export interface
|
|
30
|
+
export interface IGetPropertyByIdRequest extends IPropertyIdParams {
|
|
12
31
|
}
|
|
13
|
-
export interface
|
|
32
|
+
export interface IDeletePropertyRequest extends IPropertyIdParams {
|
|
14
33
|
}
|
|
15
|
-
export
|
|
34
|
+
export type IGetPropertiesResponse = IPropertySummary[];
|
|
35
|
+
export interface IGetPropertyResponse extends IPropertyDetail {
|
|
16
36
|
}
|
|
17
|
-
export interface
|
|
37
|
+
export interface ICreatePropertyResponse extends IPropertyDetail {
|
|
18
38
|
}
|
|
19
|
-
export interface
|
|
39
|
+
export interface IUpdatePropertyResponse extends IPropertyDetail {
|
|
20
40
|
}
|
|
21
|
-
export interface
|
|
41
|
+
export interface IDeletePropertyResponse extends IMessageResponse {
|
|
22
42
|
}
|
|
23
|
-
export interface
|
|
43
|
+
export interface IUpdatePropertyAccessInformationRequest extends Partial<IPropertyAccessInformation> {
|
|
24
44
|
}
|
|
25
|
-
export interface
|
|
45
|
+
export interface IUpdatePropertyAccessInformationResponse extends IPropertyAccessInformation {
|
|
26
46
|
}
|
|
27
|
-
export interface
|
|
47
|
+
export interface IGetPropertyAccessInformationRequest extends IPropertyIdParams {
|
|
28
48
|
}
|
|
49
|
+
export type IGetPropertyAccessInformationResponse = IPropertyAccessInformation | null;
|
|
50
|
+
export interface IGetPropertyByIdResponse extends IGetPropertyResponse {
|
|
51
|
+
}
|
|
52
|
+
export interface IGetPropertiesByCompanyIdRequest extends ICompanyIdParams {
|
|
53
|
+
}
|
|
54
|
+
export type IGetPropertiesByCompanyIdResponse = IProperty[];
|
|
@@ -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,35 @@
|
|
|
1
|
-
|
|
1
|
+
import type { IRoom } from ".";
|
|
2
|
+
import type { IMessageResponse } from "../base";
|
|
3
|
+
export interface IRoomPropertyRouteParams {
|
|
4
|
+
propertyId: string;
|
|
2
5
|
}
|
|
3
|
-
export interface
|
|
6
|
+
export interface IRoomRouteParams {
|
|
7
|
+
roomId: string;
|
|
4
8
|
}
|
|
5
|
-
export interface
|
|
9
|
+
export interface ICreateRoomRequest {
|
|
10
|
+
propertyId: string;
|
|
11
|
+
displayName: string;
|
|
12
|
+
description?: string;
|
|
13
|
+
checklistTemplateId?: string;
|
|
6
14
|
}
|
|
7
|
-
export interface
|
|
15
|
+
export interface ICreateRoomResponse extends IRoom {
|
|
8
16
|
}
|
|
9
|
-
export interface
|
|
17
|
+
export interface IGetRoomsByPropertyIdRequest extends IRoomPropertyRouteParams {
|
|
10
18
|
}
|
|
11
|
-
export
|
|
19
|
+
export type IGetRoomsByPropertyIdResponse = IRoom[];
|
|
20
|
+
export interface IGetDetailedRoomsByPropertyIdRequest extends IRoomPropertyRouteParams {
|
|
12
21
|
}
|
|
13
|
-
export
|
|
22
|
+
export type IGetDetailedRoomsByPropertyIdResponse = IRoom[];
|
|
23
|
+
export interface IGetRoomByIdRequest extends IRoomRouteParams {
|
|
14
24
|
}
|
|
15
|
-
export interface
|
|
25
|
+
export interface IGetRoomByIdResponse extends IRoom {
|
|
26
|
+
}
|
|
27
|
+
export interface IUpdateRoomRequest extends Partial<ICreateRoomRequest> {
|
|
28
|
+
displayName?: string;
|
|
29
|
+
}
|
|
30
|
+
export interface IUpdateRoomResponse extends IRoom {
|
|
31
|
+
}
|
|
32
|
+
export interface IDeleteRoomRequest extends IRoomRouteParams {
|
|
33
|
+
}
|
|
34
|
+
export interface IDeleteRoomResponse extends IMessageResponse {
|
|
16
35
|
}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { IMetaData } from "../index";
|
|
2
|
+
import { IChecklistTemplateItem } from "../checklist-template";
|
|
3
3
|
export * from "./routes";
|
|
4
|
-
export interface
|
|
4
|
+
export interface IRoomChecklist extends IMetaData {
|
|
5
5
|
id: string;
|
|
6
6
|
roomId: string;
|
|
7
7
|
templateId?: string;
|
|
8
8
|
name: string;
|
|
9
9
|
isActive: boolean;
|
|
10
|
-
items:
|
|
10
|
+
items: IRoomChecklistItem[];
|
|
11
11
|
}
|
|
12
|
-
export interface
|
|
12
|
+
export interface IRoomChecklistItem extends IChecklistTemplateItem {
|
|
13
13
|
roomChecklistId: string;
|
|
14
14
|
templateItemId?: string;
|
|
15
15
|
isCustom: boolean;
|
|
@@ -17,13 +17,13 @@ export interface RoomChecklistItem extends ChecklistTemplateItem {
|
|
|
17
17
|
/**
|
|
18
18
|
* Room checklist with items
|
|
19
19
|
*/
|
|
20
|
-
export interface
|
|
21
|
-
items:
|
|
20
|
+
export interface IRoomChecklistWithItems extends IRoomChecklist {
|
|
21
|
+
items: IRoomChecklistItem[];
|
|
22
22
|
}
|
|
23
23
|
/**
|
|
24
24
|
* Input for creating a room checklist
|
|
25
25
|
*/
|
|
26
|
-
export interface
|
|
26
|
+
export interface ICreateRoomChecklistInput {
|
|
27
27
|
roomId: string;
|
|
28
28
|
templateId?: string;
|
|
29
29
|
name: string;
|
|
@@ -32,7 +32,7 @@ export interface CreateRoomChecklistInput {
|
|
|
32
32
|
/**
|
|
33
33
|
* Input for creating room checklist items
|
|
34
34
|
*/
|
|
35
|
-
export interface
|
|
35
|
+
export interface ICreateRoomChecklistItemInput {
|
|
36
36
|
title: string;
|
|
37
37
|
description?: string;
|
|
38
38
|
displayOrder: number;
|
|
@@ -1,56 +1,78 @@
|
|
|
1
|
-
|
|
1
|
+
import type { ICreateRoomChecklistInput, ICreateRoomChecklistItemInput, IRoomChecklist, IRoomChecklistItem, IRoomChecklistWithItems } from ".";
|
|
2
|
+
import type { IMessageResponse } from "../base";
|
|
3
|
+
export interface IRoomChecklistRoomRouteParams {
|
|
4
|
+
roomId: string;
|
|
2
5
|
}
|
|
3
|
-
export interface
|
|
6
|
+
export interface IChecklistIdParams {
|
|
7
|
+
checklistId: string;
|
|
4
8
|
}
|
|
5
|
-
export interface
|
|
9
|
+
export interface IChecklistAndItemIdParams {
|
|
10
|
+
checklistId: string;
|
|
11
|
+
itemId: string;
|
|
6
12
|
}
|
|
7
|
-
export interface
|
|
13
|
+
export interface ICreateChecklistRequest extends Omit<ICreateRoomChecklistInput, "roomId"> {
|
|
14
|
+
name: string;
|
|
8
15
|
}
|
|
9
|
-
export interface
|
|
16
|
+
export interface ICreateChecklistResponse extends IRoomChecklist {
|
|
10
17
|
}
|
|
11
|
-
export interface
|
|
18
|
+
export interface ICreateCustomChecklistRequest {
|
|
19
|
+
roomId: string;
|
|
20
|
+
name: string;
|
|
21
|
+
items: ICreateRoomChecklistItemInput[];
|
|
12
22
|
}
|
|
13
|
-
export interface
|
|
23
|
+
export interface ICreateCustomChecklistResponse extends IRoomChecklistWithItems {
|
|
14
24
|
}
|
|
15
|
-
export interface
|
|
25
|
+
export interface IGetChecklistByRoomIdRequest extends IRoomChecklistRoomRouteParams {
|
|
16
26
|
}
|
|
17
|
-
export interface
|
|
27
|
+
export interface IGetChecklistByRoomIdResponse extends IRoomChecklist {
|
|
18
28
|
}
|
|
19
|
-
export interface
|
|
29
|
+
export interface IGetChecklistByIdRequest extends IChecklistIdParams {
|
|
20
30
|
}
|
|
21
|
-
export interface
|
|
31
|
+
export interface IGetChecklistByIdResponse extends IRoomChecklist {
|
|
22
32
|
}
|
|
23
|
-
export interface
|
|
33
|
+
export interface IGetChecklistWithItemsRequest extends IChecklistIdParams {
|
|
24
34
|
}
|
|
25
|
-
export interface
|
|
35
|
+
export interface IGetChecklistWithItemsResponse extends IRoomChecklistWithItems {
|
|
26
36
|
}
|
|
27
|
-
export interface
|
|
37
|
+
export interface IUpdateChecklistRequest extends Partial<ICreateRoomChecklistInput> {
|
|
28
38
|
}
|
|
29
|
-
export interface
|
|
39
|
+
export interface IUpdateChecklistResponse extends IRoomChecklist {
|
|
30
40
|
}
|
|
31
|
-
export interface
|
|
41
|
+
export interface IDeleteChecklistRequest extends IChecklistIdParams {
|
|
32
42
|
}
|
|
33
|
-
export interface
|
|
43
|
+
export interface IDeleteChecklistResponse extends IMessageResponse {
|
|
34
44
|
}
|
|
35
|
-
export interface
|
|
45
|
+
export interface ICloneChecklistRequest {
|
|
46
|
+
targetRoomId: string;
|
|
36
47
|
}
|
|
37
|
-
export interface
|
|
48
|
+
export interface ICloneChecklistResponse extends IRoomChecklistWithItems {
|
|
38
49
|
}
|
|
39
|
-
export interface
|
|
50
|
+
export interface IGetChecklistItemsRequest extends IChecklistIdParams {
|
|
40
51
|
}
|
|
41
|
-
export
|
|
52
|
+
export type IGetChecklistItemsResponse = IRoomChecklistItem[];
|
|
53
|
+
export interface IGetCustomChecklistItemsRequest extends IChecklistIdParams {
|
|
42
54
|
}
|
|
43
|
-
export
|
|
55
|
+
export type IGetCustomChecklistItemsResponse = IRoomChecklistItem[];
|
|
56
|
+
export interface IAddChecklistItemRequest extends ICreateRoomChecklistItemInput {
|
|
57
|
+
title: string;
|
|
58
|
+
displayOrder: number;
|
|
44
59
|
}
|
|
45
|
-
export interface
|
|
60
|
+
export interface IAddChecklistItemResponse extends IRoomChecklistItem {
|
|
46
61
|
}
|
|
47
|
-
export interface
|
|
62
|
+
export interface IUpdateChecklistItemRequest extends Partial<ICreateRoomChecklistItemInput> {
|
|
48
63
|
}
|
|
49
|
-
export interface
|
|
64
|
+
export interface IUpdateChecklistItemResponse extends IRoomChecklistItem {
|
|
50
65
|
}
|
|
51
|
-
export interface
|
|
66
|
+
export interface IDeleteChecklistItemRequest extends IChecklistAndItemIdParams {
|
|
52
67
|
}
|
|
53
|
-
export interface
|
|
68
|
+
export interface IDeleteChecklistItemResponse extends IMessageResponse {
|
|
54
69
|
}
|
|
55
|
-
export interface
|
|
70
|
+
export interface IChecklistItemOrder {
|
|
71
|
+
itemId: string;
|
|
72
|
+
displayOrder: number;
|
|
73
|
+
}
|
|
74
|
+
export interface IReorderChecklistItemsRequest {
|
|
75
|
+
itemOrders: IChecklistItemOrder[];
|
|
76
|
+
}
|
|
77
|
+
export interface IReorderChecklistItemsResponse extends IMessageResponse {
|
|
56
78
|
}
|