@turndown/library 0.1.20 → 0.1.23
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/object/index.js +9 -6
- package/dist/helpers/string/index.d.ts +5 -4
- package/dist/helpers/string/index.js +7 -6
- package/dist/types/auth/routes.d.ts +27 -7
- package/dist/types/base/index.d.ts +72 -69
- package/dist/types/base/index.js +60 -67
- package/dist/types/checklist-template/routes.d.ts +55 -26
- 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 +18 -2
- package/dist/types/damage-report/index.js +15 -0
- 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/index.d.ts +10 -9
- 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/index.d.ts +2 -3
- package/dist/types/user/index.js +2 -3
- 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 +3 -2
|
@@ -1,52 +1,100 @@
|
|
|
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
|
-
addressLine1
|
|
22
|
+
addressLine1: string;
|
|
6
23
|
addressLine2?: string;
|
|
7
|
-
city
|
|
8
|
-
stateCode
|
|
9
|
-
postalCode
|
|
24
|
+
city: string;
|
|
25
|
+
stateCode: string;
|
|
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,22 @@
|
|
|
1
|
+
import { TRecordValue } from "../base";
|
|
1
2
|
export * from "./routes";
|
|
2
|
-
export
|
|
3
|
-
|
|
3
|
+
export declare const DAMAGE_SEVERITY: {
|
|
4
|
+
readonly LOW: "LOW";
|
|
5
|
+
readonly MEDIUM: "MEDIUM";
|
|
6
|
+
readonly HIGH: "HIGH";
|
|
7
|
+
readonly CRITICAL: "CRITICAL";
|
|
8
|
+
};
|
|
9
|
+
export type TDamageSeverity = TRecordValue<typeof DAMAGE_SEVERITY>;
|
|
10
|
+
export declare const DAMAGE_STATUS: {
|
|
11
|
+
OPEN: string;
|
|
12
|
+
IN_REVIEW: string;
|
|
13
|
+
ASSIGNED: string;
|
|
14
|
+
IN_PROGRESS: string;
|
|
15
|
+
RESOLVED: string;
|
|
16
|
+
CLOSED: string;
|
|
17
|
+
ESCALATED: string;
|
|
18
|
+
};
|
|
19
|
+
export type TDamageStatus = TRecordValue<typeof DAMAGE_STATUS>;
|
|
4
20
|
export interface IDamageReport {
|
|
5
21
|
id: string;
|
|
6
22
|
propertyId: string;
|
|
@@ -1 +1,16 @@
|
|
|
1
1
|
export * from "./routes";
|
|
2
|
+
export const DAMAGE_SEVERITY = {
|
|
3
|
+
LOW: "LOW",
|
|
4
|
+
MEDIUM: "MEDIUM",
|
|
5
|
+
HIGH: "HIGH",
|
|
6
|
+
CRITICAL: "CRITICAL",
|
|
7
|
+
};
|
|
8
|
+
export const DAMAGE_STATUS = {
|
|
9
|
+
OPEN: "OPEN",
|
|
10
|
+
IN_REVIEW: "IN_REVIEW",
|
|
11
|
+
ASSIGNED: "ASSIGNED",
|
|
12
|
+
IN_PROGRESS: "IN_PROGRESS",
|
|
13
|
+
RESOLVED: "RESOLVED",
|
|
14
|
+
CLOSED: "CLOSED",
|
|
15
|
+
ESCALATED: "ESCALATED",
|
|
16
|
+
};
|
|
@@ -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
|
+
};
|
|
@@ -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 {};
|
package/dist/types/index.d.ts
CHANGED
|
@@ -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";
|
package/dist/types/index.js
CHANGED
|
@@ -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
|
-
}
|