@seamapi/types 1.85.1 → 1.87.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 +46 -2
- package/dist/connect.cjs.map +1 -1
- package/dist/connect.d.cts +101 -1
- package/lib/seam/connect/openapi.d.ts +88 -0
- package/lib/seam/connect/openapi.js +45 -1
- package/lib/seam/connect/openapi.js.map +1 -1
- package/lib/seam/connect/route-types.d.ts +13 -1
- package/lib/seam/connect/unstable/models/devices/managed-device.d.ts +3 -0
- package/lib/seam/connect/unstable/models/devices/managed-device.js +2 -0
- package/lib/seam/connect/unstable/models/devices/managed-device.js.map +1 -1
- package/lib/seam/connect/unstable/models/devices/phone.d.ts +3 -0
- package/lib/seam/connect/unstable/models/events/access_code_events.d.ts +70 -0
- package/lib/seam/connect/unstable/models/events/access_code_events.js +33 -0
- package/lib/seam/connect/unstable/models/events/access_code_events.js.map +1 -0
- package/lib/seam/connect/unstable/models/events/connected_account_events.d.ts +48 -0
- package/lib/seam/connect/unstable/models/events/connected_account_events.js +24 -0
- package/lib/seam/connect/unstable/models/events/connected_account_events.js.map +1 -0
- package/lib/seam/connect/unstable/models/events/device_events.d.ts +63 -0
- package/lib/seam/connect/unstable/models/events/device_events.js +21 -0
- package/lib/seam/connect/unstable/models/events/device_events.js.map +1 -0
- package/lib/seam/connect/unstable/models/events/lock_events.d.ts +42 -0
- package/lib/seam/connect/unstable/models/events/lock_events.js +22 -0
- package/lib/seam/connect/unstable/models/events/lock_events.js.map +1 -0
- package/package.json +1 -1
- package/src/lib/seam/connect/openapi.ts +45 -1
- package/src/lib/seam/connect/route-types.ts +13 -1
- package/src/lib/seam/connect/unstable/models/devices/managed-device.ts +2 -0
- package/src/lib/seam/connect/unstable/models/events/access_code_events.ts +37 -0
- package/src/lib/seam/connect/unstable/models/events/connected_account_events.ts +27 -0
- package/src/lib/seam/connect/unstable/models/events/device_events.ts +24 -0
- package/src/lib/seam/connect/unstable/models/events/lock_events.ts +25 -0
|
@@ -1686,7 +1686,6 @@ export interface Routes {
|
|
|
1686
1686
|
| 'my_2n'
|
|
1687
1687
|
| 'controlbyweb'
|
|
1688
1688
|
| 'nest'
|
|
1689
|
-
| 'google_nest'
|
|
1690
1689
|
| 'igloohome'
|
|
1691
1690
|
| 'ecobee'
|
|
1692
1691
|
| 'hubitat'
|
|
@@ -1700,6 +1699,7 @@ export interface Routes {
|
|
|
1700
1699
|
| 'seam_bridge'
|
|
1701
1700
|
| 'yale_access'
|
|
1702
1701
|
| 'hid_cm'
|
|
1702
|
+
| 'google_nest'
|
|
1703
1703
|
>
|
|
1704
1704
|
| undefined
|
|
1705
1705
|
provider_category?:
|
|
@@ -2612,6 +2612,7 @@ export interface Routes {
|
|
|
2612
2612
|
created_at: string
|
|
2613
2613
|
/** Indicates whether Seam manages the device. */
|
|
2614
2614
|
is_managed: true
|
|
2615
|
+
custom_metadata?: Record<string, string | boolean | null> | undefined
|
|
2615
2616
|
}
|
|
2616
2617
|
}
|
|
2617
2618
|
}
|
|
@@ -3388,6 +3389,7 @@ export interface Routes {
|
|
|
3388
3389
|
created_at: string
|
|
3389
3390
|
/** Indicates whether Seam manages the device. */
|
|
3390
3391
|
is_managed: true
|
|
3392
|
+
custom_metadata?: Record<string, string | boolean | null> | undefined
|
|
3391
3393
|
}>
|
|
3392
3394
|
}
|
|
3393
3395
|
}
|
|
@@ -3769,6 +3771,7 @@ export interface Routes {
|
|
|
3769
3771
|
| undefined
|
|
3770
3772
|
name?: (string | null) | undefined
|
|
3771
3773
|
is_managed?: boolean
|
|
3774
|
+
custom_metadata?: Record<string, string | boolean | null> | undefined
|
|
3772
3775
|
}
|
|
3773
3776
|
formData: {}
|
|
3774
3777
|
jsonResponse: {}
|
|
@@ -4660,6 +4663,7 @@ export interface Routes {
|
|
|
4660
4663
|
created_at: string
|
|
4661
4664
|
/** Indicates whether Seam manages the device. */
|
|
4662
4665
|
is_managed: true
|
|
4666
|
+
custom_metadata?: Record<string, string | boolean | null> | undefined
|
|
4663
4667
|
}
|
|
4664
4668
|
device: {
|
|
4665
4669
|
/** Unique identifier for the device. */
|
|
@@ -5313,6 +5317,7 @@ export interface Routes {
|
|
|
5313
5317
|
created_at: string
|
|
5314
5318
|
/** Indicates whether Seam manages the device. */
|
|
5315
5319
|
is_managed: true
|
|
5320
|
+
custom_metadata?: Record<string, string | boolean | null> | undefined
|
|
5316
5321
|
}
|
|
5317
5322
|
}
|
|
5318
5323
|
}
|
|
@@ -6089,6 +6094,7 @@ export interface Routes {
|
|
|
6089
6094
|
created_at: string
|
|
6090
6095
|
/** Indicates whether Seam manages the device. */
|
|
6091
6096
|
is_managed: true
|
|
6097
|
+
custom_metadata?: Record<string, string | boolean | null> | undefined
|
|
6092
6098
|
}>
|
|
6093
6099
|
devices: Array<{
|
|
6094
6100
|
/** Unique identifier for the device. */
|
|
@@ -6742,6 +6748,7 @@ export interface Routes {
|
|
|
6742
6748
|
created_at: string
|
|
6743
6749
|
/** Indicates whether Seam manages the device. */
|
|
6744
6750
|
is_managed: true
|
|
6751
|
+
custom_metadata?: Record<string, string | boolean | null> | undefined
|
|
6745
6752
|
}>
|
|
6746
6753
|
}
|
|
6747
6754
|
}
|
|
@@ -7673,6 +7680,7 @@ export interface Routes {
|
|
|
7673
7680
|
created_at: string
|
|
7674
7681
|
/** Indicates whether Seam manages the device. */
|
|
7675
7682
|
is_managed: true
|
|
7683
|
+
custom_metadata?: Record<string, string | boolean | null> | undefined
|
|
7676
7684
|
assa_abloy_credential_service_metadata?:
|
|
7677
7685
|
| {
|
|
7678
7686
|
has_active_endpoint: boolean
|
|
@@ -8330,6 +8338,7 @@ export interface Routes {
|
|
|
8330
8338
|
created_at: string
|
|
8331
8339
|
/** Indicates whether Seam manages the device. */
|
|
8332
8340
|
is_managed: true
|
|
8341
|
+
custom_metadata?: Record<string, string | boolean | null> | undefined
|
|
8333
8342
|
assa_abloy_credential_service_metadata?:
|
|
8334
8343
|
| {
|
|
8335
8344
|
has_active_endpoint: boolean
|
|
@@ -9180,6 +9189,7 @@ export interface Routes {
|
|
|
9180
9189
|
created_at: string
|
|
9181
9190
|
/** Indicates whether Seam manages the device. */
|
|
9182
9191
|
is_managed: true
|
|
9192
|
+
custom_metadata?: Record<string, string | boolean | null> | undefined
|
|
9183
9193
|
}
|
|
9184
9194
|
}
|
|
9185
9195
|
}
|
|
@@ -9986,6 +9996,7 @@ export interface Routes {
|
|
|
9986
9996
|
created_at: string
|
|
9987
9997
|
/** Indicates whether Seam manages the device. */
|
|
9988
9998
|
is_managed: true
|
|
9999
|
+
custom_metadata?: Record<string, string | boolean | null> | undefined
|
|
9989
10000
|
}>
|
|
9990
10001
|
}
|
|
9991
10002
|
}
|
|
@@ -10855,6 +10866,7 @@ export interface Routes {
|
|
|
10855
10866
|
created_at: string
|
|
10856
10867
|
/** Indicates whether Seam manages the device. */
|
|
10857
10868
|
is_managed: true
|
|
10869
|
+
custom_metadata?: Record<string, string | boolean | null> | undefined
|
|
10858
10870
|
}>
|
|
10859
10871
|
}
|
|
10860
10872
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { SetRequired, Simplify } from 'type-fest'
|
|
2
2
|
import { z } from 'zod'
|
|
3
3
|
|
|
4
|
+
import { custom_metadata } from '../../../stable/models/custom-metadata.js'
|
|
4
5
|
import { capability_properties } from '../capability-properties/index.js'
|
|
5
6
|
import { capabilities } from './capabilities-supported.js'
|
|
6
7
|
import { device_metadata } from './device-metadata.js'
|
|
@@ -157,6 +158,7 @@ export const managed_device = z.object({
|
|
|
157
158
|
is_managed: z
|
|
158
159
|
.literal(true)
|
|
159
160
|
.describe('Indicates whether Seam manages the device.'),
|
|
161
|
+
custom_metadata: custom_metadata.optional(),
|
|
160
162
|
})
|
|
161
163
|
|
|
162
164
|
export type ManagedDevice = z.infer<typeof managed_device>
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { z } from 'zod'
|
|
2
|
+
|
|
3
|
+
const access_code_created = z.object({
|
|
4
|
+
event_type: z.literal('access_code.created'),
|
|
5
|
+
device_id: z.string().uuid(),
|
|
6
|
+
workspace_id: z.string().uuid(),
|
|
7
|
+
access_code_id: z.string().uuid(),
|
|
8
|
+
connected_account_id: z.string().uuid(),
|
|
9
|
+
})
|
|
10
|
+
|
|
11
|
+
const access_code_changed = z.object({
|
|
12
|
+
event_type: z.literal('access_code.changed'),
|
|
13
|
+
device_id: z.string().uuid(),
|
|
14
|
+
workspace_id: z.string().uuid(),
|
|
15
|
+
access_code_id: z.string().uuid(),
|
|
16
|
+
})
|
|
17
|
+
|
|
18
|
+
const access_code_scheduled_on_device = z.object({
|
|
19
|
+
event_type: z.literal('access_code.scheduled_on_device'),
|
|
20
|
+
device_id: z.string().uuid(),
|
|
21
|
+
connected_account_id: z.string().uuid(),
|
|
22
|
+
workspace_id: z.string().uuid(),
|
|
23
|
+
})
|
|
24
|
+
|
|
25
|
+
const backup_access_code_pulled = z.object({
|
|
26
|
+
event_type: z.literal('backup_access_code.pulled'),
|
|
27
|
+
device_id: z.string().uuid(),
|
|
28
|
+
workspace_id: z.string().uuid(),
|
|
29
|
+
connected_account_id: z.string().uuid(),
|
|
30
|
+
})
|
|
31
|
+
|
|
32
|
+
export const access_code_event_map = {
|
|
33
|
+
access_code_created,
|
|
34
|
+
access_code_changed,
|
|
35
|
+
access_code_scheduled_on_device,
|
|
36
|
+
backup_access_code_pulled,
|
|
37
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { z } from 'zod'
|
|
2
|
+
|
|
3
|
+
const connected_account_connected = z.object({
|
|
4
|
+
event_type: z.literal('connected_account.connected'),
|
|
5
|
+
connected_account_id: z.string().uuid(),
|
|
6
|
+
workspace_id: z.string().uuid(),
|
|
7
|
+
connect_webview_id: z.string().uuid(),
|
|
8
|
+
})
|
|
9
|
+
|
|
10
|
+
const connected_account_successful_login = z.object({
|
|
11
|
+
event_type: z.literal('connected_account.successful_login'),
|
|
12
|
+
connected_account_id: z.string().uuid(),
|
|
13
|
+
workspace_id: z.string().uuid(),
|
|
14
|
+
connect_webview_id: z.string().uuid(),
|
|
15
|
+
})
|
|
16
|
+
|
|
17
|
+
const connected_account_created = z.object({
|
|
18
|
+
event_type: z.literal('connected_account.created'),
|
|
19
|
+
connected_account_id: z.string().uuid(),
|
|
20
|
+
workspace_id: z.string().uuid(),
|
|
21
|
+
})
|
|
22
|
+
|
|
23
|
+
export const connected_account_event_map = {
|
|
24
|
+
connected_account_connected,
|
|
25
|
+
connected_account_successful_login,
|
|
26
|
+
connected_account_created,
|
|
27
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { z } from 'zod'
|
|
2
|
+
|
|
3
|
+
export const device_added = z
|
|
4
|
+
.object({
|
|
5
|
+
event_type: z.literal('device_added'),
|
|
6
|
+
device_id: z.string().uuid(),
|
|
7
|
+
})
|
|
8
|
+
.describe('This device was added to a Connected Account by the device owner')
|
|
9
|
+
|
|
10
|
+
export const device_removed = z.object({
|
|
11
|
+
event_type: z.literal('device_removed'),
|
|
12
|
+
device_id: z.string().uuid(),
|
|
13
|
+
})
|
|
14
|
+
|
|
15
|
+
export const device_updated = z.object({
|
|
16
|
+
event_type: z.literal('device_updated'),
|
|
17
|
+
device_id: z.string().uuid(),
|
|
18
|
+
})
|
|
19
|
+
|
|
20
|
+
export const device_event_map = {
|
|
21
|
+
device_added,
|
|
22
|
+
device_removed,
|
|
23
|
+
device_updated,
|
|
24
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { z } from 'zod'
|
|
2
|
+
|
|
3
|
+
const lock_methods = z.enum(['keycode', 'manual', 'unknown', 'seamapi'])
|
|
4
|
+
|
|
5
|
+
const lock_locked = z.object({
|
|
6
|
+
event_type: z.literal('lock.locked'),
|
|
7
|
+
device_id: z.string().uuid(),
|
|
8
|
+
workspace_id: z.string().uuid(),
|
|
9
|
+
lock_id: z.string().uuid(),
|
|
10
|
+
connected_account_id: z.string().uuid(),
|
|
11
|
+
})
|
|
12
|
+
|
|
13
|
+
const lock_unlocked = z.object({
|
|
14
|
+
event_type: z.literal('lock.unlocked'),
|
|
15
|
+
device_id: z.string().uuid(),
|
|
16
|
+
workspace_id: z.string().uuid(),
|
|
17
|
+
lock_id: z.string().uuid(),
|
|
18
|
+
connected_account_id: z.string().uuid(),
|
|
19
|
+
})
|
|
20
|
+
|
|
21
|
+
export const lock_event_map = {
|
|
22
|
+
lock_methods,
|
|
23
|
+
lock_locked,
|
|
24
|
+
lock_unlocked,
|
|
25
|
+
}
|