Skip to content

Commit 7dfc9ca

Browse files
authored
feat: Sync with Seam API via 19a9807b908350e93af30dd4c6e2573f45dc4ead (#2737)
1 parent 146ee01 commit 7dfc9ca

File tree

4 files changed

+864
-0
lines changed

4 files changed

+864
-0
lines changed

src/lib/seam/connect/models/action-attempts/encode-credential.ts

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,12 +75,46 @@ const encoder_not_online_error = z
7575
})
7676
.describe('Error to indicate that the encoder is not online.')
7777

78+
const encoder_timeout_error = z
79+
.object({
80+
type: z
81+
.literal('encoder_timeout_error')
82+
.describe(
83+
'Error type to indicate that communication with the encoder timed out.',
84+
),
85+
message: z
86+
.string()
87+
.describe(
88+
'Detailed description of the error. Provides insights into the issue and potentially how to rectify it.',
89+
),
90+
})
91+
.describe('Error to indicate that communication with the encoder timed out.')
92+
93+
const bridge_disconnected_error = z
94+
.object({
95+
type: z
96+
.literal('bridge_disconnected')
97+
.describe(
98+
'Error type to indicate that the Seam Bridge is disconnected or cannot reach the access control system.',
99+
),
100+
message: z
101+
.string()
102+
.describe(
103+
'Detailed description of the error. Provides insights into the issue and potentially how to rectify it.',
104+
),
105+
})
106+
.describe(
107+
'Error to indicate that the Seam Bridge is disconnected or cannot reach the access control system.',
108+
)
109+
78110
const error = z.union([
79111
...common_action_attempt_errors,
80112
no_credential_on_encoder_error,
81113
incompatible_card_format_error,
82114
credential_cannot_be_reissued,
83115
encoder_not_online_error,
116+
encoder_timeout_error,
117+
bridge_disconnected_error,
84118
])
85119

86120
const result = acs_credential

src/lib/seam/connect/models/action-attempts/scan-credential.ts

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,44 @@ const encoder_not_online_error = z
4444
})
4545
.describe('Error to indicate that the encoder is not online.')
4646

47+
const encoder_timeout_error = z
48+
.object({
49+
type: z
50+
.literal('encoder_timeout_error')
51+
.describe(
52+
'Error type to indicate that communication with the encoder timed out.',
53+
),
54+
message: z
55+
.string()
56+
.describe(
57+
'Detailed description of the error. Provides insights into the issue and potentially how to rectify it.',
58+
),
59+
})
60+
.describe('Error to indicate that communication with the encoder timed out.')
61+
62+
const bridge_disconnected_error = z
63+
.object({
64+
type: z
65+
.literal('bridge_disconnected')
66+
.describe(
67+
'Error type to indicate that the Seam Bridge is disconnected or cannot reach the access control system.',
68+
),
69+
message: z
70+
.string()
71+
.describe(
72+
'Detailed description of the error. Provides insights into the issue and potentially how to rectify it.',
73+
),
74+
})
75+
.describe(
76+
'Error to indicate that the Seam Bridge is disconnected or cannot reach the access control system.',
77+
)
78+
4779
const error = z.union([
4880
...common_action_attempt_errors,
4981
no_credential_on_encoder_error,
5082
encoder_not_online_error,
83+
encoder_timeout_error,
84+
bridge_disconnected_error,
5185
])
5286

5387
const warning = z

src/lib/seam/connect/openapi.ts

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6892,6 +6892,44 @@ export default {
68926892
required: ['type', 'message'],
68936893
type: 'object',
68946894
},
6895+
{
6896+
description:
6897+
'Error to indicate that communication with the encoder timed out.',
6898+
properties: {
6899+
message: {
6900+
description:
6901+
'Detailed description of the error. Provides insights into the issue and potentially how to rectify it.',
6902+
type: 'string',
6903+
},
6904+
type: {
6905+
description:
6906+
'Error type to indicate that communication with the encoder timed out.',
6907+
enum: ['encoder_timeout_error'],
6908+
type: 'string',
6909+
},
6910+
},
6911+
required: ['type', 'message'],
6912+
type: 'object',
6913+
},
6914+
{
6915+
description:
6916+
'Error to indicate that the Seam Bridge is disconnected or cannot reach the access control system.',
6917+
properties: {
6918+
message: {
6919+
description:
6920+
'Detailed description of the error. Provides insights into the issue and potentially how to rectify it.',
6921+
type: 'string',
6922+
},
6923+
type: {
6924+
description:
6925+
'Error type to indicate that the Seam Bridge is disconnected or cannot reach the access control system.',
6926+
enum: ['bridge_disconnected'],
6927+
type: 'string',
6928+
},
6929+
},
6930+
required: ['type', 'message'],
6931+
type: 'object',
6932+
},
68956933
],
68966934
},
68976935
result: {
@@ -8022,6 +8060,44 @@ export default {
80228060
required: ['type', 'message'],
80238061
type: 'object',
80248062
},
8063+
{
8064+
description:
8065+
'Error to indicate that communication with the encoder timed out.',
8066+
properties: {
8067+
message: {
8068+
description:
8069+
'Detailed description of the error. Provides insights into the issue and potentially how to rectify it.',
8070+
type: 'string',
8071+
},
8072+
type: {
8073+
description:
8074+
'Error type to indicate that communication with the encoder timed out.',
8075+
enum: ['encoder_timeout_error'],
8076+
type: 'string',
8077+
},
8078+
},
8079+
required: ['type', 'message'],
8080+
type: 'object',
8081+
},
8082+
{
8083+
description:
8084+
'Error to indicate that the Seam Bridge is disconnected or cannot reach the access control system.',
8085+
properties: {
8086+
message: {
8087+
description:
8088+
'Detailed description of the error. Provides insights into the issue and potentially how to rectify it.',
8089+
type: 'string',
8090+
},
8091+
type: {
8092+
description:
8093+
'Error type to indicate that the Seam Bridge is disconnected or cannot reach the access control system.',
8094+
enum: ['bridge_disconnected'],
8095+
type: 'string',
8096+
},
8097+
},
8098+
required: ['type', 'message'],
8099+
type: 'object',
8100+
},
80258101
],
80268102
},
80278103
result: {

0 commit comments

Comments
 (0)