@seamapi/types 1.851.0 → 1.853.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 +729 -60
- package/dist/connect.cjs.map +1 -1
- package/dist/connect.d.cts +8858 -470
- package/dist/index.cjs +729 -60
- package/dist/index.cjs.map +1 -1
- package/lib/seam/connect/models/action-attempts/action-attempt.d.ts +558 -0
- package/lib/seam/connect/models/action-attempts/action-attempt.js +2 -0
- package/lib/seam/connect/models/action-attempts/action-attempt.js.map +1 -1
- package/lib/seam/connect/models/action-attempts/scan-to-assign-credential.d.ts +561 -0
- package/lib/seam/connect/models/action-attempts/scan-to-assign-credential.js +38 -0
- package/lib/seam/connect/models/action-attempts/scan-to-assign-credential.js.map +1 -0
- package/lib/seam/connect/models/batch.d.ts +953 -117
- package/lib/seam/connect/models/devices/device-metadata.d.ts +28 -0
- package/lib/seam/connect/models/devices/device-metadata.js +12 -0
- package/lib/seam/connect/models/devices/device-metadata.js.map +1 -1
- package/lib/seam/connect/models/devices/device-provider.d.ts +1 -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 +1 -0
- package/lib/seam/connect/models/devices/device-type.js +1 -0
- package/lib/seam/connect/models/devices/device-type.js.map +1 -1
- package/lib/seam/connect/models/devices/device.d.ts +43 -3
- package/lib/seam/connect/models/devices/unmanaged-device.d.ts +31 -3
- package/lib/seam/connect/openapi.js +621 -0
- package/lib/seam/connect/openapi.js.map +1 -1
- package/lib/seam/connect/route-types.d.ts +7379 -454
- package/package.json +1 -1
- package/src/lib/seam/connect/models/action-attempts/action-attempt.ts +2 -0
- package/src/lib/seam/connect/models/action-attempts/scan-to-assign-credential.ts +69 -0
- package/src/lib/seam/connect/models/devices/device-metadata.ts +15 -0
- package/src/lib/seam/connect/models/devices/device-provider.ts +1 -0
- package/src/lib/seam/connect/models/devices/device-type.ts +1 -0
- package/src/lib/seam/connect/openapi.ts +709 -0
- package/src/lib/seam/connect/route-types.ts +8322 -0
package/package.json
CHANGED
|
@@ -8,6 +8,7 @@ import { lock_door_action_attempt } from './lock-door.js'
|
|
|
8
8
|
import { push_thermostat_programs_action_attempt } from './push-thermostat-programs.js'
|
|
9
9
|
import { reset_sandbox_workspace_action_attempt } from './reset-sandbox-workspace.js'
|
|
10
10
|
import { scan_credential_action_attempt } from './scan-credential.js'
|
|
11
|
+
import { scan_to_assign_credential_action_attempt } from './scan-to-assign-credential.js'
|
|
11
12
|
import { set_fan_mode_action_attempt } from './set-fan-mode.js'
|
|
12
13
|
import { set_hvac_mode_action_attempt } from './set-hvac-mode.js'
|
|
13
14
|
import { simulate_keypad_code_entry_action_attempt } from './simulate-keypad-code-entry.js'
|
|
@@ -19,6 +20,7 @@ export const action_attempt = z.union([
|
|
|
19
20
|
...unlock_door_action_attempt.options,
|
|
20
21
|
...scan_credential_action_attempt.options,
|
|
21
22
|
...encode_credential_action_attempt.options,
|
|
23
|
+
...scan_to_assign_credential_action_attempt.options,
|
|
22
24
|
...reset_sandbox_workspace_action_attempt.options,
|
|
23
25
|
...set_fan_mode_action_attempt.options,
|
|
24
26
|
...set_hvac_mode_action_attempt.options,
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { z } from 'zod'
|
|
2
|
+
|
|
3
|
+
import { acs_credential } from '../acs/acs-credential.js'
|
|
4
|
+
import {
|
|
5
|
+
common_action_attempt_errors,
|
|
6
|
+
common_failed_action_attempt,
|
|
7
|
+
common_pending_action_attempt,
|
|
8
|
+
common_succeeded_action_attempt,
|
|
9
|
+
} from './common.js'
|
|
10
|
+
|
|
11
|
+
const action_type = z
|
|
12
|
+
.literal('SCAN_TO_ASSIGN_CREDENTIAL')
|
|
13
|
+
.describe(
|
|
14
|
+
'Action attempt to track the status of scanning a physical card and assigning the credential to an ACS user.',
|
|
15
|
+
)
|
|
16
|
+
|
|
17
|
+
const no_credential_on_encoder_error = z
|
|
18
|
+
.object({
|
|
19
|
+
type: z
|
|
20
|
+
.literal('no_credential_on_encoder')
|
|
21
|
+
.describe(
|
|
22
|
+
'Error type to indicate that there is no credential on the encoder.',
|
|
23
|
+
),
|
|
24
|
+
message: z
|
|
25
|
+
.string()
|
|
26
|
+
.describe(
|
|
27
|
+
'Detailed description of the error. Provides insights into the issue and potentially how to rectify it.',
|
|
28
|
+
),
|
|
29
|
+
})
|
|
30
|
+
.describe('Error to indicate that there is no credential on the encoder.')
|
|
31
|
+
|
|
32
|
+
const error = z.union([
|
|
33
|
+
...common_action_attempt_errors,
|
|
34
|
+
no_credential_on_encoder_error,
|
|
35
|
+
])
|
|
36
|
+
|
|
37
|
+
const result = acs_credential.describe(
|
|
38
|
+
'Result of a scan to assign attempt. If the attempt was successful, includes the credential data that was scanned and assigned.',
|
|
39
|
+
)
|
|
40
|
+
|
|
41
|
+
export const scan_to_assign_credential_action_attempt = z.discriminatedUnion(
|
|
42
|
+
'status',
|
|
43
|
+
[
|
|
44
|
+
common_pending_action_attempt
|
|
45
|
+
.extend({
|
|
46
|
+
action_type,
|
|
47
|
+
})
|
|
48
|
+
.describe(
|
|
49
|
+
'Scanning a physical card and assigning the credential is pending.',
|
|
50
|
+
),
|
|
51
|
+
common_succeeded_action_attempt
|
|
52
|
+
.extend({
|
|
53
|
+
action_type,
|
|
54
|
+
result,
|
|
55
|
+
})
|
|
56
|
+
.describe(
|
|
57
|
+
'Scanning a physical card and assigning the credential succeeded.',
|
|
58
|
+
),
|
|
59
|
+
common_failed_action_attempt
|
|
60
|
+
.extend({ action_type, error })
|
|
61
|
+
.describe(
|
|
62
|
+
'Scanning a physical card and assigning the credential failed.',
|
|
63
|
+
),
|
|
64
|
+
],
|
|
65
|
+
)
|
|
66
|
+
|
|
67
|
+
export type ScanToAssignCredentialActionAttempt = z.infer<
|
|
68
|
+
typeof scan_to_assign_credential_action_attempt
|
|
69
|
+
>
|
|
@@ -633,6 +633,21 @@ export const device_metadata = z
|
|
|
633
633
|
})
|
|
634
634
|
.describe(`Metadata for an ASSA ABLOY Vostio system.`),
|
|
635
635
|
|
|
636
|
+
omnitec_metadata: z
|
|
637
|
+
.object({
|
|
638
|
+
lock_id: z.number().describe(`Lock ID for an Omnitec device.`),
|
|
639
|
+
lock_name: z.string().describe(`Lock name for an Omnitec device.`),
|
|
640
|
+
lock_mac: z
|
|
641
|
+
.string()
|
|
642
|
+
.describe(`Bluetooth MAC address for an Omnitec device.`),
|
|
643
|
+
has_gateway: z
|
|
644
|
+
.boolean()
|
|
645
|
+
.describe(
|
|
646
|
+
`Whether the Omnitec lock has a connected gateway for remote operations.`,
|
|
647
|
+
),
|
|
648
|
+
})
|
|
649
|
+
.describe(`Metadata for an Omnitec device.`),
|
|
650
|
+
|
|
636
651
|
tado_metadata: z
|
|
637
652
|
.object({
|
|
638
653
|
serial_no: z.string().describe(`Serial number for a tado° device.`),
|