@turndown/library 0.1.16 → 0.1.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/helpers/date/index.d.ts +113 -0
- package/dist/helpers/date/index.js +171 -0
- package/dist/helpers/index.d.ts +3 -1
- package/dist/helpers/index.js +2 -1
- package/dist/helpers/object/index.d.ts +160 -75
- package/dist/helpers/object/index.js +355 -168
- package/dist/helpers/string/index.d.ts +227 -74
- package/dist/helpers/string/index.js +448 -114
- package/dist/types/api/index.d.ts +22 -11
- package/dist/types/api/index.js +9 -2
- package/dist/types/auth/index.d.ts +56 -18
- package/dist/types/auth/index.js +7 -0
- package/dist/types/auth/routes.d.ts +52 -43
- package/dist/types/auth/routes.js +0 -1
- package/dist/types/base/index.d.ts +188 -69
- package/dist/types/base/index.js +116 -0
- package/dist/types/base/paging.types.d.ts +11 -11
- package/dist/types/checklist-template/index.d.ts +8 -8
- package/dist/types/checklist-template/routes.d.ts +28 -28
- package/dist/types/company/index.d.ts +5 -5
- package/dist/types/company/routes.d.ts +23 -23
- package/dist/types/damage-report/index.d.ts +9 -9
- package/dist/types/damage-report/routes.d.ts +38 -38
- package/dist/types/errors/index.d.ts +15 -16
- package/dist/types/errors/index.js +17 -7
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.js +1 -0
- package/dist/types/inventory/index.d.ts +19 -19
- package/dist/types/inventory/routes.d.ts +36 -36
- package/dist/types/job/index.d.ts +7 -0
- package/dist/types/job/index.js +1 -0
- package/dist/types/property/index.d.ts +88 -29
- package/dist/types/property/index.js +23 -23
- package/dist/types/property/routes.d.ts +41 -14
- package/dist/types/property/routes.js +0 -1
- package/dist/types/room/index.d.ts +4 -4
- package/dist/types/room/routes.d.ts +8 -8
- package/dist/types/room-checklist/index.d.ts +9 -9
- package/dist/types/room-checklist/routes.d.ts +28 -28
- package/dist/types/user/index.d.ts +12 -12
- package/dist/types/user/routes.d.ts +15 -15
- package/dist/types/work-session/index.d.ts +12 -12
- package/dist/types/work-session/routes.d.ts +34 -34
- package/package.json +13 -4
package/dist/types/base/index.js
CHANGED
|
@@ -65,4 +65,120 @@ export const US_STATES_CODE = {
|
|
|
65
65
|
AS: "AS",
|
|
66
66
|
MP: "MP",
|
|
67
67
|
};
|
|
68
|
+
export const UNITED_STATES_JURISDICTIONS = {
|
|
69
|
+
Alabama: "Alabama",
|
|
70
|
+
Alaska: "Alaska",
|
|
71
|
+
AmericanSamoa: "American Samoa",
|
|
72
|
+
Arizona: "Arizona",
|
|
73
|
+
Arkansas: "Arkansas",
|
|
74
|
+
BakerIsland: "Baker Island",
|
|
75
|
+
California: "California",
|
|
76
|
+
Colorado: "Colorado",
|
|
77
|
+
Connecticut: "Connecticut",
|
|
78
|
+
Delaware: "Delaware",
|
|
79
|
+
DistrictOfColumbia: "District of Columbia",
|
|
80
|
+
Florida: "Florida",
|
|
81
|
+
Georgia: "Georgia",
|
|
82
|
+
Guam: "Guam",
|
|
83
|
+
Hawaii: "Hawaii",
|
|
84
|
+
HowlandIsland: "Howland Island",
|
|
85
|
+
Idaho: "Idaho",
|
|
86
|
+
Illinois: "Illinois",
|
|
87
|
+
Indiana: "Indiana",
|
|
88
|
+
Iowa: "Iowa",
|
|
89
|
+
JarvisIsland: "Jarvis Island",
|
|
90
|
+
JohnstonAtoll: "Johnston Atoll",
|
|
91
|
+
Kansas: "Kansas",
|
|
92
|
+
Kentucky: "Kentucky",
|
|
93
|
+
KingmanReef: "Kingman Reef",
|
|
94
|
+
Louisiana: "Louisiana",
|
|
95
|
+
Maine: "Maine",
|
|
96
|
+
Maryland: "Maryland",
|
|
97
|
+
Massachusetts: "Massachusetts",
|
|
98
|
+
Michigan: "Michigan",
|
|
99
|
+
MidwayAtoll: "Midway Atoll",
|
|
100
|
+
Minnesota: "Minnesota",
|
|
101
|
+
Mississippi: "Mississippi",
|
|
102
|
+
Missouri: "Missouri",
|
|
103
|
+
Montana: "Montana",
|
|
104
|
+
NavassaIsland: "Navassa Island",
|
|
105
|
+
Nebraska: "Nebraska",
|
|
106
|
+
Nevada: "Nevada",
|
|
107
|
+
NewHampshire: "New Hampshire",
|
|
108
|
+
NewJersey: "New Jersey",
|
|
109
|
+
NewMexico: "New Mexico",
|
|
110
|
+
NewYork: "New York",
|
|
111
|
+
NorthCarolina: "North Carolina",
|
|
112
|
+
NorthDakota: "North Dakota",
|
|
113
|
+
NorthernMarianaIslands: "Northern Mariana Islands",
|
|
114
|
+
Ohio: "Ohio",
|
|
115
|
+
Oklahoma: "Oklahoma",
|
|
116
|
+
Oregon: "Oregon",
|
|
117
|
+
PalmyraAtoll: "Palmyra Atoll",
|
|
118
|
+
Pennsylvania: "Pennsylvania",
|
|
119
|
+
PuertoRico: "Puerto Rico",
|
|
120
|
+
RhodeIsland: "Rhode Island",
|
|
121
|
+
SouthCarolina: "South Carolina",
|
|
122
|
+
SouthDakota: "South Dakota",
|
|
123
|
+
Tennessee: "Tennessee",
|
|
124
|
+
Texas: "Texas",
|
|
125
|
+
UnitedStatesVirginIslands: "United States Virgin Islands",
|
|
126
|
+
Utah: "Utah",
|
|
127
|
+
Vermont: "Vermont",
|
|
128
|
+
Virginia: "Virginia",
|
|
129
|
+
WakeIsland: "Wake Island",
|
|
130
|
+
Washington: "Washington",
|
|
131
|
+
WestVirginia: "West Virginia",
|
|
132
|
+
Wisconsin: "Wisconsin",
|
|
133
|
+
Wyoming: "Wyoming",
|
|
134
|
+
};
|
|
135
|
+
export const UnitedStatesJurisdictionOptions = Object.values(UNITED_STATES_JURISDICTIONS).map((jurisdiction) => ({
|
|
136
|
+
label: jurisdiction,
|
|
137
|
+
value: jurisdiction,
|
|
138
|
+
}));
|
|
139
|
+
export const STATUS = {
|
|
140
|
+
Pending: "Pending",
|
|
141
|
+
InProgress: "InProgress",
|
|
142
|
+
Completed: "Completed",
|
|
143
|
+
Overdue: "Overdue",
|
|
144
|
+
Active: "Active",
|
|
145
|
+
Inactive: "Inactive",
|
|
146
|
+
};
|
|
147
|
+
export const StatusOptions = Object.values(STATUS).map((status) => ({
|
|
148
|
+
label: status,
|
|
149
|
+
value: status,
|
|
150
|
+
}));
|
|
151
|
+
export const SEVERITY = {
|
|
152
|
+
Low: "Low",
|
|
153
|
+
Medium: "Medium",
|
|
154
|
+
High: "High",
|
|
155
|
+
};
|
|
156
|
+
export const SeverityOptions = Object.values(SEVERITY).map((severity) => ({
|
|
157
|
+
label: severity,
|
|
158
|
+
value: severity,
|
|
159
|
+
}));
|
|
160
|
+
export const SERVICE_TYPES = {
|
|
161
|
+
Cleaning: "Cleaning",
|
|
162
|
+
Maintenance: "Maintenance",
|
|
163
|
+
Inspection: "Inspections",
|
|
164
|
+
Other: "Other",
|
|
165
|
+
};
|
|
166
|
+
export const ServiceTypeOptions = Object.values(SERVICE_TYPES).map((serviceType) => ({
|
|
167
|
+
label: serviceType,
|
|
168
|
+
value: serviceType,
|
|
169
|
+
}));
|
|
170
|
+
export const MONTHS = [
|
|
171
|
+
"January",
|
|
172
|
+
"February",
|
|
173
|
+
"March",
|
|
174
|
+
"April",
|
|
175
|
+
"May",
|
|
176
|
+
"June",
|
|
177
|
+
"July",
|
|
178
|
+
"August",
|
|
179
|
+
"September",
|
|
180
|
+
"October",
|
|
181
|
+
"November",
|
|
182
|
+
"December",
|
|
183
|
+
];
|
|
68
184
|
export * from "./paging.types";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Represents the pagination
|
|
2
|
+
* Represents the pagination IMetaData for a paginated response.
|
|
3
3
|
*/
|
|
4
|
-
export interface
|
|
4
|
+
export interface IPagingResult {
|
|
5
5
|
hasNextPage: boolean;
|
|
6
6
|
totalPages: number;
|
|
7
7
|
totalRecords: number;
|
|
@@ -10,14 +10,14 @@ export interface PagingResult {
|
|
|
10
10
|
* A generic wrapper that combines data with pagination information.
|
|
11
11
|
* @template T - The type of data being paginated
|
|
12
12
|
*/
|
|
13
|
-
export interface
|
|
13
|
+
export interface IDataWithPagingResult<T> {
|
|
14
14
|
data: T;
|
|
15
|
-
pagination:
|
|
15
|
+
pagination: IPagingResult;
|
|
16
16
|
}
|
|
17
17
|
/**
|
|
18
18
|
* Defines a sorting condition for query results.
|
|
19
19
|
*/
|
|
20
|
-
export interface
|
|
20
|
+
export interface ISortCondition {
|
|
21
21
|
name: string;
|
|
22
22
|
direction: "ASC" | "DESC";
|
|
23
23
|
}
|
|
@@ -25,7 +25,7 @@ export interface SortCondition {
|
|
|
25
25
|
* Defines a filter condition for querying data.
|
|
26
26
|
* Only one of valueString, valueNumber, or valueBoolean should be provided based on the field type.
|
|
27
27
|
*/
|
|
28
|
-
export interface
|
|
28
|
+
export interface IFilterCondition {
|
|
29
29
|
name: string;
|
|
30
30
|
condition: "=" | ">" | "<" | "!=" | "LIKE" | "IN" | ">=" | "<=";
|
|
31
31
|
valueString?: string;
|
|
@@ -36,12 +36,12 @@ export interface FilterCondition {
|
|
|
36
36
|
/**
|
|
37
37
|
* Represents a request for paginated data with optional sorting and filtering.
|
|
38
38
|
*/
|
|
39
|
-
export interface
|
|
39
|
+
export interface IPaginationRequest {
|
|
40
40
|
page: number;
|
|
41
41
|
size: number;
|
|
42
|
-
sort?:
|
|
43
|
-
filters?:
|
|
42
|
+
sort?: ISortCondition[];
|
|
43
|
+
filters?: IFilterCondition[];
|
|
44
44
|
}
|
|
45
|
-
export declare const createPagingObject: (page: number, size: number, sort?:
|
|
46
|
-
pagination:
|
|
45
|
+
export declare const createPagingObject: (page: number, size: number, sort?: ISortCondition[], filters?: IFilterCondition[]) => {
|
|
46
|
+
pagination: IPaginationRequest;
|
|
47
47
|
};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IMetaData } from "../index";
|
|
2
2
|
export * from "./routes";
|
|
3
|
-
export interface
|
|
3
|
+
export interface IChecklistTemplate extends IMetaData {
|
|
4
4
|
id: string;
|
|
5
5
|
name: string;
|
|
6
6
|
description?: string;
|
|
7
7
|
companyId: string;
|
|
8
8
|
createdBy: string;
|
|
9
9
|
isActive: boolean;
|
|
10
|
-
items:
|
|
10
|
+
items: IChecklistTemplateItem[];
|
|
11
11
|
}
|
|
12
|
-
export interface
|
|
12
|
+
export interface IChecklistTemplateItem extends IMetaData {
|
|
13
13
|
id: string;
|
|
14
14
|
templateId: string;
|
|
15
15
|
title: string;
|
|
@@ -22,13 +22,13 @@ export interface ChecklistTemplateItem extends MetaData {
|
|
|
22
22
|
/**
|
|
23
23
|
* Template with items
|
|
24
24
|
*/
|
|
25
|
-
export interface
|
|
26
|
-
items:
|
|
25
|
+
export interface IChecklistTemplateWithItems extends IChecklistTemplate {
|
|
26
|
+
items: IChecklistTemplateItem[];
|
|
27
27
|
}
|
|
28
28
|
/**
|
|
29
29
|
* Input for creating a template
|
|
30
30
|
*/
|
|
31
|
-
export interface
|
|
31
|
+
export interface ICreateTemplateInput {
|
|
32
32
|
name: string;
|
|
33
33
|
description?: string;
|
|
34
34
|
companyId: string;
|
|
@@ -38,7 +38,7 @@ export interface CreateTemplateInput {
|
|
|
38
38
|
/**
|
|
39
39
|
* Input for creating template items
|
|
40
40
|
*/
|
|
41
|
-
export interface
|
|
41
|
+
export interface ICreateTemplateItemInput {
|
|
42
42
|
title: string;
|
|
43
43
|
description?: string;
|
|
44
44
|
displayOrder: number;
|
|
@@ -1,56 +1,56 @@
|
|
|
1
|
-
export interface
|
|
1
|
+
export interface ICreateTemplateRequest {
|
|
2
2
|
}
|
|
3
|
-
export interface
|
|
3
|
+
export interface ICreateTemplateResponse {
|
|
4
4
|
}
|
|
5
|
-
export interface
|
|
5
|
+
export interface ICreateTemplateWithItemsRequest {
|
|
6
6
|
}
|
|
7
|
-
export interface
|
|
7
|
+
export interface ICreateTemplateWithItemsResponse {
|
|
8
8
|
}
|
|
9
|
-
export interface
|
|
9
|
+
export interface IGetTemplatesByCompanyIdRequest {
|
|
10
10
|
}
|
|
11
|
-
export interface
|
|
11
|
+
export interface IGetTemplatesByCompanyIdResponse {
|
|
12
12
|
}
|
|
13
|
-
export interface
|
|
13
|
+
export interface IGetTemplateByIdRequest {
|
|
14
14
|
}
|
|
15
|
-
export interface
|
|
15
|
+
export interface IGetTemplateByIdResponse {
|
|
16
16
|
}
|
|
17
|
-
export interface
|
|
17
|
+
export interface IGetTemplateWithItemsRequest {
|
|
18
18
|
}
|
|
19
|
-
export interface
|
|
19
|
+
export interface IGetTemplateWithItemsResponse {
|
|
20
20
|
}
|
|
21
|
-
export interface
|
|
21
|
+
export interface IUpdateTemplateRequest {
|
|
22
22
|
}
|
|
23
|
-
export interface
|
|
23
|
+
export interface IUpdateTemplateResponse {
|
|
24
24
|
}
|
|
25
|
-
export interface
|
|
25
|
+
export interface IDeleteTemplateRequest {
|
|
26
26
|
}
|
|
27
|
-
export interface
|
|
27
|
+
export interface IDeleteTemplateResponse {
|
|
28
28
|
}
|
|
29
|
-
export interface
|
|
29
|
+
export interface IToggleTemplateActiveRequest {
|
|
30
30
|
}
|
|
31
|
-
export interface
|
|
31
|
+
export interface IToggleTemplateActiveResponse {
|
|
32
32
|
}
|
|
33
|
-
export interface
|
|
33
|
+
export interface IGetTemplateUsageRequest {
|
|
34
34
|
}
|
|
35
|
-
export interface
|
|
35
|
+
export interface IGetTemplateUsageResponse {
|
|
36
36
|
}
|
|
37
|
-
export interface
|
|
37
|
+
export interface IGetTemplateItemsRequest {
|
|
38
38
|
}
|
|
39
|
-
export interface
|
|
39
|
+
export interface IGetTemplateItemsResponse {
|
|
40
40
|
}
|
|
41
|
-
export interface
|
|
41
|
+
export interface IAddTemplateItemRequest {
|
|
42
42
|
}
|
|
43
|
-
export interface
|
|
43
|
+
export interface IAddTemplateItemResponse {
|
|
44
44
|
}
|
|
45
|
-
export interface
|
|
45
|
+
export interface IUpdateTemplateItemRequest {
|
|
46
46
|
}
|
|
47
|
-
export interface
|
|
47
|
+
export interface IUpdateTemplateItemResponse {
|
|
48
48
|
}
|
|
49
|
-
export interface
|
|
49
|
+
export interface IDeleteTemplateItemRequest {
|
|
50
50
|
}
|
|
51
|
-
export interface
|
|
51
|
+
export interface IDeleteTemplateItemResponse {
|
|
52
52
|
}
|
|
53
|
-
export interface
|
|
53
|
+
export interface IReorderTemplateItemsRequest {
|
|
54
54
|
}
|
|
55
|
-
export interface
|
|
55
|
+
export interface IReorderTemplateItemsResponse {
|
|
56
56
|
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IMetaData, TRecordValue, TUnitedStatesStateCode } from "../index";
|
|
2
2
|
export * from "./routes";
|
|
3
|
-
export interface
|
|
3
|
+
export interface ICompany extends IMetaData {
|
|
4
4
|
id: string;
|
|
5
5
|
displayName: string;
|
|
6
6
|
addressLine1?: string;
|
|
7
7
|
addressLine2?: string;
|
|
8
8
|
city?: string;
|
|
9
|
-
stateCode?:
|
|
10
|
-
companyType:
|
|
9
|
+
stateCode?: TUnitedStatesStateCode;
|
|
10
|
+
companyType: TCompanyType;
|
|
11
11
|
postalCode?: string;
|
|
12
12
|
country?: string;
|
|
13
13
|
timezone?: string;
|
|
@@ -19,4 +19,4 @@ export declare const COMPANY_TYPES: {
|
|
|
19
19
|
readonly CLEANER: "CLEANER";
|
|
20
20
|
readonly OTHER: "OTHER";
|
|
21
21
|
};
|
|
22
|
-
export type
|
|
22
|
+
export type TCompanyType = TRecordValue<typeof COMPANY_TYPES>;
|
|
@@ -1,52 +1,52 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
export interface
|
|
1
|
+
import { ICompany, TCompanyType } from ".";
|
|
2
|
+
import { TAccountType } from "../user";
|
|
3
|
+
export interface ICreateCompanyRequest {
|
|
4
4
|
displayName: string;
|
|
5
5
|
addressLine1?: string;
|
|
6
6
|
addressLine2?: string;
|
|
7
7
|
city?: string;
|
|
8
8
|
stateCode?: string;
|
|
9
9
|
postalCode?: string;
|
|
10
|
-
companyType:
|
|
10
|
+
companyType: TCompanyType;
|
|
11
11
|
}
|
|
12
|
-
export interface
|
|
13
|
-
company:
|
|
12
|
+
export interface ICreateCompanyResponse {
|
|
13
|
+
company: ICompany;
|
|
14
14
|
}
|
|
15
|
-
export interface
|
|
15
|
+
export interface IGetCompanyByIdRequest {
|
|
16
16
|
}
|
|
17
|
-
export interface
|
|
18
|
-
company:
|
|
17
|
+
export interface IGetCompanyByIdResponse {
|
|
18
|
+
company: ICompany;
|
|
19
19
|
}
|
|
20
|
-
export interface
|
|
20
|
+
export interface IUpdateCompanyRequest {
|
|
21
21
|
companyId: string;
|
|
22
|
-
company: Partial<
|
|
22
|
+
company: Partial<ICompany>;
|
|
23
23
|
}
|
|
24
|
-
export interface
|
|
25
|
-
company:
|
|
24
|
+
export interface IUpdateCompanyResponse {
|
|
25
|
+
company: ICompany;
|
|
26
26
|
}
|
|
27
|
-
export interface
|
|
27
|
+
export interface IInviteUserToCompanyRequest {
|
|
28
28
|
companyId: string;
|
|
29
29
|
email: string;
|
|
30
|
-
role:
|
|
30
|
+
role: TAccountType;
|
|
31
31
|
userId: string;
|
|
32
32
|
}
|
|
33
|
-
export interface
|
|
33
|
+
export interface IInviteUserToCompanyResponse {
|
|
34
34
|
message: string;
|
|
35
35
|
}
|
|
36
|
-
export interface
|
|
36
|
+
export interface IGetCompanyUsersRequest {
|
|
37
37
|
}
|
|
38
|
-
export interface
|
|
39
|
-
company: Partial<
|
|
38
|
+
export interface IGetCompanyUsersResponse {
|
|
39
|
+
company: Partial<ICompany>;
|
|
40
40
|
users: {
|
|
41
41
|
id: string;
|
|
42
42
|
email: string;
|
|
43
43
|
firstName: string;
|
|
44
44
|
lastName: string;
|
|
45
|
-
role:
|
|
45
|
+
role: TAccountType;
|
|
46
46
|
}[];
|
|
47
47
|
}
|
|
48
|
-
export interface
|
|
48
|
+
export interface IGetUserCompaniesRequest {
|
|
49
49
|
}
|
|
50
|
-
export interface
|
|
51
|
-
companies:
|
|
50
|
+
export interface IGetUserCompaniesResponse {
|
|
51
|
+
companies: ICompany[];
|
|
52
52
|
}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
export * from "./routes";
|
|
2
|
-
export type
|
|
3
|
-
export type
|
|
4
|
-
export interface
|
|
2
|
+
export type TDamageSeverity = "MINOR" | "MODERATE" | "SEVERE" | "CRITICAL";
|
|
3
|
+
export type TDamageStatus = "OPEN" | "IN_REVIEW" | "RESOLVED" | "ESCALATED";
|
|
4
|
+
export interface IDamageReport {
|
|
5
5
|
id: string;
|
|
6
6
|
propertyId: string;
|
|
7
7
|
roomId: string;
|
|
8
8
|
cleaningSessionId?: string;
|
|
9
9
|
reportedBy: string;
|
|
10
|
-
severity:
|
|
11
|
-
status:
|
|
10
|
+
severity: TDamageSeverity;
|
|
11
|
+
status: TDamageStatus;
|
|
12
12
|
title: string;
|
|
13
13
|
description: string;
|
|
14
14
|
locationDetails?: string;
|
|
@@ -19,10 +19,10 @@ export interface DamageReport {
|
|
|
19
19
|
resolvedBy?: string;
|
|
20
20
|
resolutionNotes?: string;
|
|
21
21
|
requiresProfessional: boolean;
|
|
22
|
-
photos:
|
|
23
|
-
comments:
|
|
22
|
+
photos: IDamagePhoto[];
|
|
23
|
+
comments: IDamageComment[];
|
|
24
24
|
}
|
|
25
|
-
export interface
|
|
25
|
+
export interface IDamagePhoto {
|
|
26
26
|
id: string;
|
|
27
27
|
damageReportId: string;
|
|
28
28
|
photoId: string;
|
|
@@ -31,7 +31,7 @@ export interface DamagePhoto {
|
|
|
31
31
|
isBeforePhoto: boolean;
|
|
32
32
|
displayOrder: number;
|
|
33
33
|
}
|
|
34
|
-
export interface
|
|
34
|
+
export interface IDamageComment {
|
|
35
35
|
id: string;
|
|
36
36
|
damageReportId: string;
|
|
37
37
|
userId: string;
|
|
@@ -1,76 +1,76 @@
|
|
|
1
|
-
export interface
|
|
1
|
+
export interface ICreateDamageReportRequest {
|
|
2
2
|
}
|
|
3
|
-
export interface
|
|
3
|
+
export interface ICreateDamageReportResponse {
|
|
4
4
|
}
|
|
5
|
-
export interface
|
|
5
|
+
export interface IGetDamageReportByIdRequest {
|
|
6
6
|
}
|
|
7
|
-
export interface
|
|
7
|
+
export interface IGetDamageReportByIdResponse {
|
|
8
8
|
}
|
|
9
|
-
export interface
|
|
9
|
+
export interface IUpdateDamageReportRequest {
|
|
10
10
|
}
|
|
11
|
-
export interface
|
|
11
|
+
export interface IUpdateDamageReportResponse {
|
|
12
12
|
}
|
|
13
|
-
export interface
|
|
13
|
+
export interface IUpdateDamageReportStatusRequest {
|
|
14
14
|
}
|
|
15
|
-
export interface
|
|
15
|
+
export interface IUpdateDamageReportStatusResponse {
|
|
16
16
|
}
|
|
17
|
-
export interface
|
|
17
|
+
export interface IAssignDamageReportRequest {
|
|
18
18
|
}
|
|
19
|
-
export interface
|
|
19
|
+
export interface IAssignDamageReportResponse {
|
|
20
20
|
}
|
|
21
|
-
export interface
|
|
21
|
+
export interface IResolveDamageReportRequest {
|
|
22
22
|
}
|
|
23
|
-
export interface
|
|
23
|
+
export interface IResolveDamageReportResponse {
|
|
24
24
|
}
|
|
25
|
-
export interface
|
|
25
|
+
export interface IGetDamageReportsByPropertyIdRequest {
|
|
26
26
|
}
|
|
27
|
-
export interface
|
|
27
|
+
export interface IGetDamageReportsByPropertyIdResponse {
|
|
28
28
|
}
|
|
29
|
-
export interface
|
|
29
|
+
export interface IGetDamageReportsByRoomIdRequest {
|
|
30
30
|
}
|
|
31
|
-
export interface
|
|
31
|
+
export interface IGetDamageReportsByRoomIdResponse {
|
|
32
32
|
}
|
|
33
|
-
export interface
|
|
33
|
+
export interface IGetDamageReportPhotosRequest {
|
|
34
34
|
}
|
|
35
|
-
export interface
|
|
35
|
+
export interface IGetDamageReportPhotosResponse {
|
|
36
36
|
}
|
|
37
|
-
export interface
|
|
37
|
+
export interface IAddDamageReportPhotoRequest {
|
|
38
38
|
}
|
|
39
|
-
export interface
|
|
39
|
+
export interface IAddDamageReportPhotoResponse {
|
|
40
40
|
}
|
|
41
|
-
export interface
|
|
41
|
+
export interface IGetDamageReportCommentsRequest {
|
|
42
42
|
}
|
|
43
|
-
export interface
|
|
43
|
+
export interface IGetDamageReportCommentsResponse {
|
|
44
44
|
}
|
|
45
|
-
export interface
|
|
45
|
+
export interface IAddDamageReportCommentRequest {
|
|
46
46
|
}
|
|
47
|
-
export interface
|
|
47
|
+
export interface IAddDamageReportCommentResponse {
|
|
48
48
|
}
|
|
49
|
-
export interface
|
|
49
|
+
export interface IGetDamageReportHistoryRequest {
|
|
50
50
|
}
|
|
51
|
-
export interface
|
|
51
|
+
export interface IGetDamageReportHistoryResponse {
|
|
52
52
|
}
|
|
53
|
-
export interface
|
|
53
|
+
export interface ICreateWorkOrderRequest {
|
|
54
54
|
}
|
|
55
|
-
export interface
|
|
55
|
+
export interface ICreateWorkOrderResponse {
|
|
56
56
|
}
|
|
57
|
-
export interface
|
|
57
|
+
export interface IGetWorkOrderByIdRequest {
|
|
58
58
|
}
|
|
59
|
-
export interface
|
|
59
|
+
export interface IGetWorkOrderByIdResponse {
|
|
60
60
|
}
|
|
61
|
-
export interface
|
|
61
|
+
export interface IUpdateWorkOrderRequest {
|
|
62
62
|
}
|
|
63
|
-
export interface
|
|
63
|
+
export interface IUpdateWorkOrderResponse {
|
|
64
64
|
}
|
|
65
|
-
export interface
|
|
65
|
+
export interface IAssignWorkOrderRequest {
|
|
66
66
|
}
|
|
67
|
-
export interface
|
|
67
|
+
export interface IAssignWorkOrderResponse {
|
|
68
68
|
}
|
|
69
|
-
export interface
|
|
69
|
+
export interface ICompleteWorkOrderRequest {
|
|
70
70
|
}
|
|
71
|
-
export interface
|
|
71
|
+
export interface ICompleteWorkOrderResponse {
|
|
72
72
|
}
|
|
73
|
-
export interface
|
|
73
|
+
export interface IGetWorkOrdersByPropertyIdRequest {
|
|
74
74
|
}
|
|
75
|
-
export interface
|
|
75
|
+
export interface IGetWorkOrdersByPropertyIdResponse {
|
|
76
76
|
}
|
|
@@ -2,29 +2,28 @@
|
|
|
2
2
|
* Error Types
|
|
3
3
|
* Custom error types and validation error structures
|
|
4
4
|
*/
|
|
5
|
-
import {
|
|
6
|
-
import { TurndownObject } from "../base";
|
|
5
|
+
import { TErrorCode } from "../api";
|
|
7
6
|
/**
|
|
8
7
|
* Validation Error Detail
|
|
9
8
|
* Detailed information about a validation error
|
|
10
9
|
*/
|
|
11
|
-
export interface
|
|
10
|
+
export interface IValidationErrorDetail {
|
|
12
11
|
field: string;
|
|
13
12
|
message: string;
|
|
14
|
-
value?:
|
|
13
|
+
value?: unknown;
|
|
15
14
|
}
|
|
16
15
|
/**
|
|
17
16
|
* Missing Fields Error Detail
|
|
18
17
|
* Information about missing required fields
|
|
19
18
|
*/
|
|
20
|
-
export interface
|
|
19
|
+
export interface IMissingFieldsErrorDetail {
|
|
21
20
|
missingFields: string[];
|
|
22
21
|
}
|
|
23
22
|
/**
|
|
24
23
|
* Rate Limit Error Detail
|
|
25
24
|
* Information about rate limiting
|
|
26
25
|
*/
|
|
27
|
-
export interface
|
|
26
|
+
export interface IRateLimitErrorDetail {
|
|
28
27
|
retryAfter?: number;
|
|
29
28
|
message: string;
|
|
30
29
|
}
|
|
@@ -32,36 +31,36 @@ export interface RateLimitErrorDetail {
|
|
|
32
31
|
* Error Response Detail
|
|
33
32
|
* Union type for all possible error details
|
|
34
33
|
*/
|
|
35
|
-
export type
|
|
34
|
+
export type TErrorResponseDetail = IValidationErrorDetail[] | IMissingFieldsErrorDetail | IRateLimitErrorDetail | Record<string, unknown> | string;
|
|
36
35
|
/**
|
|
37
36
|
* Typed API Error
|
|
38
37
|
* API error with typed details
|
|
39
38
|
*/
|
|
40
|
-
export interface
|
|
39
|
+
export interface ITypedApiError<T = TErrorResponseDetail> {
|
|
41
40
|
message: string;
|
|
42
|
-
code:
|
|
41
|
+
code: TErrorCode;
|
|
43
42
|
details?: T;
|
|
44
43
|
}
|
|
45
44
|
/**
|
|
46
45
|
* Error Helper Types
|
|
47
46
|
* For identifying specific error types
|
|
48
47
|
*/
|
|
49
|
-
export type
|
|
50
|
-
export type
|
|
51
|
-
export type
|
|
48
|
+
export type TValidationError = ITypedApiError<IValidationErrorDetail[]>;
|
|
49
|
+
export type TMissingFieldsError = ITypedApiError<IMissingFieldsErrorDetail>;
|
|
50
|
+
export type TRateLimitError = ITypedApiError<IRateLimitErrorDetail>;
|
|
52
51
|
/**
|
|
53
52
|
* Type guard for ValidationError
|
|
54
53
|
*/
|
|
55
|
-
export declare function isValidationError(error:
|
|
54
|
+
export declare function isValidationError(error: unknown): error is TValidationError;
|
|
56
55
|
/**
|
|
57
56
|
* Type guard for MissingFieldsError
|
|
58
57
|
*/
|
|
59
|
-
export declare function isMissingFieldsError(error:
|
|
58
|
+
export declare function isMissingFieldsError(error: unknown): error is TMissingFieldsError;
|
|
60
59
|
/**
|
|
61
60
|
* Type guard for RateLimitError
|
|
62
61
|
*/
|
|
63
|
-
export declare function isRateLimitError(error:
|
|
62
|
+
export declare function isRateLimitError(error: unknown): error is TRateLimitError;
|
|
64
63
|
/**
|
|
65
64
|
* Type guard for authentication errors
|
|
66
65
|
*/
|
|
67
|
-
export declare function isAuthError(error:
|
|
66
|
+
export declare function isAuthError(error: unknown): boolean;
|