@seamapi/http 2.38.0 → 2.40.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.
Files changed (48) hide show
  1. package/lib/resources/access-grant.d.ts +9 -5
  2. package/lib/resources/access-method.d.ts +39 -1
  3. package/lib/resources/acs-entrance.d.ts +6 -2
  4. package/lib/resources/acs-system.d.ts +15 -0
  5. package/lib/resources/action-attempt.d.ts +341 -8
  6. package/lib/resources/connect-webview.d.ts +1 -1
  7. package/lib/resources/connected-account.d.ts +1 -1
  8. package/lib/resources/device-provider.d.ts +25 -1
  9. package/lib/resources/device.d.ts +121 -2
  10. package/lib/resources/event.d.ts +1 -1
  11. package/lib/resources/phone.d.ts +702 -10
  12. package/lib/resources/unmanaged-access-grant.d.ts +9 -5
  13. package/lib/resources/unmanaged-access-method.d.ts +39 -1
  14. package/lib/resources/unmanaged-device.d.ts +25 -1
  15. package/lib/routes/connect-webviews/connect-webviews.d.ts +2 -2
  16. package/lib/routes/connected-accounts/connected-accounts.d.ts +1 -1
  17. package/lib/routes/customers/customers.d.ts +21 -0
  18. package/lib/routes/customers/customers.js +1 -0
  19. package/lib/routes/customers/customers.js.map +1 -1
  20. package/lib/routes/devices/devices.d.ts +3 -3
  21. package/lib/routes/devices/unmanaged/unmanaged.d.ts +3 -3
  22. package/lib/routes/seam-http-endpoints.d.ts +1 -0
  23. package/lib/routes/seam-http-endpoints.js +1 -0
  24. package/lib/routes/seam-http-endpoints.js.map +1 -1
  25. package/lib/version.d.ts +1 -1
  26. package/lib/version.js +1 -1
  27. package/package.json +2 -2
  28. package/src/lib/resources/access-grant.ts +9 -6
  29. package/src/lib/resources/access-method.ts +47 -1
  30. package/src/lib/resources/acs-entrance.ts +17 -12
  31. package/src/lib/resources/acs-system.ts +18 -0
  32. package/src/lib/resources/action-attempt.ts +434 -24
  33. package/src/lib/resources/connect-webview.ts +6 -1
  34. package/src/lib/resources/connected-account.ts +6 -1
  35. package/src/lib/resources/device-provider.ts +25 -0
  36. package/src/lib/resources/device.ts +136 -1
  37. package/src/lib/resources/event.ts +1 -0
  38. package/src/lib/resources/phone.ts +855 -22
  39. package/src/lib/resources/unmanaged-access-grant.ts +9 -6
  40. package/src/lib/resources/unmanaged-access-method.ts +47 -1
  41. package/src/lib/resources/unmanaged-device.ts +25 -0
  42. package/src/lib/routes/connect-webviews/connect-webviews.ts +7 -1
  43. package/src/lib/routes/connected-accounts/connected-accounts.ts +6 -1
  44. package/src/lib/routes/customers/customers.ts +21 -0
  45. package/src/lib/routes/devices/devices.ts +3 -0
  46. package/src/lib/routes/devices/unmanaged/unmanaged.ts +3 -0
  47. package/src/lib/routes/seam-http-endpoints.ts +1 -0
  48. package/src/lib/version.ts +1 -1
@@ -1335,7 +1335,7 @@ export type ActionAttempt =
1335
1335
  */
1336
1336
  is_ready_for_assignment?: boolean | undefined
1337
1337
  /**
1338
- * Indicates whether the access method is ready to be encoded. This is true when the credential has been created and the card has not yet been issued.
1338
+ * Indicates whether the access method is ready to be encoded. This is true when the card has not yet been issued and the access system has received all the access the card needs. While it is false, `pending_mutations` contains `waiting_for_access_on_acs_system`.
1339
1339
  */
1340
1340
  is_ready_for_encoding?: boolean | undefined
1341
1341
  /**
@@ -1359,41 +1359,47 @@ export type ActionAttempt =
1359
1359
  /**
1360
1360
  * Previous access time configuration.
1361
1361
  */
1362
- from: {
1363
- /**
1364
- * Previous end time for access.
1365
- */
1366
- ends_at: string | null
1367
- /**
1368
- * Previous start time for access.
1369
- */
1370
- starts_at: string | null
1371
- }
1372
-
1362
+ from?:
1363
+ | {
1364
+ /**
1365
+ * Previous end time for access.
1366
+ */
1367
+ ends_at: string | null
1368
+ /**
1369
+ * Previous start time for access.
1370
+ */
1371
+ starts_at: string | null
1372
+ }
1373
+ | undefined
1373
1374
  /**
1374
1375
  * Detailed description of the mutation.
1375
1376
  */
1376
1377
  message: string
1377
1378
 
1378
1379
  /**
1379
- * Mutation code to indicate that Seam is in the process of updating the access times for this access method.
1380
+ * Mutation code to indicate that the access system has not yet received all the access this card needs, so the card is not ready to be encoded.
1380
1381
  */
1381
1382
  mutation_code:
1382
- 'provisioning_access' | 'revoking_access' | 'updating_access_times'
1383
+ | 'provisioning_access'
1384
+ | 'revoking_access'
1385
+ | 'updating_access_times'
1386
+ | 'waiting_for_access_on_acs_system'
1383
1387
 
1384
1388
  /**
1385
1389
  * New access time configuration.
1386
1390
  */
1387
- to: {
1388
- /**
1389
- * New end time for access.
1390
- */
1391
- ends_at: string | null
1392
- /**
1393
- * New start time for access.
1394
- */
1395
- starts_at: string | null
1396
- }
1391
+ to?:
1392
+ | {
1393
+ /**
1394
+ * New end time for access.
1395
+ */
1396
+ ends_at: string | null
1397
+ /**
1398
+ * New start time for access.
1399
+ */
1400
+ starts_at: string | null
1401
+ }
1402
+ | undefined
1397
1403
  }>
1398
1404
 
1399
1405
  /**
@@ -1420,11 +1426,20 @@ export type ActionAttempt =
1420
1426
  | 'delay_in_issuing'
1421
1427
  | 'user_identity_missing_email_address'
1422
1428
  | 'user_identity_missing_phone_number'
1429
+ | 'requested_code_unavailable'
1423
1430
 
1424
1431
  /**
1425
1432
  * ID of the original access method from which this backup access method was split, if applicable.
1426
1433
  */
1427
1434
  original_access_method_id?: string | undefined
1435
+ /**
1436
+ * The PIN code that was assigned instead.
1437
+ */
1438
+ new_code?: string | undefined
1439
+ /**
1440
+ * The originally requested PIN code that could not be used.
1441
+ */
1442
+ original_code?: string | undefined
1428
1443
  }>
1429
1444
 
1430
1445
  /**
@@ -2263,6 +2278,401 @@ export type ActionAttempt =
2263
2278
  */
2264
2279
  action_attempt_id: string
2265
2280
 
2281
+ /**
2282
+ * Action attempt to track the status of setting the volume on a speaker.
2283
+ */
2284
+ action_type: 'SET_SPEAKER_VOLUME'
2285
+
2286
+ /**
2287
+ * Error associated with the action.
2288
+ */
2289
+ error: null
2290
+ /**
2291
+ * Result of the action.
2292
+ */
2293
+ result: {}
2294
+
2295
+ status: 'success'
2296
+ }
2297
+ | {
2298
+ /**
2299
+ * ID of the action attempt.
2300
+ */
2301
+ action_attempt_id: string
2302
+
2303
+ /**
2304
+ * Action attempt to track the status of setting the volume on a speaker.
2305
+ */
2306
+ action_type: 'SET_SPEAKER_VOLUME'
2307
+
2308
+ /**
2309
+ * Error associated with the action.
2310
+ */
2311
+ error: null
2312
+ /**
2313
+ * Result of the action.
2314
+ */
2315
+ result: null
2316
+
2317
+ status: 'pending'
2318
+ }
2319
+ | {
2320
+ /**
2321
+ * ID of the action attempt.
2322
+ */
2323
+ action_attempt_id: string
2324
+
2325
+ /**
2326
+ * Action attempt to track the status of setting the volume on a speaker.
2327
+ */
2328
+ action_type: 'SET_SPEAKER_VOLUME'
2329
+
2330
+ /**
2331
+ * Error associated with the action.
2332
+ */
2333
+ error: {
2334
+ /**
2335
+ * Detailed description of the error. Provides insights into the issue and potentially how to rectify it.
2336
+ */
2337
+ message: string
2338
+
2339
+ /**
2340
+ * Type of the error.
2341
+ */
2342
+ type: string
2343
+ }
2344
+
2345
+ /**
2346
+ * Result of the action.
2347
+ */
2348
+ result: null
2349
+
2350
+ status: 'error'
2351
+ }
2352
+ | {
2353
+ /**
2354
+ * ID of the action attempt.
2355
+ */
2356
+ action_attempt_id: string
2357
+
2358
+ /**
2359
+ * Action attempt to track the status of muting or unmuting a speaker.
2360
+ */
2361
+ action_type: 'SET_SPEAKER_MUTE'
2362
+
2363
+ /**
2364
+ * Error associated with the action.
2365
+ */
2366
+ error: null
2367
+ /**
2368
+ * Result of the action.
2369
+ */
2370
+ result: {}
2371
+
2372
+ status: 'success'
2373
+ }
2374
+ | {
2375
+ /**
2376
+ * ID of the action attempt.
2377
+ */
2378
+ action_attempt_id: string
2379
+
2380
+ /**
2381
+ * Action attempt to track the status of muting or unmuting a speaker.
2382
+ */
2383
+ action_type: 'SET_SPEAKER_MUTE'
2384
+
2385
+ /**
2386
+ * Error associated with the action.
2387
+ */
2388
+ error: null
2389
+ /**
2390
+ * Result of the action.
2391
+ */
2392
+ result: null
2393
+
2394
+ status: 'pending'
2395
+ }
2396
+ | {
2397
+ /**
2398
+ * ID of the action attempt.
2399
+ */
2400
+ action_attempt_id: string
2401
+
2402
+ /**
2403
+ * Action attempt to track the status of muting or unmuting a speaker.
2404
+ */
2405
+ action_type: 'SET_SPEAKER_MUTE'
2406
+
2407
+ /**
2408
+ * Error associated with the action.
2409
+ */
2410
+ error: {
2411
+ /**
2412
+ * Detailed description of the error. Provides insights into the issue and potentially how to rectify it.
2413
+ */
2414
+ message: string
2415
+
2416
+ /**
2417
+ * Type of the error.
2418
+ */
2419
+ type: string
2420
+ }
2421
+
2422
+ /**
2423
+ * Result of the action.
2424
+ */
2425
+ result: null
2426
+
2427
+ status: 'error'
2428
+ }
2429
+ | {
2430
+ /**
2431
+ * ID of the action attempt.
2432
+ */
2433
+ action_attempt_id: string
2434
+
2435
+ /**
2436
+ * Action attempt to track the status of pausing playback on a speaker.
2437
+ */
2438
+ action_type: 'PAUSE_SPEAKER_PLAYBACK'
2439
+
2440
+ /**
2441
+ * Error associated with the action.
2442
+ */
2443
+ error: null
2444
+ /**
2445
+ * Result of the action.
2446
+ */
2447
+ result: {
2448
+ /**
2449
+ * IDs of the speakers whose playback was paused, including speakers grouped with the requested speaker.
2450
+ */
2451
+ affected_device_ids: Array<string>
2452
+ }
2453
+
2454
+ status: 'success'
2455
+ }
2456
+ | {
2457
+ /**
2458
+ * ID of the action attempt.
2459
+ */
2460
+ action_attempt_id: string
2461
+
2462
+ /**
2463
+ * Action attempt to track the status of pausing playback on a speaker.
2464
+ */
2465
+ action_type: 'PAUSE_SPEAKER_PLAYBACK'
2466
+
2467
+ /**
2468
+ * Error associated with the action.
2469
+ */
2470
+ error: null
2471
+ /**
2472
+ * Result of the action.
2473
+ */
2474
+ result: null
2475
+
2476
+ status: 'pending'
2477
+ }
2478
+ | {
2479
+ /**
2480
+ * ID of the action attempt.
2481
+ */
2482
+ action_attempt_id: string
2483
+
2484
+ /**
2485
+ * Action attempt to track the status of pausing playback on a speaker.
2486
+ */
2487
+ action_type: 'PAUSE_SPEAKER_PLAYBACK'
2488
+
2489
+ /**
2490
+ * Error associated with the action.
2491
+ */
2492
+ error: {
2493
+ /**
2494
+ * Detailed description of the error. Provides insights into the issue and potentially how to rectify it.
2495
+ */
2496
+ message: string
2497
+
2498
+ /**
2499
+ * Type of the error.
2500
+ */
2501
+ type: string
2502
+ }
2503
+
2504
+ /**
2505
+ * Result of the action.
2506
+ */
2507
+ result: null
2508
+
2509
+ status: 'error'
2510
+ }
2511
+ | {
2512
+ /**
2513
+ * ID of the action attempt.
2514
+ */
2515
+ action_attempt_id: string
2516
+
2517
+ /**
2518
+ * Action attempt to track the status of resuming playback on a speaker.
2519
+ */
2520
+ action_type: 'RESUME_SPEAKER_PLAYBACK'
2521
+
2522
+ /**
2523
+ * Error associated with the action.
2524
+ */
2525
+ error: null
2526
+ /**
2527
+ * Result of the action.
2528
+ */
2529
+ result: {
2530
+ /**
2531
+ * IDs of the speakers whose playback was resumed, including speakers grouped with the requested speaker.
2532
+ */
2533
+ affected_device_ids: Array<string>
2534
+ }
2535
+
2536
+ status: 'success'
2537
+ }
2538
+ | {
2539
+ /**
2540
+ * ID of the action attempt.
2541
+ */
2542
+ action_attempt_id: string
2543
+
2544
+ /**
2545
+ * Action attempt to track the status of resuming playback on a speaker.
2546
+ */
2547
+ action_type: 'RESUME_SPEAKER_PLAYBACK'
2548
+
2549
+ /**
2550
+ * Error associated with the action.
2551
+ */
2552
+ error: null
2553
+ /**
2554
+ * Result of the action.
2555
+ */
2556
+ result: null
2557
+
2558
+ status: 'pending'
2559
+ }
2560
+ | {
2561
+ /**
2562
+ * ID of the action attempt.
2563
+ */
2564
+ action_attempt_id: string
2565
+
2566
+ /**
2567
+ * Action attempt to track the status of resuming playback on a speaker.
2568
+ */
2569
+ action_type: 'RESUME_SPEAKER_PLAYBACK'
2570
+
2571
+ /**
2572
+ * Error associated with the action.
2573
+ */
2574
+ error: {
2575
+ /**
2576
+ * Detailed description of the error. Provides insights into the issue and potentially how to rectify it.
2577
+ */
2578
+ message: string
2579
+
2580
+ /**
2581
+ * Type of the error.
2582
+ */
2583
+ type: string
2584
+ }
2585
+
2586
+ /**
2587
+ * Result of the action.
2588
+ */
2589
+ result: null
2590
+
2591
+ status: 'error'
2592
+ }
2593
+ | {
2594
+ /**
2595
+ * ID of the action attempt.
2596
+ */
2597
+ action_attempt_id: string
2598
+
2599
+ /**
2600
+ * Action attempt to track the status of playing a chime on a speaker.
2601
+ */
2602
+ action_type: 'PLAY_SPEAKER_CHIME'
2603
+
2604
+ /**
2605
+ * Error associated with the action.
2606
+ */
2607
+ error: null
2608
+ /**
2609
+ * Result of the action.
2610
+ */
2611
+ result: {}
2612
+
2613
+ status: 'success'
2614
+ }
2615
+ | {
2616
+ /**
2617
+ * ID of the action attempt.
2618
+ */
2619
+ action_attempt_id: string
2620
+
2621
+ /**
2622
+ * Action attempt to track the status of playing a chime on a speaker.
2623
+ */
2624
+ action_type: 'PLAY_SPEAKER_CHIME'
2625
+
2626
+ /**
2627
+ * Error associated with the action.
2628
+ */
2629
+ error: null
2630
+ /**
2631
+ * Result of the action.
2632
+ */
2633
+ result: null
2634
+
2635
+ status: 'pending'
2636
+ }
2637
+ | {
2638
+ /**
2639
+ * ID of the action attempt.
2640
+ */
2641
+ action_attempt_id: string
2642
+
2643
+ /**
2644
+ * Action attempt to track the status of playing a chime on a speaker.
2645
+ */
2646
+ action_type: 'PLAY_SPEAKER_CHIME'
2647
+
2648
+ /**
2649
+ * Error associated with the action.
2650
+ */
2651
+ error: {
2652
+ /**
2653
+ * Detailed description of the error. Provides insights into the issue and potentially how to rectify it.
2654
+ */
2655
+ message: string
2656
+
2657
+ /**
2658
+ * Type of the error.
2659
+ */
2660
+ type: string
2661
+ }
2662
+
2663
+ /**
2664
+ * Result of the action.
2665
+ */
2666
+ result: null
2667
+
2668
+ status: 'error'
2669
+ }
2670
+ | {
2671
+ /**
2672
+ * ID of the action attempt.
2673
+ */
2674
+ action_attempt_id: string
2675
+
2266
2676
  /**
2267
2677
  * Syncing access codes is pending.
2268
2678
  */
@@ -21,7 +21,12 @@ export type ConnectWebview = {
21
21
  * High-level device capabilities that the Connect Webview can accept. When creating a Connect Webview, you can specify the types of devices that it can connect to Seam. If you do not set custom `accepted_capabilities`, Seam uses a default set of `accepted_capabilities` for each provider. For example, if you create a Connect Webview that accepts SmartThing devices, without specifying `accepted_capabilities`, Seam accepts only SmartThings locks. To connect SmartThings thermostats and locks to Seam, create a Connect Webview and include both `thermostat` and `lock` in the `accepted_capabilities`.
22
22
  */
23
23
  accepted_capabilities: Array<
24
- 'lock' | 'thermostat' | 'noise_sensor' | 'access_control' | 'camera'
24
+ | 'lock'
25
+ | 'thermostat'
26
+ | 'noise_sensor'
27
+ | 'access_control'
28
+ | 'camera'
29
+ | 'speaker'
25
30
  >
26
31
 
27
32
  /**
@@ -11,7 +11,12 @@ export type ConnectedAccount = {
11
11
  * List of capabilities that were accepted during the account connection process.
12
12
  */
13
13
  accepted_capabilities: Array<
14
- 'lock' | 'thermostat' | 'noise_sensor' | 'access_control' | 'camera'
14
+ | 'lock'
15
+ | 'thermostat'
16
+ | 'noise_sensor'
17
+ | 'access_control'
18
+ | 'camera'
19
+ | 'speaker'
15
20
  >
16
21
 
17
22
  /**
@@ -24,6 +24,18 @@ export type DeviceProvider = {
24
24
  * Indicates whether the thermostat supports simultaneous heating and cooling.
25
25
  */
26
26
  can_hvac_heat_cool?: boolean | undefined
27
+ /**
28
+ * Indicates whether the speaker supports muting.
29
+ */
30
+ can_mute_speaker?: boolean | undefined
31
+ /**
32
+ * Indicates whether the speaker supports pausing playback.
33
+ */
34
+ can_pause_speaker_playback?: boolean | undefined
35
+ /**
36
+ * Indicates whether the speaker supports playing a chime.
37
+ */
38
+ can_play_speaker_chime?: boolean | undefined
27
39
  /**
28
40
  * Indicates whether the device supports programming offline access codes.
29
41
  */
@@ -52,10 +64,18 @@ export type DeviceProvider = {
52
64
  * Indicates whether the device supports remote unlocking.
53
65
  */
54
66
  can_remotely_unlock?: boolean | undefined
67
+ /**
68
+ * Indicates whether the speaker supports resuming playback.
69
+ */
70
+ can_resume_speaker_playback?: boolean | undefined
55
71
  /**
56
72
  * Indicates whether the thermostat supports running climate programs.
57
73
  */
58
74
  can_run_thermostat_programs?: boolean | undefined
75
+ /**
76
+ * Indicates whether the speaker supports setting its volume.
77
+ */
78
+ can_set_speaker_volume?: boolean | undefined
59
79
  /**
60
80
  * Indicates whether the device supports simulating connection in a sandbox.
61
81
  */
@@ -92,6 +112,10 @@ export type DeviceProvider = {
92
112
  * Indicates whether the lock supports unlocking with an access code.
93
113
  */
94
114
  can_unlock_with_code?: boolean | undefined
115
+ /**
116
+ * Indicates whether the speaker supports unmuting.
117
+ */
118
+ can_unmute_speaker?: boolean | undefined
95
119
  /**
96
120
  * Name of the device provider.
97
121
  */
@@ -164,6 +188,7 @@ export type DeviceProvider = {
164
188
  | 'omnitec'
165
189
  | 'kisi'
166
190
  | 'aqara'
191
+ | 'sonos'
167
192
 
168
193
  /**
169
194
  * Display name for the device provider.