From f397bc96bfd1fa2cf9e1ac24591f830d071d2aa9 Mon Sep 17 00:00:00 2001 From: Seam Bot Date: Mon, 30 Mar 2026 12:17:39 +0000 Subject: [PATCH] feat: Sync with Seam API via c3c42bcfde1f484c3f785ccb7173b291eb0b989a --- .../action-attempts/encode-credential.ts | 18 ++ src/lib/seam/connect/openapi.ts | 24 ++- src/lib/seam/connect/route-types.ts | 182 +++++++++++++++++- 3 files changed, 222 insertions(+), 2 deletions(-) diff --git a/src/lib/seam/connect/models/action-attempts/encode-credential.ts b/src/lib/seam/connect/models/action-attempts/encode-credential.ts index 05a90aac..550b8911 100644 --- a/src/lib/seam/connect/models/action-attempts/encode-credential.ts +++ b/src/lib/seam/connect/models/action-attempts/encode-credential.ts @@ -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, @@ -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 diff --git a/src/lib/seam/connect/openapi.ts b/src/lib/seam/connect/openapi.ts index d3ff5aeb..d57ebe65 100644 --- a/src/lib/seam/connect/openapi.ts +++ b/src/lib/seam/connect/openapi.ts @@ -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: { @@ -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', }, }, diff --git a/src/lib/seam/connect/route-types.ts b/src/lib/seam/connect/route-types.ts index c526c988..b6cd71eb 100644 --- a/src/lib/seam/connect/route-types.ts +++ b/src/lib/seam/connect/route-types.ts @@ -991,6 +991,12 @@ export type Routes = { /** Detailed description of the error. Provides insights into the issue and potentially how to rectify it. */ message: string } + | { + /** Error type to indicate that encoding was interrupted, for example, if the card was removed from the encoder before writing was complete. */ + type: 'encoding_interrupted' + /** Detailed description of the error. Provides insights into the issue and potentially how to rectify it. */ + message: string + } } | { /** ID of the action attempt. */ @@ -3711,6 +3717,12 @@ export type Routes = { /** Detailed description of the error. Provides insights into the issue and potentially how to rectify it. */ message: string } + | { + /** Error type to indicate that encoding was interrupted, for example, if the card was removed from the encoder before writing was complete. */ + type: 'encoding_interrupted' + /** Detailed description of the error. Provides insights into the issue and potentially how to rectify it. */ + message: string + } } | { /** ID of the action attempt. */ @@ -8335,6 +8347,12 @@ export type Routes = { /** Detailed description of the error. Provides insights into the issue and potentially how to rectify it. */ message: string } + | { + /** Error type to indicate that encoding was interrupted, for example, if the card was removed from the encoder before writing was complete. */ + type: 'encoding_interrupted' + /** Detailed description of the error. Provides insights into the issue and potentially how to rectify it. */ + message: string + } } | { /** ID of the action attempt. */ @@ -11091,6 +11109,12 @@ export type Routes = { /** Detailed description of the error. Provides insights into the issue and potentially how to rectify it. */ message: string } + | { + /** Error type to indicate that encoding was interrupted, for example, if the card was removed from the encoder before writing was complete. */ + type: 'encoding_interrupted' + /** Detailed description of the error. Provides insights into the issue and potentially how to rectify it. */ + message: string + } } | { /** ID of the action attempt. */ @@ -16511,6 +16535,12 @@ export type Routes = { /** Detailed description of the error. Provides insights into the issue and potentially how to rectify it. */ message: string } + | { + /** Error type to indicate that encoding was interrupted, for example, if the card was removed from the encoder before writing was complete. */ + type: 'encoding_interrupted' + /** Detailed description of the error. Provides insights into the issue and potentially how to rectify it. */ + message: string + } } | { /** ID of the action attempt. */ @@ -24282,6 +24312,12 @@ export type Routes = { /** Detailed description of the error. Provides insights into the issue and potentially how to rectify it. */ message: string } + | { + /** Error type to indicate that encoding was interrupted, for example, if the card was removed from the encoder before writing was complete. */ + type: 'encoding_interrupted' + /** Detailed description of the error. Provides insights into the issue and potentially how to rectify it. */ + message: string + } } | { /** ID of the action attempt. */ @@ -25934,6 +25970,12 @@ export type Routes = { /** Detailed description of the error. Provides insights into the issue and potentially how to rectify it. */ message: string } + | { + /** Error type to indicate that encoding was interrupted, for example, if the card was removed from the encoder before writing was complete. */ + type: 'encoding_interrupted' + /** Detailed description of the error. Provides insights into the issue and potentially how to rectify it. */ + message: string + } } | { /** ID of the action attempt. */ @@ -26529,7 +26571,7 @@ export type Routes = { /** ID of the `acs_encoder` that will be used in the next request to encode the `acs_credential`. */ acs_encoder_id: string /** Code of the error to simulate. */ - error_code?: 'no_credential_on_encoder' + error_code?: 'no_credential_on_encoder' | 'encoding_interrupted' } | { /** ID of the `acs_encoder` that will be used in the next request to encode the `acs_credential`. */ @@ -28140,6 +28182,12 @@ export type Routes = { /** Detailed description of the error. Provides insights into the issue and potentially how to rectify it. */ message: string } + | { + /** Error type to indicate that encoding was interrupted, for example, if the card was removed from the encoder before writing was complete. */ + type: 'encoding_interrupted' + /** Detailed description of the error. Provides insights into the issue and potentially how to rectify it. */ + message: string + } } | { /** ID of the action attempt. */ @@ -32086,6 +32134,12 @@ export type Routes = { /** Detailed description of the error. Provides insights into the issue and potentially how to rectify it. */ message: string } + | { + /** Error type to indicate that encoding was interrupted, for example, if the card was removed from the encoder before writing was complete. */ + type: 'encoding_interrupted' + /** Detailed description of the error. Provides insights into the issue and potentially how to rectify it. */ + message: string + } } | { /** ID of the action attempt. */ @@ -33627,6 +33681,12 @@ export type Routes = { /** Detailed description of the error. Provides insights into the issue and potentially how to rectify it. */ message: string } + | { + /** Error type to indicate that encoding was interrupted, for example, if the card was removed from the encoder before writing was complete. */ + type: 'encoding_interrupted' + /** Detailed description of the error. Provides insights into the issue and potentially how to rectify it. */ + message: string + } } | { /** ID of the action attempt. */ @@ -49601,6 +49661,12 @@ export type Routes = { /** Detailed description of the error. Provides insights into the issue and potentially how to rectify it. */ message: string } + | { + /** Error type to indicate that encoding was interrupted, for example, if the card was removed from the encoder before writing was complete. */ + type: 'encoding_interrupted' + /** Detailed description of the error. Provides insights into the issue and potentially how to rectify it. */ + message: string + } } | { /** ID of the action attempt. */ @@ -57920,6 +57986,12 @@ export type Routes = { /** Detailed description of the error. Provides insights into the issue and potentially how to rectify it. */ message: string } + | { + /** Error type to indicate that encoding was interrupted, for example, if the card was removed from the encoder before writing was complete. */ + type: 'encoding_interrupted' + /** Detailed description of the error. Provides insights into the issue and potentially how to rectify it. */ + message: string + } } | { /** ID of the action attempt. */ @@ -59462,6 +59534,12 @@ export type Routes = { /** Detailed description of the error. Provides insights into the issue and potentially how to rectify it. */ message: string } + | { + /** Error type to indicate that encoding was interrupted, for example, if the card was removed from the encoder before writing was complete. */ + type: 'encoding_interrupted' + /** Detailed description of the error. Provides insights into the issue and potentially how to rectify it. */ + message: string + } } | { /** ID of the action attempt. */ @@ -61002,6 +61080,12 @@ export type Routes = { /** Detailed description of the error. Provides insights into the issue and potentially how to rectify it. */ message: string } + | { + /** Error type to indicate that encoding was interrupted, for example, if the card was removed from the encoder before writing was complete. */ + type: 'encoding_interrupted' + /** Detailed description of the error. Provides insights into the issue and potentially how to rectify it. */ + message: string + } } | { /** ID of the action attempt. */ @@ -62544,6 +62628,12 @@ export type Routes = { /** Detailed description of the error. Provides insights into the issue and potentially how to rectify it. */ message: string } + | { + /** Error type to indicate that encoding was interrupted, for example, if the card was removed from the encoder before writing was complete. */ + type: 'encoding_interrupted' + /** Detailed description of the error. Provides insights into the issue and potentially how to rectify it. */ + message: string + } } | { /** ID of the action attempt. */ @@ -67479,6 +67569,12 @@ export type Routes = { /** Detailed description of the error. Provides insights into the issue and potentially how to rectify it. */ message: string } + | { + /** Error type to indicate that encoding was interrupted, for example, if the card was removed from the encoder before writing was complete. */ + type: 'encoding_interrupted' + /** Detailed description of the error. Provides insights into the issue and potentially how to rectify it. */ + message: string + } } | { /** ID of the action attempt. */ @@ -69040,6 +69136,12 @@ export type Routes = { /** Detailed description of the error. Provides insights into the issue and potentially how to rectify it. */ message: string } + | { + /** Error type to indicate that encoding was interrupted, for example, if the card was removed from the encoder before writing was complete. */ + type: 'encoding_interrupted' + /** Detailed description of the error. Provides insights into the issue and potentially how to rectify it. */ + message: string + } } | { /** ID of the action attempt. */ @@ -70657,6 +70759,12 @@ export type Routes = { /** Detailed description of the error. Provides insights into the issue and potentially how to rectify it. */ message: string } + | { + /** Error type to indicate that encoding was interrupted, for example, if the card was removed from the encoder before writing was complete. */ + type: 'encoding_interrupted' + /** Detailed description of the error. Provides insights into the issue and potentially how to rectify it. */ + message: string + } } | { /** ID of the action attempt. */ @@ -73234,6 +73342,12 @@ export type Routes = { /** Detailed description of the error. Provides insights into the issue and potentially how to rectify it. */ message: string } + | { + /** Error type to indicate that encoding was interrupted, for example, if the card was removed from the encoder before writing was complete. */ + type: 'encoding_interrupted' + /** Detailed description of the error. Provides insights into the issue and potentially how to rectify it. */ + message: string + } } | { /** ID of the action attempt. */ @@ -83512,6 +83626,12 @@ export type Routes = { /** Detailed description of the error. Provides insights into the issue and potentially how to rectify it. */ message: string } + | { + /** Error type to indicate that encoding was interrupted, for example, if the card was removed from the encoder before writing was complete. */ + type: 'encoding_interrupted' + /** Detailed description of the error. Provides insights into the issue and potentially how to rectify it. */ + message: string + } } | { /** ID of the action attempt. */ @@ -85058,6 +85178,12 @@ export type Routes = { /** Detailed description of the error. Provides insights into the issue and potentially how to rectify it. */ message: string } + | { + /** Error type to indicate that encoding was interrupted, for example, if the card was removed from the encoder before writing was complete. */ + type: 'encoding_interrupted' + /** Detailed description of the error. Provides insights into the issue and potentially how to rectify it. */ + message: string + } } | { /** ID of the action attempt. */ @@ -86716,6 +86842,12 @@ export type Routes = { /** Detailed description of the error. Provides insights into the issue and potentially how to rectify it. */ message: string } + | { + /** Error type to indicate that encoding was interrupted, for example, if the card was removed from the encoder before writing was complete. */ + type: 'encoding_interrupted' + /** Detailed description of the error. Provides insights into the issue and potentially how to rectify it. */ + message: string + } } | { /** ID of the action attempt. */ @@ -89936,6 +90068,12 @@ export type Routes = { /** Detailed description of the error. Provides insights into the issue and potentially how to rectify it. */ message: string } + | { + /** Error type to indicate that encoding was interrupted, for example, if the card was removed from the encoder before writing was complete. */ + type: 'encoding_interrupted' + /** Detailed description of the error. Provides insights into the issue and potentially how to rectify it. */ + message: string + } } | { /** ID of the action attempt. */ @@ -91486,6 +91624,12 @@ export type Routes = { /** Detailed description of the error. Provides insights into the issue and potentially how to rectify it. */ message: string } + | { + /** Error type to indicate that encoding was interrupted, for example, if the card was removed from the encoder before writing was complete. */ + type: 'encoding_interrupted' + /** Detailed description of the error. Provides insights into the issue and potentially how to rectify it. */ + message: string + } } | { /** ID of the action attempt. */ @@ -96438,6 +96582,12 @@ export type Routes = { /** Detailed description of the error. Provides insights into the issue and potentially how to rectify it. */ message: string } + | { + /** Error type to indicate that encoding was interrupted, for example, if the card was removed from the encoder before writing was complete. */ + type: 'encoding_interrupted' + /** Detailed description of the error. Provides insights into the issue and potentially how to rectify it. */ + message: string + } } | { /** ID of the action attempt. */ @@ -98183,6 +98333,12 @@ export type Routes = { /** Detailed description of the error. Provides insights into the issue and potentially how to rectify it. */ message: string } + | { + /** Error type to indicate that encoding was interrupted, for example, if the card was removed from the encoder before writing was complete. */ + type: 'encoding_interrupted' + /** Detailed description of the error. Provides insights into the issue and potentially how to rectify it. */ + message: string + } } | { /** ID of the action attempt. */ @@ -99761,6 +99917,12 @@ export type Routes = { /** Detailed description of the error. Provides insights into the issue and potentially how to rectify it. */ message: string } + | { + /** Error type to indicate that encoding was interrupted, for example, if the card was removed from the encoder before writing was complete. */ + type: 'encoding_interrupted' + /** Detailed description of the error. Provides insights into the issue and potentially how to rectify it. */ + message: string + } } | { /** ID of the action attempt. */ @@ -101456,6 +101618,12 @@ export type Routes = { /** Detailed description of the error. Provides insights into the issue and potentially how to rectify it. */ message: string } + | { + /** Error type to indicate that encoding was interrupted, for example, if the card was removed from the encoder before writing was complete. */ + type: 'encoding_interrupted' + /** Detailed description of the error. Provides insights into the issue and potentially how to rectify it. */ + message: string + } } | { /** ID of the action attempt. */ @@ -110460,6 +110628,12 @@ export type Routes = { /** Detailed description of the error. Provides insights into the issue and potentially how to rectify it. */ message: string } + | { + /** Error type to indicate that encoding was interrupted, for example, if the card was removed from the encoder before writing was complete. */ + type: 'encoding_interrupted' + /** Detailed description of the error. Provides insights into the issue and potentially how to rectify it. */ + message: string + } } | { /** ID of the action attempt. */ @@ -118321,6 +118495,12 @@ export type Routes = { /** Detailed description of the error. Provides insights into the issue and potentially how to rectify it. */ message: string } + | { + /** Error type to indicate that encoding was interrupted, for example, if the card was removed from the encoder before writing was complete. */ + type: 'encoding_interrupted' + /** Detailed description of the error. Provides insights into the issue and potentially how to rectify it. */ + message: string + } } | { /** ID of the action attempt. */