diff --git a/src/lib/seam/connect/models/access-grants/access-grant.ts b/src/lib/seam/connect/models/access-grants/access-grant.ts index 61d66e25..c18f9698 100644 --- a/src/lib/seam/connect/models/access-grants/access-grant.ts +++ b/src/lib/seam/connect/models/access-grants/access-grant.ts @@ -149,6 +149,31 @@ const device_does_not_support_access_codes = common_access_grant_warning 'Indicates that a device in the access grant does not support access codes and was excluded from code materialization.', ) +const device_time_constraints_violated_reason = z.enum([ + 'duration_exceeds_max', + 'times_do_not_match_slots', + 'ongoing_not_supported', +]) + +const device_time_constraints_violated = common_access_grant_warning + .extend({ + warning_code: z + .literal('device_time_constraints_violated') + .describe(warning_code_description), + device_id: z + .string() + .uuid() + .describe( + 'ID of the device whose time constraints the access grant violates.', + ), + reason: device_time_constraints_violated_reason.describe( + "Specific reason why the grant's times are not programmable on the device.", + ), + }) + .describe( + "Indicates that a device in the access grant cannot program an access code for the grant's time range because of device-specific time constraints.", + ) + const access_grant_warning = z .discriminatedUnion('warning_code', [ being_deleted, @@ -157,6 +182,7 @@ const access_grant_warning = z updating_access_times, requested_code_unavailable, device_does_not_support_access_codes, + device_time_constraints_violated, ]) .describe( 'Warning associated with the [access grant](https://docs.seam.co/latest/capability-guides/access-grants).', @@ -175,6 +201,10 @@ const _access_grant_warning_map = z.object({ .record(z.string().uuid(), device_does_not_support_access_codes) .optional() .nullable(), + device_time_constraints_violated: z + .record(z.string().uuid(), device_time_constraints_violated) + .optional() + .nullable(), }) export type AccessGrantWarningMap = z.infer diff --git a/src/lib/seam/connect/openapi.ts b/src/lib/seam/connect/openapi.ts index 3e5f2763..8d83b147 100644 --- a/src/lib/seam/connect/openapi.ts +++ b/src/lib/seam/connect/openapi.ts @@ -2660,6 +2660,53 @@ export default { ], type: 'object', }, + { + description: + "Indicates that a device in the access grant cannot program an access code for the grant's time range because of device-specific time constraints.", + properties: { + created_at: { + description: + 'Date and time at which Seam created the warning.', + format: 'date-time', + type: 'string', + }, + device_id: { + description: + 'ID of the device whose time constraints the access grant violates.', + format: 'uuid', + type: 'string', + }, + message: { + description: + 'Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.', + type: 'string', + }, + reason: { + description: + "Specific reason why the grant's times are not programmable on the device.", + enum: [ + 'duration_exceeds_max', + 'times_do_not_match_slots', + 'ongoing_not_supported', + ], + type: 'string', + }, + warning_code: { + description: + 'Unique identifier of the type of warning. Enables quick recognition and categorization of the issue.', + enum: ['device_time_constraints_violated'], + type: 'string', + }, + }, + required: [ + 'created_at', + 'message', + 'warning_code', + 'device_id', + 'reason', + ], + type: 'object', + }, ], }, type: 'array', @@ -36323,6 +36370,53 @@ export default { ], type: 'object', }, + { + description: + "Indicates that a device in the access grant cannot program an access code for the grant's time range because of device-specific time constraints.", + properties: { + created_at: { + description: + 'Date and time at which Seam created the warning.', + format: 'date-time', + type: 'string', + }, + device_id: { + description: + 'ID of the device whose time constraints the access grant violates.', + format: 'uuid', + type: 'string', + }, + message: { + description: + 'Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.', + type: 'string', + }, + reason: { + description: + "Specific reason why the grant's times are not programmable on the device.", + enum: [ + 'duration_exceeds_max', + 'times_do_not_match_slots', + 'ongoing_not_supported', + ], + type: 'string', + }, + warning_code: { + description: + 'Unique identifier of the type of warning. Enables quick recognition and categorization of the issue.', + enum: ['device_time_constraints_violated'], + type: 'string', + }, + }, + required: [ + 'created_at', + 'message', + 'warning_code', + 'device_id', + 'reason', + ], + type: 'object', + }, ], }, type: 'array', @@ -36979,6 +37073,53 @@ export default { ], type: 'object', }, + { + description: + "Indicates that a device in the access grant cannot program an access code for the grant's time range because of device-specific time constraints.", + properties: { + created_at: { + description: + 'Date and time at which Seam created the warning.', + format: 'date-time', + type: 'string', + }, + device_id: { + description: + 'ID of the device whose time constraints the access grant violates.', + format: 'uuid', + type: 'string', + }, + message: { + description: + 'Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.', + type: 'string', + }, + reason: { + description: + "Specific reason why the grant's times are not programmable on the device.", + enum: [ + 'duration_exceeds_max', + 'times_do_not_match_slots', + 'ongoing_not_supported', + ], + type: 'string', + }, + warning_code: { + description: + 'Unique identifier of the type of warning. Enables quick recognition and categorization of the issue.', + enum: ['device_time_constraints_violated'], + type: 'string', + }, + }, + required: [ + 'created_at', + 'message', + 'warning_code', + 'device_id', + 'reason', + ], + type: 'object', + }, ], }, type: 'array', @@ -37684,6 +37825,55 @@ export default { ], type: 'object', }, + { + description: + "Indicates that a device in the access grant cannot program an access code for the grant's time range because of device-specific time constraints.", + properties: { + created_at: { + description: + 'Date and time at which Seam created the warning.', + format: 'date-time', + type: 'string', + }, + device_id: { + description: + 'ID of the device whose time constraints the access grant violates.', + format: 'uuid', + type: 'string', + }, + message: { + description: + 'Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.', + type: 'string', + }, + reason: { + description: + "Specific reason why the grant's times are not programmable on the device.", + enum: [ + 'duration_exceeds_max', + 'times_do_not_match_slots', + 'ongoing_not_supported', + ], + type: 'string', + }, + warning_code: { + description: + 'Unique identifier of the type of warning. Enables quick recognition and categorization of the issue.', + enum: [ + 'device_time_constraints_violated', + ], + type: 'string', + }, + }, + required: [ + 'created_at', + 'message', + 'warning_code', + 'device_id', + 'reason', + ], + type: 'object', + }, ], }, type: 'array', @@ -38376,6 +38566,55 @@ export default { ], type: 'object', }, + { + description: + "Indicates that a device in the access grant cannot program an access code for the grant's time range because of device-specific time constraints.", + properties: { + created_at: { + description: + 'Date and time at which Seam created the warning.', + format: 'date-time', + type: 'string', + }, + device_id: { + description: + 'ID of the device whose time constraints the access grant violates.', + format: 'uuid', + type: 'string', + }, + message: { + description: + 'Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.', + type: 'string', + }, + reason: { + description: + "Specific reason why the grant's times are not programmable on the device.", + enum: [ + 'duration_exceeds_max', + 'times_do_not_match_slots', + 'ongoing_not_supported', + ], + type: 'string', + }, + warning_code: { + description: + 'Unique identifier of the type of warning. Enables quick recognition and categorization of the issue.', + enum: [ + 'device_time_constraints_violated', + ], + type: 'string', + }, + }, + required: [ + 'created_at', + 'message', + 'warning_code', + 'device_id', + 'reason', + ], + type: 'object', + }, ], }, type: 'array', diff --git a/src/lib/seam/connect/route-types.ts b/src/lib/seam/connect/route-types.ts index bf70240b..412c03eb 100644 --- a/src/lib/seam/connect/route-types.ts +++ b/src/lib/seam/connect/route-types.ts @@ -12537,6 +12537,21 @@ export type Routes = { /** ID of the device that does not support access codes. */ device_id: string } + | { + /** Date and time at which Seam created the warning. */ + created_at: string + /** 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: 'device_time_constraints_violated' + /** ID of the device whose time constraints the access grant violates. */ + device_id: string + /** Specific reason why the grant's times are not programmable on the device. */ + reason: + | 'duration_exceeds_max' + | 'times_do_not_match_slots' + | 'ongoing_not_supported' + } )[] /** Errors associated with the [access grant](https://docs.seam.co/latest/capability-guides/access-grants). */ errors: { @@ -12748,6 +12763,21 @@ export type Routes = { /** ID of the device that does not support access codes. */ device_id: string } + | { + /** Date and time at which Seam created the warning. */ + created_at: string + /** 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: 'device_time_constraints_violated' + /** ID of the device whose time constraints the access grant violates. */ + device_id: string + /** Specific reason why the grant's times are not programmable on the device. */ + reason: + | 'duration_exceeds_max' + | 'times_do_not_match_slots' + | 'ongoing_not_supported' + } )[] /** Errors associated with the [access grant](https://docs.seam.co/latest/capability-guides/access-grants). */ errors: { @@ -15580,6 +15610,21 @@ export type Routes = { /** ID of the device that does not support access codes. */ device_id: string } + | { + /** Date and time at which Seam created the warning. */ + created_at: string + /** 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: 'device_time_constraints_violated' + /** ID of the device whose time constraints the access grant violates. */ + device_id: string + /** Specific reason why the grant's times are not programmable on the device. */ + reason: + | 'duration_exceeds_max' + | 'times_do_not_match_slots' + | 'ongoing_not_supported' + } )[] /** Errors associated with the [access grant](https://docs.seam.co/latest/capability-guides/access-grants). */ errors: { @@ -15791,6 +15836,21 @@ export type Routes = { /** ID of the device that does not support access codes. */ device_id: string } + | { + /** Date and time at which Seam created the warning. */ + created_at: string + /** 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: 'device_time_constraints_violated' + /** ID of the device whose time constraints the access grant violates. */ + device_id: string + /** Specific reason why the grant's times are not programmable on the device. */ + reason: + | 'duration_exceeds_max' + | 'times_do_not_match_slots' + | 'ongoing_not_supported' + } )[] /** Errors associated with the [access grant](https://docs.seam.co/latest/capability-guides/access-grants). */ errors: { @@ -15976,6 +16036,21 @@ export type Routes = { /** ID of the device that does not support access codes. */ device_id: string } + | { + /** Date and time at which Seam created the warning. */ + created_at: string + /** 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: 'device_time_constraints_violated' + /** ID of the device whose time constraints the access grant violates. */ + device_id: string + /** Specific reason why the grant's times are not programmable on the device. */ + reason: + | 'duration_exceeds_max' + | 'times_do_not_match_slots' + | 'ongoing_not_supported' + } )[] /** Errors associated with the [access grant](https://docs.seam.co/latest/capability-guides/access-grants). */ errors: { @@ -16170,6 +16245,21 @@ export type Routes = { /** ID of the device that does not support access codes. */ device_id: string } + | { + /** Date and time at which Seam created the warning. */ + created_at: string + /** 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: 'device_time_constraints_violated' + /** ID of the device whose time constraints the access grant violates. */ + device_id: string + /** Specific reason why the grant's times are not programmable on the device. */ + reason: + | 'duration_exceeds_max' + | 'times_do_not_match_slots' + | 'ongoing_not_supported' + } )[] /** Errors associated with the [access grant](https://docs.seam.co/latest/capability-guides/access-grants). */ errors: { @@ -20022,6 +20112,21 @@ export type Routes = { /** ID of the device that does not support access codes. */ device_id: string } + | { + /** Date and time at which Seam created the warning. */ + created_at: string + /** 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: 'device_time_constraints_violated' + /** ID of the device whose time constraints the access grant violates. */ + device_id: string + /** Specific reason why the grant's times are not programmable on the device. */ + reason: + | 'duration_exceeds_max' + | 'times_do_not_match_slots' + | 'ongoing_not_supported' + } )[] /** Errors associated with the [access grant](https://docs.seam.co/latest/capability-guides/access-grants). */ errors: { @@ -73782,6 +73887,21 @@ export type Routes = { /** ID of the device that does not support access codes. */ device_id: string } + | { + /** Date and time at which Seam created the warning. */ + created_at: string + /** 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: 'device_time_constraints_violated' + /** ID of the device whose time constraints the access grant violates. */ + device_id: string + /** Specific reason why the grant's times are not programmable on the device. */ + reason: + | 'duration_exceeds_max' + | 'times_do_not_match_slots' + | 'ongoing_not_supported' + } )[] /** Errors associated with the [access grant](https://docs.seam.co/latest/capability-guides/access-grants). */ errors: { @@ -80465,6 +80585,21 @@ export type Routes = { /** ID of the device that does not support access codes. */ device_id: string } + | { + /** Date and time at which Seam created the warning. */ + created_at: string + /** 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: 'device_time_constraints_violated' + /** ID of the device whose time constraints the access grant violates. */ + device_id: string + /** Specific reason why the grant's times are not programmable on the device. */ + reason: + | 'duration_exceeds_max' + | 'times_do_not_match_slots' + | 'ongoing_not_supported' + } )[] /** Errors associated with the [access grant](https://docs.seam.co/latest/capability-guides/access-grants). */ errors: { @@ -80963,6 +81098,21 @@ export type Routes = { /** ID of the device that does not support access codes. */ device_id: string } + | { + /** Date and time at which Seam created the warning. */ + created_at: string + /** 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: 'device_time_constraints_violated' + /** ID of the device whose time constraints the access grant violates. */ + device_id: string + /** Specific reason why the grant's times are not programmable on the device. */ + reason: + | 'duration_exceeds_max' + | 'times_do_not_match_slots' + | 'ongoing_not_supported' + } )[] /** Errors associated with the [access grant](https://docs.seam.co/latest/capability-guides/access-grants). */ errors: { @@ -114742,6 +114892,21 @@ export type Routes = { /** ID of the device that does not support access codes. */ device_id: string } + | { + /** Date and time at which Seam created the warning. */ + created_at: string + /** 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: 'device_time_constraints_violated' + /** ID of the device whose time constraints the access grant violates. */ + device_id: string + /** Specific reason why the grant's times are not programmable on the device. */ + reason: + | 'duration_exceeds_max' + | 'times_do_not_match_slots' + | 'ongoing_not_supported' + } )[] /** Errors associated with the [access grant](https://docs.seam.co/latest/capability-guides/access-grants). */ errors: {