@seamapi/types 1.368.0 → 1.369.1
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 +454 -243
- package/dist/connect.cjs.map +1 -1
- package/dist/connect.d.cts +2663 -1011
- package/lib/seam/connect/models/acs/acs-access-group.js +4 -1
- package/lib/seam/connect/models/acs/acs-access-group.js.map +1 -1
- package/lib/seam/connect/models/acs/acs-credential.js +5 -1
- package/lib/seam/connect/models/acs/acs-credential.js.map +1 -1
- package/lib/seam/connect/models/acs/acs-encoder.js +14 -1
- package/lib/seam/connect/models/acs/acs-encoder.js.map +1 -1
- package/lib/seam/connect/models/acs/acs-entrance.js +2 -0
- package/lib/seam/connect/models/acs/acs-entrance.js.map +1 -1
- package/lib/seam/connect/models/acs/acs-system.js +4 -0
- package/lib/seam/connect/models/acs/acs-system.js.map +1 -1
- package/lib/seam/connect/models/acs/acs-users/acs-user.js +4 -0
- package/lib/seam/connect/models/acs/acs-users/acs-user.js.map +1 -1
- package/lib/seam/connect/models/action-attempts/common.js +36 -19
- package/lib/seam/connect/models/action-attempts/common.js.map +1 -1
- package/lib/seam/connect/models/action-attempts/encode-credential.js +9 -5
- package/lib/seam/connect/models/action-attempts/encode-credential.js.map +1 -1
- package/lib/seam/connect/openapi.d.ts +154 -34
- package/lib/seam/connect/openapi.js +344 -172
- package/lib/seam/connect/openapi.js.map +1 -1
- package/lib/seam/connect/route-types.d.ts +2509 -977
- package/package.json +1 -1
- package/src/lib/seam/connect/models/acs/acs-access-group.ts +4 -1
- package/src/lib/seam/connect/models/acs/acs-credential.ts +5 -1
- package/src/lib/seam/connect/models/acs/acs-encoder.ts +14 -1
- package/src/lib/seam/connect/models/acs/acs-entrance.ts +2 -0
- package/src/lib/seam/connect/models/acs/acs-system.ts +4 -0
- package/src/lib/seam/connect/models/acs/acs-users/acs-user.ts +4 -0
- package/src/lib/seam/connect/models/action-attempts/common.ts +42 -19
- package/src/lib/seam/connect/models/action-attempts/encode-credential.ts +17 -5
- package/src/lib/seam/connect/openapi.ts +415 -172
- package/src/lib/seam/connect/route-types.ts +2509 -977
package/package.json
CHANGED
|
@@ -104,7 +104,10 @@ export const acs_access_group = common_acs_access_group.extend({
|
|
|
104
104
|
route_path: /acs/access_groups
|
|
105
105
|
---
|
|
106
106
|
Group that defines the entrances to which a set of users has access and, in some cases, the access schedule for these entrances and users.
|
|
107
|
-
|
|
107
|
+
|
|
108
|
+
Some access control systems use [access group](https://docs.seam.co/latest/capability-guides/access-systems/assigning-users-to-access-groups), which are sets of users, combined with sets of permissions. These permissions include both the set of areas or assets that the users can access and the schedule during which the users can access these areas or assets. Instead of assigning access rights individually to each access control system user, which can be time-consuming and error-prone, administrators can assign users to an access group, thereby ensuring that the users inherit all the permissions associated with the access group. Using access groups streamlines the process of managing large numbers of access control system users, especially in bigger organizations or complexes.
|
|
109
|
+
|
|
110
|
+
To learn whether your access control system supports access groups, see the corresponding [system integration guide](https://docs.seam.co/latest/device-and-system-integration-guides/overview#access-control-systems).
|
|
108
111
|
`)
|
|
109
112
|
export const unmanaged_acs_access_group = common_acs_access_group.extend({
|
|
110
113
|
is_managed: z.literal(false),
|
|
@@ -289,7 +289,11 @@ export const acs_credential = common_acs_credential.merge(
|
|
|
289
289
|
---
|
|
290
290
|
route_path: /acs/credentials
|
|
291
291
|
---
|
|
292
|
-
Means by which an [
|
|
292
|
+
Means by which an [access control system user](https://docs.seam.co/latest/capability-guides/access-systems/user-management) gains access at an [entrance](https://docs.seam.co/latest/capability-guides/access-systems/retrieving-entrance-details). The \`acs_credential\` object represents a [credential](https://docs.seam.co/latest/capability-guides/access-systems/managing-credentials) that provides an ACS user access within an [access control system](https://docs.seam.co/latest/capability-guides/access-systems).
|
|
293
|
+
|
|
294
|
+
An access control system generally uses digital means of access to authorize a user trying to get through a specific entrance. Examples of credentials include plastic key cards, mobile keys, biometric identifiers, and PIN codes. The electronic nature of these credentials, as well as the fact that access is centralized, enables both the rapid provisioning and rescinding of access and the ability to compile access audit logs.
|
|
295
|
+
|
|
296
|
+
For each \`acs_credential\`, you define the access method. You can also specify additional properties, such as a PIN code, depending on the credential type.
|
|
293
297
|
`)
|
|
294
298
|
|
|
295
299
|
export const unmanaged_acs_credential = common_acs_credential.merge(
|
|
@@ -72,7 +72,20 @@ export const acs_encoder = z.object({
|
|
|
72
72
|
---
|
|
73
73
|
route_path: /acs/encoders
|
|
74
74
|
---
|
|
75
|
-
Represents a hardware device that encodes [credential](https://docs.seam.co/latest/capability-guides/access-systems/managing-credentials) data onto physical cards within an [access control system](https://docs.seam.co/latest/capability-guides/access-systems).
|
|
75
|
+
Represents a hardware device that encodes [credential](https://docs.seam.co/latest/capability-guides/access-systems/managing-credentials) data onto physical cards within an [access control system](https://docs.seam.co/latest/capability-guides/access-systems).
|
|
76
|
+
|
|
77
|
+
Some access control systems require credentials to be encoded onto plastic key cards using a card encoder. This process involves the following two key steps:
|
|
78
|
+
|
|
79
|
+
1. Credential creation
|
|
80
|
+
Configure the access parameters for the credential.
|
|
81
|
+
2. Card encoding
|
|
82
|
+
Write the credential data onto the card using a compatible card encoder.
|
|
83
|
+
|
|
84
|
+
Separately, the Seam API also supports card scanning, which enables you to scan and read the encoded data on a card. You can use this action to confirm consistency with access control system records or diagnose discrepancies if needed.
|
|
85
|
+
|
|
86
|
+
See [Working with Card Encoders and Scanners](https://docs.seam.co/latest/capability-guides/access-systems/working-with-card-encoders-and-scanners).
|
|
87
|
+
|
|
88
|
+
To verify if your access control system requires a card encoder, see the corresponding [system integration guide](https://docs.seam.co/latest/device-and-system-integration-guides/overview#access-control-systems).
|
|
76
89
|
`)
|
|
77
90
|
|
|
78
91
|
export type AcsEncoder = z.infer<typeof acs_encoder>
|
|
@@ -86,6 +86,8 @@ export const acs_entrance = z.object({
|
|
|
86
86
|
route_path: /acs/entrances
|
|
87
87
|
---
|
|
88
88
|
Represents an [entrance](https://docs.seam.co/latest/capability-guides/access-systems/retrieving-entrance-details) within an [access control system](https://docs.seam.co/latest/capability-guides/access-systems).
|
|
89
|
+
|
|
90
|
+
In an access control system, an entrance is a secured door, gate, zone, or other method of entry. You can list details for all the \`acs_entrance\` resources in your workspace or get these details for a specific \`acs_entrance\`. You can also list all entrances associated with a specific credential, and you can list all credentials associated with a specific entrance.
|
|
89
91
|
`)
|
|
90
92
|
|
|
91
93
|
export type AcsEntrance = z.infer<typeof acs_entrance>
|
|
@@ -339,6 +339,10 @@ export const acs_system = z
|
|
|
339
339
|
route_path: /acs/systems
|
|
340
340
|
---
|
|
341
341
|
Represents an [access control system](https://docs.seam.co/latest/capability-guides/access-systems).
|
|
342
|
+
|
|
343
|
+
Within an \`acs_system\`, create [\`acs_user\`s](https://docs.seam.co/latest/api/acs/users#acs_user) and [\`acs_credential\`s](https://docs.seam.co/latest/api/acs/credentials#acs_credential) to grant access to the \`acs_user\`s.
|
|
344
|
+
|
|
345
|
+
For details about the resources associated with an access control system, see the [access control systems namespace](https://docs.seam.co/latest/api/acs).
|
|
342
346
|
`)
|
|
343
347
|
|
|
344
348
|
export type AcsSystem = z.output<typeof acs_system>
|
|
@@ -342,6 +342,10 @@ export const acs_user = common_acs_user.merge(
|
|
|
342
342
|
route_path: /acs/users
|
|
343
343
|
---
|
|
344
344
|
Represents a [user](https://docs.seam.co/latest/capability-guides/access-systems/user-management) in an [access control system](https://docs.seam.co/latest/capability-guides/access-systems).
|
|
345
|
+
|
|
346
|
+
An \`acs_user\` typically refers to an individual who requires access, like an employee or resident. Each user can possess multiple credentials that serve as their keys or identifiers for access. The type of credential can vary widely. For example, in the Salto system, a user can have a PIN code, a mobile app account, and a fob. In other platforms, it is not uncommon for a user to have more than one of the same credential type, such as multiple key cards. Additionally, these credentials can have a schedule or validity period.
|
|
347
|
+
|
|
348
|
+
For details about how to configure \`acs_user\`s in your access control system, see the corresponding [system integration guide](https://docs.seam.co/latest/device-and-system-integration-guides/overview#access-control-systems).
|
|
345
349
|
`)
|
|
346
350
|
|
|
347
351
|
export const unmanaged_acs_user = common_acs_user.merge(
|
|
@@ -1,38 +1,61 @@
|
|
|
1
1
|
import { z } from 'zod'
|
|
2
2
|
|
|
3
3
|
export const common_action_attempt = z.object({
|
|
4
|
-
action_attempt_id: z.string().uuid().describe(
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
The ID of the action attempt.
|
|
9
|
-
`),
|
|
10
|
-
status: z.enum(['pending', 'success', 'error']),
|
|
4
|
+
action_attempt_id: z.string().uuid().describe('ID of the action attempt.'),
|
|
5
|
+
status: z
|
|
6
|
+
.enum(['pending', 'success', 'error'])
|
|
7
|
+
.describe('Status of the action attempt.'),
|
|
11
8
|
})
|
|
12
9
|
|
|
13
10
|
export const common_pending_action_attempt = common_action_attempt.extend({
|
|
14
11
|
status: z.literal('pending'),
|
|
15
|
-
result: z
|
|
16
|
-
|
|
12
|
+
result: z
|
|
13
|
+
.null()
|
|
14
|
+
.describe(
|
|
15
|
+
'Result of the action attempt. Null for pending action attempts.',
|
|
16
|
+
),
|
|
17
|
+
error: z
|
|
18
|
+
.null()
|
|
19
|
+
.describe(
|
|
20
|
+
'Errors associated with the action attempt. Null for pending action attempts.',
|
|
21
|
+
),
|
|
17
22
|
})
|
|
18
23
|
|
|
19
24
|
export const common_succeeded_action_attempt = common_action_attempt.extend({
|
|
20
25
|
status: z.literal('success'),
|
|
21
|
-
error: z
|
|
26
|
+
error: z
|
|
27
|
+
.null()
|
|
28
|
+
.describe(
|
|
29
|
+
'Errors associated with the action attempt. Null for successful action attempts.',
|
|
30
|
+
),
|
|
22
31
|
})
|
|
23
32
|
|
|
24
33
|
export const common_failed_action_attempt = common_action_attempt.extend({
|
|
25
34
|
status: z.literal('error'),
|
|
26
|
-
result: z
|
|
35
|
+
result: z
|
|
36
|
+
.null()
|
|
37
|
+
.describe('Result of the action attempt. Null for failed action attempts.'),
|
|
27
38
|
})
|
|
28
39
|
|
|
29
40
|
export const common_action_attempt_errors = [
|
|
30
|
-
z
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
41
|
+
z
|
|
42
|
+
.object({
|
|
43
|
+
type: z
|
|
44
|
+
.literal('uncategorized_error')
|
|
45
|
+
.describe('Type of the error associated with the action attempt.'),
|
|
46
|
+
message: z
|
|
47
|
+
.string()
|
|
48
|
+
.describe('Message for the error associated with the action attempt.'),
|
|
49
|
+
})
|
|
50
|
+
.describe("Error that doesn't fit into other specific error categories."),
|
|
51
|
+
z
|
|
52
|
+
.object({
|
|
53
|
+
type: z
|
|
54
|
+
.literal('action_attempt_expired')
|
|
55
|
+
.describe('Type of the error associated with the action attempt.'),
|
|
56
|
+
message: z
|
|
57
|
+
.string()
|
|
58
|
+
.describe('Message for the error associated with the action attempt.'),
|
|
59
|
+
})
|
|
60
|
+
.describe('Error to indicate an expired action attempt.'),
|
|
38
61
|
] as const
|
|
@@ -11,7 +11,9 @@ import {
|
|
|
11
11
|
common_succeeded_action_attempt,
|
|
12
12
|
} from './common.js'
|
|
13
13
|
|
|
14
|
-
const action_type = z
|
|
14
|
+
const action_type = z
|
|
15
|
+
.literal('ENCODE_CREDENTIAL')
|
|
16
|
+
.describe('Type of action that the action attempt tracks.')
|
|
15
17
|
|
|
16
18
|
const no_credential_on_encoder_error = z.object({
|
|
17
19
|
type: z.literal('no_credential_on_encoder'),
|
|
@@ -35,23 +37,33 @@ const error = z.union([
|
|
|
35
37
|
credential_cannot_be_reissued,
|
|
36
38
|
])
|
|
37
39
|
|
|
38
|
-
const result = acs_credential
|
|
40
|
+
const result = acs_credential
|
|
41
|
+
.or(unmanaged_acs_credential)
|
|
42
|
+
.describe(
|
|
43
|
+
'If an encoding attempt was successful, includes the `acs_credential` data that was encoded onto the card.',
|
|
44
|
+
)
|
|
39
45
|
|
|
40
46
|
export const encode_credential_action_attempt = z.discriminatedUnion('status', [
|
|
41
47
|
common_pending_action_attempt
|
|
42
48
|
.extend({
|
|
43
49
|
action_type,
|
|
44
50
|
})
|
|
45
|
-
.describe(
|
|
51
|
+
.describe(
|
|
52
|
+
'Action attempt to track encoding credential data from the physical encoder onto a card.',
|
|
53
|
+
),
|
|
46
54
|
common_succeeded_action_attempt
|
|
47
55
|
.extend({
|
|
48
56
|
action_type,
|
|
49
57
|
result,
|
|
50
58
|
})
|
|
51
|
-
.describe(
|
|
59
|
+
.describe(
|
|
60
|
+
'Action attempt to indicate that encoding credential data from the physical encoder onto a card succeeded.',
|
|
61
|
+
),
|
|
52
62
|
common_failed_action_attempt
|
|
53
63
|
.extend({ action_type, error })
|
|
54
|
-
.describe(
|
|
64
|
+
.describe(
|
|
65
|
+
'Action attempt to indicate that encoding credential data from the physical encoder onto a card failed.',
|
|
66
|
+
),
|
|
55
67
|
])
|
|
56
68
|
|
|
57
69
|
export type EncodeCredentialActionAttempt = z.infer<
|