@turndown/library 0.1.24 → 0.1.28

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 (75) hide show
  1. package/dist/index.cjs +1355 -0
  2. package/dist/index.d.cts +2820 -0
  3. package/dist/index.d.ts +2820 -2
  4. package/dist/index.js +1190 -2
  5. package/package.json +3 -2
  6. package/dist/helpers/date/index.d.ts +0 -113
  7. package/dist/helpers/date/index.js +0 -171
  8. package/dist/helpers/index.d.ts +0 -4
  9. package/dist/helpers/index.js +0 -3
  10. package/dist/helpers/object/index.d.ts +0 -298
  11. package/dist/helpers/object/index.js +0 -540
  12. package/dist/helpers/string/index.d.ts +0 -258
  13. package/dist/helpers/string/index.js +0 -496
  14. package/dist/types/api/index.d.ts +0 -71
  15. package/dist/types/api/index.js +0 -54
  16. package/dist/types/auth/index.d.ts +0 -107
  17. package/dist/types/auth/index.js +0 -8
  18. package/dist/types/auth/routes.d.ts +0 -160
  19. package/dist/types/auth/routes.js +0 -1
  20. package/dist/types/base/index.d.ts +0 -200
  21. package/dist/types/base/index.js +0 -177
  22. package/dist/types/base/paging.types.d.ts +0 -47
  23. package/dist/types/base/paging.types.js +0 -1
  24. package/dist/types/checklist-template/index.d.ts +0 -48
  25. package/dist/types/checklist-template/index.js +0 -1
  26. package/dist/types/checklist-template/routes.d.ts +0 -85
  27. package/dist/types/checklist-template/routes.js +0 -1
  28. package/dist/types/company/index.d.ts +0 -22
  29. package/dist/types/company/index.js +0 -7
  30. package/dist/types/company/routes.d.ts +0 -100
  31. package/dist/types/company/routes.js +0 -1
  32. package/dist/types/damage-report/index.d.ts +0 -148
  33. package/dist/types/damage-report/index.js +0 -29
  34. package/dist/types/damage-report/routes.d.ts +0 -112
  35. package/dist/types/damage-report/routes.js +0 -1
  36. package/dist/types/errors/index.d.ts +0 -66
  37. package/dist/types/errors/index.js +0 -41
  38. package/dist/types/health/index.d.ts +0 -20
  39. package/dist/types/health/index.js +0 -1
  40. package/dist/types/health/routes.d.ts +0 -10
  41. package/dist/types/health/routes.js +0 -1
  42. package/dist/types/image/index.d.ts +0 -35
  43. package/dist/types/image/index.js +0 -12
  44. package/dist/types/image/routes.d.ts +0 -32
  45. package/dist/types/image/routes.js +0 -1
  46. package/dist/types/index.d.ts +0 -22
  47. package/dist/types/index.js +0 -22
  48. package/dist/types/inventory/index.d.ts +0 -124
  49. package/dist/types/inventory/index.js +0 -30
  50. package/dist/types/inventory/routes.d.ts +0 -109
  51. package/dist/types/inventory/routes.js +0 -1
  52. package/dist/types/job/index.d.ts +0 -7
  53. package/dist/types/job/index.js +0 -1
  54. package/dist/types/property/index.d.ts +0 -113
  55. package/dist/types/property/index.js +0 -25
  56. package/dist/types/property/routes.d.ts +0 -54
  57. package/dist/types/property/routes.js +0 -1
  58. package/dist/types/room/index.d.ts +0 -28
  59. package/dist/types/room/index.js +0 -17
  60. package/dist/types/room/routes.d.ts +0 -35
  61. package/dist/types/room/routes.js +0 -1
  62. package/dist/types/room-checklist/index.d.ts +0 -43
  63. package/dist/types/room-checklist/index.js +0 -1
  64. package/dist/types/room-checklist/routes.d.ts +0 -78
  65. package/dist/types/room-checklist/routes.js +0 -1
  66. package/dist/types/subscription/index.d.ts +0 -32
  67. package/dist/types/subscription/index.js +0 -16
  68. package/dist/types/user/index.d.ts +0 -59
  69. package/dist/types/user/index.js +0 -20
  70. package/dist/types/user/routes.d.ts +0 -46
  71. package/dist/types/user/routes.js +0 -1
  72. package/dist/types/work-session/index.d.ts +0 -97
  73. package/dist/types/work-session/index.js +0 -18
  74. package/dist/types/work-session/routes.d.ts +0 -89
  75. package/dist/types/work-session/routes.js +0 -1
package/dist/index.d.ts CHANGED
@@ -1,2 +1,2820 @@
1
- export * from "./helpers";
2
- export * from "./types";
1
+ type TDateInput = Date | string | number | null | undefined;
2
+ type TDateFormat = "MM/DD/YYYY" | "MM/DD/YY HH:mm A" | string;
3
+ /**
4
+ * Format a date using a dayjs format string.
5
+ *
6
+ * @param {TDateInput} date - Date-like value to format.
7
+ * @param {TDateFormat} format - dayjs format string.
8
+ * @returns {string} Formatted date or `--` for missing/invalid input.
9
+ */
10
+ declare const formatDate: (date?: TDateInput, format?: TDateFormat) => string;
11
+ /**
12
+ * Return a human-readable relative time string.
13
+ *
14
+ * @param {TDateInput} date - Date-like value to compare against now.
15
+ * @returns {string} Relative time or `--` for missing/invalid input.
16
+ */
17
+ declare const timeAgo: (date: TDateInput) => string;
18
+ /**
19
+ * Add days to a date.
20
+ *
21
+ * @param {TDateInput} date - Source date.
22
+ * @param {number} days - Number of days to add.
23
+ * @returns {Date} Updated date.
24
+ */
25
+ declare const addDays: (date: TDateInput, days: number) => Date;
26
+ /**
27
+ * Subtract days from a date.
28
+ *
29
+ * @param {TDateInput} date - Source date.
30
+ * @param {number} days - Number of days to subtract.
31
+ * @returns {Date} Updated date.
32
+ */
33
+ declare const subtractDays: (date: TDateInput, days: number) => Date;
34
+ /**
35
+ * Return the absolute number of whole day boundaries between two dates.
36
+ *
37
+ * @param {TDateInput} dateA - First date.
38
+ * @param {TDateInput} dateB - Second date.
39
+ * @returns {number} Absolute difference in days, or 0 for invalid input.
40
+ */
41
+ declare const daysBetween: (dateA: TDateInput, dateB: TDateInput) => number;
42
+ /**
43
+ * Check whether a date is today.
44
+ *
45
+ * @param {TDateInput} date - Date-like value.
46
+ * @returns {boolean} True when the date is today.
47
+ */
48
+ declare const isToday: (date: TDateInput) => boolean;
49
+ /**
50
+ * Check whether a date is in the past.
51
+ *
52
+ * @param {TDateInput} date - Date-like value.
53
+ * @returns {boolean} True when the date is before now.
54
+ */
55
+ declare const isPast: (date: TDateInput) => boolean;
56
+ /**
57
+ * Check whether a date is in the future.
58
+ *
59
+ * @param {TDateInput} date - Date-like value.
60
+ * @returns {boolean} True when the date is after now.
61
+ */
62
+ declare const isFuture: (date: TDateInput) => boolean;
63
+ /**
64
+ * Return the start of the day for a date.
65
+ *
66
+ * @param {TDateInput} date - Source date.
67
+ * @returns {Date} Date set to 00:00:00.000.
68
+ */
69
+ declare const startOfDay: (date: TDateInput) => Date;
70
+ /**
71
+ * Return the end of the day for a date.
72
+ *
73
+ * @param {TDateInput} date - Source date.
74
+ * @returns {Date} Date set to 23:59:59.999.
75
+ */
76
+ declare const endOfDay: (date: TDateInput) => Date;
77
+ /**
78
+ * Return the ISO week start date, Monday at 00:00:00.000.
79
+ *
80
+ * @param {TDateInput} date - Source date.
81
+ * @returns {Date} Start of ISO week.
82
+ */
83
+ declare const startOfWeek: (date: TDateInput) => Date;
84
+ /**
85
+ * Return the ISO week end date, Sunday at 23:59:59.999.
86
+ *
87
+ * @param {TDateInput} date - Source date.
88
+ * @returns {Date} End of ISO week.
89
+ */
90
+ declare const endOfWeek: (date: TDateInput) => Date;
91
+ /**
92
+ * Return all seven dates in the ISO week containing the provided date.
93
+ *
94
+ * @param {TDateInput} date - Source date.
95
+ * @returns {Date[]} Monday-through-Sunday dates at the start of each day.
96
+ */
97
+ declare const getWeekDays: (date: TDateInput) => Date[];
98
+ /**
99
+ * Add weeks to a date.
100
+ *
101
+ * @param {TDateInput} date - Source date.
102
+ * @param {number} weeks - Number of weeks to add.
103
+ * @returns {Date} Updated date.
104
+ */
105
+ declare const addWeeks: (date: TDateInput, weeks: number) => Date;
106
+ /**
107
+ * Subtract weeks from a date.
108
+ *
109
+ * @param {TDateInput} date - Source date.
110
+ * @param {number} weeks - Number of weeks to subtract.
111
+ * @returns {Date} Updated date.
112
+ */
113
+ declare const subtractWeeks: (date: TDateInput, weeks: number) => Date;
114
+
115
+ /**
116
+ * Represents the pagination IMetaData for a paginated response.
117
+ */
118
+ interface IPagingResult {
119
+ hasNextPage: boolean;
120
+ totalPages: number;
121
+ totalRecords: number;
122
+ }
123
+ /**
124
+ * A generic wrapper that combines data with pagination information.
125
+ * @template T - The type of data being paginated
126
+ */
127
+ interface IDataWithPagingResult<T> {
128
+ data: T;
129
+ pagination: IPagingResult;
130
+ }
131
+ /**
132
+ * Defines a sorting condition for query results.
133
+ */
134
+ interface ISortCondition {
135
+ name: string;
136
+ direction: "ASC" | "DESC";
137
+ }
138
+ /**
139
+ * Defines a filter condition for querying data.
140
+ * Only one of valueString, valueNumber, or valueBoolean should be provided based on the field type.
141
+ */
142
+ interface IFilterCondition {
143
+ name: string;
144
+ condition: "=" | ">" | "<" | "!=" | "LIKE" | "IN" | ">=" | "<=";
145
+ valueString?: string;
146
+ valueNumber?: number;
147
+ valueBoolean?: boolean;
148
+ useAnd?: boolean;
149
+ }
150
+ /**
151
+ * Represents a request for paginated data with optional sorting and filtering.
152
+ */
153
+ interface IPaginationRequest {
154
+ page: number;
155
+ size: number;
156
+ sort?: ISortCondition[];
157
+ filters?: IFilterCondition[];
158
+ }
159
+ declare const createPagingObject: (page: number, size: number, sort?: ISortCondition[], filters?: IFilterCondition[]) => {
160
+ pagination: IPaginationRequest;
161
+ };
162
+
163
+ type TRecord = Record<string, unknown>;
164
+ type TSortableValue = string | number | bigint | boolean | Date | null | undefined;
165
+ type TReplaceNulls<TValue> = TValue extends null ? "" : TValue extends (infer TItem)[] ? TReplaceNulls<TItem>[] : TValue extends Date ? TValue : TValue extends object ? {
166
+ [TKey in keyof TValue]: TReplaceNulls<TValue[TKey]>;
167
+ } : TValue;
168
+ /**
169
+ * Safely parse a JSON string into a typed value.
170
+ *
171
+ * When a fallback value is provided, the function always returns that generic
172
+ * type. Without a fallback value, parse failures return an empty object.
173
+ *
174
+ * @typeParam TParsed - Expected parsed value type.
175
+ * @param {string | null | undefined} jsonString - JSON string to parse.
176
+ * @param {TParsed} [fallbackValue] - Value returned when parsing fails.
177
+ * @returns {TParsed | Record<string, unknown>} Parsed value or fallback.
178
+ * @example
179
+ * parseJSON<{ a: number }>('{"a":1}', { a: 0 }) // => { a: 1 }
180
+ * parseJSON('not json') // => {}
181
+ */
182
+ declare function parseJSON<TParsed>(jsonString: string | null | undefined, fallbackValue: TParsed): TParsed;
183
+ declare function parseJSON(jsonString: string | null | undefined): Record<string, unknown>;
184
+ /**
185
+ * Stringify a value to JSON while skipping circular references.
186
+ *
187
+ * Uses an internal cache to omit repeated object references that would
188
+ * normally cause `JSON.stringify` to throw.
189
+ *
190
+ * @param {unknown} value - Value to stringify.
191
+ * @returns {string | undefined} JSON string with circulars omitted.
192
+ * @example
193
+ * const value: Record<string, unknown> = {}; value.self = value;
194
+ * JSONStringify(value) // => "{}"
195
+ */
196
+ declare const JSONStringify: (value: unknown) => string | undefined;
197
+ /**
198
+ * Deep-remove `undefined` properties while preserving Dates and arrays.
199
+ *
200
+ * Object properties with `undefined` values are removed. Array items are
201
+ * preserved so array indexes do not shift.
202
+ *
203
+ * @typeParam TValue - Input value type.
204
+ * @param {TValue} value - Input value.
205
+ * @returns {TValue} Cleaned clone with `undefined` object properties removed.
206
+ */
207
+ declare const removeUndefined: <TValue>(value: TValue) => TValue;
208
+ /**
209
+ * Test whether a location object's `pathname` equals a key.
210
+ *
211
+ * @param {{ pathname?: string } | null | undefined} location - Object expected
212
+ * to have a `pathname`.
213
+ * @param {string} key - Path to compare.
214
+ * @returns {boolean}
215
+ * @example
216
+ * validPath({ pathname: "/home" }, "/home") // true
217
+ */
218
+ declare const validPath: (location: {
219
+ pathname?: string;
220
+ } | null | undefined, key: string) => boolean;
221
+ /**
222
+ * Return the first element if the input is an array; otherwise return the value itself.
223
+ *
224
+ * @typeParam T - Element type.
225
+ * @param {T | T[]} input - A single value or an array.
226
+ * @returns {T} First element or the input value.
227
+ * @example
228
+ * returnObject([1,2,3]) // 1
229
+ * returnObject(5) // 5
230
+ */
231
+ declare const returnObject: <T>(input: T | T[]) => T;
232
+ /**
233
+ * Filter out items from `array1` whose `id` appears in `array2`.
234
+ *
235
+ * @typeParam T - Object type with an `id` field.
236
+ * @param {T[]} [array1] - Source array.
237
+ * @param {T[]} [array2] - Items whose `id`s should be excluded.
238
+ * @returns {T[]} Filtered array (or `[]` on invalid input).
239
+ */
240
+ declare const filterArrayById: <T extends {
241
+ id: number | string;
242
+ }>(array1?: T[], array2?: T[]) => T[];
243
+ /**
244
+ * Sort an array of objects by a given property (ascending).
245
+ *
246
+ * Mutates the original array (uses `Array.prototype.sort`).
247
+ *
248
+ * @typeParam T - Object type.
249
+ * @typeParam TKey - Sortable property key.
250
+ * @param {T[]} array - Array to sort.
251
+ * @param {TKey} property - Property name to sort by.
252
+ * @returns {T[]} The same array instance, sorted (or empty array if input invalid).
253
+ */
254
+ declare const sortArrayByProperty: <TKey extends PropertyKey, T extends Record<TKey, TSortableValue>>(array: T[], property: TKey) => T[];
255
+ /**
256
+ * Recursively replace `null` values with empty strings.
257
+ *
258
+ * Works on primitives, arrays, Dates, and plain objects.
259
+ *
260
+ * @typeParam TValue - Input value type.
261
+ * @param {TValue} value - Input value.
262
+ * @returns {TReplaceNulls<TValue>} Value with all `null` replaced by `""`.
263
+ */
264
+ declare const replaceNulls: <TValue>(value: TValue) => TReplaceNulls<TValue>;
265
+ /**
266
+ * Recursively remove object keys that contain a dot (`.`).
267
+ *
268
+ * @typeParam TValue - Input value type.
269
+ * @param {TValue} value - Input object or array.
270
+ * @returns {TValue} New value with dotted keys removed at all levels.
271
+ */
272
+ declare const removeFormProperties: <TValue>(value: TValue) => TValue;
273
+ /**
274
+ * Recursively convert string booleans `"true"`/`"false"` to actual booleans.
275
+ *
276
+ * Leaves all other values unchanged.
277
+ *
278
+ * @typeParam TValue - Input value type.
279
+ * @param {TValue} value - Input object or array.
280
+ * @returns {TValue} New value with boolean-like strings converted.
281
+ */
282
+ declare const convertStringBooleans: <TValue>(value: TValue) => TValue;
283
+ /**
284
+ * Convenience helper to clean form-like data:
285
+ * - Removes `undefined` properties
286
+ * - Converts string booleans to booleans
287
+ * - Removes keys containing a dot (`.`)
288
+ *
289
+ * @typeParam TObject - Form data object type.
290
+ * @param {TObject} objectToClean - Input data.
291
+ * @returns {Partial<TObject>} Cleaned clone.
292
+ */
293
+ declare const cleanFormData: <TObject extends TRecord>(objectToClean: TObject) => Partial<TObject>;
294
+ /**
295
+ * Return a default pagination object, allowing optional sort and filters.
296
+ *
297
+ * @param {ISortCondition[]} [sort] - Optional sort conditions.
298
+ * @param {IFilterCondition[]} [filters] - Optional filter conditions.
299
+ * @returns {{ page: number; size: number; sort: ISortCondition[]; filters: IFilterCondition[] }}
300
+ * @example
301
+ * resetPagination() // => { page:1, size:25, sort:[], filters:[] }
302
+ */
303
+ declare const resetPagination: (sort?: ISortCondition[], filters?: IFilterCondition[]) => {
304
+ page: number;
305
+ size: number;
306
+ sort: ISortCondition[];
307
+ filters: IFilterCondition[];
308
+ };
309
+ /**
310
+ * Format a string of digits into a U.S. phone number.
311
+ *
312
+ * Strips non-numeric characters and formats 10 digits as `(XXX) XXX-XXXX`.
313
+ * Strips a leading US country code when 11 digits are provided.
314
+ * If a value cannot be formatted, returns the original value as a string.
315
+ *
316
+ * @param {string | number} value - Phone number digits (string or number).
317
+ * @returns {string} Formatted phone number, or original input if invalid length.
318
+ * @example
319
+ * formatPhoneNumber("1234567890") // "(123) 456-7890"
320
+ * formatPhoneNumber(9876543210) // "(987) 654-3210"
321
+ * formatPhoneNumber("555") // "555"
322
+ */
323
+ declare const formatPhoneNumber: (value: string | number) => string;
324
+ /**
325
+ * Format a number with thousands separators (commas).
326
+ *
327
+ * @param {number} value - Number to format.
328
+ * @returns {string} String with commas.
329
+ * @example
330
+ * formatNumber(1234567) // "1,234,567"
331
+ */
332
+ declare const formatNumber: (value: number) => string;
333
+ /**
334
+ * Remove comma separators from a number-like value.
335
+ *
336
+ * @param {number | string} value - Number-like value.
337
+ * @returns {string} Value without comma separators.
338
+ */
339
+ declare const parseNumber: (value: number | string) => string;
340
+ /**
341
+ * Delete a property from an object if it exists (no-op if it doesn't).
342
+ *
343
+ * @typeParam TObject - Object type.
344
+ * @param {TObject} objectToUpdate - Target object (mutated).
345
+ * @param {keyof TObject | string} propertyName - Property to delete.
346
+ * @returns {void}
347
+ */
348
+ declare const deletePropertyIfExists: <TObject extends TRecord>(objectToUpdate: TObject, propertyName: keyof TObject | string) => void;
349
+ /**
350
+ * Split an array into chunks of a given size.
351
+ *
352
+ * @typeParam T - Element type.
353
+ * @param {T[]} array - Source array.
354
+ * @param {number} chunkSize - Size of each chunk.
355
+ * @returns {T[][]} Array of chunks (last one may be smaller).
356
+ * @example
357
+ * chunkArray([1,2,3,4,5], 2) // [[1,2],[3,4],[5]]
358
+ */
359
+ declare const chunkArray: <T>(array: T[], chunkSize: number) => T[][];
360
+ /**
361
+ * Return a shallow clone of `objectToOmitFrom` without the listed properties.
362
+ *
363
+ * @typeParam TObject - Source object type.
364
+ * @typeParam TKey - Keys to omit.
365
+ * @param {TObject} objectToOmitFrom - Source object.
366
+ * @param {readonly TKey[]} propsToOmit - Property names to omit.
367
+ * @returns {Omit<TObject, TKey>} New object without omitted props.
368
+ * @example
369
+ * omitProperties({a:1,b:2}, ["b"]) // { a:1 }
370
+ */
371
+ declare const omitProperties: <TObject extends TRecord, TKey extends keyof TObject>(objectToOmitFrom: TObject, propsToOmit: readonly TKey[]) => Omit<TObject, TKey>;
372
+ /**
373
+ * Safe `hasOwnProperty` check.
374
+ *
375
+ * @param {unknown} value - Value to test.
376
+ * @param {PropertyKey} key - Property name.
377
+ * @returns {boolean}
378
+ */
379
+ declare const hasProperty: <TKey extends PropertyKey>(value: unknown, key: TKey) => value is Record<TKey, unknown>;
380
+ /**
381
+ * Safe `hasOwnProperty` alias from the reference utilities.
382
+ *
383
+ * @param {unknown} value - Value to test.
384
+ * @param {PropertyKey} key - Property name.
385
+ * @returns {boolean}
386
+ */
387
+ declare const hasOwnProp: <TKey extends PropertyKey>(value: unknown, key: TKey) => value is Record<TKey, unknown>;
388
+ /**
389
+ * Determine if an object has at least one own enumerable property.
390
+ *
391
+ * @param {unknown} value - Object to test.
392
+ * @returns {boolean} `true` if there is at least one key.
393
+ */
394
+ declare const hasProperties: (value: unknown) => boolean;
395
+ /**
396
+ * Get the first own enumerable property value from an object.
397
+ *
398
+ * @typeParam TObject - Source object type.
399
+ * @param {TObject | null | undefined} value - Source object.
400
+ * @returns {TObject[keyof TObject] | null} First value, or null for empty/non-object input.
401
+ */
402
+ declare const getFirstPropertyValue: <TObject extends TRecord>(value: TObject | null | undefined) => TObject[keyof TObject] | null;
403
+ /**
404
+ * Get a nested value from an object using dot notation.
405
+ *
406
+ * @param {unknown} value - Source object.
407
+ * @param {string} path - Dot-delimited path.
408
+ * @returns {unknown} Nested value, or undefined when the path cannot be resolved.
409
+ * @example
410
+ * getNestedValue({ user: { name: "John" } }, "user.name") // "John"
411
+ */
412
+ declare const getNestedValue: (value: unknown, path: string) => unknown;
413
+ /**
414
+ * Set a nested value on an object using dot notation.
415
+ *
416
+ * Mutates and returns the provided object. Unsafe path segments are ignored to
417
+ * prevent prototype pollution.
418
+ *
419
+ * @typeParam TObject - Target object type.
420
+ * @param {TObject} objectToUpdate - Target object.
421
+ * @param {string} path - Dot-delimited path.
422
+ * @param {unknown} value - Value to set.
423
+ * @returns {TObject} The mutated target object.
424
+ * @example
425
+ * setNestedValue({}, "user.name", "John") // { user: { name: "John" } }
426
+ */
427
+ declare const setNestedValue: <TObject extends TRecord>(objectToUpdate: TObject, path: string, value: unknown) => TObject;
428
+ /**
429
+ * Deep clone a value while preserving Dates and circular references.
430
+ *
431
+ * @typeParam TValue - Input value type.
432
+ * @param {TValue} value - Value to clone.
433
+ * @returns {TValue} Deep clone of the input.
434
+ */
435
+ declare const deepClone: <TValue>(value: TValue) => TValue;
436
+ /**
437
+ * Flatten a nested object into dot notation.
438
+ *
439
+ * Arrays and Dates are treated as leaf values.
440
+ *
441
+ * @param {TRecord} value - Source object.
442
+ * @param {string} [prefix] - Internal prefix for recursion.
443
+ * @returns {TRecord} Flattened object.
444
+ * @example
445
+ * flatten({ user: { name: "John" } }) // { "user.name": "John" }
446
+ */
447
+ declare const flatten: (value: TRecord, prefix?: string) => TRecord;
448
+ /**
449
+ * Convert a dot-notation object into a nested object.
450
+ *
451
+ * Unsafe path segments are ignored to prevent prototype pollution.
452
+ *
453
+ * @param {TRecord} value - Dot-notation source object.
454
+ * @returns {TRecord} Nested object.
455
+ * @example
456
+ * unflatten({ "user.name": "John" }) // { user: { name: "John" } }
457
+ */
458
+ declare const unflatten: (value: TRecord) => TRecord;
459
+
460
+ type TJsonPrimitive = string | number | boolean | null;
461
+ type TJsonValue = TJsonPrimitive | TJsonValue[] | {
462
+ [key: string]: TJsonValue;
463
+ };
464
+ type TUnknownRecord = Record<string, unknown>;
465
+ type TurndownObject<TObject extends object = TUnknownRecord> = {
466
+ [TKey in keyof TObject]: TObject[TKey];
467
+ };
468
+ type TEmptyObject = Record<string, never>;
469
+ interface IMessageResponse {
470
+ message: string;
471
+ }
472
+ interface ISuccessResponse {
473
+ success: boolean;
474
+ }
475
+ interface ICountResponse {
476
+ count: number;
477
+ }
478
+ interface IEmptyRouteParams {
479
+ }
480
+ interface IMetaData {
481
+ createdAt: Date;
482
+ updatedAt: Date;
483
+ deletedAt?: Date;
484
+ }
485
+ type TRecordValue<T> = T[keyof T];
486
+ type TRecordKeys<T> = [keyof T];
487
+ interface IVersion {
488
+ major: number;
489
+ minor: number;
490
+ patch: number;
491
+ }
492
+ type TVersionInput = string | IVersion;
493
+ interface ISelectOption<TValue extends string = string> {
494
+ label: string;
495
+ value: TValue;
496
+ }
497
+ type TMode = "CREATE" | "EDIT" | "DELETE" | "DETAILS" | null;
498
+ declare const IMAGE_ENTITY: {
499
+ readonly USER_PROFILE: "user_profile";
500
+ readonly PROPERTY: "property";
501
+ readonly PROPERTY_ROOM: "property_room";
502
+ readonly MAINTENANCE_TICKET: "maintenance_ticket";
503
+ readonly WORK_REPORT: "work_report";
504
+ };
505
+ type TImageEntityType = TRecordValue<typeof IMAGE_ENTITY>;
506
+ declare const US_STATES_CODE: {
507
+ readonly AL: "AL";
508
+ readonly AK: "AK";
509
+ readonly AZ: "AZ";
510
+ readonly AR: "AR";
511
+ readonly CA: "CA";
512
+ readonly CO: "CO";
513
+ readonly CT: "CT";
514
+ readonly DE: "DE";
515
+ readonly FL: "FL";
516
+ readonly GA: "GA";
517
+ readonly HI: "HI";
518
+ readonly ID: "ID";
519
+ readonly IL: "IL";
520
+ readonly IN: "IN";
521
+ readonly IA: "IA";
522
+ readonly KS: "KS";
523
+ readonly KY: "KY";
524
+ readonly LA: "LA";
525
+ readonly ME: "ME";
526
+ readonly MD: "MD";
527
+ readonly MA: "MA";
528
+ readonly MI: "MI";
529
+ readonly MN: "MN";
530
+ readonly MS: "MS";
531
+ readonly MO: "MO";
532
+ readonly MT: "MT";
533
+ readonly NE: "NE";
534
+ readonly NV: "NV";
535
+ readonly NH: "NH";
536
+ readonly NJ: "NJ";
537
+ readonly NM: "NM";
538
+ readonly NY: "NY";
539
+ readonly NC: "NC";
540
+ readonly ND: "ND";
541
+ readonly OH: "OH";
542
+ readonly OK: "OK";
543
+ readonly OR: "OR";
544
+ readonly PA: "PA";
545
+ readonly RI: "RI";
546
+ readonly SC: "SC";
547
+ readonly SD: "SD";
548
+ readonly TN: "TN";
549
+ readonly TX: "TX";
550
+ readonly UT: "UT";
551
+ readonly VT: "VT";
552
+ readonly VA: "VA";
553
+ readonly WA: "WA";
554
+ readonly WV: "WV";
555
+ readonly WI: "WI";
556
+ readonly WY: "WY";
557
+ readonly DC: "DC";
558
+ readonly PR: "PR";
559
+ readonly GU: "GU";
560
+ readonly VI: "VI";
561
+ readonly AS: "AS";
562
+ readonly MP: "MP";
563
+ };
564
+ type TUSStateCode = TRecordValue<typeof US_STATES_CODE>;
565
+ declare const US_JURISDICTIONS: {
566
+ readonly AL: "Alabama";
567
+ readonly AK: "Alaska";
568
+ readonly AZ: "Arizona";
569
+ readonly AR: "Arkansas";
570
+ readonly CA: "California";
571
+ readonly CO: "Colorado";
572
+ readonly CT: "Connecticut";
573
+ readonly DE: "Delaware";
574
+ readonly FL: "Florida";
575
+ readonly GA: "Georgia";
576
+ readonly HI: "Hawaii";
577
+ readonly ID: "Idaho";
578
+ readonly IL: "Illinois";
579
+ readonly IN: "Indiana";
580
+ readonly IA: "Iowa";
581
+ readonly KS: "Kansas";
582
+ readonly KY: "Kentucky";
583
+ readonly LA: "Louisiana";
584
+ readonly ME: "Maine";
585
+ readonly MD: "Maryland";
586
+ readonly MA: "Massachusetts";
587
+ readonly MI: "Michigan";
588
+ readonly MN: "Minnesota";
589
+ readonly MS: "Mississippi";
590
+ readonly MO: "Missouri";
591
+ readonly MT: "Montana";
592
+ readonly NE: "Nebraska";
593
+ readonly NV: "Nevada";
594
+ readonly NH: "New Hampshire";
595
+ readonly NJ: "New Jersey";
596
+ readonly NM: "New Mexico";
597
+ readonly NY: "New York";
598
+ readonly NC: "North Carolina";
599
+ readonly ND: "North Dakota";
600
+ readonly OH: "Ohio";
601
+ readonly OK: "Oklahoma";
602
+ readonly OR: "Oregon";
603
+ readonly PA: "Pennsylvania";
604
+ readonly RI: "Rhode Island";
605
+ readonly SC: "South Carolina";
606
+ readonly SD: "South Dakota";
607
+ readonly TN: "Tennessee";
608
+ readonly TX: "Texas";
609
+ readonly UT: "Utah";
610
+ readonly VT: "Vermont";
611
+ readonly VA: "Virginia";
612
+ readonly WA: "Washington";
613
+ readonly WV: "West Virginia";
614
+ readonly WI: "Wisconsin";
615
+ readonly WY: "Wyoming";
616
+ readonly DC: "District of Columbia";
617
+ readonly PR: "Puerto Rico";
618
+ readonly GU: "Guam";
619
+ readonly VI: "United States Virgin Islands";
620
+ readonly AS: "American Samoa";
621
+ readonly MP: "Northern Mariana Islands";
622
+ };
623
+ type TUSJurisdiction = TRecordValue<typeof US_JURISDICTIONS>;
624
+ declare const UnitedStatesJurisdictionOptions: ISelectOption<TUSJurisdiction>[];
625
+ declare const STATUS: {
626
+ readonly Pending: "Pending";
627
+ readonly InProgress: "InProgress";
628
+ readonly Completed: "Completed";
629
+ readonly Overdue: "Overdue";
630
+ readonly Active: "Active";
631
+ readonly Inactive: "Inactive";
632
+ };
633
+ type TStatus = TRecordValue<typeof STATUS>;
634
+ declare const StatusOptions: ISelectOption<TStatus>[];
635
+ declare const SEVERITY: {
636
+ readonly Low: "Low";
637
+ readonly Medium: "Medium";
638
+ readonly High: "High";
639
+ };
640
+ type TSeverity = TRecordValue<typeof SEVERITY>;
641
+ declare const SeverityOptions: ISelectOption<TSeverity>[];
642
+ declare const SERVICE_TYPES: {
643
+ readonly Cleaning: "Cleaning";
644
+ readonly Maintenance: "Maintenance";
645
+ readonly Inspection: "Inspections";
646
+ readonly Other: "Other";
647
+ };
648
+ type TServiceType = TRecordValue<typeof SERVICE_TYPES>;
649
+ declare const ServiceTypeOptions: ISelectOption<TServiceType>[];
650
+ declare const MONTHS: readonly ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];
651
+ type TMonth = (typeof MONTHS)[number];
652
+ interface IWeekDay {
653
+ date: Date;
654
+ dayOfMonth: number;
655
+ shortLabel: string;
656
+ letter: string;
657
+ isToday: boolean;
658
+ }
659
+
660
+ /**
661
+ * API Response Types
662
+ * Standard response structure for all API endpoints
663
+ */
664
+
665
+ declare const HTTP_METHOD: {
666
+ readonly Get: "GET";
667
+ readonly Post: "POST";
668
+ readonly Put: "PUT";
669
+ readonly Patch: "PATCH";
670
+ readonly Delete: "DELETE";
671
+ };
672
+ type THttpMethod = (typeof HTTP_METHOD)[keyof typeof HTTP_METHOD];
673
+ interface IApiError<TDetails extends object = TurndownObject> {
674
+ message: string;
675
+ code?: string;
676
+ details?: TDetails;
677
+ }
678
+ interface IApiMeta {
679
+ timestamp: string;
680
+ version: string;
681
+ environment: string;
682
+ requestId?: string;
683
+ }
684
+ interface IApiResponse<TData = TurndownObject> {
685
+ success: boolean;
686
+ data?: TData | null;
687
+ error?: IApiError | null;
688
+ meta?: IApiMeta;
689
+ }
690
+ type TApiResponse<T> = {
691
+ data: T;
692
+ };
693
+ /**
694
+ * Error Codes
695
+ * Standardized error codes used across the platform
696
+ */
697
+ declare const ERROR_CODES: {
698
+ readonly BAD_REQUEST: "BAD_REQUEST";
699
+ readonly VALIDATION_ERROR: "VALIDATION_ERROR";
700
+ readonly MISSING_FIELDS: "MISSING_FIELDS";
701
+ readonly UNAUTHORIZED: "UNAUTHORIZED";
702
+ readonly INVALID_TOKEN: "INVALID_TOKEN";
703
+ readonly INVALID_CREDENTIALS: "INVALID_CREDENTIALS";
704
+ readonly FORBIDDEN: "FORBIDDEN";
705
+ readonly NOT_FOUND: "NOT_FOUND";
706
+ readonly CONFLICT: "CONFLICT";
707
+ readonly ALREADY_EXISTS: "ALREADY_EXISTS";
708
+ readonly RATE_LIMIT: "RATE_LIMIT";
709
+ readonly RATE_LIMIT_EXCEEDED: "RATE_LIMIT_EXCEEDED";
710
+ readonly INTERNAL_ERROR: "INTERNAL_ERROR";
711
+ readonly DATABASE_ERROR: "DATABASE_ERROR";
712
+ };
713
+ type TErrorCode = (typeof ERROR_CODES)[keyof typeof ERROR_CODES];
714
+ /**
715
+ * HTTP Status Codes
716
+ * Common status codes used in responses
717
+ */
718
+ declare const HTTP_STATUS: {
719
+ readonly OK: 200;
720
+ readonly CREATED: 201;
721
+ readonly NO_CONTENT: 204;
722
+ readonly BAD_REQUEST: 400;
723
+ readonly UNAUTHORIZED: 401;
724
+ readonly FORBIDDEN: 403;
725
+ readonly NOT_FOUND: 404;
726
+ readonly CONFLICT: 409;
727
+ readonly RATE_LIMIT: 429;
728
+ readonly INTERNAL_ERROR: 500;
729
+ };
730
+ type THttpStatusCode = (typeof HTTP_STATUS)[keyof typeof HTTP_STATUS];
731
+
732
+ interface IUserIdParams {
733
+ id: string;
734
+ }
735
+ interface IGetUserResponse {
736
+ user: IUserSafe | null;
737
+ }
738
+ interface IGetCurrentUserRequest {
739
+ }
740
+ interface IGetCurrentUserResponse extends IGetUserResponse {
741
+ }
742
+ interface IGetUserByIdRequest extends IUserIdParams {
743
+ }
744
+ interface IGetUserByIdResponse extends IGetUserResponse {
745
+ }
746
+ interface IGetUserByEmailRequest {
747
+ email: string;
748
+ }
749
+ interface IGetUserByEmailResponse extends IGetUserResponse {
750
+ }
751
+ interface IGetCleanersRequest {
752
+ }
753
+ interface IGetCleanersResponse {
754
+ cleaners: IUserSafe[];
755
+ }
756
+ interface IUpdateUserRequest {
757
+ firstName?: string;
758
+ lastName?: string;
759
+ mi?: string;
760
+ username?: string;
761
+ email?: string;
762
+ phoneNumber?: string;
763
+ phoneFormat?: string;
764
+ preferredLanguage?: TLanguage;
765
+ }
766
+ interface IUpdateUserResponse {
767
+ user: IUserSafe;
768
+ }
769
+ interface IDeleteUserRequest {
770
+ }
771
+ interface IDeleteUserResponse {
772
+ message: string;
773
+ }
774
+ interface IGetUsersByAccountTypeRequest {
775
+ accountType: TAccountType;
776
+ }
777
+
778
+ interface IUser extends IMetaData {
779
+ id: string;
780
+ firstName: string;
781
+ lastName?: string;
782
+ mi?: string;
783
+ username?: string;
784
+ email: string;
785
+ profilePhoto?: string;
786
+ passwordHash?: string;
787
+ loginAttempts?: number;
788
+ locked?: boolean;
789
+ passwordLastReset?: string;
790
+ passwordResetRequired?: boolean;
791
+ lastLogin?: string;
792
+ accountType: TAccountType;
793
+ status: TAccountStatus;
794
+ phoneNumber?: string;
795
+ phoneFormat?: string;
796
+ preferredLanguage?: TLanguage;
797
+ companyId?: string;
798
+ biometrics?: string;
799
+ }
800
+ interface IUserSafe extends Omit<IUser, "passwordHash" | "loginAttempts" | "biometrics"> {
801
+ }
802
+ declare const ACCOUNT_TYPE: {
803
+ readonly TURNDOWN_ADMIN: "TURNDOWN_ADMIN";
804
+ readonly ACCOUNT_ADMIN: "ACCOUNT_ADMIN";
805
+ readonly MANAGER: "MANAGER";
806
+ readonly STAFF: "STAFF";
807
+ readonly GUEST: "GUEST";
808
+ };
809
+ type TAccountType = TRecordValue<typeof ACCOUNT_TYPE>;
810
+ declare const ACCOUNT_STATUS: {
811
+ readonly ACTIVE: "ACTIVE";
812
+ readonly INACTIVE: "INACTIVE";
813
+ readonly SUSPENDED: "SUSPENDED";
814
+ readonly PENDING: "PENDING";
815
+ };
816
+ type TAccountStatus = TRecordValue<typeof ACCOUNT_STATUS>;
817
+ declare const LANGUAGE: {
818
+ readonly ENGLISH: "ENGLISH";
819
+ readonly FRENCH: "FRENCH";
820
+ readonly SPANISH: "SPANISH";
821
+ readonly GERMAN: "GERMAN";
822
+ };
823
+ type TLanguage = TRecordValue<typeof LANGUAGE>;
824
+ interface IDeviceInfo {
825
+ userAgent?: string;
826
+ ip?: string;
827
+ deviceName?: string;
828
+ }
829
+ interface IUserSession {
830
+ id: number;
831
+ deviceInfo?: IDeviceInfo | null;
832
+ createdAt: string;
833
+ lastUsedAt: string;
834
+ }
835
+
836
+ interface IAuthSessionIdParams {
837
+ sessionId: string;
838
+ }
839
+ interface IAuthInvitationTokenParams {
840
+ token: string;
841
+ }
842
+ interface IAuthInvitationIdParams {
843
+ invitationId: string;
844
+ }
845
+ interface IRegisterRequest {
846
+ email: string;
847
+ password: string;
848
+ firstName: string;
849
+ lastName?: string;
850
+ accountType: TAccountType;
851
+ deviceInfo?: IDeviceInfo;
852
+ }
853
+ interface IRegisterResponse extends IAuthTokenResponse {
854
+ }
855
+ interface ILoginRequest {
856
+ email: string;
857
+ password: string;
858
+ deviceInfo?: IDeviceInfo;
859
+ }
860
+ interface ILoginResponse extends IAuthTokenResponse {
861
+ passwordResetRequired?: boolean;
862
+ }
863
+ interface IRefreshSessionRequest {
864
+ refreshToken: string;
865
+ deviceInfo?: IDeviceInfo;
866
+ }
867
+ interface IRefreshSessionResponse {
868
+ user?: IUserSafe;
869
+ accessToken: string;
870
+ refreshToken: string;
871
+ expiresAt?: string | null;
872
+ companyId?: string;
873
+ }
874
+ interface ILogoutRequest {
875
+ refreshToken?: string;
876
+ }
877
+ interface ILogoutResponse {
878
+ message: string;
879
+ }
880
+ interface ILogoutAllRequest {
881
+ userId: string;
882
+ }
883
+ interface ILogoutAllResponse {
884
+ message: string;
885
+ }
886
+ interface IGetMeRequest {
887
+ userId: string;
888
+ }
889
+ interface IGetMeResponse extends IGetUserResponse {
890
+ }
891
+ interface IGetSessionsRequest {
892
+ }
893
+ interface IGetSessionsResponse {
894
+ id: string;
895
+ deviceInfo: string;
896
+ createdAt: string;
897
+ lastUsedAt: string;
898
+ }
899
+ interface IRevokeSessionRequest extends IAuthSessionIdParams {
900
+ }
901
+ interface IRevokeSessionResponse {
902
+ message: string;
903
+ }
904
+ interface IChangePasswordRequest {
905
+ currentPassword: string;
906
+ newPassword: string;
907
+ }
908
+ interface IChangePasswordResponse extends IGetUserResponse {
909
+ }
910
+ interface IForgotPasswordRequest {
911
+ email: string;
912
+ }
913
+ interface IForgotPasswordResponse {
914
+ message: string;
915
+ }
916
+ interface IGetLoginHistoryRequest {
917
+ }
918
+ interface IGetLoginHistoryResponse {
919
+ id: string;
920
+ email: string;
921
+ ipAddress: string;
922
+ userAgent: string;
923
+ success: boolean;
924
+ failureReason?: string;
925
+ createdAt: Date;
926
+ }
927
+ interface IGetLoginHistoryListResponse {
928
+ history: IGetLoginHistoryResponse[];
929
+ length: number;
930
+ }
931
+ interface IValidateInvitationRequest extends IAuthInvitationTokenParams {
932
+ }
933
+ interface IValidateInvitationResponse {
934
+ id: string;
935
+ companyId: string;
936
+ companyName: string;
937
+ email: string;
938
+ role: TAccountType;
939
+ invitedBy: string;
940
+ invitedByName: string;
941
+ expiresAt: string;
942
+ userExists: boolean;
943
+ }
944
+ interface IRegisterWithInvitationRequest {
945
+ token: string;
946
+ password: string;
947
+ firstName: string;
948
+ lastName?: string;
949
+ deviceInfo?: IDeviceInfo;
950
+ }
951
+ interface IRegisterWithInvitationResponse extends IAuthTokenResponse {
952
+ }
953
+ interface IAcceptInvitationRequest {
954
+ userId?: string;
955
+ token: string;
956
+ }
957
+ interface IAcceptInvitationResponse {
958
+ companyId: string;
959
+ companyName: string;
960
+ role: TAccountType;
961
+ }
962
+ interface IAcceptInvitationRouteResponse {
963
+ invite: IAcceptInvitationResponse;
964
+ message: string;
965
+ }
966
+ interface IGetPendingInvitationsRequest {
967
+ }
968
+ interface IGetPendingInvitationsResponse {
969
+ id: string;
970
+ token: string;
971
+ companyId: string;
972
+ companyName: string;
973
+ role: TAccountType;
974
+ invitedBy: string;
975
+ invitedByName: string;
976
+ expiresAt: string;
977
+ createdAt: string;
978
+ }
979
+ interface IGetPendingInvitationsListResponse {
980
+ invitations: IGetPendingInvitationsResponse[];
981
+ length: number;
982
+ }
983
+ interface IRevokeInvitationRequest extends IAuthInvitationIdParams {
984
+ revokedBy?: string;
985
+ }
986
+ interface IRevokeInvitationResponse {
987
+ message: string;
988
+ }
989
+ interface IRefreshRequest extends IRefreshSessionRequest {
990
+ }
991
+ interface IRefreshResponse extends IRefreshSessionResponse {
992
+ }
993
+
994
+ declare const AUTH_STATUS: {
995
+ readonly Initializing: "Initializing";
996
+ readonly Unauthenticated: "Unauthenticated";
997
+ readonly Authenticated: "Authenticated";
998
+ readonly Refreshing: "Refreshing";
999
+ readonly SessionExpired: "SessionExpired";
1000
+ };
1001
+ type TAuthStatus = (typeof AUTH_STATUS)[keyof typeof AUTH_STATUS];
1002
+ /**
1003
+ * Token Payload
1004
+ * JWT token payload structure
1005
+ */
1006
+ interface ITokenPayload {
1007
+ userId: string;
1008
+ email: string;
1009
+ name: string;
1010
+ }
1011
+ interface IRefreshTokenData {
1012
+ token: string;
1013
+ tokenHash: string;
1014
+ tokenFamily: string;
1015
+ expiresAt: string;
1016
+ }
1017
+ interface IAuthTokenResponse {
1018
+ user: IUserSafe;
1019
+ accessToken: string;
1020
+ refreshToken: string;
1021
+ expiresAt?: string | null;
1022
+ companyId?: string;
1023
+ }
1024
+ interface IStoredAuthSession {
1025
+ accessToken: string | null;
1026
+ refreshToken: string | null;
1027
+ expiresAt?: string | null;
1028
+ }
1029
+ interface IAuthTokens {
1030
+ accessToken: string | null;
1031
+ /**
1032
+ * For browser apps, prefer storing the refresh token in an HTTP-only cookie.
1033
+ * Keep this optional so the same shape can support mobile or non-cookie flows.
1034
+ */
1035
+ refreshToken?: string | null;
1036
+ expiresAt?: string | null;
1037
+ }
1038
+ interface IAuthSession {
1039
+ authenticatedUser: IUserSafe | null;
1040
+ accessToken: string | null;
1041
+ expiresAt?: string | null;
1042
+ }
1043
+ interface ISetAuthSessionParams {
1044
+ user: IUserSafe | null;
1045
+ accessToken: string;
1046
+ refreshToken: string;
1047
+ expiresAt?: string | null;
1048
+ }
1049
+ interface ILoginCredentials {
1050
+ email: string;
1051
+ password: string;
1052
+ rememberMe: boolean;
1053
+ }
1054
+ interface IRegisterCredentials {
1055
+ businessType: TServiceType[];
1056
+ firstName: string;
1057
+ lastName: string;
1058
+ email: string;
1059
+ password: string;
1060
+ }
1061
+ /**
1062
+ * Password Validation Rules
1063
+ * Rules for password validation
1064
+ */
1065
+ interface IPasswordValidationRules {
1066
+ minLength: number;
1067
+ requireUppercase: boolean;
1068
+ requireLowercase: boolean;
1069
+ requireNumbers: boolean;
1070
+ requireSpecialChars: boolean;
1071
+ }
1072
+ /**
1073
+ * Password Validation Result
1074
+ * Result of password validation
1075
+ */
1076
+ interface IPasswordValidationResult {
1077
+ valid: boolean;
1078
+ errors: string[];
1079
+ }
1080
+ /**
1081
+ * Email Validation Result
1082
+ * Result of email validation
1083
+ */
1084
+ interface IEmailValidationResult {
1085
+ valid: boolean;
1086
+ error?: string;
1087
+ }
1088
+ /**
1089
+ * Rate Limit Status
1090
+ * Information about rate limiting status
1091
+ */
1092
+ interface IRateLimitStatus {
1093
+ isLimited: boolean;
1094
+ attempts: number;
1095
+ maxAttempts: number;
1096
+ resetTime?: string;
1097
+ }
1098
+
1099
+ interface IChecklistTemplateCompanyRouteParams {
1100
+ companyId: string;
1101
+ }
1102
+ interface ITemplateIdParams {
1103
+ templateId: string;
1104
+ }
1105
+ interface ITemplateItemIdParams {
1106
+ itemId: string;
1107
+ }
1108
+ interface ITemplateAndItemIdParams {
1109
+ templateId: string;
1110
+ itemId: string;
1111
+ }
1112
+ interface IIncludeInactiveQuery {
1113
+ includeInactive?: string;
1114
+ }
1115
+ interface ICreateTemplateRequest extends Partial<Omit<ICreateTemplateInput, "companyId" | "createdBy">> {
1116
+ name: string;
1117
+ }
1118
+ interface ICreateTemplateResponse extends IChecklistTemplate {
1119
+ }
1120
+ interface ICreateTemplateWithItemsRequest extends ICreateTemplateInput {
1121
+ items: ICreateTemplateItemInput[];
1122
+ }
1123
+ interface ICreateTemplateWithItemsResponse extends IChecklistTemplateWithItems {
1124
+ }
1125
+ interface IGetTemplatesByCompanyIdRequest extends IChecklistTemplateCompanyRouteParams {
1126
+ }
1127
+ type IGetTemplatesByCompanyIdResponse = IChecklistTemplate[];
1128
+ interface IGetTemplateByIdRequest extends ITemplateIdParams {
1129
+ }
1130
+ interface IGetTemplateByIdResponse extends IChecklistTemplate {
1131
+ }
1132
+ interface IGetTemplateWithItemsRequest extends ITemplateIdParams {
1133
+ }
1134
+ interface IGetTemplateWithItemsResponse extends IChecklistTemplateWithItems {
1135
+ }
1136
+ interface IUpdateTemplateRequest extends Partial<ICreateTemplateInput> {
1137
+ }
1138
+ interface IUpdateTemplateResponse extends IChecklistTemplate {
1139
+ }
1140
+ interface IDeleteTemplateRequest extends ITemplateIdParams {
1141
+ }
1142
+ interface IDeleteTemplateResponse extends IMessageResponse {
1143
+ }
1144
+ interface IToggleTemplateActiveRequest {
1145
+ isActive: boolean;
1146
+ }
1147
+ interface IToggleTemplateActiveResponse extends IChecklistTemplate {
1148
+ }
1149
+ interface IGetTemplateUsageRequest extends ITemplateIdParams {
1150
+ }
1151
+ interface IGetTemplateUsageResponse extends ICountResponse {
1152
+ }
1153
+ interface IGetTemplateItemsRequest extends ITemplateIdParams {
1154
+ }
1155
+ type IGetTemplateItemsResponse = IChecklistTemplateItem[];
1156
+ interface IAddTemplateItemRequest extends ICreateTemplateItemInput {
1157
+ title: string;
1158
+ }
1159
+ interface IAddTemplateItemResponse extends IChecklistTemplateItem {
1160
+ }
1161
+ interface IUpdateTemplateItemRequest extends Partial<ICreateTemplateItemInput> {
1162
+ }
1163
+ interface IUpdateTemplateItemResponse extends IChecklistTemplateItem {
1164
+ }
1165
+ interface IDuplicateTemplateItemRequest extends ITemplateItemIdParams {
1166
+ }
1167
+ interface IDuplicateTemplateItemResponse extends IChecklistTemplateItem {
1168
+ }
1169
+ interface IDeleteTemplateItemRequest extends ITemplateItemIdParams {
1170
+ }
1171
+ interface IDeleteTemplateItemResponse extends IMessageResponse {
1172
+ }
1173
+ interface ITemplateItemOrder {
1174
+ itemId: string;
1175
+ displayOrder: number;
1176
+ }
1177
+ interface IReorderTemplateItemsRequest {
1178
+ itemOrders: ITemplateItemOrder[];
1179
+ }
1180
+ interface IReorderTemplateItemsResponse extends IMessageResponse {
1181
+ }
1182
+
1183
+ interface IChecklistTemplate extends IMetaData {
1184
+ id: string;
1185
+ name: string;
1186
+ description?: string;
1187
+ companyId: string;
1188
+ createdBy: string;
1189
+ isActive: boolean;
1190
+ items: IChecklistTemplateItem[];
1191
+ }
1192
+ interface IChecklistTemplateItem extends IMetaData {
1193
+ id: string;
1194
+ templateId: string;
1195
+ title: string;
1196
+ description: string | null;
1197
+ displayOrder: number;
1198
+ requiresPhoto: boolean;
1199
+ isRequired: boolean;
1200
+ estimatedTimeMinutes: number | null;
1201
+ }
1202
+ /**
1203
+ * Template with items
1204
+ */
1205
+ interface IChecklistTemplateWithItems extends IChecklistTemplate {
1206
+ items: IChecklistTemplateItem[];
1207
+ }
1208
+ /**
1209
+ * Input for creating a template
1210
+ */
1211
+ interface ICreateTemplateInput {
1212
+ name: string;
1213
+ description?: string;
1214
+ companyId: string;
1215
+ createdBy: string;
1216
+ isActive?: boolean;
1217
+ }
1218
+ /**
1219
+ * Input for creating template items
1220
+ */
1221
+ interface ICreateTemplateItemInput {
1222
+ title: string;
1223
+ description?: string;
1224
+ displayOrder: number;
1225
+ requiresPhoto?: boolean;
1226
+ isRequired?: boolean;
1227
+ estimatedTimeMinutes?: number;
1228
+ }
1229
+
1230
+ interface ICompanyRouteParams {
1231
+ companyId: string;
1232
+ }
1233
+ interface ICompanyUserRouteParams {
1234
+ userId: string;
1235
+ }
1236
+ interface ICompanyInvitationTokenParams {
1237
+ token: string;
1238
+ }
1239
+ interface ICompanyInvitationIdParams extends ICompanyRouteParams {
1240
+ invitationId: string;
1241
+ }
1242
+ interface IGetCompaniesQuery {
1243
+ search?: string;
1244
+ filter?: "active" | "pending" | "all";
1245
+ }
1246
+ interface ICreateCompanyRequest {
1247
+ displayName: string;
1248
+ addressLine1: string;
1249
+ addressLine2?: string;
1250
+ city: string;
1251
+ stateCode: string;
1252
+ postalCode: string;
1253
+ companyType: TCompanyType;
1254
+ }
1255
+ interface ICreateCompanyResponse extends ICompany {
1256
+ }
1257
+ interface IGetCompaniesRequest {
1258
+ }
1259
+ type IGetCompaniesResponse = ICompany[];
1260
+ interface IGetCompanyByIdRequest extends ICompanyRouteParams {
1261
+ }
1262
+ interface IGetCompanyByIdResponse extends ICompany {
1263
+ }
1264
+ interface IUpdateCompanyRequest extends Partial<ICompany> {
1265
+ }
1266
+ interface IUpdateCompanyResponse extends ICompany {
1267
+ }
1268
+ interface IInviteUserToCompanyRequest {
1269
+ email: string;
1270
+ role: TAccountType;
1271
+ }
1272
+ interface IInviteUserToCompanyResponse extends IMessageResponse {
1273
+ }
1274
+ interface IGetCompanyUsersRequest extends ICompanyRouteParams {
1275
+ }
1276
+ interface ICompanyUserSummary {
1277
+ id: string;
1278
+ email: string;
1279
+ firstName: string;
1280
+ lastName: string;
1281
+ role: TAccountType;
1282
+ }
1283
+ type IGetCompanyUsersResponse = Array<ICompany & ICompanyUserSummary>;
1284
+ interface IGetUserCompaniesRequest extends ICompanyUserRouteParams {
1285
+ }
1286
+ type IGetUserCompaniesResponse = ICompany[];
1287
+ interface IInviteCompanyToCompanyRequest {
1288
+ message?: string;
1289
+ }
1290
+ interface IInviteCompanyToCompanyResponse {
1291
+ id: string;
1292
+ token: string;
1293
+ expiresAt: Date | string;
1294
+ }
1295
+ interface IValidateCompanyInvitationRequest extends ICompanyInvitationTokenParams {
1296
+ }
1297
+ interface IValidateCompanyInvitationResponse {
1298
+ id: string;
1299
+ requesterCompanyId: string;
1300
+ providerCompanyId: string;
1301
+ invitedBy: string;
1302
+ message?: string | null;
1303
+ expiresAt: Date | string;
1304
+ requesterCompanyName: string;
1305
+ providerCompanyName: string;
1306
+ invitedByName: string;
1307
+ }
1308
+ interface IAcceptCompanyInvitationRequest extends ICompanyInvitationTokenParams {
1309
+ }
1310
+ interface IAcceptCompanyInvitationResponse {
1311
+ requesterCompanyId: string;
1312
+ providerCompanyId: string;
1313
+ requesterCompanyName: string;
1314
+ providerCompanyName: string;
1315
+ }
1316
+ interface IDeclineCompanyInvitationRequest extends ICompanyInvitationTokenParams {
1317
+ }
1318
+ interface IDeclineCompanyInvitationResponse extends IMessageResponse {
1319
+ }
1320
+ interface IGetPendingCompanyInvitationsRequest extends ICompanyRouteParams {
1321
+ }
1322
+ type IGetPendingCompanyInvitationsResponse = IValidateCompanyInvitationResponse[];
1323
+ interface IRevokeCompanyInvitationRequest extends ICompanyInvitationIdParams {
1324
+ }
1325
+ interface IRevokeCompanyInvitationResponse extends IMessageResponse {
1326
+ }
1327
+
1328
+ interface ICompany extends IMetaData {
1329
+ id: string;
1330
+ displayName: string;
1331
+ addressLine1: string;
1332
+ addressLine2?: string;
1333
+ city: string;
1334
+ stateCode: TUSStateCode;
1335
+ companyType: TCompanyType;
1336
+ postalCode: string;
1337
+ country?: string;
1338
+ timezone?: string;
1339
+ photoUrl?: string;
1340
+ }
1341
+ declare const COMPANY_TYPES: {
1342
+ readonly PROPERTY_MANAGEMENT: "PROPERTY_MANAGEMENT";
1343
+ readonly MAINTENANCE: "MAINTENANCE";
1344
+ readonly CLEANER: "CLEANER";
1345
+ readonly OTHER: "OTHER";
1346
+ };
1347
+ type TCompanyType = TRecordValue<typeof COMPANY_TYPES>;
1348
+
1349
+ interface IDamageReportPropertyRouteParams {
1350
+ propertyId: string;
1351
+ }
1352
+ interface IDamageReportRoomRouteParams {
1353
+ roomId: string;
1354
+ }
1355
+ interface IDamageReportRouteParams {
1356
+ reportId: string;
1357
+ }
1358
+ interface IDamageReportWorkOrderRouteParams {
1359
+ workOrderId: string;
1360
+ }
1361
+ interface IIncludeResolvedQuery {
1362
+ includeResolved?: string;
1363
+ }
1364
+ interface ICreateDamageReportRequest extends ICreateDamageReportInput {
1365
+ }
1366
+ interface ICreateDamageReportResponse extends IDamageReport {
1367
+ }
1368
+ interface IGetDamageReportByIdRequest extends IDamageReportRouteParams {
1369
+ }
1370
+ interface IGetDamageReportByIdResponse extends IDamageReport {
1371
+ }
1372
+ interface IUpdateDamageReportRequest extends Partial<IDamageReport> {
1373
+ }
1374
+ interface IUpdateDamageReportResponse extends IDamageReport {
1375
+ }
1376
+ interface IUpdateDamageReportStatusRequest {
1377
+ status: TDamageStatus;
1378
+ changedBy: string;
1379
+ reason?: string;
1380
+ }
1381
+ interface IUpdateDamageReportStatusResponse extends IDamageReport {
1382
+ }
1383
+ interface IAssignDamageReportRequest {
1384
+ assignedTo: string;
1385
+ }
1386
+ interface IAssignDamageReportResponse extends IDamageReport {
1387
+ }
1388
+ interface IResolveDamageReportRequest {
1389
+ resolvedBy: string;
1390
+ resolutionNotes?: string;
1391
+ actualCost?: number;
1392
+ }
1393
+ interface IResolveDamageReportResponse extends IDamageReport {
1394
+ }
1395
+ interface IGetDamageReportsByPropertyIdRequest extends IDamageReportPropertyRouteParams {
1396
+ }
1397
+ type IGetDamageReportsByPropertyIdResponse = IDamageReport[];
1398
+ interface IGetDamageReportsByRoomIdRequest extends IDamageReportRoomRouteParams {
1399
+ }
1400
+ type IGetDamageReportsByRoomIdResponse = IDamageReport[];
1401
+ interface IGetDamageReportPhotosRequest extends IDamageReportRouteParams {
1402
+ }
1403
+ type IGetDamageReportPhotosResponse = IDamagePhoto[];
1404
+ interface IAddDamageReportPhotoRequest {
1405
+ photoId: string;
1406
+ isBeforePhoto?: boolean;
1407
+ caption?: string;
1408
+ uploadedBy?: string;
1409
+ }
1410
+ interface IAddDamageReportPhotoResponse extends IDamagePhoto {
1411
+ }
1412
+ interface IGetDamageReportCommentsRequest extends IDamageReportRouteParams {
1413
+ }
1414
+ type IGetDamageReportCommentsResponse = IDamageComment[];
1415
+ interface IAddDamageReportCommentRequest {
1416
+ userId: string;
1417
+ comment: string;
1418
+ isInternal?: boolean;
1419
+ }
1420
+ interface IAddDamageReportCommentResponse extends IDamageComment {
1421
+ }
1422
+ interface IGetDamageReportHistoryRequest extends IDamageReportRouteParams {
1423
+ }
1424
+ type IGetDamageReportHistoryResponse = IDamageReportStatusHistory[];
1425
+ interface ICreateWorkOrderRequest extends ICreateWorkOrderInput {
1426
+ }
1427
+ interface ICreateWorkOrderResponse extends IWorkOrder {
1428
+ }
1429
+ interface IGetWorkOrderByIdRequest extends IDamageReportWorkOrderRouteParams {
1430
+ }
1431
+ interface IGetWorkOrderByIdResponse extends IWorkOrder {
1432
+ }
1433
+ interface IUpdateWorkOrderRequest extends Partial<IWorkOrder> {
1434
+ }
1435
+ interface IUpdateWorkOrderResponse extends IWorkOrder {
1436
+ }
1437
+ interface IAssignWorkOrderRequest {
1438
+ assignedTo: string;
1439
+ }
1440
+ interface IAssignWorkOrderResponse extends IWorkOrder {
1441
+ }
1442
+ interface ICompleteWorkOrderRequest {
1443
+ completedBy: string;
1444
+ workPerformed: string;
1445
+ materialsUsed?: string;
1446
+ laborHours?: number;
1447
+ laborCost?: number;
1448
+ materialsCost?: number;
1449
+ }
1450
+ interface ICompleteWorkOrderResponse extends IWorkOrder {
1451
+ }
1452
+ interface IGetWorkOrdersByPropertyIdRequest extends IDamageReportPropertyRouteParams {
1453
+ }
1454
+ type IGetWorkOrdersByPropertyIdResponse = IWorkOrder[];
1455
+ interface IUpdateWorkOrderStatusRequest {
1456
+ status: TWorkOrderStatus;
1457
+ }
1458
+ interface IUpdateWorkOrderStatusResponse extends IWorkOrder {
1459
+ }
1460
+
1461
+ declare const DAMAGE_SEVERITY: {
1462
+ readonly LOW: "LOW";
1463
+ readonly MEDIUM: "MEDIUM";
1464
+ readonly HIGH: "HIGH";
1465
+ readonly CRITICAL: "CRITICAL";
1466
+ };
1467
+ type TDamageSeverity = TRecordValue<typeof DAMAGE_SEVERITY>;
1468
+ declare const DAMAGE_STATUS: {
1469
+ readonly OPEN: "OPEN";
1470
+ readonly IN_REVIEW: "IN_REVIEW";
1471
+ readonly ASSIGNED: "ASSIGNED";
1472
+ readonly IN_PROGRESS: "IN_PROGRESS";
1473
+ readonly RESOLVED: "RESOLVED";
1474
+ readonly CLOSED: "CLOSED";
1475
+ readonly ESCALATED: "ESCALATED";
1476
+ };
1477
+ type TDamageStatus = TRecordValue<typeof DAMAGE_STATUS>;
1478
+ declare const WORK_ORDER_PRIORITY: {
1479
+ readonly LOW: "LOW";
1480
+ readonly NORMAL: "NORMAL";
1481
+ readonly HIGH: "HIGH";
1482
+ readonly URGENT: "URGENT";
1483
+ };
1484
+ type TWorkOrderPriority = TRecordValue<typeof WORK_ORDER_PRIORITY>;
1485
+ declare const WORK_ORDER_STATUS: {
1486
+ readonly PENDING: "PENDING";
1487
+ readonly SCHEDULED: "SCHEDULED";
1488
+ readonly IN_PROGRESS: "IN_PROGRESS";
1489
+ readonly COMPLETED: "COMPLETED";
1490
+ readonly CANCELLED: "CANCELLED";
1491
+ };
1492
+ type TWorkOrderStatus = TRecordValue<typeof WORK_ORDER_STATUS>;
1493
+ interface IDamageReport {
1494
+ id: string;
1495
+ propertyId: string;
1496
+ roomId: string;
1497
+ workSessionId: string | null;
1498
+ cleaningSessionId?: string;
1499
+ reportedBy: string;
1500
+ reportedAt: Date;
1501
+ severity: TDamageSeverity;
1502
+ status: TDamageStatus;
1503
+ title: string;
1504
+ description: string;
1505
+ locationDetails: string | null;
1506
+ estimatedCost: number | null;
1507
+ actualCost: number | null;
1508
+ assignedTo: string | null;
1509
+ assignedAt: Date | null;
1510
+ resolvedAt: Date | null;
1511
+ resolvedBy: string | null;
1512
+ resolutionNotes: string | null;
1513
+ requiresProfessional: boolean;
1514
+ vendorInfo: string | null;
1515
+ insuranceClaimNumber: string | null;
1516
+ isTenantResponsible: boolean;
1517
+ tenantChargeAmount: number | null;
1518
+ createdAt: Date;
1519
+ updatedAt: Date;
1520
+ photos?: IDamagePhoto[];
1521
+ comments?: IDamageComment[];
1522
+ }
1523
+ interface IDamageReportPhoto {
1524
+ id: string;
1525
+ damageReportId: string;
1526
+ photoId: string;
1527
+ photoUrl?: string;
1528
+ caption: string | null;
1529
+ isBeforePhoto: boolean;
1530
+ displayOrder: number;
1531
+ uploadedBy: string | null;
1532
+ createdAt: Date;
1533
+ }
1534
+ interface IDamagePhoto extends IDamageReportPhoto {
1535
+ }
1536
+ interface IDamageComment {
1537
+ id: string;
1538
+ damageReportId: string;
1539
+ userId: string;
1540
+ userName?: string;
1541
+ comment: string;
1542
+ isInternal: boolean;
1543
+ createdAt: Date;
1544
+ updatedAt: Date;
1545
+ }
1546
+ interface IDamageReportStatusHistory {
1547
+ id: string;
1548
+ damageReportId: string;
1549
+ previousStatus: TDamageStatus | null;
1550
+ newStatus: TDamageStatus;
1551
+ changedBy: string;
1552
+ reason: string | null;
1553
+ createdAt: Date;
1554
+ }
1555
+ interface IWorkOrder {
1556
+ id: string;
1557
+ damageReportId: string | null;
1558
+ propertyId: string;
1559
+ roomId: string | null;
1560
+ workOrderNumber: string | null;
1561
+ priority: TWorkOrderPriority;
1562
+ category: string | null;
1563
+ assignedTo: string | null;
1564
+ assignedAt: Date | null;
1565
+ scheduledDate: Date | null;
1566
+ scheduledTimeStart: string | null;
1567
+ scheduledTimeEnd: string | null;
1568
+ startedAt: Date | null;
1569
+ completedAt: Date | null;
1570
+ completedBy: string | null;
1571
+ description: string;
1572
+ workPerformed: string | null;
1573
+ materialsUsed: string | null;
1574
+ laborHours: number | null;
1575
+ laborCost: number | null;
1576
+ materialsCost: number | null;
1577
+ totalCost: number | null;
1578
+ status: TWorkOrderStatus;
1579
+ createdAt: Date;
1580
+ updatedAt: Date;
1581
+ }
1582
+ interface ICreateDamageReportInput {
1583
+ propertyId: string;
1584
+ roomId: string;
1585
+ workSessionId?: string;
1586
+ reportedBy: string;
1587
+ severity: TDamageSeverity;
1588
+ title: string;
1589
+ description: string;
1590
+ locationDetails?: string;
1591
+ estimatedCost?: number;
1592
+ requiresProfessional?: boolean;
1593
+ isTenantResponsible?: boolean;
1594
+ tenantChargeAmount?: number;
1595
+ }
1596
+ interface ICreateWorkOrderInput {
1597
+ damageReportId?: string;
1598
+ propertyId: string;
1599
+ roomId?: string;
1600
+ priority?: TWorkOrderPriority;
1601
+ category?: string;
1602
+ description: string;
1603
+ scheduledDate?: Date;
1604
+ scheduledTimeStart?: string;
1605
+ scheduledTimeEnd?: string;
1606
+ }
1607
+
1608
+ /**
1609
+ * Error Types
1610
+ * Custom error types and validation error structures
1611
+ */
1612
+
1613
+ /**
1614
+ * Validation Error Detail
1615
+ * Detailed information about a validation error
1616
+ */
1617
+ interface IValidationErrorDetail {
1618
+ field: string;
1619
+ message: string;
1620
+ value?: unknown;
1621
+ }
1622
+ /**
1623
+ * Missing Fields Error Detail
1624
+ * Information about missing required fields
1625
+ */
1626
+ interface IMissingFieldsErrorDetail {
1627
+ missingFields: string[];
1628
+ }
1629
+ /**
1630
+ * Rate Limit Error Detail
1631
+ * Information about rate limiting
1632
+ */
1633
+ interface IRateLimitErrorDetail {
1634
+ retryAfter?: number;
1635
+ message: string;
1636
+ }
1637
+ /**
1638
+ * Error Response Detail
1639
+ * Union type for all possible error details
1640
+ */
1641
+ type TErrorResponseDetail = IValidationErrorDetail[] | IMissingFieldsErrorDetail | IRateLimitErrorDetail | Record<string, unknown> | string;
1642
+ /**
1643
+ * Typed API Error
1644
+ * API error with typed details
1645
+ */
1646
+ interface ITypedApiError<T = TErrorResponseDetail> {
1647
+ message: string;
1648
+ code: TErrorCode;
1649
+ details?: T;
1650
+ }
1651
+ /**
1652
+ * Error Helper Types
1653
+ * For identifying specific error types
1654
+ */
1655
+ type TValidationError = ITypedApiError<IValidationErrorDetail[]>;
1656
+ type TMissingFieldsError = ITypedApiError<IMissingFieldsErrorDetail>;
1657
+ type TRateLimitError = ITypedApiError<IRateLimitErrorDetail>;
1658
+ /**
1659
+ * Type guard for ValidationError
1660
+ */
1661
+ declare function isValidationError(error: unknown): error is TValidationError;
1662
+ /**
1663
+ * Type guard for MissingFieldsError
1664
+ */
1665
+ declare function isMissingFieldsError(error: unknown): error is TMissingFieldsError;
1666
+ /**
1667
+ * Type guard for RateLimitError
1668
+ */
1669
+ declare function isRateLimitError(error: unknown): error is TRateLimitError;
1670
+ /**
1671
+ * Type guard for authentication errors
1672
+ */
1673
+ declare function isAuthError(error: unknown): boolean;
1674
+
1675
+ interface IGetHealthRequest {
1676
+ }
1677
+ interface IGetHealthResponse extends IHealthCheckResponse {
1678
+ }
1679
+ interface IGetDetailedHealthRequest {
1680
+ }
1681
+ interface IGetDetailedHealthResponse {
1682
+ checks: IHealthChecks;
1683
+ }
1684
+
1685
+ interface IHealthCheckResponse {
1686
+ status: "healthy";
1687
+ database: "connected";
1688
+ timestamp: string;
1689
+ environment?: string;
1690
+ }
1691
+ interface IHealthChecks {
1692
+ database: "unknown" | "connected" | "disconnected";
1693
+ uptime: number;
1694
+ memory: {
1695
+ rss: number;
1696
+ heapTotal: number;
1697
+ heapUsed: number;
1698
+ external: number;
1699
+ arrayBuffers: number;
1700
+ };
1701
+ timestamp: string;
1702
+ databaseError?: string;
1703
+ }
1704
+
1705
+ interface IImageUserRouteParams {
1706
+ userId: string;
1707
+ }
1708
+ interface IImagePropertyRouteParams {
1709
+ propertyId: string;
1710
+ }
1711
+ interface IImageRoomRouteParams {
1712
+ roomId: string;
1713
+ }
1714
+ interface IImageCompanyRouteParams {
1715
+ companyId: string;
1716
+ }
1717
+ interface IImageRouteParams {
1718
+ imageId: string;
1719
+ }
1720
+ interface IUploadProfileImageRequest {
1721
+ }
1722
+ interface IUploadProfileImageResponse {
1723
+ image: IImageWithUrl;
1724
+ }
1725
+ interface IUploadImagesResponse {
1726
+ images: IImageWithUrl[];
1727
+ }
1728
+ interface IGetImagesForEntityResponse {
1729
+ images: IImageWithUrl[];
1730
+ }
1731
+ interface IDeleteImageRequest extends IImageRouteParams {
1732
+ }
1733
+ interface IDeleteImageResponse extends ISuccessResponse {
1734
+ }
1735
+
1736
+ declare const IMAGE_ENTITY_TYPE: {
1737
+ readonly USER_PROFILE: "USER_PROFILE";
1738
+ readonly PROPERTY: "PROPERTY";
1739
+ readonly COMPANY: "COMPANY";
1740
+ readonly CHECKLIST_ITEM: "CHECKLIST_ITEM";
1741
+ readonly PROPERTY_ROOM: "PROPERTY_ROOM";
1742
+ readonly MAINTENANCE_TICKET: "MAINTENANCE_TICKET";
1743
+ readonly WORK_REPORT: "WORK_REPORT";
1744
+ readonly CLEANING_REPORT: "CLEANING_REPORT";
1745
+ readonly TURNDOWN_DEFAULT: "TURNDOWN_DEFAULT";
1746
+ };
1747
+ type TStoredImageEntityType = (typeof IMAGE_ENTITY_TYPE)[keyof typeof IMAGE_ENTITY_TYPE];
1748
+ interface IImage {
1749
+ id: string;
1750
+ s3Key: string;
1751
+ s3Bucket: string;
1752
+ entityType: TStoredImageEntityType;
1753
+ entityId: string;
1754
+ fileName: string;
1755
+ mimeType: string;
1756
+ fileSizeBytes?: number;
1757
+ width?: number;
1758
+ height?: number;
1759
+ isPublic: boolean;
1760
+ category?: string;
1761
+ displayOrder: number;
1762
+ uploadedBy?: string;
1763
+ createdAt: Date;
1764
+ updatedAt: Date;
1765
+ deletedAt?: Date;
1766
+ }
1767
+ interface IImageWithUrl extends IImage {
1768
+ url: string;
1769
+ }
1770
+
1771
+ interface IInventoryCompanyRouteParams {
1772
+ companyId: string;
1773
+ }
1774
+ interface IInventoryItemRouteParams {
1775
+ itemId: string;
1776
+ }
1777
+ interface IInventoryRoomRouteParams {
1778
+ roomId: string;
1779
+ }
1780
+ interface IInventoryPropertyRouteParams {
1781
+ propertyId: string;
1782
+ }
1783
+ interface IInventoryExecutionRouteParams {
1784
+ executionId: string;
1785
+ }
1786
+ interface IRoomInventoryIdParams {
1787
+ roomInventoryId: string;
1788
+ }
1789
+ interface IInventoryOrderRouteParams {
1790
+ orderId: string;
1791
+ }
1792
+ interface ICreateInventoryItemRequest extends Partial<IInventoryItem> {
1793
+ companyId: string;
1794
+ name: string;
1795
+ }
1796
+ interface ICreateInventoryItemResponse extends IInventoryItem {
1797
+ }
1798
+ interface IGetInventoryItemByIdRequest extends IInventoryItemRouteParams {
1799
+ }
1800
+ interface IGetInventoryItemByIdResponse extends IInventoryItem {
1801
+ }
1802
+ interface IUpdateInventoryItemRequest extends Partial<IInventoryItem> {
1803
+ }
1804
+ interface IUpdateInventoryItemResponse extends IInventoryItem {
1805
+ }
1806
+ interface IDeleteInventoryItemRequest extends IInventoryItemRouteParams {
1807
+ }
1808
+ interface IDeleteInventoryItemResponse extends IMessageResponse {
1809
+ }
1810
+ interface IGetInventoryByCompanyIdRequest extends IInventoryCompanyRouteParams {
1811
+ }
1812
+ type IGetInventoryByCompanyIdResponse = IInventoryItem[];
1813
+ interface IAddInventoryToPropertyRequest extends Partial<IPropertyInventory> {
1814
+ propertyId: string;
1815
+ inventoryItemId: string;
1816
+ }
1817
+ interface IAddInventoryToPropertyResponse extends IPropertyInventory {
1818
+ }
1819
+ interface IGetPropertyInventoryRequest extends IInventoryPropertyRouteParams {
1820
+ }
1821
+ type IGetPropertyInventoryResponse = IPropertyInventory[];
1822
+ interface IGetPropertyInventoryNeedingRestockRequest extends IInventoryPropertyRouteParams {
1823
+ }
1824
+ type IGetPropertyInventoryNeedingRestockResponse = IPropertyInventory[];
1825
+ interface IAddInventoryToRoomRequest extends Partial<IRoomInventory> {
1826
+ roomId: string;
1827
+ inventoryItemId: string;
1828
+ }
1829
+ interface IAddInventoryToRoomResponse extends IRoomInventory {
1830
+ }
1831
+ interface IGetRoomInventoryRequest extends IInventoryRoomRouteParams {
1832
+ }
1833
+ type IGetRoomInventoryResponse = IRoomInventory[];
1834
+ interface IUpdateRoomInventoryRequest extends Partial<IRoomInventory> {
1835
+ }
1836
+ interface IUpdateRoomInventoryResponse extends IRoomInventory {
1837
+ }
1838
+ interface IGetRoomInventoryNeedingRestockRequest extends IInventoryRoomRouteParams {
1839
+ }
1840
+ type IGetRoomInventoryNeedingRestockResponse = IRoomInventory[];
1841
+ interface IRecordInventoryCountRequest extends Partial<IInventoryCount> {
1842
+ checklistExecutionId: string;
1843
+ roomInventoryId: string;
1844
+ countedLevel: number;
1845
+ countedBy: string;
1846
+ }
1847
+ interface IRecordInventoryCountResponse extends IInventoryCount {
1848
+ }
1849
+ interface IGetInventoryCountsByExecutionIdRequest extends IInventoryExecutionRouteParams {
1850
+ }
1851
+ type IGetInventoryCountsByExecutionIdResponse = IInventoryCount[];
1852
+ interface IRestockOrderItemInput {
1853
+ inventoryItemId: string;
1854
+ roomInventoryId?: string;
1855
+ propertyInventoryId?: string;
1856
+ quantityOrdered: number;
1857
+ unitCost?: number;
1858
+ }
1859
+ interface ICreateRestockOrderRequest extends Partial<IInventoryRestockOrder> {
1860
+ companyId: string;
1861
+ orderedBy: string;
1862
+ items: IRestockOrderItemInput[];
1863
+ }
1864
+ interface ICreateRestockOrderResponse extends IInventoryRestockOrder {
1865
+ }
1866
+ interface IGetRestockOrdersByCompanyIdRequest extends IInventoryCompanyRouteParams {
1867
+ }
1868
+ type IGetRestockOrdersByCompanyIdResponse = IInventoryRestockOrder[];
1869
+ interface IGetRestockOrderItemsRequest extends IInventoryOrderRouteParams {
1870
+ }
1871
+ type IGetRestockOrderItemsResponse = IInventoryRestockOrderItem[];
1872
+ interface IUpdateRestockOrderStatusRequest {
1873
+ status: TInventoryRestockOrderStatus;
1874
+ receivedBy?: string;
1875
+ }
1876
+ interface IUpdateRestockOrderStatusResponse extends IInventoryRestockOrder {
1877
+ }
1878
+
1879
+ declare const INVENTORY_RESTOCK_ORDER_STATUS: {
1880
+ readonly PENDING: "PENDING";
1881
+ readonly ORDERED: "ORDERED";
1882
+ readonly SHIPPED: "SHIPPED";
1883
+ readonly RECEIVED: "RECEIVED";
1884
+ };
1885
+ type TInventoryRestockOrderStatus = TRecordValue<typeof INVENTORY_RESTOCK_ORDER_STATUS>;
1886
+ declare const INVENTORY_UNITS: {
1887
+ COUNT: string;
1888
+ ROLLS: string;
1889
+ PODS: string;
1890
+ BOXES: string;
1891
+ BOTTLES: string;
1892
+ PACKS: string;
1893
+ BAGS: string;
1894
+ GALLONS: string;
1895
+ LITERS: string;
1896
+ KILOGRAMS: string;
1897
+ POUNDS: string;
1898
+ OUNCES: string;
1899
+ GRAMS: string;
1900
+ SHEETS: string;
1901
+ CASES: string;
1902
+ CARTONS: string;
1903
+ OTHER: string;
1904
+ };
1905
+ type TInventoryUnitType = TRecordValue<typeof INVENTORY_UNITS>;
1906
+ declare const INVENTORY_ITEM_TYPE: {
1907
+ readonly CONSUMABLE: "CONSUMABLE";
1908
+ readonly FIXED: "FIXED";
1909
+ };
1910
+ type TInventoryItemType = TRecordValue<typeof INVENTORY_ITEM_TYPE>;
1911
+ interface IInventoryItem extends IMetaData {
1912
+ id: string;
1913
+ companyId: string;
1914
+ name: string;
1915
+ description?: string;
1916
+ itemType: TInventoryItemType;
1917
+ unit: TInventoryUnitType;
1918
+ unitCustom?: string;
1919
+ minimumLevel: number;
1920
+ reorderLevel: number;
1921
+ maximumLevel?: number;
1922
+ costPerUnit?: number;
1923
+ supplierInfo?: string;
1924
+ sku?: string;
1925
+ barcode?: string;
1926
+ }
1927
+ interface IRoomInventory extends IMetaData {
1928
+ id: string;
1929
+ roomId: string;
1930
+ inventoryItemId: string;
1931
+ currentLevel: number;
1932
+ minimumLevel: number;
1933
+ maximumLevel?: number;
1934
+ parLevel?: number;
1935
+ lastRestockedAt?: Date;
1936
+ lastRestockedBy?: string;
1937
+ lastCheckedAt?: Date;
1938
+ lastCheckedBy?: string;
1939
+ autoReorder: boolean;
1940
+ locationNotes?: string;
1941
+ }
1942
+ interface IPropertyInventory extends IMetaData {
1943
+ id: string;
1944
+ propertyId: string;
1945
+ inventoryItemId: string;
1946
+ currentLevel: number;
1947
+ minimumLevel: number;
1948
+ maximumLevel?: number;
1949
+ parLevel?: number;
1950
+ lastRestockedAt?: Date;
1951
+ lastRestockedBy?: string;
1952
+ lastCheckedAt?: Date;
1953
+ lastCheckedBy?: string;
1954
+ autoReorder: boolean;
1955
+ locationNotes?: string;
1956
+ }
1957
+ interface IInventoryCount {
1958
+ id: string;
1959
+ checklistExecutionId: string;
1960
+ roomInventoryId: string;
1961
+ previousLevel: number;
1962
+ countedLevel: number;
1963
+ consumedAmount: number;
1964
+ restockedAmount: number;
1965
+ finalLevel: number;
1966
+ countedBy: string;
1967
+ countedAt: Date;
1968
+ needsRestock: boolean;
1969
+ notes?: string;
1970
+ createdAt: Date;
1971
+ }
1972
+ interface IInventoryRestockOrder {
1973
+ id: string;
1974
+ companyId: string;
1975
+ orderNumber?: string;
1976
+ status: TInventoryRestockOrderStatus;
1977
+ totalItems?: number;
1978
+ totalCost?: number;
1979
+ orderedBy?: string;
1980
+ orderedAt?: Date;
1981
+ expectedDelivery?: Date;
1982
+ receivedBy?: string;
1983
+ receivedAt?: Date;
1984
+ supplierInfo?: string;
1985
+ notes?: string;
1986
+ createdAt: Date;
1987
+ updatedAt: Date;
1988
+ }
1989
+ interface IInventoryRestockOrderItem {
1990
+ id: string;
1991
+ orderId: string;
1992
+ inventoryItemId: string;
1993
+ roomInventoryId?: string;
1994
+ propertyInventoryId?: string;
1995
+ quantityOrdered: number;
1996
+ quantityReceived: number;
1997
+ unitCost?: number;
1998
+ totalCost?: number;
1999
+ createdAt: Date;
2000
+ }
2001
+
2002
+ interface IPropertyIdParams {
2003
+ propertyId: string;
2004
+ }
2005
+ interface ICompanyIdParams {
2006
+ companyId: string;
2007
+ }
2008
+ interface ICreatePropertyRequest {
2009
+ companyId: string;
2010
+ displayName: string;
2011
+ propertyType: string;
2012
+ status?: string;
2013
+ addressLine1: string;
2014
+ addressLine2?: string;
2015
+ city: string;
2016
+ stateCode: string;
2017
+ postalCode: string;
2018
+ country?: string;
2019
+ sqft?: number;
2020
+ timezone?: string;
2021
+ photoUrl?: string;
2022
+ specialNotes?: string;
2023
+ }
2024
+ interface IUpdatePropertyRequest extends Partial<ICreatePropertyRequest> {
2025
+ }
2026
+ interface IGetPropertiesRequest {
2027
+ companyId?: string;
2028
+ }
2029
+ interface IGetPropertyByIdRequest extends IPropertyIdParams {
2030
+ }
2031
+ interface IDeletePropertyRequest extends IPropertyIdParams {
2032
+ }
2033
+ type IGetPropertiesResponse = IPropertySummary[];
2034
+ interface IGetPropertyResponse extends IPropertyDetail {
2035
+ }
2036
+ interface ICreatePropertyResponse extends IPropertyDetail {
2037
+ }
2038
+ interface IUpdatePropertyResponse extends IPropertyDetail {
2039
+ }
2040
+ interface IDeletePropertyResponse extends IMessageResponse {
2041
+ }
2042
+ interface IUpdatePropertyAccessInformationRequest extends Partial<IPropertyAccessInformation> {
2043
+ }
2044
+ interface IUpdatePropertyAccessInformationResponse extends IPropertyAccessInformation {
2045
+ }
2046
+ interface IGetPropertyAccessInformationRequest extends IPropertyIdParams {
2047
+ }
2048
+ type IGetPropertyAccessInformationResponse = IPropertyAccessInformation | null;
2049
+ interface IGetPropertyByIdResponse extends IGetPropertyResponse {
2050
+ }
2051
+ interface IGetPropertiesByCompanyIdRequest extends ICompanyIdParams {
2052
+ }
2053
+ type IGetPropertiesByCompanyIdResponse = IProperty[];
2054
+
2055
+ declare const PROPERTY_STATUS: {
2056
+ readonly Active: "Active";
2057
+ readonly Inactive: "Inactive";
2058
+ };
2059
+ type TPropertyStatus = TRecordValue<typeof PROPERTY_STATUS>;
2060
+ declare const PropertyStatusOptions: ISelectOption<TPropertyStatus>[];
2061
+ declare const PROPERTY_TYPES: readonly ["Apartment", "Commercial", "Condo", "House"];
2062
+ type TPropertyType = (typeof PROPERTY_TYPES)[number];
2063
+ declare const PropertyTypeOptions: ISelectOption<TPropertyType>[];
2064
+ interface IProperty extends IMetaData {
2065
+ id: string;
2066
+ displayName: string;
2067
+ addressLine1: string;
2068
+ addressLine2?: string;
2069
+ city: string;
2070
+ stateCode: TUSStateCode | string;
2071
+ propertyType?: TPropertyType;
2072
+ status?: TPropertyStatus;
2073
+ sqft?: number;
2074
+ postalCode: string;
2075
+ country?: string;
2076
+ timezone?: string;
2077
+ imageUrl?: string;
2078
+ photoUrl?: string;
2079
+ companyId: string;
2080
+ specialNotes?: string;
2081
+ }
2082
+ interface IPropertyAccessInformation {
2083
+ propertyId: string;
2084
+ entryInstructions?: string;
2085
+ accessCode?: string;
2086
+ wifiName?: string;
2087
+ wifiPassword?: string;
2088
+ alarmCode?: string;
2089
+ parkingInfo?: string;
2090
+ specialNotes?: string;
2091
+ }
2092
+ interface IPropertyBase {
2093
+ id: string;
2094
+ name: string;
2095
+ address?: string;
2096
+ propertyType?: string;
2097
+ imageUrl?: string;
2098
+ status?: TPropertyStatus;
2099
+ }
2100
+ interface IPropertyMetric {
2101
+ id: string;
2102
+ label: string;
2103
+ value: string | number;
2104
+ iconName?: string;
2105
+ }
2106
+ interface IPropertyAccessItem {
2107
+ id: string;
2108
+ label: string;
2109
+ value?: string;
2110
+ iconName?: string;
2111
+ }
2112
+ interface IPropertyRoomSummaryItem {
2113
+ id: string;
2114
+ name: string;
2115
+ roomType?: string;
2116
+ imageUrl?: string;
2117
+ checklistCount?: number;
2118
+ inventoryCount?: number;
2119
+ }
2120
+ interface IPropertyJobSummaryItem {
2121
+ id: string;
2122
+ title: string;
2123
+ description?: string;
2124
+ status?: TStatus;
2125
+ }
2126
+ interface IPropertyFormValues {
2127
+ displayName: string;
2128
+ propertyType: string;
2129
+ status: string;
2130
+ addressLine1: string;
2131
+ city: string;
2132
+ stateCode: string;
2133
+ postalCode: string;
2134
+ specialNotes: string;
2135
+ }
2136
+ interface IPropertyAccessFormValues {
2137
+ entryInstructions: string;
2138
+ accessCode: string;
2139
+ wifiName: string;
2140
+ wifiPassword: string;
2141
+ parkingInfo: string;
2142
+ specialNotes: string;
2143
+ }
2144
+ interface IPropertyFilterValues {
2145
+ status: string;
2146
+ propertyType: TPropertyType;
2147
+ }
2148
+ interface IPropertySummary {
2149
+ id: string;
2150
+ displayName: string;
2151
+ propertyType: TPropertyType;
2152
+ addressLine1: string;
2153
+ addressLine2: string;
2154
+ city: string;
2155
+ stateCode: string;
2156
+ postalCode: string;
2157
+ imageUrl?: string;
2158
+ status?: string;
2159
+ }
2160
+ interface IPropertyDetail extends IPropertySummary {
2161
+ specialNotes?: string;
2162
+ roomCount?: number;
2163
+ createdAt?: string;
2164
+ updatedAt?: string;
2165
+ }
2166
+
2167
+ interface IJobFilterValues {
2168
+ propertyType: TPropertyType;
2169
+ status: TStatus;
2170
+ role: TServiceType;
2171
+ }
2172
+
2173
+ interface IRoomPropertyRouteParams {
2174
+ propertyId: string;
2175
+ }
2176
+ interface IRoomRouteParams {
2177
+ roomId: string;
2178
+ }
2179
+ interface ICreateRoomRequest {
2180
+ propertyId: string;
2181
+ displayName: string;
2182
+ description?: string;
2183
+ checklistTemplateId?: string;
2184
+ }
2185
+ interface ICreateRoomResponse extends IRoom {
2186
+ }
2187
+ interface IGetRoomsByPropertyIdRequest extends IRoomPropertyRouteParams {
2188
+ }
2189
+ type IGetRoomsByPropertyIdResponse = IRoom[];
2190
+ interface IGetDetailedRoomsByPropertyIdRequest extends IRoomPropertyRouteParams {
2191
+ }
2192
+ type IGetDetailedRoomsByPropertyIdResponse = IRoom[];
2193
+ interface IGetRoomByIdRequest extends IRoomRouteParams {
2194
+ }
2195
+ interface IGetRoomByIdResponse extends IRoom {
2196
+ }
2197
+ interface IUpdateRoomRequest extends Partial<ICreateRoomRequest> {
2198
+ displayName?: string;
2199
+ }
2200
+ interface IUpdateRoomResponse extends IRoom {
2201
+ }
2202
+ interface IDeleteRoomRequest extends IRoomRouteParams {
2203
+ }
2204
+ interface IDeleteRoomResponse extends IMessageResponse {
2205
+ }
2206
+
2207
+ declare const ROOM_TYPE: {
2208
+ BEDROOM: string;
2209
+ BATHROOM: string;
2210
+ KITCHEN: string;
2211
+ LIVING_ROOM: string;
2212
+ DINING_ROOM: string;
2213
+ OFFICE: string;
2214
+ GARAGE: string;
2215
+ LAUNDRY_ROOM: string;
2216
+ BASEMENT: string;
2217
+ ATTIC: string;
2218
+ BALCONY: string;
2219
+ PORCH: string;
2220
+ GARDEN: string;
2221
+ OTHER: string;
2222
+ };
2223
+ type TRoomType = TRecordValue<typeof ROOM_TYPE>;
2224
+ interface IRoom extends IMetaData {
2225
+ id: string;
2226
+ displayName: string;
2227
+ checklistTemplateId?: string;
2228
+ roomType?: TRoomType;
2229
+ heroPhoto?: string;
2230
+ propertyId: string;
2231
+ description?: string;
2232
+ }
2233
+
2234
+ interface IRoomChecklistRoomRouteParams {
2235
+ roomId: string;
2236
+ }
2237
+ interface IChecklistIdParams {
2238
+ checklistId: string;
2239
+ }
2240
+ interface IChecklistAndItemIdParams {
2241
+ checklistId: string;
2242
+ itemId: string;
2243
+ }
2244
+ interface ICreateChecklistRequest extends Omit<ICreateRoomChecklistInput, "roomId"> {
2245
+ name: string;
2246
+ }
2247
+ interface ICreateChecklistResponse extends IRoomChecklist {
2248
+ }
2249
+ interface ICreateCustomChecklistRequest {
2250
+ roomId: string;
2251
+ name: string;
2252
+ items: ICreateRoomChecklistItemInput[];
2253
+ }
2254
+ interface ICreateCustomChecklistResponse extends IRoomChecklistWithItems {
2255
+ }
2256
+ interface IGetChecklistByRoomIdRequest extends IRoomChecklistRoomRouteParams {
2257
+ }
2258
+ interface IGetChecklistByRoomIdResponse extends IRoomChecklist {
2259
+ }
2260
+ interface IGetChecklistByIdRequest extends IChecklistIdParams {
2261
+ }
2262
+ interface IGetChecklistByIdResponse extends IRoomChecklist {
2263
+ }
2264
+ interface IGetChecklistWithItemsRequest extends IChecklistIdParams {
2265
+ }
2266
+ interface IGetChecklistWithItemsResponse extends IRoomChecklistWithItems {
2267
+ }
2268
+ interface IUpdateChecklistRequest extends Partial<ICreateRoomChecklistInput> {
2269
+ }
2270
+ interface IUpdateChecklistResponse extends IRoomChecklist {
2271
+ }
2272
+ interface IDeleteChecklistRequest extends IChecklistIdParams {
2273
+ }
2274
+ interface IDeleteChecklistResponse extends IMessageResponse {
2275
+ }
2276
+ interface ICloneChecklistRequest {
2277
+ targetRoomId: string;
2278
+ }
2279
+ interface ICloneChecklistResponse extends IRoomChecklistWithItems {
2280
+ }
2281
+ interface IGetChecklistItemsRequest extends IChecklistIdParams {
2282
+ }
2283
+ type IGetChecklistItemsResponse = IRoomChecklistItem[];
2284
+ interface IGetCustomChecklistItemsRequest extends IChecklistIdParams {
2285
+ }
2286
+ type IGetCustomChecklistItemsResponse = IRoomChecklistItem[];
2287
+ interface IAddChecklistItemRequest extends ICreateRoomChecklistItemInput {
2288
+ title: string;
2289
+ displayOrder: number;
2290
+ }
2291
+ interface IAddChecklistItemResponse extends IRoomChecklistItem {
2292
+ }
2293
+ interface IUpdateChecklistItemRequest extends Partial<ICreateRoomChecklistItemInput> {
2294
+ }
2295
+ interface IUpdateChecklistItemResponse extends IRoomChecklistItem {
2296
+ }
2297
+ interface IDeleteChecklistItemRequest extends IChecklistAndItemIdParams {
2298
+ }
2299
+ interface IDeleteChecklistItemResponse extends IMessageResponse {
2300
+ }
2301
+ interface IChecklistItemOrder {
2302
+ itemId: string;
2303
+ displayOrder: number;
2304
+ }
2305
+ interface IReorderChecklistItemsRequest {
2306
+ itemOrders: IChecklistItemOrder[];
2307
+ }
2308
+ interface IReorderChecklistItemsResponse extends IMessageResponse {
2309
+ }
2310
+
2311
+ interface IRoomChecklist extends IMetaData {
2312
+ id: string;
2313
+ roomId: string;
2314
+ templateId?: string;
2315
+ name: string;
2316
+ isActive: boolean;
2317
+ items: IRoomChecklistItem[];
2318
+ }
2319
+ interface IRoomChecklistItem extends IChecklistTemplateItem {
2320
+ roomChecklistId: string;
2321
+ templateItemId?: string;
2322
+ isCustom: boolean;
2323
+ }
2324
+ /**
2325
+ * Room checklist with items
2326
+ */
2327
+ interface IRoomChecklistWithItems extends IRoomChecklist {
2328
+ items: IRoomChecklistItem[];
2329
+ }
2330
+ /**
2331
+ * Input for creating a room checklist
2332
+ */
2333
+ interface ICreateRoomChecklistInput {
2334
+ roomId: string;
2335
+ templateId?: string;
2336
+ name: string;
2337
+ isActive?: boolean;
2338
+ }
2339
+ /**
2340
+ * Input for creating room checklist items
2341
+ */
2342
+ interface ICreateRoomChecklistItemInput {
2343
+ title: string;
2344
+ description?: string;
2345
+ displayOrder: number;
2346
+ requiresPhoto?: boolean;
2347
+ isRequired?: boolean;
2348
+ estimatedTimeMinutes?: number;
2349
+ isCustom?: boolean;
2350
+ }
2351
+
2352
+ declare const SUBSCRIPTION_STATUS: {
2353
+ readonly ACTIVE: "active";
2354
+ readonly CANCELED: "canceled";
2355
+ readonly EXPIRED: "expired";
2356
+ readonly PAST_DUE: "past_due";
2357
+ readonly TRIALING: "trialing";
2358
+ };
2359
+ type TSubscriptionStatus = TRecordValue<typeof SUBSCRIPTION_STATUS>;
2360
+ declare const SUBSCRIPTION_PROVIDER: {
2361
+ readonly STRIPE: "stripe";
2362
+ readonly APPLE: "apple";
2363
+ readonly GOOGLE: "google";
2364
+ };
2365
+ type TSubscriptionProvider = TRecordValue<typeof SUBSCRIPTION_PROVIDER>;
2366
+ declare const BILLING_PERIOD: {
2367
+ readonly MONTHLY: "monthly";
2368
+ readonly YEARLY: "yearly";
2369
+ };
2370
+ type TBillingPeriod = TRecordValue<typeof BILLING_PERIOD>;
2371
+ interface IUserSubscription {
2372
+ id: string;
2373
+ userId: string;
2374
+ planId: string;
2375
+ status: TSubscriptionStatus;
2376
+ billingPeriod: TBillingPeriod;
2377
+ currentPeriodStart: Date;
2378
+ currentPeriodEnd: Date;
2379
+ provider: TSubscriptionProvider;
2380
+ providerSubscriptionId: string;
2381
+ cancelAtPeriodEnd: boolean;
2382
+ }
2383
+
2384
+ interface IWorkSessionRouteParams {
2385
+ sessionId: string;
2386
+ }
2387
+ interface IWorkSessionPropertyRouteParams {
2388
+ propertyId: string;
2389
+ }
2390
+ interface IWorkSessionUserRouteParams {
2391
+ userId: string;
2392
+ }
2393
+ interface IWorkSessionExecutionRouteParams {
2394
+ executionId: string;
2395
+ }
2396
+ interface ILimitQuery {
2397
+ limit?: string;
2398
+ }
2399
+ interface ICreateWorkSessionRequest extends Omit<ICreateWorkSessionInput, "propertyId"> {
2400
+ serviceProviderCompanyId: string;
2401
+ performedBy: string;
2402
+ }
2403
+ interface ICreateWorkSessionResponse extends IWorkSession {
2404
+ }
2405
+ interface IGetWorkSessionByIdRequest extends IWorkSessionRouteParams {
2406
+ }
2407
+ interface IGetWorkSessionByIdResponse extends IWorkSession {
2408
+ }
2409
+ interface IGetWorkSessionWithExecutionsRequest extends IWorkSessionRouteParams {
2410
+ }
2411
+ interface IGetWorkSessionWithExecutionsResponse extends IWorkSessionWithExecutions {
2412
+ }
2413
+ interface IUpdateWorkSessionRequest extends Partial<IWorkSession> {
2414
+ }
2415
+ interface IUpdateWorkSessionResponse extends IWorkSession {
2416
+ }
2417
+ interface ICompleteWorkSessionRequest extends IWorkSessionRouteParams {
2418
+ }
2419
+ interface ICompleteWorkSessionResponse extends IWorkSession {
2420
+ }
2421
+ interface ICancelWorkSessionRequest extends IWorkSessionRouteParams {
2422
+ }
2423
+ interface ICancelWorkSessionResponse extends IWorkSession {
2424
+ }
2425
+ interface IGetWorkSessionsByPropertyIdRequest extends IWorkSessionPropertyRouteParams {
2426
+ }
2427
+ type IGetWorkSessionsByPropertyIdResponse = IWorkSession[];
2428
+ interface IGetActiveWorkSessionRequest extends IWorkSessionPropertyRouteParams {
2429
+ }
2430
+ interface IGetActiveWorkSessionResponse extends IWorkSession {
2431
+ }
2432
+ interface IGetWorkSessionsByUserIdRequest extends IWorkSessionUserRouteParams {
2433
+ }
2434
+ type IGetWorkSessionsByUserIdResponse = IWorkSession[];
2435
+ interface IGetChecklistExecutionsRequest extends IWorkSessionRouteParams {
2436
+ }
2437
+ type IGetChecklistExecutionsResponse = IChecklistExecution[];
2438
+ interface IGetChecklistExecutionByIdRequest extends IWorkSessionExecutionRouteParams {
2439
+ }
2440
+ interface IGetChecklistExecutionByIdResponse extends IChecklistExecution {
2441
+ }
2442
+ interface IStartChecklistExecutionRequest extends IWorkSessionExecutionRouteParams {
2443
+ }
2444
+ interface IStartChecklistExecutionResponse extends IChecklistExecution {
2445
+ }
2446
+ interface ICompleteChecklistExecutionRequest {
2447
+ notes?: string;
2448
+ }
2449
+ interface ICompleteChecklistExecutionResponse extends IChecklistExecution {
2450
+ }
2451
+ interface ISkipChecklistExecutionRequest {
2452
+ notes?: string;
2453
+ }
2454
+ interface ISkipChecklistExecutionResponse extends IChecklistExecution {
2455
+ }
2456
+ interface IGetExecutionProgressRequest extends IWorkSessionExecutionRouteParams {
2457
+ }
2458
+ interface IGetExecutionProgressResponse {
2459
+ totalItems: number;
2460
+ completedItems: number;
2461
+ skippedItems: number;
2462
+ progressPercentage: number;
2463
+ }
2464
+ interface IGetExecutionItemsRequest extends IWorkSessionExecutionRouteParams {
2465
+ }
2466
+ type IGetExecutionItemsResponse = IChecklistItemCompletion[];
2467
+ interface ICompleteExecutionItemRequest extends ICompleteChecklistItemInput {
2468
+ roomChecklistItemId: string;
2469
+ }
2470
+ interface ICompleteExecutionItemResponse extends IChecklistItemCompletion {
2471
+ }
2472
+
2473
+ /**
2474
+ * Work session status enum
2475
+ */
2476
+ declare const WORK_SESSION_STATUS: {
2477
+ IN_PROGRESS: string;
2478
+ COMPLETED: string;
2479
+ CANCELLED: string;
2480
+ };
2481
+ type TWorkSessionStatus = TRecordValue<typeof WORK_SESSION_STATUS>;
2482
+ /**
2483
+ * Checklist execution status enum
2484
+ */
2485
+ declare const CHECKLIST_EXECUTION_STATUS: {
2486
+ PENDING: string;
2487
+ IN_PROGRESS: string;
2488
+ COMPLETED: string;
2489
+ SKIPPED: string;
2490
+ };
2491
+ type TChecklistExecutionStatus = TRecordValue<typeof CHECKLIST_EXECUTION_STATUS>;
2492
+ /**
2493
+ * Work session
2494
+ */
2495
+ interface IWorkSession {
2496
+ id: string;
2497
+ propertyId: string;
2498
+ serviceProviderCompanyId: string;
2499
+ performedBy: string;
2500
+ status: TWorkSessionStatus;
2501
+ scheduledDate: Date | null;
2502
+ startedAt: Date;
2503
+ completedAt: Date | null;
2504
+ totalTimeMinutes: number | null;
2505
+ notes: string | null;
2506
+ createdAt: Date;
2507
+ updatedAt: Date;
2508
+ }
2509
+ /**
2510
+ * Checklist execution
2511
+ */
2512
+ interface IChecklistExecution {
2513
+ id: string;
2514
+ workSessionId: string;
2515
+ roomChecklistId: string;
2516
+ roomId: string;
2517
+ workerId: string;
2518
+ status: TChecklistExecutionStatus;
2519
+ startedAt: Date | null;
2520
+ completedAt: Date | null;
2521
+ timeSpentMinutes: number | null;
2522
+ notes: string | null;
2523
+ createdAt: Date;
2524
+ updatedAt: Date;
2525
+ }
2526
+ /**
2527
+ * Checklist item completion
2528
+ */
2529
+ interface IChecklistItemCompletion {
2530
+ id: string;
2531
+ checklistExecutionId: string;
2532
+ roomChecklistItemId: string;
2533
+ completedBy: string;
2534
+ completedAt: Date;
2535
+ photoId: string | null;
2536
+ notes: string | null;
2537
+ skipped: boolean;
2538
+ skipReason: string | null;
2539
+ createdAt: Date;
2540
+ }
2541
+ /**
2542
+ * Work session with executions
2543
+ */
2544
+ interface IWorkSessionWithExecutions extends IWorkSession {
2545
+ executions: IChecklistExecution[];
2546
+ }
2547
+ /**
2548
+ * Input for creating a work session
2549
+ */
2550
+ interface ICreateWorkSessionInput {
2551
+ propertyId: string;
2552
+ serviceProviderCompanyId: string;
2553
+ performedBy: string;
2554
+ scheduledDate?: Date;
2555
+ notes?: string;
2556
+ }
2557
+ /**
2558
+ * Input for completing a checklist item
2559
+ */
2560
+ interface ICompleteChecklistItemInput {
2561
+ roomChecklistItemId: string;
2562
+ completedBy: string;
2563
+ photoId?: string;
2564
+ notes?: string;
2565
+ skipped?: boolean;
2566
+ skipReason?: string;
2567
+ }
2568
+
2569
+ /**
2570
+ * String utilities for common text manipulation tasks.
2571
+ */
2572
+
2573
+ declare const normalCase: (str?: string) => string;
2574
+ declare const sentenceCase: (str?: string) => string;
2575
+ declare const upperCase: (str?: string) => string;
2576
+ declare const lowerCase: (str?: string) => string;
2577
+ /**
2578
+ * Converts a string to camelCase.
2579
+ *
2580
+ * @example toCamelCase('hello-world') => 'helloWorld'
2581
+ * @example toCamelCase('hello_world') => 'helloWorld'
2582
+ */
2583
+ declare const toCamelCase: (str: string) => string;
2584
+ declare const camelCase: (str: string) => string;
2585
+ /**
2586
+ * Converts a string to kebab-case.
2587
+ *
2588
+ * @example toKebabCase('helloWorld') => 'hello-world'
2589
+ * @example toKebabCase('Hello_World') => 'hello-world'
2590
+ */
2591
+ declare const toKebabCase: (str: string) => string;
2592
+ declare const kebabCase: (str: string) => string;
2593
+ /**
2594
+ * Converts a string to snake_case.
2595
+ *
2596
+ * @example toSnakeCase('helloWorld') => 'hello_world'
2597
+ * @example toSnakeCase('hello-world') => 'hello_world'
2598
+ */
2599
+ declare const toSnakeCase: (str: string) => string;
2600
+ declare const snakeCase: (str: string) => string;
2601
+ /**
2602
+ * Converts a string to PascalCase.
2603
+ *
2604
+ * @example toPascalCase('hello-world') => 'HelloWorld'
2605
+ * @example toPascalCase('hello_world') => 'HelloWorld'
2606
+ */
2607
+ declare const toPascalCase: (str: string) => string;
2608
+ declare const pascalCase: (str: string) => string;
2609
+ declare const snakeCaseToSpaces: (str: string) => string;
2610
+ declare const kebabToSpaces: (str: string) => string;
2611
+ /**
2612
+ * Capitalizes the first character of a string.
2613
+ *
2614
+ * @example capitalize('hello world') => 'Hello world'
2615
+ */
2616
+ declare const capitalize: (str: string) => string;
2617
+ /**
2618
+ * Capitalizes the first letter of each word.
2619
+ *
2620
+ * @example titleCase('hello world') => 'Hello World'
2621
+ */
2622
+ declare const titleCase: (str: string) => string;
2623
+ /**
2624
+ * Truncates a string to a specified length and adds ellipsis.
2625
+ *
2626
+ * @example truncate('hello world', 5) => 'he...'
2627
+ */
2628
+ declare const truncate: (str: string, length: number, suffix?: string) => string;
2629
+ /**
2630
+ * Removes all whitespace from a string.
2631
+ *
2632
+ * @example removeWhitespace('hello world') => 'helloworld'
2633
+ */
2634
+ declare const removeWhitespace: (str: string) => string;
2635
+ /**
2636
+ * Removes all non-alphanumeric characters.
2637
+ *
2638
+ * @example removeSpecialChars('hello@world#123') => 'helloworld123'
2639
+ */
2640
+ declare const removeSpecialChars: (str: string) => string;
2641
+ /**
2642
+ * Generates a URL-friendly slug from a string.
2643
+ *
2644
+ * @example slug('Hello World 2024!') => 'hello-world-2024'
2645
+ */
2646
+ declare const slug: (str: string) => string;
2647
+ /**
2648
+ * Validates if a string is a valid email.
2649
+ *
2650
+ * @example isEmail('user@example.com') => true
2651
+ */
2652
+ declare const isEmail: (str: string) => boolean;
2653
+ /**
2654
+ * Validates if a string is a valid URL.
2655
+ *
2656
+ * @example isUrl('https://example.com') => true
2657
+ */
2658
+ declare const isUrl: (str: string) => boolean;
2659
+ /**
2660
+ * Validates if a string contains only numbers.
2661
+ *
2662
+ * @example isNumeric('12345') => true
2663
+ * @example isNumeric('123abc') => false
2664
+ */
2665
+ declare const isNumeric: (str: string) => boolean;
2666
+ /**
2667
+ * Checks if a string is empty or contains only whitespace.
2668
+ *
2669
+ * @example isEmpty(' ') => true
2670
+ * @example isEmpty('hello') => false
2671
+ */
2672
+ declare const isEmpty: (str: string) => boolean;
2673
+ /**
2674
+ * Reverses a string.
2675
+ *
2676
+ * @example reverse('hello') => 'olleh'
2677
+ */
2678
+ declare const reverse: (str: string) => string;
2679
+ /**
2680
+ * Repeats a string a specified number of times.
2681
+ *
2682
+ * @example repeat('ab', 3) => 'ababab'
2683
+ */
2684
+ declare const repeat: (str: string, times: number) => string;
2685
+ /**
2686
+ * Pads a string to a specified length.
2687
+ *
2688
+ * @example padStart('5', 3, '0') => '005'
2689
+ * @example padEnd('5', 3, '0') => '500'
2690
+ */
2691
+ declare const padStart: (str: string, length: number, padChar?: string) => string;
2692
+ declare const padEnd: (str: string, length: number, padChar?: string) => string;
2693
+ /**
2694
+ * Encodes a string to Base64.
2695
+ *
2696
+ * @example toBase64('hello') => 'aGVsbG8='
2697
+ */
2698
+ declare const toBase64: (str: string) => string;
2699
+ /**
2700
+ * Decodes a Base64 string.
2701
+ *
2702
+ * @example fromBase64('aGVsbG8=') => 'hello'
2703
+ */
2704
+ declare const fromBase64: (str: string) => string;
2705
+ /**
2706
+ * Counts the number of words in a string.
2707
+ *
2708
+ * @example wordCount('hello world test') => 3
2709
+ */
2710
+ declare const wordCount: (str: string) => number;
2711
+ /**
2712
+ * Counts the number of characters, excluding whitespace.
2713
+ *
2714
+ * @example charCount('hello world') => 10
2715
+ */
2716
+ declare const charCount: (str: string) => number;
2717
+ /**
2718
+ * Repeats a character a specified number of times.
2719
+ *
2720
+ * @example repeatChar('*', 5) => '*****'
2721
+ */
2722
+ declare const repeatChar: (char: string, times: number) => string;
2723
+ /**
2724
+ * Extracts numbers from a string.
2725
+ *
2726
+ * @example extractNumbers('abc123def456') => '123456'
2727
+ */
2728
+ declare const extractNumbers: (str: string) => string;
2729
+ /**
2730
+ * Removes duplicate consecutive characters.
2731
+ *
2732
+ * @example removeDuplicates('aabbccdd') => 'abcd'
2733
+ */
2734
+ declare const removeDuplicates: (str: string) => string;
2735
+ /**
2736
+ * Checks if a string is a palindrome.
2737
+ *
2738
+ * @example isPalindrome('racecar') => true
2739
+ * @example isPalindrome('hello') => false
2740
+ */
2741
+ declare const isPalindrome: (str: string) => boolean;
2742
+ /**
2743
+ * Finds the longest word in a string.
2744
+ *
2745
+ * @example longestWord('the quick brown fox') => 'quick'
2746
+ */
2747
+ declare const longestWord: (str: string) => string;
2748
+ /**
2749
+ * Pluralizes common English words using a simple ruleset.
2750
+ *
2751
+ * @example pluralize('cat') => 'cats'
2752
+ * @example pluralize('box') => 'boxes'
2753
+ */
2754
+ declare const pluralize: (word: string) => string;
2755
+ /**
2756
+ * Highlights a substring within a string by wrapping it with markers.
2757
+ *
2758
+ * @example highlight('hello world', 'world', '**') => 'hello **world**'
2759
+ */
2760
+ declare const highlight: (str: string, substring: string, marker?: string) => string;
2761
+ /**
2762
+ * Converts a string to a regex-safe string.
2763
+ *
2764
+ * @example escapeRegex('a.b*c') => 'a\\.b\\*c'
2765
+ */
2766
+ declare const escapeRegex: (str: string) => string;
2767
+ /**
2768
+ * Finds similarity between two strings using Levenshtein distance.
2769
+ * Returns a value between 0 and 1, where 1 means identical.
2770
+ *
2771
+ * @example stringSimilarity('hello', 'hallo') => 0.8
2772
+ */
2773
+ declare const stringSimilarity: (str1: string, str2: string) => number;
2774
+ /**
2775
+ * Strips HTML tags from a string.
2776
+ *
2777
+ * @example stripHtml('<p>Hello <b>world</b></p>') => 'Hello world'
2778
+ */
2779
+ declare const stripHtml: (str: string) => string;
2780
+ /**
2781
+ * Replaces multiple spaces with a single space.
2782
+ *
2783
+ * @example normalizeSpaces('hello world') => 'hello world'
2784
+ */
2785
+ declare const normalizeSpaces: (str: string) => string;
2786
+ /**
2787
+ * Converts a string to a number, returning null if not valid.
2788
+ *
2789
+ * @example toNumber('123') => 123
2790
+ * @example toNumber('abc') => null
2791
+ */
2792
+ declare const toNumber: (str: string) => number | null;
2793
+ /**
2794
+ * Splits a string by multiple delimiters.
2795
+ *
2796
+ * @example splitMultiple('a,b;c:d', ',', ';', ':') => ['a', 'b', 'c', 'd']
2797
+ */
2798
+ declare const splitMultiple: (str: string, ...delimiters: string[]) => string[];
2799
+ /**
2800
+ * Checks if a string contains any of the provided substrings.
2801
+ *
2802
+ * @example containsAny('hello world', 'foo', 'world') => true
2803
+ */
2804
+ declare const containsAny: (str: string, ...substrings: string[]) => boolean;
2805
+ /**
2806
+ * Checks if a string contains all of the provided substrings.
2807
+ *
2808
+ * @example containsAll('hello world', 'hello', 'world') => true
2809
+ */
2810
+ declare const containsAll: (str: string, ...substrings: string[]) => boolean;
2811
+ interface IAddress {
2812
+ addressLine1: string;
2813
+ addressLine2?: string;
2814
+ city: string;
2815
+ stateCode: TUSStateCode;
2816
+ postalCode: string;
2817
+ }
2818
+ declare const formatAddress: (address: IAddress) => string;
2819
+
2820
+ export { ACCOUNT_STATUS, ACCOUNT_TYPE, AUTH_STATUS, BILLING_PERIOD, CHECKLIST_EXECUTION_STATUS, COMPANY_TYPES, DAMAGE_SEVERITY, DAMAGE_STATUS, ERROR_CODES, HTTP_METHOD, HTTP_STATUS, type IAcceptCompanyInvitationRequest, type IAcceptCompanyInvitationResponse, type IAcceptInvitationRequest, type IAcceptInvitationResponse, type IAcceptInvitationRouteResponse, type IAddChecklistItemRequest, type IAddChecklistItemResponse, type IAddDamageReportCommentRequest, type IAddDamageReportCommentResponse, type IAddDamageReportPhotoRequest, type IAddDamageReportPhotoResponse, type IAddInventoryToPropertyRequest, type IAddInventoryToPropertyResponse, type IAddInventoryToRoomRequest, type IAddInventoryToRoomResponse, type IAddTemplateItemRequest, type IAddTemplateItemResponse, type IAddress, type IApiError, type IApiMeta, type IApiResponse, type IAssignDamageReportRequest, type IAssignDamageReportResponse, type IAssignWorkOrderRequest, type IAssignWorkOrderResponse, type IAuthInvitationIdParams, type IAuthInvitationTokenParams, type IAuthSession, type IAuthSessionIdParams, type IAuthTokenResponse, type IAuthTokens, type ICancelWorkSessionRequest, type ICancelWorkSessionResponse, type IChangePasswordRequest, type IChangePasswordResponse, type IChecklistAndItemIdParams, type IChecklistExecution, type IChecklistIdParams, type IChecklistItemCompletion, type IChecklistItemOrder, type IChecklistTemplate, type IChecklistTemplateCompanyRouteParams, type IChecklistTemplateItem, type IChecklistTemplateWithItems, type ICloneChecklistRequest, type ICloneChecklistResponse, type ICompany, type ICompanyIdParams, type ICompanyInvitationIdParams, type ICompanyInvitationTokenParams, type ICompanyRouteParams, type ICompanyUserRouteParams, type ICompanyUserSummary, type ICompleteChecklistExecutionRequest, type ICompleteChecklistExecutionResponse, type ICompleteChecklistItemInput, type ICompleteExecutionItemRequest, type ICompleteExecutionItemResponse, type ICompleteWorkOrderRequest, type ICompleteWorkOrderResponse, type ICompleteWorkSessionRequest, type ICompleteWorkSessionResponse, type ICountResponse, type ICreateChecklistRequest, type ICreateChecklistResponse, type ICreateCompanyRequest, type ICreateCompanyResponse, type ICreateCustomChecklistRequest, type ICreateCustomChecklistResponse, type ICreateDamageReportInput, type ICreateDamageReportRequest, type ICreateDamageReportResponse, type ICreateInventoryItemRequest, type ICreateInventoryItemResponse, type ICreatePropertyRequest, type ICreatePropertyResponse, type ICreateRestockOrderRequest, type ICreateRestockOrderResponse, type ICreateRoomChecklistInput, type ICreateRoomChecklistItemInput, type ICreateRoomRequest, type ICreateRoomResponse, type ICreateTemplateInput, type ICreateTemplateItemInput, type ICreateTemplateRequest, type ICreateTemplateResponse, type ICreateTemplateWithItemsRequest, type ICreateTemplateWithItemsResponse, type ICreateWorkOrderInput, type ICreateWorkOrderRequest, type ICreateWorkOrderResponse, type ICreateWorkSessionInput, type ICreateWorkSessionRequest, type ICreateWorkSessionResponse, type IDamageComment, type IDamagePhoto, type IDamageReport, type IDamageReportPhoto, type IDamageReportPropertyRouteParams, type IDamageReportRoomRouteParams, type IDamageReportRouteParams, type IDamageReportStatusHistory, type IDamageReportWorkOrderRouteParams, type IDataWithPagingResult, type IDeclineCompanyInvitationRequest, type IDeclineCompanyInvitationResponse, type IDeleteChecklistItemRequest, type IDeleteChecklistItemResponse, type IDeleteChecklistRequest, type IDeleteChecklistResponse, type IDeleteImageRequest, type IDeleteImageResponse, type IDeleteInventoryItemRequest, type IDeleteInventoryItemResponse, type IDeletePropertyRequest, type IDeletePropertyResponse, type IDeleteRoomRequest, type IDeleteRoomResponse, type IDeleteTemplateItemRequest, type IDeleteTemplateItemResponse, type IDeleteTemplateRequest, type IDeleteTemplateResponse, type IDeleteUserRequest, type IDeleteUserResponse, type IDeviceInfo, type IDuplicateTemplateItemRequest, type IDuplicateTemplateItemResponse, type IEmailValidationResult, type IEmptyRouteParams, type IFilterCondition, type IForgotPasswordRequest, type IForgotPasswordResponse, type IGetActiveWorkSessionRequest, type IGetActiveWorkSessionResponse, type IGetChecklistByIdRequest, type IGetChecklistByIdResponse, type IGetChecklistByRoomIdRequest, type IGetChecklistByRoomIdResponse, type IGetChecklistExecutionByIdRequest, type IGetChecklistExecutionByIdResponse, type IGetChecklistExecutionsRequest, type IGetChecklistExecutionsResponse, type IGetChecklistItemsRequest, type IGetChecklistItemsResponse, type IGetChecklistWithItemsRequest, type IGetChecklistWithItemsResponse, type IGetCleanersRequest, type IGetCleanersResponse, type IGetCompaniesQuery, type IGetCompaniesRequest, type IGetCompaniesResponse, type IGetCompanyByIdRequest, type IGetCompanyByIdResponse, type IGetCompanyUsersRequest, type IGetCompanyUsersResponse, type IGetCurrentUserRequest, type IGetCurrentUserResponse, type IGetCustomChecklistItemsRequest, type IGetCustomChecklistItemsResponse, type IGetDamageReportByIdRequest, type IGetDamageReportByIdResponse, type IGetDamageReportCommentsRequest, type IGetDamageReportCommentsResponse, type IGetDamageReportHistoryRequest, type IGetDamageReportHistoryResponse, type IGetDamageReportPhotosRequest, type IGetDamageReportPhotosResponse, type IGetDamageReportsByPropertyIdRequest, type IGetDamageReportsByPropertyIdResponse, type IGetDamageReportsByRoomIdRequest, type IGetDamageReportsByRoomIdResponse, type IGetDetailedHealthRequest, type IGetDetailedHealthResponse, type IGetDetailedRoomsByPropertyIdRequest, type IGetDetailedRoomsByPropertyIdResponse, type IGetExecutionItemsRequest, type IGetExecutionItemsResponse, type IGetExecutionProgressRequest, type IGetExecutionProgressResponse, type IGetHealthRequest, type IGetHealthResponse, type IGetImagesForEntityResponse, type IGetInventoryByCompanyIdRequest, type IGetInventoryByCompanyIdResponse, type IGetInventoryCountsByExecutionIdRequest, type IGetInventoryCountsByExecutionIdResponse, type IGetInventoryItemByIdRequest, type IGetInventoryItemByIdResponse, type IGetLoginHistoryListResponse, type IGetLoginHistoryRequest, type IGetLoginHistoryResponse, type IGetMeRequest, type IGetMeResponse, type IGetPendingCompanyInvitationsRequest, type IGetPendingCompanyInvitationsResponse, type IGetPendingInvitationsListResponse, type IGetPendingInvitationsRequest, type IGetPendingInvitationsResponse, type IGetPropertiesByCompanyIdRequest, type IGetPropertiesByCompanyIdResponse, type IGetPropertiesRequest, type IGetPropertiesResponse, type IGetPropertyAccessInformationRequest, type IGetPropertyAccessInformationResponse, type IGetPropertyByIdRequest, type IGetPropertyByIdResponse, type IGetPropertyInventoryNeedingRestockRequest, type IGetPropertyInventoryNeedingRestockResponse, type IGetPropertyInventoryRequest, type IGetPropertyInventoryResponse, type IGetPropertyResponse, type IGetRestockOrderItemsRequest, type IGetRestockOrderItemsResponse, type IGetRestockOrdersByCompanyIdRequest, type IGetRestockOrdersByCompanyIdResponse, type IGetRoomByIdRequest, type IGetRoomByIdResponse, type IGetRoomInventoryNeedingRestockRequest, type IGetRoomInventoryNeedingRestockResponse, type IGetRoomInventoryRequest, type IGetRoomInventoryResponse, type IGetRoomsByPropertyIdRequest, type IGetRoomsByPropertyIdResponse, type IGetSessionsRequest, type IGetSessionsResponse, type IGetTemplateByIdRequest, type IGetTemplateByIdResponse, type IGetTemplateItemsRequest, type IGetTemplateItemsResponse, type IGetTemplateUsageRequest, type IGetTemplateUsageResponse, type IGetTemplateWithItemsRequest, type IGetTemplateWithItemsResponse, type IGetTemplatesByCompanyIdRequest, type IGetTemplatesByCompanyIdResponse, type IGetUserByEmailRequest, type IGetUserByEmailResponse, type IGetUserByIdRequest, type IGetUserByIdResponse, type IGetUserCompaniesRequest, type IGetUserCompaniesResponse, type IGetUserResponse, type IGetUsersByAccountTypeRequest, type IGetWorkOrderByIdRequest, type IGetWorkOrderByIdResponse, type IGetWorkOrdersByPropertyIdRequest, type IGetWorkOrdersByPropertyIdResponse, type IGetWorkSessionByIdRequest, type IGetWorkSessionByIdResponse, type IGetWorkSessionWithExecutionsRequest, type IGetWorkSessionWithExecutionsResponse, type IGetWorkSessionsByPropertyIdRequest, type IGetWorkSessionsByPropertyIdResponse, type IGetWorkSessionsByUserIdRequest, type IGetWorkSessionsByUserIdResponse, type IHealthCheckResponse, type IHealthChecks, type IImage, type IImageCompanyRouteParams, type IImagePropertyRouteParams, type IImageRoomRouteParams, type IImageRouteParams, type IImageUserRouteParams, type IImageWithUrl, type IIncludeInactiveQuery, type IIncludeResolvedQuery, type IInventoryCompanyRouteParams, type IInventoryCount, type IInventoryExecutionRouteParams, type IInventoryItem, type IInventoryItemRouteParams, type IInventoryOrderRouteParams, type IInventoryPropertyRouteParams, type IInventoryRestockOrder, type IInventoryRestockOrderItem, type IInventoryRoomRouteParams, type IInviteCompanyToCompanyRequest, type IInviteCompanyToCompanyResponse, type IInviteUserToCompanyRequest, type IInviteUserToCompanyResponse, type IJobFilterValues, type ILimitQuery, type ILoginCredentials, type ILoginRequest, type ILoginResponse, type ILogoutAllRequest, type ILogoutAllResponse, type ILogoutRequest, type ILogoutResponse, IMAGE_ENTITY, IMAGE_ENTITY_TYPE, type IMessageResponse, type IMetaData, type IMissingFieldsErrorDetail, INVENTORY_ITEM_TYPE, INVENTORY_UNITS, type IPaginationRequest, type IPagingResult, type IPasswordValidationResult, type IPasswordValidationRules, type IProperty, type IPropertyAccessFormValues, type IPropertyAccessInformation, type IPropertyAccessItem, type IPropertyBase, type IPropertyDetail, type IPropertyFilterValues, type IPropertyFormValues, type IPropertyIdParams, type IPropertyInventory, type IPropertyJobSummaryItem, type IPropertyMetric, type IPropertyRoomSummaryItem, type IPropertySummary, type IRateLimitErrorDetail, type IRateLimitStatus, type IRecordInventoryCountRequest, type IRecordInventoryCountResponse, type IRefreshRequest, type IRefreshResponse, type IRefreshSessionRequest, type IRefreshSessionResponse, type IRefreshTokenData, type IRegisterCredentials, type IRegisterRequest, type IRegisterResponse, type IRegisterWithInvitationRequest, type IRegisterWithInvitationResponse, type IReorderChecklistItemsRequest, type IReorderChecklistItemsResponse, type IReorderTemplateItemsRequest, type IReorderTemplateItemsResponse, type IResolveDamageReportRequest, type IResolveDamageReportResponse, type IRestockOrderItemInput, type IRevokeCompanyInvitationRequest, type IRevokeCompanyInvitationResponse, type IRevokeInvitationRequest, type IRevokeInvitationResponse, type IRevokeSessionRequest, type IRevokeSessionResponse, type IRoom, type IRoomChecklist, type IRoomChecklistItem, type IRoomChecklistRoomRouteParams, type IRoomChecklistWithItems, type IRoomInventory, type IRoomInventoryIdParams, type IRoomPropertyRouteParams, type IRoomRouteParams, type ISelectOption, type ISetAuthSessionParams, type ISkipChecklistExecutionRequest, type ISkipChecklistExecutionResponse, type ISortCondition, type IStartChecklistExecutionRequest, type IStartChecklistExecutionResponse, type IStoredAuthSession, type ISuccessResponse, type ITemplateAndItemIdParams, type ITemplateIdParams, type ITemplateItemIdParams, type ITemplateItemOrder, type IToggleTemplateActiveRequest, type IToggleTemplateActiveResponse, type ITokenPayload, type ITypedApiError, type IUpdateChecklistItemRequest, type IUpdateChecklistItemResponse, type IUpdateChecklistRequest, type IUpdateChecklistResponse, type IUpdateCompanyRequest, type IUpdateCompanyResponse, type IUpdateDamageReportRequest, type IUpdateDamageReportResponse, type IUpdateDamageReportStatusRequest, type IUpdateDamageReportStatusResponse, type IUpdateInventoryItemRequest, type IUpdateInventoryItemResponse, type IUpdatePropertyAccessInformationRequest, type IUpdatePropertyAccessInformationResponse, type IUpdatePropertyRequest, type IUpdatePropertyResponse, type IUpdateRestockOrderStatusRequest, type IUpdateRestockOrderStatusResponse, type IUpdateRoomInventoryRequest, type IUpdateRoomInventoryResponse, type IUpdateRoomRequest, type IUpdateRoomResponse, type IUpdateTemplateItemRequest, type IUpdateTemplateItemResponse, type IUpdateTemplateRequest, type IUpdateTemplateResponse, type IUpdateUserRequest, type IUpdateUserResponse, type IUpdateWorkOrderRequest, type IUpdateWorkOrderResponse, type IUpdateWorkOrderStatusRequest, type IUpdateWorkOrderStatusResponse, type IUpdateWorkSessionRequest, type IUpdateWorkSessionResponse, type IUploadImagesResponse, type IUploadProfileImageRequest, type IUploadProfileImageResponse, type IUser, type IUserIdParams, type IUserSafe, type IUserSession, type IUserSubscription, type IValidateCompanyInvitationRequest, type IValidateCompanyInvitationResponse, type IValidateInvitationRequest, type IValidateInvitationResponse, type IValidationErrorDetail, type IVersion, type IWeekDay, type IWorkOrder, type IWorkSession, type IWorkSessionExecutionRouteParams, type IWorkSessionPropertyRouteParams, type IWorkSessionRouteParams, type IWorkSessionUserRouteParams, type IWorkSessionWithExecutions, JSONStringify, LANGUAGE, MONTHS, PROPERTY_STATUS, PROPERTY_TYPES, PropertyStatusOptions, PropertyTypeOptions, SERVICE_TYPES, SEVERITY, STATUS, SUBSCRIPTION_PROVIDER, SUBSCRIPTION_STATUS, ServiceTypeOptions, SeverityOptions, StatusOptions, type TAccountStatus, type TAccountType, type TApiResponse, type TAuthStatus, type TBillingPeriod, type TChecklistExecutionStatus, type TCompanyType, type TDamageSeverity, type TDamageStatus, type TDateFormat, type TDateInput, type TEmptyObject, type TErrorCode, type TErrorResponseDetail, type THttpMethod, type THttpStatusCode, type TImageEntityType, type TInventoryItemType, type TInventoryRestockOrderStatus, type TInventoryUnitType, type TJsonPrimitive, type TJsonValue, type TLanguage, type TMissingFieldsError, type TMode, type TMonth, type TPropertyStatus, type TPropertyType, type TRateLimitError, type TRecordKeys, type TRecordValue, type TRoomType, type TServiceType, type TSeverity, type TStatus, type TStoredImageEntityType, type TSubscriptionProvider, type TSubscriptionStatus, type TUSJurisdiction, type TUSStateCode, type TUnknownRecord, type TValidationError, type TVersionInput, type TWorkOrderPriority, type TWorkOrderStatus, type TWorkSessionStatus, type TurndownObject, US_JURISDICTIONS, US_STATES_CODE, UnitedStatesJurisdictionOptions, WORK_ORDER_PRIORITY, WORK_ORDER_STATUS, WORK_SESSION_STATUS, addDays, addWeeks, camelCase, capitalize, charCount, chunkArray, cleanFormData, containsAll, containsAny, convertStringBooleans, createPagingObject, daysBetween, deepClone, deletePropertyIfExists, endOfDay, endOfWeek, escapeRegex, extractNumbers, filterArrayById, flatten, formatAddress, formatDate, formatNumber, formatPhoneNumber, fromBase64, getFirstPropertyValue, getNestedValue, getWeekDays, hasOwnProp, hasProperties, hasProperty, highlight, isAuthError, isEmail, isEmpty, isFuture, isMissingFieldsError, isNumeric, isPalindrome, isPast, isRateLimitError, isToday, isUrl, isValidationError, kebabCase, kebabToSpaces, longestWord, lowerCase, normalCase, normalizeSpaces, omitProperties, padEnd, padStart, parseJSON, parseNumber, pascalCase, pluralize, removeDuplicates, removeFormProperties, removeSpecialChars, removeUndefined, removeWhitespace, repeat, repeatChar, replaceNulls, resetPagination, returnObject, reverse, sentenceCase, setNestedValue, slug, snakeCase, snakeCaseToSpaces, sortArrayByProperty, splitMultiple, startOfDay, startOfWeek, stringSimilarity, stripHtml, subtractDays, subtractWeeks, timeAgo, titleCase, toBase64, toCamelCase, toKebabCase, toNumber, toPascalCase, toSnakeCase, truncate, unflatten, upperCase, validPath, wordCount };