@turndown/library 0.1.16 → 0.1.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/helpers/date/index.d.ts +113 -0
- package/dist/helpers/date/index.js +171 -0
- package/dist/helpers/index.d.ts +3 -1
- package/dist/helpers/index.js +2 -1
- package/dist/helpers/object/index.d.ts +160 -75
- package/dist/helpers/object/index.js +355 -168
- package/dist/helpers/string/index.d.ts +227 -74
- package/dist/helpers/string/index.js +448 -114
- package/dist/types/api/index.d.ts +22 -11
- package/dist/types/api/index.js +9 -2
- package/dist/types/auth/index.d.ts +56 -18
- package/dist/types/auth/index.js +7 -0
- package/dist/types/auth/routes.d.ts +76 -47
- package/dist/types/auth/routes.js +0 -1
- package/dist/types/base/index.d.ts +200 -69
- package/dist/types/base/index.js +116 -0
- package/dist/types/base/paging.types.d.ts +11 -11
- package/dist/types/checklist-template/index.d.ts +8 -8
- package/dist/types/checklist-template/routes.d.ts +57 -28
- package/dist/types/checklist-template/routes.js +0 -1
- package/dist/types/company/index.d.ts +5 -5
- package/dist/types/company/routes.d.ts +81 -33
- package/dist/types/company/routes.js +0 -1
- package/dist/types/damage-report/index.d.ts +9 -9
- package/dist/types/damage-report/routes.d.ts +128 -51
- package/dist/types/damage-report/routes.js +0 -1
- package/dist/types/errors/index.d.ts +15 -16
- package/dist/types/errors/index.js +17 -7
- package/dist/types/health/index.d.ts +20 -0
- package/dist/types/health/index.js +1 -0
- package/dist/types/health/routes.d.ts +10 -0
- package/dist/types/health/routes.js +1 -0
- package/dist/types/image/index.d.ts +34 -0
- package/dist/types/image/index.js +11 -0
- package/dist/types/image/routes.d.ts +32 -0
- package/dist/types/image/routes.js +1 -0
- package/dist/types/index.d.ts +3 -0
- package/dist/types/index.js +3 -0
- package/dist/types/inventory/index.d.ts +13 -87
- package/dist/types/inventory/routes.d.ts +73 -36
- package/dist/types/inventory/routes.js +0 -1
- package/dist/types/job/index.d.ts +7 -0
- package/dist/types/job/index.js +1 -0
- package/dist/types/property/index.d.ts +88 -29
- package/dist/types/property/index.js +23 -23
- package/dist/types/property/routes.d.ts +40 -14
- package/dist/types/property/routes.js +0 -1
- package/dist/types/room/index.d.ts +4 -4
- package/dist/types/room/routes.d.ts +27 -8
- package/dist/types/room/routes.js +0 -1
- package/dist/types/room-checklist/index.d.ts +9 -9
- package/dist/types/room-checklist/routes.d.ts +50 -28
- package/dist/types/room-checklist/routes.js +0 -1
- package/dist/types/user/index.d.ts +12 -12
- package/dist/types/user/routes.d.ts +26 -16
- package/dist/types/user/routes.js +0 -1
- package/dist/types/work-session/index.d.ts +12 -12
- package/dist/types/work-session/routes.d.ts +55 -34
- package/dist/types/work-session/routes.js +0 -1
- package/package.json +14 -5
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,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 {
|
|
28
39
|
}
|
|
29
|
-
export interface
|
|
40
|
+
export interface IUpdateTemplateRequest extends Partial<ICreateTemplateInput> {
|
|
30
41
|
}
|
|
31
|
-
export interface
|
|
42
|
+
export interface IUpdateTemplateResponse extends IChecklistTemplate {
|
|
32
43
|
}
|
|
33
|
-
export interface
|
|
44
|
+
export interface IDeleteTemplateRequest extends ITemplateIdParams {
|
|
34
45
|
}
|
|
35
|
-
export interface
|
|
46
|
+
export interface IDeleteTemplateResponse extends IMessageResponse {
|
|
36
47
|
}
|
|
37
|
-
export interface
|
|
48
|
+
export interface IToggleTemplateActiveRequest {
|
|
49
|
+
isActive: boolean;
|
|
38
50
|
}
|
|
39
|
-
export interface
|
|
51
|
+
export interface IToggleTemplateActiveResponse extends IChecklistTemplate {
|
|
40
52
|
}
|
|
41
|
-
export interface
|
|
53
|
+
export interface IGetTemplateUsageRequest extends ITemplateIdParams {
|
|
42
54
|
}
|
|
43
|
-
export interface
|
|
55
|
+
export interface IGetTemplateUsageResponse extends ICountResponse {
|
|
44
56
|
}
|
|
45
|
-
export interface
|
|
57
|
+
export interface IGetTemplateItemsRequest extends ITemplateIdParams {
|
|
46
58
|
}
|
|
47
|
-
export
|
|
59
|
+
export type IGetTemplateItemsResponse = IChecklistTemplateItem[];
|
|
60
|
+
export interface IAddTemplateItemRequest extends ICreateTemplateItemInput {
|
|
61
|
+
title: string;
|
|
48
62
|
}
|
|
49
|
-
export interface
|
|
63
|
+
export interface IAddTemplateItemResponse extends IChecklistTemplateItem {
|
|
50
64
|
}
|
|
51
|
-
export interface
|
|
65
|
+
export interface IUpdateTemplateItemRequest extends Partial<ICreateTemplateItemInput> {
|
|
52
66
|
}
|
|
53
|
-
export interface
|
|
67
|
+
export interface IUpdateTemplateItemResponse extends IChecklistTemplateItem {
|
|
54
68
|
}
|
|
55
|
-
export interface
|
|
69
|
+
export interface IDuplicateTemplateItemRequest extends ITemplateItemIdParams {
|
|
70
|
+
}
|
|
71
|
+
export interface IDuplicateTemplateItemResponse extends IChecklistTemplateItem {
|
|
72
|
+
}
|
|
73
|
+
export interface IDeleteTemplateItemRequest extends ITemplateItemIdParams {
|
|
74
|
+
}
|
|
75
|
+
export interface IDeleteTemplateItemResponse extends IMessageResponse {
|
|
76
|
+
}
|
|
77
|
+
export interface ITemplateItemOrder {
|
|
78
|
+
itemId: string;
|
|
79
|
+
displayOrder: number;
|
|
80
|
+
}
|
|
81
|
+
export interface IReorderTemplateItemsRequest {
|
|
82
|
+
itemOrders: ITemplateItemOrder[];
|
|
83
|
+
}
|
|
84
|
+
export interface IReorderTemplateItemsResponse extends IMessageResponse {
|
|
56
85
|
}
|
|
@@ -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,100 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
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
|
+
}
|
|
20
|
+
export interface ICreateCompanyRequest {
|
|
4
21
|
displayName: string;
|
|
5
22
|
addressLine1?: string;
|
|
6
23
|
addressLine2?: string;
|
|
7
24
|
city?: string;
|
|
8
25
|
stateCode?: string;
|
|
9
26
|
postalCode?: string;
|
|
10
|
-
companyType:
|
|
27
|
+
companyType: TCompanyType;
|
|
11
28
|
}
|
|
12
|
-
export interface
|
|
13
|
-
company: Company;
|
|
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
|
-
companyId: string;
|
|
22
|
-
company: Partial<Company>;
|
|
36
|
+
export interface IGetCompanyByIdResponse extends ICompany {
|
|
23
37
|
}
|
|
24
|
-
export interface
|
|
25
|
-
company: Company;
|
|
38
|
+
export interface IUpdateCompanyRequest extends Partial<ICompany> {
|
|
26
39
|
}
|
|
27
|
-
export interface
|
|
28
|
-
|
|
40
|
+
export interface IUpdateCompanyResponse extends ICompany {
|
|
41
|
+
}
|
|
42
|
+
export interface IInviteUserToCompanyRequest {
|
|
29
43
|
email: string;
|
|
30
|
-
role:
|
|
31
|
-
|
|
44
|
+
role: TAccountType;
|
|
45
|
+
}
|
|
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;
|
|
32
89
|
}
|
|
33
|
-
export interface
|
|
34
|
-
message: string;
|
|
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<Company>;
|
|
40
|
-
users: {
|
|
41
|
-
id: string;
|
|
42
|
-
email: string;
|
|
43
|
-
firstName: string;
|
|
44
|
-
lastName: string;
|
|
45
|
-
role: AccountType;
|
|
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: Company[];
|
|
99
|
+
export interface IRevokeCompanyInvitationResponse extends IMessageResponse {
|
|
52
100
|
}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
export * from "./routes";
|
|
2
|
-
export type
|
|
3
|
-
export type
|
|
4
|
-
export interface
|
|
2
|
+
export type TDamageSeverity = "LOW" | "MEDIUM" | "HIGH" | "CRITICAL";
|
|
3
|
+
export type TDamageStatus = "OPEN" | "IN_REVIEW" | "ASSIGNED" | "IN_PROGRESS" | "RESOLVED" | "CLOSED" | "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;
|