@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.
- package/dist/types/auth/routes.d.ts +27 -7
- package/dist/types/base/index.d.ts +12 -0
- package/dist/types/checklist-template/routes.d.ts +55 -26
- package/dist/types/checklist-template/routes.js +0 -1
- package/dist/types/company/routes.d.ts +77 -29
- package/dist/types/company/routes.js +0 -1
- package/dist/types/damage-report/index.d.ts +2 -2
- package/dist/types/damage-report/routes.d.ts +122 -45
- package/dist/types/damage-report/routes.js +0 -1
- 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 +2 -0
- package/dist/types/index.js +2 -0
- package/dist/types/inventory/index.d.ts +0 -74
- package/dist/types/inventory/routes.d.ts +72 -35
- package/dist/types/inventory/routes.js +0 -1
- package/dist/types/property/routes.d.ts +27 -28
- package/dist/types/room/routes.d.ts +26 -7
- package/dist/types/room/routes.js +0 -1
- package/dist/types/room-checklist/routes.d.ts +48 -26
- package/dist/types/room-checklist/routes.js +0 -1
- package/dist/types/user/routes.d.ts +13 -3
- package/dist/types/user/routes.js +0 -1
- package/dist/types/work-session/routes.d.ts +53 -32
- package/dist/types/work-session/routes.js +0 -1
- package/package.json +2 -2
|
@@ -1,6 +1,15 @@
|
|
|
1
1
|
import type { IAuthTokenResponse } from "..";
|
|
2
2
|
import type { TAccountType, IDeviceInfo, IUserSafe } from "../user";
|
|
3
3
|
import type { IGetUserResponse } from "../user/routes";
|
|
4
|
+
export interface IAuthSessionIdParams {
|
|
5
|
+
sessionId: string;
|
|
6
|
+
}
|
|
7
|
+
export interface IAuthInvitationTokenParams {
|
|
8
|
+
token: string;
|
|
9
|
+
}
|
|
10
|
+
export interface IAuthInvitationIdParams {
|
|
11
|
+
invitationId: string;
|
|
12
|
+
}
|
|
4
13
|
export interface IRegisterRequest {
|
|
5
14
|
email: string;
|
|
6
15
|
password: string;
|
|
@@ -31,7 +40,7 @@ export interface IRefreshSessionResponse {
|
|
|
31
40
|
companyId?: string;
|
|
32
41
|
}
|
|
33
42
|
export interface ILogoutRequest {
|
|
34
|
-
refreshToken
|
|
43
|
+
refreshToken?: string;
|
|
35
44
|
}
|
|
36
45
|
export interface ILogoutResponse {
|
|
37
46
|
message: string;
|
|
@@ -55,7 +64,7 @@ export interface IGetSessionsResponse {
|
|
|
55
64
|
createdAt: string;
|
|
56
65
|
lastUsedAt: string;
|
|
57
66
|
}
|
|
58
|
-
export interface IRevokeSessionRequest {
|
|
67
|
+
export interface IRevokeSessionRequest extends IAuthSessionIdParams {
|
|
59
68
|
}
|
|
60
69
|
export interface IRevokeSessionResponse {
|
|
61
70
|
message: string;
|
|
@@ -83,7 +92,11 @@ export interface IGetLoginHistoryResponse {
|
|
|
83
92
|
failureReason?: string;
|
|
84
93
|
createdAt: Date;
|
|
85
94
|
}
|
|
86
|
-
export interface
|
|
95
|
+
export interface IGetLoginHistoryListResponse {
|
|
96
|
+
history: IGetLoginHistoryResponse[];
|
|
97
|
+
length: number;
|
|
98
|
+
}
|
|
99
|
+
export interface IValidateInvitationRequest extends IAuthInvitationTokenParams {
|
|
87
100
|
}
|
|
88
101
|
export interface IValidateInvitationResponse {
|
|
89
102
|
id: string;
|
|
@@ -106,7 +119,7 @@ export interface IRegisterWithInvitationRequest {
|
|
|
106
119
|
export interface IRegisterWithInvitationResponse extends IAuthTokenResponse {
|
|
107
120
|
}
|
|
108
121
|
export interface IAcceptInvitationRequest {
|
|
109
|
-
userId
|
|
122
|
+
userId?: string;
|
|
110
123
|
token: string;
|
|
111
124
|
}
|
|
112
125
|
export interface IAcceptInvitationResponse {
|
|
@@ -114,6 +127,10 @@ export interface IAcceptInvitationResponse {
|
|
|
114
127
|
companyName: string;
|
|
115
128
|
role: TAccountType;
|
|
116
129
|
}
|
|
130
|
+
export interface IAcceptInvitationRouteResponse {
|
|
131
|
+
invite: IAcceptInvitationResponse;
|
|
132
|
+
message: string;
|
|
133
|
+
}
|
|
117
134
|
export interface IGetPendingInvitationsRequest {
|
|
118
135
|
}
|
|
119
136
|
export interface IGetPendingInvitationsResponse {
|
|
@@ -127,9 +144,12 @@ export interface IGetPendingInvitationsResponse {
|
|
|
127
144
|
expiresAt: string;
|
|
128
145
|
createdAt: string;
|
|
129
146
|
}
|
|
130
|
-
export interface
|
|
131
|
-
|
|
132
|
-
|
|
147
|
+
export interface IGetPendingInvitationsListResponse {
|
|
148
|
+
invitations: IGetPendingInvitationsResponse[];
|
|
149
|
+
length: number;
|
|
150
|
+
}
|
|
151
|
+
export interface IRevokeInvitationRequest extends IAuthInvitationIdParams {
|
|
152
|
+
revokedBy?: string;
|
|
133
153
|
}
|
|
134
154
|
export interface IRevokeInvitationResponse {
|
|
135
155
|
message: string;
|
|
@@ -6,6 +6,18 @@ export type TUnknownRecord = Record<string, unknown>;
|
|
|
6
6
|
export type TurndownObject<TObject extends object = TUnknownRecord> = {
|
|
7
7
|
[TKey in keyof TObject]: TObject[TKey];
|
|
8
8
|
};
|
|
9
|
+
export type TEmptyObject = Record<string, never>;
|
|
10
|
+
export interface IMessageResponse {
|
|
11
|
+
message: string;
|
|
12
|
+
}
|
|
13
|
+
export interface ISuccessResponse {
|
|
14
|
+
success: boolean;
|
|
15
|
+
}
|
|
16
|
+
export interface ICountResponse {
|
|
17
|
+
count: number;
|
|
18
|
+
}
|
|
19
|
+
export interface IEmptyRouteParams {
|
|
20
|
+
}
|
|
9
21
|
export interface IMetaData {
|
|
10
22
|
createdAt: Date;
|
|
11
23
|
updatedAt: Date;
|
|
@@ -1,56 +1,85 @@
|
|
|
1
|
-
|
|
1
|
+
import type { IChecklistTemplate, IChecklistTemplateItem, IChecklistTemplateWithItems, ICreateTemplateInput, ICreateTemplateItemInput } from ".";
|
|
2
|
+
import type { ICountResponse, IMessageResponse } from "../base";
|
|
3
|
+
export interface IChecklistTemplateCompanyRouteParams {
|
|
4
|
+
companyId: string;
|
|
2
5
|
}
|
|
3
|
-
export interface
|
|
6
|
+
export interface ITemplateIdParams {
|
|
7
|
+
templateId: string;
|
|
4
8
|
}
|
|
5
|
-
export interface
|
|
9
|
+
export interface ITemplateItemIdParams {
|
|
10
|
+
itemId: string;
|
|
6
11
|
}
|
|
7
|
-
export interface
|
|
12
|
+
export interface ITemplateAndItemIdParams {
|
|
13
|
+
templateId: string;
|
|
14
|
+
itemId: string;
|
|
8
15
|
}
|
|
9
|
-
export interface
|
|
16
|
+
export interface IIncludeInactiveQuery {
|
|
17
|
+
includeInactive?: string;
|
|
10
18
|
}
|
|
11
|
-
export interface
|
|
19
|
+
export interface ICreateTemplateRequest extends Partial<Omit<ICreateTemplateInput, "companyId" | "createdBy">> {
|
|
20
|
+
name: string;
|
|
12
21
|
}
|
|
13
|
-
export interface
|
|
22
|
+
export interface ICreateTemplateResponse extends IChecklistTemplate {
|
|
14
23
|
}
|
|
15
|
-
export interface
|
|
24
|
+
export interface ICreateTemplateWithItemsRequest extends ICreateTemplateInput {
|
|
25
|
+
items: ICreateTemplateItemInput[];
|
|
16
26
|
}
|
|
17
|
-
export interface
|
|
27
|
+
export interface ICreateTemplateWithItemsResponse extends IChecklistTemplateWithItems {
|
|
18
28
|
}
|
|
19
|
-
export interface
|
|
29
|
+
export interface IGetTemplatesByCompanyIdRequest extends IChecklistTemplateCompanyRouteParams {
|
|
20
30
|
}
|
|
21
|
-
export
|
|
31
|
+
export type IGetTemplatesByCompanyIdResponse = IChecklistTemplate[];
|
|
32
|
+
export interface IGetTemplateByIdRequest extends ITemplateIdParams {
|
|
22
33
|
}
|
|
23
|
-
export interface
|
|
34
|
+
export interface IGetTemplateByIdResponse extends IChecklistTemplate {
|
|
24
35
|
}
|
|
25
|
-
export interface
|
|
36
|
+
export interface IGetTemplateWithItemsRequest extends ITemplateIdParams {
|
|
26
37
|
}
|
|
27
|
-
export interface
|
|
38
|
+
export interface IGetTemplateWithItemsResponse extends IChecklistTemplateWithItems {
|
|
39
|
+
}
|
|
40
|
+
export interface IUpdateTemplateRequest extends Partial<ICreateTemplateInput> {
|
|
41
|
+
}
|
|
42
|
+
export interface IUpdateTemplateResponse extends IChecklistTemplate {
|
|
43
|
+
}
|
|
44
|
+
export interface IDeleteTemplateRequest extends ITemplateIdParams {
|
|
45
|
+
}
|
|
46
|
+
export interface IDeleteTemplateResponse extends IMessageResponse {
|
|
28
47
|
}
|
|
29
48
|
export interface IToggleTemplateActiveRequest {
|
|
49
|
+
isActive: boolean;
|
|
50
|
+
}
|
|
51
|
+
export interface IToggleTemplateActiveResponse extends IChecklistTemplate {
|
|
52
|
+
}
|
|
53
|
+
export interface IGetTemplateUsageRequest extends ITemplateIdParams {
|
|
30
54
|
}
|
|
31
|
-
export interface
|
|
55
|
+
export interface IGetTemplateUsageResponse extends ICountResponse {
|
|
32
56
|
}
|
|
33
|
-
export interface
|
|
57
|
+
export interface IGetTemplateItemsRequest extends ITemplateIdParams {
|
|
34
58
|
}
|
|
35
|
-
export
|
|
59
|
+
export type IGetTemplateItemsResponse = IChecklistTemplateItem[];
|
|
60
|
+
export interface IAddTemplateItemRequest extends ICreateTemplateItemInput {
|
|
61
|
+
title: string;
|
|
36
62
|
}
|
|
37
|
-
export interface
|
|
63
|
+
export interface IAddTemplateItemResponse extends IChecklistTemplateItem {
|
|
38
64
|
}
|
|
39
|
-
export interface
|
|
65
|
+
export interface IUpdateTemplateItemRequest extends Partial<ICreateTemplateItemInput> {
|
|
40
66
|
}
|
|
41
|
-
export interface
|
|
67
|
+
export interface IUpdateTemplateItemResponse extends IChecklistTemplateItem {
|
|
42
68
|
}
|
|
43
|
-
export interface
|
|
69
|
+
export interface IDuplicateTemplateItemRequest extends ITemplateItemIdParams {
|
|
44
70
|
}
|
|
45
|
-
export interface
|
|
71
|
+
export interface IDuplicateTemplateItemResponse extends IChecklistTemplateItem {
|
|
46
72
|
}
|
|
47
|
-
export interface
|
|
73
|
+
export interface IDeleteTemplateItemRequest extends ITemplateItemIdParams {
|
|
48
74
|
}
|
|
49
|
-
export interface
|
|
75
|
+
export interface IDeleteTemplateItemResponse extends IMessageResponse {
|
|
50
76
|
}
|
|
51
|
-
export interface
|
|
77
|
+
export interface ITemplateItemOrder {
|
|
78
|
+
itemId: string;
|
|
79
|
+
displayOrder: number;
|
|
52
80
|
}
|
|
53
81
|
export interface IReorderTemplateItemsRequest {
|
|
82
|
+
itemOrders: ITemplateItemOrder[];
|
|
54
83
|
}
|
|
55
|
-
export interface IReorderTemplateItemsResponse {
|
|
84
|
+
export interface IReorderTemplateItemsResponse extends IMessageResponse {
|
|
56
85
|
}
|
|
@@ -1,5 +1,22 @@
|
|
|
1
|
-
import { ICompany, TCompanyType } from ".";
|
|
2
|
-
import {
|
|
1
|
+
import type { ICompany, TCompanyType } from ".";
|
|
2
|
+
import type { IMessageResponse } from "../base";
|
|
3
|
+
import type { TAccountType } from "../user";
|
|
4
|
+
export interface ICompanyRouteParams {
|
|
5
|
+
companyId: string;
|
|
6
|
+
}
|
|
7
|
+
export interface ICompanyUserRouteParams {
|
|
8
|
+
userId: string;
|
|
9
|
+
}
|
|
10
|
+
export interface ICompanyInvitationTokenParams {
|
|
11
|
+
token: string;
|
|
12
|
+
}
|
|
13
|
+
export interface ICompanyInvitationIdParams extends ICompanyRouteParams {
|
|
14
|
+
invitationId: string;
|
|
15
|
+
}
|
|
16
|
+
export interface IGetCompaniesQuery {
|
|
17
|
+
search?: string;
|
|
18
|
+
filter?: "active" | "pending" | "all";
|
|
19
|
+
}
|
|
3
20
|
export interface ICreateCompanyRequest {
|
|
4
21
|
displayName: string;
|
|
5
22
|
addressLine1?: string;
|
|
@@ -9,44 +26,75 @@ export interface ICreateCompanyRequest {
|
|
|
9
26
|
postalCode?: string;
|
|
10
27
|
companyType: TCompanyType;
|
|
11
28
|
}
|
|
12
|
-
export interface ICreateCompanyResponse {
|
|
13
|
-
company: ICompany;
|
|
29
|
+
export interface ICreateCompanyResponse extends ICompany {
|
|
14
30
|
}
|
|
15
|
-
export interface
|
|
31
|
+
export interface IGetCompaniesRequest {
|
|
16
32
|
}
|
|
17
|
-
export
|
|
18
|
-
|
|
33
|
+
export type IGetCompaniesResponse = ICompany[];
|
|
34
|
+
export interface IGetCompanyByIdRequest extends ICompanyRouteParams {
|
|
19
35
|
}
|
|
20
|
-
export interface
|
|
21
|
-
|
|
22
|
-
|
|
36
|
+
export interface IGetCompanyByIdResponse extends ICompany {
|
|
37
|
+
}
|
|
38
|
+
export interface IUpdateCompanyRequest extends Partial<ICompany> {
|
|
23
39
|
}
|
|
24
|
-
export interface IUpdateCompanyResponse {
|
|
25
|
-
company: ICompany;
|
|
40
|
+
export interface IUpdateCompanyResponse extends ICompany {
|
|
26
41
|
}
|
|
27
42
|
export interface IInviteUserToCompanyRequest {
|
|
28
|
-
companyId: string;
|
|
29
43
|
email: string;
|
|
30
44
|
role: TAccountType;
|
|
31
|
-
userId: string;
|
|
32
45
|
}
|
|
33
|
-
export interface IInviteUserToCompanyResponse {
|
|
34
|
-
|
|
46
|
+
export interface IInviteUserToCompanyResponse extends IMessageResponse {
|
|
47
|
+
}
|
|
48
|
+
export interface IGetCompanyUsersRequest extends ICompanyRouteParams {
|
|
49
|
+
}
|
|
50
|
+
export interface ICompanyUserSummary {
|
|
51
|
+
id: string;
|
|
52
|
+
email: string;
|
|
53
|
+
firstName: string;
|
|
54
|
+
lastName: string;
|
|
55
|
+
role: TAccountType;
|
|
56
|
+
}
|
|
57
|
+
export type IGetCompanyUsersResponse = Array<ICompany & ICompanyUserSummary>;
|
|
58
|
+
export interface IGetUserCompaniesRequest extends ICompanyUserRouteParams {
|
|
59
|
+
}
|
|
60
|
+
export type IGetUserCompaniesResponse = ICompany[];
|
|
61
|
+
export interface IInviteCompanyToCompanyRequest {
|
|
62
|
+
message?: string;
|
|
63
|
+
}
|
|
64
|
+
export interface IInviteCompanyToCompanyResponse {
|
|
65
|
+
id: string;
|
|
66
|
+
token: string;
|
|
67
|
+
expiresAt: Date | string;
|
|
68
|
+
}
|
|
69
|
+
export interface IValidateCompanyInvitationRequest extends ICompanyInvitationTokenParams {
|
|
70
|
+
}
|
|
71
|
+
export interface IValidateCompanyInvitationResponse {
|
|
72
|
+
id: string;
|
|
73
|
+
requesterCompanyId: string;
|
|
74
|
+
providerCompanyId: string;
|
|
75
|
+
invitedBy: string;
|
|
76
|
+
message?: string | null;
|
|
77
|
+
expiresAt: Date | string;
|
|
78
|
+
requesterCompanyName: string;
|
|
79
|
+
providerCompanyName: string;
|
|
80
|
+
invitedByName: string;
|
|
81
|
+
}
|
|
82
|
+
export interface IAcceptCompanyInvitationRequest extends ICompanyInvitationTokenParams {
|
|
83
|
+
}
|
|
84
|
+
export interface IAcceptCompanyInvitationResponse {
|
|
85
|
+
requesterCompanyId: string;
|
|
86
|
+
providerCompanyId: string;
|
|
87
|
+
requesterCompanyName: string;
|
|
88
|
+
providerCompanyName: string;
|
|
89
|
+
}
|
|
90
|
+
export interface IDeclineCompanyInvitationRequest extends ICompanyInvitationTokenParams {
|
|
35
91
|
}
|
|
36
|
-
export interface
|
|
92
|
+
export interface IDeclineCompanyInvitationResponse extends IMessageResponse {
|
|
37
93
|
}
|
|
38
|
-
export interface
|
|
39
|
-
company: Partial<ICompany>;
|
|
40
|
-
users: {
|
|
41
|
-
id: string;
|
|
42
|
-
email: string;
|
|
43
|
-
firstName: string;
|
|
44
|
-
lastName: string;
|
|
45
|
-
role: TAccountType;
|
|
46
|
-
}[];
|
|
94
|
+
export interface IGetPendingCompanyInvitationsRequest extends ICompanyRouteParams {
|
|
47
95
|
}
|
|
48
|
-
export
|
|
96
|
+
export type IGetPendingCompanyInvitationsResponse = IValidateCompanyInvitationResponse[];
|
|
97
|
+
export interface IRevokeCompanyInvitationRequest extends ICompanyInvitationIdParams {
|
|
49
98
|
}
|
|
50
|
-
export interface
|
|
51
|
-
companies: ICompany[];
|
|
99
|
+
export interface IRevokeCompanyInvitationResponse extends IMessageResponse {
|
|
52
100
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export * from "./routes";
|
|
2
|
-
export type TDamageSeverity = "
|
|
3
|
-
export type TDamageStatus = "OPEN" | "IN_REVIEW" | "RESOLVED" | "ESCALATED";
|
|
2
|
+
export type TDamageSeverity = "LOW" | "MEDIUM" | "HIGH" | "CRITICAL";
|
|
3
|
+
export type TDamageStatus = "OPEN" | "IN_REVIEW" | "ASSIGNED" | "IN_PROGRESS" | "RESOLVED" | "CLOSED" | "ESCALATED";
|
|
4
4
|
export interface IDamageReport {
|
|
5
5
|
id: string;
|
|
6
6
|
propertyId: string;
|
|
@@ -1,76 +1,153 @@
|
|
|
1
|
-
|
|
1
|
+
import type { IDamageComment, IDamagePhoto, IDamageReport, TDamageStatus } from ".";
|
|
2
|
+
export interface IDamageReportPropertyRouteParams {
|
|
3
|
+
propertyId: string;
|
|
2
4
|
}
|
|
3
|
-
export interface
|
|
5
|
+
export interface IDamageReportRoomRouteParams {
|
|
6
|
+
roomId: string;
|
|
4
7
|
}
|
|
5
|
-
export interface
|
|
8
|
+
export interface IDamageReportRouteParams {
|
|
9
|
+
reportId: string;
|
|
6
10
|
}
|
|
7
|
-
export interface
|
|
11
|
+
export interface IDamageReportWorkOrderRouteParams {
|
|
12
|
+
workOrderId: string;
|
|
8
13
|
}
|
|
9
|
-
export interface
|
|
14
|
+
export interface IIncludeResolvedQuery {
|
|
15
|
+
includeResolved?: string;
|
|
10
16
|
}
|
|
11
|
-
export interface
|
|
17
|
+
export interface ICreateDamageReportRequest extends Partial<IDamageReport> {
|
|
18
|
+
propertyId: string;
|
|
19
|
+
roomId: string;
|
|
20
|
+
reportedBy: string;
|
|
21
|
+
severity: IDamageReport["severity"];
|
|
22
|
+
title: string;
|
|
23
|
+
description: string;
|
|
12
24
|
}
|
|
13
|
-
export interface
|
|
14
|
-
}
|
|
15
|
-
export interface IUpdateDamageReportStatusResponse {
|
|
16
|
-
}
|
|
17
|
-
export interface IAssignDamageReportRequest {
|
|
18
|
-
}
|
|
19
|
-
export interface IAssignDamageReportResponse {
|
|
20
|
-
}
|
|
21
|
-
export interface IResolveDamageReportRequest {
|
|
22
|
-
}
|
|
23
|
-
export interface IResolveDamageReportResponse {
|
|
24
|
-
}
|
|
25
|
-
export interface IGetDamageReportsByPropertyIdRequest {
|
|
26
|
-
}
|
|
27
|
-
export interface IGetDamageReportsByPropertyIdResponse {
|
|
25
|
+
export interface ICreateDamageReportResponse extends IDamageReport {
|
|
28
26
|
}
|
|
29
|
-
export interface
|
|
27
|
+
export interface IGetDamageReportByIdRequest extends IDamageReportRouteParams {
|
|
30
28
|
}
|
|
31
|
-
export interface
|
|
29
|
+
export interface IGetDamageReportByIdResponse extends IDamageReport {
|
|
32
30
|
}
|
|
33
|
-
export interface
|
|
31
|
+
export interface IUpdateDamageReportRequest extends Partial<IDamageReport> {
|
|
34
32
|
}
|
|
35
|
-
export interface
|
|
33
|
+
export interface IUpdateDamageReportResponse extends IDamageReport {
|
|
36
34
|
}
|
|
37
|
-
export interface
|
|
38
|
-
|
|
39
|
-
|
|
35
|
+
export interface IUpdateDamageReportStatusRequest {
|
|
36
|
+
status: TDamageStatus;
|
|
37
|
+
changedBy: string;
|
|
38
|
+
reason?: string;
|
|
40
39
|
}
|
|
41
|
-
export interface
|
|
40
|
+
export interface IUpdateDamageReportStatusResponse extends IDamageReport {
|
|
42
41
|
}
|
|
43
|
-
export interface
|
|
42
|
+
export interface IAssignDamageReportRequest {
|
|
43
|
+
assignedTo: string;
|
|
44
44
|
}
|
|
45
|
-
export interface
|
|
45
|
+
export interface IAssignDamageReportResponse extends IDamageReport {
|
|
46
46
|
}
|
|
47
|
-
export interface
|
|
47
|
+
export interface IResolveDamageReportRequest {
|
|
48
|
+
resolvedBy: string;
|
|
49
|
+
resolutionNotes?: string;
|
|
50
|
+
actualCost?: number;
|
|
48
51
|
}
|
|
49
|
-
export interface
|
|
52
|
+
export interface IResolveDamageReportResponse extends IDamageReport {
|
|
50
53
|
}
|
|
51
|
-
export interface
|
|
54
|
+
export interface IGetDamageReportsByPropertyIdRequest extends IDamageReportPropertyRouteParams {
|
|
52
55
|
}
|
|
53
|
-
export
|
|
56
|
+
export type IGetDamageReportsByPropertyIdResponse = IDamageReport[];
|
|
57
|
+
export interface IGetDamageReportsByRoomIdRequest extends IDamageReportRoomRouteParams {
|
|
54
58
|
}
|
|
55
|
-
export
|
|
59
|
+
export type IGetDamageReportsByRoomIdResponse = IDamageReport[];
|
|
60
|
+
export interface IGetDamageReportPhotosRequest extends IDamageReportRouteParams {
|
|
56
61
|
}
|
|
57
|
-
export
|
|
62
|
+
export type IGetDamageReportPhotosResponse = IDamagePhoto[];
|
|
63
|
+
export interface IAddDamageReportPhotoRequest {
|
|
64
|
+
photoId: string;
|
|
65
|
+
isBeforePhoto?: boolean;
|
|
66
|
+
caption?: string;
|
|
67
|
+
uploadedBy?: string;
|
|
58
68
|
}
|
|
59
|
-
export interface
|
|
69
|
+
export interface IAddDamageReportPhotoResponse extends IDamagePhoto {
|
|
60
70
|
}
|
|
61
|
-
export interface
|
|
71
|
+
export interface IGetDamageReportCommentsRequest extends IDamageReportRouteParams {
|
|
62
72
|
}
|
|
63
|
-
export
|
|
73
|
+
export type IGetDamageReportCommentsResponse = IDamageComment[];
|
|
74
|
+
export interface IAddDamageReportCommentRequest {
|
|
75
|
+
userId: string;
|
|
76
|
+
comment: string;
|
|
77
|
+
isInternal?: boolean;
|
|
78
|
+
}
|
|
79
|
+
export interface IAddDamageReportCommentResponse extends IDamageComment {
|
|
80
|
+
}
|
|
81
|
+
export interface IDamageReportStatusHistory {
|
|
82
|
+
id: string;
|
|
83
|
+
damageReportId: string;
|
|
84
|
+
previousStatus: TDamageStatus | null;
|
|
85
|
+
newStatus: TDamageStatus;
|
|
86
|
+
changedBy: string;
|
|
87
|
+
reason: string | null;
|
|
88
|
+
createdAt: Date;
|
|
89
|
+
}
|
|
90
|
+
export interface IGetDamageReportHistoryRequest extends IDamageReportRouteParams {
|
|
91
|
+
}
|
|
92
|
+
export type IGetDamageReportHistoryResponse = IDamageReportStatusHistory[];
|
|
93
|
+
export type TWorkOrderPriority = "LOW" | "NORMAL" | "HIGH" | "URGENT";
|
|
94
|
+
export type TWorkOrderStatus = "PENDING" | "SCHEDULED" | "IN_PROGRESS" | "COMPLETED" | "CANCELLED";
|
|
95
|
+
export interface IWorkOrder {
|
|
96
|
+
id: string;
|
|
97
|
+
damageReportId: string | null;
|
|
98
|
+
propertyId: string;
|
|
99
|
+
roomId: string | null;
|
|
100
|
+
workOrderNumber: string | null;
|
|
101
|
+
priority: TWorkOrderPriority;
|
|
102
|
+
category: string | null;
|
|
103
|
+
assignedTo: string | null;
|
|
104
|
+
assignedAt: Date | null;
|
|
105
|
+
scheduledDate: Date | null;
|
|
106
|
+
scheduledTimeStart: string | null;
|
|
107
|
+
scheduledTimeEnd: string | null;
|
|
108
|
+
startedAt: Date | null;
|
|
109
|
+
completedAt: Date | null;
|
|
110
|
+
completedBy: string | null;
|
|
111
|
+
description: string;
|
|
112
|
+
workPerformed: string | null;
|
|
113
|
+
materialsUsed: string | null;
|
|
114
|
+
laborHours: number | null;
|
|
115
|
+
laborCost: number | null;
|
|
116
|
+
materialsCost: number | null;
|
|
117
|
+
totalCost: number | null;
|
|
118
|
+
status: TWorkOrderStatus;
|
|
119
|
+
createdAt: Date;
|
|
120
|
+
updatedAt: Date;
|
|
121
|
+
}
|
|
122
|
+
export interface ICreateWorkOrderRequest extends Partial<IWorkOrder> {
|
|
123
|
+
propertyId: string;
|
|
124
|
+
description: string;
|
|
125
|
+
}
|
|
126
|
+
export interface ICreateWorkOrderResponse extends IWorkOrder {
|
|
127
|
+
}
|
|
128
|
+
export interface IGetWorkOrderByIdRequest extends IDamageReportWorkOrderRouteParams {
|
|
129
|
+
}
|
|
130
|
+
export interface IGetWorkOrderByIdResponse extends IWorkOrder {
|
|
131
|
+
}
|
|
132
|
+
export interface IUpdateWorkOrderRequest extends Partial<IWorkOrder> {
|
|
133
|
+
}
|
|
134
|
+
export interface IUpdateWorkOrderResponse extends IWorkOrder {
|
|
64
135
|
}
|
|
65
136
|
export interface IAssignWorkOrderRequest {
|
|
137
|
+
assignedTo: string;
|
|
66
138
|
}
|
|
67
|
-
export interface IAssignWorkOrderResponse {
|
|
139
|
+
export interface IAssignWorkOrderResponse extends IWorkOrder {
|
|
68
140
|
}
|
|
69
141
|
export interface ICompleteWorkOrderRequest {
|
|
142
|
+
completedBy: string;
|
|
143
|
+
workPerformed: string;
|
|
144
|
+
materialsUsed?: string;
|
|
145
|
+
laborHours?: number;
|
|
146
|
+
laborCost?: number;
|
|
147
|
+
materialsCost?: number;
|
|
70
148
|
}
|
|
71
|
-
export interface ICompleteWorkOrderResponse {
|
|
72
|
-
}
|
|
73
|
-
export interface IGetWorkOrdersByPropertyIdRequest {
|
|
149
|
+
export interface ICompleteWorkOrderResponse extends IWorkOrder {
|
|
74
150
|
}
|
|
75
|
-
export interface
|
|
151
|
+
export interface IGetWorkOrdersByPropertyIdRequest extends IDamageReportPropertyRouteParams {
|
|
76
152
|
}
|
|
153
|
+
export type IGetWorkOrdersByPropertyIdResponse = IWorkOrder[];
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export * from "./routes";
|
|
2
|
+
export interface IHealthCheckResponse {
|
|
3
|
+
status: "healthy";
|
|
4
|
+
database: "connected";
|
|
5
|
+
timestamp: string;
|
|
6
|
+
environment?: string;
|
|
7
|
+
}
|
|
8
|
+
export interface IHealthChecks {
|
|
9
|
+
database: "unknown" | "connected" | "disconnected";
|
|
10
|
+
uptime: number;
|
|
11
|
+
memory: {
|
|
12
|
+
rss: number;
|
|
13
|
+
heapTotal: number;
|
|
14
|
+
heapUsed: number;
|
|
15
|
+
external: number;
|
|
16
|
+
arrayBuffers: number;
|
|
17
|
+
};
|
|
18
|
+
timestamp: string;
|
|
19
|
+
databaseError?: string;
|
|
20
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./routes";
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { IHealthChecks, IHealthCheckResponse } from ".";
|
|
2
|
+
export interface IGetHealthRequest {
|
|
3
|
+
}
|
|
4
|
+
export interface IGetHealthResponse extends IHealthCheckResponse {
|
|
5
|
+
}
|
|
6
|
+
export interface IGetDetailedHealthRequest {
|
|
7
|
+
}
|
|
8
|
+
export interface IGetDetailedHealthResponse {
|
|
9
|
+
checks: IHealthChecks;
|
|
10
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
export * from "./routes";
|
|
2
|
+
export declare const IMAGE_ENTITY_TYPE: {
|
|
3
|
+
readonly USER_PROFILE: "USER_PROFILE";
|
|
4
|
+
readonly PROPERTY: "PROPERTY";
|
|
5
|
+
readonly COMPANY: "COMPANY";
|
|
6
|
+
readonly CHECKLIST_ITEM: "CHECKLIST_ITEM";
|
|
7
|
+
readonly PROPERTY_ROOM: "PROPERTY_ROOM";
|
|
8
|
+
readonly MAINTENANCE_TICKET: "MAINTENANCE_TICKET";
|
|
9
|
+
readonly WORK_REPORT: "WORK_REPORT";
|
|
10
|
+
readonly TURNDOWN_DEFAULT: "TURNDOWN_DEFAULT";
|
|
11
|
+
};
|
|
12
|
+
export type TStoredImageEntityType = (typeof IMAGE_ENTITY_TYPE)[keyof typeof IMAGE_ENTITY_TYPE];
|
|
13
|
+
export interface IImage {
|
|
14
|
+
id: string;
|
|
15
|
+
s3Key: string;
|
|
16
|
+
s3Bucket: string;
|
|
17
|
+
entityType: TStoredImageEntityType;
|
|
18
|
+
entityId: string;
|
|
19
|
+
fileName: string;
|
|
20
|
+
mimeType: string;
|
|
21
|
+
fileSizeBytes?: number;
|
|
22
|
+
width?: number;
|
|
23
|
+
height?: number;
|
|
24
|
+
isPublic: boolean;
|
|
25
|
+
category?: string;
|
|
26
|
+
displayOrder: number;
|
|
27
|
+
uploadedBy?: string;
|
|
28
|
+
createdAt: Date;
|
|
29
|
+
updatedAt: Date;
|
|
30
|
+
deletedAt?: Date;
|
|
31
|
+
}
|
|
32
|
+
export interface IImageWithUrl extends IImage {
|
|
33
|
+
url: string;
|
|
34
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export * from "./routes";
|
|
2
|
+
export const IMAGE_ENTITY_TYPE = {
|
|
3
|
+
USER_PROFILE: "USER_PROFILE",
|
|
4
|
+
PROPERTY: "PROPERTY",
|
|
5
|
+
COMPANY: "COMPANY",
|
|
6
|
+
CHECKLIST_ITEM: "CHECKLIST_ITEM",
|
|
7
|
+
PROPERTY_ROOM: "PROPERTY_ROOM",
|
|
8
|
+
MAINTENANCE_TICKET: "MAINTENANCE_TICKET",
|
|
9
|
+
WORK_REPORT: "WORK_REPORT",
|
|
10
|
+
TURNDOWN_DEFAULT: "TURNDOWN_DEFAULT",
|
|
11
|
+
};
|