From 582828a3681546ff7056f917e541aab92bfe6832 Mon Sep 17 00:00:00 2001 From: Seam Bot Date: Fri, 3 Jan 2025 08:22:11 -0800 Subject: [PATCH] fix: thermostat_schedule errors type (#1414) --- .../models/thermostats/thermostat-schedule.ts | 7 +- src/lib/seam/connect/openapi.ts | 20 +++++ src/lib/seam/connect/route-types.ts | 80 +++++++++++++++---- 3 files changed, 90 insertions(+), 17 deletions(-) diff --git a/src/lib/seam/connect/models/thermostats/thermostat-schedule.ts b/src/lib/seam/connect/models/thermostats/thermostat-schedule.ts index 9ed17a1c..b5d67348 100644 --- a/src/lib/seam/connect/models/thermostats/thermostat-schedule.ts +++ b/src/lib/seam/connect/models/thermostats/thermostat-schedule.ts @@ -53,7 +53,12 @@ export const thermostat_schedule = z .datetime() .describe('Date and time at which the thermostat schedule was created.'), errors: z - .any() + .array( + z.object({ + error_code: z.string(), + message: z.string(), + }), + ) .describe( 'Array of errors associated with the thermostat schedule. Each error object within the array contains two fields: `error_code` and `message`. `error_code` is a string that uniquely identifies the type of error, enabling quick recognition and categorization of the issue. `message` provides a more detailed description of the error, offering insights into the issue and potentially how to rectify it.', ), diff --git a/src/lib/seam/connect/openapi.ts b/src/lib/seam/connect/openapi.ts index f9e4caf2..51d73c53 100644 --- a/src/lib/seam/connect/openapi.ts +++ b/src/lib/seam/connect/openapi.ts @@ -5319,6 +5319,15 @@ export default { errors: { description: 'Array of errors associated with the thermostat schedule. Each error object within the array contains two fields: `error_code` and `message`. `error_code` is a string that uniquely identifies the type of error, enabling quick recognition and categorization of the issue. `message` provides a more detailed description of the error, offering insights into the issue and potentially how to rectify it.', + items: { + properties: { + error_code: { type: 'string' }, + message: { type: 'string' }, + }, + required: ['error_code', 'message'], + type: 'object', + }, + type: 'array', }, max_override_period_minutes: { description: @@ -5357,6 +5366,7 @@ export default { 'starts_at', 'ends_at', 'created_at', + 'errors', ], type: 'object', }, @@ -10161,6 +10171,15 @@ export default { errors: { description: 'Array of errors associated with the thermostat schedule. Each error object within the array contains two fields: `error_code` and `message`. `error_code` is a string that uniquely identifies the type of error, enabling quick recognition and categorization of the issue. `message` provides a more detailed description of the error, offering insights into the issue and potentially how to rectify it.', + items: { + properties: { + error_code: { type: 'string' }, + message: { type: 'string' }, + }, + required: ['error_code', 'message'], + type: 'object', + }, + type: 'array', }, max_override_period_minutes: { description: @@ -10199,6 +10218,7 @@ export default { 'starts_at', 'ends_at', 'created_at', + 'errors', ], type: 'object', }, diff --git a/src/lib/seam/connect/route-types.ts b/src/lib/seam/connect/route-types.ts index 97f0c3e3..ad8312b3 100644 --- a/src/lib/seam/connect/route-types.ts +++ b/src/lib/seam/connect/route-types.ts @@ -13163,7 +13163,10 @@ export interface Routes { /** Date and time at which the thermostat schedule was created. */ created_at: string /** Array of errors associated with the thermostat schedule. Each error object within the array contains two fields: `error_code` and `message`. `error_code` is a string that uniquely identifies the type of error, enabling quick recognition and categorization of the issue. `message` provides a more detailed description of the error, offering insights into the issue and potentially how to rectify it. */ - errors?: any + errors: Array<{ + error_code: string + message: string + }> } | null) | undefined min_cooling_set_point_celsius?: number | undefined @@ -14049,7 +14052,10 @@ export interface Routes { /** Date and time at which the thermostat schedule was created. */ created_at: string /** Array of errors associated with the thermostat schedule. Each error object within the array contains two fields: `error_code` and `message`. `error_code` is a string that uniquely identifies the type of error, enabling quick recognition and categorization of the issue. `message` provides a more detailed description of the error, offering insights into the issue and potentially how to rectify it. */ - errors?: any + errors: Array<{ + error_code: string + message: string + }> } | null) | undefined min_cooling_set_point_celsius?: number | undefined @@ -18025,7 +18031,10 @@ export interface Routes { /** Date and time at which the thermostat schedule was created. */ created_at: string /** Array of errors associated with the thermostat schedule. Each error object within the array contains two fields: `error_code` and `message`. `error_code` is a string that uniquely identifies the type of error, enabling quick recognition and categorization of the issue. `message` provides a more detailed description of the error, offering insights into the issue and potentially how to rectify it. */ - errors?: any + errors: Array<{ + error_code: string + message: string + }> } | null) | undefined min_cooling_set_point_celsius?: number | undefined @@ -18727,7 +18736,10 @@ export interface Routes { /** Date and time at which the thermostat schedule was created. */ created_at: string /** Array of errors associated with the thermostat schedule. Each error object within the array contains two fields: `error_code` and `message`. `error_code` is a string that uniquely identifies the type of error, enabling quick recognition and categorization of the issue. `message` provides a more detailed description of the error, offering insights into the issue and potentially how to rectify it. */ - errors?: any + errors: Array<{ + error_code: string + message: string + }> } | null) | undefined min_cooling_set_point_celsius?: number | undefined @@ -19613,7 +19625,10 @@ export interface Routes { /** Date and time at which the thermostat schedule was created. */ created_at: string /** Array of errors associated with the thermostat schedule. Each error object within the array contains two fields: `error_code` and `message`. `error_code` is a string that uniquely identifies the type of error, enabling quick recognition and categorization of the issue. `message` provides a more detailed description of the error, offering insights into the issue and potentially how to rectify it. */ - errors?: any + errors: Array<{ + error_code: string + message: string + }> } | null) | undefined min_cooling_set_point_celsius?: number | undefined @@ -20315,7 +20330,10 @@ export interface Routes { /** Date and time at which the thermostat schedule was created. */ created_at: string /** Array of errors associated with the thermostat schedule. Each error object within the array contains two fields: `error_code` and `message`. `error_code` is a string that uniquely identifies the type of error, enabling quick recognition and categorization of the issue. `message` provides a more detailed description of the error, offering insights into the issue and potentially how to rectify it. */ - errors?: any + errors: Array<{ + error_code: string + message: string + }> } | null) | undefined min_cooling_set_point_celsius?: number | undefined @@ -23131,7 +23149,10 @@ export interface Routes { /** Date and time at which the thermostat schedule was created. */ created_at: string /** Array of errors associated with the thermostat schedule. Each error object within the array contains two fields: `error_code` and `message`. `error_code` is a string that uniquely identifies the type of error, enabling quick recognition and categorization of the issue. `message` provides a more detailed description of the error, offering insights into the issue and potentially how to rectify it. */ - errors?: any + errors: Array<{ + error_code: string + message: string + }> } | null) | undefined min_cooling_set_point_celsius?: number | undefined @@ -23833,7 +23854,10 @@ export interface Routes { /** Date and time at which the thermostat schedule was created. */ created_at: string /** Array of errors associated with the thermostat schedule. Each error object within the array contains two fields: `error_code` and `message`. `error_code` is a string that uniquely identifies the type of error, enabling quick recognition and categorization of the issue. `message` provides a more detailed description of the error, offering insights into the issue and potentially how to rectify it. */ - errors?: any + errors: Array<{ + error_code: string + message: string + }> } | null) | undefined min_cooling_set_point_celsius?: number | undefined @@ -29613,7 +29637,10 @@ export interface Routes { /** Date and time at which the thermostat schedule was created. */ created_at: string /** Array of errors associated with the thermostat schedule. Each error object within the array contains two fields: `error_code` and `message`. `error_code` is a string that uniquely identifies the type of error, enabling quick recognition and categorization of the issue. `message` provides a more detailed description of the error, offering insights into the issue and potentially how to rectify it. */ - errors?: any + errors: Array<{ + error_code: string + message: string + }> } | null) | undefined min_cooling_set_point_celsius?: number | undefined @@ -32411,7 +32438,10 @@ export interface Routes { /** Date and time at which the thermostat schedule was created. */ created_at: string /** Array of errors associated with the thermostat schedule. Each error object within the array contains two fields: `error_code` and `message`. `error_code` is a string that uniquely identifies the type of error, enabling quick recognition and categorization of the issue. `message` provides a more detailed description of the error, offering insights into the issue and potentially how to rectify it. */ - errors?: any + errors: Array<{ + error_code: string + message: string + }> } | null) | undefined min_cooling_set_point_celsius?: number | undefined @@ -33113,7 +33143,10 @@ export interface Routes { /** Date and time at which the thermostat schedule was created. */ created_at: string /** Array of errors associated with the thermostat schedule. Each error object within the array contains two fields: `error_code` and `message`. `error_code` is a string that uniquely identifies the type of error, enabling quick recognition and categorization of the issue. `message` provides a more detailed description of the error, offering insights into the issue and potentially how to rectify it. */ - errors?: any + errors: Array<{ + error_code: string + message: string + }> } | null) | undefined min_cooling_set_point_celsius?: number | undefined @@ -34180,7 +34213,10 @@ export interface Routes { /** Date and time at which the thermostat schedule was created. */ created_at: string /** Array of errors associated with the thermostat schedule. Each error object within the array contains two fields: `error_code` and `message`. `error_code` is a string that uniquely identifies the type of error, enabling quick recognition and categorization of the issue. `message` provides a more detailed description of the error, offering insights into the issue and potentially how to rectify it. */ - errors?: any + errors: Array<{ + error_code: string + message: string + }> } } } @@ -34228,7 +34264,10 @@ export interface Routes { /** Date and time at which the thermostat schedule was created. */ created_at: string /** Array of errors associated with the thermostat schedule. Each error object within the array contains two fields: `error_code` and `message`. `error_code` is a string that uniquely identifies the type of error, enabling quick recognition and categorization of the issue. `message` provides a more detailed description of the error, offering insights into the issue and potentially how to rectify it. */ - errors?: any + errors: Array<{ + error_code: string + message: string + }> } } } @@ -34265,7 +34304,10 @@ export interface Routes { /** Date and time at which the thermostat schedule was created. */ created_at: string /** Array of errors associated with the thermostat schedule. Each error object within the array contains two fields: `error_code` and `message`. `error_code` is a string that uniquely identifies the type of error, enabling quick recognition and categorization of the issue. `message` provides a more detailed description of the error, offering insights into the issue and potentially how to rectify it. */ - errors?: any + errors: Array<{ + error_code: string + message: string + }> }> } } @@ -37165,7 +37207,10 @@ export interface Routes { /** Date and time at which the thermostat schedule was created. */ created_at: string /** Array of errors associated with the thermostat schedule. Each error object within the array contains two fields: `error_code` and `message`. `error_code` is a string that uniquely identifies the type of error, enabling quick recognition and categorization of the issue. `message` provides a more detailed description of the error, offering insights into the issue and potentially how to rectify it. */ - errors?: any + errors: Array<{ + error_code: string + message: string + }> } | null) | undefined min_cooling_set_point_celsius?: number | undefined @@ -37869,7 +37914,10 @@ export interface Routes { /** Date and time at which the thermostat schedule was created. */ created_at: string /** Array of errors associated with the thermostat schedule. Each error object within the array contains two fields: `error_code` and `message`. `error_code` is a string that uniquely identifies the type of error, enabling quick recognition and categorization of the issue. `message` provides a more detailed description of the error, offering insights into the issue and potentially how to rectify it. */ - errors?: any + errors: Array<{ + error_code: string + message: string + }> } | null) | undefined min_cooling_set_point_celsius?: number | undefined