diff --git a/lib/seam/routes/clients/access_grants.rb b/lib/seam/routes/clients/access_grants.rb index f6eb977..d4057a7 100644 --- a/lib/seam/routes/clients/access_grants.rb +++ b/lib/seam/routes/clients/access_grants.rb @@ -12,8 +12,8 @@ def unmanaged @unmanaged ||= Seam::Clients::AccessGrantsUnmanaged.new(client: @client, defaults: @defaults) end - def create(requested_access_methods:, user_identity_id: nil, user_identity: nil, access_grant_key: nil, acs_entrance_ids: nil, customization_profile_id: nil, device_ids: nil, ends_at: nil, location: nil, location_ids: nil, name: nil, space_ids: nil, space_keys: nil, starts_at: nil) - res = @client.post("/access_grants/create", {requested_access_methods: requested_access_methods, user_identity_id: user_identity_id, user_identity: user_identity, access_grant_key: access_grant_key, acs_entrance_ids: acs_entrance_ids, customization_profile_id: customization_profile_id, device_ids: device_ids, ends_at: ends_at, location: location, location_ids: location_ids, name: name, space_ids: space_ids, space_keys: space_keys, starts_at: starts_at}.compact) + def create(requested_access_methods:, user_identity_id: nil, user_identity: nil, access_grant_key: nil, acs_entrance_ids: nil, customization_profile_id: nil, device_ids: nil, ends_at: nil, location: nil, location_ids: nil, name: nil, reservation_key: nil, space_ids: nil, space_keys: nil, starts_at: nil) + res = @client.post("/access_grants/create", {requested_access_methods: requested_access_methods, user_identity_id: user_identity_id, user_identity: user_identity, access_grant_key: access_grant_key, acs_entrance_ids: acs_entrance_ids, customization_profile_id: customization_profile_id, device_ids: device_ids, ends_at: ends_at, location: location, location_ids: location_ids, name: name, reservation_key: reservation_key, space_ids: space_ids, space_keys: space_keys, starts_at: starts_at}.compact) Seam::Resources::AccessGrant.load_from_response(res.body["access_grant"]) end @@ -36,12 +36,18 @@ def get_related(access_grant_ids:, exclude: nil, include: nil) nil end - def list(access_grant_key: nil, acs_entrance_id: nil, acs_system_id: nil, customer_key: nil, location_id: nil, space_id: nil, user_identity_id: nil) - res = @client.post("/access_grants/list", {access_grant_key: access_grant_key, acs_entrance_id: acs_entrance_id, acs_system_id: acs_system_id, customer_key: customer_key, location_id: location_id, space_id: space_id, user_identity_id: user_identity_id}.compact) + def list(access_grant_key: nil, acs_entrance_id: nil, acs_system_id: nil, customer_key: nil, location_id: nil, reservation_key: nil, space_id: nil, user_identity_id: nil) + res = @client.post("/access_grants/list", {access_grant_key: access_grant_key, acs_entrance_id: acs_entrance_id, acs_system_id: acs_system_id, customer_key: customer_key, location_id: location_id, reservation_key: reservation_key, space_id: space_id, user_identity_id: user_identity_id}.compact) Seam::Resources::AccessGrant.load_from_response(res.body["access_grants"]) end + def request_access_methods(access_grant_id:, requested_access_methods:) + res = @client.post("/access_grants/request_access_methods", {access_grant_id: access_grant_id, requested_access_methods: requested_access_methods}.compact) + + Seam::Resources::AccessGrant.load_from_response(res.body["access_grant"]) + end + def update(access_grant_id:, ends_at: nil, name: nil, starts_at: nil) @client.post("/access_grants/update", {access_grant_id: access_grant_id, ends_at: ends_at, name: name, starts_at: starts_at}.compact) diff --git a/lib/seam/routes/clients/access_grants_unmanaged.rb b/lib/seam/routes/clients/access_grants_unmanaged.rb index 092d4a8..3b9de74 100644 --- a/lib/seam/routes/clients/access_grants_unmanaged.rb +++ b/lib/seam/routes/clients/access_grants_unmanaged.rb @@ -14,8 +14,14 @@ def get(access_grant_id:) nil end - def list(acs_entrance_id: nil, acs_system_id: nil, user_identity_id: nil) - @client.post("/access_grants/unmanaged/list", {acs_entrance_id: acs_entrance_id, acs_system_id: acs_system_id, user_identity_id: user_identity_id}.compact) + def list(acs_entrance_id: nil, acs_system_id: nil, reservation_key: nil, user_identity_id: nil) + @client.post("/access_grants/unmanaged/list", {acs_entrance_id: acs_entrance_id, acs_system_id: acs_system_id, reservation_key: reservation_key, user_identity_id: user_identity_id}.compact) + + nil + end + + def update(access_grant_id:, is_managed:, access_grant_key: nil) + @client.post("/access_grants/unmanaged/update", {access_grant_id: access_grant_id, is_managed: is_managed, access_grant_key: access_grant_key}.compact) nil end diff --git a/lib/seam/routes/clients/acs_systems.rb b/lib/seam/routes/clients/acs_systems.rb index f868ff7..ed5d1d3 100644 --- a/lib/seam/routes/clients/acs_systems.rb +++ b/lib/seam/routes/clients/acs_systems.rb @@ -25,6 +25,12 @@ def list_compatible_credential_manager_acs_systems(acs_system_id:) Seam::Resources::AcsSystem.load_from_response(res.body["acs_systems"]) end + + def report_devices(acs_system_id:, acs_encoders: nil, acs_entrances: nil) + @client.post("/acs/systems/report_devices", {acs_system_id: acs_system_id, acs_encoders: acs_encoders, acs_entrances: acs_entrances}.compact) + + nil + end end end end diff --git a/lib/seam/routes/clients/customers.rb b/lib/seam/routes/clients/customers.rb index 2caca8c..e92561c 100644 --- a/lib/seam/routes/clients/customers.rb +++ b/lib/seam/routes/clients/customers.rb @@ -14,14 +14,14 @@ def create_portal(features: nil, is_embedded: nil, landing_page: nil, customer_d Seam::Resources::MagicLink.load_from_response(res.body["magic_link"]) end - def delete_data(access_grant_keys: nil, booking_keys: nil, building_keys: nil, common_area_keys: nil, customer_keys: nil, facility_keys: nil, guest_keys: nil, listing_keys: nil, property_keys: nil, property_listing_keys: nil, reservation_keys: nil, resident_keys: nil, room_keys: nil, space_keys: nil, tenant_keys: nil, unit_keys: nil, user_identity_keys: nil, user_keys: nil) - @client.post("/customers/delete_data", {access_grant_keys: access_grant_keys, booking_keys: booking_keys, building_keys: building_keys, common_area_keys: common_area_keys, customer_keys: customer_keys, facility_keys: facility_keys, guest_keys: guest_keys, listing_keys: listing_keys, property_keys: property_keys, property_listing_keys: property_listing_keys, reservation_keys: reservation_keys, resident_keys: resident_keys, room_keys: room_keys, space_keys: space_keys, tenant_keys: tenant_keys, unit_keys: unit_keys, user_identity_keys: user_identity_keys, user_keys: user_keys}.compact) + def delete_data(access_grant_keys: nil, booking_keys: nil, building_keys: nil, common_area_keys: nil, customer_keys: nil, facility_keys: nil, guest_keys: nil, listing_keys: nil, property_keys: nil, property_listing_keys: nil, reservation_keys: nil, resident_keys: nil, room_keys: nil, space_keys: nil, staff_member_keys: nil, tenant_keys: nil, unit_keys: nil, user_identity_keys: nil, user_keys: nil) + @client.post("/customers/delete_data", {access_grant_keys: access_grant_keys, booking_keys: booking_keys, building_keys: building_keys, common_area_keys: common_area_keys, customer_keys: customer_keys, facility_keys: facility_keys, guest_keys: guest_keys, listing_keys: listing_keys, property_keys: property_keys, property_listing_keys: property_listing_keys, reservation_keys: reservation_keys, resident_keys: resident_keys, room_keys: room_keys, space_keys: space_keys, staff_member_keys: staff_member_keys, tenant_keys: tenant_keys, unit_keys: unit_keys, user_identity_keys: user_identity_keys, user_keys: user_keys}.compact) nil end - def push_data(customer_key:, access_grants: nil, bookings: nil, buildings: nil, common_areas: nil, facilities: nil, guests: nil, listings: nil, properties: nil, property_listings: nil, reservations: nil, residents: nil, rooms: nil, sites: nil, spaces: nil, tenants: nil, units: nil, user_identities: nil, users: nil) - @client.post("/customers/push_data", {customer_key: customer_key, access_grants: access_grants, bookings: bookings, buildings: buildings, common_areas: common_areas, facilities: facilities, guests: guests, listings: listings, properties: properties, property_listings: property_listings, reservations: reservations, residents: residents, rooms: rooms, sites: sites, spaces: spaces, tenants: tenants, units: units, user_identities: user_identities, users: users}.compact) + def push_data(customer_key:, access_grants: nil, bookings: nil, buildings: nil, common_areas: nil, facilities: nil, guests: nil, listings: nil, properties: nil, property_listings: nil, reservations: nil, residents: nil, rooms: nil, sites: nil, spaces: nil, staff_members: nil, tenants: nil, units: nil, user_identities: nil, users: nil) + @client.post("/customers/push_data", {customer_key: customer_key, access_grants: access_grants, bookings: bookings, buildings: buildings, common_areas: common_areas, facilities: facilities, guests: guests, listings: listings, properties: properties, property_listings: property_listings, reservations: reservations, residents: residents, rooms: rooms, sites: sites, spaces: spaces, staff_members: staff_members, tenants: tenants, units: units, user_identities: user_identities, users: users}.compact) nil end diff --git a/lib/seam/routes/clients/user_identities.rb b/lib/seam/routes/clients/user_identities.rb index 74a04a8..13a65e4 100644 --- a/lib/seam/routes/clients/user_identities.rb +++ b/lib/seam/routes/clients/user_identities.rb @@ -48,8 +48,8 @@ def grant_access_to_device(device_id:, user_identity_id:) nil end - def list(credential_manager_acs_system_id: nil, search: nil) - res = @client.post("/user_identities/list", {credential_manager_acs_system_id: credential_manager_acs_system_id, search: search}.compact) + def list(created_before: nil, credential_manager_acs_system_id: nil, limit: nil, page_cursor: nil, search: nil) + res = @client.post("/user_identities/list", {created_before: created_before, credential_manager_acs_system_id: credential_manager_acs_system_id, limit: limit, page_cursor: page_cursor, search: search}.compact) Seam::Resources::UserIdentity.load_from_response(res.body["user_identities"]) end diff --git a/lib/seam/routes/clients/user_identities_unmanaged.rb b/lib/seam/routes/clients/user_identities_unmanaged.rb index 2f68aa2..08bcd14 100644 --- a/lib/seam/routes/clients/user_identities_unmanaged.rb +++ b/lib/seam/routes/clients/user_identities_unmanaged.rb @@ -14,8 +14,14 @@ def get(user_identity_id:) nil end - def list(search: nil) - @client.post("/user_identities/unmanaged/list", {search: search}.compact) + def list(created_before: nil, limit: nil, page_cursor: nil, search: nil) + @client.post("/user_identities/unmanaged/list", {created_before: created_before, limit: limit, page_cursor: page_cursor, search: search}.compact) + + nil + end + + def update(is_managed:, user_identity_id:, user_identity_key: nil) + @client.post("/user_identities/unmanaged/update", {is_managed: is_managed, user_identity_id: user_identity_id, user_identity_key: user_identity_key}.compact) nil end diff --git a/lib/seam/routes/resources/access_grant.rb b/lib/seam/routes/resources/access_grant.rb index 21686fd..3fad963 100644 --- a/lib/seam/routes/resources/access_grant.rb +++ b/lib/seam/routes/resources/access_grant.rb @@ -3,7 +3,7 @@ module Seam module Resources class AccessGrant < BaseResource - attr_accessor :access_grant_id, :access_grant_key, :access_method_ids, :client_session_token, :customization_profile_id, :display_name, :instant_key_url, :location_ids, :name, :requested_access_methods, :space_ids, :user_identity_id, :workspace_id + attr_accessor :access_grant_id, :access_grant_key, :access_method_ids, :client_session_token, :customization_profile_id, :display_name, :instant_key_url, :location_ids, :name, :requested_access_methods, :reservation_key, :space_ids, :user_identity_id, :workspace_id date_accessor :created_at, :ends_at, :starts_at diff --git a/lib/seam/routes/resources/acs_entrance.rb b/lib/seam/routes/resources/acs_entrance.rb index 439d402..6db2d57 100644 --- a/lib/seam/routes/resources/acs_entrance.rb +++ b/lib/seam/routes/resources/acs_entrance.rb @@ -3,7 +3,7 @@ module Seam module Resources class AcsEntrance < BaseResource - attr_accessor :acs_entrance_id, :acs_system_id, :assa_abloy_vostio_metadata, :can_unlock_with_card, :can_unlock_with_code, :can_unlock_with_mobile_key, :connected_account_id, :display_name, :dormakaba_ambiance_metadata, :dormakaba_community_metadata, :hotek_metadata, :latch_metadata, :salto_ks_metadata, :salto_space_metadata, :space_ids, :visionline_metadata + attr_accessor :acs_entrance_id, :acs_system_id, :assa_abloy_vostio_metadata, :can_belong_to_reservation, :can_unlock_with_card, :can_unlock_with_code, :can_unlock_with_mobile_key, :connected_account_id, :display_name, :dormakaba_ambiance_metadata, :dormakaba_community_metadata, :hotek_metadata, :latch_metadata, :salto_ks_metadata, :salto_space_metadata, :space_ids, :visionline_metadata date_accessor :created_at diff --git a/lib/seam/routes/resources/event.rb b/lib/seam/routes/resources/event.rb index 28f28a8..9ef520e 100644 --- a/lib/seam/routes/resources/event.rb +++ b/lib/seam/routes/resources/event.rb @@ -3,7 +3,7 @@ module Seam module Resources class SeamEvent < BaseResource - attr_accessor :access_code_id, :connected_account_custom_metadata, :connected_account_id, :device_custom_metadata, :device_id, :event_id, :event_type, :workspace_id, :code, :backup_access_code_id, :access_grant_id, :acs_entrance_id, :access_grant_key, :ends_at, :starts_at, :access_grant_ids, :access_grant_keys, :access_method_id, :is_backup_code, :acs_system_id, :acs_credential_id, :acs_user_id, :acs_encoder_id, :acs_access_group_id, :client_session_id, :connect_webview_id, :customer_key, :action_attempt_id, :action_type, :status, :error_code, :battery_level, :battery_status, :minut_metadata, :noise_level_decibels, :noise_level_nrs, :noise_threshold_id, :noise_threshold_name, :noiseaware_metadata, :method, :climate_preset_key, :is_fallback_climate_preset, :thermostat_schedule_id, :cooling_set_point_celsius, :cooling_set_point_fahrenheit, :fan_mode_setting, :heating_set_point_celsius, :heating_set_point_fahrenheit, :hvac_mode_setting, :lower_limit_celsius, :lower_limit_fahrenheit, :temperature_celsius, :temperature_fahrenheit, :upper_limit_celsius, :upper_limit_fahrenheit, :desired_temperature_celsius, :desired_temperature_fahrenheit, :device_name, :enrollment_automation_id + attr_accessor :access_code_id, :connected_account_custom_metadata, :connected_account_id, :device_custom_metadata, :device_id, :event_id, :event_type, :workspace_id, :code, :backup_access_code_id, :access_grant_id, :acs_entrance_id, :access_grant_key, :ends_at, :starts_at, :access_grant_ids, :access_grant_keys, :access_method_id, :is_backup_code, :acs_system_id, :acs_credential_id, :acs_user_id, :acs_encoder_id, :acs_access_group_id, :client_session_id, :connect_webview_id, :customer_key, :action_attempt_id, :action_type, :status, :error_code, :battery_level, :battery_status, :minut_metadata, :noise_level_decibels, :noise_level_nrs, :noise_threshold_id, :noise_threshold_name, :noiseaware_metadata, :method, :climate_preset_key, :is_fallback_climate_preset, :thermostat_schedule_id, :cooling_set_point_celsius, :cooling_set_point_fahrenheit, :fan_mode_setting, :heating_set_point_celsius, :heating_set_point_fahrenheit, :hvac_mode_setting, :lower_limit_celsius, :lower_limit_fahrenheit, :temperature_celsius, :temperature_fahrenheit, :upper_limit_celsius, :upper_limit_fahrenheit, :desired_temperature_celsius, :desired_temperature_fahrenheit, :device_name, :enrollment_automation_id, :acs_entrance_ids, :device_ids, :space_id, :space_key date_accessor :created_at, :occurred_at end diff --git a/lib/seam/routes/resources/index.rb b/lib/seam/routes/resources/index.rb index 61bbca3..5bfb03b 100644 --- a/lib/seam/routes/resources/index.rb +++ b/lib/seam/routes/resources/index.rb @@ -35,6 +35,7 @@ require_relative "phone_registration" require_relative "phone_session" require_relative "space" +require_relative "staff_member" require_relative "thermostat_daily_program" require_relative "thermostat_schedule" require_relative "unmanaged_access_code" diff --git a/lib/seam/routes/resources/staff_member.rb b/lib/seam/routes/resources/staff_member.rb new file mode 100644 index 0000000..a445a91 --- /dev/null +++ b/lib/seam/routes/resources/staff_member.rb @@ -0,0 +1,9 @@ +# frozen_string_literal: true + +module Seam + module Resources + class StaffMember < BaseResource + attr_accessor :building_keys, :common_area_keys, :email_address, :facility_keys, :listing_keys, :name, :phone_number, :property_keys, :property_listing_keys, :room_keys, :site_keys, :space_keys, :staff_member_key, :unit_keys + end + end +end diff --git a/package-lock.json b/package-lock.json index ece9ea2..e683b64 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,7 +8,7 @@ "devDependencies": { "@seamapi/fake-seam-connect": "1.85.1", "@seamapi/nextlove-sdk-generator": "^1.19.4", - "@seamapi/types": "1.591.0", + "@seamapi/types": "1.625.0", "del": "^7.1.0", "markdown-toc": "^1.2.0", "prettier": "^3.2.5" @@ -476,9 +476,9 @@ } }, "node_modules/@seamapi/types": { - "version": "1.591.0", - "resolved": "https://registry.npmjs.org/@seamapi/types/-/types-1.591.0.tgz", - "integrity": "sha512-9r1414GHNbTX85XpEl9tvbiPDvw/TDghWMJk5TSz0CXkwafhOpvY08Wfl16KAPHdN5qVClDlLO9eG4ZS8z8BUQ==", + "version": "1.625.0", + "resolved": "https://registry.npmjs.org/@seamapi/types/-/types-1.625.0.tgz", + "integrity": "sha512-NXY0AWqNUz/z+UGPHFpNgcFj37jaHJ4yuYInWisy43B23oIX1u+XYQo2Gm5/z9UrDrnsYW78op1l0/xaSohBtg==", "dev": true, "license": "MIT", "engines": { diff --git a/package.json b/package.json index 061ca4e..dc1b04c 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,7 @@ "devDependencies": { "@seamapi/fake-seam-connect": "1.85.1", "@seamapi/nextlove-sdk-generator": "^1.19.4", - "@seamapi/types": "1.591.0", + "@seamapi/types": "1.625.0", "del": "^7.1.0", "markdown-toc": "^1.2.0", "prettier": "^3.2.5"