@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.
Files changed (44) hide show
  1. package/dist/helpers/date/index.d.ts +113 -0
  2. package/dist/helpers/date/index.js +171 -0
  3. package/dist/helpers/index.d.ts +3 -1
  4. package/dist/helpers/index.js +2 -1
  5. package/dist/helpers/object/index.d.ts +160 -75
  6. package/dist/helpers/object/index.js +355 -168
  7. package/dist/helpers/string/index.d.ts +227 -74
  8. package/dist/helpers/string/index.js +448 -114
  9. package/dist/types/api/index.d.ts +22 -11
  10. package/dist/types/api/index.js +9 -2
  11. package/dist/types/auth/index.d.ts +56 -18
  12. package/dist/types/auth/index.js +7 -0
  13. package/dist/types/auth/routes.d.ts +52 -43
  14. package/dist/types/auth/routes.js +0 -1
  15. package/dist/types/base/index.d.ts +188 -69
  16. package/dist/types/base/index.js +116 -0
  17. package/dist/types/base/paging.types.d.ts +11 -11
  18. package/dist/types/checklist-template/index.d.ts +8 -8
  19. package/dist/types/checklist-template/routes.d.ts +28 -28
  20. package/dist/types/company/index.d.ts +5 -5
  21. package/dist/types/company/routes.d.ts +23 -23
  22. package/dist/types/damage-report/index.d.ts +9 -9
  23. package/dist/types/damage-report/routes.d.ts +38 -38
  24. package/dist/types/errors/index.d.ts +15 -16
  25. package/dist/types/errors/index.js +17 -7
  26. package/dist/types/index.d.ts +1 -0
  27. package/dist/types/index.js +1 -0
  28. package/dist/types/inventory/index.d.ts +19 -19
  29. package/dist/types/inventory/routes.d.ts +36 -36
  30. package/dist/types/job/index.d.ts +7 -0
  31. package/dist/types/job/index.js +1 -0
  32. package/dist/types/property/index.d.ts +88 -29
  33. package/dist/types/property/index.js +23 -23
  34. package/dist/types/property/routes.d.ts +41 -14
  35. package/dist/types/property/routes.js +0 -1
  36. package/dist/types/room/index.d.ts +4 -4
  37. package/dist/types/room/routes.d.ts +8 -8
  38. package/dist/types/room-checklist/index.d.ts +9 -9
  39. package/dist/types/room-checklist/routes.d.ts +28 -28
  40. package/dist/types/user/index.d.ts +12 -12
  41. package/dist/types/user/routes.d.ts +15 -15
  42. package/dist/types/work-session/index.d.ts +12 -12
  43. package/dist/types/work-session/routes.d.ts +34 -34
  44. package/package.json +13 -4
@@ -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 metadata for a paginated response.
2
+ * Represents the pagination IMetaData for a paginated response.
3
3
  */
4
- export interface PagingResult {
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 DataWithPagingResult<T> {
13
+ export interface IDataWithPagingResult<T> {
14
14
  data: T;
15
- pagination: PagingResult;
15
+ pagination: IPagingResult;
16
16
  }
17
17
  /**
18
18
  * Defines a sorting condition for query results.
19
19
  */
20
- export interface SortCondition {
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 FilterCondition {
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 PaginationRequest {
39
+ export interface IPaginationRequest {
40
40
  page: number;
41
41
  size: number;
42
- sort?: SortCondition[];
43
- filters?: FilterCondition[];
42
+ sort?: ISortCondition[];
43
+ filters?: IFilterCondition[];
44
44
  }
45
- export declare const createPagingObject: (page: number, size: number, sort?: SortCondition[], filters?: FilterCondition[]) => {
46
- pagination: any;
45
+ export declare const createPagingObject: (page: number, size: number, sort?: ISortCondition[], filters?: IFilterCondition[]) => {
46
+ pagination: IPaginationRequest;
47
47
  };
@@ -1,15 +1,15 @@
1
- import { MetaData } from "../index";
1
+ import { IMetaData } from "../index";
2
2
  export * from "./routes";
3
- export interface ChecklistTemplate extends MetaData {
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: ChecklistTemplateItem[];
10
+ items: IChecklistTemplateItem[];
11
11
  }
12
- export interface ChecklistTemplateItem extends MetaData {
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 ChecklistTemplateWithItems extends ChecklistTemplate {
26
- items: ChecklistTemplateItem[];
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 CreateTemplateInput {
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 CreateTemplateItemInput {
41
+ export interface ICreateTemplateItemInput {
42
42
  title: string;
43
43
  description?: string;
44
44
  displayOrder: number;
@@ -1,56 +1,56 @@
1
- export interface CreateTemplateRequest {
1
+ export interface ICreateTemplateRequest {
2
2
  }
3
- export interface CreateTemplateResponse {
3
+ export interface ICreateTemplateResponse {
4
4
  }
5
- export interface CreateTemplateWithItemsRequest {
5
+ export interface ICreateTemplateWithItemsRequest {
6
6
  }
7
- export interface CreateTemplateWithItemsResponse {
7
+ export interface ICreateTemplateWithItemsResponse {
8
8
  }
9
- export interface GetTemplatesByCompanyIdRequest {
9
+ export interface IGetTemplatesByCompanyIdRequest {
10
10
  }
11
- export interface GetTemplatesByCompanyIdResponse {
11
+ export interface IGetTemplatesByCompanyIdResponse {
12
12
  }
13
- export interface GetTemplateByIdRequest {
13
+ export interface IGetTemplateByIdRequest {
14
14
  }
15
- export interface GetTemplateByIdResponse {
15
+ export interface IGetTemplateByIdResponse {
16
16
  }
17
- export interface GetTemplateWithItemsRequest {
17
+ export interface IGetTemplateWithItemsRequest {
18
18
  }
19
- export interface GetTemplateWithItemsResponse {
19
+ export interface IGetTemplateWithItemsResponse {
20
20
  }
21
- export interface UpdateTemplateRequest {
21
+ export interface IUpdateTemplateRequest {
22
22
  }
23
- export interface UpdateTemplateResponse {
23
+ export interface IUpdateTemplateResponse {
24
24
  }
25
- export interface DeleteTemplateRequest {
25
+ export interface IDeleteTemplateRequest {
26
26
  }
27
- export interface DeleteTemplateResponse {
27
+ export interface IDeleteTemplateResponse {
28
28
  }
29
- export interface ToggleTemplateActiveRequest {
29
+ export interface IToggleTemplateActiveRequest {
30
30
  }
31
- export interface ToggleTemplateActiveResponse {
31
+ export interface IToggleTemplateActiveResponse {
32
32
  }
33
- export interface GetTemplateUsageRequest {
33
+ export interface IGetTemplateUsageRequest {
34
34
  }
35
- export interface GetTemplateUsageResponse {
35
+ export interface IGetTemplateUsageResponse {
36
36
  }
37
- export interface GetTemplateItemsRequest {
37
+ export interface IGetTemplateItemsRequest {
38
38
  }
39
- export interface GetTemplateItemsResponse {
39
+ export interface IGetTemplateItemsResponse {
40
40
  }
41
- export interface AddTemplateItemRequest {
41
+ export interface IAddTemplateItemRequest {
42
42
  }
43
- export interface AddTemplateItemResponse {
43
+ export interface IAddTemplateItemResponse {
44
44
  }
45
- export interface UpdateTemplateItemRequest {
45
+ export interface IUpdateTemplateItemRequest {
46
46
  }
47
- export interface UpdateTemplateItemResponse {
47
+ export interface IUpdateTemplateItemResponse {
48
48
  }
49
- export interface DeleteTemplateItemRequest {
49
+ export interface IDeleteTemplateItemRequest {
50
50
  }
51
- export interface DeleteTemplateItemResponse {
51
+ export interface IDeleteTemplateItemResponse {
52
52
  }
53
- export interface ReorderTemplateItemsRequest {
53
+ export interface IReorderTemplateItemsRequest {
54
54
  }
55
- export interface ReorderTemplateItemsResponse {
55
+ export interface IReorderTemplateItemsResponse {
56
56
  }
@@ -1,13 +1,13 @@
1
- import { MetaData, ObjectValues, USStateCodeType } from "../index";
1
+ import { IMetaData, TRecordValue, TUnitedStatesStateCode } from "../index";
2
2
  export * from "./routes";
3
- export interface Company extends MetaData {
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?: USStateCodeType;
10
- companyType: 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 CompanyType = ObjectValues<typeof COMPANY_TYPES>;
22
+ export type TCompanyType = TRecordValue<typeof COMPANY_TYPES>;
@@ -1,52 +1,52 @@
1
- import { Company, CompanyType } from ".";
2
- import { AccountType } from "../user";
3
- export interface CreateCompanyRequest {
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: CompanyType;
10
+ companyType: TCompanyType;
11
11
  }
12
- export interface CreateCompanyResponse {
13
- company: Company;
12
+ export interface ICreateCompanyResponse {
13
+ company: ICompany;
14
14
  }
15
- export interface GetCompanyByIdRequest {
15
+ export interface IGetCompanyByIdRequest {
16
16
  }
17
- export interface GetCompanyByIdResponse {
18
- company: Company;
17
+ export interface IGetCompanyByIdResponse {
18
+ company: ICompany;
19
19
  }
20
- export interface UpdateCompanyRequest {
20
+ export interface IUpdateCompanyRequest {
21
21
  companyId: string;
22
- company: Partial<Company>;
22
+ company: Partial<ICompany>;
23
23
  }
24
- export interface UpdateCompanyResponse {
25
- company: Company;
24
+ export interface IUpdateCompanyResponse {
25
+ company: ICompany;
26
26
  }
27
- export interface InviteUserToCompanyRequest {
27
+ export interface IInviteUserToCompanyRequest {
28
28
  companyId: string;
29
29
  email: string;
30
- role: AccountType;
30
+ role: TAccountType;
31
31
  userId: string;
32
32
  }
33
- export interface InviteUserToCompanyResponse {
33
+ export interface IInviteUserToCompanyResponse {
34
34
  message: string;
35
35
  }
36
- export interface GetCompanyUsersRequest {
36
+ export interface IGetCompanyUsersRequest {
37
37
  }
38
- export interface GetCompanyUsersResponse {
39
- company: Partial<Company>;
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: AccountType;
45
+ role: TAccountType;
46
46
  }[];
47
47
  }
48
- export interface GetUserCompaniesRequest {
48
+ export interface IGetUserCompaniesRequest {
49
49
  }
50
- export interface GetUserCompaniesResponse {
51
- companies: Company[];
50
+ export interface IGetUserCompaniesResponse {
51
+ companies: ICompany[];
52
52
  }
@@ -1,14 +1,14 @@
1
1
  export * from "./routes";
2
- export type DamageSeverity = "MINOR" | "MODERATE" | "SEVERE" | "CRITICAL";
3
- export type DamageStatus = "OPEN" | "IN_REVIEW" | "RESOLVED" | "ESCALATED";
4
- export interface DamageReport {
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: DamageSeverity;
11
- status: DamageStatus;
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: DamagePhoto[];
23
- comments: DamageComment[];
22
+ photos: IDamagePhoto[];
23
+ comments: IDamageComment[];
24
24
  }
25
- export interface DamagePhoto {
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 DamageComment {
34
+ export interface IDamageComment {
35
35
  id: string;
36
36
  damageReportId: string;
37
37
  userId: string;
@@ -1,76 +1,76 @@
1
- export interface CreateDamageReportRequest {
1
+ export interface ICreateDamageReportRequest {
2
2
  }
3
- export interface CreateDamageReportResponse {
3
+ export interface ICreateDamageReportResponse {
4
4
  }
5
- export interface GetDamageReportByIdRequest {
5
+ export interface IGetDamageReportByIdRequest {
6
6
  }
7
- export interface GetDamageReportByIdResponse {
7
+ export interface IGetDamageReportByIdResponse {
8
8
  }
9
- export interface UpdateDamageReportRequest {
9
+ export interface IUpdateDamageReportRequest {
10
10
  }
11
- export interface UpdateDamageReportResponse {
11
+ export interface IUpdateDamageReportResponse {
12
12
  }
13
- export interface UpdateDamageReportStatusRequest {
13
+ export interface IUpdateDamageReportStatusRequest {
14
14
  }
15
- export interface UpdateDamageReportStatusResponse {
15
+ export interface IUpdateDamageReportStatusResponse {
16
16
  }
17
- export interface AssignDamageReportRequest {
17
+ export interface IAssignDamageReportRequest {
18
18
  }
19
- export interface AssignDamageReportResponse {
19
+ export interface IAssignDamageReportResponse {
20
20
  }
21
- export interface ResolveDamageReportRequest {
21
+ export interface IResolveDamageReportRequest {
22
22
  }
23
- export interface ResolveDamageReportResponse {
23
+ export interface IResolveDamageReportResponse {
24
24
  }
25
- export interface GetDamageReportsByPropertyIdRequest {
25
+ export interface IGetDamageReportsByPropertyIdRequest {
26
26
  }
27
- export interface GetDamageReportsByPropertyIdResponse {
27
+ export interface IGetDamageReportsByPropertyIdResponse {
28
28
  }
29
- export interface GetDamageReportsByRoomIdRequest {
29
+ export interface IGetDamageReportsByRoomIdRequest {
30
30
  }
31
- export interface GetDamageReportsByRoomIdResponse {
31
+ export interface IGetDamageReportsByRoomIdResponse {
32
32
  }
33
- export interface GetDamageReportPhotosRequest {
33
+ export interface IGetDamageReportPhotosRequest {
34
34
  }
35
- export interface GetDamageReportPhotosResponse {
35
+ export interface IGetDamageReportPhotosResponse {
36
36
  }
37
- export interface AddDamageReportPhotoRequest {
37
+ export interface IAddDamageReportPhotoRequest {
38
38
  }
39
- export interface AddDamageReportPhotoResponse {
39
+ export interface IAddDamageReportPhotoResponse {
40
40
  }
41
- export interface GetDamageReportCommentsRequest {
41
+ export interface IGetDamageReportCommentsRequest {
42
42
  }
43
- export interface GetDamageReportCommentsResponse {
43
+ export interface IGetDamageReportCommentsResponse {
44
44
  }
45
- export interface AddDamageReportCommentRequest {
45
+ export interface IAddDamageReportCommentRequest {
46
46
  }
47
- export interface AddDamageReportCommentResponse {
47
+ export interface IAddDamageReportCommentResponse {
48
48
  }
49
- export interface GetDamageReportHistoryRequest {
49
+ export interface IGetDamageReportHistoryRequest {
50
50
  }
51
- export interface GetDamageReportHistoryResponse {
51
+ export interface IGetDamageReportHistoryResponse {
52
52
  }
53
- export interface CreateWorkOrderRequest {
53
+ export interface ICreateWorkOrderRequest {
54
54
  }
55
- export interface CreateWorkOrderResponse {
55
+ export interface ICreateWorkOrderResponse {
56
56
  }
57
- export interface GetWorkOrderByIdRequest {
57
+ export interface IGetWorkOrderByIdRequest {
58
58
  }
59
- export interface GetWorkOrderByIdResponse {
59
+ export interface IGetWorkOrderByIdResponse {
60
60
  }
61
- export interface UpdateWorkOrderRequest {
61
+ export interface IUpdateWorkOrderRequest {
62
62
  }
63
- export interface UpdateWorkOrderResponse {
63
+ export interface IUpdateWorkOrderResponse {
64
64
  }
65
- export interface AssignWorkOrderRequest {
65
+ export interface IAssignWorkOrderRequest {
66
66
  }
67
- export interface AssignWorkOrderResponse {
67
+ export interface IAssignWorkOrderResponse {
68
68
  }
69
- export interface CompleteWorkOrderRequest {
69
+ export interface ICompleteWorkOrderRequest {
70
70
  }
71
- export interface CompleteWorkOrderResponse {
71
+ export interface ICompleteWorkOrderResponse {
72
72
  }
73
- export interface GetWorkOrdersByPropertyIdRequest {
73
+ export interface IGetWorkOrdersByPropertyIdRequest {
74
74
  }
75
- export interface GetWorkOrdersByPropertyIdResponse {
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 { ErrorCode } from "../api";
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 ValidationErrorDetail {
10
+ export interface IValidationErrorDetail {
12
11
  field: string;
13
12
  message: string;
14
- value?: TurndownObject;
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 MissingFieldsErrorDetail {
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 RateLimitErrorDetail {
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 ErrorResponseDetail = ValidationErrorDetail[] | MissingFieldsErrorDetail | RateLimitErrorDetail | Record<string, TurndownObject> | string;
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 TypedApiError<T = ErrorResponseDetail> {
39
+ export interface ITypedApiError<T = TErrorResponseDetail> {
41
40
  message: string;
42
- code: ErrorCode;
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 ValidationError = TypedApiError<ValidationErrorDetail[]>;
50
- export type MissingFieldsError = TypedApiError<MissingFieldsErrorDetail>;
51
- export type RateLimitError = TypedApiError<RateLimitErrorDetail>;
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: TurndownObject): error is ValidationError;
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: TurndownObject): error is MissingFieldsError;
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: TurndownObject): error is RateLimitError;
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: TurndownObject): boolean;
66
+ export declare function isAuthError(error: unknown): boolean;