userplex 0.10.0 → 0.11.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: e502616a2af232f8ae57aed98a20b63cbb2692c63d605b767daa98c405ae1f79
4
- data.tar.gz: 4f0c7af74f7ef8360334bab9b3f95b080017fc54ed8bcf048aec0f9713f55b57
3
+ metadata.gz: d1ff9fa78fe9bab439ced86e294ad900179c8ca864d53b5042ebda75261e45bf
4
+ data.tar.gz: d715f5b46e3494c94d9c4abcc729eb8e0a2a640a98ad6e34bcfd5dce11e34607
5
5
  SHA512:
6
- metadata.gz: 4f81a8ae1df9d5dc2dbacdd9b4fedb8f92d452c5dd51dfd6b573d7e130ef084876a66b33831a9687a0b95434fbb9bee627aa988a5b70fb462cae15b8e17197ef
7
- data.tar.gz: 9a231d973f6c51f82982fc6daf5c82c30a7eb9609c543f454c9358e41953b904f050a1d28ade6285f125eaaed8708ea3e9bdd55fb53b1c98e2dc03db5d8b62c0
6
+ metadata.gz: 451247a5b266118ea1f67826480633c7c549d47151681d840adeebb9d29b177b527a7a91cfceeefa8493b7da996f823cf407d89c77fd38ab91c5cf6cf2d15c2e
7
+ data.tar.gz: 64f49652f7cb2217d3256da89643ab3419409f01c21c87304ad8a47d286478fb68e64d29ff565e3e262aadeda16f3cfa52205b53660caa08a15c330833f4e3c7
data/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.11.0 (2026-01-05)
4
+
5
+ Full Changelog: [v0.10.0...v0.11.0](https://github.com/dqnamo/userplex-ruby/compare/v0.10.0...v0.11.0)
6
+
7
+ ### Features
8
+
9
+ * **api:** api update ([e7e23ad](https://github.com/dqnamo/userplex-ruby/commit/e7e23ad63d420e5dc212eace5eef1908f2c0f761))
10
+
3
11
  ## 0.10.0 (2025-12-23)
4
12
 
5
13
  Full Changelog: [v0.9.0...v0.10.0](https://github.com/dqnamo/userplex-ruby/compare/v0.9.0...v0.10.0)
data/README.md CHANGED
@@ -15,7 +15,7 @@ To use this gem, install via Bundler by adding the following to your application
15
15
  <!-- x-release-please-start-version -->
16
16
 
17
17
  ```ruby
18
- gem "userplex", "~> 0.10.0"
18
+ gem "userplex", "~> 0.11.0"
19
19
  ```
20
20
 
21
21
  <!-- x-release-please-end -->
@@ -26,9 +26,7 @@ gem "userplex", "~> 0.10.0"
26
26
  require "bundler/setup"
27
27
  require "userplex"
28
28
 
29
- userplex = Userplex::Client.new(
30
- api_key: ENV["USERPLEX_API_KEY"] # This is the default and can be omitted
31
- )
29
+ userplex = Userplex::Client.new(api_key: "My API Key")
32
30
 
33
31
  response = userplex.logs.new(name: "REPLACE_ME")
34
32
 
@@ -80,7 +78,8 @@ You can use the `max_retries` option to configure or disable this:
80
78
  ```ruby
81
79
  # Configure the default for all requests:
82
80
  userplex = Userplex::Client.new(
83
- max_retries: 0 # default is 2
81
+ max_retries: 0, # default is 2
82
+ api_key: "My API Key"
84
83
  )
85
84
 
86
85
  # Or, configure per-request:
@@ -94,7 +93,8 @@ By default, requests will time out after 60 seconds. You can use the timeout opt
94
93
  ```ruby
95
94
  # Configure the default for all requests:
96
95
  userplex = Userplex::Client.new(
97
- timeout: nil # default is 60
96
+ timeout: nil, # default is 60
97
+ api_key: "My API Key"
98
98
  )
99
99
 
100
100
  # Or, configure per-request:
@@ -25,15 +25,6 @@ module Userplex
25
25
  # @return [Userplex::Resources::Logs]
26
26
  attr_reader :logs
27
27
 
28
- # @api private
29
- #
30
- # @return [Hash{String=>String}]
31
- private def auth_headers
32
- return {} if @api_key.nil?
33
-
34
- {"authorization" => "Bearer #{@api_key}"}
35
- end
36
-
37
28
  # Creates and returns a new client for interacting with the API.
38
29
  #
39
30
  # @param api_key [String, nil] Enter your API key from your project settings Defaults to
@@ -215,11 +215,6 @@ module Userplex
215
215
  @max_retry_delay = max_retry_delay
216
216
  end
217
217
 
218
- # @api private
219
- #
220
- # @return [Hash{String=>String}]
221
- private def auth_headers = {}
222
-
223
218
  # @api private
224
219
  #
225
220
  # @return [String]
@@ -276,7 +271,6 @@ module Userplex
276
271
 
277
272
  headers = Userplex::Internal::Util.normalized_headers(
278
273
  @headers,
279
- auth_headers,
280
274
  req[:headers].to_h,
281
275
  opts[:extra_headers].to_h
282
276
  )
@@ -28,8 +28,8 @@ module Userplex
28
28
  # @!attribute data
29
29
  # Additional log data
30
30
  #
31
- # @return [Hash{Symbol=>Object}, nil]
32
- optional :data, Userplex::Internal::Type::HashOf[Userplex::Internal::Type::Unknown]
31
+ # @return [Hash{Symbol=>Object, nil}, nil]
32
+ optional :data, Userplex::Internal::Type::HashOf[Userplex::Internal::Type::Unknown, nil?: true]
33
33
 
34
34
  # @!attribute timestamp
35
35
  # Log timestamp (ISO 8601)
@@ -46,7 +46,7 @@ module Userplex
46
46
  # @!method initialize(name:, data: nil, timestamp: nil, user_id: nil)
47
47
  # @param name [String] Log name
48
48
  #
49
- # @param data [Hash{Symbol=>Object}] Additional log data
49
+ # @param data [Hash{Symbol=>Object, nil}] Additional log data
50
50
  #
51
51
  # @param timestamp [Time] Log timestamp (ISO 8601)
52
52
  #
@@ -16,8 +16,8 @@ module Userplex
16
16
  # @!attribute data
17
17
  # Additional log data
18
18
  #
19
- # @return [Hash{Symbol=>Object}, nil]
20
- optional :data, Userplex::Internal::Type::HashOf[Userplex::Internal::Type::Unknown]
19
+ # @return [Hash{Symbol=>Object, nil}, nil]
20
+ optional :data, Userplex::Internal::Type::HashOf[Userplex::Internal::Type::Unknown, nil?: true]
21
21
 
22
22
  # @!attribute timestamp
23
23
  # Log timestamp (ISO 8601)
@@ -34,7 +34,7 @@ module Userplex
34
34
  # @!method initialize(name:, data: nil, timestamp: nil, user_id: nil, request_options: {})
35
35
  # @param name [String] Log name
36
36
  #
37
- # @param data [Hash{Symbol=>Object}] Additional log data
37
+ # @param data [Hash{Symbol=>Object, nil}] Additional log data
38
38
  #
39
39
  # @param timestamp [Time] Log timestamp (ISO 8601)
40
40
  #
@@ -16,8 +16,8 @@ module Userplex
16
16
  # @!attribute attributes
17
17
  # Additional user attributes
18
18
  #
19
- # @return [Hash{Symbol=>Object}, nil]
20
- optional :attributes, Userplex::Internal::Type::HashOf[Userplex::Internal::Type::Unknown]
19
+ # @return [Hash{Symbol=>Object, nil}, nil]
20
+ optional :attributes, Userplex::Internal::Type::HashOf[Userplex::Internal::Type::Unknown, nil?: true]
21
21
 
22
22
  # @!attribute email
23
23
  # User email
@@ -34,7 +34,7 @@ module Userplex
34
34
  # @!method initialize(user_id:, attributes: nil, email: nil, name: nil, request_options: {})
35
35
  # @param user_id [String] External user ID
36
36
  #
37
- # @param attributes [Hash{Symbol=>Object}] Additional user attributes
37
+ # @param attributes [Hash{Symbol=>Object, nil}] Additional user attributes
38
38
  #
39
39
  # @param email [String] User email
40
40
  #
@@ -27,7 +27,7 @@ module Userplex
27
27
  #
28
28
  # @param name [String] Log name
29
29
  #
30
- # @param data [Hash{Symbol=>Object}] Additional log data
30
+ # @param data [Hash{Symbol=>Object, nil}] Additional log data
31
31
  #
32
32
  # @param timestamp [Time] Log timestamp (ISO 8601)
33
33
  #
@@ -7,7 +7,7 @@ module Userplex
7
7
  #
8
8
  # @param user_id [String] External user ID
9
9
  #
10
- # @param attributes [Hash{Symbol=>Object}] Additional user attributes
10
+ # @param attributes [Hash{Symbol=>Object, nil}] Additional user attributes
11
11
  #
12
12
  # @param email [String] User email
13
13
  #
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Userplex
4
- VERSION = "0.10.0"
4
+ VERSION = "0.11.0"
5
5
  end
@@ -20,11 +20,6 @@ module Userplex
20
20
  sig { returns(Userplex::Resources::Logs) }
21
21
  attr_reader :logs
22
22
 
23
- # @api private
24
- sig { override.returns(T::Hash[String, String]) }
25
- private def auth_headers
26
- end
27
-
28
23
  # Creates and returns a new client for interacting with the API.
29
24
  sig do
30
25
  params(
@@ -171,11 +171,6 @@ module Userplex
171
171
  )
172
172
  end
173
173
 
174
- # @api private
175
- sig { overridable.returns(T::Hash[String, String]) }
176
- private def auth_headers
177
- end
178
-
179
174
  # @api private
180
175
  sig { returns(String) }
181
176
  private def user_agent
@@ -55,10 +55,10 @@ module Userplex
55
55
  attr_accessor :name
56
56
 
57
57
  # Additional log data
58
- sig { returns(T.nilable(T::Hash[Symbol, T.anything])) }
58
+ sig { returns(T.nilable(T::Hash[Symbol, T.nilable(T.anything)])) }
59
59
  attr_reader :data
60
60
 
61
- sig { params(data: T::Hash[Symbol, T.anything]).void }
61
+ sig { params(data: T::Hash[Symbol, T.nilable(T.anything)]).void }
62
62
  attr_writer :data
63
63
 
64
64
  # Log timestamp (ISO 8601)
@@ -78,7 +78,7 @@ module Userplex
78
78
  sig do
79
79
  params(
80
80
  name: String,
81
- data: T::Hash[Symbol, T.anything],
81
+ data: T::Hash[Symbol, T.nilable(T.anything)],
82
82
  timestamp: Time,
83
83
  user_id: String
84
84
  ).returns(T.attached_class)
@@ -99,7 +99,7 @@ module Userplex
99
99
  override.returns(
100
100
  {
101
101
  name: String,
102
- data: T::Hash[Symbol, T.anything],
102
+ data: T::Hash[Symbol, T.nilable(T.anything)],
103
103
  timestamp: Time,
104
104
  user_id: String
105
105
  }
@@ -16,10 +16,10 @@ module Userplex
16
16
  attr_accessor :name
17
17
 
18
18
  # Additional log data
19
- sig { returns(T.nilable(T::Hash[Symbol, T.anything])) }
19
+ sig { returns(T.nilable(T::Hash[Symbol, T.nilable(T.anything)])) }
20
20
  attr_reader :data
21
21
 
22
- sig { params(data: T::Hash[Symbol, T.anything]).void }
22
+ sig { params(data: T::Hash[Symbol, T.nilable(T.anything)]).void }
23
23
  attr_writer :data
24
24
 
25
25
  # Log timestamp (ISO 8601)
@@ -39,7 +39,7 @@ module Userplex
39
39
  sig do
40
40
  params(
41
41
  name: String,
42
- data: T::Hash[Symbol, T.anything],
42
+ data: T::Hash[Symbol, T.nilable(T.anything)],
43
43
  timestamp: Time,
44
44
  user_id: String,
45
45
  request_options: Userplex::RequestOptions::OrHash
@@ -62,7 +62,7 @@ module Userplex
62
62
  override.returns(
63
63
  {
64
64
  name: String,
65
- data: T::Hash[Symbol, T.anything],
65
+ data: T::Hash[Symbol, T.nilable(T.anything)],
66
66
  timestamp: Time,
67
67
  user_id: String,
68
68
  request_options: Userplex::RequestOptions
@@ -16,10 +16,10 @@ module Userplex
16
16
  attr_accessor :user_id
17
17
 
18
18
  # Additional user attributes
19
- sig { returns(T.nilable(T::Hash[Symbol, T.anything])) }
19
+ sig { returns(T.nilable(T::Hash[Symbol, T.nilable(T.anything)])) }
20
20
  attr_reader :attributes
21
21
 
22
- sig { params(attributes: T::Hash[Symbol, T.anything]).void }
22
+ sig { params(attributes: T::Hash[Symbol, T.nilable(T.anything)]).void }
23
23
  attr_writer :attributes
24
24
 
25
25
  # User email
@@ -39,7 +39,7 @@ module Userplex
39
39
  sig do
40
40
  params(
41
41
  user_id: String,
42
- attributes: T::Hash[Symbol, T.anything],
42
+ attributes: T::Hash[Symbol, T.nilable(T.anything)],
43
43
  email: String,
44
44
  name: String,
45
45
  request_options: Userplex::RequestOptions::OrHash
@@ -62,7 +62,7 @@ module Userplex
62
62
  override.returns(
63
63
  {
64
64
  user_id: String,
65
- attributes: T::Hash[Symbol, T.anything],
65
+ attributes: T::Hash[Symbol, T.nilable(T.anything)],
66
66
  email: String,
67
67
  name: String,
68
68
  request_options: Userplex::RequestOptions
@@ -19,7 +19,7 @@ module Userplex
19
19
  sig do
20
20
  params(
21
21
  name: String,
22
- data: T::Hash[Symbol, T.anything],
22
+ data: T::Hash[Symbol, T.nilable(T.anything)],
23
23
  timestamp: Time,
24
24
  user_id: String,
25
25
  request_options: Userplex::RequestOptions::OrHash
@@ -6,7 +6,7 @@ module Userplex
6
6
  sig do
7
7
  params(
8
8
  user_id: String,
9
- attributes: T::Hash[Symbol, T.anything],
9
+ attributes: T::Hash[Symbol, T.nilable(T.anything)],
10
10
  email: String,
11
11
  name: String,
12
12
  request_options: Userplex::RequestOptions::OrHash
@@ -14,8 +14,6 @@ module Userplex
14
14
 
15
15
  attr_reader logs: Userplex::Resources::Logs
16
16
 
17
- private def auth_headers: -> ::Hash[String, String]
18
-
19
17
  def initialize: (
20
18
  ?api_key: String?,
21
19
  ?base_url: String?,
@@ -85,8 +85,6 @@ module Userplex
85
85
  ?idempotency_header: String?
86
86
  ) -> void
87
87
 
88
- private def auth_headers: -> ::Hash[String, String]
89
-
90
88
  private def user_agent: -> String
91
89
 
92
90
  private def generate_idempotency_key: -> String
@@ -27,7 +27,7 @@ module Userplex
27
27
  type body =
28
28
  {
29
29
  name: String,
30
- data: ::Hash[Symbol, top],
30
+ data: ::Hash[Symbol, top?],
31
31
  timestamp: Time,
32
32
  user_id: String
33
33
  }
@@ -35,9 +35,9 @@ module Userplex
35
35
  class Body < Userplex::Internal::Type::BaseModel
36
36
  attr_accessor name: String
37
37
 
38
- attr_reader data: ::Hash[Symbol, top]?
38
+ attr_reader data: ::Hash[Symbol, top?]?
39
39
 
40
- def data=: (::Hash[Symbol, top]) -> ::Hash[Symbol, top]
40
+ def data=: (::Hash[Symbol, top?]) -> ::Hash[Symbol, top?]
41
41
 
42
42
  attr_reader timestamp: Time?
43
43
 
@@ -49,14 +49,14 @@ module Userplex
49
49
 
50
50
  def initialize: (
51
51
  name: String,
52
- ?data: ::Hash[Symbol, top],
52
+ ?data: ::Hash[Symbol, top?],
53
53
  ?timestamp: Time,
54
54
  ?user_id: String
55
55
  ) -> void
56
56
 
57
57
  def to_hash: -> {
58
58
  name: String,
59
- data: ::Hash[Symbol, top],
59
+ data: ::Hash[Symbol, top?],
60
60
  timestamp: Time,
61
61
  user_id: String
62
62
  }
@@ -3,7 +3,7 @@ module Userplex
3
3
  type log_new_params =
4
4
  {
5
5
  name: String,
6
- data: ::Hash[Symbol, top],
6
+ data: ::Hash[Symbol, top?],
7
7
  timestamp: Time,
8
8
  user_id: String
9
9
  }
@@ -15,9 +15,9 @@ module Userplex
15
15
 
16
16
  attr_accessor name: String
17
17
 
18
- attr_reader data: ::Hash[Symbol, top]?
18
+ attr_reader data: ::Hash[Symbol, top?]?
19
19
 
20
- def data=: (::Hash[Symbol, top]) -> ::Hash[Symbol, top]
20
+ def data=: (::Hash[Symbol, top?]) -> ::Hash[Symbol, top?]
21
21
 
22
22
  attr_reader timestamp: Time?
23
23
 
@@ -29,7 +29,7 @@ module Userplex
29
29
 
30
30
  def initialize: (
31
31
  name: String,
32
- ?data: ::Hash[Symbol, top],
32
+ ?data: ::Hash[Symbol, top?],
33
33
  ?timestamp: Time,
34
34
  ?user_id: String,
35
35
  ?request_options: Userplex::request_opts
@@ -37,7 +37,7 @@ module Userplex
37
37
 
38
38
  def to_hash: -> {
39
39
  name: String,
40
- data: ::Hash[Symbol, top],
40
+ data: ::Hash[Symbol, top?],
41
41
  timestamp: Time,
42
42
  user_id: String,
43
43
  request_options: Userplex::RequestOptions
@@ -3,7 +3,7 @@ module Userplex
3
3
  type user_identify_params =
4
4
  {
5
5
  user_id: String,
6
- attributes: ::Hash[Symbol, top],
6
+ attributes: ::Hash[Symbol, top?],
7
7
  email: String,
8
8
  name: String
9
9
  }
@@ -15,9 +15,9 @@ module Userplex
15
15
 
16
16
  attr_accessor user_id: String
17
17
 
18
- attr_reader attributes: ::Hash[Symbol, top]?
18
+ attr_reader attributes: ::Hash[Symbol, top?]?
19
19
 
20
- def attributes=: (::Hash[Symbol, top]) -> ::Hash[Symbol, top]
20
+ def attributes=: (::Hash[Symbol, top?]) -> ::Hash[Symbol, top?]
21
21
 
22
22
  attr_reader email: String?
23
23
 
@@ -29,7 +29,7 @@ module Userplex
29
29
 
30
30
  def initialize: (
31
31
  user_id: String,
32
- ?attributes: ::Hash[Symbol, top],
32
+ ?attributes: ::Hash[Symbol, top?],
33
33
  ?email: String,
34
34
  ?name: String,
35
35
  ?request_options: Userplex::request_opts
@@ -37,7 +37,7 @@ module Userplex
37
37
 
38
38
  def to_hash: -> {
39
39
  user_id: String,
40
- attributes: ::Hash[Symbol, top],
40
+ attributes: ::Hash[Symbol, top?],
41
41
  email: String,
42
42
  name: String,
43
43
  request_options: Userplex::RequestOptions
@@ -8,7 +8,7 @@ module Userplex
8
8
 
9
9
  def new: (
10
10
  name: String,
11
- ?data: ::Hash[Symbol, top],
11
+ ?data: ::Hash[Symbol, top?],
12
12
  ?timestamp: Time,
13
13
  ?user_id: String,
14
14
  ?request_options: Userplex::request_opts
@@ -3,7 +3,7 @@ module Userplex
3
3
  class Users
4
4
  def identify: (
5
5
  user_id: String,
6
- ?attributes: ::Hash[Symbol, top],
6
+ ?attributes: ::Hash[Symbol, top?],
7
7
  ?email: String,
8
8
  ?name: String,
9
9
  ?request_options: Userplex::request_opts
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: userplex
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.0
4
+ version: 0.11.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Userplex
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-12-23 00:00:00.000000000 Z
11
+ date: 2026-01-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: connection_pool