@inventorai/sdk 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +516 -0
- package/dist/client.d.ts +59 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +61 -0
- package/dist/errors/api-error.d.ts +12 -0
- package/dist/errors/api-error.d.ts.map +1 -0
- package/dist/errors/api-error.js +26 -0
- package/dist/http/client.d.ts +13 -0
- package/dist/http/client.d.ts.map +1 -0
- package/dist/http/client.js +89 -0
- package/dist/index.d.ts +31 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +72 -0
- package/dist/resources/address-lookup.d.ts +15 -0
- package/dist/resources/address-lookup.d.ts.map +1 -0
- package/dist/resources/address-lookup.js +21 -0
- package/dist/resources/asset-checks.d.ts +19 -0
- package/dist/resources/asset-checks.d.ts.map +1 -0
- package/dist/resources/asset-checks.js +15 -0
- package/dist/resources/branches.d.ts +11 -0
- package/dist/resources/branches.d.ts.map +1 -0
- package/dist/resources/branches.js +15 -0
- package/dist/resources/clients.d.ts +19 -0
- package/dist/resources/clients.d.ts.map +1 -0
- package/dist/resources/clients.js +27 -0
- package/dist/resources/compliance-forms.d.ts +8 -0
- package/dist/resources/compliance-forms.d.ts.map +1 -0
- package/dist/resources/compliance-forms.js +12 -0
- package/dist/resources/compliance.d.ts +28 -0
- package/dist/resources/compliance.d.ts.map +1 -0
- package/dist/resources/compliance.js +45 -0
- package/dist/resources/components.d.ts +8 -0
- package/dist/resources/components.d.ts.map +1 -0
- package/dist/resources/components.js +12 -0
- package/dist/resources/defects.d.ts +29 -0
- package/dist/resources/defects.d.ts.map +1 -0
- package/dist/resources/defects.js +39 -0
- package/dist/resources/hazards.d.ts +11 -0
- package/dist/resources/hazards.d.ts.map +1 -0
- package/dist/resources/hazards.js +12 -0
- package/dist/resources/hmo.d.ts +23 -0
- package/dist/resources/hmo.d.ts.map +1 -0
- package/dist/resources/hmo.js +21 -0
- package/dist/resources/inspection-ai.d.ts +16 -0
- package/dist/resources/inspection-ai.d.ts.map +1 -0
- package/dist/resources/inspection-ai.js +30 -0
- package/dist/resources/inspection-areas.d.ts +26 -0
- package/dist/resources/inspection-areas.d.ts.map +1 -0
- package/dist/resources/inspection-areas.js +39 -0
- package/dist/resources/inspection-elements.d.ts +22 -0
- package/dist/resources/inspection-elements.d.ts.map +1 -0
- package/dist/resources/inspection-elements.js +33 -0
- package/dist/resources/inspection-items.d.ts +25 -0
- package/dist/resources/inspection-items.d.ts.map +1 -0
- package/dist/resources/inspection-items.js +36 -0
- package/dist/resources/inspections.d.ts +42 -0
- package/dist/resources/inspections.d.ts.map +1 -0
- package/dist/resources/inspections.js +57 -0
- package/dist/resources/keys-fobs.d.ts +20 -0
- package/dist/resources/keys-fobs.d.ts.map +1 -0
- package/dist/resources/keys-fobs.js +30 -0
- package/dist/resources/meter-readings.d.ts +20 -0
- package/dist/resources/meter-readings.d.ts.map +1 -0
- package/dist/resources/meter-readings.js +30 -0
- package/dist/resources/modifiers.d.ts +41 -0
- package/dist/resources/modifiers.d.ts.map +1 -0
- package/dist/resources/modifiers.js +45 -0
- package/dist/resources/phrases.d.ts +27 -0
- package/dist/resources/phrases.d.ts.map +1 -0
- package/dist/resources/phrases.js +27 -0
- package/dist/resources/properties.d.ts +21 -0
- package/dist/resources/properties.d.ts.map +1 -0
- package/dist/resources/properties.js +30 -0
- package/dist/resources/property-templates.d.ts +11 -0
- package/dist/resources/property-templates.d.ts.map +1 -0
- package/dist/resources/property-templates.js +15 -0
- package/dist/resources/scheduler.d.ts +11 -0
- package/dist/resources/scheduler.d.ts.map +1 -0
- package/dist/resources/scheduler.js +24 -0
- package/dist/resources/stats.d.ts +10 -0
- package/dist/resources/stats.d.ts.map +1 -0
- package/dist/resources/stats.js +21 -0
- package/dist/resources/team.d.ts +18 -0
- package/dist/resources/team.d.ts.map +1 -0
- package/dist/resources/team.js +20 -0
- package/dist/resources/teams.d.ts +16 -0
- package/dist/resources/teams.d.ts.map +1 -0
- package/dist/resources/teams.js +18 -0
- package/dist/resources/user.d.ts +10 -0
- package/dist/resources/user.d.ts.map +1 -0
- package/dist/resources/user.js +12 -0
- package/dist/resources/vocabulary.d.ts +11 -0
- package/dist/resources/vocabulary.d.ts.map +1 -0
- package/dist/resources/vocabulary.js +12 -0
- package/dist/types/index.d.ts +887 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +3 -0
- package/package.json +45 -0
|
@@ -0,0 +1,887 @@
|
|
|
1
|
+
/** Building type. The API accepts any string; these are the known values. HMO status is `is_hmo`, not a type. */
|
|
2
|
+
export type PropertyType = 'flat' | 'house' | 'commercial' | 'studio' | 'land' | (string & {});
|
|
3
|
+
export type InspectionStatus = 'draft' | 'in_progress' | 'in_review' | 'pending_signature' | 'completed';
|
|
4
|
+
export type ScribePolicy = 'off' | 'optional' | 'only';
|
|
5
|
+
export type InspectionType = 'move_in' | 'move_out' | 'periodic' | 'vacant' | 'pre_tenancy' | 'landlord_only' | 'between_tenancies';
|
|
6
|
+
export type Condition = 'very_poor' | 'poor' | 'fair' | 'good' | 'new';
|
|
7
|
+
export type Cleanliness = 'dirty' | 'needs_cleaning' | 'acceptable' | 'clean' | 'very_clean';
|
|
8
|
+
export type MeterType = 'gas' | 'electricity' | 'water' | 'other';
|
|
9
|
+
export type KeyFobType = 'front_door_key' | 'back_door_key' | 'mailbox_key' | 'window_key' | 'entry_fob' | 'garage_remote' | 'gate_remote' | 'other';
|
|
10
|
+
export type DefectSeverity = 'low' | 'medium' | 'high' | 'critical';
|
|
11
|
+
export type DefectStatus = 'open' | 'assigned' | 'in_progress' | 'awaiting_approval' | 'completed';
|
|
12
|
+
export type DefectableType = 'area' | 'item' | 'element';
|
|
13
|
+
export type ModifierType = 'brand' | 'size' | 'type' | 'accessory';
|
|
14
|
+
export type PhraseCategory = 'area' | 'item' | 'element';
|
|
15
|
+
export interface Address {
|
|
16
|
+
line_1: string;
|
|
17
|
+
line_2?: string;
|
|
18
|
+
city?: string;
|
|
19
|
+
county?: string;
|
|
20
|
+
postcode: string;
|
|
21
|
+
country?: string;
|
|
22
|
+
full_address?: string;
|
|
23
|
+
}
|
|
24
|
+
export interface Location {
|
|
25
|
+
latitude: number;
|
|
26
|
+
longitude: number;
|
|
27
|
+
}
|
|
28
|
+
export interface Photo {
|
|
29
|
+
id: string;
|
|
30
|
+
file_name: string;
|
|
31
|
+
size: number;
|
|
32
|
+
mime_type: string;
|
|
33
|
+
url: string;
|
|
34
|
+
thumbnail_url?: string;
|
|
35
|
+
created_at: string;
|
|
36
|
+
}
|
|
37
|
+
export interface Certificate {
|
|
38
|
+
id: string;
|
|
39
|
+
type: string;
|
|
40
|
+
name: string;
|
|
41
|
+
rating?: string;
|
|
42
|
+
certificate_number?: string;
|
|
43
|
+
issue_date?: string;
|
|
44
|
+
expiry_date?: string;
|
|
45
|
+
url?: string;
|
|
46
|
+
is_current: boolean;
|
|
47
|
+
expiry_status?: string;
|
|
48
|
+
}
|
|
49
|
+
export interface CoverImage {
|
|
50
|
+
id: string;
|
|
51
|
+
url: string;
|
|
52
|
+
thumbnail_url?: string;
|
|
53
|
+
}
|
|
54
|
+
export interface Property {
|
|
55
|
+
id: string;
|
|
56
|
+
branch_id?: string | null;
|
|
57
|
+
branch?: {
|
|
58
|
+
id: string;
|
|
59
|
+
name: string;
|
|
60
|
+
} | null;
|
|
61
|
+
client_id?: string | null;
|
|
62
|
+
client?: Client;
|
|
63
|
+
address: Address;
|
|
64
|
+
location?: Location;
|
|
65
|
+
property_type: PropertyType;
|
|
66
|
+
is_hmo: boolean;
|
|
67
|
+
is_residential: boolean;
|
|
68
|
+
areas?: Array<{
|
|
69
|
+
id: string;
|
|
70
|
+
name: string;
|
|
71
|
+
category?: string;
|
|
72
|
+
is_assignable?: boolean;
|
|
73
|
+
order?: number;
|
|
74
|
+
}>;
|
|
75
|
+
image_thumbnail?: string;
|
|
76
|
+
image_small?: string;
|
|
77
|
+
notes?: string;
|
|
78
|
+
certificates?: Record<string, Certificate>;
|
|
79
|
+
landlord?: Landlord;
|
|
80
|
+
image?: string;
|
|
81
|
+
inspections_count?: number;
|
|
82
|
+
tenancies_count?: number;
|
|
83
|
+
inspections?: Inspection[];
|
|
84
|
+
tenancies?: Tenancy[];
|
|
85
|
+
current_tenancy?: Tenancy;
|
|
86
|
+
created_at: string;
|
|
87
|
+
updated_at: string;
|
|
88
|
+
}
|
|
89
|
+
export interface CreatePropertyData {
|
|
90
|
+
address_line_1: string;
|
|
91
|
+
address_line_2?: string;
|
|
92
|
+
city?: string;
|
|
93
|
+
county?: string;
|
|
94
|
+
postcode: string;
|
|
95
|
+
country: string;
|
|
96
|
+
latitude?: string;
|
|
97
|
+
longitude?: string;
|
|
98
|
+
property_type: PropertyType;
|
|
99
|
+
is_hmo?: boolean;
|
|
100
|
+
is_residential: boolean;
|
|
101
|
+
branch_id?: string | null;
|
|
102
|
+
}
|
|
103
|
+
export interface Landlord {
|
|
104
|
+
id: string;
|
|
105
|
+
name: string;
|
|
106
|
+
type?: string;
|
|
107
|
+
company_name?: string;
|
|
108
|
+
email?: string;
|
|
109
|
+
alternative_email?: string;
|
|
110
|
+
phone?: string;
|
|
111
|
+
mobile_phone?: string;
|
|
112
|
+
emergency_contact?: {
|
|
113
|
+
name: string;
|
|
114
|
+
phone: string;
|
|
115
|
+
};
|
|
116
|
+
address?: Address;
|
|
117
|
+
registration?: {
|
|
118
|
+
number: string;
|
|
119
|
+
expiry: string;
|
|
120
|
+
};
|
|
121
|
+
properties_count?: number;
|
|
122
|
+
created_at: string;
|
|
123
|
+
updated_at: string;
|
|
124
|
+
}
|
|
125
|
+
export interface Tenancy {
|
|
126
|
+
id: string;
|
|
127
|
+
property_id: string;
|
|
128
|
+
start_date: string;
|
|
129
|
+
end_date?: string;
|
|
130
|
+
status: string;
|
|
131
|
+
notes?: string;
|
|
132
|
+
hmo_configuration?: any;
|
|
133
|
+
lead_tenant?: {
|
|
134
|
+
id: string;
|
|
135
|
+
name: string;
|
|
136
|
+
email: string;
|
|
137
|
+
};
|
|
138
|
+
tenants_count?: number;
|
|
139
|
+
created_at: string;
|
|
140
|
+
updated_at: string;
|
|
141
|
+
}
|
|
142
|
+
export interface Inspection {
|
|
143
|
+
id: string;
|
|
144
|
+
property_id: string;
|
|
145
|
+
property?: Property;
|
|
146
|
+
client_id?: string | null;
|
|
147
|
+
client?: Client;
|
|
148
|
+
inspector?: {
|
|
149
|
+
id: string;
|
|
150
|
+
name: string;
|
|
151
|
+
email: string;
|
|
152
|
+
};
|
|
153
|
+
type: InspectionType;
|
|
154
|
+
status: InspectionStatus;
|
|
155
|
+
is_archived: boolean;
|
|
156
|
+
archived_at?: string;
|
|
157
|
+
tenancy_id?: string;
|
|
158
|
+
tenancy?: Tenancy;
|
|
159
|
+
room_tenancy_ids?: string[];
|
|
160
|
+
requires_tenancy: boolean;
|
|
161
|
+
scheduled_at?: string;
|
|
162
|
+
scheduled_end_at?: string;
|
|
163
|
+
inspection_depth?: string;
|
|
164
|
+
elements_enabled: boolean;
|
|
165
|
+
baseline_inspection_id?: string;
|
|
166
|
+
previous_inspection_id?: string;
|
|
167
|
+
completion_requirements?: {
|
|
168
|
+
require_ratings: boolean;
|
|
169
|
+
require_photos: boolean;
|
|
170
|
+
require_meters: boolean;
|
|
171
|
+
require_keys: boolean;
|
|
172
|
+
require_compliance: boolean;
|
|
173
|
+
};
|
|
174
|
+
lock_status?: {
|
|
175
|
+
status: string;
|
|
176
|
+
locked_by?: {
|
|
177
|
+
id: string;
|
|
178
|
+
name?: string;
|
|
179
|
+
};
|
|
180
|
+
device_name?: string;
|
|
181
|
+
locked_at?: string;
|
|
182
|
+
last_activity_at?: string;
|
|
183
|
+
};
|
|
184
|
+
finalized?: {
|
|
185
|
+
at?: string;
|
|
186
|
+
by?: {
|
|
187
|
+
id: string;
|
|
188
|
+
name: string;
|
|
189
|
+
};
|
|
190
|
+
};
|
|
191
|
+
statistics?: {
|
|
192
|
+
total_defects: number;
|
|
193
|
+
critical_defects: number;
|
|
194
|
+
total_photos: number;
|
|
195
|
+
};
|
|
196
|
+
scribe: {
|
|
197
|
+
enabled: boolean;
|
|
198
|
+
policy: ScribePolicy;
|
|
199
|
+
processing_status?: string | null;
|
|
200
|
+
photos_to_process?: number | null;
|
|
201
|
+
photos_processed?: number | null;
|
|
202
|
+
processing_started_at?: string | null;
|
|
203
|
+
processing_completed_at?: string | null;
|
|
204
|
+
};
|
|
205
|
+
tenant_signatures?: {
|
|
206
|
+
deadline?: string;
|
|
207
|
+
expected_count: number;
|
|
208
|
+
signed_count: number;
|
|
209
|
+
all_signed: boolean;
|
|
210
|
+
};
|
|
211
|
+
areas_count?: number;
|
|
212
|
+
items_count?: number;
|
|
213
|
+
elements_count?: number;
|
|
214
|
+
areas?: InspectionArea[];
|
|
215
|
+
items?: InspectionItem[];
|
|
216
|
+
elements?: InspectionElement[];
|
|
217
|
+
meter_readings?: MeterReading[];
|
|
218
|
+
keys_fobs?: KeyFob[];
|
|
219
|
+
compliance_forms?: Array<Record<string, any>>;
|
|
220
|
+
asset_checks?: InspectionAssetCheckGroup[];
|
|
221
|
+
cover_image?: CoverImage & {
|
|
222
|
+
small_url?: string;
|
|
223
|
+
};
|
|
224
|
+
created_at: string;
|
|
225
|
+
updated_at: string;
|
|
226
|
+
}
|
|
227
|
+
export interface CreateInspectionData {
|
|
228
|
+
id?: string;
|
|
229
|
+
property_id: string;
|
|
230
|
+
tenancy_id?: string;
|
|
231
|
+
type: InspectionType;
|
|
232
|
+
scheduled_at?: string;
|
|
233
|
+
inspection_time?: string;
|
|
234
|
+
inspection_end_time?: string;
|
|
235
|
+
scheduled_end_at?: string;
|
|
236
|
+
inspector_id?: string;
|
|
237
|
+
comparison_inspection_id?: string;
|
|
238
|
+
is_comparison?: boolean;
|
|
239
|
+
room_tenancy_ids?: string[];
|
|
240
|
+
room_comparison_map?: Record<string, string | null>;
|
|
241
|
+
occupancy_context?: 'tenancy_linked' | 'vacant' | 'pre_tenancy' | 'landlord_only' | 'between_tenancies';
|
|
242
|
+
duplicate_media?: boolean;
|
|
243
|
+
scribe_enabled?: boolean;
|
|
244
|
+
/** @deprecated Use `scribe_enabled`. The API still maps it. */
|
|
245
|
+
ai_mode_enabled?: boolean;
|
|
246
|
+
areas?: CreateInspectionAreaTree[];
|
|
247
|
+
}
|
|
248
|
+
export interface CreateInspectionAreaTree {
|
|
249
|
+
id: string;
|
|
250
|
+
name: string;
|
|
251
|
+
category?: string;
|
|
252
|
+
order?: number;
|
|
253
|
+
property_area_id?: string;
|
|
254
|
+
items?: CreateInspectionItemTree[];
|
|
255
|
+
}
|
|
256
|
+
export interface CreateInspectionItemTree {
|
|
257
|
+
id: string;
|
|
258
|
+
name: string;
|
|
259
|
+
category?: string;
|
|
260
|
+
order?: number;
|
|
261
|
+
property_item_id?: string;
|
|
262
|
+
elements?: CreateInspectionElementTree[];
|
|
263
|
+
}
|
|
264
|
+
export interface CreateInspectionElementTree {
|
|
265
|
+
id: string;
|
|
266
|
+
name: string;
|
|
267
|
+
category?: string;
|
|
268
|
+
order?: number;
|
|
269
|
+
property_element_id?: string;
|
|
270
|
+
}
|
|
271
|
+
export interface RescheduleInspectionData {
|
|
272
|
+
scheduled_at: string;
|
|
273
|
+
inspection_time?: string;
|
|
274
|
+
inspection_end_time?: string;
|
|
275
|
+
}
|
|
276
|
+
export interface FinalizeInspectionData {
|
|
277
|
+
[key: string]: any;
|
|
278
|
+
}
|
|
279
|
+
export interface InspectionAssetCheck {
|
|
280
|
+
id: string;
|
|
281
|
+
property_asset_id: string;
|
|
282
|
+
asset_type?: string | null;
|
|
283
|
+
asset_type_label?: string | null;
|
|
284
|
+
location_description?: string | null;
|
|
285
|
+
make?: string | null;
|
|
286
|
+
model?: string | null;
|
|
287
|
+
serial_number?: string | null;
|
|
288
|
+
tested?: any;
|
|
289
|
+
test_result?: string | null;
|
|
290
|
+
condition?: string | null;
|
|
291
|
+
notes?: string | null;
|
|
292
|
+
photos: Array<{
|
|
293
|
+
id: string;
|
|
294
|
+
url: string;
|
|
295
|
+
thumbnail_url: string;
|
|
296
|
+
}>;
|
|
297
|
+
}
|
|
298
|
+
export interface InspectionAssetCheckGroup {
|
|
299
|
+
asset_type: string;
|
|
300
|
+
asset_type_label?: string | null;
|
|
301
|
+
checks: InspectionAssetCheck[];
|
|
302
|
+
total: number;
|
|
303
|
+
tested_count: number;
|
|
304
|
+
passed_count: number;
|
|
305
|
+
}
|
|
306
|
+
export interface InspectionArea {
|
|
307
|
+
id: string;
|
|
308
|
+
inspection_id: string;
|
|
309
|
+
parent_id?: string;
|
|
310
|
+
children_count?: number;
|
|
311
|
+
name: string;
|
|
312
|
+
category?: string;
|
|
313
|
+
sort_order: number;
|
|
314
|
+
condition?: Condition;
|
|
315
|
+
cleanliness?: Cleanliness;
|
|
316
|
+
notes?: string;
|
|
317
|
+
access_issue?: string;
|
|
318
|
+
items_count?: number;
|
|
319
|
+
items?: InspectionItem[];
|
|
320
|
+
photos?: Photo[];
|
|
321
|
+
started_at?: string;
|
|
322
|
+
completed_at?: string;
|
|
323
|
+
comparison_area_id?: string;
|
|
324
|
+
comparison?: any;
|
|
325
|
+
created_at: string;
|
|
326
|
+
updated_at: string;
|
|
327
|
+
deleted_at?: string;
|
|
328
|
+
}
|
|
329
|
+
export interface CreateInspectionAreaData {
|
|
330
|
+
id?: string;
|
|
331
|
+
name: string;
|
|
332
|
+
category?: string;
|
|
333
|
+
condition?: Condition;
|
|
334
|
+
cleanliness?: Cleanliness;
|
|
335
|
+
notes?: string;
|
|
336
|
+
access_issue?: string;
|
|
337
|
+
sort_order?: number;
|
|
338
|
+
parent_id?: string;
|
|
339
|
+
}
|
|
340
|
+
export interface UpdateInspectionAreaData {
|
|
341
|
+
name?: string;
|
|
342
|
+
category?: string;
|
|
343
|
+
condition?: Condition;
|
|
344
|
+
cleanliness?: Cleanliness;
|
|
345
|
+
notes?: string;
|
|
346
|
+
access_issue?: string;
|
|
347
|
+
sort_order?: number;
|
|
348
|
+
parent_id?: string;
|
|
349
|
+
}
|
|
350
|
+
export interface InspectionItem {
|
|
351
|
+
id: string;
|
|
352
|
+
area_id: string;
|
|
353
|
+
parent_id?: string;
|
|
354
|
+
children_count?: number;
|
|
355
|
+
name: string;
|
|
356
|
+
category?: string;
|
|
357
|
+
sort_order: number;
|
|
358
|
+
color?: string;
|
|
359
|
+
is_custom: boolean;
|
|
360
|
+
condition?: Condition;
|
|
361
|
+
cleanliness?: Cleanliness;
|
|
362
|
+
description?: string;
|
|
363
|
+
notes?: string;
|
|
364
|
+
elements_count?: number;
|
|
365
|
+
elements?: InspectionElement[];
|
|
366
|
+
photos?: Photo[];
|
|
367
|
+
comparison_item_id?: string;
|
|
368
|
+
comparison?: any;
|
|
369
|
+
created_at: string;
|
|
370
|
+
updated_at: string;
|
|
371
|
+
deleted_at?: string;
|
|
372
|
+
}
|
|
373
|
+
export interface CreateInspectionItemData {
|
|
374
|
+
id?: string;
|
|
375
|
+
area_id: string;
|
|
376
|
+
name: string;
|
|
377
|
+
category?: string;
|
|
378
|
+
color?: string;
|
|
379
|
+
condition?: Condition;
|
|
380
|
+
cleanliness?: Cleanliness;
|
|
381
|
+
description?: string;
|
|
382
|
+
notes?: string;
|
|
383
|
+
is_defect?: boolean;
|
|
384
|
+
is_critical?: boolean;
|
|
385
|
+
defect_description?: string;
|
|
386
|
+
sort_order?: number;
|
|
387
|
+
parent_id?: string;
|
|
388
|
+
}
|
|
389
|
+
export interface UpdateInspectionItemData {
|
|
390
|
+
name?: string;
|
|
391
|
+
category?: string;
|
|
392
|
+
color?: string;
|
|
393
|
+
condition?: Condition;
|
|
394
|
+
cleanliness?: Cleanliness;
|
|
395
|
+
description?: string;
|
|
396
|
+
notes?: string;
|
|
397
|
+
sort_order?: number;
|
|
398
|
+
parent_id?: string;
|
|
399
|
+
}
|
|
400
|
+
export interface InspectionElement {
|
|
401
|
+
id: string;
|
|
402
|
+
item_id: string;
|
|
403
|
+
parent_id?: string;
|
|
404
|
+
children_count?: number;
|
|
405
|
+
name: string;
|
|
406
|
+
category?: string;
|
|
407
|
+
sort_order: number;
|
|
408
|
+
color?: string;
|
|
409
|
+
is_custom: boolean;
|
|
410
|
+
condition?: Condition;
|
|
411
|
+
description?: string;
|
|
412
|
+
notes?: string;
|
|
413
|
+
photos?: Photo[];
|
|
414
|
+
comparison_element_id?: string;
|
|
415
|
+
comparison?: any;
|
|
416
|
+
created_at: string;
|
|
417
|
+
updated_at: string;
|
|
418
|
+
deleted_at?: string;
|
|
419
|
+
}
|
|
420
|
+
export interface CreateInspectionElementData {
|
|
421
|
+
id?: string;
|
|
422
|
+
item_id: string;
|
|
423
|
+
name: string;
|
|
424
|
+
category?: string;
|
|
425
|
+
color?: string;
|
|
426
|
+
condition?: Condition;
|
|
427
|
+
description?: string;
|
|
428
|
+
notes?: string;
|
|
429
|
+
sort_order?: number;
|
|
430
|
+
parent_id?: string;
|
|
431
|
+
}
|
|
432
|
+
export interface UpdateInspectionElementData {
|
|
433
|
+
name?: string;
|
|
434
|
+
category?: string;
|
|
435
|
+
color?: string;
|
|
436
|
+
condition?: Condition;
|
|
437
|
+
description?: string;
|
|
438
|
+
notes?: string;
|
|
439
|
+
sort_order?: number;
|
|
440
|
+
parent_id?: string;
|
|
441
|
+
}
|
|
442
|
+
export interface Defect {
|
|
443
|
+
id: string;
|
|
444
|
+
inspection_id: string;
|
|
445
|
+
defectable_type: DefectableType;
|
|
446
|
+
defectable_id: string;
|
|
447
|
+
title: string;
|
|
448
|
+
description?: string;
|
|
449
|
+
location_notes?: string;
|
|
450
|
+
severity?: DefectSeverity | null;
|
|
451
|
+
item_label?: string | null;
|
|
452
|
+
category?: string;
|
|
453
|
+
status: DefectStatus;
|
|
454
|
+
order?: number;
|
|
455
|
+
assigned_at?: string;
|
|
456
|
+
fixed_at?: string;
|
|
457
|
+
verified_at?: string;
|
|
458
|
+
photos?: Photo[];
|
|
459
|
+
photo_count?: number;
|
|
460
|
+
thumbnail_url?: string;
|
|
461
|
+
created_at: string;
|
|
462
|
+
updated_at: string;
|
|
463
|
+
}
|
|
464
|
+
export interface CreateDefectData {
|
|
465
|
+
id?: string;
|
|
466
|
+
defectable_type: DefectableType;
|
|
467
|
+
defectable_id: string;
|
|
468
|
+
title: string;
|
|
469
|
+
description?: string;
|
|
470
|
+
location_notes?: string;
|
|
471
|
+
severity?: DefectSeverity | null;
|
|
472
|
+
item_label?: string | null;
|
|
473
|
+
category?: string;
|
|
474
|
+
photo_ids?: string[];
|
|
475
|
+
}
|
|
476
|
+
export interface UpdateDefectData {
|
|
477
|
+
title?: string;
|
|
478
|
+
description?: string;
|
|
479
|
+
location_notes?: string;
|
|
480
|
+
severity?: DefectSeverity | null;
|
|
481
|
+
item_label?: string | null;
|
|
482
|
+
category?: string;
|
|
483
|
+
status?: DefectStatus;
|
|
484
|
+
photo_ids?: string[];
|
|
485
|
+
}
|
|
486
|
+
export interface MeterReading {
|
|
487
|
+
id: string;
|
|
488
|
+
inspection_id: string;
|
|
489
|
+
meter_type: MeterType;
|
|
490
|
+
meter_location?: string;
|
|
491
|
+
meter_serial?: string;
|
|
492
|
+
reading?: number;
|
|
493
|
+
reading_unit?: string;
|
|
494
|
+
captured_at?: string;
|
|
495
|
+
notes?: string;
|
|
496
|
+
meter_balance?: number;
|
|
497
|
+
is_prepaid: boolean;
|
|
498
|
+
photos?: Photo[];
|
|
499
|
+
created_at: string;
|
|
500
|
+
updated_at: string;
|
|
501
|
+
}
|
|
502
|
+
export interface CreateMeterReadingData {
|
|
503
|
+
id?: string;
|
|
504
|
+
meter_type: MeterType;
|
|
505
|
+
meter_location?: string;
|
|
506
|
+
meter_serial?: string;
|
|
507
|
+
reading?: number;
|
|
508
|
+
reading_unit?: string;
|
|
509
|
+
captured_at?: string;
|
|
510
|
+
notes?: string;
|
|
511
|
+
meter_balance?: number;
|
|
512
|
+
is_prepaid?: boolean;
|
|
513
|
+
}
|
|
514
|
+
export interface UpdateMeterReadingData {
|
|
515
|
+
meter_type?: MeterType;
|
|
516
|
+
meter_location?: string;
|
|
517
|
+
meter_serial?: string;
|
|
518
|
+
reading?: number;
|
|
519
|
+
reading_unit?: string;
|
|
520
|
+
captured_at?: string;
|
|
521
|
+
notes?: string;
|
|
522
|
+
meter_balance?: number;
|
|
523
|
+
is_prepaid?: boolean;
|
|
524
|
+
}
|
|
525
|
+
export interface KeyFob {
|
|
526
|
+
id: string;
|
|
527
|
+
inspection_id: string;
|
|
528
|
+
item_type: KeyFobType;
|
|
529
|
+
description?: string;
|
|
530
|
+
quantity: number;
|
|
531
|
+
serial_number?: string;
|
|
532
|
+
notes?: string;
|
|
533
|
+
location?: string;
|
|
534
|
+
photos?: Photo[];
|
|
535
|
+
created_at: string;
|
|
536
|
+
updated_at: string;
|
|
537
|
+
}
|
|
538
|
+
export interface CreateKeyFobData {
|
|
539
|
+
id?: string;
|
|
540
|
+
item_type: KeyFobType;
|
|
541
|
+
description?: string;
|
|
542
|
+
quantity: number;
|
|
543
|
+
serial_number?: string;
|
|
544
|
+
notes?: string;
|
|
545
|
+
location?: string;
|
|
546
|
+
}
|
|
547
|
+
export interface UpdateKeyFobData {
|
|
548
|
+
item_type?: KeyFobType;
|
|
549
|
+
description?: string;
|
|
550
|
+
quantity?: number;
|
|
551
|
+
serial_number?: string;
|
|
552
|
+
notes?: string;
|
|
553
|
+
location?: string;
|
|
554
|
+
}
|
|
555
|
+
export interface ComplianceForm {
|
|
556
|
+
id: string;
|
|
557
|
+
name: string;
|
|
558
|
+
description?: string;
|
|
559
|
+
category?: string;
|
|
560
|
+
order?: number;
|
|
561
|
+
sections?: ComplianceSection[];
|
|
562
|
+
inspection_id?: string;
|
|
563
|
+
original_form_id?: string;
|
|
564
|
+
team_id?: string;
|
|
565
|
+
is_published?: boolean;
|
|
566
|
+
created_at: string;
|
|
567
|
+
updated_at: string;
|
|
568
|
+
}
|
|
569
|
+
export interface ComplianceSection {
|
|
570
|
+
id: string;
|
|
571
|
+
name: string;
|
|
572
|
+
description?: string;
|
|
573
|
+
order: number;
|
|
574
|
+
is_repeatable: boolean;
|
|
575
|
+
layout_structure?: any;
|
|
576
|
+
fields?: ComplianceField[];
|
|
577
|
+
instances?: ComplianceSectionInstance[];
|
|
578
|
+
created_at: string;
|
|
579
|
+
updated_at: string;
|
|
580
|
+
}
|
|
581
|
+
export interface ComplianceField {
|
|
582
|
+
id: string;
|
|
583
|
+
label: string;
|
|
584
|
+
field_type: string;
|
|
585
|
+
help_text?: string;
|
|
586
|
+
is_required: boolean;
|
|
587
|
+
scope?: string;
|
|
588
|
+
options?: any;
|
|
589
|
+
max_length?: number;
|
|
590
|
+
allow_multiple?: boolean;
|
|
591
|
+
auto_populate_rule?: string;
|
|
592
|
+
default_value?: any;
|
|
593
|
+
accepted_file_types?: string[];
|
|
594
|
+
order: number;
|
|
595
|
+
responses?: ComplianceResponse[];
|
|
596
|
+
team_value?: any;
|
|
597
|
+
created_at: string;
|
|
598
|
+
updated_at: string;
|
|
599
|
+
}
|
|
600
|
+
export interface ComplianceResponse {
|
|
601
|
+
id: string;
|
|
602
|
+
inspection_id: string;
|
|
603
|
+
inspection_field_id: string;
|
|
604
|
+
section_instance?: number;
|
|
605
|
+
value_type: string;
|
|
606
|
+
value: any;
|
|
607
|
+
file?: {
|
|
608
|
+
id: string;
|
|
609
|
+
name: string;
|
|
610
|
+
url: string;
|
|
611
|
+
mime_type: string;
|
|
612
|
+
size: number;
|
|
613
|
+
};
|
|
614
|
+
is_auto_populated: boolean;
|
|
615
|
+
created_at: string;
|
|
616
|
+
updated_at: string;
|
|
617
|
+
}
|
|
618
|
+
export interface ComplianceSectionInstance {
|
|
619
|
+
id: string;
|
|
620
|
+
inspection_id: string;
|
|
621
|
+
inspection_compliance_form_id: string;
|
|
622
|
+
section_id: string;
|
|
623
|
+
instance_number: number;
|
|
624
|
+
instance_label?: string;
|
|
625
|
+
order: number;
|
|
626
|
+
responses?: ComplianceResponse[];
|
|
627
|
+
created_at: string;
|
|
628
|
+
updated_at: string;
|
|
629
|
+
}
|
|
630
|
+
export interface Branch {
|
|
631
|
+
id: string;
|
|
632
|
+
team_id: string;
|
|
633
|
+
name: string;
|
|
634
|
+
slug?: string;
|
|
635
|
+
is_default?: boolean;
|
|
636
|
+
address_line_1?: string;
|
|
637
|
+
address_line_2?: string;
|
|
638
|
+
city?: string;
|
|
639
|
+
postcode?: string;
|
|
640
|
+
country?: string;
|
|
641
|
+
phone?: string;
|
|
642
|
+
email?: string;
|
|
643
|
+
created_at: string;
|
|
644
|
+
updated_at: string;
|
|
645
|
+
}
|
|
646
|
+
export interface ClientLogo {
|
|
647
|
+
id: string;
|
|
648
|
+
url: string;
|
|
649
|
+
thumbnail_url?: string;
|
|
650
|
+
}
|
|
651
|
+
export interface Client {
|
|
652
|
+
id: string;
|
|
653
|
+
name: string;
|
|
654
|
+
kind?: string | null;
|
|
655
|
+
is_active: boolean;
|
|
656
|
+
group_id?: string | null;
|
|
657
|
+
group?: ClientGroup;
|
|
658
|
+
default_branch_id?: string | null;
|
|
659
|
+
default_branch?: Branch;
|
|
660
|
+
branches?: Branch[];
|
|
661
|
+
default_inspection_depth?: string | null;
|
|
662
|
+
logo: ClientLogo | null;
|
|
663
|
+
properties_count?: number;
|
|
664
|
+
inspections_count?: number;
|
|
665
|
+
/** Only returned to Team tokens and users with clients.manage. */
|
|
666
|
+
contact?: {
|
|
667
|
+
name?: string | null;
|
|
668
|
+
email?: string | null;
|
|
669
|
+
phone?: string | null;
|
|
670
|
+
};
|
|
671
|
+
/** Only returned to Team tokens and users with clients.manage. */
|
|
672
|
+
delivery?: {
|
|
673
|
+
method?: string | null;
|
|
674
|
+
email?: string | null;
|
|
675
|
+
paused: boolean;
|
|
676
|
+
};
|
|
677
|
+
/** Only returned to Team tokens and users with clients.manage. */
|
|
678
|
+
notes?: string | null;
|
|
679
|
+
created_at: string;
|
|
680
|
+
updated_at: string;
|
|
681
|
+
}
|
|
682
|
+
export interface ClientGroup {
|
|
683
|
+
id: string;
|
|
684
|
+
name: string;
|
|
685
|
+
type?: string | null;
|
|
686
|
+
color?: string | null;
|
|
687
|
+
website?: string | null;
|
|
688
|
+
logo: ClientLogo | null;
|
|
689
|
+
clients_count?: number;
|
|
690
|
+
properties_count?: number;
|
|
691
|
+
inspections_count?: number;
|
|
692
|
+
clients?: Client[];
|
|
693
|
+
created_at: string;
|
|
694
|
+
updated_at: string;
|
|
695
|
+
}
|
|
696
|
+
export interface ClientListParams extends ListParams {
|
|
697
|
+
/** "mine" or "all" ("all" requires clients.manage). */
|
|
698
|
+
scope?: 'mine' | 'all';
|
|
699
|
+
}
|
|
700
|
+
export interface HazardRule {
|
|
701
|
+
type: string;
|
|
702
|
+
label: string;
|
|
703
|
+
in_force_from: string;
|
|
704
|
+
investigate_days: number;
|
|
705
|
+
summary_days: number;
|
|
706
|
+
work_days: number;
|
|
707
|
+
}
|
|
708
|
+
export interface HazardSync {
|
|
709
|
+
hazard_wordings: any[];
|
|
710
|
+
nations: Array<{
|
|
711
|
+
nation: string;
|
|
712
|
+
hazards: HazardRule[];
|
|
713
|
+
}>;
|
|
714
|
+
excluded_property_types: string[];
|
|
715
|
+
not_hazards: string[];
|
|
716
|
+
last_sync: string;
|
|
717
|
+
}
|
|
718
|
+
export interface VocabularySync {
|
|
719
|
+
version: string;
|
|
720
|
+
vocabulary: Record<string, any>;
|
|
721
|
+
}
|
|
722
|
+
export interface PropertyTemplate {
|
|
723
|
+
id: string;
|
|
724
|
+
name: string;
|
|
725
|
+
description?: string;
|
|
726
|
+
property_type?: PropertyType;
|
|
727
|
+
is_default: boolean;
|
|
728
|
+
order?: number;
|
|
729
|
+
areas?: any[];
|
|
730
|
+
created_at: string;
|
|
731
|
+
updated_at: string;
|
|
732
|
+
}
|
|
733
|
+
export interface Component {
|
|
734
|
+
id: string;
|
|
735
|
+
name: string;
|
|
736
|
+
category?: string;
|
|
737
|
+
description?: string;
|
|
738
|
+
order?: number;
|
|
739
|
+
is_default: boolean;
|
|
740
|
+
parent_id?: string;
|
|
741
|
+
type?: string;
|
|
742
|
+
children?: Component[];
|
|
743
|
+
items?: Component[];
|
|
744
|
+
elements?: Component[];
|
|
745
|
+
created_at: string;
|
|
746
|
+
updated_at: string;
|
|
747
|
+
}
|
|
748
|
+
export interface TeamAddress {
|
|
749
|
+
line_1: string | null;
|
|
750
|
+
line_2: string | null;
|
|
751
|
+
city: string | null;
|
|
752
|
+
county: string | null;
|
|
753
|
+
postcode: string | null;
|
|
754
|
+
country: string | null;
|
|
755
|
+
}
|
|
756
|
+
export interface TeamSubscription {
|
|
757
|
+
subscribed: boolean;
|
|
758
|
+
on_trial: boolean;
|
|
759
|
+
on_grace_period: boolean;
|
|
760
|
+
stripe_status: string | null;
|
|
761
|
+
trial_ends_at: string | null;
|
|
762
|
+
bypasses_subscription: boolean;
|
|
763
|
+
}
|
|
764
|
+
export interface Team {
|
|
765
|
+
id: string;
|
|
766
|
+
name: string;
|
|
767
|
+
slug: string;
|
|
768
|
+
business_type: string | null;
|
|
769
|
+
email: string | null;
|
|
770
|
+
phone: string | null;
|
|
771
|
+
website: string | null;
|
|
772
|
+
address: TeamAddress;
|
|
773
|
+
logo_url: string | null;
|
|
774
|
+
primary_color: string | null;
|
|
775
|
+
subscription: TeamSubscription;
|
|
776
|
+
condition_options: Array<Record<string, any>>;
|
|
777
|
+
cleanliness_options: Array<Record<string, any>>;
|
|
778
|
+
inspection_settings: Record<string, any>;
|
|
779
|
+
inspection_hours: Record<string, any>;
|
|
780
|
+
created_at: string | null;
|
|
781
|
+
}
|
|
782
|
+
export interface User {
|
|
783
|
+
id: string;
|
|
784
|
+
first_name: string;
|
|
785
|
+
last_name: string;
|
|
786
|
+
full_name: string;
|
|
787
|
+
initials?: string;
|
|
788
|
+
email: string;
|
|
789
|
+
avatar?: string;
|
|
790
|
+
email_verified_at?: string;
|
|
791
|
+
current_team_id: string;
|
|
792
|
+
two_factor_enabled: boolean;
|
|
793
|
+
current_team?: Team;
|
|
794
|
+
team_membership?: {
|
|
795
|
+
role: string;
|
|
796
|
+
is_owner: boolean;
|
|
797
|
+
is_manager: boolean;
|
|
798
|
+
};
|
|
799
|
+
permissions?: string[];
|
|
800
|
+
access?: any;
|
|
801
|
+
teams?: Team[];
|
|
802
|
+
created_at: string;
|
|
803
|
+
}
|
|
804
|
+
export interface AddressLookupResult {
|
|
805
|
+
postcode: string;
|
|
806
|
+
addresses: AddressResult[];
|
|
807
|
+
count: number;
|
|
808
|
+
provider?: string;
|
|
809
|
+
}
|
|
810
|
+
export interface AddressResult {
|
|
811
|
+
id?: string;
|
|
812
|
+
line_1: string;
|
|
813
|
+
line_2?: string;
|
|
814
|
+
town_or_city?: string;
|
|
815
|
+
county?: string;
|
|
816
|
+
postcode: string;
|
|
817
|
+
formatted?: string;
|
|
818
|
+
location?: Location;
|
|
819
|
+
}
|
|
820
|
+
export interface Stats {
|
|
821
|
+
[key: string]: any;
|
|
822
|
+
}
|
|
823
|
+
export interface Phrase {
|
|
824
|
+
id: string;
|
|
825
|
+
text: string;
|
|
826
|
+
category: PhraseCategory;
|
|
827
|
+
context?: string;
|
|
828
|
+
usage_count?: number;
|
|
829
|
+
created_at: string;
|
|
830
|
+
updated_at: string;
|
|
831
|
+
}
|
|
832
|
+
export interface CreatePhraseData {
|
|
833
|
+
text: string;
|
|
834
|
+
category: PhraseCategory;
|
|
835
|
+
context?: string;
|
|
836
|
+
}
|
|
837
|
+
export interface Modifier {
|
|
838
|
+
id: string;
|
|
839
|
+
type: ModifierType;
|
|
840
|
+
value: string;
|
|
841
|
+
category?: string;
|
|
842
|
+
is_custom?: boolean;
|
|
843
|
+
created_at?: string;
|
|
844
|
+
updated_at?: string;
|
|
845
|
+
}
|
|
846
|
+
export interface CreateCustomModifierData {
|
|
847
|
+
type: ModifierType;
|
|
848
|
+
value: string;
|
|
849
|
+
category?: string;
|
|
850
|
+
}
|
|
851
|
+
export interface AiStatus {
|
|
852
|
+
enabled: boolean;
|
|
853
|
+
policy?: ScribePolicy;
|
|
854
|
+
processing_status?: string;
|
|
855
|
+
photos_to_process?: number;
|
|
856
|
+
photos_processed?: number;
|
|
857
|
+
processing_started_at?: string;
|
|
858
|
+
processing_completed_at?: string;
|
|
859
|
+
}
|
|
860
|
+
export interface SchedulerCalendar {
|
|
861
|
+
[key: string]: any;
|
|
862
|
+
}
|
|
863
|
+
export interface PaginatedResponse<T> {
|
|
864
|
+
data: T[];
|
|
865
|
+
meta: {
|
|
866
|
+
current_page: number;
|
|
867
|
+
from: number | null;
|
|
868
|
+
last_page: number;
|
|
869
|
+
per_page: number;
|
|
870
|
+
to: number | null;
|
|
871
|
+
total: number;
|
|
872
|
+
};
|
|
873
|
+
links: {
|
|
874
|
+
first: string;
|
|
875
|
+
last: string;
|
|
876
|
+
prev: string | null;
|
|
877
|
+
next: string | null;
|
|
878
|
+
};
|
|
879
|
+
}
|
|
880
|
+
export interface ListParams {
|
|
881
|
+
filter?: Record<string, string>;
|
|
882
|
+
include?: string | string[];
|
|
883
|
+
sort?: string;
|
|
884
|
+
per_page?: number;
|
|
885
|
+
page?: number;
|
|
886
|
+
}
|
|
887
|
+
//# sourceMappingURL=index.d.ts.map
|