diff --git a/lib/seam/routes/clients/access_codes.rb b/lib/seam/routes/clients/access_codes.rb index 95f4254..9508755 100644 --- a/lib/seam/routes/clients/access_codes.rb +++ b/lib/seam/routes/clients/access_codes.rb @@ -46,8 +46,14 @@ def get(access_code_id: nil, code: nil, device_id: nil) Seam::Resources::AccessCode.load_from_response(res.body["access_code"]) end - def list(access_code_ids: nil, customer_key: nil, device_id: nil, limit: nil, page_cursor: nil, user_identifier_key: nil) - res = @client.post("/access_codes/list", {access_code_ids: access_code_ids, customer_key: customer_key, device_id: device_id, limit: limit, page_cursor: page_cursor, user_identifier_key: user_identifier_key}.compact) + def get_timeline(access_code_id:, after: nil, before: nil, event_types: nil, limit: nil) + @client.post("/access_codes/get_timeline", {access_code_id: access_code_id, after: after, before: before, event_types: event_types, limit: limit}.compact) + + nil + end + + def list(access_code_ids: nil, customer_key: nil, device_id: nil, limit: nil, page_cursor: nil, search: nil, user_identifier_key: nil) + res = @client.post("/access_codes/list", {access_code_ids: access_code_ids, customer_key: customer_key, device_id: device_id, limit: limit, page_cursor: page_cursor, search: search, user_identifier_key: user_identifier_key}.compact) Seam::Resources::AccessCode.load_from_response(res.body["access_codes"]) end diff --git a/lib/seam/routes/clients/access_codes_unmanaged.rb b/lib/seam/routes/clients/access_codes_unmanaged.rb index 7c5e2fd..e9d01b8 100644 --- a/lib/seam/routes/clients/access_codes_unmanaged.rb +++ b/lib/seam/routes/clients/access_codes_unmanaged.rb @@ -26,8 +26,8 @@ def get(access_code_id: nil, code: nil, device_id: nil) Seam::Resources::UnmanagedAccessCode.load_from_response(res.body["access_code"]) end - def list(device_id:, limit: nil, page_cursor: nil, user_identifier_key: nil) - res = @client.post("/access_codes/unmanaged/list", {device_id: device_id, limit: limit, page_cursor: page_cursor, user_identifier_key: user_identifier_key}.compact) + def list(device_id:, limit: nil, page_cursor: nil, search: nil, user_identifier_key: nil) + res = @client.post("/access_codes/unmanaged/list", {device_id: device_id, limit: limit, page_cursor: page_cursor, search: search, user_identifier_key: user_identifier_key}.compact) Seam::Resources::UnmanagedAccessCode.load_from_response(res.body["access_codes"]) end diff --git a/lib/seam/routes/clients/access_grants.rb b/lib/seam/routes/clients/access_grants.rb index 16a0af2..e24a44c 100644 --- a/lib/seam/routes/clients/access_grants.rb +++ b/lib/seam/routes/clients/access_grants.rb @@ -30,8 +30,8 @@ def get(access_grant_id: nil, access_grant_key: nil) Seam::Resources::AccessGrant.load_from_response(res.body["access_grant"]) end - def get_related(access_grant_ids:, exclude: nil, include: nil) - res = @client.post("/access_grants/get_related", {access_grant_ids: access_grant_ids, exclude: exclude, include: include}.compact) + def get_related(access_grant_ids: nil, access_grant_keys: nil, exclude: nil, include: nil) + res = @client.post("/access_grants/get_related", {access_grant_ids: access_grant_ids, access_grant_keys: access_grant_keys, exclude: exclude, include: include}.compact) Seam::Resources::Batch.load_from_response(res.body["batch"]) end diff --git a/lib/seam/routes/clients/acs_access_groups.rb b/lib/seam/routes/clients/acs_access_groups.rb index 7279197..3afa41c 100644 --- a/lib/seam/routes/clients/acs_access_groups.rb +++ b/lib/seam/routes/clients/acs_access_groups.rb @@ -26,8 +26,8 @@ def get(acs_access_group_id:) Seam::Resources::AcsAccessGroup.load_from_response(res.body["acs_access_group"]) end - def list(acs_system_id: nil, acs_user_id: nil, user_identity_id: nil) - res = @client.post("/acs/access_groups/list", {acs_system_id: acs_system_id, acs_user_id: acs_user_id, user_identity_id: user_identity_id}.compact) + def list(acs_system_id: nil, acs_user_id: nil, search: nil, user_identity_id: nil) + res = @client.post("/acs/access_groups/list", {acs_system_id: acs_system_id, acs_user_id: acs_user_id, search: search, user_identity_id: user_identity_id}.compact) Seam::Resources::AcsAccessGroup.load_from_response(res.body["acs_access_groups"]) end diff --git a/lib/seam/routes/clients/acs_systems.rb b/lib/seam/routes/clients/acs_systems.rb index ed5d1d3..a24b955 100644 --- a/lib/seam/routes/clients/acs_systems.rb +++ b/lib/seam/routes/clients/acs_systems.rb @@ -14,8 +14,8 @@ def get(acs_system_id:) Seam::Resources::AcsSystem.load_from_response(res.body["acs_system"]) end - def list(connected_account_id: nil, customer_key: nil) - res = @client.post("/acs/systems/list", {connected_account_id: connected_account_id, customer_key: customer_key}.compact) + def list(connected_account_id: nil, customer_key: nil, search: nil) + res = @client.post("/acs/systems/list", {connected_account_id: connected_account_id, customer_key: customer_key, search: search}.compact) Seam::Resources::AcsSystem.load_from_response(res.body["acs_systems"]) end diff --git a/lib/seam/routes/clients/connect_webviews.rb b/lib/seam/routes/clients/connect_webviews.rb index 4635f22..58222eb 100644 --- a/lib/seam/routes/clients/connect_webviews.rb +++ b/lib/seam/routes/clients/connect_webviews.rb @@ -26,8 +26,8 @@ def get(connect_webview_id:) Seam::Resources::ConnectWebview.load_from_response(res.body["connect_webview"]) end - def list(custom_metadata_has: nil, customer_key: nil, limit: nil, page_cursor: nil, user_identifier_key: nil) - res = @client.post("/connect_webviews/list", {custom_metadata_has: custom_metadata_has, customer_key: customer_key, limit: limit, page_cursor: page_cursor, user_identifier_key: user_identifier_key}.compact) + def list(custom_metadata_has: nil, customer_key: nil, limit: nil, page_cursor: nil, search: nil, user_identifier_key: nil) + res = @client.post("/connect_webviews/list", {custom_metadata_has: custom_metadata_has, customer_key: customer_key, limit: limit, page_cursor: page_cursor, search: search, user_identifier_key: user_identifier_key}.compact) Seam::Resources::ConnectWebview.load_from_response(res.body["connect_webviews"]) end diff --git a/lib/seam/routes/clients/customers.rb b/lib/seam/routes/clients/customers.rb index d99a6ef..2768b22 100644 --- a/lib/seam/routes/clients/customers.rb +++ b/lib/seam/routes/clients/customers.rb @@ -8,8 +8,12 @@ def initialize(client:, defaults:) @defaults = defaults end - def create_portal(customization_profile_id: nil, features: nil, is_embedded: nil, landing_page: nil, locale: nil, property_listing_filter: nil, customer_data: nil) - res = @client.post("/customers/create_portal", {customization_profile_id: customization_profile_id, features: features, is_embedded: is_embedded, landing_page: landing_page, locale: locale, property_listing_filter: property_listing_filter, customer_data: customer_data}.compact) + def reservations + @reservations ||= Seam::Clients::CustomersReservations.new(client: @client, defaults: @defaults) + end + + def create_portal(customer_resources_filters: nil, customization_profile_id: nil, deep_link: nil, exclude_locale_picker: nil, features: nil, is_embedded: nil, landing_page: nil, locale: nil, navigation_mode: nil, customer_data: nil) + res = @client.post("/customers/create_portal", {customer_resources_filters: customer_resources_filters, customization_profile_id: customization_profile_id, deep_link: deep_link, exclude_locale_picker: exclude_locale_picker, features: features, is_embedded: is_embedded, landing_page: landing_page, locale: locale, navigation_mode: navigation_mode, customer_data: customer_data}.compact) Seam::Resources::MagicLink.load_from_response(res.body["magic_link"]) end diff --git a/lib/seam/routes/clients/customers_reservations.rb b/lib/seam/routes/clients/customers_reservations.rb new file mode 100644 index 0000000..48df78d --- /dev/null +++ b/lib/seam/routes/clients/customers_reservations.rb @@ -0,0 +1,18 @@ +# frozen_string_literal: true + +module Seam + module Clients + class CustomersReservations + def initialize(client:, defaults:) + @client = client + @defaults = defaults + end + + def create_deep_link(customer_key:, reservation_key:) + @client.post("/customers/reservations/create_deep_link", {customer_key: customer_key, reservation_key: reservation_key}.compact) + + nil + end + end + end +end diff --git a/lib/seam/routes/clients/index.rb b/lib/seam/routes/clients/index.rb index 3dc5d84..71c6853 100644 --- a/lib/seam/routes/clients/index.rb +++ b/lib/seam/routes/clients/index.rb @@ -21,6 +21,7 @@ require_relative "connected_accounts" require_relative "connected_accounts_simulate" require_relative "customers" +require_relative "customers_reservations" require_relative "devices" require_relative "devices_simulate" require_relative "devices_unmanaged" diff --git a/lib/seam/routes/clients/workspaces.rb b/lib/seam/routes/clients/workspaces.rb index 9734e6a..3abc2f9 100644 --- a/lib/seam/routes/clients/workspaces.rb +++ b/lib/seam/routes/clients/workspaces.rb @@ -10,8 +10,8 @@ def initialize(client:, defaults:) @defaults = defaults end - def create(name:, company_name: nil, connect_partner_name: nil, connect_webview_customization: nil, is_sandbox: nil, webview_logo_shape: nil, webview_primary_button_color: nil, webview_primary_button_text_color: nil, webview_success_message: nil) - res = @client.post("/workspaces/create", {name: name, company_name: company_name, connect_partner_name: connect_partner_name, connect_webview_customization: connect_webview_customization, is_sandbox: is_sandbox, webview_logo_shape: webview_logo_shape, webview_primary_button_color: webview_primary_button_color, webview_primary_button_text_color: webview_primary_button_text_color, webview_success_message: webview_success_message}.compact) + def create(name:, company_name: nil, connect_partner_name: nil, connect_webview_customization: nil, is_sandbox: nil, organization_id: nil, webview_logo_shape: nil, webview_primary_button_color: nil, webview_primary_button_text_color: nil, webview_success_message: nil) + res = @client.post("/workspaces/create", {name: name, company_name: company_name, connect_partner_name: connect_partner_name, connect_webview_customization: connect_webview_customization, is_sandbox: is_sandbox, organization_id: organization_id, webview_logo_shape: webview_logo_shape, webview_primary_button_color: webview_primary_button_color, webview_primary_button_text_color: webview_primary_button_text_color, webview_success_message: webview_success_message}.compact) Seam::Resources::Workspace.load_from_response(res.body["workspace"]) end diff --git a/lib/seam/routes/resources/access_code.rb b/lib/seam/routes/resources/access_code.rb index 0739795..35347a6 100644 --- a/lib/seam/routes/resources/access_code.rb +++ b/lib/seam/routes/resources/access_code.rb @@ -3,7 +3,7 @@ module Seam module Resources class AccessCode < BaseResource - attr_accessor :access_code_id, :code, :common_code_key, :device_id, :is_backup, :is_backup_access_code_available, :is_external_modification_allowed, :is_managed, :is_offline_access_code, :is_one_time_use, :is_scheduled_on_device, :is_waiting_for_code_assignment, :name, :pulled_backup_access_code_id, :status, :type, :workspace_id + attr_accessor :access_code_id, :code, :common_code_key, :device_id, :dormakaba_oracode_metadata, :is_backup, :is_backup_access_code_available, :is_external_modification_allowed, :is_managed, :is_offline_access_code, :is_one_time_use, :is_scheduled_on_device, :is_waiting_for_code_assignment, :name, :pulled_backup_access_code_id, :status, :type, :workspace_id date_accessor :created_at, :ends_at, :starts_at diff --git a/lib/seam/routes/resources/access_grant.rb b/lib/seam/routes/resources/access_grant.rb index b0eed61..b0ec4ca 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, :reservation_key, :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, :pending_mutations, :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/access_method.rb b/lib/seam/routes/resources/access_method.rb index bb92acc..b3451a0 100644 --- a/lib/seam/routes/resources/access_method.rb +++ b/lib/seam/routes/resources/access_method.rb @@ -3,7 +3,7 @@ module Seam module Resources class AccessMethod < BaseResource - attr_accessor :access_method_id, :client_session_token, :code, :customization_profile_id, :display_name, :instant_key_url, :is_encoding_required, :is_issued, :mode, :workspace_id + attr_accessor :access_method_id, :client_session_token, :code, :customization_profile_id, :display_name, :instant_key_url, :is_encoding_required, :is_issued, :mode, :pending_mutations, :workspace_id date_accessor :created_at, :issued_at diff --git a/lib/seam/routes/resources/event.rb b/lib/seam/routes/resources/event.rb index a224c89..72e9f63 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, :error_message, :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, :connected_account_errors, :connected_account_type, :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, :access_code_is_managed, :method, :user_identity_id, :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 + attr_accessor :access_code_id, :connected_account_custom_metadata, :connected_account_id, :device_custom_metadata, :device_id, :event_id, :event_type, :workspace_id, :code, :access_code_errors, :access_code_warnings, :connected_account_errors, :connected_account_warnings, :device_errors, :device_warnings, :backup_access_code_id, :access_grant_id, :acs_entrance_id, :access_grant_key, :ends_at, :starts_at, :error_message, :access_grant_ids, :access_grant_keys, :access_method_id, :is_backup_code, :acs_system_id, :acs_system_errors, :acs_system_warnings, :acs_credential_id, :acs_user_id, :acs_encoder_id, :acs_access_group_id, :client_session_id, :connect_webview_id, :customer_key, :connected_account_type, :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, :access_code_is_managed, :method, :user_identity_id, :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/unmanaged_access_code.rb b/lib/seam/routes/resources/unmanaged_access_code.rb index b4db7cf..3e7703d 100644 --- a/lib/seam/routes/resources/unmanaged_access_code.rb +++ b/lib/seam/routes/resources/unmanaged_access_code.rb @@ -3,7 +3,7 @@ module Seam module Resources class UnmanagedAccessCode < BaseResource - attr_accessor :access_code_id, :code, :device_id, :is_managed, :name, :status, :type, :workspace_id + attr_accessor :access_code_id, :code, :device_id, :dormakaba_oracode_metadata, :is_managed, :name, :status, :type, :workspace_id date_accessor :created_at, :ends_at, :starts_at diff --git a/package-lock.json b/package-lock.json index c0a8c48..618a3b5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7,8 +7,8 @@ "name": "@seamapi/ruby", "devDependencies": { "@seamapi/fake-seam-connect": "1.86.0", - "@seamapi/nextlove-sdk-generator": "^1.19.7", - "@seamapi/types": "1.720.0", + "@seamapi/nextlove-sdk-generator": "^1.19.8", + "@seamapi/types": "1.725.0", "del": "^7.1.0", "markdown-toc": "^1.2.0", "prettier": "^3.2.5" @@ -514,9 +514,9 @@ } }, "node_modules/@seamapi/nextlove-sdk-generator": { - "version": "1.19.7", - "resolved": "https://registry.npmjs.org/@seamapi/nextlove-sdk-generator/-/nextlove-sdk-generator-1.19.7.tgz", - "integrity": "sha512-ml6MDR9ZRMfNcFSYkU36TkyMBUYTw8mm//biVKRJLQRDyynpJgkIZXJzEREuwlU+Rsb050WthQZqWdb03n4Ueg==", + "version": "1.19.8", + "resolved": "https://registry.npmjs.org/@seamapi/nextlove-sdk-generator/-/nextlove-sdk-generator-1.19.8.tgz", + "integrity": "sha512-kccnwBM2Gy4EydHBNi2Qic0GKcIc22Fa1vAIS4sxQT+Fn/hlXPad8fvvwWC2rIaLSvw+FG0MSRM7Xi1pfDUukg==", "dev": true, "license": "MIT", "dependencies": { @@ -536,14 +536,14 @@ } }, "node_modules/@seamapi/types": { - "version": "1.720.0", - "resolved": "https://registry.npmjs.org/@seamapi/types/-/types-1.720.0.tgz", - "integrity": "sha512-V2290KLLY4GJrnGgW8e8egkzFLLmDeqRb3+hr5c7hZhr4m1OziogheSZGt8HORSD+35UbfNTjSzup7Ip2U9UQA==", + "version": "1.725.0", + "resolved": "https://registry.npmjs.org/@seamapi/types/-/types-1.725.0.tgz", + "integrity": "sha512-Wd2Egv9Vb8vrZVjFXA+sfWHd+liwgHHqRtMAGW58o1654obHYTsdMxs+HDARebKoVQ6YBcVJGcMgz2mIM7lrVA==", "dev": true, "license": "MIT", "engines": { - "node": ">=20.9.0", - "npm": ">=10.1.0" + "node": ">=22.11.0", + "npm": ">=10.9.4" }, "peerDependencies": { "zod": "^3.24.0" diff --git a/package.json b/package.json index ddda269..e8b98af 100644 --- a/package.json +++ b/package.json @@ -11,8 +11,8 @@ }, "devDependencies": { "@seamapi/fake-seam-connect": "1.86.0", - "@seamapi/nextlove-sdk-generator": "^1.19.7", - "@seamapi/types": "1.720.0", + "@seamapi/nextlove-sdk-generator": "^1.19.8", + "@seamapi/types": "1.725.0", "del": "^7.1.0", "markdown-toc": "^1.2.0", "prettier": "^3.2.5"