haystack-contracts 1.0.3 → 1.0.4
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/README.md +70 -2
- package/dist/index.d.mts +284 -35
- package/dist/index.d.ts +284 -35
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/openapi.json +291 -34
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -146,8 +146,13 @@ interface paths {
|
|
|
146
146
|
* @example {
|
|
147
147
|
* "success": false,
|
|
148
148
|
* "statusCode": 400,
|
|
149
|
-
* "
|
|
150
|
-
* "
|
|
149
|
+
* "data": null,
|
|
150
|
+
* "error": {
|
|
151
|
+
* "message": "email must be an email",
|
|
152
|
+
* "error": "Bad Request"
|
|
153
|
+
* },
|
|
154
|
+
* "timestamp": "2026-05-29T12:00:00.000Z",
|
|
155
|
+
* "path": "/api/v1/resource"
|
|
151
156
|
* }
|
|
152
157
|
*/
|
|
153
158
|
'application/json': unknown;
|
|
@@ -163,8 +168,12 @@ interface paths {
|
|
|
163
168
|
* @example {
|
|
164
169
|
* "success": false,
|
|
165
170
|
* "statusCode": 401,
|
|
166
|
-
* "
|
|
167
|
-
* "
|
|
171
|
+
* "data": null,
|
|
172
|
+
* "error": {
|
|
173
|
+
* "message": "Unauthorized"
|
|
174
|
+
* },
|
|
175
|
+
* "timestamp": "2026-05-29T12:00:00.000Z",
|
|
176
|
+
* "path": "/api/v1/resource"
|
|
168
177
|
* }
|
|
169
178
|
*/
|
|
170
179
|
'application/json': unknown;
|
|
@@ -228,8 +237,12 @@ interface paths {
|
|
|
228
237
|
* @example {
|
|
229
238
|
* "success": false,
|
|
230
239
|
* "statusCode": 401,
|
|
231
|
-
* "
|
|
232
|
-
* "
|
|
240
|
+
* "data": null,
|
|
241
|
+
* "error": {
|
|
242
|
+
* "message": "Unauthorized"
|
|
243
|
+
* },
|
|
244
|
+
* "timestamp": "2026-05-29T12:00:00.000Z",
|
|
245
|
+
* "path": "/api/v1/resource"
|
|
233
246
|
* }
|
|
234
247
|
*/
|
|
235
248
|
'application/json': unknown;
|
|
@@ -298,8 +311,13 @@ interface paths {
|
|
|
298
311
|
* @example {
|
|
299
312
|
* "success": false,
|
|
300
313
|
* "statusCode": 400,
|
|
301
|
-
* "
|
|
302
|
-
* "
|
|
314
|
+
* "data": null,
|
|
315
|
+
* "error": {
|
|
316
|
+
* "message": "email must be an email",
|
|
317
|
+
* "error": "Bad Request"
|
|
318
|
+
* },
|
|
319
|
+
* "timestamp": "2026-05-29T12:00:00.000Z",
|
|
320
|
+
* "path": "/api/v1/resource"
|
|
303
321
|
* }
|
|
304
322
|
*/
|
|
305
323
|
'application/json': unknown;
|
|
@@ -315,8 +333,12 @@ interface paths {
|
|
|
315
333
|
* @example {
|
|
316
334
|
* "success": false,
|
|
317
335
|
* "statusCode": 401,
|
|
318
|
-
* "
|
|
319
|
-
* "
|
|
336
|
+
* "data": null,
|
|
337
|
+
* "error": {
|
|
338
|
+
* "message": "Unauthorized"
|
|
339
|
+
* },
|
|
340
|
+
* "timestamp": "2026-05-29T12:00:00.000Z",
|
|
341
|
+
* "path": "/api/v1/resource"
|
|
320
342
|
* }
|
|
321
343
|
*/
|
|
322
344
|
'application/json': unknown;
|
|
@@ -332,8 +354,13 @@ interface paths {
|
|
|
332
354
|
* @example {
|
|
333
355
|
* "success": false,
|
|
334
356
|
* "statusCode": 404,
|
|
335
|
-
* "
|
|
336
|
-
* "
|
|
357
|
+
* "data": null,
|
|
358
|
+
* "error": {
|
|
359
|
+
* "message": "Robot not found",
|
|
360
|
+
* "error": "Not Found"
|
|
361
|
+
* },
|
|
362
|
+
* "timestamp": "2026-05-29T12:00:00.000Z",
|
|
363
|
+
* "path": "/api/v1/resource"
|
|
337
364
|
* }
|
|
338
365
|
*/
|
|
339
366
|
'application/json': unknown;
|
|
@@ -349,6 +376,150 @@ interface paths {
|
|
|
349
376
|
patch?: never;
|
|
350
377
|
trace?: never;
|
|
351
378
|
};
|
|
379
|
+
'/robots/{id}/assign': {
|
|
380
|
+
parameters: {
|
|
381
|
+
query?: never;
|
|
382
|
+
header?: never;
|
|
383
|
+
path?: never;
|
|
384
|
+
cookie?: never;
|
|
385
|
+
};
|
|
386
|
+
get?: never;
|
|
387
|
+
put?: never;
|
|
388
|
+
post?: never;
|
|
389
|
+
delete?: never;
|
|
390
|
+
options?: never;
|
|
391
|
+
head?: never;
|
|
392
|
+
/**
|
|
393
|
+
* Assign a robot to a tenant and fleet
|
|
394
|
+
* @description Updates the robot tenant and optional fleet assignment. Use fleetId null to leave the robot unassigned.
|
|
395
|
+
*/
|
|
396
|
+
patch: {
|
|
397
|
+
parameters: {
|
|
398
|
+
query?: never;
|
|
399
|
+
header?: never;
|
|
400
|
+
path: {
|
|
401
|
+
/** @description UUID of the robot to assign. */
|
|
402
|
+
id: string;
|
|
403
|
+
};
|
|
404
|
+
cookie?: never;
|
|
405
|
+
};
|
|
406
|
+
requestBody: {
|
|
407
|
+
content: {
|
|
408
|
+
'application/json': components['schemas']['AssignRobotDto'];
|
|
409
|
+
};
|
|
410
|
+
};
|
|
411
|
+
responses: {
|
|
412
|
+
/** @description Robot assignment updated. */
|
|
413
|
+
200: {
|
|
414
|
+
headers: {
|
|
415
|
+
[name: string]: unknown;
|
|
416
|
+
};
|
|
417
|
+
content: {
|
|
418
|
+
'application/json': {
|
|
419
|
+
/** @example true */
|
|
420
|
+
success: boolean;
|
|
421
|
+
/** @example 200 */
|
|
422
|
+
statusCode: number;
|
|
423
|
+
/**
|
|
424
|
+
* Format: date-time
|
|
425
|
+
* @example 2026-05-29T12:00:00.000Z
|
|
426
|
+
*/
|
|
427
|
+
timestamp: string;
|
|
428
|
+
data: components['schemas']['RobotListItemDto'];
|
|
429
|
+
};
|
|
430
|
+
};
|
|
431
|
+
};
|
|
432
|
+
/** @description Validation failed. Check that all required fields are present and correctly typed. */
|
|
433
|
+
400: {
|
|
434
|
+
headers: {
|
|
435
|
+
[name: string]: unknown;
|
|
436
|
+
};
|
|
437
|
+
content: {
|
|
438
|
+
/**
|
|
439
|
+
* @example {
|
|
440
|
+
* "success": false,
|
|
441
|
+
* "statusCode": 400,
|
|
442
|
+
* "data": null,
|
|
443
|
+
* "error": {
|
|
444
|
+
* "message": "email must be an email",
|
|
445
|
+
* "error": "Bad Request"
|
|
446
|
+
* },
|
|
447
|
+
* "timestamp": "2026-05-29T12:00:00.000Z",
|
|
448
|
+
* "path": "/api/v1/resource"
|
|
449
|
+
* }
|
|
450
|
+
*/
|
|
451
|
+
'application/json': unknown;
|
|
452
|
+
};
|
|
453
|
+
};
|
|
454
|
+
/** @description Authentication required. Provide a valid bearer token. */
|
|
455
|
+
401: {
|
|
456
|
+
headers: {
|
|
457
|
+
[name: string]: unknown;
|
|
458
|
+
};
|
|
459
|
+
content: {
|
|
460
|
+
/**
|
|
461
|
+
* @example {
|
|
462
|
+
* "success": false,
|
|
463
|
+
* "statusCode": 401,
|
|
464
|
+
* "data": null,
|
|
465
|
+
* "error": {
|
|
466
|
+
* "message": "Unauthorized"
|
|
467
|
+
* },
|
|
468
|
+
* "timestamp": "2026-05-29T12:00:00.000Z",
|
|
469
|
+
* "path": "/api/v1/resource"
|
|
470
|
+
* }
|
|
471
|
+
*/
|
|
472
|
+
'application/json': unknown;
|
|
473
|
+
};
|
|
474
|
+
};
|
|
475
|
+
/** @description Requires the `robots.manage` permission. */
|
|
476
|
+
403: {
|
|
477
|
+
headers: {
|
|
478
|
+
[name: string]: unknown;
|
|
479
|
+
};
|
|
480
|
+
content: {
|
|
481
|
+
/**
|
|
482
|
+
* @example {
|
|
483
|
+
* "success": false,
|
|
484
|
+
* "statusCode": 403,
|
|
485
|
+
* "data": null,
|
|
486
|
+
* "error": {
|
|
487
|
+
* "message": "Insufficient permissions",
|
|
488
|
+
* "error": "Forbidden"
|
|
489
|
+
* },
|
|
490
|
+
* "timestamp": "2026-05-29T12:00:00.000Z",
|
|
491
|
+
* "path": "/api/v1/resource"
|
|
492
|
+
* }
|
|
493
|
+
*/
|
|
494
|
+
'application/json': unknown;
|
|
495
|
+
};
|
|
496
|
+
};
|
|
497
|
+
/** @description Robot, tenant, or fleet not found in the current tenant. */
|
|
498
|
+
404: {
|
|
499
|
+
headers: {
|
|
500
|
+
[name: string]: unknown;
|
|
501
|
+
};
|
|
502
|
+
content: {
|
|
503
|
+
/**
|
|
504
|
+
* @example {
|
|
505
|
+
* "success": false,
|
|
506
|
+
* "statusCode": 404,
|
|
507
|
+
* "data": null,
|
|
508
|
+
* "error": {
|
|
509
|
+
* "message": "Robot, tenant, or fleet not found",
|
|
510
|
+
* "error": "Not Found"
|
|
511
|
+
* },
|
|
512
|
+
* "timestamp": "2026-05-29T12:00:00.000Z",
|
|
513
|
+
* "path": "/api/v1/resource"
|
|
514
|
+
* }
|
|
515
|
+
*/
|
|
516
|
+
'application/json': unknown;
|
|
517
|
+
};
|
|
518
|
+
};
|
|
519
|
+
};
|
|
520
|
+
};
|
|
521
|
+
trace?: never;
|
|
522
|
+
};
|
|
352
523
|
'/metrics/types': {
|
|
353
524
|
parameters: {
|
|
354
525
|
query?: never;
|
|
@@ -399,8 +570,12 @@ interface paths {
|
|
|
399
570
|
* @example {
|
|
400
571
|
* "success": false,
|
|
401
572
|
* "statusCode": 401,
|
|
402
|
-
* "
|
|
403
|
-
* "
|
|
573
|
+
* "data": null,
|
|
574
|
+
* "error": {
|
|
575
|
+
* "message": "Unauthorized"
|
|
576
|
+
* },
|
|
577
|
+
* "timestamp": "2026-05-29T12:00:00.000Z",
|
|
578
|
+
* "path": "/api/v1/resource"
|
|
404
579
|
* }
|
|
405
580
|
*/
|
|
406
581
|
'application/json': unknown;
|
|
@@ -472,8 +647,13 @@ interface paths {
|
|
|
472
647
|
* @example {
|
|
473
648
|
* "success": false,
|
|
474
649
|
* "statusCode": 400,
|
|
475
|
-
* "
|
|
476
|
-
* "
|
|
650
|
+
* "data": null,
|
|
651
|
+
* "error": {
|
|
652
|
+
* "message": "email must be an email",
|
|
653
|
+
* "error": "Bad Request"
|
|
654
|
+
* },
|
|
655
|
+
* "timestamp": "2026-05-29T12:00:00.000Z",
|
|
656
|
+
* "path": "/api/v1/resource"
|
|
477
657
|
* }
|
|
478
658
|
*/
|
|
479
659
|
'application/json': unknown;
|
|
@@ -489,8 +669,12 @@ interface paths {
|
|
|
489
669
|
* @example {
|
|
490
670
|
* "success": false,
|
|
491
671
|
* "statusCode": 401,
|
|
492
|
-
* "
|
|
493
|
-
* "
|
|
672
|
+
* "data": null,
|
|
673
|
+
* "error": {
|
|
674
|
+
* "message": "Unauthorized"
|
|
675
|
+
* },
|
|
676
|
+
* "timestamp": "2026-05-29T12:00:00.000Z",
|
|
677
|
+
* "path": "/api/v1/resource"
|
|
494
678
|
* }
|
|
495
679
|
*/
|
|
496
680
|
'application/json': unknown;
|
|
@@ -556,8 +740,12 @@ interface paths {
|
|
|
556
740
|
* @example {
|
|
557
741
|
* "success": false,
|
|
558
742
|
* "statusCode": 401,
|
|
559
|
-
* "
|
|
560
|
-
* "
|
|
743
|
+
* "data": null,
|
|
744
|
+
* "error": {
|
|
745
|
+
* "message": "Unauthorized"
|
|
746
|
+
* },
|
|
747
|
+
* "timestamp": "2026-05-29T12:00:00.000Z",
|
|
748
|
+
* "path": "/api/v1/resource"
|
|
561
749
|
* }
|
|
562
750
|
*/
|
|
563
751
|
'application/json': unknown;
|
|
@@ -623,8 +811,12 @@ interface paths {
|
|
|
623
811
|
* @example {
|
|
624
812
|
* "success": false,
|
|
625
813
|
* "statusCode": 401,
|
|
626
|
-
* "
|
|
627
|
-
* "
|
|
814
|
+
* "data": null,
|
|
815
|
+
* "error": {
|
|
816
|
+
* "message": "Unauthorized"
|
|
817
|
+
* },
|
|
818
|
+
* "timestamp": "2026-05-29T12:00:00.000Z",
|
|
819
|
+
* "path": "/api/v1/resource"
|
|
628
820
|
* }
|
|
629
821
|
*/
|
|
630
822
|
'application/json': unknown;
|
|
@@ -695,8 +887,13 @@ interface paths {
|
|
|
695
887
|
* @example {
|
|
696
888
|
* "success": false,
|
|
697
889
|
* "statusCode": 400,
|
|
698
|
-
* "
|
|
699
|
-
* "
|
|
890
|
+
* "data": null,
|
|
891
|
+
* "error": {
|
|
892
|
+
* "message": "email must be an email",
|
|
893
|
+
* "error": "Bad Request"
|
|
894
|
+
* },
|
|
895
|
+
* "timestamp": "2026-05-29T12:00:00.000Z",
|
|
896
|
+
* "path": "/api/v1/resource"
|
|
700
897
|
* }
|
|
701
898
|
*/
|
|
702
899
|
'application/json': unknown;
|
|
@@ -712,8 +909,12 @@ interface paths {
|
|
|
712
909
|
* @example {
|
|
713
910
|
* "success": false,
|
|
714
911
|
* "statusCode": 401,
|
|
715
|
-
* "
|
|
716
|
-
* "
|
|
912
|
+
* "data": null,
|
|
913
|
+
* "error": {
|
|
914
|
+
* "message": "Unauthorized"
|
|
915
|
+
* },
|
|
916
|
+
* "timestamp": "2026-05-29T12:00:00.000Z",
|
|
917
|
+
* "path": "/api/v1/resource"
|
|
717
918
|
* }
|
|
718
919
|
*/
|
|
719
920
|
'application/json': unknown;
|
|
@@ -779,8 +980,12 @@ interface paths {
|
|
|
779
980
|
* @example {
|
|
780
981
|
* "success": false,
|
|
781
982
|
* "statusCode": 401,
|
|
782
|
-
* "
|
|
783
|
-
* "
|
|
983
|
+
* "data": null,
|
|
984
|
+
* "error": {
|
|
985
|
+
* "message": "Unauthorized"
|
|
986
|
+
* },
|
|
987
|
+
* "timestamp": "2026-05-29T12:00:00.000Z",
|
|
988
|
+
* "path": "/api/v1/resource"
|
|
784
989
|
* }
|
|
785
990
|
*/
|
|
786
991
|
'application/json': unknown;
|
|
@@ -846,8 +1051,12 @@ interface paths {
|
|
|
846
1051
|
* @example {
|
|
847
1052
|
* "success": false,
|
|
848
1053
|
* "statusCode": 401,
|
|
849
|
-
* "
|
|
850
|
-
* "
|
|
1054
|
+
* "data": null,
|
|
1055
|
+
* "error": {
|
|
1056
|
+
* "message": "Unauthorized"
|
|
1057
|
+
* },
|
|
1058
|
+
* "timestamp": "2026-05-29T12:00:00.000Z",
|
|
1059
|
+
* "path": "/api/v1/resource"
|
|
851
1060
|
* }
|
|
852
1061
|
*/
|
|
853
1062
|
'application/json': unknown;
|
|
@@ -913,8 +1122,12 @@ interface paths {
|
|
|
913
1122
|
* @example {
|
|
914
1123
|
* "success": false,
|
|
915
1124
|
* "statusCode": 401,
|
|
916
|
-
* "
|
|
917
|
-
* "
|
|
1125
|
+
* "data": null,
|
|
1126
|
+
* "error": {
|
|
1127
|
+
* "message": "Unauthorized"
|
|
1128
|
+
* },
|
|
1129
|
+
* "timestamp": "2026-05-29T12:00:00.000Z",
|
|
1130
|
+
* "path": "/api/v1/resource"
|
|
918
1131
|
* }
|
|
919
1132
|
*/
|
|
920
1133
|
'application/json': unknown;
|
|
@@ -980,8 +1193,12 @@ interface paths {
|
|
|
980
1193
|
* @example {
|
|
981
1194
|
* "success": false,
|
|
982
1195
|
* "statusCode": 401,
|
|
983
|
-
* "
|
|
984
|
-
* "
|
|
1196
|
+
* "data": null,
|
|
1197
|
+
* "error": {
|
|
1198
|
+
* "message": "Unauthorized"
|
|
1199
|
+
* },
|
|
1200
|
+
* "timestamp": "2026-05-29T12:00:00.000Z",
|
|
1201
|
+
* "path": "/api/v1/resource"
|
|
985
1202
|
* }
|
|
986
1203
|
*/
|
|
987
1204
|
'application/json': unknown;
|
|
@@ -1000,6 +1217,17 @@ interface paths {
|
|
|
1000
1217
|
}
|
|
1001
1218
|
interface components {
|
|
1002
1219
|
schemas: {
|
|
1220
|
+
AssignRobotDto: {
|
|
1221
|
+
/** @description Workspace UUID. Tenant admin may set any workspace; workspace admin may only set their own workspace(s). Lower roles must omit this field. */
|
|
1222
|
+
workspaceId?: string | null;
|
|
1223
|
+
/** @description Facility UUID. Null unassigns from facility (UNASSIGNED). */
|
|
1224
|
+
facilityId?: string | null;
|
|
1225
|
+
/** @description Fleet UUID. Null unassigns from fleet. */
|
|
1226
|
+
fleetId?: string | null;
|
|
1227
|
+
isSubscribed?: boolean;
|
|
1228
|
+
changedBy?: string;
|
|
1229
|
+
changeReason?: string;
|
|
1230
|
+
};
|
|
1003
1231
|
AuthResponseDto: {
|
|
1004
1232
|
/**
|
|
1005
1233
|
* @description Short-lived JWT access token (15 min).
|
|
@@ -1207,6 +1435,26 @@ interface components {
|
|
|
1207
1435
|
* @example Warehouse Bot Alpha
|
|
1208
1436
|
*/
|
|
1209
1437
|
name: string;
|
|
1438
|
+
/**
|
|
1439
|
+
* @description UUID of the workspace this robot is assigned to.
|
|
1440
|
+
* @example b2000000-0000-4000-8000-000000000002
|
|
1441
|
+
*/
|
|
1442
|
+
workspaceId?: string | null;
|
|
1443
|
+
/**
|
|
1444
|
+
* @description Name of the workspace this robot is assigned to.
|
|
1445
|
+
* @example North Hospital Cluster
|
|
1446
|
+
*/
|
|
1447
|
+
workspaceName?: string | null;
|
|
1448
|
+
/**
|
|
1449
|
+
* @description UUID of the facility this robot is assigned to.
|
|
1450
|
+
* @example c3000000-0000-4000-8000-000000000003
|
|
1451
|
+
*/
|
|
1452
|
+
facilityId?: string | null;
|
|
1453
|
+
/**
|
|
1454
|
+
* @description Name of the facility this robot is assigned to.
|
|
1455
|
+
* @example City General Hospital
|
|
1456
|
+
*/
|
|
1457
|
+
facilityName?: string | null;
|
|
1210
1458
|
/**
|
|
1211
1459
|
* @description UUID of the fleet this robot is assigned to.
|
|
1212
1460
|
* @example f1000000-0000-4000-8000-000000000001
|
|
@@ -1361,6 +1609,7 @@ type LoginPayload = Schemas['LoginDto'];
|
|
|
1361
1609
|
type AuthResponse = Schemas['AuthResponseDto'];
|
|
1362
1610
|
type PublicUser = Schemas['PublicUserDto'];
|
|
1363
1611
|
type RobotListItem = Schemas['RobotListItemDto'];
|
|
1612
|
+
type AssignRobotPayload = Schemas['AssignRobotDto'];
|
|
1364
1613
|
type MetricType = Schemas['MetricTypeResponseDto'];
|
|
1365
1614
|
type RobotMetricLive = Schemas['RobotMetricLiveDto'];
|
|
1366
1615
|
type RobotDisinfectionStats = Schemas['RobotDisinfectionStatsDto'];
|
|
@@ -1408,4 +1657,4 @@ interface PaginatedSuccessResponse<T> extends ApiSuccessResponse<T[]> {
|
|
|
1408
1657
|
meta: PaginationMeta;
|
|
1409
1658
|
}
|
|
1410
1659
|
|
|
1411
|
-
export { AnalyticsAggregateStatus, type ApiData, type ApiErrorResponse, type ApiResult, type ApiSuccessResponse, type AuthResponse, type DisinfectionCountAggregate, type DisinfectionCountAnalyticsData, type DisinfectionJob, type DisinfectionOperatorAggregate, type DisinfectionOperatorsAnalyticsData, type DisinfectionStatusAggregate, type DisinfectionStatusAnalyticsData, HAYSTACK_API_BASE_PATH, HAYSTACK_API_VERSION, HAYSTACK_PRODUCTION_API_URL, type LoginPayload, MetricDataType, MetricSourceType, type MetricType, PUBLIC_API_META, PUBLIC_OPENAPI_JSON, type PaginatedSuccessResponse, type PaginationMeta, PublicApiPath, type PublicUser, type RobotDisinfectionStats, type RobotListItem, type RobotMetricLive, type RobotsCountAggregate, type RobotsCountAnalyticsData, Role, ScopeType, type components, type operations, type paths };
|
|
1660
|
+
export { AnalyticsAggregateStatus, type ApiData, type ApiErrorResponse, type ApiResult, type ApiSuccessResponse, type AssignRobotPayload, type AuthResponse, type DisinfectionCountAggregate, type DisinfectionCountAnalyticsData, type DisinfectionJob, type DisinfectionOperatorAggregate, type DisinfectionOperatorsAnalyticsData, type DisinfectionStatusAggregate, type DisinfectionStatusAnalyticsData, HAYSTACK_API_BASE_PATH, HAYSTACK_API_VERSION, HAYSTACK_PRODUCTION_API_URL, type LoginPayload, MetricDataType, MetricSourceType, type MetricType, PUBLIC_API_META, PUBLIC_OPENAPI_JSON, type PaginatedSuccessResponse, type PaginationMeta, PublicApiPath, type PublicUser, type RobotDisinfectionStats, type RobotListItem, type RobotMetricLive, type RobotsCountAggregate, type RobotsCountAnalyticsData, Role, ScopeType, type components, type operations, type paths };
|
package/dist/index.js
CHANGED