diff --git a/lib/seam/routes/clients/acs_entrances.rb b/lib/seam/routes/clients/acs_entrances.rb index a03ee862..dc72c9a7 100644 --- a/lib/seam/routes/clients/acs_entrances.rb +++ b/lib/seam/routes/clients/acs_entrances.rb @@ -20,8 +20,8 @@ def grant_access(acs_entrance_id:, acs_user_id: nil, user_identity_id: nil) nil end - def list(acs_credential_id: nil, acs_system_id: nil, location_id: nil, space_id: nil) - res = @client.post("/acs/entrances/list", {acs_credential_id: acs_credential_id, acs_system_id: acs_system_id, location_id: location_id, space_id: space_id}.compact) + def list(access_grant_id: nil, access_method_id: nil, acs_credential_id: nil, acs_system_id: nil, location_id: nil, space_id: nil) + res = @client.post("/acs/entrances/list", {access_grant_id: access_grant_id, access_method_id: access_method_id, acs_credential_id: acs_credential_id, acs_system_id: acs_system_id, location_id: location_id, space_id: space_id}.compact) Seam::Resources::AcsEntrance.load_from_response(res.body["acs_entrances"]) end diff --git a/lib/seam/routes/clients/thermostats_daily_programs.rb b/lib/seam/routes/clients/thermostats_daily_programs.rb index ecc6548c..30b4e7c1 100644 --- a/lib/seam/routes/clients/thermostats_daily_programs.rb +++ b/lib/seam/routes/clients/thermostats_daily_programs.rb @@ -11,9 +11,9 @@ def initialize(client:, defaults:) end def create(device_id:, name:, periods:) - @client.post("/thermostats/daily_programs/create", {device_id: device_id, name: name, periods: periods}.compact) + res = @client.post("/thermostats/daily_programs/create", {device_id: device_id, name: name, periods: periods}.compact) - nil + Seam::Resources::ThermostatDailyProgram.load_from_response(res.body["thermostat_daily_program"]) end def delete(thermostat_daily_program_id:) diff --git a/lib/seam/routes/clients/user_identities_enrollment_automations.rb b/lib/seam/routes/clients/user_identities_enrollment_automations.rb index 7ced2560..24c56dd2 100644 --- a/lib/seam/routes/clients/user_identities_enrollment_automations.rb +++ b/lib/seam/routes/clients/user_identities_enrollment_automations.rb @@ -21,9 +21,9 @@ def get(enrollment_automation_id:) end def launch(credential_manager_acs_system_id:, user_identity_id:, acs_credential_pool_id: nil, create_credential_manager_user: nil, credential_manager_acs_user_id: nil) - @client.post("/user_identities/enrollment_automations/launch", {credential_manager_acs_system_id: credential_manager_acs_system_id, user_identity_id: user_identity_id, acs_credential_pool_id: acs_credential_pool_id, create_credential_manager_user: create_credential_manager_user, credential_manager_acs_user_id: credential_manager_acs_user_id}.compact) + res = @client.post("/user_identities/enrollment_automations/launch", {credential_manager_acs_system_id: credential_manager_acs_system_id, user_identity_id: user_identity_id, acs_credential_pool_id: acs_credential_pool_id, create_credential_manager_user: create_credential_manager_user, credential_manager_acs_user_id: credential_manager_acs_user_id}.compact) - nil + Seam::Resources::EnrollmentAutomation.load_from_response(res.body["enrollment_automation"]) end def list(user_identity_id:) diff --git a/lib/seam/routes/resources/bridge_client_session.rb b/lib/seam/routes/resources/bridge_client_session.rb new file mode 100644 index 00000000..78650138 --- /dev/null +++ b/lib/seam/routes/resources/bridge_client_session.rb @@ -0,0 +1,13 @@ +# frozen_string_literal: true + +module Seam + module Resources + class BridgeClientSession < BaseResource + attr_accessor :bridge_client_machine_identifier_key, :bridge_client_name, :bridge_client_session_id, :bridge_client_session_token, :bridge_client_time_zone, :pairing_code, :tailscale_auth_key, :tailscale_hostname, :telemetry_token, :telemetry_url + + date_accessor :created_at, :pairing_code_expires_at, :telemetry_token_expires_at + + include Seam::Resources::ResourceErrorsSupport + end + end +end diff --git a/lib/seam/routes/resources/bridge_connected_systems.rb b/lib/seam/routes/resources/bridge_connected_systems.rb new file mode 100644 index 00000000..e22a0201 --- /dev/null +++ b/lib/seam/routes/resources/bridge_connected_systems.rb @@ -0,0 +1,11 @@ +# frozen_string_literal: true + +module Seam + module Resources + class BridgeConnectedSystems < BaseResource + attr_accessor :acs_system_display_name, :acs_system_id, :bridge_id, :connected_account_id, :workspace_display_name, :workspace_id + + date_accessor :bridge_created_at, :connected_account_created_at + end + end +end diff --git a/lib/seam/routes/resources/index.rb b/lib/seam/routes/resources/index.rb index ca9886b1..a364b0d6 100644 --- a/lib/seam/routes/resources/index.rb +++ b/lib/seam/routes/resources/index.rb @@ -17,6 +17,8 @@ require_relative "acs_system" require_relative "acs_user" require_relative "action_attempt" +require_relative "bridge_client_session" +require_relative "bridge_connected_systems" require_relative "client_session" require_relative "connect_webview" require_relative "connected_account" @@ -25,13 +27,16 @@ require_relative "enrollment_automation" require_relative "event" require_relative "instant_key" +require_relative "location" require_relative "magic_link" require_relative "noise_threshold" require_relative "pagination" +require_relative "partner_resource" require_relative "phone" require_relative "phone_registration" require_relative "phone_session" require_relative "space" +require_relative "thermostat_daily_program" require_relative "thermostat_schedule" require_relative "unmanaged_access_code" require_relative "unmanaged_acs_access_group" diff --git a/lib/seam/routes/resources/location.rb b/lib/seam/routes/resources/location.rb new file mode 100644 index 00000000..2b7fab12 --- /dev/null +++ b/lib/seam/routes/resources/location.rb @@ -0,0 +1,11 @@ +# frozen_string_literal: true + +module Seam + module Resources + class Location < BaseResource + attr_accessor :display_name, :geolocation, :location_id, :name, :time_zone, :workspace_id + + date_accessor :created_at + end + end +end diff --git a/lib/seam/routes/resources/partner_resource.rb b/lib/seam/routes/resources/partner_resource.rb new file mode 100644 index 00000000..6fc1dbfd --- /dev/null +++ b/lib/seam/routes/resources/partner_resource.rb @@ -0,0 +1,9 @@ +# frozen_string_literal: true + +module Seam + module Resources + class PartnerResource < BaseResource + attr_accessor :custom_metadata, :customer_key, :description, :email_address, :ends_at, :location_keys, :name, :partner_resource_key, :partner_resource_type, :phone_number, :starts_at, :user_identity_key + end + end +end diff --git a/lib/seam/routes/resources/thermostat_daily_program.rb b/lib/seam/routes/resources/thermostat_daily_program.rb new file mode 100644 index 00000000..cfac2f76 --- /dev/null +++ b/lib/seam/routes/resources/thermostat_daily_program.rb @@ -0,0 +1,11 @@ +# frozen_string_literal: true + +module Seam + module Resources + class ThermostatDailyProgram < BaseResource + attr_accessor :device_id, :name, :periods, :thermostat_daily_program_id, :workspace_id + + date_accessor :created_at + end + end +end diff --git a/lib/seam/routes/resources/user_identity.rb b/lib/seam/routes/resources/user_identity.rb index e8e54d08..18919d53 100644 --- a/lib/seam/routes/resources/user_identity.rb +++ b/lib/seam/routes/resources/user_identity.rb @@ -6,6 +6,9 @@ class UserIdentity < BaseResource attr_accessor :display_name, :email_address, :full_name, :phone_number, :user_identity_id, :user_identity_key, :workspace_id date_accessor :created_at + + include Seam::Resources::ResourceErrorsSupport + include Seam::Resources::ResourceWarningsSupport end end end diff --git a/package-lock.json b/package-lock.json index a8e091e2..ede2681a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,7 +8,7 @@ "devDependencies": { "@seamapi/fake-seam-connect": "1.83.1", "@seamapi/nextlove-sdk-generator": "^1.18.1", - "@seamapi/types": "1.413.0", + "@seamapi/types": "1.414.2", "del": "^7.1.0", "markdown-toc": "^1.2.0", "prettier": "^3.2.5" @@ -476,9 +476,9 @@ } }, "node_modules/@seamapi/types": { - "version": "1.413.0", - "resolved": "https://registry.npmjs.org/@seamapi/types/-/types-1.413.0.tgz", - "integrity": "sha512-oNesrHvS1zuxd89YNGhqWG76W2KWl0S9jDfDiVtvWxbyB91PUK3rVpntoK3P0l0HBFMV8E9Vghhmmvo/FLV70Q==", + "version": "1.414.2", + "resolved": "https://registry.npmjs.org/@seamapi/types/-/types-1.414.2.tgz", + "integrity": "sha512-QWTHKz+I3JePDpia2mDeWMI9ATEVjWD8lXZwSp1rqDbOrS4CWWrYDEU4TxWP4wdmI2XpffyDE/Xnaqn/gFvdeQ==", "dev": true, "license": "MIT", "engines": { diff --git a/package.json b/package.json index b7321830..7f2018de 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,7 @@ "devDependencies": { "@seamapi/fake-seam-connect": "1.83.1", "@seamapi/nextlove-sdk-generator": "^1.18.1", - "@seamapi/types": "1.413.0", + "@seamapi/types": "1.414.2", "del": "^7.1.0", "markdown-toc": "^1.2.0", "prettier": "^3.2.5"