@seamapi/types 1.180.0 → 1.181.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/dist/connect.cjs +2 -0
- package/dist/connect.cjs.map +1 -1
- package/dist/connect.d.cts +5 -0
- package/lib/seam/connect/internal/enums.d.ts +1 -1
- package/lib/seam/connect/internal/enums.js +1 -1
- package/lib/seam/connect/internal/enums.js.map +1 -1
- package/lib/seam/connect/internal/schemas.d.ts +1 -1
- package/lib/seam/connect/internal/schemas.js +1 -1
- package/lib/seam/connect/internal/schemas.js.map +1 -1
- package/lib/seam/connect/models/acs/access_group.d.ts +3 -0
- package/lib/seam/connect/models/acs/access_group.js +1 -0
- package/lib/seam/connect/models/acs/access_group.js.map +1 -1
- package/lib/seam/connect/models/acs/credential.d.ts +2 -2
- package/lib/seam/connect/models/acs/credential_pool.d.ts +2 -2
- package/lib/seam/connect/models/acs/seam-bridge.d.ts +68 -33
- package/lib/seam/connect/models/acs/seam-bridge.js +17 -12
- package/lib/seam/connect/models/acs/seam-bridge.js.map +1 -1
- package/lib/seam/connect/models/acs/user.d.ts +3 -3
- package/lib/seam/connect/models/connected-accounts/connected-account.d.ts +62 -0
- package/lib/seam/connect/models/connected-accounts/connected-account.js +22 -0
- package/lib/seam/connect/models/connected-accounts/connected-account.js.map +1 -0
- package/lib/seam/connect/models/connected-accounts/index.d.ts +1 -0
- package/lib/seam/connect/models/connected-accounts/index.js +2 -0
- package/lib/seam/connect/models/connected-accounts/index.js.map +1 -0
- package/lib/seam/connect/models/devices/device-provider.d.ts +69 -0
- package/lib/seam/connect/models/devices/device-provider.js +100 -0
- package/lib/seam/connect/models/devices/device-provider.js.map +1 -0
- package/lib/seam/connect/models/devices/index.d.ts +2 -0
- package/lib/seam/connect/models/devices/index.js +2 -0
- package/lib/seam/connect/models/devices/index.js.map +1 -1
- package/lib/seam/connect/models/devices/managed-device.d.ts +2 -2
- package/lib/seam/connect/models/devices/noise-threshold.d.ts +26 -0
- package/lib/seam/connect/models/devices/noise-threshold.js +11 -0
- package/lib/seam/connect/models/devices/noise-threshold.js.map +1 -0
- package/lib/seam/connect/models/devices/phone.d.ts +2 -2
- package/lib/seam/connect/models/devices/unmanaged-device.d.ts +2 -2
- package/lib/seam/connect/models/index.d.ts +2 -0
- package/lib/seam/connect/models/index.js +2 -0
- package/lib/seam/connect/models/index.js.map +1 -1
- package/lib/seam/connect/models/webhooks/index.d.ts +1 -0
- package/lib/seam/connect/models/webhooks/index.js +2 -0
- package/lib/seam/connect/models/webhooks/index.js.map +1 -0
- package/lib/seam/connect/models/webhooks/webhook.d.ts +17 -0
- package/lib/seam/connect/models/webhooks/webhook.js +8 -0
- package/lib/seam/connect/models/webhooks/webhook.js.map +1 -0
- package/lib/seam/connect/openapi.d.ts +3 -0
- package/lib/seam/connect/openapi.js +2 -0
- package/lib/seam/connect/openapi.js.map +1 -1
- package/lib/seam/connect/route-types.d.ts +2 -0
- package/package.json +1 -1
- package/src/lib/seam/connect/internal/enums.ts +3 -0
- package/src/lib/seam/connect/internal/schemas.ts +4 -0
- package/src/lib/seam/connect/models/acs/access_group.ts +1 -0
- package/src/lib/seam/connect/models/acs/seam-bridge.ts +18 -12
- package/src/lib/seam/connect/models/connected-accounts/connected-account.ts +23 -0
- package/src/lib/seam/connect/models/connected-accounts/index.ts +1 -0
- package/src/lib/seam/connect/models/devices/device-provider.ts +116 -0
- package/src/lib/seam/connect/models/devices/index.ts +2 -0
- package/src/lib/seam/connect/models/devices/noise-threshold.ts +11 -0
- package/src/lib/seam/connect/models/index.ts +2 -0
- package/src/lib/seam/connect/models/webhooks/index.ts +1 -0
- package/src/lib/seam/connect/models/webhooks/webhook.ts +8 -0
- package/src/lib/seam/connect/openapi.ts +2 -0
- package/src/lib/seam/connect/route-types.ts +2 -0
|
@@ -2921,6 +2921,7 @@ export interface Routes {
|
|
|
2921
2921
|
---
|
|
2922
2922
|
*/
|
|
2923
2923
|
access_group_type_display_name: string;
|
|
2924
|
+
display_name: string;
|
|
2924
2925
|
external_type: 'pti_unit' | 'pti_access_level' | 'salto_access_group' | 'brivo_group';
|
|
2925
2926
|
external_type_display_name: string;
|
|
2926
2927
|
created_at: string;
|
|
@@ -2955,6 +2956,7 @@ export interface Routes {
|
|
|
2955
2956
|
---
|
|
2956
2957
|
*/
|
|
2957
2958
|
access_group_type_display_name: string;
|
|
2959
|
+
display_name: string;
|
|
2958
2960
|
external_type: 'pti_unit' | 'pti_access_level' | 'salto_access_group' | 'brivo_group';
|
|
2959
2961
|
external_type_display_name: string;
|
|
2960
2962
|
created_at: string;
|
package/package.json
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
export {
|
|
2
|
+
ALL_DEVICE_PROVIDERS,
|
|
2
3
|
LOCK_DEVICE_TYPE,
|
|
3
4
|
LOCK_DEVICE_TYPE_LIST,
|
|
4
5
|
NOISE_SENSOR_DEVICE_TYPE,
|
|
5
6
|
NOISE_SENSOR_DEVICE_TYPE_LIST,
|
|
6
7
|
PHONE_DEVICE_TYPE,
|
|
8
|
+
PROVIDER_CATEGORIES,
|
|
9
|
+
PUBLIC_PROVIDER_CATEGORIES,
|
|
7
10
|
THERMOSTAT_DEVICE_TYPE,
|
|
8
11
|
THERMOSTAT_DEVICE_TYPE_LIST,
|
|
9
12
|
} from '../models/index.js'
|
|
@@ -21,9 +21,11 @@ export {
|
|
|
21
21
|
climate_setting_schedule,
|
|
22
22
|
common_device_properties,
|
|
23
23
|
connect_webview_device_selection_mode,
|
|
24
|
+
connected_account,
|
|
24
25
|
custom_metadata_input,
|
|
25
26
|
device_capability_flags,
|
|
26
27
|
device_metadata,
|
|
28
|
+
device_provider,
|
|
27
29
|
dormakaba_oracode_time_slot,
|
|
28
30
|
enrollment_automation,
|
|
29
31
|
fan_mode_setting,
|
|
@@ -31,6 +33,7 @@ export {
|
|
|
31
33
|
managed_access_code,
|
|
32
34
|
managed_device,
|
|
33
35
|
noise_sensor_device_type,
|
|
36
|
+
noise_threshold,
|
|
34
37
|
phone,
|
|
35
38
|
phone_number,
|
|
36
39
|
thermostat_capability_properties,
|
|
@@ -38,5 +41,6 @@ export {
|
|
|
38
41
|
unmanaged_access_code,
|
|
39
42
|
unmanaged_device,
|
|
40
43
|
user_identity,
|
|
44
|
+
webhook,
|
|
41
45
|
} from '../models/index.js'
|
|
42
46
|
export * from '../schemas.js'
|
|
@@ -27,6 +27,7 @@ export const acs_access_group = z.object({
|
|
|
27
27
|
deprecated: use external_type_display_name
|
|
28
28
|
---
|
|
29
29
|
`),
|
|
30
|
+
display_name: z.string(),
|
|
30
31
|
external_type: acs_access_group_external_type,
|
|
31
32
|
external_type_display_name: z.string(),
|
|
32
33
|
created_at: z.string().datetime(),
|
|
@@ -5,26 +5,32 @@ const common_seam_bridge_error = z.object({
|
|
|
5
5
|
message: z.string(),
|
|
6
6
|
})
|
|
7
7
|
|
|
8
|
-
const
|
|
9
|
-
error_code: z.literal('
|
|
8
|
+
const seam_bridge_unreachable = common_seam_bridge_error.extend({
|
|
9
|
+
error_code: z.literal('seam_bridge_unreachable'),
|
|
10
10
|
})
|
|
11
|
-
const
|
|
12
|
-
error_code: z.literal('
|
|
11
|
+
const failed_to_create_tunnel = common_seam_bridge_error.extend({
|
|
12
|
+
error_code: z.literal('failed_to_create_tunnel'),
|
|
13
13
|
})
|
|
14
|
-
const
|
|
15
|
-
error_code: z.literal('
|
|
14
|
+
const failed_to_create_proxy = common_seam_bridge_error.extend({
|
|
15
|
+
error_code: z.literal('failed_to_create_proxy'),
|
|
16
|
+
})
|
|
17
|
+
|
|
18
|
+
const managed_by_other_account = common_seam_bridge_error.extend({
|
|
19
|
+
error_code: z.literal('managed_by_other_account'),
|
|
16
20
|
})
|
|
17
21
|
|
|
18
22
|
export const seam_bridge_error_map = z.object({
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
23
|
+
failed_to_create_tunnel: failed_to_create_tunnel.optional().nullable(),
|
|
24
|
+
failed_to_create_proxy: failed_to_create_proxy.optional().nullable(),
|
|
25
|
+
seam_bridge_unreachable: seam_bridge_unreachable.optional().nullable(),
|
|
26
|
+
managed_by_other_account: managed_by_other_account.optional().nullable(),
|
|
22
27
|
})
|
|
23
28
|
|
|
24
29
|
export const seam_bridge_error = z.union([
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
30
|
+
seam_bridge_unreachable,
|
|
31
|
+
failed_to_create_proxy,
|
|
32
|
+
failed_to_create_tunnel,
|
|
33
|
+
managed_by_other_account,
|
|
28
34
|
])
|
|
29
35
|
|
|
30
36
|
export type SeamBridgeErrorMap = z.infer<typeof seam_bridge_error_map>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { z } from 'zod'
|
|
2
|
+
|
|
3
|
+
import { custom_metadata } from '../custom-metadata.js'
|
|
4
|
+
|
|
5
|
+
export const connected_account = z.object({
|
|
6
|
+
connected_account_id: z.string().uuid().optional(),
|
|
7
|
+
created_at: z.string().datetime().optional(),
|
|
8
|
+
user_identifier: z
|
|
9
|
+
.object({
|
|
10
|
+
username: z.string().optional(),
|
|
11
|
+
api_url: z.string().optional(),
|
|
12
|
+
email: z.string().optional(),
|
|
13
|
+
phone: z.string().optional(),
|
|
14
|
+
exclusive: z.boolean().optional(),
|
|
15
|
+
})
|
|
16
|
+
.optional(),
|
|
17
|
+
account_type: z.string().optional(),
|
|
18
|
+
account_type_display_name: z.string(),
|
|
19
|
+
errors: z.any(),
|
|
20
|
+
warnings: z.any(),
|
|
21
|
+
custom_metadata,
|
|
22
|
+
automatically_manage_new_devices: z.boolean(),
|
|
23
|
+
})
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './connected-account.js'
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import { z } from 'zod'
|
|
2
|
+
|
|
3
|
+
export const DEVICE_PROVIDERS = {
|
|
4
|
+
AKUVOX: 'akuvox',
|
|
5
|
+
AUGUST: 'august',
|
|
6
|
+
AVIGILON_ALTA: 'avigilon_alta',
|
|
7
|
+
BRIVO: 'brivo',
|
|
8
|
+
BUTTERFLYMX: 'butterflymx',
|
|
9
|
+
SCHLAGE: 'schlage',
|
|
10
|
+
SMARTTHINGS: 'smartthings',
|
|
11
|
+
YALE: 'yale',
|
|
12
|
+
GENIE: 'genie',
|
|
13
|
+
DOORKING: 'doorking',
|
|
14
|
+
SALTO: 'salto',
|
|
15
|
+
LOCKLY: 'lockly',
|
|
16
|
+
TTLOCK: 'ttlock',
|
|
17
|
+
LINEAR: 'linear',
|
|
18
|
+
NOISEAWARE: 'noiseaware',
|
|
19
|
+
NUKI: 'nuki',
|
|
20
|
+
SEAM_RELAY_ADMIN: 'seam_relay_admin',
|
|
21
|
+
IGLOO: 'igloo',
|
|
22
|
+
KWIKSET: 'kwikset',
|
|
23
|
+
MINUT: 'minut',
|
|
24
|
+
MY_2N: 'my_2n',
|
|
25
|
+
CONTROLBYWEB: 'controlbyweb',
|
|
26
|
+
NEST: 'nest',
|
|
27
|
+
IGLOOHOME: 'igloohome',
|
|
28
|
+
ECOBEE: 'ecobee',
|
|
29
|
+
HUBITAT: 'hubitat',
|
|
30
|
+
FOUR_SUITES: 'four_suites',
|
|
31
|
+
DORMAKABA_ORACODE: 'dormakaba_oracode',
|
|
32
|
+
PTI: 'pti',
|
|
33
|
+
WYZE: 'wyze',
|
|
34
|
+
SEAM_PASSPORT: 'seam_passport',
|
|
35
|
+
VISIONLINE: 'visionline',
|
|
36
|
+
ASSA_ABLOY_CREDENTIAL_SERVICE: 'assa_abloy_credential_service',
|
|
37
|
+
SEAM_BRIDGE: 'seam_bridge',
|
|
38
|
+
TEDEE: 'tedee',
|
|
39
|
+
HONEYWELL_RESIDEO: 'honeywell_resideo',
|
|
40
|
+
LATCH: 'latch',
|
|
41
|
+
} as const
|
|
42
|
+
|
|
43
|
+
export type DeviceProvider =
|
|
44
|
+
(typeof DEVICE_PROVIDERS)[keyof typeof DEVICE_PROVIDERS]
|
|
45
|
+
|
|
46
|
+
export const ALL_DEVICE_PROVIDERS: [DeviceProvider, ...DeviceProvider[]] =
|
|
47
|
+
Object.values(DEVICE_PROVIDERS) as any
|
|
48
|
+
|
|
49
|
+
export type ProviderCategory = keyof typeof PROVIDER_CATEGORY_MAP
|
|
50
|
+
|
|
51
|
+
export const PROVIDER_CATEGORY_MAP = {
|
|
52
|
+
stable: [
|
|
53
|
+
'august',
|
|
54
|
+
'avigilon_alta',
|
|
55
|
+
'brivo',
|
|
56
|
+
'schlage',
|
|
57
|
+
'smartthings',
|
|
58
|
+
'yale',
|
|
59
|
+
'nuki',
|
|
60
|
+
'salto',
|
|
61
|
+
'controlbyweb',
|
|
62
|
+
'minut',
|
|
63
|
+
'my_2n',
|
|
64
|
+
'kwikset',
|
|
65
|
+
'ttlock',
|
|
66
|
+
'noiseaware',
|
|
67
|
+
'igloohome',
|
|
68
|
+
'ecobee',
|
|
69
|
+
'four_suites',
|
|
70
|
+
'lockly',
|
|
71
|
+
'wyze',
|
|
72
|
+
'nest',
|
|
73
|
+
'tedee',
|
|
74
|
+
'seam_bridge',
|
|
75
|
+
'honeywell_resideo',
|
|
76
|
+
'visionline',
|
|
77
|
+
'assa_abloy_credential_service',
|
|
78
|
+
'latch',
|
|
79
|
+
],
|
|
80
|
+
|
|
81
|
+
consumer_smartlocks: [
|
|
82
|
+
'august',
|
|
83
|
+
'schlage',
|
|
84
|
+
'yale',
|
|
85
|
+
'smartthings',
|
|
86
|
+
'nuki',
|
|
87
|
+
'ttlock',
|
|
88
|
+
'kwikset',
|
|
89
|
+
'igloohome',
|
|
90
|
+
'wyze',
|
|
91
|
+
],
|
|
92
|
+
|
|
93
|
+
thermostats: ['ecobee', 'nest'],
|
|
94
|
+
noise_sensors: ['minut', 'noiseaware'],
|
|
95
|
+
access_control_systems: [
|
|
96
|
+
'pti',
|
|
97
|
+
'visionline',
|
|
98
|
+
'assa_abloy_credential_service',
|
|
99
|
+
'latch',
|
|
100
|
+
],
|
|
101
|
+
|
|
102
|
+
internal_beta: ALL_DEVICE_PROVIDERS,
|
|
103
|
+
} as const satisfies Record<string, readonly DeviceProvider[]>
|
|
104
|
+
|
|
105
|
+
export const PROVIDER_CATEGORIES: [ProviderCategory, ...ProviderCategory[]] =
|
|
106
|
+
Object.keys(PROVIDER_CATEGORY_MAP) as any
|
|
107
|
+
|
|
108
|
+
export const PUBLIC_PROVIDER_CATEGORIES: typeof PROVIDER_CATEGORIES =
|
|
109
|
+
PROVIDER_CATEGORIES.filter((category) => category !== 'internal_beta') as any
|
|
110
|
+
|
|
111
|
+
export const device_provider = z.object({
|
|
112
|
+
device_provider_name: z.enum(ALL_DEVICE_PROVIDERS),
|
|
113
|
+
display_name: z.string(),
|
|
114
|
+
image_url: z.string(),
|
|
115
|
+
provider_categories: z.array(z.enum(PUBLIC_PROVIDER_CATEGORIES)),
|
|
116
|
+
})
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
export * from './capabilities-supported.js'
|
|
2
2
|
export * from './device-metadata.js'
|
|
3
|
+
export * from './device-provider.js'
|
|
3
4
|
export * from './device-type.js'
|
|
4
5
|
export * from './managed-device.js'
|
|
6
|
+
export * from './noise-threshold.js'
|
|
5
7
|
export * from './phone.js'
|
|
6
8
|
export * from './unmanaged-device.js'
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { z } from 'zod'
|
|
2
|
+
|
|
3
|
+
export const noise_threshold = z.object({
|
|
4
|
+
noise_threshold_id: z.string().uuid(),
|
|
5
|
+
device_id: z.string().uuid(),
|
|
6
|
+
name: z.string(),
|
|
7
|
+
noise_threshold_nrs: z.number().optional(),
|
|
8
|
+
starts_daily_at: z.string(), // TODO: zoned_time
|
|
9
|
+
ends_daily_at: z.string(), // TODO: zoned_time
|
|
10
|
+
noise_threshold_decibels: z.number(),
|
|
11
|
+
})
|
|
@@ -4,9 +4,11 @@ export * from './action-attempts/index.js'
|
|
|
4
4
|
export * from './capability-properties/index.js'
|
|
5
5
|
export * from './client-sessions/index.js'
|
|
6
6
|
export * from './connect-webviews/index.js'
|
|
7
|
+
export * from './connected-accounts/index.js'
|
|
7
8
|
export * from './custom-metadata.js'
|
|
8
9
|
export * from './devices/index.js'
|
|
9
10
|
export * from './events/index.js'
|
|
10
11
|
export * from './phone-number.js'
|
|
11
12
|
export * from './user-identities/index.js'
|
|
13
|
+
export * from './webhooks/index.js'
|
|
12
14
|
export * from './workspaces/index.js'
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './webhook.js'
|
|
@@ -158,6 +158,7 @@ export default {
|
|
|
158
158
|
acs_access_group_id: { format: 'uuid', type: 'string' },
|
|
159
159
|
acs_system_id: { format: 'uuid', type: 'string' },
|
|
160
160
|
created_at: { format: 'date-time', type: 'string' },
|
|
161
|
+
display_name: { type: 'string' },
|
|
161
162
|
external_type: {
|
|
162
163
|
enum: [
|
|
163
164
|
'pti_unit',
|
|
@@ -178,6 +179,7 @@ export default {
|
|
|
178
179
|
'name',
|
|
179
180
|
'access_group_type',
|
|
180
181
|
'access_group_type_display_name',
|
|
182
|
+
'display_name',
|
|
181
183
|
'external_type',
|
|
182
184
|
'external_type_display_name',
|
|
183
185
|
'created_at',
|
|
@@ -3105,6 +3105,7 @@ export interface Routes {
|
|
|
3105
3105
|
---
|
|
3106
3106
|
*/
|
|
3107
3107
|
access_group_type_display_name: string
|
|
3108
|
+
display_name: string
|
|
3108
3109
|
external_type:
|
|
3109
3110
|
| 'pti_unit'
|
|
3110
3111
|
| 'pti_access_level'
|
|
@@ -3147,6 +3148,7 @@ export interface Routes {
|
|
|
3147
3148
|
---
|
|
3148
3149
|
*/
|
|
3149
3150
|
access_group_type_display_name: string
|
|
3151
|
+
display_name: string
|
|
3150
3152
|
external_type:
|
|
3151
3153
|
| 'pti_unit'
|
|
3152
3154
|
| 'pti_access_level'
|