@seamapi/types 1.851.0 → 1.852.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 +645 -37
- package/dist/connect.cjs.map +1 -1
- package/dist/connect.d.cts +8475 -423
- package/dist/index.cjs +645 -37
- 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 +756 -0
- package/lib/seam/connect/openapi.js +570 -0
- package/lib/seam/connect/openapi.js.map +1 -1
- package/lib/seam/connect/route-types.d.ts +7161 -423
- 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/openapi.ts +656 -0
- package/src/lib/seam/connect/route-types.ts +8070 -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
|
+
>
|