seam 2.21.0 → 2.23.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 374e9e4af3b3aa5d0bec8bded2917d6180a3b39aa34e3eb594950aab895b7e13
4
- data.tar.gz: bcd0fd3977ceb2d1c3e381f3233a5924f8de1925151b0466512e80705b6c2c81
3
+ metadata.gz: ea0070eada476c8db8b37f3d08e1d55fe83ab5208467b6893588129502ba1386
4
+ data.tar.gz: 4ac7f7f3f79598284474417e0702ec907a255577818983557094304c8cb86404
5
5
  SHA512:
6
- metadata.gz: d172fd0528e40e39b53b4409c003951f1fd13aaf06ebeb9776f213d0c5b29c5cdaf735e6894219378fc00c2028c6e01d3b6e0a0b8804956ba1f1c760560d8c63
7
- data.tar.gz: f78ab1716d899c1468fbf4e399cfe903d76edab8e8a5144e66f099fa6b14f10a33036f269af5ff160f5f29ee1199ca77d3318cfa0ba945e7449fd1f7fa8515fb
6
+ metadata.gz: b6d1fc29f06d286a1bff4bdd9b73bf141ce14383b5c929fcc7fee732cd851ed213cd92f89cd8842e5340165b60911148863cb7ca2a8615ab0cbea06b6381e915
7
+ data.tar.gz: b743fcb749ce5acef0cb6d93654160a75c1268bab52fbcf1589203c8453577ba67d32bcbe3c04a655bf464bb77a351c5e2cfa67b1db00b901acbd169c2eb6bc0
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- seam (2.21.0)
4
+ seam (2.23.0)
5
5
  faraday (~> 2.7)
6
6
  faraday-retry (~> 2.2)
7
7
  svix (~> 1.30)
data/README.md CHANGED
@@ -232,12 +232,12 @@ require "seam"
232
232
 
233
233
  seam = Seam.new
234
234
 
235
- paginator = seam.create_paginator(seam.connected_accounts.method(:list), {limit: 20})
235
+ paginator = seam.create_paginator(seam.devices.method(:list), {limit: 20})
236
236
 
237
- connected_accounts, pagination = paginator.first_page
237
+ devices, pagination = paginator.first_page
238
238
 
239
239
  if pagination.has_next_page?
240
- more_connected_accounts, _ = paginator.next_page(pagination.next_page_cursor)
240
+ more_devices, _ = paginator.next_page(pagination.next_page_cursor)
241
241
  end
242
242
  ```
243
243
 
@@ -252,9 +252,9 @@ require "json"
252
252
  seam = Seam.new
253
253
 
254
254
  params = {limit: 20}
255
- paginator = seam.create_paginator(seam.connected_accounts.method(:list), params)
255
+ paginator = seam.create_paginator(seam.devices.method(:list), params)
256
256
 
257
- connected_accounts, pagination = paginator.first_page
257
+ devices, pagination = paginator.first_page
258
258
 
259
259
  # Example: Store state for later use (e.g., in a file or database)
260
260
  pagination_state = {
@@ -262,7 +262,7 @@ pagination_state = {
262
262
  "next_page_cursor" => pagination.next_page_cursor,
263
263
  "has_next_page" => pagination.has_next_page?
264
264
  }
265
- File.write("/tmp/seam_connected_accounts_list.json", JSON.dump(pagination_state))
265
+ File.write("/tmp/seam_devices.json", JSON.dump(pagination_state))
266
266
  ```
267
267
 
268
268
  Get the next page at a later time using the stored state:
@@ -274,14 +274,14 @@ require "json"
274
274
  seam = Seam.new
275
275
 
276
276
  # Example: Load state from where it was stored
277
- pagination_state_json = File.read("/tmp/seam_connected_accounts_list.json")
277
+ pagination_state_json = File.read("/tmp/seam_devices.json")
278
278
  pagination_state = JSON.parse(pagination_state_json)
279
279
 
280
280
  if pagination_state["has_next_page"]
281
281
  paginator = seam.create_paginator(
282
- seam.connected_accounts.method(:list), pagination_state["params"]
282
+ seam.devices.method(:list), pagination_state["params"]
283
283
  )
284
- more_connected_accounts, _ = paginator.next_page(
284
+ more_devices, _ = paginator.next_page(
285
285
  pagination_state["next_page_cursor"]
286
286
  )
287
287
  end
@@ -294,7 +294,7 @@ require "seam"
294
294
 
295
295
  seam = Seam.new
296
296
 
297
- paginator = seam.create_paginator(seam.connected_accounts.method(:list), {limit: 20})
297
+ paginator = seam.create_paginator(seam.devices.method(:list), {limit: 20})
298
298
 
299
299
  paginator.flatten.each do |account|
300
300
  puts account.account_type_display_name
@@ -308,9 +308,9 @@ require "seam"
308
308
 
309
309
  seam = Seam.new
310
310
 
311
- paginator = seam.create_paginator(seam.connected_accounts.method(:list), {limit: 20})
311
+ paginator = seam.create_paginator(seam.devices.method(:list), {limit: 20})
312
312
 
313
- all_connected_accounts = paginator.flatten_to_list
313
+ all_devices = paginator.flatten_to_list
314
314
  ```
315
315
 
316
316
  ### Interacting with Multiple Workspaces
@@ -8,8 +8,8 @@ module Seam
8
8
  @defaults = defaults
9
9
  end
10
10
 
11
- def create(connect_webview_ids: nil, connected_account_ids: nil, expires_at: nil, user_identifier_key: nil, user_identity_ids: nil)
12
- res = @client.post("/client_sessions/create", {connect_webview_ids: connect_webview_ids, connected_account_ids: connected_account_ids, expires_at: expires_at, user_identifier_key: user_identifier_key, user_identity_ids: user_identity_ids}.compact)
11
+ def create(connect_webview_ids: nil, connected_account_ids: nil, customer_id: nil, customer_key: nil, expires_at: nil, user_identifier_key: nil, user_identity_ids: nil)
12
+ res = @client.post("/client_sessions/create", {connect_webview_ids: connect_webview_ids, connected_account_ids: connected_account_ids, customer_id: customer_id, customer_key: customer_key, expires_at: expires_at, user_identifier_key: user_identifier_key, user_identity_ids: user_identity_ids}.compact)
13
13
 
14
14
  Seam::Resources::ClientSession.load_from_response(res.body["client_session"])
15
15
  end
@@ -8,8 +8,8 @@ module Seam
8
8
  @defaults = defaults
9
9
  end
10
10
 
11
- def create(accepted_providers: nil, automatically_manage_new_devices: nil, custom_metadata: nil, custom_redirect_failure_url: nil, custom_redirect_url: nil, device_selection_mode: nil, provider_category: nil, wait_for_device_creation: nil)
12
- res = @client.post("/connect_webviews/create", {accepted_providers: accepted_providers, automatically_manage_new_devices: automatically_manage_new_devices, custom_metadata: custom_metadata, custom_redirect_failure_url: custom_redirect_failure_url, custom_redirect_url: custom_redirect_url, device_selection_mode: device_selection_mode, provider_category: provider_category, wait_for_device_creation: wait_for_device_creation}.compact)
11
+ def create(accepted_providers: nil, automatically_manage_new_devices: nil, custom_metadata: nil, custom_redirect_failure_url: nil, custom_redirect_url: nil, customer_id: nil, device_selection_mode: nil, provider_category: nil, wait_for_device_creation: nil)
12
+ res = @client.post("/connect_webviews/create", {accepted_providers: accepted_providers, automatically_manage_new_devices: automatically_manage_new_devices, custom_metadata: custom_metadata, custom_redirect_failure_url: custom_redirect_failure_url, custom_redirect_url: custom_redirect_url, customer_id: customer_id, device_selection_mode: device_selection_mode, provider_category: provider_category, wait_for_device_creation: wait_for_device_creation}.compact)
13
13
 
14
14
  Seam::Resources::ConnectWebview.load_from_response(res.body["connect_webview"])
15
15
  end
@@ -26,8 +26,8 @@ module Seam
26
26
  Seam::Resources::ConnectWebview.load_from_response(res.body["connect_webview"])
27
27
  end
28
28
 
29
- def list(custom_metadata_has: nil, limit: nil, user_identifier_key: nil)
30
- res = @client.post("/connect_webviews/list", {custom_metadata_has: custom_metadata_has, limit: limit, user_identifier_key: user_identifier_key}.compact)
29
+ def list(custom_metadata_has: nil, customer_id: nil, limit: nil, user_identifier_key: nil)
30
+ res = @client.post("/connect_webviews/list", {custom_metadata_has: custom_metadata_has, customer_id: customer_id, limit: limit, user_identifier_key: user_identifier_key}.compact)
31
31
 
32
32
  Seam::Resources::ConnectWebview.load_from_response(res.body["connect_webviews"])
33
33
  end
@@ -26,6 +26,12 @@ module Seam
26
26
  Seam::Resources::ConnectedAccount.load_from_response(res.body["connected_accounts"])
27
27
  end
28
28
 
29
+ def sync(connected_account_id:)
30
+ @client.post("/connected_accounts/sync", {connected_account_id: connected_account_id}.compact)
31
+
32
+ nil
33
+ end
34
+
29
35
  def update(connected_account_id:, automatically_manage_new_devices: nil, custom_metadata: nil)
30
36
  @client.post("/connected_accounts/update", {connected_account_id: connected_account_id, automatically_manage_new_devices: automatically_manage_new_devices, custom_metadata: custom_metadata}.compact)
31
37
 
@@ -30,6 +30,8 @@ require_relative "thermostats"
30
30
  require_relative "thermostats_daily_programs"
31
31
  require_relative "thermostats_schedules"
32
32
  require_relative "thermostats_simulate"
33
+ require_relative "unstable_partner_building_blocks"
34
+ require_relative "unstable_partner"
33
35
  require_relative "user_identities"
34
36
  require_relative "user_identities_enrollment_automations"
35
37
  require_relative "webhooks"
@@ -0,0 +1,16 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Seam
4
+ module Clients
5
+ class UnstablePartner
6
+ def initialize(client:, defaults:)
7
+ @client = client
8
+ @defaults = defaults
9
+ end
10
+
11
+ def building_blocks
12
+ @building_blocks ||= Seam::Clients::UnstablePartnerBuildingBlocks.new(client: @client, defaults: @defaults)
13
+ end
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,18 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Seam
4
+ module Clients
5
+ class UnstablePartnerBuildingBlocks
6
+ def initialize(client:, defaults:)
7
+ @client = client
8
+ @defaults = defaults
9
+ end
10
+
11
+ def generate_link(bridge_client_machine_identifier_key:, bridge_client_name:, bridge_client_time_zone:)
12
+ @client.post("/unstable_partner/building_blocks/generate_link", {bridge_client_machine_identifier_key: bridge_client_machine_identifier_key, bridge_client_name: bridge_client_name, bridge_client_time_zone: bridge_client_time_zone}.compact)
13
+
14
+ nil
15
+ end
16
+ end
17
+ end
18
+ end
@@ -54,6 +54,10 @@ module Seam
54
54
  @thermostats ||= Seam::Clients::Thermostats.new(client: @client, defaults: @defaults)
55
55
  end
56
56
 
57
+ def unstable_partner
58
+ @unstable_partner ||= Seam::Clients::UnstablePartner.new(client: @client, defaults: @defaults)
59
+ end
60
+
57
61
  def user_identities
58
62
  @user_identities ||= Seam::Clients::UserIdentities.new(client: @client, defaults: @defaults)
59
63
  end
data/lib/seam/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Seam
4
- VERSION = "2.21.0"
4
+ VERSION = "2.23.0"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: seam
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.21.0
4
+ version: 2.23.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Seam Labs, Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-05-29 00:00:00.000000000 Z
11
+ date: 2025-06-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -234,6 +234,8 @@ files:
234
234
  - lib/seam/routes/clients/thermostats_daily_programs.rb
235
235
  - lib/seam/routes/clients/thermostats_schedules.rb
236
236
  - lib/seam/routes/clients/thermostats_simulate.rb
237
+ - lib/seam/routes/clients/unstable_partner.rb
238
+ - lib/seam/routes/clients/unstable_partner_building_blocks.rb
237
239
  - lib/seam/routes/clients/user_identities.rb
238
240
  - lib/seam/routes/clients/user_identities_enrollment_automations.rb
239
241
  - lib/seam/routes/clients/webhooks.rb