@turndown/library 0.1.20 → 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.
@@ -0,0 +1,32 @@
1
+ import type { IImageWithUrl } from ".";
2
+ import type { ISuccessResponse } from "../base";
3
+ export interface IImageUserRouteParams {
4
+ userId: string;
5
+ }
6
+ export interface IImagePropertyRouteParams {
7
+ propertyId: string;
8
+ }
9
+ export interface IImageRoomRouteParams {
10
+ roomId: string;
11
+ }
12
+ export interface IImageCompanyRouteParams {
13
+ companyId: string;
14
+ }
15
+ export interface IImageRouteParams {
16
+ imageId: string;
17
+ }
18
+ export interface IUploadProfileImageRequest {
19
+ }
20
+ export interface IUploadProfileImageResponse {
21
+ image: IImageWithUrl;
22
+ }
23
+ export interface IUploadImagesResponse {
24
+ images: IImageWithUrl[];
25
+ }
26
+ export interface IGetImagesForEntityResponse {
27
+ images: IImageWithUrl[];
28
+ }
29
+ export interface IDeleteImageRequest extends IImageRouteParams {
30
+ }
31
+ export interface IDeleteImageResponse extends ISuccessResponse {
32
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -10,6 +10,8 @@ export * from "./checklist-template";
10
10
  export * from "./company";
11
11
  export * from "./damage-report";
12
12
  export * from "./errors";
13
+ export * from "./health";
14
+ export * from "./image";
13
15
  export * from "./inventory";
14
16
  export * from "./job";
15
17
  export * from "./property";
@@ -10,6 +10,8 @@ export * from "./checklist-template";
10
10
  export * from "./company";
11
11
  export * from "./damage-report";
12
12
  export * from "./errors";
13
+ export * from "./health";
14
+ export * from "./image";
13
15
  export * from "./inventory";
14
16
  export * from "./job";
15
17
  export * from "./property";
@@ -122,77 +122,3 @@ export interface IInventoryRestockOrderItem {
122
122
  totalCost?: number;
123
123
  createdAt: Date;
124
124
  }
125
- export interface IRoomInventory extends IMetaData {
126
- id: string;
127
- roomId: string;
128
- inventoryItemId: string;
129
- currentLevel: number;
130
- minimumLevel: number;
131
- maximumLevel?: number;
132
- parLevel?: number;
133
- lastRestockedAt?: Date;
134
- lastRestockedBy?: string;
135
- lastCheckedAt?: Date;
136
- lastCheckedBy?: string;
137
- autoReorder: boolean;
138
- locationNotes?: string;
139
- }
140
- export interface IPropertyInventory extends IMetaData {
141
- id: string;
142
- propertyId: string;
143
- inventoryItemId: string;
144
- currentLevel: number;
145
- minimumLevel: number;
146
- maximumLevel?: number;
147
- parLevel?: number;
148
- lastRestockedAt?: Date;
149
- lastRestockedBy?: string;
150
- lastCheckedAt?: Date;
151
- lastCheckedBy?: string;
152
- autoReorder: boolean;
153
- locationNotes?: string;
154
- }
155
- export interface IInventoryCount {
156
- id: string;
157
- checklistExecutionId: string;
158
- roomInventoryId: string;
159
- previousLevel: number;
160
- countedLevel: number;
161
- consumedAmount: number;
162
- restockedAmount: number;
163
- finalLevel: number;
164
- countedBy: string;
165
- countedAt: Date;
166
- needsRestock: boolean;
167
- notes?: string;
168
- createdAt: Date;
169
- }
170
- export interface IInventoryRestockOrder {
171
- id: string;
172
- companyId: string;
173
- orderNumber?: string;
174
- status: TInventoryRestockOrderStatus;
175
- totalItems?: number;
176
- totalCost?: number;
177
- orderedBy?: string;
178
- orderedAt?: Date;
179
- expectedDelivery?: Date;
180
- receivedBy?: string;
181
- receivedAt?: Date;
182
- supplierInfo?: string;
183
- notes?: string;
184
- createdAt: Date;
185
- updatedAt: Date;
186
- }
187
- export interface IInventoryRestockOrderItem {
188
- id: string;
189
- orderId: string;
190
- inventoryItemId: string;
191
- roomInventoryId?: string;
192
- propertyInventoryId?: string;
193
- quantityOrdered: number;
194
- quantityReceived: number;
195
- unitCost?: number;
196
- totalCost?: number;
197
- createdAt: Date;
198
- }
@@ -1,72 +1,109 @@
1
- export interface ICreateInventoryItemRequest {
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 ICreateInventoryItemResponse {
6
+ export interface IInventoryItemRouteParams {
7
+ itemId: string;
4
8
  }
5
- export interface IGetInventoryItemByIdRequest {
9
+ export interface IInventoryRoomRouteParams {
10
+ roomId: string;
6
11
  }
7
- export interface IGetInventoryItemByIdResponse {
12
+ export interface IInventoryPropertyRouteParams {
13
+ propertyId: string;
8
14
  }
9
- export interface IUpdateInventoryItemRequest {
15
+ export interface IInventoryExecutionRouteParams {
16
+ executionId: string;
10
17
  }
11
- export interface IUpdateInventoryItemResponse {
18
+ export interface IRoomInventoryIdParams {
19
+ roomInventoryId: string;
12
20
  }
13
- export interface IDeleteInventoryItemRequest {
21
+ export interface IInventoryOrderRouteParams {
22
+ orderId: string;
14
23
  }
15
- export interface IDeleteInventoryItemResponse {
24
+ export interface ICreateInventoryItemRequest extends Partial<IInventoryItem> {
25
+ companyId: string;
26
+ name: string;
16
27
  }
17
- export interface IGetInventoryByCompanyIdRequest {
28
+ export interface ICreateInventoryItemResponse extends IInventoryItem {
18
29
  }
19
- export interface IGetInventoryByCompanyIdResponse {
30
+ export interface IGetInventoryItemByIdRequest extends IInventoryItemRouteParams {
20
31
  }
21
- export interface IAddInventoryToPropertyRequest {
32
+ export interface IGetInventoryItemByIdResponse extends IInventoryItem {
22
33
  }
23
- export interface IAddInventoryToPropertyResponse {
34
+ export interface IUpdateInventoryItemRequest extends Partial<IInventoryItem> {
24
35
  }
25
- export interface IGetPropertyInventoryRequest {
36
+ export interface IUpdateInventoryItemResponse extends IInventoryItem {
26
37
  }
27
- export interface IGetPropertyInventoryResponse {
38
+ export interface IDeleteInventoryItemRequest extends IInventoryItemRouteParams {
28
39
  }
29
- export interface IGetPropertyInventoryNeedingRestockRequest {
40
+ export interface IDeleteInventoryItemResponse extends IMessageResponse {
30
41
  }
31
- export interface IGetPropertyInventoryNeedingRestockResponse {
42
+ export interface IGetInventoryByCompanyIdRequest extends IInventoryCompanyRouteParams {
32
43
  }
33
- export interface IAddInventoryToRoomRequest {
44
+ export type IGetInventoryByCompanyIdResponse = IInventoryItem[];
45
+ export interface IAddInventoryToPropertyRequest extends Partial<IPropertyInventory> {
46
+ propertyId: string;
47
+ inventoryItemId: string;
34
48
  }
35
- export interface IAddInventoryToRoomResponse {
49
+ export interface IAddInventoryToPropertyResponse extends IPropertyInventory {
36
50
  }
37
- export interface IGetRoomInventoryRequest {
51
+ export interface IGetPropertyInventoryRequest extends IInventoryPropertyRouteParams {
38
52
  }
39
- export interface IGetRoomInventoryResponse {
53
+ export type IGetPropertyInventoryResponse = IPropertyInventory[];
54
+ export interface IGetPropertyInventoryNeedingRestockRequest extends IInventoryPropertyRouteParams {
40
55
  }
41
- export interface IUpdateRoomInventoryRequest {
56
+ export type IGetPropertyInventoryNeedingRestockResponse = IPropertyInventory[];
57
+ export interface IAddInventoryToRoomRequest extends Partial<IRoomInventory> {
58
+ roomId: string;
59
+ inventoryItemId: string;
42
60
  }
43
- export interface IUpdateRoomInventoryResponse {
61
+ export interface IAddInventoryToRoomResponse extends IRoomInventory {
44
62
  }
45
- export interface IGetRoomInventoryNeedingRestockRequest {
63
+ export interface IGetRoomInventoryRequest extends IInventoryRoomRouteParams {
46
64
  }
47
- export interface IGetRoomInventoryNeedingRestockResponse {
65
+ export type IGetRoomInventoryResponse = IRoomInventory[];
66
+ export interface IUpdateRoomInventoryRequest extends Partial<IRoomInventory> {
48
67
  }
49
- export interface IRecordInventoryCountRequest {
68
+ export interface IUpdateRoomInventoryResponse extends IRoomInventory {
50
69
  }
51
- export interface IRecordInventoryCountResponse {
70
+ export interface IGetRoomInventoryNeedingRestockRequest extends IInventoryRoomRouteParams {
52
71
  }
53
- export interface IGetInventoryCountsByExecutionIdRequest {
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 IGetInventoryCountsByExecutionIdResponse {
79
+ export interface IRecordInventoryCountResponse extends IInventoryCount {
56
80
  }
57
- export interface ICreateRestockOrderRequest {
81
+ export interface IGetInventoryCountsByExecutionIdRequest extends IInventoryExecutionRouteParams {
58
82
  }
59
- export interface ICreateRestockOrderResponse {
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 IGetRestockOrdersByCompanyIdRequest {
91
+ export interface ICreateRestockOrderRequest extends Partial<IInventoryRestockOrder> {
92
+ companyId: string;
93
+ orderedBy: string;
94
+ items: IRestockOrderItemInput[];
62
95
  }
63
- export interface IGetRestockOrdersByCompanyIdResponse {
96
+ export interface ICreateRestockOrderResponse extends IInventoryRestockOrder {
64
97
  }
65
- export interface IGetRestockOrderItemsRequest {
98
+ export interface IGetRestockOrdersByCompanyIdRequest extends IInventoryCompanyRouteParams {
66
99
  }
67
- export interface IGetRestockOrderItemsResponse {
100
+ export type IGetRestockOrdersByCompanyIdResponse = IInventoryRestockOrder[];
101
+ export interface IGetRestockOrderItemsRequest extends IInventoryOrderRouteParams {
68
102
  }
103
+ export type IGetRestockOrderItemsResponse = IInventoryRestockOrderItem[];
69
104
  export interface IUpdateRestockOrderStatusRequest {
105
+ status: TInventoryRestockOrderStatus;
106
+ receivedBy?: string;
70
107
  }
71
- export interface IUpdateRestockOrderStatusResponse {
108
+ export interface IUpdateRestockOrderStatusResponse extends IInventoryRestockOrder {
72
109
  }
@@ -1,2 +1 @@
1
- // inventory.interfaces.ts
2
1
  export {};
@@ -1,12 +1,25 @@
1
- import type { IPropertyAccessInformation, IPropertyDetail, IPropertySummary } from ".";
1
+ import type { IProperty, IPropertyAccessInformation, IPropertyDetail, IPropertySummary } from ".";
2
+ import type { IMessageResponse } from "../base";
3
+ export interface IPropertyIdParams {
4
+ propertyId: string;
5
+ }
6
+ export interface ICompanyIdParams {
7
+ companyId: string;
8
+ }
2
9
  export interface ICreatePropertyRequest {
10
+ companyId: string;
3
11
  displayName: string;
4
12
  propertyType: string;
5
- status: string;
13
+ status?: string;
6
14
  addressLine1: string;
15
+ addressLine2?: string;
7
16
  city: string;
8
17
  stateCode: string;
9
18
  postalCode: string;
19
+ country?: string;
20
+ sqft?: number;
21
+ timezone?: string;
22
+ photoUrl?: string;
10
23
  specialNotes?: string;
11
24
  }
12
25
  export interface IUpdatePropertyRequest extends Partial<ICreatePropertyRequest> {
@@ -14,42 +27,28 @@ export interface IUpdatePropertyRequest extends Partial<ICreatePropertyRequest>
14
27
  export interface IGetPropertiesRequest {
15
28
  companyId?: string;
16
29
  }
17
- export interface IGetPropertyByIdRequest {
18
- id: string;
19
- }
20
- export interface IDeletePropertyRequest {
21
- id: string;
30
+ export interface IGetPropertyByIdRequest extends IPropertyIdParams {
22
31
  }
23
- export interface IGetPropertiesResponse {
24
- properties: IPropertySummary[];
32
+ export interface IDeletePropertyRequest extends IPropertyIdParams {
25
33
  }
26
- export interface IGetPropertyResponse {
27
- property: IPropertyDetail;
34
+ export type IGetPropertiesResponse = IPropertySummary[];
35
+ export interface IGetPropertyResponse extends IPropertyDetail {
28
36
  }
29
- export interface ICreatePropertyResponse {
30
- property: IPropertyDetail;
37
+ export interface ICreatePropertyResponse extends IPropertyDetail {
31
38
  }
32
- export interface IUpdatePropertyResponse {
33
- property: IPropertyDetail;
39
+ export interface IUpdatePropertyResponse extends IPropertyDetail {
34
40
  }
35
- export interface IDeletePropertyResponse {
36
- message?: string;
41
+ export interface IDeletePropertyResponse extends IMessageResponse {
37
42
  }
38
43
  export interface IUpdatePropertyAccessInformationRequest extends Partial<IPropertyAccessInformation> {
39
- propertyId: string;
40
- }
41
- export interface IUpdatePropertyAccessInformationResponse {
42
- propertyAccessInformation: IPropertyAccessInformation;
43
44
  }
44
- export interface IGetPropertyAccessInformationRequest {
45
- propertyId: string;
45
+ export interface IUpdatePropertyAccessInformationResponse extends IPropertyAccessInformation {
46
46
  }
47
- export interface IGetPropertyAccessInformationResponse {
48
- propertyAccessInformation: IPropertyAccessInformation | null;
47
+ export interface IGetPropertyAccessInformationRequest extends IPropertyIdParams {
49
48
  }
49
+ export type IGetPropertyAccessInformationResponse = IPropertyAccessInformation | null;
50
50
  export interface IGetPropertyByIdResponse extends IGetPropertyResponse {
51
51
  }
52
- export interface IGetPropertiesByCompanyIdRequest extends IGetPropertiesRequest {
53
- }
54
- export interface IGetPropertiesByCompanyIdResponse extends IGetPropertiesResponse {
52
+ export interface IGetPropertiesByCompanyIdRequest extends ICompanyIdParams {
55
53
  }
54
+ export type IGetPropertiesByCompanyIdResponse = IProperty[];
@@ -1,16 +1,35 @@
1
+ import type { IRoom } from ".";
2
+ import type { IMessageResponse } from "../base";
3
+ export interface IRoomPropertyRouteParams {
4
+ propertyId: string;
5
+ }
6
+ export interface IRoomRouteParams {
7
+ roomId: string;
8
+ }
1
9
  export interface ICreateRoomRequest {
10
+ propertyId: string;
11
+ displayName: string;
12
+ description?: string;
13
+ checklistTemplateId?: string;
14
+ }
15
+ export interface ICreateRoomResponse extends IRoom {
16
+ }
17
+ export interface IGetRoomsByPropertyIdRequest extends IRoomPropertyRouteParams {
2
18
  }
3
- export interface ICreateRoomResponse {
19
+ export type IGetRoomsByPropertyIdResponse = IRoom[];
20
+ export interface IGetDetailedRoomsByPropertyIdRequest extends IRoomPropertyRouteParams {
4
21
  }
5
- export interface IGetRoomsByPropertyIdRequest {
22
+ export type IGetDetailedRoomsByPropertyIdResponse = IRoom[];
23
+ export interface IGetRoomByIdRequest extends IRoomRouteParams {
6
24
  }
7
- export interface IGetRoomsByPropertyIdResponse {
25
+ export interface IGetRoomByIdResponse extends IRoom {
8
26
  }
9
- export interface IUpdateRoomRequest {
27
+ export interface IUpdateRoomRequest extends Partial<ICreateRoomRequest> {
28
+ displayName?: string;
10
29
  }
11
- export interface IUpdateRoomResponse {
30
+ export interface IUpdateRoomResponse extends IRoom {
12
31
  }
13
- export interface IDeleteRoomRequest {
32
+ export interface IDeleteRoomRequest extends IRoomRouteParams {
14
33
  }
15
- export interface IDeleteRoomResponse {
34
+ export interface IDeleteRoomResponse extends IMessageResponse {
16
35
  }
@@ -1,2 +1 @@
1
- // room.interfaces.ts
2
1
  export {};
@@ -1,56 +1,78 @@
1
- export interface ICreateChecklistRequest {
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 ICreateChecklistResponse {
6
+ export interface IChecklistIdParams {
7
+ checklistId: string;
8
+ }
9
+ export interface IChecklistAndItemIdParams {
10
+ checklistId: string;
11
+ itemId: string;
12
+ }
13
+ export interface ICreateChecklistRequest extends Omit<ICreateRoomChecklistInput, "roomId"> {
14
+ name: string;
15
+ }
16
+ export interface ICreateChecklistResponse extends IRoomChecklist {
4
17
  }
5
18
  export interface ICreateCustomChecklistRequest {
19
+ roomId: string;
20
+ name: string;
21
+ items: ICreateRoomChecklistItemInput[];
6
22
  }
7
- export interface ICreateCustomChecklistResponse {
23
+ export interface ICreateCustomChecklistResponse extends IRoomChecklistWithItems {
8
24
  }
9
- export interface IGetChecklistByRoomIdRequest {
25
+ export interface IGetChecklistByRoomIdRequest extends IRoomChecklistRoomRouteParams {
10
26
  }
11
- export interface IGetChecklistByRoomIdResponse {
27
+ export interface IGetChecklistByRoomIdResponse extends IRoomChecklist {
12
28
  }
13
- export interface IGetChecklistByIdRequest {
29
+ export interface IGetChecklistByIdRequest extends IChecklistIdParams {
14
30
  }
15
- export interface IGetChecklistByIdResponse {
31
+ export interface IGetChecklistByIdResponse extends IRoomChecklist {
16
32
  }
17
- export interface IGetChecklistWithItemsRequest {
33
+ export interface IGetChecklistWithItemsRequest extends IChecklistIdParams {
18
34
  }
19
- export interface IGetChecklistWithItemsResponse {
35
+ export interface IGetChecklistWithItemsResponse extends IRoomChecklistWithItems {
20
36
  }
21
- export interface IUpdateChecklistRequest {
37
+ export interface IUpdateChecklistRequest extends Partial<ICreateRoomChecklistInput> {
22
38
  }
23
- export interface IUpdateChecklistResponse {
39
+ export interface IUpdateChecklistResponse extends IRoomChecklist {
24
40
  }
25
- export interface IDeleteChecklistRequest {
41
+ export interface IDeleteChecklistRequest extends IChecklistIdParams {
26
42
  }
27
- export interface IDeleteChecklistResponse {
43
+ export interface IDeleteChecklistResponse extends IMessageResponse {
28
44
  }
29
45
  export interface ICloneChecklistRequest {
46
+ targetRoomId: string;
30
47
  }
31
- export interface ICloneChecklistResponse {
32
- }
33
- export interface IGetChecklistItemsRequest {
48
+ export interface ICloneChecklistResponse extends IRoomChecklistWithItems {
34
49
  }
35
- export interface IGetChecklistItemsResponse {
50
+ export interface IGetChecklistItemsRequest extends IChecklistIdParams {
36
51
  }
37
- export interface IGetCustomChecklistItemsRequest {
52
+ export type IGetChecklistItemsResponse = IRoomChecklistItem[];
53
+ export interface IGetCustomChecklistItemsRequest extends IChecklistIdParams {
38
54
  }
39
- export interface IGetCustomChecklistItemsResponse {
55
+ export type IGetCustomChecklistItemsResponse = IRoomChecklistItem[];
56
+ export interface IAddChecklistItemRequest extends ICreateRoomChecklistItemInput {
57
+ title: string;
58
+ displayOrder: number;
40
59
  }
41
- export interface IAddChecklistItemRequest {
60
+ export interface IAddChecklistItemResponse extends IRoomChecklistItem {
42
61
  }
43
- export interface IAddChecklistItemResponse {
62
+ export interface IUpdateChecklistItemRequest extends Partial<ICreateRoomChecklistItemInput> {
44
63
  }
45
- export interface IUpdateChecklistItemRequest {
64
+ export interface IUpdateChecklistItemResponse extends IRoomChecklistItem {
46
65
  }
47
- export interface IUpdateChecklistItemResponse {
66
+ export interface IDeleteChecklistItemRequest extends IChecklistAndItemIdParams {
48
67
  }
49
- export interface IDeleteChecklistItemRequest {
68
+ export interface IDeleteChecklistItemResponse extends IMessageResponse {
50
69
  }
51
- export interface IDeleteChecklistItemResponse {
70
+ export interface IChecklistItemOrder {
71
+ itemId: string;
72
+ displayOrder: number;
52
73
  }
53
74
  export interface IReorderChecklistItemsRequest {
75
+ itemOrders: IChecklistItemOrder[];
54
76
  }
55
- export interface IReorderChecklistItemsResponse {
77
+ export interface IReorderChecklistItemsResponse extends IMessageResponse {
56
78
  }
@@ -1,2 +1 @@
1
- // room-checklist.interfaces.ts
2
1
  export {};
@@ -1,4 +1,7 @@
1
- import { TLanguage, IUserSafe } from "..";
1
+ import type { TAccountType, TLanguage, IUserSafe } from ".";
2
+ export interface IUserIdParams {
3
+ id: string;
4
+ }
2
5
  export interface IGetUserResponse {
3
6
  user: IUserSafe | null;
4
7
  }
@@ -6,8 +9,7 @@ export interface IGetCurrentUserRequest {
6
9
  }
7
10
  export interface IGetCurrentUserResponse extends IGetUserResponse {
8
11
  }
9
- export interface IGetUserByIdRequest {
10
- userId: string;
12
+ export interface IGetUserByIdRequest extends IUserIdParams {
11
13
  }
12
14
  export interface IGetUserByIdResponse extends IGetUserResponse {
13
15
  }
@@ -16,6 +18,11 @@ export interface IGetUserByEmailRequest {
16
18
  }
17
19
  export interface IGetUserByEmailResponse extends IGetUserResponse {
18
20
  }
21
+ export interface IGetCleanersRequest {
22
+ }
23
+ export interface IGetCleanersResponse {
24
+ cleaners: IUserSafe[];
25
+ }
19
26
  export interface IUpdateUserRequest {
20
27
  firstName?: string;
21
28
  lastName?: string;
@@ -34,3 +41,6 @@ export interface IDeleteUserRequest {
34
41
  export interface IDeleteUserResponse {
35
42
  message: string;
36
43
  }
44
+ export interface IGetUsersByAccountTypeRequest {
45
+ accountType: TAccountType;
46
+ }
@@ -1,2 +1 @@
1
- // user.interfaces.ts
2
1
  export {};