@seamapi/types 1.1125.0 → 1.1126.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 (27) hide show
  1. package/lib/seam/connect/models/action-attempts/action-attempt.d.ts +160 -0
  2. package/lib/seam/connect/models/action-attempts/action-attempt.js +4 -0
  3. package/lib/seam/connect/models/action-attempts/action-attempt.js.map +1 -1
  4. package/lib/seam/connect/models/action-attempts/play-speaker-audio-clip.d.ts +77 -0
  5. package/lib/seam/connect/models/action-attempts/play-speaker-audio-clip.js +31 -0
  6. package/lib/seam/connect/models/action-attempts/play-speaker-audio-clip.js.map +1 -0
  7. package/lib/seam/connect/models/action-attempts/play-speaker-favorite.d.ts +87 -0
  8. package/lib/seam/connect/models/action-attempts/play-speaker-favorite.js +37 -0
  9. package/lib/seam/connect/models/action-attempts/play-speaker-favorite.js.map +1 -0
  10. package/lib/seam/connect/models/devices/capability-properties/speaker.js +1 -1
  11. package/lib/seam/connect/models/devices/capability-properties/speaker.js.map +1 -1
  12. package/lib/seam/connect/models/devices/device-provider.d.ts +6 -0
  13. package/lib/seam/connect/models/devices/device.d.ts +12 -0
  14. package/lib/seam/connect/models/devices/device.js +6 -0
  15. package/lib/seam/connect/models/devices/device.js.map +1 -1
  16. package/lib/seam/connect/models/devices/unmanaged-device.d.ts +8 -0
  17. package/lib/seam/connect/openapi.js +467 -1
  18. package/lib/seam/connect/openapi.js.map +1 -1
  19. package/lib/seam/connect/route-types.d.ts +7392 -36
  20. package/package.json +1 -1
  21. package/src/lib/seam/connect/models/action-attempts/action-attempt.ts +4 -0
  22. package/src/lib/seam/connect/models/action-attempts/play-speaker-audio-clip.ts +46 -0
  23. package/src/lib/seam/connect/models/action-attempts/play-speaker-favorite.ts +54 -0
  24. package/src/lib/seam/connect/models/devices/capability-properties/speaker.ts +3 -1
  25. package/src/lib/seam/connect/models/devices/device.ts +10 -0
  26. package/src/lib/seam/connect/openapi.ts +503 -1
  27. package/src/lib/seam/connect/route-types.ts +8301 -21
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seamapi/types",
3
- "version": "1.1125.0",
3
+ "version": "1.1126.0",
4
4
  "description": "TypeScript types for the Seam API.",
5
5
  "type": "module",
6
6
  "main": "index.js",
@@ -9,7 +9,9 @@ import { deprecated_action_attempts } from './deprecated.js'
9
9
  import { encode_credential_action_attempt } from './encode-credential.js'
10
10
  import { lock_door_action_attempt } from './lock-door.js'
11
11
  import { pause_speaker_playback_action_attempt } from './pause-speaker-playback.js'
12
+ import { play_speaker_audio_clip_action_attempt } from './play-speaker-audio-clip.js'
12
13
  import { play_speaker_chime_action_attempt } from './play-speaker-chime.js'
14
+ import { play_speaker_favorite_action_attempt } from './play-speaker-favorite.js'
13
15
  import { push_thermostat_programs_action_attempt } from './push-thermostat-programs.js'
14
16
  import { reset_sandbox_workspace_action_attempt } from './reset-sandbox-workspace.js'
15
17
  import { resume_speaker_playback_action_attempt } from './resume-speaker-playback.js'
@@ -45,6 +47,8 @@ export const action_attempt = z.union([
45
47
  ...pause_speaker_playback_action_attempt.options,
46
48
  ...resume_speaker_playback_action_attempt.options,
47
49
  ...play_speaker_chime_action_attempt.options,
50
+ ...play_speaker_favorite_action_attempt.options,
51
+ ...play_speaker_audio_clip_action_attempt.options,
48
52
  ...deprecated_action_attempts,
49
53
  ]).describe(`
50
54
  ---
@@ -0,0 +1,46 @@
1
+ import * as z from 'zod/v3'
2
+
3
+ import {
4
+ common_failed_action_attempt,
5
+ common_pending_action_attempt,
6
+ common_succeeded_action_attempt,
7
+ } from './common.js'
8
+
9
+ const action_type = z
10
+ .literal('PLAY_SPEAKER_AUDIO_CLIP')
11
+ .describe(
12
+ 'Action attempt to track the status of playing an audio clip on a speaker.',
13
+ )
14
+
15
+ const error = z
16
+ .object({
17
+ type: z.string().describe('Type of the error.'),
18
+ message: z
19
+ .string()
20
+ .describe(
21
+ 'Detailed description of the error. Provides insights into the issue and potentially how to rectify it.',
22
+ ),
23
+ })
24
+ .describe('Error associated with the action.')
25
+
26
+ const result = z.object({}).describe('Result of the action.')
27
+
28
+ export const play_speaker_audio_clip_action_attempt = z.discriminatedUnion(
29
+ 'status',
30
+ [
31
+ common_pending_action_attempt
32
+ .extend({
33
+ action_type,
34
+ })
35
+ .describe('Playing an audio clip on the speaker is pending.'),
36
+ common_succeeded_action_attempt
37
+ .extend({
38
+ action_type,
39
+ result,
40
+ })
41
+ .describe('Playing an audio clip on the speaker succeeded.'),
42
+ common_failed_action_attempt
43
+ .extend({ action_type, error })
44
+ .describe('Playing an audio clip on the speaker failed.'),
45
+ ],
46
+ )
@@ -0,0 +1,54 @@
1
+ import * as z from 'zod/v3'
2
+
3
+ import {
4
+ common_failed_action_attempt,
5
+ common_pending_action_attempt,
6
+ common_succeeded_action_attempt,
7
+ } from './common.js'
8
+
9
+ const action_type = z
10
+ .literal('PLAY_SPEAKER_FAVORITE')
11
+ .describe(
12
+ 'Action attempt to track the status of playing a favorite on a speaker.',
13
+ )
14
+
15
+ const error = z
16
+ .object({
17
+ type: z.string().describe('Type of the error.'),
18
+ message: z
19
+ .string()
20
+ .describe(
21
+ 'Detailed description of the error. Provides insights into the issue and potentially how to rectify it.',
22
+ ),
23
+ })
24
+ .describe('Error associated with the action.')
25
+
26
+ const result = z
27
+ .object({
28
+ affected_device_ids: z
29
+ .array(z.string().uuid())
30
+ .describe(
31
+ 'IDs of the speakers now playing the favorite, including speakers grouped with the requested speaker.',
32
+ ),
33
+ })
34
+ .describe('Result of the action.')
35
+
36
+ export const play_speaker_favorite_action_attempt = z.discriminatedUnion(
37
+ 'status',
38
+ [
39
+ common_pending_action_attempt
40
+ .extend({
41
+ action_type,
42
+ })
43
+ .describe('Playing a favorite on the speaker is pending.'),
44
+ common_succeeded_action_attempt
45
+ .extend({
46
+ action_type,
47
+ result,
48
+ })
49
+ .describe('Playing a favorite on the speaker succeeded.'),
50
+ common_failed_action_attempt
51
+ .extend({ action_type, error })
52
+ .describe('Playing a favorite on the speaker failed.'),
53
+ ],
54
+ )
@@ -58,7 +58,9 @@ export const speaker_capability_properties = z.object({
58
58
  ),
59
59
  supports_chime: z
60
60
  .boolean()
61
- .describe('Indicates whether the speaker can play a chime.'),
61
+ .describe(
62
+ 'Indicates whether the speaker can play a chime or an audio clip.',
63
+ ),
62
64
  volume_reported_at: z
63
65
  .string()
64
66
  .datetime()
@@ -129,6 +129,16 @@ export const device_capability_flags = z
129
129
  can_play_speaker_chime: z
130
130
  .boolean()
131
131
  .describe('Indicates whether the speaker supports playing a chime.'),
132
+ can_play_speaker_favorite: z
133
+ .boolean()
134
+ .describe(
135
+ "Indicates whether the speaker supports listing and playing the favorites saved in the speaker manufacturer's app, such as playlists and radio stations.",
136
+ ),
137
+ can_play_speaker_audio_clip: z
138
+ .boolean()
139
+ .describe(
140
+ 'Indicates whether the speaker supports playing an audio clip from a URL.',
141
+ ),
132
142
  })
133
143
  .partial()
134
144