seam 2.141.1 → 2.142.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: e99e4c607a0b5f8714d0067e093f8ab93766a3af4cd069f26988e483da203943
4
- data.tar.gz: db6cd5c445363a9bdc119946829dac7a44aaf0ff7a278063e818133680e1edea
3
+ metadata.gz: f8e9429cc66f5767d44b6d409f85a5dfa2f07d5f7af369eb20f1b2690ecb14ee
4
+ data.tar.gz: ecd20ffb6213341e419d9b9ae27abe1a783d7d8ced2ee33d2fe2a86d1606df69
5
5
  SHA512:
6
- metadata.gz: 418154fb53f041f8682566396ecfae077473c5d64993afb5208d2eee316b60e508362de340b6ce83d68058b2098bf76347f70042ea023215c15a5d921916cea9
7
- data.tar.gz: b58f492190db82e6be16f4f65a968a40d8569278781aa1238dec0c70c88e4241394ffff34b2ce9e6c662b048d635581e57eadb32b54a589b3513e683bac1b802
6
+ metadata.gz: 59dc939e24445cc86e826a2e6287a48c5c5d1732aed9fdbe8428742de74476e228a67335e807faf3bae068c7d6a2074983838285f46a58f3cd09391de26532c8
7
+ data.tar.gz: 9adaf12116c5d351651cd8f9d7b513b352a1440336e05c64fed92b370ae49223bc725e4474854af9f9a86855526ef863da0f52331032d6a10b1bd7a587a9efe2
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- seam (2.141.1)
4
+ seam (2.142.0)
5
5
  faraday (~> 2.7)
6
6
  faraday-retry (~> 2.2)
7
7
  svix (~> 1.30)
@@ -121,7 +121,7 @@ PLATFORMS
121
121
  x86_64-linux
122
122
 
123
123
  DEPENDENCIES
124
- bundler (~> 2.0)
124
+ bundler (~> 4.0)
125
125
  gem-release (~> 2.2)
126
126
  parse_gemspec-cli (~> 1.0)
127
127
  rake (~> 13.0)
@@ -132,5 +132,58 @@ DEPENDENCIES
132
132
  standard (~> 1.3)
133
133
  webmock (~> 3.26.2)
134
134
 
135
+ CHECKSUMS
136
+ addressable (2.9.0) sha256=7fdf6ac3660f7f4e867a0838be3f6cf722ace541dd97767fa42bc6cfa980c7af
137
+ ansi (1.6.0) sha256=ac9ea0c0ea8d32fb4e271348e609963ac78882f34b73836c2a02b3622e666658
138
+ ast (2.4.3) sha256=954615157c1d6a382bc27d690d973195e79db7f55e9765ac7c481c60bdb4d383
139
+ base64 (0.3.0) sha256=27337aeabad6ffae05c265c450490628ef3ebd4b67be58257393227588f5a97b
140
+ bigdecimal (4.1.2) sha256=53d217666027eab4280346fba98e7d5b66baaae1b9c3c1c0ffe89d48188a3fbd
141
+ crack (1.0.1) sha256=ff4a10390cd31d66440b7524eb1841874db86201d5b70032028553130b6d4c7e
142
+ diff-lcs (1.6.2) sha256=9ae0d2cba7d4df3075fe8cd8602a8604993efc0dfa934cff568969efb1909962
143
+ faraday (2.14.3) sha256=1882247e6766615c8220b4392bf1d27f6ebb63d8e28267587cef1fb0bf37f278
144
+ faraday-net_http (3.4.4) sha256=0e78af151747ed1b00f33e25973b4bc220d7f16c00c39676817c8b12331eb588
145
+ faraday-retry (2.4.0) sha256=7b79c48fb7e56526faf247b12d94a680071ff40c9fda7cf1ec1549439ad11ebe
146
+ gem-release (2.2.4) sha256=2f11124c1580c811507c3b47e875e420cf3ed792a98105b49df11971e6e94db3
147
+ hashdiff (1.2.1) sha256=9c079dbc513dfc8833ab59c0c2d8f230fa28499cc5efb4b8dd276cf931457cd1
148
+ json (2.21.2) sha256=1f1d3b7cf2b3ba1a69beca0bb6db13d5438b80bff3cd54cdaaa620b9b07c1c6a
149
+ language_server-protocol (3.17.0.6) sha256=5ef2c0c138f8267e1bc631d3328347d354f96724b0af22f2c79516120443b7f0
150
+ lint_roller (1.1.0) sha256=2c0c845b632a7d172cb849cc90c1bce937a28c5c8ccccb50dfd46a485003cc87
151
+ logger (1.7.0) sha256=196edec7cc44b66cfb40f9755ce11b392f21f7967696af15d274dde7edff0203
152
+ multi_json (1.21.1) sha256=e6126a31808e3b4d19f483c775ceac34df190dffa62adfb63a165ee14ba68080
153
+ net-http (0.9.1) sha256=25ba0b67c63e89df626ed8fac771d0ad24ad151a858af2cc8e6a716ca4336996
154
+ parallel (2.1.0) sha256=b35258865c2e31134c5ecb708beaaf6772adf9d5efae28e93e99260877b09356
155
+ parse_gemspec (1.0.0) sha256=1b324fdf93821fdc6515a989c4abefb2660e6fc9fd3d92a99ae9f65db48f1a76
156
+ parse_gemspec-cli (1.0.0) sha256=64207785844eabcd20770aeb959ecd0af25cbae6f165c11c97f21905d1144fe2
157
+ parser (3.3.12.0) sha256=21a6d7f755d5a24dfbdc6e6b772e4e879a52e7631a88bc5a3a134606052c9828
158
+ prism (1.9.0) sha256=7b530c6a9f92c24300014919c9dcbc055bf4cdf51ec30aed099b06cd6674ef85
159
+ public_suffix (7.0.5) sha256=1a8bb08f1bbea19228d3bed6e5ed908d1cb4f7c2726d18bd9cadf60bc676f623
160
+ racc (1.8.1) sha256=4a7f6929691dbec8b5209a0b373bc2614882b55fc5d2e447a21aaa691303d62f
161
+ rainbow (3.1.1) sha256=039491aa3a89f42efa1d6dec2fc4e62ede96eb6acd95e52f1ad581182b79bc6a
162
+ rake (13.4.2) sha256=cb825b2bd5f1f8e91ca37bddb4b9aaf345551b4731da62949be002fa89283701
163
+ regexp_parser (2.12.0) sha256=35a916a1d63190ab5c9009457136ae5f3c0c7512d60291d0d1378ba18ce08ebb
164
+ rexml (3.4.4) sha256=19e0a2c3425dfbf2d4fc1189747bdb2f849b6c5e74180401b15734bc97b5d142
165
+ rspec (3.13.2) sha256=206284a08ad798e61f86d7ca3e376718d52c0bc944626b2349266f239f820587
166
+ rspec-core (3.13.6) sha256=a8823c6411667b60a8bca135364351dda34cd55e44ff94c4be4633b37d828b2d
167
+ rspec-expectations (3.13.5) sha256=33a4d3a1d95060aea4c94e9f237030a8f9eae5615e9bd85718fe3a09e4b58836
168
+ rspec-mocks (3.13.8) sha256=086ad3d3d17533f4237643de0b5c42f04b66348c28bf6b9c2d3f4a3b01af1d47
169
+ rspec-support (3.13.7) sha256=0640e5570872aafefd79867901deeeeb40b0c9875a36b983d85f54fb7381c47c
170
+ rubocop (1.88.2) sha256=8def251c90cd955feb4daa3edc0ab56893250c4ce90ef81e6c80c03f9a939bbf
171
+ rubocop-ast (1.50.0) sha256=b9ca88300da0803ee222ad20cdb30494c0a784eed06fdc35d254b06d662788db
172
+ rubocop-performance (1.26.1) sha256=cd19b936ff196df85829d264b522fd4f98b6c89ad271fa52744a8c11b8f71834
173
+ ruby-progressbar (1.13.0) sha256=80fc9c47a9b640d6834e0dc7b3c94c9df37f08cb072b7761e4a71e22cff29b33
174
+ seam (2.142.0)
175
+ simplecov (1.1.1) sha256=25825ef13f0b2e74694d769817dad6ab8e90131dabdaa666e522fea105521e78
176
+ simplecov-console (0.9.5) sha256=b1108bcfff5f210143e2b8301698c367b01586f20d25a73e95475a5df6fc6ff6
177
+ standard (1.56.0) sha256=ae2af4d9669589162ac69ed5ef59dcf9f346d4afc81f7e62b84339310dfcb787
178
+ standard-custom (1.0.2) sha256=424adc84179a074f1a2a309bb9cf7cd6bfdb2b6541f20c6bf9436c0ba22a652b
179
+ standard-performance (1.9.0) sha256=49483d31be448292951d80e5e67cdcb576c2502103c7b40aec6f1b6e9c88e3f2
180
+ svix (1.99.1) sha256=d6a2942156242e3c17bd69e03145ff8338bc1384c66514d231420f7c981ca40c
181
+ terminal-table (4.0.0) sha256=f504793203f8251b2ea7c7068333053f0beeea26093ec9962e62ea79f94301d2
182
+ thor (1.5.0) sha256=e3a9e55fe857e44859ce104a84675ab6e8cd59c650a49106a05f55f136425e73
183
+ unicode-display_width (3.2.0) sha256=0cdd96b5681a5949cdbc2c55e7b420facae74c4aaf9a9815eee1087cb1853c42
184
+ unicode-emoji (4.2.0) sha256=519e69150f75652e40bf736106cfbc8f0f73aa3fb6a65afe62fefa7f80b0f80f
185
+ uri (1.1.1) sha256=379fa58d27ffb1387eaada68c749d1426738bd0f654d812fcc07e7568f5c57c6
186
+ webmock (3.26.2) sha256=774556f2ea6371846cca68c01769b2eac0d134492d21f6d0ab5dd643965a4c90
187
+
135
188
  BUNDLED WITH
136
- 2.5.22
189
+ 4.0.3
data/README.md CHANGED
@@ -14,7 +14,9 @@ Please refer to the official [Seam Docs](https://docs.seam.co/latest/) to get st
14
14
  Parts of this SDK are generated from always up-to-date type information
15
15
  provided by [@seamapi/types](https://github.com/seamapi/types/).
16
16
  This ensures all API methods, request shapes, and response shapes are
17
- accurate and fully typed.
17
+ accurate and fully typed. Ruby cannot statically enforce literal booleans, so
18
+ the generated YARD types use `TrueClass` and `FalseClass` to document singleton
19
+ constraints.
18
20
 
19
21
  <!-- toc -->
20
22
 
data/lib/seam/request.rb CHANGED
@@ -25,6 +25,12 @@ module Seam
25
25
  }
26
26
 
27
27
  options = deep_merge(default_options, faraday_options)
28
+ options.delete("headers")
29
+ options[:headers] = merge_headers(
30
+ faraday_options[:headers] || faraday_options["headers"] || {},
31
+ auth_headers,
32
+ default_headers
33
+ )
28
34
 
29
35
  default_faraday_retry_options = {
30
36
  max: 2,
@@ -49,7 +55,6 @@ module Seam
49
55
 
50
56
  def self.default_headers
51
57
  {
52
- "User-Agent" => "seam-ruby/#{Seam::VERSION}",
53
58
  "Content-Type" => "application/json",
54
59
  :"seam-sdk-name" => "seamapi/ruby",
55
60
  :"seam-sdk-version" => Seam::VERSION
@@ -123,7 +128,23 @@ module Seam
123
128
  result
124
129
  end
125
130
 
126
- private_class_method :deep_merge
131
+ def self.merge_headers(*headers_list)
132
+ result = {}
133
+ header_keys = {}
134
+
135
+ headers_list.each do |headers|
136
+ headers.each do |key, value|
137
+ normalized_key = key.to_s.downcase
138
+ result.delete(header_keys[normalized_key]) if header_keys.key?(normalized_key)
139
+ header_keys[normalized_key] = key
140
+ result[key] = value
141
+ end
142
+ end
143
+
144
+ result
145
+ end
146
+
147
+ private_class_method :deep_merge, :merge_headers
127
148
  end
128
149
 
129
150
  module UrlSearchParamsEncoder
@@ -62,7 +62,7 @@ module Seam
62
62
  # @return [String]
63
63
  attr_accessor :error_code
64
64
  # Indicates that this is an access code error.
65
- # @return [Boolean]
65
+ # @return [TrueClass]
66
66
  attr_accessor :is_access_code_error
67
67
  # Indicates whether the error is related to [Seam Bridge](https://docs.seam.co/capability-guides/seam-bridge).
68
68
  # @return [Boolean, nil]
@@ -197,7 +197,7 @@ module Seam
197
197
  # @return [Boolean]
198
198
  attr_accessor :is_external_modification_allowed
199
199
  # Indicates whether Seam manages the access code.
200
- # @return [Boolean]
200
+ # @return [TrueClass]
201
201
  attr_accessor :is_managed
202
202
  # Indicates whether the access code is intended for use in offline scenarios. If `true`, this code can be created on a device without a network connection.
203
203
  # @return [Boolean]
@@ -135,7 +135,7 @@ module Seam
135
135
  # @return [String]
136
136
  attr_accessor :external_type_display_name
137
137
  # Indicates whether Seam manages the access group.
138
- # @return [Boolean]
138
+ # @return [TrueClass]
139
139
  attr_accessor :is_managed
140
140
  # Name of the access group.
141
141
  # @return [String]
@@ -150,7 +150,7 @@ module Seam
150
150
  # @return [Boolean, nil]
151
151
  attr_accessor :is_latest_desired_state_synced_with_provider
152
152
  # Indicates whether Seam manages the credential.
153
- # @return [Boolean]
153
+ # @return [TrueClass]
154
154
  attr_accessor :is_managed
155
155
  # Indicates whether the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) is a [multi-phone sync credential](https://docs.seam.co/capability-guides/mobile-access/issuing-mobile-credentials-from-an-access-control-system#what-are-multi-phone-sync-credentials).
156
156
  # @return [Boolean, nil]
@@ -179,7 +179,7 @@ module Seam
179
179
  # @return [String, nil]
180
180
  attr_accessor :hid_acs_system_id
181
181
  # Indicates whether Seam manages the access system user.
182
- # @return [Boolean]
182
+ # @return [TrueClass]
183
183
  attr_accessor :is_managed
184
184
  # Indicates whether the [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management) is currently [suspended](https://docs.seam.co/low-level-apis/access-systems/user-management/suspending-and-unsuspending-users).
185
185
  # @return [Boolean, nil]
@@ -1004,7 +1004,7 @@ module Seam
1004
1004
  # @return [String, nil]
1005
1005
  attr_accessor :end_date_recurrence_rule
1006
1006
  # When `true`, the start and end must fall at the same time of day (the caller picks which). Mutually exclusive with `time_pairs`.
1007
- # @return [Boolean, nil]
1007
+ # @return [TrueClass, nil]
1008
1008
  attr_accessor :matching_start_end_time
1009
1009
  # Maximum duration this option covers, as an ISO 8601 duration (for example, `PT672H` or `P367D`). Omitted when there is no maximum.
1010
1010
  # @return [String, nil]
@@ -1043,7 +1043,7 @@ module Seam
1043
1043
  # @return [String, nil]
1044
1044
  attr_accessor :end_date_recurrence_rule
1045
1045
  # When `true`, the start and end must fall at the same time of day (the caller picks which). Mutually exclusive with `time_pairs`.
1046
- # @return [Boolean, nil]
1046
+ # @return [TrueClass, nil]
1047
1047
  attr_accessor :matching_start_end_time
1048
1048
  # Maximum duration this option covers, as an ISO 8601 duration (for example, `PT672H` or `P367D`). Omitted when there is no maximum.
1049
1049
  # @return [String, nil]
@@ -1796,7 +1796,7 @@ module Seam
1796
1796
  # @return [String]
1797
1797
  attr_accessor :display_name
1798
1798
  # Indicates whether Seam manages the device. See also [Managed and Unmanaged Devices](https://docs.seam.co/core-concepts/devices/managed-and-unmanaged-devices).
1799
- # @return [Boolean]
1799
+ # @return [TrueClass]
1800
1800
  attr_accessor :is_managed
1801
1801
  # Optional nickname to describe the device, settable through Seam.
1802
1802
  # @return [String, nil]
@@ -64,7 +64,7 @@ module Seam
64
64
  # @return [String]
65
65
  attr_accessor :error_code
66
66
  # Indicates that this is an access code error.
67
- # @return [Boolean]
67
+ # @return [TrueClass]
68
68
  attr_accessor :is_access_code_error
69
69
  # Indicates whether the error is related to [Seam Bridge](https://docs.seam.co/capability-guides/seam-bridge).
70
70
  # @return [Boolean, nil]
@@ -130,10 +130,10 @@ module Seam
130
130
  # @return [String]
131
131
  attr_accessor :access_code_id
132
132
  # Indicates that Seam cannot convert this unmanaged access code to a managed access code. Some providers do not support management of unmanaged access codes through API integrations.
133
- # @return [Boolean, nil]
133
+ # @return [TrueClass, nil]
134
134
  attr_accessor :cannot_be_managed
135
135
  # Indicates that Seam cannot delete this unmanaged access code through the provider. If this access code needs to be deleted, it will only be possible from the manufacturer app.
136
- # @return [Boolean, nil]
136
+ # @return [TrueClass, nil]
137
137
  attr_accessor :cannot_delete_unmanaged_access_code
138
138
  # Code used for access. Typically, a numeric or alphanumeric string.
139
139
  # @return [String, nil]
@@ -142,7 +142,7 @@ module Seam
142
142
  # @return [String]
143
143
  attr_accessor :device_id
144
144
  # Indicates that Seam does not manage the access code.
145
- # @return [Boolean]
145
+ # @return [FalseClass]
146
146
  attr_accessor :is_managed
147
147
  # Name of the access code. Enables administrators and users to identify the access code easily, especially when there are numerous access codes. Note that the name provided on Seam is used to identify the code on Seam and is not necessarily the name that will appear in the lock provider's app or on the device. This is because lock providers may have constraints on names, such as length, uniqueness, or characters that can be used. In addition, some lock providers may break down names into components such as `first_name` and `last_name`. To provide a consistent experience, Seam identifies the code on Seam by its name but may modify the name that appears on the lock provider's app or on the device. For example, Seam may add additional characters or truncate the name to meet provider constraints. To help your users identify codes set by Seam, Seam provides the name exactly as it appears on the lock provider's app or on the device as a separate property called `appearance`. This is an object with a `name` property and, optionally, `first_name` and `last_name` properties (for providers that break down a name into components).
148
148
  # @return [String, nil]
@@ -231,7 +231,7 @@ module Seam
231
231
  # @return [String]
232
232
  attr_accessor :device_type
233
233
  # Indicates that Seam does not manage the device.
234
- # @return [Boolean]
234
+ # @return [FalseClass]
235
235
  attr_accessor :is_managed
236
236
  # Unique identifier for the Seam workspace associated with the device.
237
237
  # @return [String]
@@ -37,7 +37,7 @@ module Seam
37
37
  #
38
38
  # When converting an unmanaged access grant to managed, all associated access methods will also be converted to managed.
39
39
  # @param access_grant_id [String] ID of the unmanaged Access Grant to update.
40
- # @param is_managed [Boolean] Must be set to true to convert the unmanaged access grant to managed.
40
+ # @param is_managed [TrueClass] Must be set to true to convert the unmanaged access grant to managed.
41
41
  # @param access_grant_key [String, nil] Unique key for the access grant. If not provided, the existing key will be preserved.
42
42
  # @return [nil] OK
43
43
  def update(access_grant_id:, is_managed:, access_grant_key: nil)
@@ -53,7 +53,7 @@ module Seam
53
53
  # An unmanaged device has a limited set of visible properties and a subset of supported events. You cannot control an unmanaged device. Any [access codes](https://docs.seam.co/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes) on an unmanaged device are unmanaged. To control an unmanaged device with Seam, [convert it to a managed device](https://docs.seam.co/core-concepts/devices/managed-and-unmanaged-devices#convert-an-unmanaged-device-to-managed).
54
54
  # @param device_id [String] ID of the unmanaged device that you want to update.
55
55
  # @param custom_metadata [Hash, nil] Custom metadata that you want to associate with the device. Supports up to 50 JSON key:value pairs.
56
- # @param is_managed [Boolean, nil] Indicates whether the device is managed. Set this parameter to `true` to convert an unmanaged device to managed.
56
+ # @param is_managed [TrueClass, nil] Indicates whether the device is managed. Set this parameter to `true` to convert an unmanaged device to managed.
57
57
  # @return [nil] OK
58
58
  def update(device_id:, custom_metadata: nil, is_managed: nil)
59
59
  @client.patch("/devices/unmanaged/update", {device_id: device_id, custom_metadata: custom_metadata, is_managed: is_managed}.compact)
@@ -32,7 +32,7 @@ module Seam
32
32
  # Updates an unmanaged [user identity](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) to make it managed.
33
33
  #
34
34
  # This endpoint can only be used to convert unmanaged user identities to managed ones by setting `is_managed` to `true`. It cannot be used to convert managed user identities back to unmanaged.
35
- # @param is_managed [Boolean] Must be set to true to convert the unmanaged user identity to managed.
35
+ # @param is_managed [TrueClass] Must be set to true to convert the unmanaged user identity to managed.
36
36
  # @param user_identity_id [String] ID of the unmanaged user identity that you want to update.
37
37
  # @param user_identity_key [String, nil] Unique key for the user identity. If not provided, the existing key will be preserved.
38
38
  # @return [nil] OK
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.141.1"
4
+ VERSION = "2.142.0"
5
5
  end
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.141.1
4
+ version: 2.142.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Seam Labs, Inc.
@@ -57,14 +57,14 @@ dependencies:
57
57
  requirements:
58
58
  - - "~>"
59
59
  - !ruby/object:Gem::Version
60
- version: '2.0'
60
+ version: '4.0'
61
61
  type: :development
62
62
  prerelease: false
63
63
  version_requirements: !ruby/object:Gem::Requirement
64
64
  requirements:
65
65
  - - "~>"
66
66
  - !ruby/object:Gem::Version
67
- version: '2.0'
67
+ version: '4.0'
68
68
  - !ruby/object:Gem::Dependency
69
69
  name: gem-release
70
70
  requirement: !ruby/object:Gem::Requirement