Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,23 @@ const bridge_disconnected_error = z
'Error to indicate that the Seam Bridge is disconnected or cannot reach the access control system.',
)

const encoding_interrupted_error = z
.object({
type: z
.literal('encoding_interrupted')
.describe(
'Error type to indicate that encoding was interrupted, for example, if the card was removed from the encoder before writing was complete.',
),
message: z
.string()
.describe(
'Detailed description of the error. Provides insights into the issue and potentially how to rectify it.',
),
})
.describe(
'Error to indicate that encoding was interrupted, for example, if the card was removed from the encoder before writing was complete.',
)

const error = z.union([
...common_action_attempt_errors,
no_credential_on_encoder_error,
Expand All @@ -115,6 +132,7 @@ const error = z.union([
encoder_not_online_error,
encoder_timeout_error,
bridge_disconnected_error,
encoding_interrupted_error,
])

const result = acs_credential
Expand Down
24 changes: 23 additions & 1 deletion src/lib/seam/connect/openapi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8098,6 +8098,25 @@ export default {
required: ['type', 'message'],
type: 'object',
},
{
description:
'Error to indicate that encoding was interrupted, for example, if the card was removed from the encoder before writing was complete.',
properties: {
message: {
description:
'Detailed description of the error. Provides insights into the issue and potentially how to rectify it.',
type: 'string',
},
type: {
description:
'Error type to indicate that encoding was interrupted, for example, if the card was removed from the encoder before writing was complete.',
enum: ['encoding_interrupted'],
type: 'string',
},
},
required: ['type', 'message'],
type: 'object',
},
],
},
result: {
Expand Down Expand Up @@ -43762,7 +43781,10 @@ export default {
error_code: {
default: 'no_credential_on_encoder',
description: 'Code of the error to simulate.',
enum: ['no_credential_on_encoder'],
enum: [
'no_credential_on_encoder',
'encoding_interrupted',
],
type: 'string',
},
},
Expand Down
Loading
Loading