From ed9f6b9dacbcb4b5b2ed96cd467068343cd42b3a Mon Sep 17 00:00:00 2001 From: Seam Bot Date: Fri, 14 Mar 2025 17:40:09 +0000 Subject: [PATCH] Update via seamapi/seam-connect@832205b576916ad53c7fc8bbeff7d2acdcce1aaf --- src/lib/seam/connect/internal/schemas.ts | 2 + src/lib/seam/connect/models/acs/acs-system.ts | 4 +- src/lib/seam/connect/models/index.ts | 1 + .../seam/connect/models/locations/index.ts | 1 + .../seam/connect/models/locations/location.ts | 30 + src/lib/seam/connect/openapi.ts | 648 ++++++++++++++++++ src/lib/seam/connect/route-types.ts | 182 +++++ 7 files changed, 866 insertions(+), 2 deletions(-) create mode 100644 src/lib/seam/connect/models/locations/index.ts create mode 100644 src/lib/seam/connect/models/locations/location.ts diff --git a/src/lib/seam/connect/internal/schemas.ts b/src/lib/seam/connect/internal/schemas.ts index ce3a6b9d..5d27726e 100644 --- a/src/lib/seam/connect/internal/schemas.ts +++ b/src/lib/seam/connect/internal/schemas.ts @@ -34,6 +34,8 @@ export { seam_event as event, seam_event_type as event_type, fan_mode_setting, + geolocation, + location, lock_device_type, access_code as managed_access_code, device as managed_device, diff --git a/src/lib/seam/connect/models/acs/acs-system.ts b/src/lib/seam/connect/models/acs/acs-system.ts index eba8666f..4ec87511 100644 --- a/src/lib/seam/connect/models/acs/acs-system.ts +++ b/src/lib/seam/connect/models/acs/acs-system.ts @@ -27,7 +27,7 @@ export const acs_system_capability_flags = z.object({ ), }) -export const location = z.object({ +export const acs_location = z.object({ time_zone: z .string() .nullable() @@ -274,7 +274,7 @@ export const acs_system = z deprecated: Use \`external_type_display_name\`. --- `), - location, + location: acs_location, name: z .string() .describe( diff --git a/src/lib/seam/connect/models/index.ts b/src/lib/seam/connect/models/index.ts index a494ffd8..9fb9a57c 100644 --- a/src/lib/seam/connect/models/index.ts +++ b/src/lib/seam/connect/models/index.ts @@ -9,6 +9,7 @@ export * from './connected-accounts/index.js' export * from './custom-metadata.js' export * from './devices/index.js' export * from './events/index.js' +export * from './locations/index.js' export * from './noise-sensors/index.js' export * from './pagination.js' export * from './phone-number.js' diff --git a/src/lib/seam/connect/models/locations/index.ts b/src/lib/seam/connect/models/locations/index.ts new file mode 100644 index 00000000..c90bb136 --- /dev/null +++ b/src/lib/seam/connect/models/locations/index.ts @@ -0,0 +1 @@ +export * from './location.js' diff --git a/src/lib/seam/connect/models/locations/location.ts b/src/lib/seam/connect/models/locations/location.ts new file mode 100644 index 00000000..fdcf6fdf --- /dev/null +++ b/src/lib/seam/connect/models/locations/location.ts @@ -0,0 +1,30 @@ +import { z } from 'zod' + +export const geolocation = z.object({ + latitude: z.number(), + longitude: z.number(), +}) + +export const location = z.object({ + location_id: z + .string() + .uuid() + .describe('Unique identifier for the location.'), + workspace_id: z + .string() + .uuid() + .describe( + 'Unique identifier for the Seam workspace associated with the location.', + ), + display_name: z.string().describe('Display name of the location.'), + geolocation: geolocation + .optional() + .describe('Geographical location of the location.'), + time_zone: z.string().optional().describe('Time zone of the location.'), + created_at: z + .string() + .datetime() + .describe('Date and time at which the location object was created.'), +}) + +export type Location = z.infer diff --git a/src/lib/seam/connect/openapi.ts b/src/lib/seam/connect/openapi.ts index ef8dee4e..23f468c7 100644 --- a/src/lib/seam/connect/openapi.ts +++ b/src/lib/seam/connect/openapi.ts @@ -22162,6 +22162,12 @@ export default { ], type: 'string', }, + unstable_location_id: { + format: 'uuid', + nullable: true, + type: 'string', + 'x-undocumented': 'Experimental locations.', + }, user_identifier_key: { description: 'Your own internal user ID for the user by which to filter devices.', @@ -22694,6 +22700,12 @@ export default { ], type: 'string', }, + unstable_location_id: { + format: 'uuid', + nullable: true, + type: 'string', + 'x-undocumented': 'Experimental locations.', + }, user_identifier_key: { description: 'Your own internal user ID for the user by which to filter devices.', @@ -23551,6 +23563,12 @@ export default { ], type: 'string', }, + unstable_location_id: { + format: 'uuid', + nullable: true, + type: 'string', + 'x-undocumented': 'Experimental locations.', + }, user_identifier_key: { description: 'Your own internal user ID for the user by which to filter devices.', @@ -24046,6 +24064,12 @@ export default { ], type: 'string', }, + unstable_location_id: { + format: 'uuid', + nullable: true, + type: 'string', + 'x-undocumented': 'Experimental locations.', + }, user_identifier_key: { description: 'Your own internal user ID for the user by which to filter devices.', @@ -25939,6 +25963,12 @@ export default { ], type: 'string', }, + unstable_location_id: { + format: 'uuid', + nullable: true, + type: 'string', + 'x-undocumented': 'Experimental locations.', + }, user_identifier_key: { description: 'Your own internal user ID for the user by which to filter devices.', @@ -27375,6 +27405,624 @@ export default { 'x-title': 'Update a Climate Preset', }, }, + '/unstable_locations/add_devices': { + post: { + description: + 'Add devices to a specific location. If a device already belongs to a location it will be moved.', + operationId: 'unstableLocationsAddDevicesPost', + requestBody: { + content: { + 'application/json': { + schema: { + properties: { + device_ids: { + items: { format: 'uuid', type: 'string' }, + type: 'array', + }, + location_id: { format: 'uuid', type: 'string' }, + }, + required: ['location_id', 'device_ids'], + type: 'object', + }, + }, + }, + }, + responses: { + 200: { + content: { + 'application/json': { + schema: { + properties: { ok: { type: 'boolean' } }, + required: ['ok'], + type: 'object', + }, + }, + }, + description: 'OK', + }, + 400: { description: 'Bad Request' }, + 401: { description: 'Unauthorized' }, + }, + security: [ + { pat_with_workspace: [] }, + { console_session_with_workspace: [] }, + { api_key: [] }, + ], + summary: '/unstable_locations/add_devices', + tags: [], + 'x-fern-sdk-group-name': ['unstable_locations'], + 'x-fern-sdk-method-name': 'add_devices', + 'x-response-key': null, + 'x-title': 'Add Location Devices', + 'x-undocumented': 'Experimental locations.', + }, + }, + '/unstable_locations/create': { + post: { + description: 'Create a new location.', + operationId: 'unstableLocationsCreatePost', + requestBody: { + content: { + 'application/json': { + schema: { + properties: { + geolocation: { + properties: { + latitude: { format: 'float', type: 'number' }, + longitude: { format: 'float', type: 'number' }, + }, + required: ['latitude', 'longitude'], + type: 'object', + }, + name: { type: 'string' }, + time_zone: { type: 'string' }, + }, + required: ['name'], + type: 'object', + }, + }, + }, + }, + responses: { + 200: { + content: { + 'application/json': { + schema: { + properties: { + location: { + properties: { + created_at: { + description: + 'Date and time at which the location object was created.', + format: 'date-time', + type: 'string', + }, + display_name: { + description: 'Display name of the location.', + type: 'string', + }, + geolocation: { + description: 'Geographical location of the location.', + properties: { + latitude: { format: 'float', type: 'number' }, + longitude: { format: 'float', type: 'number' }, + }, + required: ['latitude', 'longitude'], + type: 'object', + }, + location_id: { + description: 'Unique identifier for the location.', + format: 'uuid', + type: 'string', + }, + time_zone: { + description: 'Time zone of the location.', + type: 'string', + }, + workspace_id: { + description: + 'Unique identifier for the Seam workspace associated with the location.', + format: 'uuid', + type: 'string', + }, + }, + required: [ + 'location_id', + 'workspace_id', + 'display_name', + 'created_at', + ], + type: 'object', + }, + ok: { type: 'boolean' }, + }, + required: ['location', 'ok'], + type: 'object', + }, + }, + }, + description: 'OK', + }, + 400: { description: 'Bad Request' }, + 401: { description: 'Unauthorized' }, + }, + security: [ + { pat_with_workspace: [] }, + { console_session_with_workspace: [] }, + { api_key: [] }, + ], + summary: '/unstable_locations/create', + tags: [], + 'x-fern-sdk-group-name': ['unstable_locations'], + 'x-fern-sdk-method-name': 'create', + 'x-fern-sdk-return-value': 'location', + 'x-response-key': 'location', + 'x-title': 'Create Location', + 'x-undocumented': 'Experimental locations.', + }, + }, + '/unstable_locations/delete': { + post: { + description: 'Delete a location.', + operationId: 'unstableLocationsDeletePost', + requestBody: { + content: { + 'application/json': { + schema: { + properties: { location_id: { format: 'uuid', type: 'string' } }, + required: ['location_id'], + type: 'object', + }, + }, + }, + }, + responses: { + 200: { + content: { + 'application/json': { + schema: { + properties: { ok: { type: 'boolean' } }, + required: ['ok'], + type: 'object', + }, + }, + }, + description: 'OK', + }, + 400: { description: 'Bad Request' }, + 401: { description: 'Unauthorized' }, + }, + security: [ + { pat_with_workspace: [] }, + { console_session_with_workspace: [] }, + { api_key: [] }, + ], + summary: '/unstable_locations/delete', + tags: [], + 'x-fern-sdk-group-name': ['unstable_locations'], + 'x-fern-sdk-method-name': 'delete', + 'x-response-key': null, + 'x-title': 'Delete Location', + 'x-undocumented': 'Experimental locations.', + }, + }, + '/unstable_locations/get': { + post: { + description: 'Get a location.', + operationId: 'unstableLocationsGetPost', + requestBody: { + content: { + 'application/json': { + schema: { + properties: { location_id: { format: 'uuid', type: 'string' } }, + required: ['location_id'], + type: 'object', + }, + }, + }, + }, + responses: { + 200: { + content: { + 'application/json': { + schema: { + properties: { + location: { + properties: { + created_at: { + description: + 'Date and time at which the location object was created.', + format: 'date-time', + type: 'string', + }, + display_name: { + description: 'Display name of the location.', + type: 'string', + }, + geolocation: { + description: 'Geographical location of the location.', + properties: { + latitude: { format: 'float', type: 'number' }, + longitude: { format: 'float', type: 'number' }, + }, + required: ['latitude', 'longitude'], + type: 'object', + }, + location_id: { + description: 'Unique identifier for the location.', + format: 'uuid', + type: 'string', + }, + time_zone: { + description: 'Time zone of the location.', + type: 'string', + }, + workspace_id: { + description: + 'Unique identifier for the Seam workspace associated with the location.', + format: 'uuid', + type: 'string', + }, + }, + required: [ + 'location_id', + 'workspace_id', + 'display_name', + 'created_at', + ], + type: 'object', + }, + ok: { type: 'boolean' }, + }, + required: ['location', 'ok'], + type: 'object', + }, + }, + }, + description: 'OK', + }, + 400: { description: 'Bad Request' }, + 401: { description: 'Unauthorized' }, + }, + security: [ + { pat_with_workspace: [] }, + { console_session_with_workspace: [] }, + { api_key: [] }, + ], + summary: '/unstable_locations/get', + tags: [], + 'x-fern-sdk-group-name': ['unstable_locations'], + 'x-fern-sdk-method-name': 'get', + 'x-fern-sdk-return-value': 'location', + 'x-response-key': 'location', + 'x-title': 'Get Location', + 'x-undocumented': 'Experimental locations.', + }, + }, + '/unstable_locations/list': { + get: { + description: 'Returns a list of all locations.', + operationId: 'unstableLocationsListGet', + responses: { + 200: { + content: { + 'application/json': { + schema: { + properties: { + locations: { + items: { + properties: { + created_at: { + description: + 'Date and time at which the location object was created.', + format: 'date-time', + type: 'string', + }, + display_name: { + description: 'Display name of the location.', + type: 'string', + }, + geolocation: { + description: + 'Geographical location of the location.', + properties: { + latitude: { format: 'float', type: 'number' }, + longitude: { format: 'float', type: 'number' }, + }, + required: ['latitude', 'longitude'], + type: 'object', + }, + location_id: { + description: 'Unique identifier for the location.', + format: 'uuid', + type: 'string', + }, + time_zone: { + description: 'Time zone of the location.', + type: 'string', + }, + workspace_id: { + description: + 'Unique identifier for the Seam workspace associated with the location.', + format: 'uuid', + type: 'string', + }, + }, + required: [ + 'location_id', + 'workspace_id', + 'display_name', + 'created_at', + ], + type: 'object', + }, + type: 'array', + }, + ok: { type: 'boolean' }, + }, + required: ['locations', 'ok'], + type: 'object', + }, + }, + }, + description: 'OK', + }, + 400: { description: 'Bad Request' }, + 401: { description: 'Unauthorized' }, + }, + security: [ + { pat_with_workspace: [] }, + { console_session_with_workspace: [] }, + { api_key: [] }, + ], + summary: '/unstable_locations/list', + tags: [], + 'x-fern-ignore': true, + 'x-response-key': 'locations', + 'x-title': 'List Locations', + 'x-undocumented': 'Experimental locations.', + }, + post: { + description: 'Returns a list of all locations.', + operationId: 'unstableLocationsListPost', + responses: { + 200: { + content: { + 'application/json': { + schema: { + properties: { + locations: { + items: { + properties: { + created_at: { + description: + 'Date and time at which the location object was created.', + format: 'date-time', + type: 'string', + }, + display_name: { + description: 'Display name of the location.', + type: 'string', + }, + geolocation: { + description: + 'Geographical location of the location.', + properties: { + latitude: { format: 'float', type: 'number' }, + longitude: { format: 'float', type: 'number' }, + }, + required: ['latitude', 'longitude'], + type: 'object', + }, + location_id: { + description: 'Unique identifier for the location.', + format: 'uuid', + type: 'string', + }, + time_zone: { + description: 'Time zone of the location.', + type: 'string', + }, + workspace_id: { + description: + 'Unique identifier for the Seam workspace associated with the location.', + format: 'uuid', + type: 'string', + }, + }, + required: [ + 'location_id', + 'workspace_id', + 'display_name', + 'created_at', + ], + type: 'object', + }, + type: 'array', + }, + ok: { type: 'boolean' }, + }, + required: ['locations', 'ok'], + type: 'object', + }, + }, + }, + description: 'OK', + }, + 400: { description: 'Bad Request' }, + 401: { description: 'Unauthorized' }, + }, + security: [ + { pat_with_workspace: [] }, + { console_session_with_workspace: [] }, + { api_key: [] }, + ], + summary: '/unstable_locations/list', + tags: [], + 'x-fern-sdk-group-name': ['unstable_locations'], + 'x-fern-sdk-method-name': 'list', + 'x-fern-sdk-return-value': 'locations', + 'x-response-key': 'locations', + 'x-title': 'List Locations', + 'x-undocumented': 'Experimental locations.', + }, + }, + '/unstable_locations/remove_devices': { + post: { + description: 'Remove devices from a specific location.', + operationId: 'unstableLocationsRemoveDevicesPost', + requestBody: { + content: { + 'application/json': { + schema: { + properties: { + device_ids: { + items: { format: 'uuid', type: 'string' }, + type: 'array', + }, + location_id: { format: 'uuid', type: 'string' }, + }, + required: ['location_id', 'device_ids'], + type: 'object', + }, + }, + }, + }, + responses: { + 200: { + content: { + 'application/json': { + schema: { + properties: { ok: { type: 'boolean' } }, + required: ['ok'], + type: 'object', + }, + }, + }, + description: 'OK', + }, + 400: { description: 'Bad Request' }, + 401: { description: 'Unauthorized' }, + }, + security: [ + { pat_with_workspace: [] }, + { console_session_with_workspace: [] }, + { api_key: [] }, + ], + summary: '/unstable_locations/remove_devices', + tags: [], + 'x-fern-sdk-group-name': ['unstable_locations'], + 'x-fern-sdk-method-name': 'remove_devices', + 'x-response-key': null, + 'x-title': 'Remove Location Devices', + 'x-undocumented': 'Experimental locations.', + }, + }, + '/unstable_locations/update': { + post: { + description: 'Update an existing location.', + operationId: 'unstableLocationsUpdatePost', + requestBody: { + content: { + 'application/json': { + schema: { + properties: { + geolocation: { + properties: { + latitude: { format: 'float', type: 'number' }, + longitude: { format: 'float', type: 'number' }, + }, + required: ['latitude', 'longitude'], + type: 'object', + }, + location_id: { format: 'uuid', type: 'string' }, + name: { type: 'string' }, + time_zone: { type: 'string' }, + }, + required: ['location_id'], + type: 'object', + }, + }, + }, + }, + responses: { + 200: { + content: { + 'application/json': { + schema: { + properties: { + location: { + properties: { + created_at: { + description: + 'Date and time at which the location object was created.', + format: 'date-time', + type: 'string', + }, + display_name: { + description: 'Display name of the location.', + type: 'string', + }, + geolocation: { + description: 'Geographical location of the location.', + properties: { + latitude: { format: 'float', type: 'number' }, + longitude: { format: 'float', type: 'number' }, + }, + required: ['latitude', 'longitude'], + type: 'object', + }, + location_id: { + description: 'Unique identifier for the location.', + format: 'uuid', + type: 'string', + }, + time_zone: { + description: 'Time zone of the location.', + type: 'string', + }, + workspace_id: { + description: + 'Unique identifier for the Seam workspace associated with the location.', + format: 'uuid', + type: 'string', + }, + }, + required: [ + 'location_id', + 'workspace_id', + 'display_name', + 'created_at', + ], + type: 'object', + }, + ok: { type: 'boolean' }, + }, + required: ['location', 'ok'], + type: 'object', + }, + }, + }, + description: 'OK', + }, + 400: { description: 'Bad Request' }, + 401: { description: 'Unauthorized' }, + }, + security: [ + { pat_with_workspace: [] }, + { console_session_with_workspace: [] }, + { api_key: [] }, + ], + summary: '/unstable_locations/update', + tags: [], + 'x-fern-sdk-group-name': ['unstable_locations'], + 'x-fern-sdk-method-name': 'update', + 'x-fern-sdk-return-value': 'location', + 'x-response-key': 'location', + 'x-title': 'Update Location', + 'x-undocumented': 'Experimental locations.', + }, + }, '/user_identities/add_acs_user': { post: { description: diff --git a/src/lib/seam/connect/route-types.ts b/src/lib/seam/connect/route-types.ts index 6d92b838..341da2c8 100644 --- a/src/lib/seam/connect/route-types.ts +++ b/src/lib/seam/connect/route-types.ts @@ -17999,6 +17999,8 @@ export interface Routes { | 'can_simulate_disconnection' > | undefined + /** */ + unstable_location_id?: (string | null) | undefined } formData: {} jsonResponse: { @@ -19561,6 +19563,8 @@ export interface Routes { | 'can_simulate_disconnection' > | undefined + /** */ + unstable_location_id?: (string | null) | undefined } formData: {} jsonResponse: { @@ -24797,6 +24801,8 @@ export interface Routes { | 'can_simulate_disconnection' > | undefined + /** */ + unstable_location_id?: (string | null) | undefined } formData: {} jsonResponse: { @@ -28950,6 +28956,8 @@ export interface Routes { | 'can_simulate_disconnection' > | undefined + /** */ + unstable_location_id?: (string | null) | undefined } formData: {} jsonResponse: { @@ -39743,6 +39751,8 @@ export interface Routes { | 'can_simulate_disconnection' > | undefined + /** */ + unstable_location_id?: (string | null) | undefined } formData: {} jsonResponse: { @@ -45085,6 +45095,178 @@ export interface Routes { formData: {} jsonResponse: {} } + '/unstable_locations/add_devices': { + route: '/unstable_locations/add_devices' + method: 'POST' + queryParams: {} + jsonBody: { + location_id: string + device_ids: string[] + } + commonParams: {} + formData: {} + jsonResponse: {} + } + '/unstable_locations/create': { + route: '/unstable_locations/create' + method: 'POST' + queryParams: {} + jsonBody: { + name: string + geolocation?: + | { + latitude: number + longitude: number + } + | undefined + time_zone?: string | undefined + } + commonParams: {} + formData: {} + jsonResponse: { + location: { + /** Unique identifier for the location. */ + location_id: string + /** Unique identifier for the Seam workspace associated with the location. */ + workspace_id: string + /** Display name of the location. */ + display_name: string + /** Geographical location of the location. */ + geolocation?: + | { + latitude: number + longitude: number + } + | undefined + /** Time zone of the location. */ + time_zone?: string | undefined + /** Date and time at which the location object was created. */ + created_at: string + } + } + } + '/unstable_locations/delete': { + route: '/unstable_locations/delete' + method: 'DELETE' | 'POST' + queryParams: {} + jsonBody: { + location_id: string + } + commonParams: {} + formData: {} + jsonResponse: {} + } + '/unstable_locations/get': { + route: '/unstable_locations/get' + method: 'GET' | 'POST' + queryParams: {} + jsonBody: {} + commonParams: { + location_id: string + } + formData: {} + jsonResponse: { + location: { + /** Unique identifier for the location. */ + location_id: string + /** Unique identifier for the Seam workspace associated with the location. */ + workspace_id: string + /** Display name of the location. */ + display_name: string + /** Geographical location of the location. */ + geolocation?: + | { + latitude: number + longitude: number + } + | undefined + /** Time zone of the location. */ + time_zone?: string | undefined + /** Date and time at which the location object was created. */ + created_at: string + } + } + } + '/unstable_locations/list': { + route: '/unstable_locations/list' + method: 'GET' | 'POST' + queryParams: {} + jsonBody: {} + commonParams: {} + formData: {} + jsonResponse: { + locations: Array<{ + /** Unique identifier for the location. */ + location_id: string + /** Unique identifier for the Seam workspace associated with the location. */ + workspace_id: string + /** Display name of the location. */ + display_name: string + /** Geographical location of the location. */ + geolocation?: + | { + latitude: number + longitude: number + } + | undefined + /** Time zone of the location. */ + time_zone?: string | undefined + /** Date and time at which the location object was created. */ + created_at: string + }> + } + } + '/unstable_locations/remove_devices': { + route: '/unstable_locations/remove_devices' + method: 'POST' + queryParams: {} + jsonBody: { + location_id: string + device_ids: string[] + } + commonParams: {} + formData: {} + jsonResponse: {} + } + '/unstable_locations/update': { + route: '/unstable_locations/update' + method: 'POST' + queryParams: {} + jsonBody: { + location_id: string + name?: string | undefined + geolocation?: + | { + latitude: number + longitude: number + } + | undefined + time_zone?: string | undefined + } + commonParams: {} + formData: {} + jsonResponse: { + location: { + /** Unique identifier for the location. */ + location_id: string + /** Unique identifier for the Seam workspace associated with the location. */ + workspace_id: string + /** Display name of the location. */ + display_name: string + /** Geographical location of the location. */ + geolocation?: + | { + latitude: number + longitude: number + } + | undefined + /** Time zone of the location. */ + time_zone?: string | undefined + /** Date and time at which the location object was created. */ + created_at: string + } + } + } '/user_identities/add_acs_user': { route: '/user_identities/add_acs_user' method: 'POST' | 'PUT'