@seamapi/types 1.1102.0 → 1.1104.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.
- package/lib/seam/connect/models/access-grants/access-grant.d.ts +37 -21
- package/lib/seam/connect/models/access-grants/access-grant.js +4 -3
- package/lib/seam/connect/models/access-grants/access-grant.js.map +1 -1
- package/lib/seam/connect/models/acs/acs-access-group.js +2 -2
- package/lib/seam/connect/models/acs/acs-access-group.js.map +1 -1
- package/lib/seam/connect/models/acs/acs-entrance.d.ts +38 -8
- package/lib/seam/connect/models/acs/acs-entrance.js +22 -9
- package/lib/seam/connect/models/acs/acs-entrance.js.map +1 -1
- package/lib/seam/connect/models/acs/acs-users/acs-user.d.ts +75 -4
- package/lib/seam/connect/models/acs/acs-users/acs-user.js +32 -30
- package/lib/seam/connect/models/acs/acs-users/acs-user.js.map +1 -1
- package/lib/seam/connect/models/action-attempts/action-attempt.d.ts +395 -0
- package/lib/seam/connect/models/action-attempts/action-attempt.js +10 -0
- package/lib/seam/connect/models/action-attempts/action-attempt.js.map +1 -1
- package/lib/seam/connect/models/action-attempts/pause-speaker-playback.d.ts +87 -0
- package/lib/seam/connect/models/action-attempts/pause-speaker-playback.js +37 -0
- package/lib/seam/connect/models/action-attempts/pause-speaker-playback.js.map +1 -0
- package/lib/seam/connect/models/action-attempts/play-speaker-chime.d.ts +77 -0
- package/lib/seam/connect/models/action-attempts/play-speaker-chime.js +31 -0
- package/lib/seam/connect/models/action-attempts/play-speaker-chime.js.map +1 -0
- package/lib/seam/connect/models/action-attempts/resume-speaker-playback.d.ts +87 -0
- package/lib/seam/connect/models/action-attempts/resume-speaker-playback.js +37 -0
- package/lib/seam/connect/models/action-attempts/resume-speaker-playback.js.map +1 -0
- package/lib/seam/connect/models/action-attempts/set-speaker-mute.d.ts +77 -0
- package/lib/seam/connect/models/action-attempts/set-speaker-mute.js +31 -0
- package/lib/seam/connect/models/action-attempts/set-speaker-mute.js.map +1 -0
- package/lib/seam/connect/models/action-attempts/set-speaker-volume.d.ts +77 -0
- package/lib/seam/connect/models/action-attempts/set-speaker-volume.js +31 -0
- package/lib/seam/connect/models/action-attempts/set-speaker-volume.js.map +1 -0
- package/lib/seam/connect/models/connect-webviews/connect-webview.d.ts +3 -3
- package/lib/seam/connect/models/connected-accounts/connected-account.d.ts +3 -3
- package/lib/seam/connect/models/devices/capability-properties/index.d.ts +95 -1
- package/lib/seam/connect/models/devices/capability-properties/index.js +4 -2
- package/lib/seam/connect/models/devices/capability-properties/index.js.map +1 -1
- package/lib/seam/connect/models/devices/capability-properties/speaker.d.ts +98 -0
- package/lib/seam/connect/models/devices/capability-properties/speaker.js +61 -0
- package/lib/seam/connect/models/devices/capability-properties/speaker.js.map +1 -0
- package/lib/seam/connect/models/devices/device-metadata.d.ts +33 -0
- package/lib/seam/connect/models/devices/device-metadata.js +26 -0
- package/lib/seam/connect/models/devices/device-metadata.js.map +1 -1
- package/lib/seam/connect/models/devices/device-provider.d.ts +12 -0
- package/lib/seam/connect/models/devices/device-provider.js +1 -0
- package/lib/seam/connect/models/devices/device-provider.js.map +1 -1
- package/lib/seam/connect/models/devices/device-type.d.ts +7 -1
- package/lib/seam/connect/models/devices/device-type.js +8 -0
- package/lib/seam/connect/models/devices/device-type.js.map +1 -1
- package/lib/seam/connect/models/devices/device.d.ts +200 -3
- package/lib/seam/connect/models/devices/device.js +16 -0
- package/lib/seam/connect/models/devices/device.js.map +1 -1
- package/lib/seam/connect/models/devices/phone.d.ts +1126 -22
- package/lib/seam/connect/models/devices/phone.js +4 -19
- package/lib/seam/connect/models/devices/phone.js.map +1 -1
- package/lib/seam/connect/models/devices/unmanaged-device.d.ts +144 -3
- package/lib/seam/connect/models/phones/phone-session.d.ts +28 -26
- package/lib/seam/connect/models/provider-capability.d.ts +1 -1
- package/lib/seam/connect/models/provider-capability.js +1 -0
- package/lib/seam/connect/models/provider-capability.js.map +1 -1
- package/lib/seam/connect/models/user-identities/user-identity.js +4 -4
- package/lib/seam/connect/models/user-identities/user-identity.js.map +1 -1
- package/lib/seam/connect/openapi.js +2006 -136
- package/lib/seam/connect/openapi.js.map +1 -1
- package/lib/seam/connect/route-types.d.ts +8195 -142
- package/package.json +1 -1
- package/src/lib/seam/connect/internal/enums.ts +2 -0
- package/src/lib/seam/connect/internal/schemas.ts +1 -0
- package/src/lib/seam/connect/models/access-grants/access-grant.ts +13 -5
- package/src/lib/seam/connect/models/acs/acs-access-group.ts +2 -2
- package/src/lib/seam/connect/models/acs/acs-entrance.ts +36 -17
- package/src/lib/seam/connect/models/acs/acs-users/acs-user.ts +44 -34
- package/src/lib/seam/connect/models/action-attempts/action-attempt.ts +10 -0
- package/src/lib/seam/connect/models/action-attempts/pause-speaker-playback.ts +54 -0
- package/src/lib/seam/connect/models/action-attempts/play-speaker-chime.ts +46 -0
- package/src/lib/seam/connect/models/action-attempts/resume-speaker-playback.ts +54 -0
- package/src/lib/seam/connect/models/action-attempts/set-speaker-mute.ts +43 -0
- package/src/lib/seam/connect/models/action-attempts/set-speaker-volume.ts +46 -0
- package/src/lib/seam/connect/models/devices/capability-properties/index.ts +9 -1
- package/src/lib/seam/connect/models/devices/capability-properties/speaker.ts +76 -0
- package/src/lib/seam/connect/models/devices/device-metadata.ts +29 -0
- package/src/lib/seam/connect/models/devices/device-provider.ts +1 -0
- package/src/lib/seam/connect/models/devices/device-type.ts +16 -0
- package/src/lib/seam/connect/models/devices/device.ts +18 -0
- package/src/lib/seam/connect/models/devices/phone.ts +4 -27
- package/src/lib/seam/connect/models/provider-capability.ts +1 -0
- package/src/lib/seam/connect/models/user-identities/user-identity.ts +4 -4
- package/src/lib/seam/connect/openapi.ts +2537 -407
- package/src/lib/seam/connect/route-types.ts +9097 -128
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import * as z from 'zod/v3'
|
|
2
|
+
|
|
3
|
+
export const speaker_playback_state = z
|
|
4
|
+
.enum(['playing', 'paused', 'idle', 'buffering', 'unknown'])
|
|
5
|
+
.describe('Playback state of the speaker.')
|
|
6
|
+
|
|
7
|
+
export type SpeakerPlaybackState = z.infer<typeof speaker_playback_state>
|
|
8
|
+
|
|
9
|
+
export const speaker_capability_properties = z.object({
|
|
10
|
+
speaker: z
|
|
11
|
+
.object({
|
|
12
|
+
volume: z
|
|
13
|
+
.number()
|
|
14
|
+
.describe(
|
|
15
|
+
"Current volume of the speaker, on the speaker's native volume scale from `min_volume` to `max_volume`. This is the native volume setting, not a decibel level.",
|
|
16
|
+
),
|
|
17
|
+
is_muted: z.boolean().describe('Indicates whether the speaker is muted.'),
|
|
18
|
+
has_fixed_volume: z
|
|
19
|
+
.boolean()
|
|
20
|
+
.describe(
|
|
21
|
+
"Indicates whether the speaker's volume is fixed, for example, because the speaker's line-out level is controlled by an external amplifier. A speaker with a fixed volume cannot have its volume set through Seam.",
|
|
22
|
+
),
|
|
23
|
+
min_volume: z
|
|
24
|
+
.number()
|
|
25
|
+
.describe('Minimum volume that you can set on the speaker.'),
|
|
26
|
+
max_volume: z
|
|
27
|
+
.number()
|
|
28
|
+
.describe(
|
|
29
|
+
"Maximum volume that you can set on the speaker. This is the ceiling of the speaker's native volume scale, not a limit configured for guests.",
|
|
30
|
+
),
|
|
31
|
+
volume_step: z
|
|
32
|
+
.number()
|
|
33
|
+
.describe(
|
|
34
|
+
'Increment between the volume values that you can set on the speaker.',
|
|
35
|
+
),
|
|
36
|
+
playback_state: speaker_playback_state,
|
|
37
|
+
now_playing: z
|
|
38
|
+
.object({
|
|
39
|
+
title: z
|
|
40
|
+
.string()
|
|
41
|
+
.optional()
|
|
42
|
+
.describe('Title of the content that is currently playing.'),
|
|
43
|
+
artist: z
|
|
44
|
+
.string()
|
|
45
|
+
.optional()
|
|
46
|
+
.describe('Artist of the content that is currently playing.'),
|
|
47
|
+
album: z
|
|
48
|
+
.string()
|
|
49
|
+
.optional()
|
|
50
|
+
.describe('Album of the content that is currently playing.'),
|
|
51
|
+
})
|
|
52
|
+
.optional()
|
|
53
|
+
.describe('Content that is currently playing on the speaker.'),
|
|
54
|
+
grouped_with_device_ids: z
|
|
55
|
+
.array(z.string().uuid())
|
|
56
|
+
.describe(
|
|
57
|
+
'IDs of the other speakers that are currently grouped with this speaker. Pausing or resuming playback on a speaker also affects the speakers in its group.',
|
|
58
|
+
),
|
|
59
|
+
supports_chime: z
|
|
60
|
+
.boolean()
|
|
61
|
+
.describe('Indicates whether the speaker can play a chime.'),
|
|
62
|
+
volume_reported_at: z
|
|
63
|
+
.string()
|
|
64
|
+
.datetime()
|
|
65
|
+
.optional()
|
|
66
|
+
.describe(
|
|
67
|
+
'Date and time at which the speaker last reported its volume.',
|
|
68
|
+
),
|
|
69
|
+
})
|
|
70
|
+
.optional().describe(`
|
|
71
|
+
---
|
|
72
|
+
property_group_key: speakers
|
|
73
|
+
---
|
|
74
|
+
Audio state and capabilities of the speaker.
|
|
75
|
+
`),
|
|
76
|
+
})
|
|
@@ -1323,6 +1323,35 @@ export const device_metadata = z
|
|
|
1323
1323
|
})
|
|
1324
1324
|
.partial()
|
|
1325
1325
|
.describe(`Metadata for an Aqara device.`),
|
|
1326
|
+
|
|
1327
|
+
sonos_metadata: z
|
|
1328
|
+
.object({
|
|
1329
|
+
household_id: z
|
|
1330
|
+
.string()
|
|
1331
|
+
.optional()
|
|
1332
|
+
.describe('ID of the Sonos household that the speaker belongs to.'),
|
|
1333
|
+
player_id: z
|
|
1334
|
+
.string()
|
|
1335
|
+
.optional()
|
|
1336
|
+
.describe('ID of the Sonos player for the speaker.'),
|
|
1337
|
+
model_display_name: z
|
|
1338
|
+
.string()
|
|
1339
|
+
.optional()
|
|
1340
|
+
.describe('Model name of the speaker, as reported by Sonos.'),
|
|
1341
|
+
software_version: z
|
|
1342
|
+
.string()
|
|
1343
|
+
.optional()
|
|
1344
|
+
.describe('Software version running on the speaker.'),
|
|
1345
|
+
bonded_member_models: z
|
|
1346
|
+
.array(z.string())
|
|
1347
|
+
.optional()
|
|
1348
|
+
.describe(
|
|
1349
|
+
'Models of the speakers bonded to this speaker, such as surrounds or a subwoofer.',
|
|
1350
|
+
),
|
|
1351
|
+
})
|
|
1352
|
+
.partial()
|
|
1353
|
+
.optional()
|
|
1354
|
+
.describe('Metadata for a Sonos speaker.'),
|
|
1326
1355
|
})
|
|
1327
1356
|
.partial().describe(`
|
|
1328
1357
|
---
|
|
@@ -143,6 +143,21 @@ export const camera_device_type = z
|
|
|
143
143
|
|
|
144
144
|
export type CameraDeviceType = z.infer<typeof camera_device_type>
|
|
145
145
|
|
|
146
|
+
export const SPEAKER_DEVICE_TYPE = {
|
|
147
|
+
SONOS_SPEAKER: 'sonos_speaker',
|
|
148
|
+
} as const
|
|
149
|
+
|
|
150
|
+
type SpeakerDeviceTypeFromMapping =
|
|
151
|
+
(typeof SPEAKER_DEVICE_TYPE)[keyof typeof SPEAKER_DEVICE_TYPE]
|
|
152
|
+
|
|
153
|
+
export const SPEAKER_DEVICE_TYPE_LIST = Object.values(SPEAKER_DEVICE_TYPE)
|
|
154
|
+
|
|
155
|
+
export const speaker_device_type = z
|
|
156
|
+
.enum(Object.values(SPEAKER_DEVICE_TYPE) as [SpeakerDeviceTypeFromMapping])
|
|
157
|
+
.describe('Device type for speakers.')
|
|
158
|
+
|
|
159
|
+
export type SpeakerDeviceType = z.infer<typeof speaker_device_type>
|
|
160
|
+
|
|
146
161
|
export const any_device_type = z.union([
|
|
147
162
|
lock_device_type,
|
|
148
163
|
key_device_type,
|
|
@@ -150,6 +165,7 @@ export const any_device_type = z.union([
|
|
|
150
165
|
thermostat_device_type,
|
|
151
166
|
phone_device_type,
|
|
152
167
|
camera_device_type,
|
|
168
|
+
speaker_device_type,
|
|
153
169
|
])
|
|
154
170
|
|
|
155
171
|
export type AnyDeviceType = z.infer<typeof any_device_type>
|
|
@@ -111,6 +111,20 @@ export const device_capability_flags = z
|
|
|
111
111
|
.describe(
|
|
112
112
|
'Indicates whether the camera supports streaming live video through a camera live view session.',
|
|
113
113
|
),
|
|
114
|
+
can_set_speaker_volume: z
|
|
115
|
+
.boolean()
|
|
116
|
+
.describe('Indicates whether the speaker supports setting its volume.'),
|
|
117
|
+
can_mute_speaker: z
|
|
118
|
+
.boolean()
|
|
119
|
+
.describe('Indicates whether the speaker supports muting and unmuting.'),
|
|
120
|
+
can_pause_speaker_playback: z
|
|
121
|
+
.boolean()
|
|
122
|
+
.describe(
|
|
123
|
+
'Indicates whether the speaker supports pausing and resuming playback.',
|
|
124
|
+
),
|
|
125
|
+
can_play_speaker_chime: z
|
|
126
|
+
.boolean()
|
|
127
|
+
.describe('Indicates whether the speaker supports playing a chime.'),
|
|
114
128
|
})
|
|
115
129
|
.partial()
|
|
116
130
|
|
|
@@ -1058,6 +1072,8 @@ export const device = z
|
|
|
1058
1072
|
name: Hardware
|
|
1059
1073
|
noise_sensors:
|
|
1060
1074
|
name: Noise Sensors
|
|
1075
|
+
speakers:
|
|
1076
|
+
name: Speakers
|
|
1061
1077
|
phones:
|
|
1062
1078
|
name: Phones
|
|
1063
1079
|
provider_metadata:
|
|
@@ -1189,6 +1205,8 @@ export const device = z
|
|
|
1189
1205
|
name: Hardware
|
|
1190
1206
|
noise_sensors:
|
|
1191
1207
|
name: Noise Sensors
|
|
1208
|
+
speakers:
|
|
1209
|
+
name: Speakers
|
|
1192
1210
|
phones:
|
|
1193
1211
|
name: Phones
|
|
1194
1212
|
provider_metadata:
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import * as z from 'zod/v3'
|
|
2
2
|
|
|
3
|
-
import { datetime } from '../datetime.js'
|
|
4
3
|
import { device } from './device.js'
|
|
5
4
|
import { phone_device_type } from './device-type.js'
|
|
6
5
|
import { phone_specific_properties } from './phone-properties.js'
|
|
@@ -14,6 +13,8 @@ const basePhoneDeviceSchema = device.pick({
|
|
|
14
13
|
workspace_id: true,
|
|
15
14
|
created_at: true,
|
|
16
15
|
custom_metadata: true,
|
|
16
|
+
errors: true,
|
|
17
|
+
warnings: true,
|
|
17
18
|
})
|
|
18
19
|
|
|
19
20
|
export const phone = z.object({
|
|
@@ -35,32 +36,8 @@ export const phone = z.object({
|
|
|
35
36
|
.describe(`Optional [custom metadata](https://www.seam.co/docs/core-concepts/devices/adding-custom-metadata-to-a-device) for the phone.
|
|
36
37
|
`),
|
|
37
38
|
|
|
38
|
-
errors:
|
|
39
|
-
|
|
40
|
-
z.object({
|
|
41
|
-
error_code: z
|
|
42
|
-
.string()
|
|
43
|
-
.describe('Unique identifier of the type of error.'),
|
|
44
|
-
message: z.string().describe('Detailed description of the error.'),
|
|
45
|
-
created_at: datetime.describe(
|
|
46
|
-
'Date and time at which Seam created the error.',
|
|
47
|
-
),
|
|
48
|
-
}),
|
|
49
|
-
)
|
|
50
|
-
.describe('Errors associated with the phone.'),
|
|
51
|
-
warnings: z
|
|
52
|
-
.array(
|
|
53
|
-
z.object({
|
|
54
|
-
warning_code: z
|
|
55
|
-
.string()
|
|
56
|
-
.describe('Unique identifier of the type of warning.'),
|
|
57
|
-
message: z.string().describe('Detailed description of the warning.'),
|
|
58
|
-
created_at: datetime.describe(
|
|
59
|
-
'Date and time at which Seam created the warning.',
|
|
60
|
-
),
|
|
61
|
-
}),
|
|
62
|
-
)
|
|
63
|
-
.describe('Warnings associated with the phone.'),
|
|
39
|
+
errors: basePhoneDeviceSchema.shape.errors,
|
|
40
|
+
warnings: basePhoneDeviceSchema.shape.warnings,
|
|
64
41
|
device_type: phone_device_type.describe(
|
|
65
42
|
'Type of the phone device, such as `ios_phone` or `android_phone`.',
|
|
66
43
|
),
|
|
@@ -6,6 +6,7 @@ export const provider_capability = z.enum([
|
|
|
6
6
|
'noise_sensor',
|
|
7
7
|
'access_control',
|
|
8
8
|
'camera',
|
|
9
|
+
'speaker',
|
|
9
10
|
]).describe(`
|
|
10
11
|
High-level device capabilities that can be restricted in connect webviews.
|
|
11
12
|
These represent the main device categories that customers can opt into.
|
|
@@ -83,7 +83,7 @@ const _user_identity_error_map = z.object({
|
|
|
83
83
|
|
|
84
84
|
export type UserIdentityErrorMap = z.infer<typeof _user_identity_error_map>
|
|
85
85
|
|
|
86
|
-
const
|
|
86
|
+
const user_identity_warning = z
|
|
87
87
|
.discriminatedUnion('warning_code', [
|
|
88
88
|
user_identity_being_deleted,
|
|
89
89
|
acs_user_profile_does_not_match_user_identity,
|
|
@@ -98,7 +98,7 @@ const _user_identity_warning_map = z.object({
|
|
|
98
98
|
|
|
99
99
|
export type UserIdentityWarningMap = z.infer<typeof _user_identity_warning_map>
|
|
100
100
|
|
|
101
|
-
const
|
|
101
|
+
const user_identity_error = z
|
|
102
102
|
.discriminatedUnion('error_code', [user_identity_issue_with_acs_user])
|
|
103
103
|
.describe('Errors associated with the user identity.')
|
|
104
104
|
|
|
@@ -146,12 +146,12 @@ export const user_identity = z.object({
|
|
|
146
146
|
.uuid()
|
|
147
147
|
.describe('ID of the workspace that contains the user identity.'),
|
|
148
148
|
errors: z
|
|
149
|
-
.array(
|
|
149
|
+
.array(user_identity_error)
|
|
150
150
|
.describe(
|
|
151
151
|
'Array of errors associated with the user identity. Each error object within the array contains fields like "error_code" and "message." "error_code" is a string that uniquely identifies the type of error, enabling quick recognition and categorization of the issue. "message" provides a more detailed description of the error, offering insights into the issue and potentially how to rectify it.',
|
|
152
152
|
),
|
|
153
153
|
warnings: z
|
|
154
|
-
.array(
|
|
154
|
+
.array(user_identity_warning)
|
|
155
155
|
.describe(
|
|
156
156
|
'Array of warnings associated with the user identity. Each warning object within the array contains two fields: "warning_code" and "message." "warning_code" is a string that uniquely identifies the type of warning, enabling quick recognition and categorization of the issue. "message" provides a more detailed description of the warning, offering insights into the issue and potentially how to rectify it.',
|
|
157
157
|
),
|