userplex 0.10.0 → 0.12.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 +4 -4
- data/CHANGELOG.md +16 -0
- data/README.md +6 -6
- data/lib/userplex/client.rb +0 -9
- data/lib/userplex/internal/transport/base_client.rb +0 -6
- data/lib/userplex/models/log_batch_params.rb +7 -16
- data/lib/userplex/models/log_new_params.rb +6 -14
- data/lib/userplex/models/user_identify_params.rb +6 -14
- data/lib/userplex/resources/logs.rb +9 -10
- data/lib/userplex/resources/users.rb +6 -8
- data/lib/userplex/version.rb +1 -1
- data/rbi/userplex/client.rbi +0 -5
- data/rbi/userplex/internal/transport/base_client.rbi +0 -5
- data/rbi/userplex/models/log_batch_params.rbi +6 -24
- data/rbi/userplex/models/log_new_params.rbi +4 -12
- data/rbi/userplex/models/user_identify_params.rbi +4 -12
- data/rbi/userplex/resources/logs.rbi +4 -10
- data/rbi/userplex/resources/users.rbi +2 -5
- data/sig/userplex/client.rbs +0 -2
- data/sig/userplex/internal/transport/base_client.rbs +0 -2
- data/sig/userplex/models/log_batch_params.rbs +5 -5
- data/sig/userplex/models/log_new_params.rbs +5 -5
- data/sig/userplex/models/user_identify_params.rbs +5 -5
- data/sig/userplex/resources/logs.rbs +1 -1
- data/sig/userplex/resources/users.rbs +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: bd4c5dfdb8eea954c9f5a7517f3a2c719ec7015f56efc08b81716533cee08451
|
|
4
|
+
data.tar.gz: 20d04d2dfc5c48fbce746242398ae5a0c5a4241e5cd55b23811662c8c031d7dd
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e6d4add5dc68ad83fc9cd76c9de3318e6137e29820d58ed612407dd474f68c58d5a77616809b1147aee251297850e4b49cb861ae086973aba3701583916bf3a4
|
|
7
|
+
data.tar.gz: 7f7de2dc2aa9e00184a332ebf7e057f0a3078b237dde7eb5a2164c164831450f8c928fe7134092af79eb0f863c6a8d75fa58becf8680767deaa877fbdc466596
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.12.0 (2026-01-05)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v0.11.0...v0.12.0](https://github.com/dqnamo/userplex-ruby/compare/v0.11.0...v0.12.0)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* **api:** api update ([364f01a](https://github.com/dqnamo/userplex-ruby/commit/364f01a66b2d7d990281687b5104b1ce796b692d))
|
|
10
|
+
|
|
11
|
+
## 0.11.0 (2026-01-05)
|
|
12
|
+
|
|
13
|
+
Full Changelog: [v0.10.0...v0.11.0](https://github.com/dqnamo/userplex-ruby/compare/v0.10.0...v0.11.0)
|
|
14
|
+
|
|
15
|
+
### Features
|
|
16
|
+
|
|
17
|
+
* **api:** api update ([e7e23ad](https://github.com/dqnamo/userplex-ruby/commit/e7e23ad63d420e5dc212eace5eef1908f2c0f761))
|
|
18
|
+
|
|
3
19
|
## 0.10.0 (2025-12-23)
|
|
4
20
|
|
|
5
21
|
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.
|
|
18
|
+
gem "userplex", "~> 0.12.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:
|
data/lib/userplex/client.rb
CHANGED
|
@@ -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
|
)
|
|
@@ -8,49 +8,40 @@ module Userplex
|
|
|
8
8
|
include Userplex::Internal::Type::RequestParameters
|
|
9
9
|
|
|
10
10
|
# @!attribute body
|
|
11
|
-
# A list of logs to ingest
|
|
12
11
|
#
|
|
13
12
|
# @return [Array<Userplex::Models::LogBatchParams::Body>, nil]
|
|
14
13
|
optional :body, -> { Userplex::Internal::Type::ArrayOf[Userplex::LogBatchParams::Body] }
|
|
15
14
|
|
|
16
15
|
# @!method initialize(body: nil, request_options: {})
|
|
17
|
-
# @param body [Array<Userplex::Models::LogBatchParams::Body>]
|
|
18
|
-
#
|
|
16
|
+
# @param body [Array<Userplex::Models::LogBatchParams::Body>]
|
|
19
17
|
# @param request_options [Userplex::RequestOptions, Hash{Symbol=>Object}]
|
|
20
18
|
|
|
21
19
|
class Body < Userplex::Internal::Type::BaseModel
|
|
22
20
|
# @!attribute name
|
|
23
|
-
# Log name
|
|
24
21
|
#
|
|
25
22
|
# @return [String]
|
|
26
23
|
required :name, String
|
|
27
24
|
|
|
28
25
|
# @!attribute data
|
|
29
|
-
# Additional log data
|
|
30
26
|
#
|
|
31
|
-
# @return [Hash{Symbol=>Object}, nil]
|
|
32
|
-
optional :data, Userplex::Internal::Type::HashOf[Userplex::Internal::Type::Unknown]
|
|
27
|
+
# @return [Hash{Symbol=>Object, nil}, nil]
|
|
28
|
+
optional :data, Userplex::Internal::Type::HashOf[Userplex::Internal::Type::Unknown, nil?: true]
|
|
33
29
|
|
|
34
30
|
# @!attribute timestamp
|
|
35
|
-
# Log timestamp (ISO 8601)
|
|
36
31
|
#
|
|
37
32
|
# @return [Time, nil]
|
|
38
33
|
optional :timestamp, Time
|
|
39
34
|
|
|
40
35
|
# @!attribute user_id
|
|
41
|
-
# External user ID
|
|
42
36
|
#
|
|
43
37
|
# @return [String, nil]
|
|
44
38
|
optional :user_id, String
|
|
45
39
|
|
|
46
40
|
# @!method initialize(name:, data: nil, timestamp: nil, user_id: nil)
|
|
47
|
-
# @param name [String]
|
|
48
|
-
#
|
|
49
|
-
# @param
|
|
50
|
-
#
|
|
51
|
-
# @param timestamp [Time] Log timestamp (ISO 8601)
|
|
52
|
-
#
|
|
53
|
-
# @param user_id [String] External user ID
|
|
41
|
+
# @param name [String]
|
|
42
|
+
# @param data [Hash{Symbol=>Object, nil}]
|
|
43
|
+
# @param timestamp [Time]
|
|
44
|
+
# @param user_id [String]
|
|
54
45
|
end
|
|
55
46
|
end
|
|
56
47
|
end
|
|
@@ -8,38 +8,30 @@ module Userplex
|
|
|
8
8
|
include Userplex::Internal::Type::RequestParameters
|
|
9
9
|
|
|
10
10
|
# @!attribute name
|
|
11
|
-
# Log name
|
|
12
11
|
#
|
|
13
12
|
# @return [String]
|
|
14
13
|
required :name, String
|
|
15
14
|
|
|
16
15
|
# @!attribute data
|
|
17
|
-
# Additional log data
|
|
18
16
|
#
|
|
19
|
-
# @return [Hash{Symbol=>Object}, nil]
|
|
20
|
-
optional :data, Userplex::Internal::Type::HashOf[Userplex::Internal::Type::Unknown]
|
|
17
|
+
# @return [Hash{Symbol=>Object, nil}, nil]
|
|
18
|
+
optional :data, Userplex::Internal::Type::HashOf[Userplex::Internal::Type::Unknown, nil?: true]
|
|
21
19
|
|
|
22
20
|
# @!attribute timestamp
|
|
23
|
-
# Log timestamp (ISO 8601)
|
|
24
21
|
#
|
|
25
22
|
# @return [Time, nil]
|
|
26
23
|
optional :timestamp, Time
|
|
27
24
|
|
|
28
25
|
# @!attribute user_id
|
|
29
|
-
# External user ID
|
|
30
26
|
#
|
|
31
27
|
# @return [String, nil]
|
|
32
28
|
optional :user_id, String
|
|
33
29
|
|
|
34
30
|
# @!method initialize(name:, data: nil, timestamp: nil, user_id: nil, request_options: {})
|
|
35
|
-
# @param name [String]
|
|
36
|
-
#
|
|
37
|
-
# @param
|
|
38
|
-
#
|
|
39
|
-
# @param timestamp [Time] Log timestamp (ISO 8601)
|
|
40
|
-
#
|
|
41
|
-
# @param user_id [String] External user ID
|
|
42
|
-
#
|
|
31
|
+
# @param name [String]
|
|
32
|
+
# @param data [Hash{Symbol=>Object, nil}]
|
|
33
|
+
# @param timestamp [Time]
|
|
34
|
+
# @param user_id [String]
|
|
43
35
|
# @param request_options [Userplex::RequestOptions, Hash{Symbol=>Object}]
|
|
44
36
|
end
|
|
45
37
|
end
|
|
@@ -8,38 +8,30 @@ module Userplex
|
|
|
8
8
|
include Userplex::Internal::Type::RequestParameters
|
|
9
9
|
|
|
10
10
|
# @!attribute user_id
|
|
11
|
-
# External user ID
|
|
12
11
|
#
|
|
13
12
|
# @return [String]
|
|
14
13
|
required :user_id, String
|
|
15
14
|
|
|
16
15
|
# @!attribute attributes
|
|
17
|
-
# Additional user attributes
|
|
18
16
|
#
|
|
19
|
-
# @return [Hash{Symbol=>Object}, nil]
|
|
20
|
-
optional :attributes, Userplex::Internal::Type::HashOf[Userplex::Internal::Type::Unknown]
|
|
17
|
+
# @return [Hash{Symbol=>Object, nil}, nil]
|
|
18
|
+
optional :attributes, Userplex::Internal::Type::HashOf[Userplex::Internal::Type::Unknown, nil?: true]
|
|
21
19
|
|
|
22
20
|
# @!attribute email
|
|
23
|
-
# User email
|
|
24
21
|
#
|
|
25
22
|
# @return [String, nil]
|
|
26
23
|
optional :email, String
|
|
27
24
|
|
|
28
25
|
# @!attribute name
|
|
29
|
-
# User name
|
|
30
26
|
#
|
|
31
27
|
# @return [String, nil]
|
|
32
28
|
optional :name, String
|
|
33
29
|
|
|
34
30
|
# @!method initialize(user_id:, attributes: nil, email: nil, name: nil, request_options: {})
|
|
35
|
-
# @param user_id [String]
|
|
36
|
-
#
|
|
37
|
-
# @param
|
|
38
|
-
#
|
|
39
|
-
# @param email [String] User email
|
|
40
|
-
#
|
|
41
|
-
# @param name [String] User name
|
|
42
|
-
#
|
|
31
|
+
# @param user_id [String]
|
|
32
|
+
# @param attributes [Hash{Symbol=>Object, nil}]
|
|
33
|
+
# @param email [String]
|
|
34
|
+
# @param name [String]
|
|
43
35
|
# @param request_options [Userplex::RequestOptions, Hash{Symbol=>Object}]
|
|
44
36
|
end
|
|
45
37
|
end
|
|
@@ -3,10 +3,11 @@
|
|
|
3
3
|
module Userplex
|
|
4
4
|
module Resources
|
|
5
5
|
class Logs
|
|
6
|
-
#
|
|
6
|
+
# Log multiple events
|
|
7
7
|
#
|
|
8
|
-
# @
|
|
8
|
+
# @overload batch(body: nil, request_options: {})
|
|
9
9
|
#
|
|
10
|
+
# @param body [Array<Userplex::Models::LogBatchParams::Body>]
|
|
10
11
|
# @param request_options [Userplex::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
11
12
|
#
|
|
12
13
|
# @return [Userplex::Models::LogBatchResponse]
|
|
@@ -23,16 +24,14 @@ module Userplex
|
|
|
23
24
|
)
|
|
24
25
|
end
|
|
25
26
|
|
|
26
|
-
#
|
|
27
|
-
#
|
|
28
|
-
# @param name [String] Log name
|
|
27
|
+
# Log a single event
|
|
29
28
|
#
|
|
30
|
-
# @
|
|
31
|
-
#
|
|
32
|
-
# @param timestamp [Time] Log timestamp (ISO 8601)
|
|
33
|
-
#
|
|
34
|
-
# @param user_id [String] External user ID
|
|
29
|
+
# @overload new(name:, data: nil, timestamp: nil, user_id: nil, request_options: {})
|
|
35
30
|
#
|
|
31
|
+
# @param name [String]
|
|
32
|
+
# @param data [Hash{Symbol=>Object, nil}]
|
|
33
|
+
# @param timestamp [Time]
|
|
34
|
+
# @param user_id [String]
|
|
36
35
|
# @param request_options [Userplex::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
37
36
|
#
|
|
38
37
|
# @return [Userplex::Models::LogNewResponse]
|
|
@@ -3,16 +3,14 @@
|
|
|
3
3
|
module Userplex
|
|
4
4
|
module Resources
|
|
5
5
|
class Users
|
|
6
|
-
#
|
|
7
|
-
#
|
|
8
|
-
# @param user_id [String] External user ID
|
|
9
|
-
#
|
|
10
|
-
# @param attributes [Hash{Symbol=>Object}] Additional user attributes
|
|
6
|
+
# Identify a user
|
|
11
7
|
#
|
|
12
|
-
# @
|
|
13
|
-
#
|
|
14
|
-
# @param name [String] User name
|
|
8
|
+
# @overload identify(user_id:, attributes: nil, email: nil, name: nil, request_options: {})
|
|
15
9
|
#
|
|
10
|
+
# @param user_id [String]
|
|
11
|
+
# @param attributes [Hash{Symbol=>Object, nil}]
|
|
12
|
+
# @param email [String]
|
|
13
|
+
# @param name [String]
|
|
16
14
|
# @param request_options [Userplex::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
17
15
|
#
|
|
18
16
|
# @return [Userplex::Models::UserIdentifyResponse]
|
data/lib/userplex/version.rb
CHANGED
data/rbi/userplex/client.rbi
CHANGED
|
@@ -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(
|
|
@@ -11,7 +11,6 @@ module Userplex
|
|
|
11
11
|
T.any(Userplex::LogBatchParams, Userplex::Internal::AnyHash)
|
|
12
12
|
end
|
|
13
13
|
|
|
14
|
-
# A list of logs to ingest
|
|
15
14
|
sig { returns(T.nilable(T::Array[Userplex::LogBatchParams::Body])) }
|
|
16
15
|
attr_reader :body
|
|
17
16
|
|
|
@@ -26,11 +25,7 @@ module Userplex
|
|
|
26
25
|
request_options: Userplex::RequestOptions::OrHash
|
|
27
26
|
).returns(T.attached_class)
|
|
28
27
|
end
|
|
29
|
-
def self.new(
|
|
30
|
-
# A list of logs to ingest
|
|
31
|
-
body: nil,
|
|
32
|
-
request_options: {}
|
|
33
|
-
)
|
|
28
|
+
def self.new(body: nil, request_options: {})
|
|
34
29
|
end
|
|
35
30
|
|
|
36
31
|
sig do
|
|
@@ -50,25 +45,21 @@ module Userplex
|
|
|
50
45
|
T.any(Userplex::LogBatchParams::Body, Userplex::Internal::AnyHash)
|
|
51
46
|
end
|
|
52
47
|
|
|
53
|
-
# Log name
|
|
54
48
|
sig { returns(String) }
|
|
55
49
|
attr_accessor :name
|
|
56
50
|
|
|
57
|
-
|
|
58
|
-
sig { returns(T.nilable(T::Hash[Symbol, T.anything])) }
|
|
51
|
+
sig { returns(T.nilable(T::Hash[Symbol, T.nilable(T.anything)])) }
|
|
59
52
|
attr_reader :data
|
|
60
53
|
|
|
61
|
-
sig { params(data: T::Hash[Symbol, T.anything]).void }
|
|
54
|
+
sig { params(data: T::Hash[Symbol, T.nilable(T.anything)]).void }
|
|
62
55
|
attr_writer :data
|
|
63
56
|
|
|
64
|
-
# Log timestamp (ISO 8601)
|
|
65
57
|
sig { returns(T.nilable(Time)) }
|
|
66
58
|
attr_reader :timestamp
|
|
67
59
|
|
|
68
60
|
sig { params(timestamp: Time).void }
|
|
69
61
|
attr_writer :timestamp
|
|
70
62
|
|
|
71
|
-
# External user ID
|
|
72
63
|
sig { returns(T.nilable(String)) }
|
|
73
64
|
attr_reader :user_id
|
|
74
65
|
|
|
@@ -78,28 +69,19 @@ module Userplex
|
|
|
78
69
|
sig do
|
|
79
70
|
params(
|
|
80
71
|
name: String,
|
|
81
|
-
data: T::Hash[Symbol, T.anything],
|
|
72
|
+
data: T::Hash[Symbol, T.nilable(T.anything)],
|
|
82
73
|
timestamp: Time,
|
|
83
74
|
user_id: String
|
|
84
75
|
).returns(T.attached_class)
|
|
85
76
|
end
|
|
86
|
-
def self.new(
|
|
87
|
-
# Log name
|
|
88
|
-
name:,
|
|
89
|
-
# Additional log data
|
|
90
|
-
data: nil,
|
|
91
|
-
# Log timestamp (ISO 8601)
|
|
92
|
-
timestamp: nil,
|
|
93
|
-
# External user ID
|
|
94
|
-
user_id: nil
|
|
95
|
-
)
|
|
77
|
+
def self.new(name:, data: nil, timestamp: nil, user_id: nil)
|
|
96
78
|
end
|
|
97
79
|
|
|
98
80
|
sig do
|
|
99
81
|
override.returns(
|
|
100
82
|
{
|
|
101
83
|
name: String,
|
|
102
|
-
data: T::Hash[Symbol, T.anything],
|
|
84
|
+
data: T::Hash[Symbol, T.nilable(T.anything)],
|
|
103
85
|
timestamp: Time,
|
|
104
86
|
user_id: String
|
|
105
87
|
}
|
|
@@ -11,25 +11,21 @@ module Userplex
|
|
|
11
11
|
T.any(Userplex::LogNewParams, Userplex::Internal::AnyHash)
|
|
12
12
|
end
|
|
13
13
|
|
|
14
|
-
# Log name
|
|
15
14
|
sig { returns(String) }
|
|
16
15
|
attr_accessor :name
|
|
17
16
|
|
|
18
|
-
|
|
19
|
-
sig { returns(T.nilable(T::Hash[Symbol, T.anything])) }
|
|
17
|
+
sig { returns(T.nilable(T::Hash[Symbol, T.nilable(T.anything)])) }
|
|
20
18
|
attr_reader :data
|
|
21
19
|
|
|
22
|
-
sig { params(data: T::Hash[Symbol, T.anything]).void }
|
|
20
|
+
sig { params(data: T::Hash[Symbol, T.nilable(T.anything)]).void }
|
|
23
21
|
attr_writer :data
|
|
24
22
|
|
|
25
|
-
# Log timestamp (ISO 8601)
|
|
26
23
|
sig { returns(T.nilable(Time)) }
|
|
27
24
|
attr_reader :timestamp
|
|
28
25
|
|
|
29
26
|
sig { params(timestamp: Time).void }
|
|
30
27
|
attr_writer :timestamp
|
|
31
28
|
|
|
32
|
-
# External user ID
|
|
33
29
|
sig { returns(T.nilable(String)) }
|
|
34
30
|
attr_reader :user_id
|
|
35
31
|
|
|
@@ -39,20 +35,16 @@ module Userplex
|
|
|
39
35
|
sig do
|
|
40
36
|
params(
|
|
41
37
|
name: String,
|
|
42
|
-
data: T::Hash[Symbol, T.anything],
|
|
38
|
+
data: T::Hash[Symbol, T.nilable(T.anything)],
|
|
43
39
|
timestamp: Time,
|
|
44
40
|
user_id: String,
|
|
45
41
|
request_options: Userplex::RequestOptions::OrHash
|
|
46
42
|
).returns(T.attached_class)
|
|
47
43
|
end
|
|
48
44
|
def self.new(
|
|
49
|
-
# Log name
|
|
50
45
|
name:,
|
|
51
|
-
# Additional log data
|
|
52
46
|
data: nil,
|
|
53
|
-
# Log timestamp (ISO 8601)
|
|
54
47
|
timestamp: nil,
|
|
55
|
-
# External user ID
|
|
56
48
|
user_id: nil,
|
|
57
49
|
request_options: {}
|
|
58
50
|
)
|
|
@@ -62,7 +54,7 @@ module Userplex
|
|
|
62
54
|
override.returns(
|
|
63
55
|
{
|
|
64
56
|
name: String,
|
|
65
|
-
data: T::Hash[Symbol, T.anything],
|
|
57
|
+
data: T::Hash[Symbol, T.nilable(T.anything)],
|
|
66
58
|
timestamp: Time,
|
|
67
59
|
user_id: String,
|
|
68
60
|
request_options: Userplex::RequestOptions
|
|
@@ -11,25 +11,21 @@ module Userplex
|
|
|
11
11
|
T.any(Userplex::UserIdentifyParams, Userplex::Internal::AnyHash)
|
|
12
12
|
end
|
|
13
13
|
|
|
14
|
-
# External user ID
|
|
15
14
|
sig { returns(String) }
|
|
16
15
|
attr_accessor :user_id
|
|
17
16
|
|
|
18
|
-
|
|
19
|
-
sig { returns(T.nilable(T::Hash[Symbol, T.anything])) }
|
|
17
|
+
sig { returns(T.nilable(T::Hash[Symbol, T.nilable(T.anything)])) }
|
|
20
18
|
attr_reader :attributes
|
|
21
19
|
|
|
22
|
-
sig { params(attributes: T::Hash[Symbol, T.anything]).void }
|
|
20
|
+
sig { params(attributes: T::Hash[Symbol, T.nilable(T.anything)]).void }
|
|
23
21
|
attr_writer :attributes
|
|
24
22
|
|
|
25
|
-
# User email
|
|
26
23
|
sig { returns(T.nilable(String)) }
|
|
27
24
|
attr_reader :email
|
|
28
25
|
|
|
29
26
|
sig { params(email: String).void }
|
|
30
27
|
attr_writer :email
|
|
31
28
|
|
|
32
|
-
# User name
|
|
33
29
|
sig { returns(T.nilable(String)) }
|
|
34
30
|
attr_reader :name
|
|
35
31
|
|
|
@@ -39,20 +35,16 @@ module Userplex
|
|
|
39
35
|
sig do
|
|
40
36
|
params(
|
|
41
37
|
user_id: String,
|
|
42
|
-
attributes: T::Hash[Symbol, T.anything],
|
|
38
|
+
attributes: T::Hash[Symbol, T.nilable(T.anything)],
|
|
43
39
|
email: String,
|
|
44
40
|
name: String,
|
|
45
41
|
request_options: Userplex::RequestOptions::OrHash
|
|
46
42
|
).returns(T.attached_class)
|
|
47
43
|
end
|
|
48
44
|
def self.new(
|
|
49
|
-
# External user ID
|
|
50
45
|
user_id:,
|
|
51
|
-
# Additional user attributes
|
|
52
46
|
attributes: nil,
|
|
53
|
-
# User email
|
|
54
47
|
email: nil,
|
|
55
|
-
# User name
|
|
56
48
|
name: nil,
|
|
57
49
|
request_options: {}
|
|
58
50
|
)
|
|
@@ -62,7 +54,7 @@ module Userplex
|
|
|
62
54
|
override.returns(
|
|
63
55
|
{
|
|
64
56
|
user_id: String,
|
|
65
|
-
attributes: T::Hash[Symbol, T.anything],
|
|
57
|
+
attributes: T::Hash[Symbol, T.nilable(T.anything)],
|
|
66
58
|
email: String,
|
|
67
59
|
name: String,
|
|
68
60
|
request_options: Userplex::RequestOptions
|
|
@@ -3,36 +3,30 @@
|
|
|
3
3
|
module Userplex
|
|
4
4
|
module Resources
|
|
5
5
|
class Logs
|
|
6
|
+
# Log multiple events
|
|
6
7
|
sig do
|
|
7
8
|
params(
|
|
8
9
|
body: T::Array[Userplex::LogBatchParams::Body::OrHash],
|
|
9
10
|
request_options: Userplex::RequestOptions::OrHash
|
|
10
11
|
).returns(Userplex::Models::LogBatchResponse)
|
|
11
12
|
end
|
|
12
|
-
def batch(
|
|
13
|
-
# A list of logs to ingest
|
|
14
|
-
body: nil,
|
|
15
|
-
request_options: {}
|
|
16
|
-
)
|
|
13
|
+
def batch(body: nil, request_options: {})
|
|
17
14
|
end
|
|
18
15
|
|
|
16
|
+
# Log a single event
|
|
19
17
|
sig do
|
|
20
18
|
params(
|
|
21
19
|
name: String,
|
|
22
|
-
data: T::Hash[Symbol, T.anything],
|
|
20
|
+
data: T::Hash[Symbol, T.nilable(T.anything)],
|
|
23
21
|
timestamp: Time,
|
|
24
22
|
user_id: String,
|
|
25
23
|
request_options: Userplex::RequestOptions::OrHash
|
|
26
24
|
).returns(Userplex::Models::LogNewResponse)
|
|
27
25
|
end
|
|
28
26
|
def new(
|
|
29
|
-
# Log name
|
|
30
27
|
name:,
|
|
31
|
-
# Additional log data
|
|
32
28
|
data: nil,
|
|
33
|
-
# Log timestamp (ISO 8601)
|
|
34
29
|
timestamp: nil,
|
|
35
|
-
# External user ID
|
|
36
30
|
user_id: nil,
|
|
37
31
|
request_options: {}
|
|
38
32
|
)
|
|
@@ -3,23 +3,20 @@
|
|
|
3
3
|
module Userplex
|
|
4
4
|
module Resources
|
|
5
5
|
class Users
|
|
6
|
+
# Identify a user
|
|
6
7
|
sig do
|
|
7
8
|
params(
|
|
8
9
|
user_id: String,
|
|
9
|
-
attributes: T::Hash[Symbol, T.anything],
|
|
10
|
+
attributes: T::Hash[Symbol, T.nilable(T.anything)],
|
|
10
11
|
email: String,
|
|
11
12
|
name: String,
|
|
12
13
|
request_options: Userplex::RequestOptions::OrHash
|
|
13
14
|
).returns(Userplex::Models::UserIdentifyResponse)
|
|
14
15
|
end
|
|
15
16
|
def identify(
|
|
16
|
-
# External user ID
|
|
17
17
|
user_id:,
|
|
18
|
-
# Additional user attributes
|
|
19
18
|
attributes: nil,
|
|
20
|
-
# User email
|
|
21
19
|
email: nil,
|
|
22
|
-
# User name
|
|
23
20
|
name: nil,
|
|
24
21
|
request_options: {}
|
|
25
22
|
)
|
data/sig/userplex/client.rbs
CHANGED
|
@@ -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
|
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.
|
|
4
|
+
version: 0.12.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Userplex
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2026-01-05 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: connection_pool
|