seam 2.135.0 → 2.136.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: 63f28be81d1f91aac1e7e4a985619c5373c3c8f2cd5c9cb2c912353d5d11d784
4
- data.tar.gz: 4b7a897a7b5baee78d66aa0041b5acbedb8dcf58360ffba672ec4f3d2ef16d41
3
+ metadata.gz: 506d30f07fafa716408338a2bcb0b94aea070710c4b71fedb131b79a63a280d2
4
+ data.tar.gz: 2c4bc6c73eb5abb62e19d411c107da8d2b1d66aaabd137d31f4155588fa1b2c4
5
5
  SHA512:
6
- metadata.gz: 64a11203850219014f1547cef7ddef4c6e5c0bd031e30f5bb5cd395307d9a62124adbf683adb85031e363289e12255c34b10afa68fb326bee673a614daf4f410
7
- data.tar.gz: '09abde1c8cdcbd5dc21c0b823e704d940de7a3ef2fc80c9bb2ecf7cc0c59ae8c4d4adec11557b82735533a6ce335f504b1267f26a403ad8680c5cca49e6bd7b6'
6
+ metadata.gz: eb904b8d5e40221534a27639eda8c2bdd314319099cd9bff08ea84e1024f3292d918c73abb0c243dd2701bb491a7b36fc2b321ae69f7ad7fe02320b1c1a7772b
7
+ data.tar.gz: 4ae995b4d293fd9b9580dcd9af6c67d69217be1db61a626b2c5fe9e353cecf6d0c319f4183fc4d3ba7a279a5995fde42ad930f82d89bae2d6b8dee8fd36c5dd5
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- seam (2.135.0)
4
+ seam (2.136.0)
5
5
  faraday (~> 2.7)
6
6
  faraday-retry (~> 2.2)
7
7
  svix (~> 1.30)
data/README.md CHANGED
@@ -32,7 +32,8 @@ accurate and fully typed.
32
32
  - [Resume pagination](#resume-pagination)
33
33
  - [Iterate over all resources](#iterate-over-all-resources)
34
34
  - [Return all resources across all pages as a list](#return-all-resources-across-all-pages-as-a-list)
35
- - [Interacting with Multiple Workspaces](#interacting-with-multiple-workspaces)
35
+ - [Requests without a Workspace in scope](#requests-without-a-workspace-in-scope)
36
+ - [Personal Access Token](#personal-access-token-1)
36
37
  - [Webhooks](#webhooks)
37
38
  - [Advanced Usage](#advanced-usage)
38
39
  - [Additional Options](#additional-options)
@@ -314,18 +315,27 @@ paginator = seam.create_paginator(seam.devices.method(:list), {limit: 20})
314
315
  all_devices = paginator.flatten_to_list
315
316
  ```
316
317
 
317
- ### Interacting with Multiple Workspaces
318
+ ### Requests without a Workspace in scope
318
319
 
319
- Some Seam API endpoints interact with multiple workspaces. The `Seam::Http::SeamMultiWorkspace` client is not bound to a specific workspace and may use those endpoints with a personal access token authentication method.
320
+ Some Seam API endpoints do not require a workspace in scope.
321
+ The `Seam::Http::WithoutWorkspace` client is not bound to a specific workspace
322
+ and may use those endpoints with a personal access token authentication method.
320
323
 
321
- A Personal Access Token is scoped to a Seam Console user. Obtain one from the Seam Console.
324
+ #### Personal Access Token
325
+
326
+ A Personal Access Token is scoped to a Seam Console user.
327
+ Obtain one from the Seam Console.
322
328
 
323
329
  ```ruby
324
- # Pass as an option to the constructor
325
- seam = Seam::Http::SeamMultiWorkspace.new(personal_access_token: "your-personal-access-token")
330
+ # Pass as a keyword argument to the constructor
331
+ seam = Seam::Http::WithoutWorkspace.new(
332
+ personal_access_token: "your-personal-access-token"
333
+ )
326
334
 
327
335
  # Use the factory method
328
- seam = Seam::Http::SeamMultiWorkspace.from_personal_access_token("your-personal-access-token")
336
+ seam = Seam::Http::WithoutWorkspace.from_personal_access_token(
337
+ "your-personal-access-token"
338
+ )
329
339
 
330
340
  # List workspaces authorized for this Personal Access Token
331
341
  workspaces = seam.workspaces.list
data/lib/seam/auth.rb CHANGED
@@ -86,7 +86,7 @@ module Seam
86
86
  }
87
87
  end
88
88
 
89
- def self.get_auth_headers_for_multi_workspace_personal_access_token(personal_access_token)
89
+ def self.get_auth_headers_for_without_workspace_personal_access_token(personal_access_token)
90
90
  if Auth.jwt?(personal_access_token)
91
91
  raise SeamInvalidTokenError.new(
92
92
  "A JWT cannot be used as a personal_access_token"
@@ -11,7 +11,7 @@ require_relative "routes/routes"
11
11
 
12
12
  module Seam
13
13
  module Http
14
- class MultiWorkspace
14
+ class WithoutWorkspace
15
15
  attr_reader :client, :defaults
16
16
 
17
17
  def initialize(personal_access_token:, endpoint: nil, wait_for_action_attempt: true, timeout: nil,
@@ -19,7 +19,7 @@ module Seam
19
19
  @wait_for_action_attempt = wait_for_action_attempt
20
20
  @defaults = {"wait_for_action_attempt" => wait_for_action_attempt}
21
21
  @endpoint = Http::Options.get_endpoint(endpoint)
22
- @auth_headers = Http::Auth.get_auth_headers_for_multi_workspace_personal_access_token(personal_access_token)
22
+ @auth_headers = Http::Auth.get_auth_headers_for_without_workspace_personal_access_token(personal_access_token)
23
23
  @client = Http::Request.create_faraday_client(@endpoint, @auth_headers, faraday_options,
24
24
  faraday_retry_options, timeout: timeout)
25
25
  end
@@ -36,7 +36,8 @@ module Seam
36
36
  @workspaces ||= WorkspacesProxy.new(Seam::Clients::Workspaces.new(client: @client, defaults: @defaults))
37
37
  end
38
38
 
39
- def self.from_personal_access_token(personal_access_token, endpoint: nil, wait_for_action_attempt: true, timeout: nil, faraday_options: {}, faraday_retry_options: {})
39
+ def self.from_personal_access_token(personal_access_token, endpoint: nil, wait_for_action_attempt: true,
40
+ timeout: nil, faraday_options: {}, faraday_retry_options: {})
40
41
  new(
41
42
  personal_access_token: personal_access_token,
42
43
  endpoint: endpoint,
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.135.0"
4
+ VERSION = "2.136.0"
5
5
  end
data/lib/seam.rb CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  require_relative "seam/lts_version"
4
4
  require_relative "seam/http"
5
- require_relative "seam/http_multi_workspace"
5
+ require_relative "seam/http_without_workspace"
6
6
  require_relative "seam/webhook"
7
7
  require_relative "seam/wait_for_action_attempt"
8
8
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: seam
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.135.0
4
+ version: 2.136.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Seam Labs, Inc.
@@ -196,8 +196,8 @@ files:
196
196
  - lib/seam/defaults.rb
197
197
  - lib/seam/helpers/action_attempt.rb
198
198
  - lib/seam/http.rb
199
- - lib/seam/http_multi_workspace.rb
200
199
  - lib/seam/http_single_workspace.rb
200
+ - lib/seam/http_without_workspace.rb
201
201
  - lib/seam/lts_version.rb
202
202
  - lib/seam/options.rb
203
203
  - lib/seam/paginator.rb