@seamapi/http 0.30.1 → 0.31.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- import { RouteRequestBody, RouteResponse, openapi } from '@seamapi/types/connect';
1
+ import { RouteRequestBody, RouteResponse, ActionAttempt, openapi } from '@seamapi/types/connect';
2
2
  import { AxiosInstance, AxiosRequestConfig, Method } from 'axios';
3
3
  import { AxiosRetry } from 'axios-retry';
4
4
  export * from '@seamapi/url-search-params-serializer';
@@ -10,18 +10,6 @@ interface ClientOptions {
10
10
  }
11
11
  type AxiosRetryConfig = Parameters<AxiosRetry>[1];
12
12
 
13
- interface ActionAttempt {
14
- action_attempt_id: string;
15
- status: 'pending' | 'error' | 'success';
16
- }
17
- type FailedActionAttempt<T extends ActionAttempt> = T & {
18
- status: 'error';
19
- error: {
20
- type: string;
21
- message: string;
22
- };
23
- };
24
-
25
13
  interface SeamHttpRequestParent {
26
14
  readonly client: Client;
27
15
  readonly defaults: Required<SeamHttpRequestOptions>;
@@ -1000,20 +988,968 @@ interface ResolveActionAttemptOptions {
1000
988
  timeout?: number;
1001
989
  pollingInterval?: number;
1002
990
  }
1003
- declare const isSeamActionAttemptError: <T extends ActionAttempt>(error: unknown) => error is SeamActionAttemptError<T>;
991
+ declare const isSeamActionAttemptError: <T extends {
992
+ error: null;
993
+ status: "pending";
994
+ action_attempt_id: string;
995
+ result: null;
996
+ action_type: "LOCK_DOOR";
997
+ } | {
998
+ error: null;
999
+ status: "success";
1000
+ action_attempt_id: string;
1001
+ result: {};
1002
+ action_type: "LOCK_DOOR";
1003
+ } | {
1004
+ error: {
1005
+ type: string;
1006
+ message: string;
1007
+ };
1008
+ status: "error";
1009
+ action_attempt_id: string;
1010
+ result: null;
1011
+ action_type: "LOCK_DOOR";
1012
+ } | {
1013
+ error: null;
1014
+ status: "pending";
1015
+ action_attempt_id: string;
1016
+ result: null;
1017
+ action_type: "UNLOCK_DOOR";
1018
+ } | {
1019
+ error: null;
1020
+ status: "success";
1021
+ action_attempt_id: string;
1022
+ result: {};
1023
+ action_type: "UNLOCK_DOOR";
1024
+ } | {
1025
+ error: {
1026
+ type: string;
1027
+ message: string;
1028
+ };
1029
+ status: "error";
1030
+ action_attempt_id: string;
1031
+ result: null;
1032
+ action_type: "UNLOCK_DOOR";
1033
+ } | {
1034
+ error: null;
1035
+ status: "pending";
1036
+ action_attempt_id: string;
1037
+ result: null;
1038
+ action_type: "RESET_SANDBOX_WORKSPACE";
1039
+ } | {
1040
+ error: null;
1041
+ status: "success";
1042
+ action_attempt_id: string;
1043
+ result: {};
1044
+ action_type: "RESET_SANDBOX_WORKSPACE";
1045
+ } | {
1046
+ error: {
1047
+ type: string;
1048
+ message: string;
1049
+ };
1050
+ status: "error";
1051
+ action_attempt_id: string;
1052
+ result: null;
1053
+ action_type: "RESET_SANDBOX_WORKSPACE";
1054
+ } | {
1055
+ error: null;
1056
+ status: "pending";
1057
+ action_attempt_id: string;
1058
+ result: null;
1059
+ action_type: "SET_COOL";
1060
+ } | {
1061
+ error: null;
1062
+ status: "success";
1063
+ action_attempt_id: string;
1064
+ result: {};
1065
+ action_type: "SET_COOL";
1066
+ } | {
1067
+ error: {
1068
+ type: string;
1069
+ message: string;
1070
+ };
1071
+ status: "error";
1072
+ action_attempt_id: string;
1073
+ result: null;
1074
+ action_type: "SET_COOL";
1075
+ } | {
1076
+ error: null;
1077
+ status: "pending";
1078
+ action_attempt_id: string;
1079
+ result: null;
1080
+ action_type: "SET_HEAT";
1081
+ } | {
1082
+ error: null;
1083
+ status: "success";
1084
+ action_attempt_id: string;
1085
+ result: {};
1086
+ action_type: "SET_HEAT";
1087
+ } | {
1088
+ error: {
1089
+ type: string;
1090
+ message: string;
1091
+ };
1092
+ status: "error";
1093
+ action_attempt_id: string;
1094
+ result: null;
1095
+ action_type: "SET_HEAT";
1096
+ } | {
1097
+ error: null;
1098
+ status: "pending";
1099
+ action_attempt_id: string;
1100
+ result: null;
1101
+ action_type: "SET_HEAT_COOL";
1102
+ } | {
1103
+ error: null;
1104
+ status: "success";
1105
+ action_attempt_id: string;
1106
+ result: {};
1107
+ action_type: "SET_HEAT_COOL";
1108
+ } | {
1109
+ error: {
1110
+ type: string;
1111
+ message: string;
1112
+ };
1113
+ status: "error";
1114
+ action_attempt_id: string;
1115
+ result: null;
1116
+ action_type: "SET_HEAT_COOL";
1117
+ } | {
1118
+ error: null;
1119
+ status: "pending";
1120
+ action_attempt_id: string;
1121
+ result: null;
1122
+ action_type: "SET_FAN_MODE";
1123
+ } | {
1124
+ error: null;
1125
+ status: "success";
1126
+ action_attempt_id: string;
1127
+ result: {};
1128
+ action_type: "SET_FAN_MODE";
1129
+ } | {
1130
+ error: {
1131
+ type: string;
1132
+ message: string;
1133
+ };
1134
+ status: "error";
1135
+ action_attempt_id: string;
1136
+ result: null;
1137
+ action_type: "SET_FAN_MODE";
1138
+ } | {
1139
+ error: null;
1140
+ status: "pending";
1141
+ action_attempt_id: string;
1142
+ result: null;
1143
+ action_type: "SET_THERMOSTAT_OFF";
1144
+ } | {
1145
+ error: null;
1146
+ status: "success";
1147
+ action_attempt_id: string;
1148
+ result: {};
1149
+ action_type: "SET_THERMOSTAT_OFF";
1150
+ } | {
1151
+ error: {
1152
+ type: string;
1153
+ message: string;
1154
+ };
1155
+ status: "error";
1156
+ action_attempt_id: string;
1157
+ result: null;
1158
+ action_type: "SET_THERMOSTAT_OFF";
1159
+ } | {
1160
+ error: null;
1161
+ status: "pending";
1162
+ action_attempt_id: string;
1163
+ result: null;
1164
+ action_type: "SYNC_ACCESS_CODES";
1165
+ } | {
1166
+ error: null;
1167
+ status: "success";
1168
+ action_attempt_id: string;
1169
+ action_type: "SYNC_ACCESS_CODES";
1170
+ result?: any;
1171
+ } | {
1172
+ error: {
1173
+ type: string;
1174
+ message: string;
1175
+ };
1176
+ status: "error";
1177
+ action_attempt_id: string;
1178
+ result: null;
1179
+ action_type: "SYNC_ACCESS_CODES";
1180
+ } | {
1181
+ error: null;
1182
+ status: "pending";
1183
+ action_attempt_id: string;
1184
+ result: null;
1185
+ action_type: "CREATE_ACCESS_CODE";
1186
+ } | {
1187
+ error: null;
1188
+ status: "success";
1189
+ action_attempt_id: string;
1190
+ action_type: "CREATE_ACCESS_CODE";
1191
+ result?: any;
1192
+ } | {
1193
+ error: {
1194
+ type: string;
1195
+ message: string;
1196
+ };
1197
+ status: "error";
1198
+ action_attempt_id: string;
1199
+ result: null;
1200
+ action_type: "CREATE_ACCESS_CODE";
1201
+ } | {
1202
+ error: null;
1203
+ status: "pending";
1204
+ action_attempt_id: string;
1205
+ result: null;
1206
+ action_type: "DELETE_ACCESS_CODE";
1207
+ } | {
1208
+ error: null;
1209
+ status: "success";
1210
+ action_attempt_id: string;
1211
+ action_type: "DELETE_ACCESS_CODE";
1212
+ result?: any;
1213
+ } | {
1214
+ error: {
1215
+ type: string;
1216
+ message: string;
1217
+ };
1218
+ status: "error";
1219
+ action_attempt_id: string;
1220
+ result: null;
1221
+ action_type: "DELETE_ACCESS_CODE";
1222
+ } | {
1223
+ error: null;
1224
+ status: "pending";
1225
+ action_attempt_id: string;
1226
+ result: null;
1227
+ action_type: "UPDATE_ACCESS_CODE";
1228
+ } | {
1229
+ error: null;
1230
+ status: "success";
1231
+ action_attempt_id: string;
1232
+ action_type: "UPDATE_ACCESS_CODE";
1233
+ result?: any;
1234
+ } | {
1235
+ error: {
1236
+ type: string;
1237
+ message: string;
1238
+ };
1239
+ status: "error";
1240
+ action_attempt_id: string;
1241
+ result: null;
1242
+ action_type: "UPDATE_ACCESS_CODE";
1243
+ } | {
1244
+ error: null;
1245
+ status: "pending";
1246
+ action_attempt_id: string;
1247
+ result: null;
1248
+ action_type: "CREATE_NOISE_THRESHOLD";
1249
+ } | {
1250
+ error: null;
1251
+ status: "success";
1252
+ action_attempt_id: string;
1253
+ action_type: "CREATE_NOISE_THRESHOLD";
1254
+ result?: any;
1255
+ } | {
1256
+ error: {
1257
+ type: string;
1258
+ message: string;
1259
+ };
1260
+ status: "error";
1261
+ action_attempt_id: string;
1262
+ result: null;
1263
+ action_type: "CREATE_NOISE_THRESHOLD";
1264
+ } | {
1265
+ error: null;
1266
+ status: "pending";
1267
+ action_attempt_id: string;
1268
+ result: null;
1269
+ action_type: "DELETE_NOISE_THRESHOLD";
1270
+ } | {
1271
+ error: null;
1272
+ status: "success";
1273
+ action_attempt_id: string;
1274
+ action_type: "DELETE_NOISE_THRESHOLD";
1275
+ result?: any;
1276
+ } | {
1277
+ error: {
1278
+ type: string;
1279
+ message: string;
1280
+ };
1281
+ status: "error";
1282
+ action_attempt_id: string;
1283
+ result: null;
1284
+ action_type: "DELETE_NOISE_THRESHOLD";
1285
+ } | {
1286
+ error: null;
1287
+ status: "pending";
1288
+ action_attempt_id: string;
1289
+ result: null;
1290
+ action_type: "UPDATE_NOISE_THRESHOLD";
1291
+ } | {
1292
+ error: null;
1293
+ status: "success";
1294
+ action_attempt_id: string;
1295
+ action_type: "UPDATE_NOISE_THRESHOLD";
1296
+ result?: any;
1297
+ } | {
1298
+ error: {
1299
+ type: string;
1300
+ message: string;
1301
+ };
1302
+ status: "error";
1303
+ action_attempt_id: string;
1304
+ result: null;
1305
+ action_type: "UPDATE_NOISE_THRESHOLD";
1306
+ }>(error: unknown) => error is SeamActionAttemptError<T>;
1004
1307
  declare class SeamActionAttemptError<T extends ActionAttempt> extends Error {
1005
1308
  actionAttempt: T;
1006
1309
  constructor(message: string, actionAttempt: T);
1007
1310
  }
1008
- declare const isSeamActionAttemptFailedError: <T extends ActionAttempt>(error: unknown) => error is SeamActionAttemptFailedError<T>;
1311
+ declare const isSeamActionAttemptFailedError: <T extends {
1312
+ error: null;
1313
+ status: "pending";
1314
+ action_attempt_id: string;
1315
+ result: null;
1316
+ action_type: "LOCK_DOOR";
1317
+ } | {
1318
+ error: null;
1319
+ status: "success";
1320
+ action_attempt_id: string;
1321
+ result: {};
1322
+ action_type: "LOCK_DOOR";
1323
+ } | {
1324
+ error: {
1325
+ type: string;
1326
+ message: string;
1327
+ };
1328
+ status: "error";
1329
+ action_attempt_id: string;
1330
+ result: null;
1331
+ action_type: "LOCK_DOOR";
1332
+ } | {
1333
+ error: null;
1334
+ status: "pending";
1335
+ action_attempt_id: string;
1336
+ result: null;
1337
+ action_type: "UNLOCK_DOOR";
1338
+ } | {
1339
+ error: null;
1340
+ status: "success";
1341
+ action_attempt_id: string;
1342
+ result: {};
1343
+ action_type: "UNLOCK_DOOR";
1344
+ } | {
1345
+ error: {
1346
+ type: string;
1347
+ message: string;
1348
+ };
1349
+ status: "error";
1350
+ action_attempt_id: string;
1351
+ result: null;
1352
+ action_type: "UNLOCK_DOOR";
1353
+ } | {
1354
+ error: null;
1355
+ status: "pending";
1356
+ action_attempt_id: string;
1357
+ result: null;
1358
+ action_type: "RESET_SANDBOX_WORKSPACE";
1359
+ } | {
1360
+ error: null;
1361
+ status: "success";
1362
+ action_attempt_id: string;
1363
+ result: {};
1364
+ action_type: "RESET_SANDBOX_WORKSPACE";
1365
+ } | {
1366
+ error: {
1367
+ type: string;
1368
+ message: string;
1369
+ };
1370
+ status: "error";
1371
+ action_attempt_id: string;
1372
+ result: null;
1373
+ action_type: "RESET_SANDBOX_WORKSPACE";
1374
+ } | {
1375
+ error: null;
1376
+ status: "pending";
1377
+ action_attempt_id: string;
1378
+ result: null;
1379
+ action_type: "SET_COOL";
1380
+ } | {
1381
+ error: null;
1382
+ status: "success";
1383
+ action_attempt_id: string;
1384
+ result: {};
1385
+ action_type: "SET_COOL";
1386
+ } | {
1387
+ error: {
1388
+ type: string;
1389
+ message: string;
1390
+ };
1391
+ status: "error";
1392
+ action_attempt_id: string;
1393
+ result: null;
1394
+ action_type: "SET_COOL";
1395
+ } | {
1396
+ error: null;
1397
+ status: "pending";
1398
+ action_attempt_id: string;
1399
+ result: null;
1400
+ action_type: "SET_HEAT";
1401
+ } | {
1402
+ error: null;
1403
+ status: "success";
1404
+ action_attempt_id: string;
1405
+ result: {};
1406
+ action_type: "SET_HEAT";
1407
+ } | {
1408
+ error: {
1409
+ type: string;
1410
+ message: string;
1411
+ };
1412
+ status: "error";
1413
+ action_attempt_id: string;
1414
+ result: null;
1415
+ action_type: "SET_HEAT";
1416
+ } | {
1417
+ error: null;
1418
+ status: "pending";
1419
+ action_attempt_id: string;
1420
+ result: null;
1421
+ action_type: "SET_HEAT_COOL";
1422
+ } | {
1423
+ error: null;
1424
+ status: "success";
1425
+ action_attempt_id: string;
1426
+ result: {};
1427
+ action_type: "SET_HEAT_COOL";
1428
+ } | {
1429
+ error: {
1430
+ type: string;
1431
+ message: string;
1432
+ };
1433
+ status: "error";
1434
+ action_attempt_id: string;
1435
+ result: null;
1436
+ action_type: "SET_HEAT_COOL";
1437
+ } | {
1438
+ error: null;
1439
+ status: "pending";
1440
+ action_attempt_id: string;
1441
+ result: null;
1442
+ action_type: "SET_FAN_MODE";
1443
+ } | {
1444
+ error: null;
1445
+ status: "success";
1446
+ action_attempt_id: string;
1447
+ result: {};
1448
+ action_type: "SET_FAN_MODE";
1449
+ } | {
1450
+ error: {
1451
+ type: string;
1452
+ message: string;
1453
+ };
1454
+ status: "error";
1455
+ action_attempt_id: string;
1456
+ result: null;
1457
+ action_type: "SET_FAN_MODE";
1458
+ } | {
1459
+ error: null;
1460
+ status: "pending";
1461
+ action_attempt_id: string;
1462
+ result: null;
1463
+ action_type: "SET_THERMOSTAT_OFF";
1464
+ } | {
1465
+ error: null;
1466
+ status: "success";
1467
+ action_attempt_id: string;
1468
+ result: {};
1469
+ action_type: "SET_THERMOSTAT_OFF";
1470
+ } | {
1471
+ error: {
1472
+ type: string;
1473
+ message: string;
1474
+ };
1475
+ status: "error";
1476
+ action_attempt_id: string;
1477
+ result: null;
1478
+ action_type: "SET_THERMOSTAT_OFF";
1479
+ } | {
1480
+ error: null;
1481
+ status: "pending";
1482
+ action_attempt_id: string;
1483
+ result: null;
1484
+ action_type: "SYNC_ACCESS_CODES";
1485
+ } | {
1486
+ error: null;
1487
+ status: "success";
1488
+ action_attempt_id: string;
1489
+ action_type: "SYNC_ACCESS_CODES";
1490
+ result?: any;
1491
+ } | {
1492
+ error: {
1493
+ type: string;
1494
+ message: string;
1495
+ };
1496
+ status: "error";
1497
+ action_attempt_id: string;
1498
+ result: null;
1499
+ action_type: "SYNC_ACCESS_CODES";
1500
+ } | {
1501
+ error: null;
1502
+ status: "pending";
1503
+ action_attempt_id: string;
1504
+ result: null;
1505
+ action_type: "CREATE_ACCESS_CODE";
1506
+ } | {
1507
+ error: null;
1508
+ status: "success";
1509
+ action_attempt_id: string;
1510
+ action_type: "CREATE_ACCESS_CODE";
1511
+ result?: any;
1512
+ } | {
1513
+ error: {
1514
+ type: string;
1515
+ message: string;
1516
+ };
1517
+ status: "error";
1518
+ action_attempt_id: string;
1519
+ result: null;
1520
+ action_type: "CREATE_ACCESS_CODE";
1521
+ } | {
1522
+ error: null;
1523
+ status: "pending";
1524
+ action_attempt_id: string;
1525
+ result: null;
1526
+ action_type: "DELETE_ACCESS_CODE";
1527
+ } | {
1528
+ error: null;
1529
+ status: "success";
1530
+ action_attempt_id: string;
1531
+ action_type: "DELETE_ACCESS_CODE";
1532
+ result?: any;
1533
+ } | {
1534
+ error: {
1535
+ type: string;
1536
+ message: string;
1537
+ };
1538
+ status: "error";
1539
+ action_attempt_id: string;
1540
+ result: null;
1541
+ action_type: "DELETE_ACCESS_CODE";
1542
+ } | {
1543
+ error: null;
1544
+ status: "pending";
1545
+ action_attempt_id: string;
1546
+ result: null;
1547
+ action_type: "UPDATE_ACCESS_CODE";
1548
+ } | {
1549
+ error: null;
1550
+ status: "success";
1551
+ action_attempt_id: string;
1552
+ action_type: "UPDATE_ACCESS_CODE";
1553
+ result?: any;
1554
+ } | {
1555
+ error: {
1556
+ type: string;
1557
+ message: string;
1558
+ };
1559
+ status: "error";
1560
+ action_attempt_id: string;
1561
+ result: null;
1562
+ action_type: "UPDATE_ACCESS_CODE";
1563
+ } | {
1564
+ error: null;
1565
+ status: "pending";
1566
+ action_attempt_id: string;
1567
+ result: null;
1568
+ action_type: "CREATE_NOISE_THRESHOLD";
1569
+ } | {
1570
+ error: null;
1571
+ status: "success";
1572
+ action_attempt_id: string;
1573
+ action_type: "CREATE_NOISE_THRESHOLD";
1574
+ result?: any;
1575
+ } | {
1576
+ error: {
1577
+ type: string;
1578
+ message: string;
1579
+ };
1580
+ status: "error";
1581
+ action_attempt_id: string;
1582
+ result: null;
1583
+ action_type: "CREATE_NOISE_THRESHOLD";
1584
+ } | {
1585
+ error: null;
1586
+ status: "pending";
1587
+ action_attempt_id: string;
1588
+ result: null;
1589
+ action_type: "DELETE_NOISE_THRESHOLD";
1590
+ } | {
1591
+ error: null;
1592
+ status: "success";
1593
+ action_attempt_id: string;
1594
+ action_type: "DELETE_NOISE_THRESHOLD";
1595
+ result?: any;
1596
+ } | {
1597
+ error: {
1598
+ type: string;
1599
+ message: string;
1600
+ };
1601
+ status: "error";
1602
+ action_attempt_id: string;
1603
+ result: null;
1604
+ action_type: "DELETE_NOISE_THRESHOLD";
1605
+ } | {
1606
+ error: null;
1607
+ status: "pending";
1608
+ action_attempt_id: string;
1609
+ result: null;
1610
+ action_type: "UPDATE_NOISE_THRESHOLD";
1611
+ } | {
1612
+ error: null;
1613
+ status: "success";
1614
+ action_attempt_id: string;
1615
+ action_type: "UPDATE_NOISE_THRESHOLD";
1616
+ result?: any;
1617
+ } | {
1618
+ error: {
1619
+ type: string;
1620
+ message: string;
1621
+ };
1622
+ status: "error";
1623
+ action_attempt_id: string;
1624
+ result: null;
1625
+ action_type: "UPDATE_NOISE_THRESHOLD";
1626
+ }>(error: unknown) => error is SeamActionAttemptFailedError<T>;
1009
1627
  declare class SeamActionAttemptFailedError<T extends ActionAttempt> extends SeamActionAttemptError<T> {
1010
1628
  code: string;
1011
1629
  constructor(actionAttempt: FailedActionAttempt<T>);
1012
1630
  }
1013
- declare const isSeamActionAttemptTimeoutError: <T extends ActionAttempt>(error: unknown) => error is SeamActionAttemptTimeoutError<T>;
1631
+ declare const isSeamActionAttemptTimeoutError: <T extends {
1632
+ error: null;
1633
+ status: "pending";
1634
+ action_attempt_id: string;
1635
+ result: null;
1636
+ action_type: "LOCK_DOOR";
1637
+ } | {
1638
+ error: null;
1639
+ status: "success";
1640
+ action_attempt_id: string;
1641
+ result: {};
1642
+ action_type: "LOCK_DOOR";
1643
+ } | {
1644
+ error: {
1645
+ type: string;
1646
+ message: string;
1647
+ };
1648
+ status: "error";
1649
+ action_attempt_id: string;
1650
+ result: null;
1651
+ action_type: "LOCK_DOOR";
1652
+ } | {
1653
+ error: null;
1654
+ status: "pending";
1655
+ action_attempt_id: string;
1656
+ result: null;
1657
+ action_type: "UNLOCK_DOOR";
1658
+ } | {
1659
+ error: null;
1660
+ status: "success";
1661
+ action_attempt_id: string;
1662
+ result: {};
1663
+ action_type: "UNLOCK_DOOR";
1664
+ } | {
1665
+ error: {
1666
+ type: string;
1667
+ message: string;
1668
+ };
1669
+ status: "error";
1670
+ action_attempt_id: string;
1671
+ result: null;
1672
+ action_type: "UNLOCK_DOOR";
1673
+ } | {
1674
+ error: null;
1675
+ status: "pending";
1676
+ action_attempt_id: string;
1677
+ result: null;
1678
+ action_type: "RESET_SANDBOX_WORKSPACE";
1679
+ } | {
1680
+ error: null;
1681
+ status: "success";
1682
+ action_attempt_id: string;
1683
+ result: {};
1684
+ action_type: "RESET_SANDBOX_WORKSPACE";
1685
+ } | {
1686
+ error: {
1687
+ type: string;
1688
+ message: string;
1689
+ };
1690
+ status: "error";
1691
+ action_attempt_id: string;
1692
+ result: null;
1693
+ action_type: "RESET_SANDBOX_WORKSPACE";
1694
+ } | {
1695
+ error: null;
1696
+ status: "pending";
1697
+ action_attempt_id: string;
1698
+ result: null;
1699
+ action_type: "SET_COOL";
1700
+ } | {
1701
+ error: null;
1702
+ status: "success";
1703
+ action_attempt_id: string;
1704
+ result: {};
1705
+ action_type: "SET_COOL";
1706
+ } | {
1707
+ error: {
1708
+ type: string;
1709
+ message: string;
1710
+ };
1711
+ status: "error";
1712
+ action_attempt_id: string;
1713
+ result: null;
1714
+ action_type: "SET_COOL";
1715
+ } | {
1716
+ error: null;
1717
+ status: "pending";
1718
+ action_attempt_id: string;
1719
+ result: null;
1720
+ action_type: "SET_HEAT";
1721
+ } | {
1722
+ error: null;
1723
+ status: "success";
1724
+ action_attempt_id: string;
1725
+ result: {};
1726
+ action_type: "SET_HEAT";
1727
+ } | {
1728
+ error: {
1729
+ type: string;
1730
+ message: string;
1731
+ };
1732
+ status: "error";
1733
+ action_attempt_id: string;
1734
+ result: null;
1735
+ action_type: "SET_HEAT";
1736
+ } | {
1737
+ error: null;
1738
+ status: "pending";
1739
+ action_attempt_id: string;
1740
+ result: null;
1741
+ action_type: "SET_HEAT_COOL";
1742
+ } | {
1743
+ error: null;
1744
+ status: "success";
1745
+ action_attempt_id: string;
1746
+ result: {};
1747
+ action_type: "SET_HEAT_COOL";
1748
+ } | {
1749
+ error: {
1750
+ type: string;
1751
+ message: string;
1752
+ };
1753
+ status: "error";
1754
+ action_attempt_id: string;
1755
+ result: null;
1756
+ action_type: "SET_HEAT_COOL";
1757
+ } | {
1758
+ error: null;
1759
+ status: "pending";
1760
+ action_attempt_id: string;
1761
+ result: null;
1762
+ action_type: "SET_FAN_MODE";
1763
+ } | {
1764
+ error: null;
1765
+ status: "success";
1766
+ action_attempt_id: string;
1767
+ result: {};
1768
+ action_type: "SET_FAN_MODE";
1769
+ } | {
1770
+ error: {
1771
+ type: string;
1772
+ message: string;
1773
+ };
1774
+ status: "error";
1775
+ action_attempt_id: string;
1776
+ result: null;
1777
+ action_type: "SET_FAN_MODE";
1778
+ } | {
1779
+ error: null;
1780
+ status: "pending";
1781
+ action_attempt_id: string;
1782
+ result: null;
1783
+ action_type: "SET_THERMOSTAT_OFF";
1784
+ } | {
1785
+ error: null;
1786
+ status: "success";
1787
+ action_attempt_id: string;
1788
+ result: {};
1789
+ action_type: "SET_THERMOSTAT_OFF";
1790
+ } | {
1791
+ error: {
1792
+ type: string;
1793
+ message: string;
1794
+ };
1795
+ status: "error";
1796
+ action_attempt_id: string;
1797
+ result: null;
1798
+ action_type: "SET_THERMOSTAT_OFF";
1799
+ } | {
1800
+ error: null;
1801
+ status: "pending";
1802
+ action_attempt_id: string;
1803
+ result: null;
1804
+ action_type: "SYNC_ACCESS_CODES";
1805
+ } | {
1806
+ error: null;
1807
+ status: "success";
1808
+ action_attempt_id: string;
1809
+ action_type: "SYNC_ACCESS_CODES";
1810
+ result?: any;
1811
+ } | {
1812
+ error: {
1813
+ type: string;
1814
+ message: string;
1815
+ };
1816
+ status: "error";
1817
+ action_attempt_id: string;
1818
+ result: null;
1819
+ action_type: "SYNC_ACCESS_CODES";
1820
+ } | {
1821
+ error: null;
1822
+ status: "pending";
1823
+ action_attempt_id: string;
1824
+ result: null;
1825
+ action_type: "CREATE_ACCESS_CODE";
1826
+ } | {
1827
+ error: null;
1828
+ status: "success";
1829
+ action_attempt_id: string;
1830
+ action_type: "CREATE_ACCESS_CODE";
1831
+ result?: any;
1832
+ } | {
1833
+ error: {
1834
+ type: string;
1835
+ message: string;
1836
+ };
1837
+ status: "error";
1838
+ action_attempt_id: string;
1839
+ result: null;
1840
+ action_type: "CREATE_ACCESS_CODE";
1841
+ } | {
1842
+ error: null;
1843
+ status: "pending";
1844
+ action_attempt_id: string;
1845
+ result: null;
1846
+ action_type: "DELETE_ACCESS_CODE";
1847
+ } | {
1848
+ error: null;
1849
+ status: "success";
1850
+ action_attempt_id: string;
1851
+ action_type: "DELETE_ACCESS_CODE";
1852
+ result?: any;
1853
+ } | {
1854
+ error: {
1855
+ type: string;
1856
+ message: string;
1857
+ };
1858
+ status: "error";
1859
+ action_attempt_id: string;
1860
+ result: null;
1861
+ action_type: "DELETE_ACCESS_CODE";
1862
+ } | {
1863
+ error: null;
1864
+ status: "pending";
1865
+ action_attempt_id: string;
1866
+ result: null;
1867
+ action_type: "UPDATE_ACCESS_CODE";
1868
+ } | {
1869
+ error: null;
1870
+ status: "success";
1871
+ action_attempt_id: string;
1872
+ action_type: "UPDATE_ACCESS_CODE";
1873
+ result?: any;
1874
+ } | {
1875
+ error: {
1876
+ type: string;
1877
+ message: string;
1878
+ };
1879
+ status: "error";
1880
+ action_attempt_id: string;
1881
+ result: null;
1882
+ action_type: "UPDATE_ACCESS_CODE";
1883
+ } | {
1884
+ error: null;
1885
+ status: "pending";
1886
+ action_attempt_id: string;
1887
+ result: null;
1888
+ action_type: "CREATE_NOISE_THRESHOLD";
1889
+ } | {
1890
+ error: null;
1891
+ status: "success";
1892
+ action_attempt_id: string;
1893
+ action_type: "CREATE_NOISE_THRESHOLD";
1894
+ result?: any;
1895
+ } | {
1896
+ error: {
1897
+ type: string;
1898
+ message: string;
1899
+ };
1900
+ status: "error";
1901
+ action_attempt_id: string;
1902
+ result: null;
1903
+ action_type: "CREATE_NOISE_THRESHOLD";
1904
+ } | {
1905
+ error: null;
1906
+ status: "pending";
1907
+ action_attempt_id: string;
1908
+ result: null;
1909
+ action_type: "DELETE_NOISE_THRESHOLD";
1910
+ } | {
1911
+ error: null;
1912
+ status: "success";
1913
+ action_attempt_id: string;
1914
+ action_type: "DELETE_NOISE_THRESHOLD";
1915
+ result?: any;
1916
+ } | {
1917
+ error: {
1918
+ type: string;
1919
+ message: string;
1920
+ };
1921
+ status: "error";
1922
+ action_attempt_id: string;
1923
+ result: null;
1924
+ action_type: "DELETE_NOISE_THRESHOLD";
1925
+ } | {
1926
+ error: null;
1927
+ status: "pending";
1928
+ action_attempt_id: string;
1929
+ result: null;
1930
+ action_type: "UPDATE_NOISE_THRESHOLD";
1931
+ } | {
1932
+ error: null;
1933
+ status: "success";
1934
+ action_attempt_id: string;
1935
+ action_type: "UPDATE_NOISE_THRESHOLD";
1936
+ result?: any;
1937
+ } | {
1938
+ error: {
1939
+ type: string;
1940
+ message: string;
1941
+ };
1942
+ status: "error";
1943
+ action_attempt_id: string;
1944
+ result: null;
1945
+ action_type: "UPDATE_NOISE_THRESHOLD";
1946
+ }>(error: unknown) => error is SeamActionAttemptTimeoutError<T>;
1014
1947
  declare class SeamActionAttemptTimeoutError<T extends ActionAttempt> extends SeamActionAttemptError<T> {
1015
1948
  constructor(actionAttempt: T, timeout: number);
1016
1949
  }
1950
+ type FailedActionAttempt<T extends ActionAttempt> = Extract<T, {
1951
+ status: 'error';
1952
+ }>;
1017
1953
 
1018
1954
  type SeamHttpMultiWorkspaceOptions = SeamHttpMultiWorkspaceOptionsWithClient | SeamHttpMultiWorkspaceOptionsWithConsoleSessionToken | SeamHttpMultiWorkspaceOptionsWithPersonalAccessToken;
1019
1955
  type SeamHttpOptions = SeamHttpOptionsFromEnv | SeamHttpOptionsWithClient | SeamHttpOptionsWithApiKey | SeamHttpOptionsWithClientSessionToken | SeamHttpOptionsWithConsoleSessionToken | SeamHttpOptionsWithPersonalAccessToken;