diff --git a/package-lock.json b/package-lock.json index 6bf858a1..1b233ad3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -17,7 +17,7 @@ "@seamapi/blueprint": "^1.10.0", "@seamapi/fake-seam-connect": "^2.0.4", "@seamapi/smith": "^1.1.0", - "@seamapi/types": "1.1098.0", + "@seamapi/types": "1.1100.0", "@types/jsonwebtoken": "^9.0.6", "@types/node": "^24.10.9", "ava": "^8.0.1", @@ -1133,9 +1133,9 @@ } }, "node_modules/@seamapi/types": { - "version": "1.1098.0", - "resolved": "https://registry.npmjs.org/@seamapi/types/-/types-1.1098.0.tgz", - "integrity": "sha512-pxGJrkuDd62oNiGnKHKnx3LaNvylrWfj5T6IEKlE/njVrp4K/khVmiSqjt4wh3EcgU3R27Zk8pOqivhB8fwKkA==", + "version": "1.1100.0", + "resolved": "https://registry.npmjs.org/@seamapi/types/-/types-1.1100.0.tgz", + "integrity": "sha512-syQWT7HOR5T24hzSAXpcFvWzRUrn+PuObNhiN2xvfxGJUseUvhB0LQGfI7mJY0lxWdBazYJEXLf8M3cqYW7K8g==", "dev": true, "license": "MIT", "engines": { diff --git a/package.json b/package.json index d18aeec3..bbe077ed 100644 --- a/package.json +++ b/package.json @@ -88,7 +88,7 @@ "@seamapi/blueprint": "^1.10.0", "@seamapi/fake-seam-connect": "^2.0.4", "@seamapi/smith": "^1.1.0", - "@seamapi/types": "1.1098.0", + "@seamapi/types": "1.1100.0", "@types/jsonwebtoken": "^9.0.6", "@types/node": "^24.10.9", "ava": "^8.0.1", diff --git a/src/lib/resources/access-grant.ts b/src/lib/resources/access-grant.ts index 4e3bc31a..24e6c504 100644 --- a/src/lib/resources/access-grant.ts +++ b/src/lib/resources/access-grant.ts @@ -55,27 +55,45 @@ export type AccessGrant = { /** * Indicates that Seam could not create one or more of the requested access methods for the access grant. */ - { - /** - * Date and time at which Seam created the error. - */ - created_at: string - - /** - * Unique identifier of the type of error. Enables quick recognition and categorization of the issue. - */ - error_code: 'cannot_create_requested_access_methods' - - /** - * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - */ - message: string - - /** - * IDs of the devices that did not receive an access code at grant creation. Use these to identify which specific devices failed when the message reports a partial failure. - */ - missing_device_ids?: Array | undefined - } + | { + /** + * Date and time at which Seam created the error. + */ + created_at: string + + /** + * Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + */ + error_code: 'cannot_create_requested_access_methods' + + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ + message: string + + /** + * IDs of the devices that did not receive an access code at grant creation. Use these to identify which specific devices failed when the message reports a partial failure. + */ + missing_device_ids?: Array | undefined + } /** + * Indicates that the access system rejected the access that Seam tried to set up for this access grant, so its credentials cannot open the affected entrances. For example, a hotel room may already be reserved or checked in for another guest. The message contains the reason that the access system gave. Seam keeps retrying, and this error clears automatically once the access system accepts the access. + */ + | { + /** + * Date and time at which Seam created the error. + */ + created_at: string + + /** + * Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + */ + error_code: 'access_not_provisioned' + + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ + message: string + } > /** diff --git a/src/lib/resources/access-method.ts b/src/lib/resources/access-method.ts index ad430baa..97ec6476 100644 --- a/src/lib/resources/access-method.ts +++ b/src/lib/resources/access-method.ts @@ -46,22 +46,40 @@ export type AccessMethod = { /** * Indicates that Seam was unable to issue this [access method](https://www.seam.co/docs/use-cases/granting-access/creating-an-access-grant) before its access grant started, so the recipient may be unable to access the space. 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 method is eventually issued. */ - { - /** - * Date and time at which Seam created the error. - */ - created_at: string - - /** - * Unique identifier of the type of error. Enables quick recognition and categorization of the issue. - */ - error_code: 'failed_to_issue' - - /** - * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - */ - message: string - } + | { + /** + * Date and time at which Seam created the error. + */ + created_at: string + + /** + * Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + */ + error_code: 'failed_to_issue' + + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ + message: string + } /** + * Indicates that the access system rejected the access that Seam tried to set up for this access method, so its credential cannot open the affected entrances, even after it is issued. For example, a hotel room may already be reserved or checked in for another guest. The message contains the reason that the access system gave. Seam keeps retrying, and this error clears automatically once the access system accepts the access. + */ + | { + /** + * Date and time at which Seam created the error. + */ + created_at: string + + /** + * Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + */ + error_code: 'access_not_provisioned' + + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ + message: string + } > /** diff --git a/src/lib/resources/action-attempt.ts b/src/lib/resources/action-attempt.ts index 3bd74f32..fe1a08ef 100644 --- a/src/lib/resources/action-attempt.ts +++ b/src/lib/resources/action-attempt.ts @@ -1305,7 +1305,7 @@ export type ActionAttempt = /** * Unique identifier of the type of error. Enables quick recognition and categorization of the issue. */ - error_code: 'failed_to_issue' + error_code: 'failed_to_issue' | 'access_not_provisioned' /** * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. @@ -2186,6 +2186,83 @@ export type ActionAttempt = */ action_attempt_id: string + /** + * Action attempt to track the status of converting an unmanaged access code to a managed access code. + */ + action_type: 'CONVERT_ACCESS_CODE_TO_MANAGED' + + /** + * Error associated with the action. + */ + error: null + /** + * Result of the action. + */ + result: {} + + status: 'success' + } + | { + /** + * ID of the action attempt. + */ + action_attempt_id: string + + /** + * Action attempt to track the status of converting an unmanaged access code to a managed access code. + */ + action_type: 'CONVERT_ACCESS_CODE_TO_MANAGED' + + /** + * Error associated with the action. + */ + error: null + /** + * Result of the action. + */ + result: null + + status: 'pending' + } + | { + /** + * ID of the action attempt. + */ + action_attempt_id: string + + /** + * Action attempt to track the status of converting an unmanaged access code to a managed access code. + */ + action_type: 'CONVERT_ACCESS_CODE_TO_MANAGED' + + /** + * Error associated with the action. + */ + error: { + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ + message: string + + /** + * Type of the error. + */ + type: string + } + + /** + * Result of the action. + */ + result: null + + status: 'error' + } + | { + /** + * ID of the action attempt. + */ + action_attempt_id: string + /** * Syncing access codes is pending. */ diff --git a/src/lib/resources/unmanaged-access-grant.ts b/src/lib/resources/unmanaged-access-grant.ts index 0bedc8c8..4549b40c 100644 --- a/src/lib/resources/unmanaged-access-grant.ts +++ b/src/lib/resources/unmanaged-access-grant.ts @@ -38,27 +38,45 @@ export type UnmanagedAccessGrant = { /** * Indicates that Seam could not create one or more of the requested access methods for the access grant. */ - { - /** - * Date and time at which Seam created the error. - */ - created_at: string - - /** - * Unique identifier of the type of error. Enables quick recognition and categorization of the issue. - */ - error_code: 'cannot_create_requested_access_methods' - - /** - * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - */ - message: string - - /** - * IDs of the devices that did not receive an access code at grant creation. Use these to identify which specific devices failed when the message reports a partial failure. - */ - missing_device_ids?: Array | undefined - } + | { + /** + * Date and time at which Seam created the error. + */ + created_at: string + + /** + * Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + */ + error_code: 'cannot_create_requested_access_methods' + + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ + message: string + + /** + * IDs of the devices that did not receive an access code at grant creation. Use these to identify which specific devices failed when the message reports a partial failure. + */ + missing_device_ids?: Array | undefined + } /** + * Indicates that the access system rejected the access that Seam tried to set up for this access grant, so its credentials cannot open the affected entrances. For example, a hotel room may already be reserved or checked in for another guest. The message contains the reason that the access system gave. Seam keeps retrying, and this error clears automatically once the access system accepts the access. + */ + | { + /** + * Date and time at which Seam created the error. + */ + created_at: string + + /** + * Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + */ + error_code: 'access_not_provisioned' + + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ + message: string + } > /** diff --git a/src/lib/resources/unmanaged-access-method.ts b/src/lib/resources/unmanaged-access-method.ts index b45a5986..1f63945a 100644 --- a/src/lib/resources/unmanaged-access-method.ts +++ b/src/lib/resources/unmanaged-access-method.ts @@ -38,22 +38,40 @@ export type UnmanagedAccessMethod = { /** * Indicates that Seam was unable to issue this [access method](https://www.seam.co/docs/use-cases/granting-access/creating-an-access-grant) before its access grant started, so the recipient may be unable to access the space. 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 method is eventually issued. */ - { - /** - * Date and time at which Seam created the error. - */ - created_at: string - - /** - * Unique identifier of the type of error. Enables quick recognition and categorization of the issue. - */ - error_code: 'failed_to_issue' - - /** - * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - */ - message: string - } + | { + /** + * Date and time at which Seam created the error. + */ + created_at: string + + /** + * Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + */ + error_code: 'failed_to_issue' + + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ + message: string + } /** + * Indicates that the access system rejected the access that Seam tried to set up for this access method, so its credential cannot open the affected entrances, even after it is issued. For example, a hotel room may already be reserved or checked in for another guest. The message contains the reason that the access system gave. Seam keeps retrying, and this error clears automatically once the access system accepts the access. + */ + | { + /** + * Date and time at which Seam created the error. + */ + created_at: string + + /** + * Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + */ + error_code: 'access_not_provisioned' + + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ + message: string + } > /**