diff --git a/package-lock.json b/package-lock.json index c191c72f..1e6c6a52 100644 --- a/package-lock.json +++ b/package-lock.json @@ -17,7 +17,7 @@ "@seamapi/blueprint": "^1.8.0", "@seamapi/fake-seam-connect": "^2.0.4", "@seamapi/smith": "^1.1.0", - "@seamapi/types": "1.1027.0", + "@seamapi/types": "1.1028.0", "@types/jsonwebtoken": "^9.0.6", "@types/node": "^24.10.9", "ava": "^8.0.1", @@ -1091,9 +1091,9 @@ } }, "node_modules/@seamapi/types": { - "version": "1.1027.0", - "resolved": "https://registry.npmjs.org/@seamapi/types/-/types-1.1027.0.tgz", - "integrity": "sha512-ecaH+GNmnmRhSS9PHD5bayLC6HiOCqhloXU6IpLjp1eSR5CCwLsGPiCilJstoQpUHLVAKUqdgs7IMeNZnDcOEg==", + "version": "1.1028.0", + "resolved": "https://registry.npmjs.org/@seamapi/types/-/types-1.1028.0.tgz", + "integrity": "sha512-UQMBIU/fqkp6zkodoZnvsB6Uy6fcNHETB4cCyrshKF0O7GQNqsZzNDle4IRzKrgP8oR0QjvDtC6WVTxEv3AhWA==", "dev": true, "license": "MIT", "engines": { diff --git a/package.json b/package.json index 854cfd84..e3363afe 100644 --- a/package.json +++ b/package.json @@ -87,7 +87,7 @@ "@seamapi/blueprint": "^1.8.0", "@seamapi/fake-seam-connect": "^2.0.4", "@seamapi/smith": "^1.1.0", - "@seamapi/types": "1.1027.0", + "@seamapi/types": "1.1028.0", "@types/jsonwebtoken": "^9.0.6", "@types/node": "^24.10.9", "ava": "^8.0.1", diff --git a/src/lib/resources/access-code.ts b/src/lib/resources/access-code.ts index 5b29b54a..ac32d25b 100644 --- a/src/lib/resources/access-code.ts +++ b/src/lib/resources/access-code.ts @@ -292,6 +292,72 @@ export type AccessCode = { */ is_access_code_error: true + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ + message: string + } /** + * Seam was unable to issue this access code before its start time, so the recipient may be unable to unlock the device. This usually points to a problem that needs attention, such as an offline or disconnected device. Seam keeps retrying, and this error clears automatically if the access code is eventually issued. + */ + | { + /** + * Date and time at which Seam created the error. + */ + created_at?: string | undefined + /** + * Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + */ + error_code: 'failed_to_issue' + + /** + * Indicates that this is an access code error. + */ + is_access_code_error: true + + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ + message: string + } /** + * Seam was unable to apply this access code's pending mutations to the device, so the code on the device does not match its requested state. Seam keeps retrying, and this error clears automatically once the mutations are applied. + */ + | { + /** + * Date and time at which Seam created the error. + */ + created_at?: string | undefined + /** + * Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + */ + error_code: 'failed_to_apply_mutations' + + /** + * Indicates that this is an access code error. + */ + is_access_code_error: true + + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ + message: string + } /** + * This access code is still active on the device even though its `ends_at` has passed, so the recipient may still be able to unlock the device after their access window ended. Seam is attempting to remove it, and this error clears automatically once the access code is no longer active. + */ + | { + /** + * Date and time at which Seam created the error. + */ + created_at?: string | undefined + /** + * Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + */ + error_code: 'failed_to_expire' + + /** + * Indicates that this is an access code error. + */ + is_access_code_error: true + /** * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. */ @@ -1005,6 +1071,40 @@ export type AccessCode = { */ warning_code: 'delay_in_removing_from_device' } /** + * Seam has not yet issued this access code, even though its start time is approaching, so access may not be ready when the recipient arrives. Seam is still attempting to issue it, and this warning clears automatically once issuance succeeds. + */ + | { + /** + * Date and time at which Seam created the warning. + */ + created_at?: string | undefined + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ + message: string + + /** + * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + */ + warning_code: 'delay_in_issuing' + } /** + * Seam has not yet applied this access code's pending mutations to the device, so the code on the device does not yet match its requested state. Seam is still attempting to apply them, and this warning clears automatically once the mutations are applied. + */ + | { + /** + * Date and time at which Seam created the warning. + */ + created_at?: string | undefined + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ + message: string + + /** + * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + */ + warning_code: 'delay_in_applying_mutations' + } /** * Third-party integration detected that may cause access codes to fail. */ | { diff --git a/src/lib/resources/unmanaged-access-code.ts b/src/lib/resources/unmanaged-access-code.ts index 03d07d8c..bbfe89b9 100644 --- a/src/lib/resources/unmanaged-access-code.ts +++ b/src/lib/resources/unmanaged-access-code.ts @@ -298,6 +298,72 @@ export type UnmanagedAccessCode = { */ is_access_code_error: true + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ + message: string + } /** + * Seam was unable to issue this access code before its start time, so the recipient may be unable to unlock the device. This usually points to a problem that needs attention, such as an offline or disconnected device. Seam keeps retrying, and this error clears automatically if the access code is eventually issued. + */ + | { + /** + * Date and time at which Seam created the error. + */ + created_at?: string | undefined + /** + * Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + */ + error_code: 'failed_to_issue' + + /** + * Indicates that this is an access code error. + */ + is_access_code_error: true + + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ + message: string + } /** + * Seam was unable to apply this access code's pending mutations to the device, so the code on the device does not match its requested state. Seam keeps retrying, and this error clears automatically once the mutations are applied. + */ + | { + /** + * Date and time at which Seam created the error. + */ + created_at?: string | undefined + /** + * Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + */ + error_code: 'failed_to_apply_mutations' + + /** + * Indicates that this is an access code error. + */ + is_access_code_error: true + + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ + message: string + } /** + * This access code is still active on the device even though its `ends_at` has passed, so the recipient may still be able to unlock the device after their access window ended. Seam is attempting to remove it, and this error clears automatically once the access code is no longer active. + */ + | { + /** + * Date and time at which Seam created the error. + */ + created_at?: string | undefined + /** + * Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + */ + error_code: 'failed_to_expire' + + /** + * Indicates that this is an access code error. + */ + is_access_code_error: true + /** * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. */ @@ -787,6 +853,40 @@ export type UnmanagedAccessCode = { */ warning_code: 'delay_in_removing_from_device' } /** + * Seam has not yet issued this access code, even though its start time is approaching, so access may not be ready when the recipient arrives. Seam is still attempting to issue it, and this warning clears automatically once issuance succeeds. + */ + | { + /** + * Date and time at which Seam created the warning. + */ + created_at?: string | undefined + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ + message: string + + /** + * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + */ + warning_code: 'delay_in_issuing' + } /** + * Seam has not yet applied this access code's pending mutations to the device, so the code on the device does not yet match its requested state. Seam is still attempting to apply them, and this warning clears automatically once the mutations are applied. + */ + | { + /** + * Date and time at which Seam created the warning. + */ + created_at?: string | undefined + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ + message: string + + /** + * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + */ + warning_code: 'delay_in_applying_mutations' + } /** * Third-party integration detected that may cause access codes to fail. */ | { diff --git a/src/lib/routes/events/events.ts b/src/lib/routes/events/events.ts index 24b2c136..90713eb7 100644 --- a/src/lib/routes/events/events.ts +++ b/src/lib/routes/events/events.ts @@ -318,6 +318,12 @@ export type EventsListParameters = RequireAtLeastOne<{ | 'access_code.removed_from_device' | 'access_code.delay_in_setting_on_device' | 'access_code.failed_to_set_on_device' + | 'access_code.issued' + | 'access_code.delay_in_issuing' + | 'access_code.failed_to_issue' + | 'access_code.delay_in_applying_mutations' + | 'access_code.failed_to_apply_mutations' + | 'access_code.failed_to_expire' | 'access_code.deleted' | 'access_code.delay_in_removing_from_device' | 'access_code.failed_to_remove_from_device' @@ -433,6 +439,12 @@ export type EventsListParameters = RequireAtLeastOne<{ | 'access_code.removed_from_device' | 'access_code.delay_in_setting_on_device' | 'access_code.failed_to_set_on_device' + | 'access_code.issued' + | 'access_code.delay_in_issuing' + | 'access_code.failed_to_issue' + | 'access_code.delay_in_applying_mutations' + | 'access_code.failed_to_apply_mutations' + | 'access_code.failed_to_expire' | 'access_code.deleted' | 'access_code.delay_in_removing_from_device' | 'access_code.failed_to_remove_from_device'