@wakata-dev/api-client 0.3.0 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -1,2388 +1,1504 @@
1
1
  import * as _hey_api_client_fetch from '@hey-api/client-fetch';
2
2
  import { TDataShape, Options as Options$1, Client } from '@hey-api/client-fetch';
3
3
 
4
- type SendCredentialsDto = {
5
- /**
6
- * User public ID (UUID)
7
- */
8
- user_id: string;
9
- /**
10
- * Device public ID (UUID) for validation
11
- */
12
- device_id: string;
4
+ type ApiErrorBody = {
13
5
  /**
14
- * Send credentials via email
6
+ * Stable, machine-readable code identifying the failure class. Integrators should switch on this rather than parsing the message. Codes are append-only — they are never removed or renamed.
15
7
  */
16
- email: boolean;
8
+ code: 'validation_error' | 'bad_request' | 'invalid_filter_value' | 'unauthorized' | 'forbidden' | 'ip_not_allowed' | 'not_found' | 'conflict' | 'idempotency_key_conflict' | 'rate_limited' | 'internal_error';
17
9
  /**
18
- * Send credentials via SMS
10
+ * Human-readable description of the failure. Subject to wording tweaks — do not parse.
19
11
  */
20
- sms: boolean;
21
- };
22
- type RegisterDeviceDto = {
12
+ message: string;
23
13
  /**
24
- * The 6-digit pairing code for device registration (text format)
14
+ * Correlator that matches the `X-Request-Id` response header. Quote this when filing a support ticket.
25
15
  */
26
- code: string;
16
+ request_id: string;
27
17
  /**
28
- * Operating system of the device
18
+ * Deep-link into the public error documentation.
29
19
  */
30
- os?: string;
20
+ docs_url?: string;
31
21
  /**
32
- * Operating system version
22
+ * Name of the request parameter that triggered the failure, when the failure can be pinpointed to a single field. For nested-body failures see `details[].field` instead.
33
23
  */
34
- os_version?: string;
24
+ param?: string;
35
25
  /**
36
- * Device model
26
+ * Itemized list of per-field validation problems. Populated for `validation_error` responses; usually absent for other codes.
37
27
  */
38
- device_model?: string;
28
+ details?: Array<ApiErrorDetail>;
29
+ };
30
+ type ApiErrorDetail = {
39
31
  /**
40
- * App version
32
+ * Dotted path to the offending property, when available.
41
33
  */
42
- app_version?: string;
34
+ field?: string;
43
35
  /**
44
- * Device battery level (0-100)
36
+ * Machine-readable code for the validation failure (e.g. the class-validator constraint name like `isUuid`, `isNotEmpty`).
45
37
  */
46
- battery_level?: number;
38
+ code?: string;
47
39
  /**
48
- * Device latitude coordinate
40
+ * Human-readable explanation of the problem.
49
41
  */
50
- lat?: number;
42
+ message: string;
43
+ };
44
+ type ApiErrorResponse = {
45
+ error: ApiErrorBody;
46
+ };
47
+ type AssetClassListResponseDto = {
51
48
  /**
52
- * Device longitude coordinate
49
+ * List of asset classes
53
50
  */
54
- lng?: number;
55
- };
56
- type RegisterDeviceResponseDto = {
51
+ data: Array<AssetClassResponseDto>;
57
52
  /**
58
- * BigInt as string. Device ID
53
+ * Total number of records
59
54
  */
60
- id: string;
55
+ total: number;
61
56
  /**
62
- * Public device identifier (UUID)
57
+ * Current page number
63
58
  */
64
- publicId: string;
59
+ page: number;
65
60
  /**
66
- * BigInt as string. Company identifier
61
+ * Items per page
67
62
  */
68
- companyId: string;
63
+ per_page: number;
69
64
  /**
70
- * BigInt as string. Site identifier
65
+ * Total number of pages
71
66
  */
72
- siteId: string;
67
+ total_pages: number;
68
+ };
69
+ type AssetClassResponseDto = {
73
70
  /**
74
- * Device name
71
+ * Asset class public ID (UUID)
75
72
  */
76
- name: string;
73
+ public_id: string;
77
74
  /**
78
- * Device status
75
+ * Asset class name (make)
79
76
  */
80
- status: string;
77
+ asset_class: string;
81
78
  /**
82
- * Whether redownload is required
79
+ * Asset sub-class name (model)
83
80
  */
84
- redownloadRequired?: boolean;
81
+ asset_sub_class?: {
82
+ [key: string]: unknown;
83
+ };
85
84
  /**
86
- * Whether to send logs
85
+ * Asset category ID. Serialized as a string in public API responses (BigInt-safe).
87
86
  */
88
- sendLogs?: boolean;
87
+ asset_category_id?: string | null;
89
88
  /**
90
- * Whether this is a test device
89
+ * Asset category name
91
90
  */
92
- testDevice?: boolean;
91
+ asset_category_name?: {
92
+ [key: string]: unknown;
93
+ };
93
94
  /**
94
- * BigInt as string. Test device asset class ID
95
+ * Asset class photo file path
95
96
  */
96
- testDeviceAssetClassId?: string;
97
+ asset_class_photo_file?: {
98
+ [key: string]: unknown;
99
+ };
97
100
  /**
98
- * Nominated test user ID. When the device is a test device the mobile app should impersonate this user, allowing it to drive User Based checklists (including unpublished/draft ones) without affecting billable assignments.
101
+ * Asset class photo info
99
102
  */
100
- testUserId?: {
103
+ asset_class_photo_info?: {
101
104
  [key: string]: unknown;
102
- } | null;
105
+ };
103
106
  /**
104
- * Last sync timestamp
107
+ * Whether on-the-fly creation is enabled
105
108
  */
106
- lastSyncAt?: string;
109
+ on_the_fly_enabled: boolean;
107
110
  /**
108
111
  * Creation timestamp
109
112
  */
110
- createdAt: string;
113
+ created_at: string;
114
+ /**
115
+ * Created by user public ID
116
+ */
117
+ created_by_id: string;
111
118
  /**
112
- * BigInt as string. ID of user who created the device
119
+ * Created by user name
113
120
  */
114
- createdById: string;
121
+ created_by_name?: {
122
+ [key: string]: unknown;
123
+ };
115
124
  /**
116
125
  * Last update timestamp
117
126
  */
118
- updatedAt: string;
127
+ updated_at: string;
119
128
  /**
120
- * BigInt as string. ID of user who last updated the device
129
+ * Updated by user public ID
121
130
  */
122
- updatedById: string;
131
+ updated_by_id: string;
123
132
  /**
124
- * Deletion timestamp (if deleted)
133
+ * Updated by user name
125
134
  */
126
- deletedAt?: string;
135
+ updated_by_name?: {
136
+ [key: string]: unknown;
137
+ };
127
138
  /**
128
- * BigInt as string. ID of user who deleted the device
139
+ * Embedded custom property values for this asset class. Uniform shape across entities (property_id = field definition, asset_class_property_id = value row). Empty when the class has no custom properties.
129
140
  */
130
- deletedById?: string;
141
+ asset_class_properties: Array<EmbeddedAssetClassPropertyDto>;
131
142
  };
132
- type CreateTokenDto = {
143
+ type AssetPropertyResponseDto = {
133
144
  /**
134
- * User UUID for authentication (preferred). If provided, employee_id is ignored.
145
+ * Asset property ID. Serialized as a string in public API responses (BigInt-safe).
135
146
  */
136
- user_id?: string;
147
+ id: string;
137
148
  /**
138
- * Employee ID for authentication (legacy). Required if user_id is not provided.
149
+ * Asset ID. Serialized as a string in public API responses (BigInt-safe).
139
150
  */
140
- employee_id?: string;
151
+ asset_id: string;
141
152
  /**
142
- * PIN code (4 digits)
153
+ * Property ID (config item ID). Serialized as a string in public API responses (BigInt-safe).
143
154
  */
144
- pin: string;
155
+ property_id: string;
145
156
  /**
146
- * Company UUID to authenticate against
157
+ * Text value (if property type is Text, Email, or Phone)
147
158
  */
148
- company_id: string;
149
- };
150
- type TokenUserDto = {
159
+ text_value: {
160
+ [key: string]: unknown;
161
+ } | null;
151
162
  /**
152
- * User public UUID
163
+ * Numeric value (if property type is Decimal)
153
164
  */
154
- public_id: string;
165
+ numeric_value: {
166
+ [key: string]: unknown;
167
+ } | null;
155
168
  /**
156
- * User first name
169
+ * Date value (if property type is Date)
157
170
  */
158
- first_name: string;
171
+ date_value: {
172
+ [key: string]: unknown;
173
+ } | null;
159
174
  /**
160
- * User last name
175
+ * Update method
161
176
  */
162
- last_name: string;
163
- };
164
- type TokenCompanyDto = {
177
+ update_method: {
178
+ [key: string]: unknown;
179
+ } | null;
165
180
  /**
166
- * Company public UUID
181
+ * Created timestamp
167
182
  */
168
- public_id: string;
183
+ created_at: string;
169
184
  /**
170
- * Company name
185
+ * Updated timestamp
171
186
  */
172
- name: string;
187
+ updated_at: string;
173
188
  };
174
- type TokenResponseDto = {
189
+ type ChecklistSummaryDto = {
175
190
  /**
176
- * API token (Bearer token)
191
+ * Checklist ID (numeric string)
177
192
  */
178
- token: string;
193
+ id: string;
179
194
  /**
180
- * Token expiration date (optional)
195
+ * Company ID
181
196
  */
182
- expires_at?: {
183
- [key: string]: unknown;
184
- } | null;
197
+ company_id: string;
185
198
  /**
186
- * Authenticated user information
199
+ * Checklist name
187
200
  */
188
- user: TokenUserDto;
201
+ name: string;
189
202
  /**
190
- * Company context for the token
203
+ * Checklist type
191
204
  */
192
- company: TokenCompanyDto;
193
- };
194
- type EmbeddedAssetPropertyDto = {
205
+ type: string;
195
206
  /**
196
- * Custom field-definition ID (config_items.id which field, e.g. "Voyage"). Serialized as a string in public API responses (BigInt-safe).
207
+ * Root checklist ID grouping all versions (null for a v1 with no prior versions). Numeric string.
197
208
  */
198
- property_id: string;
209
+ root_id: {
210
+ [key: string]: unknown;
211
+ } | null;
199
212
  /**
200
- * The asset_properties value-row ID. Pass this to PATCH/DELETE /asset-property/:id to update or remove the value. Serialized as a string in public API responses (BigInt-safe).
213
+ * Version number
201
214
  */
202
- asset_property_id: string;
215
+ version: number;
203
216
  /**
204
- * Property name from config_items
217
+ * Version notes
205
218
  */
206
- property_name: string;
219
+ version_notes: {
220
+ [key: string]: unknown;
221
+ } | null;
207
222
  /**
208
- * Text value (if property type is text)
223
+ * Category ID
209
224
  */
210
- text_value: {
225
+ category_id: {
211
226
  [key: string]: unknown;
212
227
  } | null;
213
228
  /**
214
- * Numeric value (if property type is numeric)
229
+ * Category name
215
230
  */
216
- numeric_value: {
231
+ category_name: {
217
232
  [key: string]: unknown;
218
233
  } | null;
219
234
  /**
220
- * Date value (if property type is date)
235
+ * When this version was published
221
236
  */
222
- date_value: {
237
+ published_at: {
223
238
  [key: string]: unknown;
224
239
  } | null;
240
+ created_at: string;
241
+ updated_at: string;
242
+ };
243
+ type ConfigItemDto = {
225
244
  /**
226
- * Timestamp the property value was last updated
245
+ * Config item ID (numeric string)
227
246
  */
228
- updated_at: string;
247
+ id: string;
229
248
  /**
230
- * Public ID (UUID) of the user who last updated this value
249
+ * Parent config table ID
231
250
  */
232
- updated_by: {
251
+ config_table_id: string;
252
+ /**
253
+ * Parent config table name
254
+ */
255
+ config_table_name: string;
256
+ /**
257
+ * Parent config table class
258
+ */
259
+ config_table_class: string;
260
+ /**
261
+ * Item value / name
262
+ */
263
+ item: string;
264
+ /**
265
+ * Description
266
+ */
267
+ description: {
233
268
  [key: string]: unknown;
234
269
  } | null;
235
270
  /**
236
- * Name of the user who last updated this value
271
+ * Free-form options (JSON), e.g. property metadata
237
272
  */
238
- updated_by_name: {
273
+ options: {
274
+ [key: string]: unknown;
275
+ } | null;
276
+ /**
277
+ * Image file key
278
+ */
279
+ image_file: {
239
280
  [key: string]: unknown;
240
281
  } | null;
282
+ created_at: string;
283
+ updated_at: string;
241
284
  };
242
- type CreateAssetDto = {
285
+ type ConfigTableDto = {
243
286
  /**
244
- * Device ID for authentication (optional for API key auth)
287
+ * Config table ID (numeric string)
245
288
  */
246
- device_id?: string;
289
+ id: string;
247
290
  /**
248
- * Asset number
291
+ * Display name
249
292
  */
250
- asset_number: string;
293
+ name: string;
251
294
  /**
252
- * Asset class public ID
295
+ * Stable class/key identifying the table purpose
253
296
  */
254
- asset_class: string;
297
+ class: string;
255
298
  /**
256
- * Site public ID
299
+ * Whether items in this table are content-translated
257
300
  */
258
- site_id: string;
301
+ translate_content: boolean;
302
+ created_at: string;
303
+ updated_at: string;
259
304
  };
260
- type PublicCreateAssetDto = {
305
+ type CreateAssetClassDto = {
261
306
  /**
262
- * Asset number
307
+ * Asset class name (make)
263
308
  */
264
- asset_number: string;
309
+ asset_class: string;
265
310
  /**
266
- * Asset class public ID
311
+ * Asset sub-class name (model)
267
312
  */
268
- asset_class: string;
313
+ asset_sub_class?: string;
269
314
  /**
270
- * Site public ID
315
+ * BigInt as string. Asset category ID (from config_items table)
271
316
  */
272
- site_id: string;
273
- };
274
- type ApiErrorDetail = {
317
+ asset_category_id?: string;
275
318
  /**
276
- * Dotted path to the offending property, when available.
319
+ * Asset class photo file path
277
320
  */
278
- field?: string;
321
+ asset_class_photo_file?: string;
279
322
  /**
280
- * Machine-readable code for the validation failure (e.g. the class-validator constraint name like `isUuid`, `isNotEmpty`).
323
+ * Asset class photo info (JSON string)
281
324
  */
282
- code?: string;
325
+ asset_class_photo_info?: string;
283
326
  /**
284
- * Human-readable explanation of the problem.
327
+ * Whether on-the-fly creation is enabled
285
328
  */
286
- message: string;
329
+ on_the_fly_enabled?: boolean;
287
330
  };
288
- type ApiErrorBody = {
331
+ type CreateConfigItemDto = {
289
332
  /**
290
- * Stable, machine-readable code identifying the failure class. Integrators should switch on this rather than parsing the message. Codes are append-only — they are never removed or renamed.
333
+ * Parent config table ID (numeric string, from GET /public/config-table/list). Must belong to the authenticated company.
291
334
  */
292
- code: 'validation_error' | 'bad_request' | 'invalid_filter_value' | 'unauthorized' | 'forbidden' | 'ip_not_allowed' | 'not_found' | 'conflict' | 'idempotency_key_conflict' | 'rate_limited' | 'internal_error';
335
+ config_table_id: string;
293
336
  /**
294
- * Human-readable description of the failure. Subject to wording tweaks — do not parse.
337
+ * Item value / name
295
338
  */
296
- message: string;
339
+ item: string;
297
340
  /**
298
- * Correlator that matches the `X-Request-Id` response header. Quote this when filing a support ticket.
341
+ * Description
299
342
  */
300
- request_id: string;
343
+ description?: string;
344
+ };
345
+ type CreateSiteDto = {
301
346
  /**
302
- * Deep-link into the public error documentation.
347
+ * Site name
303
348
  */
304
- docs_url?: string;
349
+ name: string;
305
350
  /**
306
- * Name of the request parameter that triggered the failure, when the failure can be pinpointed to a single field. For nested-body failures see `details[].field` instead.
351
+ * Base language for the site
307
352
  */
308
- param?: string;
353
+ base_language?: string;
309
354
  /**
310
- * Itemized list of per-field validation problems. Populated for `validation_error` responses; usually absent for other codes.
355
+ * BigInt as string. Site category ID (config_items.id)
311
356
  */
312
- details?: Array<ApiErrorDetail>;
313
- };
314
- type ApiErrorResponse = {
315
- error: ApiErrorBody;
316
- };
317
- type UpdateAssetDto = {
357
+ category_id?: string;
318
358
  /**
319
- * Asset number
359
+ * Asset selection method
320
360
  */
321
- asset_number?: string;
361
+ asset_selection_method?: string;
322
362
  /**
323
- * Asset class public ID
363
+ * Asset affix
324
364
  */
325
- asset_class?: string;
365
+ asset_affix?: string;
326
366
  /**
327
- * Site public ID
367
+ * Asset affix position (prefix or suffix)
328
368
  */
329
- site_id?: string;
369
+ asset_affix_position?: string;
330
370
  /**
331
- * Asset photo file path or URL
371
+ * Public ID (UUID) - if not provided, will be generated
332
372
  */
333
- asset_photo_file?: string;
373
+ public_id?: string;
374
+ };
375
+ type DeleteAssetPropertyResponseDto = {
334
376
  /**
335
- * Asset photo metadata as JSON string
377
+ * Success message
336
378
  */
337
- asset_photo_info?: string;
379
+ message: string;
338
380
  /**
339
- * Latitude coordinate
381
+ * Deleted asset property ID. Serialized as a string in public API responses (BigInt-safe).
340
382
  */
341
- lat?: number;
383
+ id: string;
384
+ };
385
+ type DeleteSiteResponseDto = {
342
386
  /**
343
- * Longitude coordinate
387
+ * Success message
344
388
  */
345
- lng?: number;
389
+ message: string;
390
+ /**
391
+ * Deleted site public ID
392
+ */
393
+ site_public_id: string;
346
394
  };
347
- type EmbeddedUserPropertyDto = {
395
+ type DeleteUserPropertyResponseDto = {
348
396
  /**
349
- * Property ID. Serialized as a string in public API responses (BigInt-safe).
397
+ * Success message
398
+ */
399
+ message: string;
400
+ /**
401
+ * Deleted user property ID. Serialized as a string in public API responses (BigInt-safe).
402
+ */
403
+ id: string;
404
+ };
405
+ type EmbeddedAssetClassPropertyDto = {
406
+ /**
407
+ * Custom field-definition ID (config_items.id). String (BigInt-safe).
350
408
  */
351
409
  property_id: string;
410
+ /**
411
+ * The asset_class_properties value-row ID (for future round-trip into an asset-class-property update). String (BigInt-safe).
412
+ */
413
+ asset_class_property_id: string;
352
414
  /**
353
415
  * Property name from config_items
354
416
  */
355
417
  property_name: string;
356
418
  /**
357
- * Text value (if property type is text)
419
+ * Text value
358
420
  */
359
421
  text_value: {
360
422
  [key: string]: unknown;
361
423
  } | null;
362
424
  /**
363
- * Numeric value (if property type is numeric)
425
+ * Numeric value
364
426
  */
365
427
  numeric_value: {
366
428
  [key: string]: unknown;
367
429
  } | null;
368
430
  /**
369
- * Date value (if property type is date)
431
+ * Date value
370
432
  */
371
433
  date_value: {
372
434
  [key: string]: unknown;
373
435
  } | null;
374
- };
375
- type UserResponseDto = {
376
- /**
377
- * User public ID (UUID)
378
- */
379
- user_public_id: string;
380
- /**
381
- * User first name
382
- */
383
- user_first_name: string;
384
- /**
385
- * User last name
386
- */
387
- user_last_name: string;
388
436
  /**
389
- * User email address
437
+ * Timestamp the value was last updated
390
438
  */
391
- user_email: {
439
+ updated_at: {
392
440
  [key: string]: unknown;
393
441
  } | null;
394
442
  /**
395
- * Profile photo URL
443
+ * Public ID (UUID) of the user who last updated this value
396
444
  */
397
- user_profile_photo: {
445
+ updated_by: {
398
446
  [key: string]: unknown;
399
447
  } | null;
400
448
  /**
401
- * Username (typically email)
449
+ * Name of the user who last updated this value
402
450
  */
403
- user_user_name: {
451
+ updated_by_name: {
404
452
  [key: string]: unknown;
405
453
  } | null;
454
+ };
455
+ type EmbeddedAssetPropertyDto = {
406
456
  /**
407
- * Employee number
457
+ * Custom field-definition ID (config_items.id — which field, e.g. "Voyage"). Serialized as a string in public API responses (BigInt-safe).
408
458
  */
409
- user_employee_number: {
410
- [key: string]: unknown;
411
- } | null;
459
+ property_id: string;
412
460
  /**
413
- * User PIN code
461
+ * The asset_properties value-row ID. Pass this to PATCH/DELETE /asset-property/:id to update or remove the value. Serialized as a string in public API responses (BigInt-safe).
414
462
  */
415
- user_pin: {
463
+ asset_property_id: string;
464
+ /**
465
+ * Property name from config_items
466
+ */
467
+ property_name: string;
468
+ /**
469
+ * Text value (if property type is text)
470
+ */
471
+ text_value: {
416
472
  [key: string]: unknown;
417
473
  } | null;
418
474
  /**
419
- * Contact phone number
475
+ * Numeric value (if property type is numeric)
420
476
  */
421
- user_contact_number: {
477
+ numeric_value: {
422
478
  [key: string]: unknown;
423
479
  } | null;
424
480
  /**
425
- * Last login timestamp
481
+ * Date value (if property type is date)
426
482
  */
427
- user_last_login_timestamp: {
483
+ date_value: {
428
484
  [key: string]: unknown;
429
485
  } | null;
430
486
  /**
431
- * User creation timestamp
487
+ * Timestamp the property value was last updated
432
488
  */
433
- user_created: string;
489
+ updated_at: string;
434
490
  /**
435
- * Public ID of user who created this user
491
+ * Public ID (UUID) of the user who last updated this value
436
492
  */
437
- user_created_by: {
493
+ updated_by: {
438
494
  [key: string]: unknown;
439
495
  } | null;
440
496
  /**
441
- * Name of user who created this user
497
+ * Name of the user who last updated this value
442
498
  */
443
- user_created_by_name: {
499
+ updated_by_name: {
444
500
  [key: string]: unknown;
445
501
  } | null;
502
+ };
503
+ type EmbeddedUserPropertyDto = {
446
504
  /**
447
- * Last modification timestamp
505
+ * Property ID. Serialized as a string in public API responses (BigInt-safe).
448
506
  */
449
- user_modified: string;
507
+ property_id: string;
450
508
  /**
451
- * Public ID of user who last modified this user
509
+ * Property name from config_items
452
510
  */
453
- user_modified_by: {
454
- [key: string]: unknown;
455
- } | null;
511
+ property_name: string;
456
512
  /**
457
- * Name of user who last modified this user
513
+ * Text value (if property type is text)
458
514
  */
459
- user_modified_by_name: {
515
+ text_value: {
460
516
  [key: string]: unknown;
461
517
  } | null;
462
518
  /**
463
- * Whether user is deleted
519
+ * Numeric value (if property type is numeric)
464
520
  */
465
- user_deleted: boolean;
521
+ numeric_value: {
522
+ [key: string]: unknown;
523
+ } | null;
466
524
  /**
467
- * User properties
525
+ * Date value (if property type is date)
468
526
  */
469
- user_properties: Array<EmbeddedUserPropertyDto>;
527
+ date_value: {
528
+ [key: string]: unknown;
529
+ } | null;
470
530
  };
471
- type ChangePinDto = {
531
+ type InspectionResponseDto = {
472
532
  /**
473
- * New 4-digit PIN code
533
+ * Inspection public ID (UUID)
474
534
  */
475
- pin: string;
476
- };
477
- type UploadCredentialsResponseDto = {
535
+ inspection_public_id: string;
478
536
  /**
479
- * Temporary AWS Access Key ID
537
+ * Inspection type
480
538
  */
481
- accessKeyId: string;
539
+ inspection_type: string;
482
540
  /**
483
- * Temporary AWS Secret Access Key
541
+ * Inspection status
484
542
  */
485
- secretAccessKey: string;
543
+ inspection_status: string;
486
544
  /**
487
- * Temporary AWS Session Token
545
+ * Site public ID (UUID)
488
546
  */
489
- sessionToken: string;
547
+ inspection_site_id?: {
548
+ [key: string]: unknown;
549
+ };
490
550
  /**
491
- * Credentials expiration time in ISO 8601 format
551
+ * Site name
492
552
  */
493
- expiration: string;
553
+ inspection_site_name?: {
554
+ [key: string]: unknown;
555
+ };
494
556
  /**
495
- * S3 bucket name
557
+ * Asset public ID (UUID)
496
558
  */
497
- bucket: string;
559
+ inspection_asset_id?: {
560
+ [key: string]: unknown;
561
+ };
498
562
  /**
499
- * AWS region
563
+ * Asset number
500
564
  */
501
- region: string;
565
+ inspection_asset_number?: {
566
+ [key: string]: unknown;
567
+ };
502
568
  /**
503
- * S3 prefix path for uploads (company folder - credentials grant access to entire company folder)
569
+ * Checklist public ID (UUID)
504
570
  */
505
- uploadPrefix: string;
506
- };
507
- type RequestUploadDto = {
571
+ inspection_checklist_id?: {
572
+ [key: string]: unknown;
573
+ };
508
574
  /**
509
- * Feature/folder name
575
+ * Checklist name
510
576
  */
511
- feature: string;
577
+ inspection_checklist_name?: {
578
+ [key: string]: unknown;
579
+ };
512
580
  /**
513
- * Filename
581
+ * Checklist category public ID (UUID)
514
582
  */
515
- filename: string;
516
- };
517
- type RequestLogUploadDto = {
583
+ inspection_checklist_category_id?: {
584
+ [key: string]: unknown;
585
+ };
518
586
  /**
519
- * Company name (used as the top-level folder)
587
+ * Checklist category name
520
588
  */
521
- companyName: string;
589
+ inspection_checklist_category?: {
590
+ [key: string]: unknown;
591
+ };
522
592
  /**
523
- * Device name (used as the second folder segment)
593
+ * Submitted user public ID (UUID)
524
594
  */
525
- deviceName: string;
595
+ inspection_submitted_user_id?: {
596
+ [key: string]: unknown;
597
+ };
526
598
  /**
527
- * Final log archive filename
599
+ * Submitted user full name
528
600
  */
529
- fileName: string;
530
- };
531
- type RequestDownloadDto = {
601
+ inspection_submitted_user_name?: {
602
+ [key: string]: unknown;
603
+ };
532
604
  /**
533
- * Feature/folder name
605
+ * Subject user public ID (UUID)
534
606
  */
535
- feature: string;
607
+ inspection_subject_user_id?: {
608
+ [key: string]: unknown;
609
+ };
536
610
  /**
537
- * Filename (optional - if not provided, /download-url grants access to entire folder)
611
+ * Subject user full name
538
612
  */
539
- filename?: string;
540
- };
541
- type DownloadResponseDto = {
613
+ inspection_subject_user_name?: {
614
+ [key: string]: unknown;
615
+ };
542
616
  /**
543
- * CloudFront base URL (for folder access) or full file URL (for single file)
617
+ * Target project ID. Serialized as a string in public API responses (BigInt-safe).
544
618
  */
545
- baseUrl: string;
619
+ inspection_target_project_id?: string | null;
546
620
  /**
547
- * CloudFront path pattern that the cookies grant access to
621
+ * Device public ID (UUID)
548
622
  */
549
- pathPattern: string;
623
+ inspection_device_id?: {
624
+ [key: string]: unknown;
625
+ };
550
626
  /**
551
- * CloudFront-Policy cookie value (custom policy) or CloudFront-Expires (canned policy)
627
+ * Device name
552
628
  */
553
- cloudFrontPolicy?: string;
629
+ inspection_device_name?: {
630
+ [key: string]: unknown;
631
+ };
554
632
  /**
555
- * CloudFront-Expires cookie value (canned policy, Unix timestamp)
633
+ * Inspection score
556
634
  */
557
- cloudFrontExpires?: number;
635
+ inspection_score?: {
636
+ [key: string]: unknown;
637
+ };
558
638
  /**
559
- * CloudFront-Signature cookie value
639
+ * Inspection duration in seconds
560
640
  */
561
- cloudFrontSignature: string;
641
+ inspection_duration?: {
642
+ [key: string]: unknown;
643
+ };
562
644
  /**
563
- * CloudFront-Key-Pair-Id cookie value
645
+ * Completion percentage
564
646
  */
565
- cloudFrontKeyPairId: string;
647
+ inspection_completion_percentage?: {
648
+ [key: string]: unknown;
649
+ };
566
650
  /**
567
- * Expiration time in seconds
651
+ * Started at timestamp
568
652
  */
569
- expiresIn: number;
570
- };
571
- type CreateInspectionDto = {
653
+ inspection_started_at?: {
654
+ [key: string]: unknown;
655
+ };
572
656
  /**
573
- * Inspection public ID (UUID)
657
+ * Ended at timestamp
574
658
  */
575
- public_id: string;
659
+ inspection_ended_at?: {
660
+ [key: string]: unknown;
661
+ };
576
662
  /**
577
- * Site public ID
663
+ * Submitted at timestamp
578
664
  */
579
- site_id: string;
665
+ inspection_submitted_at?: {
666
+ [key: string]: unknown;
667
+ };
580
668
  /**
581
- * Inspection type
669
+ * Created at timestamp (date received)
582
670
  */
583
- type: string;
671
+ inspection_created_at: string;
584
672
  /**
585
- * Inspection status
673
+ * Created by user public ID (UUID)
586
674
  */
587
- status: string;
675
+ inspection_created_by_id?: {
676
+ [key: string]: unknown;
677
+ };
588
678
  /**
589
- * BigInt as string. Checklist ID
679
+ * Created by user full name
590
680
  */
591
- checklist_id: string;
681
+ inspection_created_by_name?: {
682
+ [key: string]: unknown;
683
+ };
592
684
  /**
593
- * User public ID (creator)
685
+ * Updated at timestamp
594
686
  */
595
- user_id: string;
687
+ inspection_updated_at: string;
596
688
  /**
597
- * BigInt as string. Asset internal ID (for type=asset inspections)
689
+ * Updated by user public ID (UUID)
598
690
  */
599
- asset_id?: string;
691
+ inspection_updated_by_id?: {
692
+ [key: string]: unknown;
693
+ };
600
694
  /**
601
- * BigInt as string. Subject user internal ID (for type=user inspections)
695
+ * Updated by user full name
602
696
  */
603
- subject_user_id?: string;
697
+ inspection_updated_by_name?: {
698
+ [key: string]: unknown;
699
+ };
700
+ };
701
+ type IssueHistoryDto = {
604
702
  /**
605
- * BigInt as string. Device internal ID (for type=device inspections)
703
+ * BigInt as string. Issue history entry ID
606
704
  */
607
- device_id?: string;
705
+ id: string;
608
706
  /**
609
- * Asset selection method (e.g. "search", "scan")
707
+ * BigInt as string. Issue ID this history entry belongs to
610
708
  */
611
- asset_selection_method?: string;
709
+ issue_id: string;
612
710
  /**
613
- * Latitude (optional)
711
+ * Issue title at the time of change
614
712
  */
615
- lat?: number;
713
+ title?: {
714
+ [key: string]: unknown;
715
+ };
616
716
  /**
617
- * Longitude (optional)
717
+ * Assigned user ID at the time of change
618
718
  */
619
- lng?: number;
719
+ assigned_user_id?: {
720
+ [key: string]: unknown;
721
+ };
620
722
  /**
621
- * App version (optional)
723
+ * Assigned group ID at the time of change
622
724
  */
623
- app_version?: string;
725
+ assigned_group_id?: {
726
+ [key: string]: unknown;
727
+ };
624
728
  /**
625
- * Connection type (optional)
729
+ * Status at the time of change
626
730
  */
627
- connection?: string;
731
+ status?: {
732
+ [key: string]: unknown;
733
+ };
628
734
  /**
629
- * Started at timestamp (ISO 8601 format, optional)
735
+ * Primary action ID at the time of change
630
736
  */
631
- started_at?: string;
737
+ primary_action_id?: {
738
+ [key: string]: unknown;
739
+ };
632
740
  /**
633
- * BigInt as string. Task ID (optional) - if provided, the task status will be set to "started"
741
+ * Resolution ID at the time of change
634
742
  */
635
- task_id?: string;
636
- };
637
- type RepeatInspectionDto = {
743
+ resolution_id?: {
744
+ [key: string]: unknown;
745
+ };
638
746
  /**
639
- * User public ID (who is repeating the inspection)
747
+ * Reference text at the time of change
640
748
  */
641
- user_id: string;
749
+ reference?: {
750
+ [key: string]: unknown;
751
+ };
642
752
  /**
643
- * New inspection public ID for the cloned inspection
753
+ * Target completion date at the time of change
644
754
  */
645
- new_inspection_id: string;
646
- };
647
- type ResumeInspectionDto = {
755
+ target_completion_on?: {
756
+ [key: string]: unknown;
757
+ };
648
758
  /**
649
- * User public ID (who is resuming the inspection)
759
+ * Note about the change
650
760
  */
651
- user_id: string;
652
- };
653
- type UpdateInspectionDto = {
761
+ note?: {
762
+ [key: string]: unknown;
763
+ };
654
764
  /**
655
- * User public ID (who is updating the inspection)
765
+ * Effort spent in minutes
656
766
  */
657
- user_id: string;
767
+ effort_spent?: {
768
+ [key: string]: unknown;
769
+ };
658
770
  /**
659
- * Inspection type
771
+ * Cost incurred
660
772
  */
661
- type?: string;
773
+ cost_incurred?: {
774
+ [key: string]: unknown;
775
+ };
662
776
  /**
663
- * Inspection status
777
+ * Chargeable cost
664
778
  */
665
- status?: string;
779
+ chargeable_cost?: {
780
+ [key: string]: unknown;
781
+ };
666
782
  /**
667
- * Latitude
783
+ * Type of change that occurred
668
784
  */
669
- lat?: number;
785
+ change_type: string;
670
786
  /**
671
- * Longitude
787
+ * Timestamp when the change occurred
672
788
  */
673
- lng?: number;
789
+ changed_at: string;
674
790
  /**
675
- * App version
791
+ * BigInt as string. User ID who made the change
676
792
  */
677
- app_version?: string;
793
+ changed_by_id: string;
794
+ };
795
+ type IssueHistoryResponseDto = {
678
796
  /**
679
- * Connection type
797
+ * Issue public ID
680
798
  */
681
- connection?: string;
799
+ issue_public_id: string;
682
800
  /**
683
- * Started at timestamp (ISO 8601 format)
801
+ * BigInt as string. Issue internal ID
684
802
  */
685
- started_at?: string;
803
+ issue_id: string;
686
804
  /**
687
- * Ended at timestamp (ISO 8601 format)
805
+ * Array of issue history entries
688
806
  */
689
- ended_at?: string;
807
+ history: Array<IssueHistoryDto>;
808
+ };
809
+ type IssueResponseDto = {
690
810
  /**
691
- * Submitted at timestamp (ISO 8601 format)
811
+ * Issue public ID (UUID)
692
812
  */
693
- submitted_at?: string;
813
+ issue_public_id: string;
694
814
  /**
695
- * Duration in seconds
815
+ * Issue number
696
816
  */
697
- duration?: number;
817
+ issue_number: string;
698
818
  /**
699
- * Inspection score
819
+ * Asset internal ID
700
820
  */
701
- score?: number;
821
+ issue_asset_id?: {
822
+ [key: string]: unknown;
823
+ };
702
824
  /**
703
- * Completion percentage
825
+ * Asset number
704
826
  */
705
- completion_percentage?: number;
827
+ issue_asset_number?: {
828
+ [key: string]: unknown;
829
+ };
706
830
  /**
707
- * Asset selection method
831
+ * Asset class name
708
832
  */
709
- asset_selection_method?: string;
710
- };
711
- type DeleteInspectionDto = {
833
+ issue_asset_class?: {
834
+ [key: string]: unknown;
835
+ };
712
836
  /**
713
- * User public ID (who is deleting the inspection)
837
+ * Asset sub-class name
714
838
  */
715
- user_id: string;
716
- };
717
- type ResponseOptionDto = {
839
+ issue_asset_sub_class?: {
840
+ [key: string]: unknown;
841
+ };
718
842
  /**
719
- * Response option public ID (UUID)
843
+ * Asset category name
720
844
  */
721
- public_id?: string;
845
+ issue_asset_category?: {
846
+ [key: string]: unknown;
847
+ };
722
848
  /**
723
- * Response public ID this option belongs to
849
+ * Inspection name
724
850
  */
725
- response_public_id?: string;
851
+ issue_inspection_name?: {
852
+ [key: string]: unknown;
853
+ };
726
854
  /**
727
- * BigInt as string. Question option ID
855
+ * Checklist category
728
856
  */
729
- question_option_id: string;
857
+ issue_inspection_category?: {
858
+ [key: string]: unknown;
859
+ };
730
860
  /**
731
- * Option label
861
+ * Question title
732
862
  */
733
- label: string;
863
+ issues_question_title?: {
864
+ [key: string]: unknown;
865
+ };
734
866
  /**
735
- * Long description
867
+ * Issue title
736
868
  */
737
- long_description?: string;
869
+ issue_title: string;
738
870
  /**
739
- * Is leaf node in option tree (accepts boolean or 0/1)
871
+ * Assignee user ID
740
872
  */
741
- leaf_node?: {
873
+ issue_assignee_id?: {
742
874
  [key: string]: unknown;
743
875
  };
744
876
  /**
745
- * Score value
877
+ * Assignee full name
746
878
  */
747
- score?: number;
879
+ issue_assignee?: {
880
+ [key: string]: unknown;
881
+ };
748
882
  /**
749
- * Updated timestamp (Unix epoch in seconds)
883
+ * Assigned group ID
750
884
  */
751
- updated_at?: number;
885
+ issue_assigned_group_id?: {
886
+ [key: string]: unknown;
887
+ };
752
888
  /**
753
- * Deleted timestamp (Unix epoch in seconds)
889
+ * Assigned group name
754
890
  */
755
- deleted_at?: number;
756
- };
757
- type MediaDto = {
891
+ issue_assigned_group?: {
892
+ [key: string]: unknown;
893
+ };
758
894
  /**
759
- * Media public ID (UUID)
895
+ * Reported at timestamp
760
896
  */
761
- public_id?: string;
897
+ issue_reported_at?: {
898
+ [key: string]: unknown;
899
+ };
762
900
  /**
763
- * Response public ID
901
+ * Reference
764
902
  */
765
- response_public_id?: string;
903
+ issue_reference?: {
904
+ [key: string]: unknown;
905
+ };
766
906
  /**
767
- * Response extra info public ID
907
+ * Issue status
768
908
  */
769
- response_extra_info_public_id?: string;
909
+ issue_status: string;
770
910
  /**
771
- * Media type (photo, audio, video, etc.)
911
+ * Primary action ID
772
912
  */
773
- type: string;
913
+ issue_primary_action_id?: {
914
+ [key: string]: unknown;
915
+ };
774
916
  /**
775
- * Media file path
917
+ * Primary action name
776
918
  */
777
- media_file?: string;
919
+ issue_primary_action?: {
920
+ [key: string]: unknown;
921
+ };
778
922
  /**
779
- * Media info (JSON or text)
923
+ * Response score
780
924
  */
781
- media_info?: string;
925
+ issue_score?: {
926
+ [key: string]: unknown;
927
+ };
782
928
  /**
783
- * Captured timestamp (Unix epoch in seconds)
929
+ * Resolution ID
784
930
  */
785
- captured_at?: number;
931
+ issue_resolution_id?: {
932
+ [key: string]: unknown;
933
+ };
786
934
  /**
787
- * Audio duration in seconds
935
+ * Resolution reason
788
936
  */
789
- audio_duration?: number;
937
+ issue_resolution_reason?: {
938
+ [key: string]: unknown;
939
+ };
790
940
  /**
791
- * Audio transcription text
941
+ * First actioned at timestamp
792
942
  */
793
- audio_transcription?: string;
943
+ issue_first_actioned_at?: {
944
+ [key: string]: unknown;
945
+ };
794
946
  /**
795
- * Upload status (accepts boolean or 0/1)
947
+ * Target completion date
796
948
  */
797
- uploaded?: {
949
+ issue_target_completion_date?: {
798
950
  [key: string]: unknown;
799
951
  };
800
952
  /**
801
- * Updated timestamp (Unix epoch in seconds)
953
+ * Closed at timestamp
802
954
  */
803
- updated_at?: number;
955
+ issue_closed_at?: {
956
+ [key: string]: unknown;
957
+ };
804
958
  /**
805
- * Deleted timestamp (Unix epoch in seconds)
959
+ * Response status
806
960
  */
807
- deleted_at?: number;
808
- };
809
- type ExtraInfoDto = {
961
+ response_status?: {
962
+ [key: string]: unknown;
963
+ };
810
964
  /**
811
- * Extra info public ID (UUID)
965
+ * Created at timestamp
812
966
  */
813
- public_id?: string;
967
+ issue_created_at: string;
814
968
  /**
815
- * Response public ID this extra info belongs to
969
+ * Created by user public ID (UUID)
816
970
  */
817
- response_public_id?: string;
971
+ issue_created_by_id: string;
818
972
  /**
819
- * BigInt as string. Extra info definition ID
973
+ * Created by user full name
820
974
  */
821
- extra_info_id: string;
975
+ issue_created_by?: {
976
+ [key: string]: unknown;
977
+ };
822
978
  /**
823
- * Text value
824
- */
825
- text_value?: string;
826
- /**
827
- * Numeric value
828
- */
829
- numeric_value?: number;
830
- /**
831
- * Date value (Unix epoch in seconds)
832
- */
833
- date_value?: number;
834
- /**
835
- * ID value (for dropdown selections)
836
- */
837
- id_value?: string;
838
- /**
839
- * Latitude value
840
- */
841
- lat_value?: number;
842
- /**
843
- * Longitude value
844
- */
845
- lng_value?: number;
846
- /**
847
- * Updated timestamp (Unix epoch in seconds)
979
+ * Modified at timestamp
848
980
  */
849
- updated_at?: number;
981
+ issue_modified_at: string;
850
982
  /**
851
- * Deleted timestamp (Unix epoch in seconds)
983
+ * Modified by user public ID (UUID)
852
984
  */
853
- deleted_at?: number;
985
+ issue_modified_by_id: string;
854
986
  /**
855
- * Media attachments (not validated for performance)
987
+ * Modified by user full name
856
988
  */
857
- media?: Array<MediaDto>;
989
+ issue_modified_by?: {
990
+ [key: string]: unknown;
991
+ };
858
992
  };
859
- type ResponseDto = {
993
+ type ListChecklistsResponseDto = {
860
994
  /**
861
- * Response public ID (UUID)
995
+ * List of checklists
862
996
  */
863
- public_id?: string;
997
+ data: Array<ChecklistSummaryDto>;
864
998
  /**
865
- * Inspection public ID this response belongs to
999
+ * Current page number
866
1000
  */
867
- inspection_public_id?: string;
1001
+ page: number;
868
1002
  /**
869
- * BigInt as string. Checklist item ID
1003
+ * Number of results per page
870
1004
  */
871
- checklist_item_id?: string;
1005
+ per_page: number;
872
1006
  /**
873
- * Response type (question, condition, etc.)
1007
+ * Total number of results
874
1008
  */
875
- type?: string;
1009
+ total: number;
876
1010
  /**
877
- * Response status
1011
+ * Total number of pages
878
1012
  */
879
- status?: number;
1013
+ total_pages: number;
1014
+ };
1015
+ type ListConfigItemsResponseDto = {
880
1016
  /**
881
- * Condition result (accepts boolean or 0/1)
1017
+ * Config items
882
1018
  */
883
- condition_result?: {
884
- [key: string]: unknown;
885
- };
1019
+ data: Array<ConfigItemDto>;
1020
+ page: number;
1021
+ per_page: number;
1022
+ total: number;
1023
+ total_pages: number;
1024
+ };
1025
+ type ListConfigTablesResponseDto = {
886
1026
  /**
887
- * BigInt as string. Control button ID
1027
+ * Config tables
888
1028
  */
889
- control_button_id?: string;
1029
+ data: Array<ConfigTableDto>;
1030
+ page: number;
1031
+ per_page: number;
1032
+ total: number;
1033
+ total_pages: number;
1034
+ };
1035
+ type ListInspectionsResponseDto = {
890
1036
  /**
891
- * BigInt as string. Control gauge band ID
1037
+ * List of inspections
892
1038
  */
893
- control_gauge_band_id?: string;
1039
+ data: Array<InspectionResponseDto>;
894
1040
  /**
895
- * Gauge value
1041
+ * Current page number
896
1042
  */
897
- gauge_value?: number;
1043
+ page: number;
898
1044
  /**
899
- * Control property value
1045
+ * Number of results per page
900
1046
  */
901
- control_property_value?: number;
1047
+ per_page: number;
902
1048
  /**
903
- * BigInt as string. Embedded inspection ID
1049
+ * Total number of results
904
1050
  */
905
- embedded_inspection_id?: string;
1051
+ total: number;
906
1052
  /**
907
- * Embedded inspection public ID (UUID)
1053
+ * Total number of pages
908
1054
  */
909
- embedded_inspection_public_id?: string;
1055
+ total_pages: number;
1056
+ };
1057
+ type ListIssuesResponseDto = {
910
1058
  /**
911
- * Loop repetitions count
1059
+ * List of issues
912
1060
  */
913
- loop_repetitions?: number;
1061
+ data: Array<IssueResponseDto>;
914
1062
  /**
915
- * BigInt as string. Prerequisite inspection ID
1063
+ * Current page number
916
1064
  */
917
- prerequisite_inspection_id?: string;
1065
+ page: number;
918
1066
  /**
919
- * Latitude
1067
+ * Number of results per page
920
1068
  */
921
- lat?: number;
1069
+ per_page: number;
922
1070
  /**
923
- * Longitude
1071
+ * Total number of results
924
1072
  */
925
- lng?: number;
1073
+ total: number;
926
1074
  /**
927
- * Duration in seconds
1075
+ * Total number of pages
928
1076
  */
929
- duration?: number;
1077
+ total_pages: number;
1078
+ };
1079
+ type ListSitesResponseDto = {
930
1080
  /**
931
- * Score
1081
+ * List of sites
932
1082
  */
933
- score?: number;
1083
+ data: Array<SiteResponseDto>;
934
1084
  /**
935
- * Left value for nested set model
1085
+ * Total number of sites
936
1086
  */
937
- left?: number;
1087
+ total: number;
938
1088
  /**
939
- * Right value for nested set model
1089
+ * Current page
940
1090
  */
941
- right?: number;
1091
+ page: number;
942
1092
  /**
943
- * Quiz answer attempts count
1093
+ * Items per page
944
1094
  */
945
- quiz_answer_attempts?: number;
1095
+ per_page: number;
946
1096
  /**
947
- * Responded timestamp (Unix epoch in seconds)
1097
+ * Total number of pages
948
1098
  */
949
- responded_at?: number;
1099
+ total_pages: number;
1100
+ };
1101
+ type PublicCreateAssetDto = {
950
1102
  /**
951
- * Updated timestamp (Unix epoch in seconds)
1103
+ * Asset number
952
1104
  */
953
- updated_at?: number;
1105
+ asset_number: string;
954
1106
  /**
955
- * Deleted timestamp (Unix epoch in seconds)
1107
+ * Asset class public ID
956
1108
  */
957
- deleted_at?: number;
1109
+ asset_class: string;
958
1110
  /**
959
- * Nested child responses (not validated for performance)
1111
+ * Site public ID
960
1112
  */
961
- responses?: Array<ResponseDto>;
1113
+ site_id: string;
1114
+ };
1115
+ type SiteResponseDto = {
962
1116
  /**
963
- * Response options (for multi-select questions, not validated for performance)
1117
+ * Site public ID (UUID)
964
1118
  */
965
- response_options?: Array<ResponseOptionDto>;
1119
+ site_public_id: string;
966
1120
  /**
967
- * Extra information fields (not validated for performance)
1121
+ * Site name
968
1122
  */
969
- extra_infos?: Array<ExtraInfoDto>;
1123
+ site_name: string;
970
1124
  /**
971
- * Media attachments directly on response (not validated for performance)
1125
+ * Base language
972
1126
  */
973
- media?: Array<MediaDto>;
974
- };
975
- type SubmitInspectionDto = {
1127
+ site_base_language: string;
976
1128
  /**
977
- * Inspection public ID (UUID)
1129
+ * Logo file path
978
1130
  */
979
- public_id: string;
1131
+ site_logo_file?: {
1132
+ [key: string]: unknown;
1133
+ };
980
1134
  /**
981
- * BigInt as string. Company ID
1135
+ * Site category name
982
1136
  */
983
- company_id: string;
1137
+ site_category?: {
1138
+ [key: string]: unknown;
1139
+ };
984
1140
  /**
985
- * BigInt as string. Site ID
1141
+ * Site category ID. Serialized as a string in public API responses (BigInt-safe).
986
1142
  */
987
- site_id: string;
1143
+ site_category_id?: string | null;
988
1144
  /**
989
- * Inspection type
1145
+ * Asset selection method
990
1146
  */
991
- type: string;
1147
+ site_asset_selection_method: string;
992
1148
  /**
993
- * Embedded flag (accepts boolean or 0/1)
1149
+ * Asset affix
994
1150
  */
995
- embedded?: {
1151
+ site_asset_affix?: {
996
1152
  [key: string]: unknown;
997
1153
  };
998
1154
  /**
999
- * Inspection status
1155
+ * Asset affix position
1000
1156
  */
1001
- status: string;
1157
+ site_asset_affix_position?: {
1158
+ [key: string]: unknown;
1159
+ };
1002
1160
  /**
1003
- * BigInt as string. Checklist ID
1161
+ * Created at timestamp
1004
1162
  */
1005
- checklist_id: string;
1163
+ site_created_at: string;
1006
1164
  /**
1007
- * BigInt as string. User ID
1165
+ * Created by user public ID
1008
1166
  */
1009
- user_id: string;
1167
+ site_created_by: string;
1010
1168
  /**
1011
- * BigInt as string. Asset ID
1169
+ * Created by user name
1012
1170
  */
1013
- asset_id?: string;
1171
+ site_created_by_name?: {
1172
+ [key: string]: unknown;
1173
+ };
1014
1174
  /**
1015
- * BigInt as string. Subject user ID
1175
+ * Updated at timestamp
1016
1176
  */
1017
- subject_user_id?: string;
1177
+ site_updated_at: string;
1018
1178
  /**
1019
- * BigInt as string. Device ID
1179
+ * Updated by user public ID
1020
1180
  */
1021
- device_id?: string;
1181
+ site_updated_by: string;
1022
1182
  /**
1023
- * Started timestamp (Unix epoch in milliseconds)
1183
+ * Updated by user name
1024
1184
  */
1025
- started_at?: number;
1185
+ site_updated_by_name?: {
1186
+ [key: string]: unknown;
1187
+ };
1188
+ };
1189
+ type UpdateAssetClassDto = {
1026
1190
  /**
1027
- * Ended timestamp (Unix epoch in milliseconds)
1191
+ * Asset class name (make)
1028
1192
  */
1029
- ended_at?: number;
1193
+ asset_class?: string;
1030
1194
  /**
1031
- * Submitted timestamp (Unix epoch in milliseconds)
1195
+ * Asset sub-class name (model)
1032
1196
  */
1033
- submitted_at?: number;
1197
+ asset_sub_class?: string;
1034
1198
  /**
1035
- * Duration in seconds
1199
+ * BigInt as string. Asset category ID (from config_items table)
1036
1200
  */
1037
- duration?: number;
1201
+ asset_category_id?: string;
1038
1202
  /**
1039
- * Score
1203
+ * Asset class photo file path
1040
1204
  */
1041
- score?: number;
1205
+ asset_class_photo_file?: string;
1042
1206
  /**
1043
- * Latitude
1207
+ * Asset class photo info (JSON string)
1044
1208
  */
1045
- lat?: number;
1209
+ asset_class_photo_info?: string;
1046
1210
  /**
1047
- * Longitude
1211
+ * Whether on-the-fly creation is enabled
1048
1212
  */
1049
- lng?: number;
1213
+ on_the_fly_enabled?: boolean;
1214
+ };
1215
+ type UpdateAssetDto = {
1050
1216
  /**
1051
- * Completion percentage
1217
+ * Asset number
1052
1218
  */
1053
- completion_percentage?: number;
1219
+ asset_number?: string;
1054
1220
  /**
1055
- * Asset selection method
1221
+ * Asset class public ID
1056
1222
  */
1057
- asset_selection_method?: string;
1223
+ asset_class?: string;
1058
1224
  /**
1059
- * App version
1225
+ * Site public ID
1060
1226
  */
1061
- app_version?: string;
1227
+ site_id?: string;
1062
1228
  /**
1063
- * Connection type
1229
+ * Asset photo file path or URL
1064
1230
  */
1065
- connection?: string;
1231
+ asset_photo_file?: string;
1066
1232
  /**
1067
- * Non-billing flag
1233
+ * Asset photo metadata as JSON string
1068
1234
  */
1069
- non_billing?: string;
1235
+ asset_photo_info?: string;
1070
1236
  /**
1071
- * Billing date (Unix epoch in milliseconds)
1237
+ * Latitude coordinate
1072
1238
  */
1073
- billing_date?: number;
1239
+ lat?: number;
1074
1240
  /**
1075
- * BigInt as string. Submitted project ID
1241
+ * Longitude coordinate
1076
1242
  */
1077
- submitted_project_id?: string;
1243
+ lng?: number;
1244
+ };
1245
+ type UpdateAssetPropertyDto = {
1078
1246
  /**
1079
- * BigInt as string. Target project ID
1247
+ * Property value (can be string, number, or date depending on property type)
1080
1248
  */
1081
- target_project_id?: string;
1249
+ value: {
1250
+ [key: string]: unknown;
1251
+ };
1252
+ };
1253
+ type UpdateConfigItemDto = {
1082
1254
  /**
1083
- * BigInt as string. Project location ID
1255
+ * Item value / name
1084
1256
  */
1085
- project_location_id?: string;
1257
+ item?: string;
1086
1258
  /**
1087
- * Updated timestamp (Unix epoch in seconds)
1259
+ * Description (pass null to clear)
1088
1260
  */
1089
- updated_at?: number;
1261
+ description?: {
1262
+ [key: string]: unknown;
1263
+ } | null;
1264
+ };
1265
+ type UpdateIssueDto = {
1090
1266
  /**
1091
- * Deleted timestamp (Unix epoch in seconds)
1267
+ * Issue title
1092
1268
  */
1093
- deleted_at?: number;
1269
+ title?: string;
1094
1270
  /**
1095
- * Array of responses (nested tree structure)
1271
+ * BigInt as string. Asset ID
1096
1272
  */
1097
- responses?: Array<ResponseDto>;
1273
+ asset_id?: string;
1098
1274
  /**
1099
- * BigInt as string. Task ID (optional) - if provided, the task status will be updated to match inspection status
1275
+ * BigInt as string. Assigned user ID
1100
1276
  */
1101
- task_id?: string;
1102
- };
1103
- type InspectionResponseDto = {
1277
+ assigned_user_id?: string;
1104
1278
  /**
1105
- * Inspection public ID (UUID)
1279
+ * BigInt as string. Assigned group ID
1106
1280
  */
1107
- inspection_public_id: string;
1281
+ assigned_group_id?: string;
1108
1282
  /**
1109
- * Inspection type
1283
+ * Issue status
1110
1284
  */
1111
- inspection_type: string;
1285
+ status?: string;
1112
1286
  /**
1113
- * Inspection status
1287
+ * BigInt as string. Primary action ID
1114
1288
  */
1115
- inspection_status: string;
1289
+ primary_action_id?: string;
1116
1290
  /**
1117
- * Site public ID (UUID)
1291
+ * Resolution ID (accepts string or number, will be converted to string)
1118
1292
  */
1119
- inspection_site_id?: {
1120
- [key: string]: unknown;
1121
- };
1293
+ resolution_id?: string;
1122
1294
  /**
1123
- * Site name
1295
+ * Response score
1124
1296
  */
1125
- inspection_site_name?: {
1126
- [key: string]: unknown;
1127
- };
1297
+ response_score?: number;
1128
1298
  /**
1129
- * Asset public ID (UUID)
1299
+ * Reference text
1130
1300
  */
1131
- inspection_asset_id?: {
1132
- [key: string]: unknown;
1133
- };
1301
+ reference?: string;
1134
1302
  /**
1135
- * Asset number
1303
+ * Reported at timestamp (Unix epoch in seconds)
1136
1304
  */
1137
- inspection_asset_number?: {
1138
- [key: string]: unknown;
1139
- };
1305
+ reported_at?: number;
1140
1306
  /**
1141
- * Checklist public ID (UUID)
1307
+ * First actioned at timestamp (Unix epoch in seconds)
1142
1308
  */
1143
- inspection_checklist_id?: {
1144
- [key: string]: unknown;
1145
- };
1309
+ first_actioned_at?: number;
1146
1310
  /**
1147
- * Checklist name
1311
+ * Target completion on timestamp (Unix epoch in seconds)
1148
1312
  */
1149
- inspection_checklist_name?: {
1150
- [key: string]: unknown;
1151
- };
1152
- /**
1153
- * Checklist category public ID (UUID)
1154
- */
1155
- inspection_checklist_category_id?: {
1156
- [key: string]: unknown;
1157
- };
1158
- /**
1159
- * Checklist category name
1160
- */
1161
- inspection_checklist_category?: {
1162
- [key: string]: unknown;
1163
- };
1164
- /**
1165
- * Submitted user public ID (UUID)
1166
- */
1167
- inspection_submitted_user_id?: {
1168
- [key: string]: unknown;
1169
- };
1170
- /**
1171
- * Submitted user full name
1172
- */
1173
- inspection_submitted_user_name?: {
1174
- [key: string]: unknown;
1175
- };
1176
- /**
1177
- * Subject user public ID (UUID)
1178
- */
1179
- inspection_subject_user_id?: {
1180
- [key: string]: unknown;
1181
- };
1182
- /**
1183
- * Subject user full name
1184
- */
1185
- inspection_subject_user_name?: {
1186
- [key: string]: unknown;
1187
- };
1188
- /**
1189
- * Target project ID. Serialized as a string in public API responses (BigInt-safe).
1190
- */
1191
- inspection_target_project_id?: string | null;
1192
- /**
1193
- * Device public ID (UUID)
1194
- */
1195
- inspection_device_id?: {
1196
- [key: string]: unknown;
1197
- };
1198
- /**
1199
- * Device name
1200
- */
1201
- inspection_device_name?: {
1202
- [key: string]: unknown;
1203
- };
1204
- /**
1205
- * Inspection score
1206
- */
1207
- inspection_score?: {
1208
- [key: string]: unknown;
1209
- };
1210
- /**
1211
- * Inspection duration in seconds
1212
- */
1213
- inspection_duration?: {
1214
- [key: string]: unknown;
1215
- };
1216
- /**
1217
- * Completion percentage
1218
- */
1219
- inspection_completion_percentage?: {
1220
- [key: string]: unknown;
1221
- };
1222
- /**
1223
- * Started at timestamp
1224
- */
1225
- inspection_started_at?: {
1226
- [key: string]: unknown;
1227
- };
1228
- /**
1229
- * Ended at timestamp
1230
- */
1231
- inspection_ended_at?: {
1232
- [key: string]: unknown;
1233
- };
1234
- /**
1235
- * Submitted at timestamp
1236
- */
1237
- inspection_submitted_at?: {
1238
- [key: string]: unknown;
1239
- };
1240
- /**
1241
- * Created at timestamp (date received)
1242
- */
1243
- inspection_created_at: string;
1244
- /**
1245
- * Created by user public ID (UUID)
1246
- */
1247
- inspection_created_by_id?: {
1248
- [key: string]: unknown;
1249
- };
1250
- /**
1251
- * Created by user full name
1252
- */
1253
- inspection_created_by_name?: {
1254
- [key: string]: unknown;
1255
- };
1256
- /**
1257
- * Updated at timestamp
1258
- */
1259
- inspection_updated_at: string;
1260
- /**
1261
- * Updated by user public ID (UUID)
1262
- */
1263
- inspection_updated_by_id?: {
1264
- [key: string]: unknown;
1265
- };
1266
- /**
1267
- * Updated by user full name
1268
- */
1269
- inspection_updated_by_name?: {
1270
- [key: string]: unknown;
1271
- };
1272
- };
1273
- type ListInspectionsResponseDto = {
1274
- /**
1275
- * List of inspections
1276
- */
1277
- data: Array<InspectionResponseDto>;
1278
- /**
1279
- * Current page number
1280
- */
1281
- page: number;
1282
- /**
1283
- * Number of results per page
1284
- */
1285
- per_page: number;
1286
- /**
1287
- * Total number of results
1288
- */
1289
- total: number;
1290
- /**
1291
- * Total number of pages
1292
- */
1293
- total_pages: number;
1294
- };
1295
- type IssueHistoryDto = {
1296
- /**
1297
- * BigInt as string. Issue history entry ID
1298
- */
1299
- id: string;
1300
- /**
1301
- * BigInt as string. Issue ID this history entry belongs to
1302
- */
1303
- issue_id: string;
1304
- /**
1305
- * Issue title at the time of change
1306
- */
1307
- title?: {
1308
- [key: string]: unknown;
1309
- };
1310
- /**
1311
- * Assigned user ID at the time of change
1312
- */
1313
- assigned_user_id?: {
1314
- [key: string]: unknown;
1315
- };
1316
- /**
1317
- * Assigned group ID at the time of change
1318
- */
1319
- assigned_group_id?: {
1320
- [key: string]: unknown;
1321
- };
1322
- /**
1323
- * Status at the time of change
1324
- */
1325
- status?: {
1326
- [key: string]: unknown;
1327
- };
1328
- /**
1329
- * Primary action ID at the time of change
1330
- */
1331
- primary_action_id?: {
1332
- [key: string]: unknown;
1333
- };
1334
- /**
1335
- * Resolution ID at the time of change
1336
- */
1337
- resolution_id?: {
1338
- [key: string]: unknown;
1339
- };
1340
- /**
1341
- * Reference text at the time of change
1342
- */
1343
- reference?: {
1344
- [key: string]: unknown;
1345
- };
1346
- /**
1347
- * Target completion date at the time of change
1348
- */
1349
- target_completion_on?: {
1350
- [key: string]: unknown;
1351
- };
1352
- /**
1353
- * Note about the change
1354
- */
1355
- note?: {
1356
- [key: string]: unknown;
1357
- };
1358
- /**
1359
- * Effort spent in minutes
1360
- */
1361
- effort_spent?: {
1362
- [key: string]: unknown;
1363
- };
1364
- /**
1365
- * Cost incurred
1366
- */
1367
- cost_incurred?: {
1368
- [key: string]: unknown;
1369
- };
1370
- /**
1371
- * Chargeable cost
1372
- */
1373
- chargeable_cost?: {
1374
- [key: string]: unknown;
1375
- };
1376
- /**
1377
- * Type of change that occurred
1378
- */
1379
- change_type: string;
1380
- /**
1381
- * Timestamp when the change occurred
1382
- */
1383
- changed_at: string;
1384
- /**
1385
- * BigInt as string. User ID who made the change
1386
- */
1387
- changed_by_id: string;
1388
- };
1389
- type IssueHistoryResponseDto = {
1390
- /**
1391
- * Issue public ID
1392
- */
1393
- issue_public_id: string;
1394
- /**
1395
- * BigInt as string. Issue internal ID
1396
- */
1397
- issue_id: string;
1398
- /**
1399
- * Array of issue history entries
1400
- */
1401
- history: Array<IssueHistoryDto>;
1402
- };
1403
- type UpdateIssueDto = {
1404
- /**
1405
- * Issue title
1406
- */
1407
- title?: string;
1408
- /**
1409
- * BigInt as string. Asset ID
1410
- */
1411
- asset_id?: string;
1412
- /**
1413
- * BigInt as string. Assigned user ID
1414
- */
1415
- assigned_user_id?: string;
1416
- /**
1417
- * BigInt as string. Assigned group ID
1418
- */
1419
- assigned_group_id?: string;
1420
- /**
1421
- * Issue status
1422
- */
1423
- status?: string;
1424
- /**
1425
- * BigInt as string. Primary action ID
1426
- */
1427
- primary_action_id?: string;
1428
- /**
1429
- * Resolution ID (accepts string or number, will be converted to string)
1430
- */
1431
- resolution_id?: string;
1432
- /**
1433
- * Response score
1434
- */
1435
- response_score?: number;
1436
- /**
1437
- * Reference text
1438
- */
1439
- reference?: string;
1440
- /**
1441
- * Reported at timestamp (Unix epoch in seconds)
1442
- */
1443
- reported_at?: number;
1444
- /**
1445
- * First actioned at timestamp (Unix epoch in seconds)
1446
- */
1447
- first_actioned_at?: number;
1448
- /**
1449
- * Target completion on timestamp (Unix epoch in seconds)
1450
- */
1451
- target_completion_on?: number;
1452
- /**
1453
- * Closed on timestamp (Unix epoch in seconds)
1454
- */
1455
- closed_on?: number;
1456
- /**
1457
- * Project ID
1458
- */
1459
- project_id?: string;
1460
- /**
1461
- * User public ID (UUID) performing the update
1462
- */
1463
- user_id: string;
1464
- };
1465
- type CreateIssueMediaDto = {
1466
- /**
1467
- * Media UUID. Auto-generated if not provided.
1468
- */
1469
- public_id?: string;
1470
- /**
1471
- * Media type
1472
- */
1473
- type: 'photo' | 'audio' | 'video';
1474
- /**
1475
- * S3 path where the file was uploaded
1476
- */
1477
- media_file?: string;
1478
- /**
1479
- * JSON metadata (dimensions, duration, etc.)
1480
- */
1481
- media_info?: string;
1482
- /**
1483
- * Unix timestamp in seconds when media was captured
1484
- */
1485
- captured_at?: number;
1486
- /**
1487
- * Whether the file upload to S3 is complete
1488
- */
1489
- uploaded?: boolean;
1490
- /**
1491
- * BigInt as string. Link to specific issue_history record
1492
- */
1493
- issue_history_id?: string;
1494
- };
1495
- type IssueMediaResponseDto = {
1496
- /**
1497
- * Whether the operation was successful
1498
- */
1499
- success: boolean;
1500
- /**
1501
- * BigInt as string. Database ID of the created issue media record
1502
- */
1503
- issue_media_id: string;
1504
- /**
1505
- * Public UUID of the issue media
1506
- */
1507
- public_id: string;
1508
- };
1509
- type IssueResponseDto = {
1510
- /**
1511
- * Issue public ID (UUID)
1512
- */
1513
- issue_public_id: string;
1514
- /**
1515
- * Issue number
1516
- */
1517
- issue_number: string;
1518
- /**
1519
- * Asset internal ID
1520
- */
1521
- issue_asset_id?: {
1522
- [key: string]: unknown;
1523
- };
1524
- /**
1525
- * Asset number
1526
- */
1527
- issue_asset_number?: {
1528
- [key: string]: unknown;
1529
- };
1530
- /**
1531
- * Asset class name
1532
- */
1533
- issue_asset_class?: {
1534
- [key: string]: unknown;
1535
- };
1536
- /**
1537
- * Asset sub-class name
1538
- */
1539
- issue_asset_sub_class?: {
1540
- [key: string]: unknown;
1541
- };
1542
- /**
1543
- * Asset category name
1544
- */
1545
- issue_asset_category?: {
1546
- [key: string]: unknown;
1547
- };
1548
- /**
1549
- * Inspection name
1550
- */
1551
- issue_inspection_name?: {
1552
- [key: string]: unknown;
1553
- };
1554
- /**
1555
- * Checklist category
1556
- */
1557
- issue_inspection_category?: {
1558
- [key: string]: unknown;
1559
- };
1560
- /**
1561
- * Question title
1562
- */
1563
- issues_question_title?: {
1564
- [key: string]: unknown;
1565
- };
1566
- /**
1567
- * Issue title
1568
- */
1569
- issue_title: string;
1570
- /**
1571
- * Assignee user ID
1572
- */
1573
- issue_assignee_id?: {
1574
- [key: string]: unknown;
1575
- };
1576
- /**
1577
- * Assignee full name
1578
- */
1579
- issue_assignee?: {
1580
- [key: string]: unknown;
1581
- };
1582
- /**
1583
- * Assigned group ID
1584
- */
1585
- issue_assigned_group_id?: {
1586
- [key: string]: unknown;
1587
- };
1588
- /**
1589
- * Assigned group name
1590
- */
1591
- issue_assigned_group?: {
1592
- [key: string]: unknown;
1593
- };
1594
- /**
1595
- * Reported at timestamp
1596
- */
1597
- issue_reported_at?: {
1598
- [key: string]: unknown;
1599
- };
1600
- /**
1601
- * Reference
1602
- */
1603
- issue_reference?: {
1604
- [key: string]: unknown;
1605
- };
1606
- /**
1607
- * Issue status
1608
- */
1609
- issue_status: string;
1610
- /**
1611
- * Primary action ID
1612
- */
1613
- issue_primary_action_id?: {
1614
- [key: string]: unknown;
1615
- };
1616
- /**
1617
- * Primary action name
1618
- */
1619
- issue_primary_action?: {
1620
- [key: string]: unknown;
1621
- };
1622
- /**
1623
- * Response score
1624
- */
1625
- issue_score?: {
1626
- [key: string]: unknown;
1627
- };
1628
- /**
1629
- * Resolution ID
1630
- */
1631
- issue_resolution_id?: {
1632
- [key: string]: unknown;
1633
- };
1634
- /**
1635
- * Resolution reason
1636
- */
1637
- issue_resolution_reason?: {
1638
- [key: string]: unknown;
1639
- };
1640
- /**
1641
- * First actioned at timestamp
1642
- */
1643
- issue_first_actioned_at?: {
1644
- [key: string]: unknown;
1645
- };
1646
- /**
1647
- * Target completion date
1648
- */
1649
- issue_target_completion_date?: {
1650
- [key: string]: unknown;
1651
- };
1652
- /**
1653
- * Closed at timestamp
1654
- */
1655
- issue_closed_at?: {
1656
- [key: string]: unknown;
1657
- };
1658
- /**
1659
- * Response status
1660
- */
1661
- response_status?: {
1662
- [key: string]: unknown;
1663
- };
1664
- /**
1665
- * Created at timestamp
1666
- */
1667
- issue_created_at: string;
1668
- /**
1669
- * Created by user public ID (UUID)
1670
- */
1671
- issue_created_by_id: string;
1672
- /**
1673
- * Created by user full name
1674
- */
1675
- issue_created_by?: {
1676
- [key: string]: unknown;
1677
- };
1678
- /**
1679
- * Modified at timestamp
1680
- */
1681
- issue_modified_at: string;
1682
- /**
1683
- * Modified by user public ID (UUID)
1684
- */
1685
- issue_modified_by_id: string;
1686
- /**
1687
- * Modified by user full name
1688
- */
1689
- issue_modified_by?: {
1690
- [key: string]: unknown;
1691
- };
1692
- };
1693
- type ListIssuesResponseDto = {
1694
- /**
1695
- * List of issues
1696
- */
1697
- data: Array<IssueResponseDto>;
1698
- /**
1699
- * Current page number
1700
- */
1701
- page: number;
1702
- /**
1703
- * Number of results per page
1704
- */
1705
- per_page: number;
1706
- /**
1707
- * Total number of results
1708
- */
1709
- total: number;
1710
- /**
1711
- * Total number of pages
1712
- */
1713
- total_pages: number;
1714
- };
1715
- type UpdateUserPropertyDto = {
1716
- /**
1717
- * Property value (can be string, number, or date depending on property type)
1718
- */
1719
- value: {
1720
- [key: string]: unknown;
1721
- };
1722
- };
1723
- type UserPropertyResponseDto = {
1724
- /**
1725
- * User property ID. Serialized as a string in public API responses (BigInt-safe).
1726
- */
1727
- id: string;
1728
- /**
1729
- * User ID. Serialized as a string in public API responses (BigInt-safe).
1730
- */
1731
- user_id: string;
1732
- /**
1733
- * Property ID (config item ID). Serialized as a string in public API responses (BigInt-safe).
1734
- */
1735
- property_id: string;
1736
- /**
1737
- * Text value (if property type is Text, Email, or Phone)
1738
- */
1739
- text_value: {
1740
- [key: string]: unknown;
1741
- } | null;
1742
- /**
1743
- * Numeric value (if property type is Decimal)
1744
- */
1745
- numeric_value: {
1746
- [key: string]: unknown;
1747
- } | null;
1748
- /**
1749
- * Date value (if property type is Date)
1750
- */
1751
- date_value: {
1752
- [key: string]: unknown;
1753
- } | null;
1754
- /**
1755
- * Update method
1756
- */
1757
- update_method: {
1758
- [key: string]: unknown;
1759
- } | null;
1760
- /**
1761
- * Created timestamp
1762
- */
1763
- created_at: string;
1764
- /**
1765
- * Updated timestamp
1766
- */
1767
- updated_at: string;
1768
- };
1769
- type DeleteUserPropertyResponseDto = {
1770
- /**
1771
- * Success message
1772
- */
1773
- message: string;
1774
- /**
1775
- * Deleted user property ID. Serialized as a string in public API responses (BigInt-safe).
1776
- */
1777
- id: string;
1778
- };
1779
- type UpdateAssetPropertyDto = {
1780
- /**
1781
- * Property value (can be string, number, or date depending on property type)
1782
- */
1783
- value: {
1784
- [key: string]: unknown;
1785
- };
1786
- };
1787
- type AssetPropertyResponseDto = {
1788
- /**
1789
- * Asset property ID. Serialized as a string in public API responses (BigInt-safe).
1790
- */
1791
- id: string;
1792
- /**
1793
- * Asset ID. Serialized as a string in public API responses (BigInt-safe).
1794
- */
1795
- asset_id: string;
1796
- /**
1797
- * Property ID (config item ID). Serialized as a string in public API responses (BigInt-safe).
1798
- */
1799
- property_id: string;
1800
- /**
1801
- * Text value (if property type is Text, Email, or Phone)
1802
- */
1803
- text_value: {
1804
- [key: string]: unknown;
1805
- } | null;
1806
- /**
1807
- * Numeric value (if property type is Decimal)
1808
- */
1809
- numeric_value: {
1810
- [key: string]: unknown;
1811
- } | null;
1812
- /**
1813
- * Date value (if property type is Date)
1814
- */
1815
- date_value: {
1816
- [key: string]: unknown;
1817
- } | null;
1818
- /**
1819
- * Update method
1820
- */
1821
- update_method: {
1822
- [key: string]: unknown;
1823
- } | null;
1824
- /**
1825
- * Created timestamp
1826
- */
1827
- created_at: string;
1828
- /**
1829
- * Updated timestamp
1830
- */
1831
- updated_at: string;
1832
- };
1833
- type DeleteAssetPropertyResponseDto = {
1834
- /**
1835
- * Success message
1836
- */
1837
- message: string;
1838
- /**
1839
- * Deleted asset property ID. Serialized as a string in public API responses (BigInt-safe).
1840
- */
1841
- id: string;
1842
- };
1843
- type EmbeddedAssetClassPropertyDto = {
1844
- /**
1845
- * Custom field-definition ID (config_items.id). String (BigInt-safe).
1846
- */
1847
- property_id: string;
1848
- /**
1849
- * The asset_class_properties value-row ID (for future round-trip into an asset-class-property update). String (BigInt-safe).
1850
- */
1851
- asset_class_property_id: string;
1852
- /**
1853
- * Property name from config_items
1854
- */
1855
- property_name: string;
1856
- /**
1857
- * Text value
1858
- */
1859
- text_value: {
1860
- [key: string]: unknown;
1861
- } | null;
1862
- /**
1863
- * Numeric value
1864
- */
1865
- numeric_value: {
1866
- [key: string]: unknown;
1867
- } | null;
1868
- /**
1869
- * Date value
1870
- */
1871
- date_value: {
1872
- [key: string]: unknown;
1873
- } | null;
1874
- /**
1875
- * Timestamp the value was last updated
1876
- */
1877
- updated_at: {
1878
- [key: string]: unknown;
1879
- } | null;
1880
- /**
1881
- * Public ID (UUID) of the user who last updated this value
1882
- */
1883
- updated_by: {
1884
- [key: string]: unknown;
1885
- } | null;
1886
- /**
1887
- * Name of the user who last updated this value
1888
- */
1889
- updated_by_name: {
1890
- [key: string]: unknown;
1891
- } | null;
1892
- };
1893
- type AssetClassResponseDto = {
1894
- /**
1895
- * Asset class public ID (UUID)
1896
- */
1897
- public_id: string;
1898
- /**
1899
- * Asset class name (make)
1900
- */
1901
- asset_class: string;
1902
- /**
1903
- * Asset sub-class name (model)
1904
- */
1905
- asset_sub_class?: {
1906
- [key: string]: unknown;
1907
- };
1908
- /**
1909
- * Asset category ID. Serialized as a string in public API responses (BigInt-safe).
1910
- */
1911
- asset_category_id?: string | null;
1912
- /**
1913
- * Asset category name
1914
- */
1915
- asset_category_name?: {
1916
- [key: string]: unknown;
1917
- };
1918
- /**
1919
- * Asset class photo file path
1920
- */
1921
- asset_class_photo_file?: {
1922
- [key: string]: unknown;
1923
- };
1924
- /**
1925
- * Asset class photo info
1926
- */
1927
- asset_class_photo_info?: {
1928
- [key: string]: unknown;
1929
- };
1930
- /**
1931
- * Whether on-the-fly creation is enabled
1932
- */
1933
- on_the_fly_enabled: boolean;
1934
- /**
1935
- * Creation timestamp
1936
- */
1937
- created_at: string;
1938
- /**
1939
- * Created by user public ID
1940
- */
1941
- created_by_id: string;
1942
- /**
1943
- * Created by user name
1944
- */
1945
- created_by_name?: {
1946
- [key: string]: unknown;
1947
- };
1948
- /**
1949
- * Last update timestamp
1950
- */
1951
- updated_at: string;
1952
- /**
1953
- * Updated by user public ID
1954
- */
1955
- updated_by_id: string;
1956
- /**
1957
- * Updated by user name
1958
- */
1959
- updated_by_name?: {
1960
- [key: string]: unknown;
1961
- };
1962
- /**
1963
- * Embedded custom property values for this asset class. Uniform shape across entities (property_id = field definition, asset_class_property_id = value row). Empty when the class has no custom properties.
1964
- */
1965
- asset_class_properties: Array<EmbeddedAssetClassPropertyDto>;
1966
- };
1967
- type AssetClassListResponseDto = {
1968
- /**
1969
- * List of asset classes
1970
- */
1971
- data: Array<AssetClassResponseDto>;
1972
- /**
1973
- * Total number of records
1974
- */
1975
- total: number;
1976
- /**
1977
- * Current page number
1978
- */
1979
- page: number;
1980
- /**
1981
- * Items per page
1982
- */
1983
- per_page: number;
1984
- /**
1985
- * Total number of pages
1986
- */
1987
- total_pages: number;
1988
- };
1989
- type CreateAssetClassDto = {
1990
- /**
1991
- * Asset class name (make)
1992
- */
1993
- asset_class: string;
1994
- /**
1995
- * Asset sub-class name (model)
1996
- */
1997
- asset_sub_class?: string;
1998
- /**
1999
- * BigInt as string. Asset category ID (from config_items table)
2000
- */
2001
- asset_category_id?: string;
2002
- /**
2003
- * Asset class photo file path
2004
- */
2005
- asset_class_photo_file?: string;
2006
- /**
2007
- * Asset class photo info (JSON string)
2008
- */
2009
- asset_class_photo_info?: string;
2010
- /**
2011
- * Whether on-the-fly creation is enabled
2012
- */
2013
- on_the_fly_enabled?: boolean;
2014
- };
2015
- type UpdateAssetClassDto = {
2016
- /**
2017
- * Asset class name (make)
2018
- */
2019
- asset_class?: string;
2020
- /**
2021
- * Asset sub-class name (model)
2022
- */
2023
- asset_sub_class?: string;
2024
- /**
2025
- * BigInt as string. Asset category ID (from config_items table)
2026
- */
2027
- asset_category_id?: string;
2028
- /**
2029
- * Asset class photo file path
2030
- */
2031
- asset_class_photo_file?: string;
2032
- /**
2033
- * Asset class photo info (JSON string)
2034
- */
2035
- asset_class_photo_info?: string;
2036
- /**
2037
- * Whether on-the-fly creation is enabled
2038
- */
2039
- on_the_fly_enabled?: boolean;
2040
- };
2041
- type ChecklistSummaryDto = {
2042
- /**
2043
- * Checklist ID (numeric string)
2044
- */
2045
- id: string;
2046
- /**
2047
- * Company ID
2048
- */
2049
- company_id: string;
2050
- /**
2051
- * Checklist name
2052
- */
2053
- name: string;
2054
- /**
2055
- * Checklist type
2056
- */
2057
- type: string;
2058
- /**
2059
- * Root checklist ID grouping all versions (null for a v1 with no prior versions). Numeric string.
2060
- */
2061
- root_id: {
2062
- [key: string]: unknown;
2063
- } | null;
2064
- /**
2065
- * Version number
2066
- */
2067
- version: number;
2068
- /**
2069
- * Version notes
2070
- */
2071
- version_notes: {
2072
- [key: string]: unknown;
2073
- } | null;
2074
- /**
2075
- * Category ID
2076
- */
2077
- category_id: {
2078
- [key: string]: unknown;
2079
- } | null;
2080
- /**
2081
- * Category name
2082
- */
2083
- category_name: {
2084
- [key: string]: unknown;
2085
- } | null;
2086
- /**
2087
- * When this version was published
2088
- */
2089
- published_at: {
2090
- [key: string]: unknown;
2091
- } | null;
2092
- created_at: string;
2093
- updated_at: string;
2094
- };
2095
- type ListChecklistsResponseDto = {
2096
- /**
2097
- * List of checklists
2098
- */
2099
- data: Array<ChecklistSummaryDto>;
2100
- /**
2101
- * Current page number
2102
- */
2103
- page: number;
2104
- /**
2105
- * Number of results per page
2106
- */
2107
- per_page: number;
2108
- /**
2109
- * Total number of results
2110
- */
2111
- total: number;
2112
- /**
2113
- * Total number of pages
2114
- */
2115
- total_pages: number;
2116
- };
2117
- type ConfigTableDto = {
2118
- /**
2119
- * Config table ID (numeric string)
2120
- */
2121
- id: string;
2122
- /**
2123
- * Display name
2124
- */
2125
- name: string;
2126
- /**
2127
- * Stable class/key identifying the table purpose
2128
- */
2129
- class: string;
2130
- /**
2131
- * Whether items in this table are content-translated
2132
- */
2133
- translate_content: boolean;
2134
- created_at: string;
2135
- updated_at: string;
2136
- };
2137
- type ListConfigTablesResponseDto = {
2138
- /**
2139
- * Config tables
2140
- */
2141
- data: Array<ConfigTableDto>;
2142
- page: number;
2143
- per_page: number;
2144
- total: number;
2145
- total_pages: number;
2146
- };
2147
- type ConfigItemDto = {
2148
- /**
2149
- * Config item ID (numeric string)
2150
- */
2151
- id: string;
2152
- /**
2153
- * Parent config table ID
2154
- */
2155
- config_table_id: string;
2156
- /**
2157
- * Parent config table name
2158
- */
2159
- config_table_name: string;
2160
- /**
2161
- * Parent config table class
2162
- */
2163
- config_table_class: string;
2164
- /**
2165
- * Item value / name
2166
- */
2167
- item: string;
2168
- /**
2169
- * Description
2170
- */
2171
- description: {
2172
- [key: string]: unknown;
2173
- } | null;
2174
- /**
2175
- * Free-form options (JSON), e.g. property metadata
2176
- */
2177
- options: {
2178
- [key: string]: unknown;
2179
- } | null;
2180
- /**
2181
- * Image file key
2182
- */
2183
- image_file: {
2184
- [key: string]: unknown;
2185
- } | null;
2186
- created_at: string;
2187
- updated_at: string;
2188
- };
2189
- type ListConfigItemsResponseDto = {
2190
- /**
2191
- * Config items
2192
- */
2193
- data: Array<ConfigItemDto>;
2194
- page: number;
2195
- per_page: number;
2196
- total: number;
2197
- total_pages: number;
2198
- };
2199
- type CreateConfigItemDto = {
2200
- /**
2201
- * Parent config table ID (numeric string, from GET /public/config-table/list). Must belong to the authenticated company.
2202
- */
2203
- config_table_id: string;
2204
- /**
2205
- * Item value / name
2206
- */
2207
- item: string;
2208
- /**
2209
- * Description
2210
- */
2211
- description?: string;
2212
- };
2213
- type UpdateConfigItemDto = {
1313
+ target_completion_on?: number;
2214
1314
  /**
2215
- * Item value / name
1315
+ * Closed on timestamp (Unix epoch in seconds)
2216
1316
  */
2217
- item?: string;
1317
+ closed_on?: number;
2218
1318
  /**
2219
- * Description (pass null to clear)
1319
+ * Project ID
2220
1320
  */
2221
- description?: {
2222
- [key: string]: unknown;
2223
- } | null;
2224
- };
2225
- type SiteResponseDto = {
1321
+ project_id?: string;
2226
1322
  /**
2227
- * Site public ID (UUID)
1323
+ * User public ID (UUID) performing the update
2228
1324
  */
2229
- site_public_id: string;
1325
+ user_id: string;
1326
+ };
1327
+ type UpdateSiteDto = {
2230
1328
  /**
2231
1329
  * Site name
2232
1330
  */
2233
- site_name: string;
1331
+ name?: string;
2234
1332
  /**
2235
- * Base language
1333
+ * Base language for the site
2236
1334
  */
2237
- site_base_language: string;
1335
+ base_language?: string;
2238
1336
  /**
2239
- * Logo file path
1337
+ * BigInt as string. Site category ID (config_items.id)
2240
1338
  */
2241
- site_logo_file?: {
2242
- [key: string]: unknown;
2243
- };
1339
+ category_id?: string;
2244
1340
  /**
2245
- * Site category name
1341
+ * Asset selection method
2246
1342
  */
2247
- site_category?: {
2248
- [key: string]: unknown;
2249
- };
1343
+ asset_selection_method?: string;
2250
1344
  /**
2251
- * Site category ID. Serialized as a string in public API responses (BigInt-safe).
1345
+ * Asset affix
2252
1346
  */
2253
- site_category_id?: string | null;
1347
+ asset_affix?: string;
2254
1348
  /**
2255
- * Asset selection method
1349
+ * Asset affix position (prefix or suffix)
2256
1350
  */
2257
- site_asset_selection_method: string;
1351
+ asset_affix_position?: string;
1352
+ };
1353
+ type UpdateUserPropertyDto = {
2258
1354
  /**
2259
- * Asset affix
1355
+ * Property value (can be string, number, or date depending on property type)
2260
1356
  */
2261
- site_asset_affix?: {
1357
+ value: {
2262
1358
  [key: string]: unknown;
2263
1359
  };
1360
+ };
1361
+ type UserPropertyResponseDto = {
2264
1362
  /**
2265
- * Asset affix position
1363
+ * User property ID. Serialized as a string in public API responses (BigInt-safe).
2266
1364
  */
2267
- site_asset_affix_position?: {
2268
- [key: string]: unknown;
2269
- };
1365
+ id: string;
2270
1366
  /**
2271
- * Created at timestamp
1367
+ * User ID. Serialized as a string in public API responses (BigInt-safe).
2272
1368
  */
2273
- site_created_at: string;
1369
+ user_id: string;
2274
1370
  /**
2275
- * Created by user public ID
1371
+ * Property ID (config item ID). Serialized as a string in public API responses (BigInt-safe).
2276
1372
  */
2277
- site_created_by: string;
1373
+ property_id: string;
2278
1374
  /**
2279
- * Created by user name
1375
+ * Text value (if property type is Text, Email, or Phone)
2280
1376
  */
2281
- site_created_by_name?: {
1377
+ text_value: {
2282
1378
  [key: string]: unknown;
2283
- };
1379
+ } | null;
2284
1380
  /**
2285
- * Updated at timestamp
1381
+ * Numeric value (if property type is Decimal)
2286
1382
  */
2287
- site_updated_at: string;
1383
+ numeric_value: {
1384
+ [key: string]: unknown;
1385
+ } | null;
2288
1386
  /**
2289
- * Updated by user public ID
1387
+ * Date value (if property type is Date)
2290
1388
  */
2291
- site_updated_by: string;
1389
+ date_value: {
1390
+ [key: string]: unknown;
1391
+ } | null;
2292
1392
  /**
2293
- * Updated by user name
1393
+ * Update method
2294
1394
  */
2295
- site_updated_by_name?: {
1395
+ update_method: {
2296
1396
  [key: string]: unknown;
2297
- };
2298
- };
2299
- type ListSitesResponseDto = {
1397
+ } | null;
2300
1398
  /**
2301
- * List of sites
1399
+ * Created timestamp
2302
1400
  */
2303
- data: Array<SiteResponseDto>;
1401
+ created_at: string;
2304
1402
  /**
2305
- * Total number of sites
1403
+ * Updated timestamp
2306
1404
  */
2307
- total: number;
1405
+ updated_at: string;
1406
+ };
1407
+ type UserResponseDto = {
2308
1408
  /**
2309
- * Current page
1409
+ * User public ID (UUID)
2310
1410
  */
2311
- page: number;
1411
+ user_public_id: string;
2312
1412
  /**
2313
- * Items per page
1413
+ * User first name
2314
1414
  */
2315
- per_page: number;
1415
+ user_first_name: string;
2316
1416
  /**
2317
- * Total number of pages
1417
+ * User last name
2318
1418
  */
2319
- total_pages: number;
2320
- };
2321
- type CreateSiteDto = {
1419
+ user_last_name: string;
2322
1420
  /**
2323
- * Site name
1421
+ * User email address
2324
1422
  */
2325
- name: string;
1423
+ user_email: {
1424
+ [key: string]: unknown;
1425
+ } | null;
2326
1426
  /**
2327
- * Base language for the site
1427
+ * Profile photo URL
2328
1428
  */
2329
- base_language?: string;
1429
+ user_profile_photo: {
1430
+ [key: string]: unknown;
1431
+ } | null;
2330
1432
  /**
2331
- * BigInt as string. Site category ID (config_items.id)
1433
+ * Username (typically email)
2332
1434
  */
2333
- category_id?: string;
1435
+ user_user_name: {
1436
+ [key: string]: unknown;
1437
+ } | null;
2334
1438
  /**
2335
- * Asset selection method
1439
+ * Employee number
2336
1440
  */
2337
- asset_selection_method?: string;
1441
+ user_employee_number: {
1442
+ [key: string]: unknown;
1443
+ } | null;
2338
1444
  /**
2339
- * Asset affix
1445
+ * User PIN code
2340
1446
  */
2341
- asset_affix?: string;
1447
+ user_pin: {
1448
+ [key: string]: unknown;
1449
+ } | null;
2342
1450
  /**
2343
- * Asset affix position (prefix or suffix)
1451
+ * Contact phone number
2344
1452
  */
2345
- asset_affix_position?: string;
1453
+ user_contact_number: {
1454
+ [key: string]: unknown;
1455
+ } | null;
2346
1456
  /**
2347
- * Public ID (UUID) - if not provided, will be generated
1457
+ * Last login timestamp
2348
1458
  */
2349
- public_id?: string;
2350
- };
2351
- type UpdateSiteDto = {
1459
+ user_last_login_timestamp: {
1460
+ [key: string]: unknown;
1461
+ } | null;
2352
1462
  /**
2353
- * Site name
1463
+ * User creation timestamp
2354
1464
  */
2355
- name?: string;
1465
+ user_created: string;
2356
1466
  /**
2357
- * Base language for the site
1467
+ * Public ID of user who created this user
2358
1468
  */
2359
- base_language?: string;
1469
+ user_created_by: {
1470
+ [key: string]: unknown;
1471
+ } | null;
2360
1472
  /**
2361
- * BigInt as string. Site category ID (config_items.id)
1473
+ * Name of user who created this user
2362
1474
  */
2363
- category_id?: string;
1475
+ user_created_by_name: {
1476
+ [key: string]: unknown;
1477
+ } | null;
2364
1478
  /**
2365
- * Asset selection method
1479
+ * Last modification timestamp
2366
1480
  */
2367
- asset_selection_method?: string;
1481
+ user_modified: string;
2368
1482
  /**
2369
- * Asset affix
1483
+ * Public ID of user who last modified this user
2370
1484
  */
2371
- asset_affix?: string;
1485
+ user_modified_by: {
1486
+ [key: string]: unknown;
1487
+ } | null;
2372
1488
  /**
2373
- * Asset affix position (prefix or suffix)
1489
+ * Name of user who last modified this user
2374
1490
  */
2375
- asset_affix_position?: string;
2376
- };
2377
- type DeleteSiteResponseDto = {
1491
+ user_modified_by_name: {
1492
+ [key: string]: unknown;
1493
+ } | null;
2378
1494
  /**
2379
- * Success message
1495
+ * Whether user is deleted
2380
1496
  */
2381
- message: string;
1497
+ user_deleted: boolean;
2382
1498
  /**
2383
- * Deleted site public ID
1499
+ * User properties
2384
1500
  */
2385
- site_public_id: string;
1501
+ user_properties: Array<EmbeddedUserPropertyDto>;
2386
1502
  };
2387
1503
  type AssetControllerCreateAssetPublicData = {
2388
1504
  /**
@@ -3341,66 +2457,6 @@ type InspectionControllerGetPublicInspectionResponses = {
3341
2457
  };
3342
2458
  };
3343
2459
  type InspectionControllerGetPublicInspectionResponse = InspectionControllerGetPublicInspectionResponses[keyof InspectionControllerGetPublicInspectionResponses];
3344
- type InspectionControllerSubmitInspectionPublicData = {
3345
- /**
3346
- * Complete inspection data with nested structure
3347
- */
3348
- body: SubmitInspectionDto;
3349
- headers?: {
3350
- /**
3351
- * Opaque client-generated key (any string up to 255 chars, ULID or UUID recommended) that makes this POST/PATCH safe to retry. The server stores the first successful response under this key for 24 hours; retries with the same key replay the stored response and set `Idempotent-Replayed: true`. Reusing the key with a different body returns `409 idempotency_key_conflict`. Omit on read-only GETs — they are already idempotent.
3352
- */
3353
- 'Idempotency-Key'?: string;
3354
- };
3355
- path?: never;
3356
- query?: never;
3357
- url: '/public/inspection/submit';
3358
- };
3359
- type InspectionControllerSubmitInspectionPublicErrors = {
3360
- /**
3361
- * Validation failed or the request was malformed. The response body will use `code: validation_error` (with `details[]` populated when the failure can be pinpointed to specific fields) or the more generic `code: bad_request`.
3362
- */
3363
- 400: ApiErrorResponse;
3364
- /**
3365
- * The Bearer token is missing, malformed, or no longer valid. Verify the `Authorization` header is set to `Bearer wk_…` and that the key has not been revoked or rotated out.
3366
- */
3367
- 401: ApiErrorResponse;
3368
- /**
3369
- * The Bearer token authenticated successfully but cannot perform this action. Two distinct codes share this status: `forbidden` (missing permission scope) and `ip_not_allowed` (source IP not in the API key's allowlist).
3370
- */
3371
- 403: ApiErrorResponse;
3372
- /**
3373
- * No resource was found at the requested location, or a referenced resource (`publicId` in the body) doesn't exist or is not visible to the calling company.
3374
- */
3375
- 404: ApiErrorResponse;
3376
- /**
3377
- * The request conflicts with current state. Common cases: a unique business identifier already exists (`conflict`), or an `Idempotency-Key` was reused with a different request body (`idempotency_key_conflict`).
3378
- */
3379
- 409: ApiErrorResponse;
3380
- /**
3381
- * Rate limit exceeded for this API key. Inspect `X-RateLimit-Reset` and `Retry-After` to find out when the window resets.
3382
- */
3383
- 429: ApiErrorResponse;
3384
- /**
3385
- * Something went wrong on our side. The `request_id` field in the response body matches the entry in our logs — include it when reporting the issue.
3386
- */
3387
- 500: ApiErrorResponse;
3388
- };
3389
- type InspectionControllerSubmitInspectionPublicError = InspectionControllerSubmitInspectionPublicErrors[keyof InspectionControllerSubmitInspectionPublicErrors];
3390
- type InspectionControllerSubmitInspectionPublicResponses = {
3391
- /**
3392
- * Inspection successfully submitted
3393
- */
3394
- 201: {
3395
- success?: boolean;
3396
- inspection_public_id?: string;
3397
- /**
3398
- * BigInt-safe stringified ID of the created inspection.
3399
- */
3400
- inspection_id?: string;
3401
- };
3402
- };
3403
- type InspectionControllerSubmitInspectionPublicResponse = InspectionControllerSubmitInspectionPublicResponses[keyof InspectionControllerSubmitInspectionPublicResponses];
3404
2460
  type IssueControllerListIssuesData = {
3405
2461
  body?: never;
3406
2462
  path?: never;
@@ -4678,7 +3734,7 @@ type SiteControllerUpdateSiteResponses = {
4678
3734
  };
4679
3735
  type SiteControllerUpdateSiteResponse = SiteControllerUpdateSiteResponses[keyof SiteControllerUpdateSiteResponses];
4680
3736
  type ClientOptions = {
4681
- baseUrl: 'https://dev-api.wakata.ai' | (string & {});
3737
+ baseUrl: 'https://api.wakata.ai' | (string & {});
4682
3738
  };
4683
3739
 
4684
3740
  type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options$1<TData, ThrowOnError> & {
@@ -4946,16 +4002,6 @@ declare const inspectionControllerGetPublicInspection: <ThrowOnError extends boo
4946
4002
  updated_by_name?: string | null;
4947
4003
  }>;
4948
4004
  }, ApiErrorResponse, ThrowOnError>;
4949
- /**
4950
- * @deprecated
4951
- * Submit inspection with nested data (deprecated)
4952
- * DEPRECATED — inspections are created only by the Wakata app; this public create path is being retired (WAK-00560). Do not build new integrations against it. Submits a complete inspection with nested responses, response options, extra infos, and media. Uses PostgreSQL transactions to ensure atomicity. Checks if inspection already exists by public_id to avoid duplicates. Handles nested response tree structure with left/right values. Timestamps in input are Unix epoch (milliseconds for inspection times, seconds for others). Requires Bearer token authentication. Internal tokens bypass permission check, public tokens require inspection:create permission. Supports `Idempotency-Key` for safe retries.
4953
- */
4954
- declare const inspectionControllerSubmitInspectionPublic: <ThrowOnError extends boolean = false>(options: Options<InspectionControllerSubmitInspectionPublicData, ThrowOnError>) => _hey_api_client_fetch.RequestResult<{
4955
- success?: boolean;
4956
- inspection_public_id?: string;
4957
- inspection_id?: string;
4958
- }, ApiErrorResponse, ThrowOnError>;
4959
4005
  /**
4960
4006
  * List issues
4961
4007
  * Returns a paginated list of issues for the authenticated company. Supports filtering by various fields and sorting. Requires Bearer token authentication with issue:read permission.
@@ -5116,7 +4162,6 @@ interface SitesResource {
5116
4162
  interface InspectionsResource {
5117
4163
  list: (options?: WakataMethodOptions<Parameters<typeof inspectionControllerListInspections>[0] extends infer O ? O : never>) => Promise<Awaited<ReturnType<typeof inspectionControllerListInspections>>['data']>;
5118
4164
  getDetail: (options: WakataMethodOptions<Parameters<typeof inspectionControllerGetPublicInspection>[0]>) => Promise<Awaited<ReturnType<typeof inspectionControllerGetPublicInspection>>['data']>;
5119
- submit: (options: WakataMethodOptions<Parameters<typeof inspectionControllerSubmitInspectionPublic>[0]>) => Promise<Awaited<ReturnType<typeof inspectionControllerSubmitInspectionPublic>>['data']>;
5120
4165
  }
5121
4166
  interface ChecklistsResource {
5122
4167
  list: (options?: WakataMethodOptions<Parameters<typeof checklistControllerListChecklists>[0] extends infer O ? O : never>) => Promise<Awaited<ReturnType<typeof checklistControllerListChecklists>>['data']>;
@@ -5337,8 +4382,8 @@ declare function generateIdempotencyKey(): string;
5337
4382
  * See README.md for usage.
5338
4383
  */
5339
4384
  declare const PACKAGE_NAME = "@wakata-dev/api-client";
5340
- declare const PACKAGE_VERSION = "0.3.0";
4385
+ declare const PACKAGE_VERSION = "0.3.1";
5341
4386
  /** Default base URL for the Wakata Public API (production). */
5342
4387
  declare const DEFAULT_BASE_URL = "https://api.wakata.ai/api/v1";
5343
4388
 
5344
- export { type ApiErrorBody, type ApiErrorDetail, type ApiErrorResponse, type AssetClassControllerCreateAssetClassData, type AssetClassControllerCreateAssetClassError, type AssetClassControllerCreateAssetClassErrors, type AssetClassControllerCreateAssetClassResponse, type AssetClassControllerCreateAssetClassResponses, type AssetClassControllerGetAssetClassListData, type AssetClassControllerGetAssetClassListError, type AssetClassControllerGetAssetClassListErrors, type AssetClassControllerGetAssetClassListResponse, type AssetClassControllerGetAssetClassListResponses, type AssetClassControllerUpdateAssetClassData, type AssetClassControllerUpdateAssetClassError, type AssetClassControllerUpdateAssetClassErrors, type AssetClassControllerUpdateAssetClassResponse, type AssetClassControllerUpdateAssetClassResponses, type AssetClassListResponseDto, type AssetClassResponseDto, type AssetControllerCreateAssetPublicData, type AssetControllerCreateAssetPublicError, type AssetControllerCreateAssetPublicErrors, type AssetControllerCreateAssetPublicResponse, type AssetControllerCreateAssetPublicResponses, type AssetControllerGetAssetData, type AssetControllerGetAssetError, type AssetControllerGetAssetErrors, type AssetControllerGetAssetResponse, type AssetControllerGetAssetResponses, type AssetControllerListAssetsData, type AssetControllerListAssetsError, type AssetControllerListAssetsErrors, type AssetControllerListAssetsResponse, type AssetControllerListAssetsResponses, type AssetControllerUpdateAssetData, type AssetControllerUpdateAssetError, type AssetControllerUpdateAssetErrors, type AssetControllerUpdateAssetResponse, type AssetControllerUpdateAssetResponses, type AssetPropertyControllerDeleteAssetPropertyData, type AssetPropertyControllerDeleteAssetPropertyError, type AssetPropertyControllerDeleteAssetPropertyErrors, type AssetPropertyControllerDeleteAssetPropertyResponse, type AssetPropertyControllerDeleteAssetPropertyResponses, type AssetPropertyControllerUpdateAssetPropertyData, type AssetPropertyControllerUpdateAssetPropertyError, type AssetPropertyControllerUpdateAssetPropertyErrors, type AssetPropertyControllerUpdateAssetPropertyResponse, type AssetPropertyControllerUpdateAssetPropertyResponses, type AssetPropertyResponseDto, type AssetsResource, type ChangePinDto, type ChecklistControllerGetChecklistData, type ChecklistControllerGetChecklistError, type ChecklistControllerGetChecklistErrors, type ChecklistControllerGetChecklistResponse, type ChecklistControllerGetChecklistResponses, type ChecklistControllerListChecklistsData, type ChecklistControllerListChecklistsError, type ChecklistControllerListChecklistsErrors, type ChecklistControllerListChecklistsResponse, type ChecklistControllerListChecklistsResponses, type ChecklistSummaryDto, type ClientOptions, type ConfigItemDto, type ConfigTableDto, type CreateAssetClassDto, type CreateAssetDto, type CreateConfigItemDto, type CreateInspectionDto, type CreateIssueMediaDto, type CreateSiteDto, type CreateTokenDto, DEFAULT_BASE_URL, type DeleteAssetPropertyResponseDto, type DeleteInspectionDto, type DeleteSiteResponseDto, type DeleteUserPropertyResponseDto, type DownloadResponseDto, type EmbeddedAssetClassPropertyDto, type EmbeddedAssetPropertyDto, type EmbeddedUserPropertyDto, type ErrorDetail, type ExtraInfoDto, type InspectionControllerGetPublicInspectionData, type InspectionControllerGetPublicInspectionError, type InspectionControllerGetPublicInspectionErrors, type InspectionControllerGetPublicInspectionResponse, type InspectionControllerGetPublicInspectionResponses, type InspectionControllerListInspectionsData, type InspectionControllerListInspectionsError, type InspectionControllerListInspectionsErrors, type InspectionControllerListInspectionsResponse, type InspectionControllerListInspectionsResponses, type InspectionControllerSubmitInspectionPublicData, type InspectionControllerSubmitInspectionPublicError, type InspectionControllerSubmitInspectionPublicErrors, type InspectionControllerSubmitInspectionPublicResponse, type InspectionControllerSubmitInspectionPublicResponses, type InspectionResponseDto, type InspectionsResource, type IssueControllerGetIssueHistoryPublicData, type IssueControllerGetIssueHistoryPublicError, type IssueControllerGetIssueHistoryPublicErrors, type IssueControllerGetIssueHistoryPublicResponse, type IssueControllerGetIssueHistoryPublicResponses, type IssueControllerGetIssuePublicData, type IssueControllerGetIssuePublicError, type IssueControllerGetIssuePublicErrors, type IssueControllerGetIssuePublicResponse, type IssueControllerGetIssuePublicResponses, type IssueControllerListIssuesData, type IssueControllerListIssuesError, type IssueControllerListIssuesErrors, type IssueControllerListIssuesResponse, type IssueControllerListIssuesResponses, type IssueControllerUpdateIssuePublicData, type IssueControllerUpdateIssuePublicError, type IssueControllerUpdateIssuePublicErrors, type IssueControllerUpdateIssuePublicResponse, type IssueControllerUpdateIssuePublicResponses, type IssueHistoryDto, type IssueHistoryResponseDto, type IssueMediaResponseDto, type IssueResponseDto, type IssuesResource, type ListChecklistsResponseDto, type ListConfigItemsResponseDto, type ListConfigTablesResponseDto, type ListInspectionsResponseDto, type ListIssuesResponseDto, type ListSitesResponseDto, type MediaDto, PACKAGE_NAME, PACKAGE_VERSION, type PublicConfigControllerCreateConfigItemData, type PublicConfigControllerCreateConfigItemError, type PublicConfigControllerCreateConfigItemErrors, type PublicConfigControllerCreateConfigItemResponse, type PublicConfigControllerCreateConfigItemResponses, type PublicConfigControllerDeleteConfigItemData, type PublicConfigControllerDeleteConfigItemError, type PublicConfigControllerDeleteConfigItemErrors, type PublicConfigControllerDeleteConfigItemResponse, type PublicConfigControllerDeleteConfigItemResponses, type PublicConfigControllerGetConfigItemData, type PublicConfigControllerGetConfigItemError, type PublicConfigControllerGetConfigItemErrors, type PublicConfigControllerGetConfigItemResponse, type PublicConfigControllerGetConfigItemResponses, type PublicConfigControllerListConfigItemsData, type PublicConfigControllerListConfigItemsError, type PublicConfigControllerListConfigItemsErrors, type PublicConfigControllerListConfigItemsResponse, type PublicConfigControllerListConfigItemsResponses, type PublicConfigControllerListConfigTablesData, type PublicConfigControllerListConfigTablesError, type PublicConfigControllerListConfigTablesErrors, type PublicConfigControllerListConfigTablesResponse, type PublicConfigControllerListConfigTablesResponses, type PublicConfigControllerUpdateConfigItemData, type PublicConfigControllerUpdateConfigItemError, type PublicConfigControllerUpdateConfigItemErrors, type PublicConfigControllerUpdateConfigItemResponse, type PublicConfigControllerUpdateConfigItemResponses, type PublicCreateAssetDto, type RegisterDeviceDto, type RegisterDeviceResponseDto, type RepeatInspectionDto, type RequestDownloadDto, type RequestLogUploadDto, type RequestUploadDto, type ResponseDto, type ResponseOptionDto, type ResumeInspectionDto, type SendCredentialsDto, type SiteControllerCreateSiteData, type SiteControllerCreateSiteError, type SiteControllerCreateSiteErrors, type SiteControllerCreateSiteResponse, type SiteControllerCreateSiteResponses, type SiteControllerDeleteSiteData, type SiteControllerDeleteSiteError, type SiteControllerDeleteSiteErrors, type SiteControllerDeleteSiteResponse, type SiteControllerDeleteSiteResponses, type SiteControllerListSitesData, type SiteControllerListSitesError, type SiteControllerListSitesErrors, type SiteControllerListSitesResponse, type SiteControllerListSitesResponses, type SiteControllerUpdateSiteData, type SiteControllerUpdateSiteError, type SiteControllerUpdateSiteErrors, type SiteControllerUpdateSiteResponse, type SiteControllerUpdateSiteResponses, type SiteResponseDto, type SitesResource, type SubmitInspectionDto, type TokenCompanyDto, type TokenResponseDto, type TokenUserDto, type UpdateAssetClassDto, type UpdateAssetDto, type UpdateAssetPropertyDto, type UpdateConfigItemDto, type UpdateInspectionDto, type UpdateIssueDto, type UpdateSiteDto, type UpdateUserPropertyDto, type UploadCredentialsResponseDto, type UserControllerCreateUserData, type UserControllerCreateUserError, type UserControllerCreateUserErrors, type UserControllerCreateUserResponse, type UserControllerCreateUserResponses, type UserControllerGetUserData, type UserControllerGetUserError, type UserControllerGetUserErrors, type UserControllerGetUserResponse, type UserControllerGetUserResponses, type UserControllerListUsersData, type UserControllerListUsersError, type UserControllerListUsersErrors, type UserControllerListUsersResponse, type UserControllerListUsersResponses, type UserControllerUpdateUserData, type UserControllerUpdateUserError, type UserControllerUpdateUserErrors, type UserControllerUpdateUserResponse, type UserControllerUpdateUserResponses, type UserPropertiesResource, type UserPropertyControllerDeleteUserPropertyData, type UserPropertyControllerDeleteUserPropertyError, type UserPropertyControllerDeleteUserPropertyErrors, type UserPropertyControllerDeleteUserPropertyResponse, type UserPropertyControllerDeleteUserPropertyResponses, type UserPropertyControllerUpdateUserPropertyData, type UserPropertyControllerUpdateUserPropertyError, type UserPropertyControllerUpdateUserPropertyErrors, type UserPropertyControllerUpdateUserPropertyResponse, type UserPropertyControllerUpdateUserPropertyResponses, type UserPropertyResponseDto, type UserResponseDto, type UsersResource, WakataApiError, WakataAuthError, WakataClient, type WakataClientOptions, WakataConflictError, type WakataErrorEnvelope, WakataNotFoundError, WakataPermissionError, WakataRateLimitError, WakataServerError, WakataValidationError, generateIdempotencyKey, mapApiError };
4389
+ export { type ApiErrorBody, type ApiErrorDetail, type ApiErrorResponse, type AssetClassControllerCreateAssetClassData, type AssetClassControllerCreateAssetClassError, type AssetClassControllerCreateAssetClassErrors, type AssetClassControllerCreateAssetClassResponse, type AssetClassControllerCreateAssetClassResponses, type AssetClassControllerGetAssetClassListData, type AssetClassControllerGetAssetClassListError, type AssetClassControllerGetAssetClassListErrors, type AssetClassControllerGetAssetClassListResponse, type AssetClassControllerGetAssetClassListResponses, type AssetClassControllerUpdateAssetClassData, type AssetClassControllerUpdateAssetClassError, type AssetClassControllerUpdateAssetClassErrors, type AssetClassControllerUpdateAssetClassResponse, type AssetClassControllerUpdateAssetClassResponses, type AssetClassListResponseDto, type AssetClassResponseDto, type AssetControllerCreateAssetPublicData, type AssetControllerCreateAssetPublicError, type AssetControllerCreateAssetPublicErrors, type AssetControllerCreateAssetPublicResponse, type AssetControllerCreateAssetPublicResponses, type AssetControllerGetAssetData, type AssetControllerGetAssetError, type AssetControllerGetAssetErrors, type AssetControllerGetAssetResponse, type AssetControllerGetAssetResponses, type AssetControllerListAssetsData, type AssetControllerListAssetsError, type AssetControllerListAssetsErrors, type AssetControllerListAssetsResponse, type AssetControllerListAssetsResponses, type AssetControllerUpdateAssetData, type AssetControllerUpdateAssetError, type AssetControllerUpdateAssetErrors, type AssetControllerUpdateAssetResponse, type AssetControllerUpdateAssetResponses, type AssetPropertyControllerDeleteAssetPropertyData, type AssetPropertyControllerDeleteAssetPropertyError, type AssetPropertyControllerDeleteAssetPropertyErrors, type AssetPropertyControllerDeleteAssetPropertyResponse, type AssetPropertyControllerDeleteAssetPropertyResponses, type AssetPropertyControllerUpdateAssetPropertyData, type AssetPropertyControllerUpdateAssetPropertyError, type AssetPropertyControllerUpdateAssetPropertyErrors, type AssetPropertyControllerUpdateAssetPropertyResponse, type AssetPropertyControllerUpdateAssetPropertyResponses, type AssetPropertyResponseDto, type AssetsResource, type ChecklistControllerGetChecklistData, type ChecklistControllerGetChecklistError, type ChecklistControllerGetChecklistErrors, type ChecklistControllerGetChecklistResponse, type ChecklistControllerGetChecklistResponses, type ChecklistControllerListChecklistsData, type ChecklistControllerListChecklistsError, type ChecklistControllerListChecklistsErrors, type ChecklistControllerListChecklistsResponse, type ChecklistControllerListChecklistsResponses, type ChecklistSummaryDto, type ClientOptions, type ConfigItemDto, type ConfigTableDto, type CreateAssetClassDto, type CreateConfigItemDto, type CreateSiteDto, DEFAULT_BASE_URL, type DeleteAssetPropertyResponseDto, type DeleteSiteResponseDto, type DeleteUserPropertyResponseDto, type EmbeddedAssetClassPropertyDto, type EmbeddedAssetPropertyDto, type EmbeddedUserPropertyDto, type ErrorDetail, type InspectionControllerGetPublicInspectionData, type InspectionControllerGetPublicInspectionError, type InspectionControllerGetPublicInspectionErrors, type InspectionControllerGetPublicInspectionResponse, type InspectionControllerGetPublicInspectionResponses, type InspectionControllerListInspectionsData, type InspectionControllerListInspectionsError, type InspectionControllerListInspectionsErrors, type InspectionControllerListInspectionsResponse, type InspectionControllerListInspectionsResponses, type InspectionResponseDto, type InspectionsResource, type IssueControllerGetIssueHistoryPublicData, type IssueControllerGetIssueHistoryPublicError, type IssueControllerGetIssueHistoryPublicErrors, type IssueControllerGetIssueHistoryPublicResponse, type IssueControllerGetIssueHistoryPublicResponses, type IssueControllerGetIssuePublicData, type IssueControllerGetIssuePublicError, type IssueControllerGetIssuePublicErrors, type IssueControllerGetIssuePublicResponse, type IssueControllerGetIssuePublicResponses, type IssueControllerListIssuesData, type IssueControllerListIssuesError, type IssueControllerListIssuesErrors, type IssueControllerListIssuesResponse, type IssueControllerListIssuesResponses, type IssueControllerUpdateIssuePublicData, type IssueControllerUpdateIssuePublicError, type IssueControllerUpdateIssuePublicErrors, type IssueControllerUpdateIssuePublicResponse, type IssueControllerUpdateIssuePublicResponses, type IssueHistoryDto, type IssueHistoryResponseDto, type IssueResponseDto, type IssuesResource, type ListChecklistsResponseDto, type ListConfigItemsResponseDto, type ListConfigTablesResponseDto, type ListInspectionsResponseDto, type ListIssuesResponseDto, type ListSitesResponseDto, PACKAGE_NAME, PACKAGE_VERSION, type PublicConfigControllerCreateConfigItemData, type PublicConfigControllerCreateConfigItemError, type PublicConfigControllerCreateConfigItemErrors, type PublicConfigControllerCreateConfigItemResponse, type PublicConfigControllerCreateConfigItemResponses, type PublicConfigControllerDeleteConfigItemData, type PublicConfigControllerDeleteConfigItemError, type PublicConfigControllerDeleteConfigItemErrors, type PublicConfigControllerDeleteConfigItemResponse, type PublicConfigControllerDeleteConfigItemResponses, type PublicConfigControllerGetConfigItemData, type PublicConfigControllerGetConfigItemError, type PublicConfigControllerGetConfigItemErrors, type PublicConfigControllerGetConfigItemResponse, type PublicConfigControllerGetConfigItemResponses, type PublicConfigControllerListConfigItemsData, type PublicConfigControllerListConfigItemsError, type PublicConfigControllerListConfigItemsErrors, type PublicConfigControllerListConfigItemsResponse, type PublicConfigControllerListConfigItemsResponses, type PublicConfigControllerListConfigTablesData, type PublicConfigControllerListConfigTablesError, type PublicConfigControllerListConfigTablesErrors, type PublicConfigControllerListConfigTablesResponse, type PublicConfigControllerListConfigTablesResponses, type PublicConfigControllerUpdateConfigItemData, type PublicConfigControllerUpdateConfigItemError, type PublicConfigControllerUpdateConfigItemErrors, type PublicConfigControllerUpdateConfigItemResponse, type PublicConfigControllerUpdateConfigItemResponses, type PublicCreateAssetDto, type SiteControllerCreateSiteData, type SiteControllerCreateSiteError, type SiteControllerCreateSiteErrors, type SiteControllerCreateSiteResponse, type SiteControllerCreateSiteResponses, type SiteControllerDeleteSiteData, type SiteControllerDeleteSiteError, type SiteControllerDeleteSiteErrors, type SiteControllerDeleteSiteResponse, type SiteControllerDeleteSiteResponses, type SiteControllerListSitesData, type SiteControllerListSitesError, type SiteControllerListSitesErrors, type SiteControllerListSitesResponse, type SiteControllerListSitesResponses, type SiteControllerUpdateSiteData, type SiteControllerUpdateSiteError, type SiteControllerUpdateSiteErrors, type SiteControllerUpdateSiteResponse, type SiteControllerUpdateSiteResponses, type SiteResponseDto, type SitesResource, type UpdateAssetClassDto, type UpdateAssetDto, type UpdateAssetPropertyDto, type UpdateConfigItemDto, type UpdateIssueDto, type UpdateSiteDto, type UpdateUserPropertyDto, type UserControllerCreateUserData, type UserControllerCreateUserError, type UserControllerCreateUserErrors, type UserControllerCreateUserResponse, type UserControllerCreateUserResponses, type UserControllerGetUserData, type UserControllerGetUserError, type UserControllerGetUserErrors, type UserControllerGetUserResponse, type UserControllerGetUserResponses, type UserControllerListUsersData, type UserControllerListUsersError, type UserControllerListUsersErrors, type UserControllerListUsersResponse, type UserControllerListUsersResponses, type UserControllerUpdateUserData, type UserControllerUpdateUserError, type UserControllerUpdateUserErrors, type UserControllerUpdateUserResponse, type UserControllerUpdateUserResponses, type UserPropertiesResource, type UserPropertyControllerDeleteUserPropertyData, type UserPropertyControllerDeleteUserPropertyError, type UserPropertyControllerDeleteUserPropertyErrors, type UserPropertyControllerDeleteUserPropertyResponse, type UserPropertyControllerDeleteUserPropertyResponses, type UserPropertyControllerUpdateUserPropertyData, type UserPropertyControllerUpdateUserPropertyError, type UserPropertyControllerUpdateUserPropertyErrors, type UserPropertyControllerUpdateUserPropertyResponse, type UserPropertyControllerUpdateUserPropertyResponses, type UserPropertyResponseDto, type UserResponseDto, type UsersResource, WakataApiError, WakataAuthError, WakataClient, type WakataClientOptions, WakataConflictError, type WakataErrorEnvelope, WakataNotFoundError, WakataPermissionError, WakataRateLimitError, WakataServerError, WakataValidationError, generateIdempotencyKey, mapApiError };