userplex 0.8.0 → 0.9.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 +8 -0
- data/README.md +15 -27
- 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 +20 -27
- data/lib/userplex/models/log_batch_response.rb +2 -11
- data/lib/userplex/models/log_new_params.rb +13 -20
- data/lib/userplex/models/log_new_response.rb +1 -2
- data/lib/userplex/models/user_identify_params.rb +14 -14
- data/lib/userplex/models/user_identify_response.rb +1 -2
- data/lib/userplex/resources/logs.rb +11 -19
- data/lib/userplex/resources/users.rb +6 -9
- 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 +34 -35
- data/rbi/userplex/models/log_batch_response.rbi +3 -15
- data/rbi/userplex/models/log_new_params.rbi +17 -23
- data/rbi/userplex/models/log_new_response.rbi +1 -5
- data/rbi/userplex/models/user_identify_params.rbi +17 -17
- data/rbi/userplex/models/user_identify_response.rbi +1 -5
- data/rbi/userplex/resources/logs.rbi +8 -14
- data/rbi/userplex/resources/users.rbi +6 -8
- 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 +25 -26
- data/sig/userplex/models/log_batch_response.rbs +3 -5
- data/sig/userplex/models/log_new_params.rbs +13 -18
- data/sig/userplex/models/user_identify_params.rbs +8 -8
- data/sig/userplex/resources/logs.rbs +3 -4
- 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: ccc461e8d1af92a26c98de1c70db8c715b417e06938ed86cb8f8fb1a44b7b5ad
|
|
4
|
+
data.tar.gz: 3bce0ceaddbc3900107fc0241c341ab7d5dcfeb6eb1c32973452bfaac1e4ef88
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: fe33e8b3d4f264cf611171829a4f46b898d73b074e0fdc0279fd48c195436b7ae5f48b029a8c7230e776431a3d26e336dd3fd6d73883cdd7028fe885d7e5d799
|
|
7
|
+
data.tar.gz: e56c69c304b83299744f3466795320332173db9fabc07b7dcc98f6d4570361da4010a3013f544456186110a4d061638f32bd1e3537ecab0ad5b49ee5b9e36832
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.9.0 (2025-12-23)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v0.8.0...v0.9.0](https://github.com/dqnamo/userplex-ruby/compare/v0.8.0...v0.9.0)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* **api:** manual updates ([5a5e029](https://github.com/dqnamo/userplex-ruby/commit/5a5e0297d519ec2fbbd614f0a7b9835bf2c5a9aa))
|
|
10
|
+
|
|
3
11
|
## 0.8.0 (2025-12-19)
|
|
4
12
|
|
|
5
13
|
Full Changelog: [v0.7.0...v0.8.0](https://github.com/dqnamo/userplex-ruby/compare/v0.7.0...v0.8.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.9.0"
|
|
19
19
|
```
|
|
20
20
|
|
|
21
21
|
<!-- x-release-please-end -->
|
|
@@ -26,11 +26,9 @@ gem "userplex", "~> 0.8.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
|
-
response = userplex.
|
|
31
|
+
response = userplex.logs.new(name: "REPLACE_ME")
|
|
34
32
|
|
|
35
33
|
puts(response.success)
|
|
36
34
|
```
|
|
@@ -41,7 +39,7 @@ When the library is unable to connect to the API, or if the API returns a non-su
|
|
|
41
39
|
|
|
42
40
|
```ruby
|
|
43
41
|
begin
|
|
44
|
-
|
|
42
|
+
log = userplex.logs.new(name: "REPLACE_ME")
|
|
45
43
|
rescue Userplex::Errors::APIConnectionError => e
|
|
46
44
|
puts("The server could not be reached")
|
|
47
45
|
puts(e.cause) # an underlying Exception, likely raised within `net/http`
|
|
@@ -80,16 +78,12 @@ 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:
|
|
87
|
-
userplex.
|
|
88
|
-
user_id: "user_id",
|
|
89
|
-
email: "REPLACE_ME",
|
|
90
|
-
name: "REPLACE_ME",
|
|
91
|
-
request_options: {max_retries: 5}
|
|
92
|
-
)
|
|
86
|
+
userplex.logs.new(name: "REPLACE_ME", request_options: {max_retries: 5})
|
|
93
87
|
```
|
|
94
88
|
|
|
95
89
|
### Timeouts
|
|
@@ -99,16 +93,12 @@ By default, requests will time out after 60 seconds. You can use the timeout opt
|
|
|
99
93
|
```ruby
|
|
100
94
|
# Configure the default for all requests:
|
|
101
95
|
userplex = Userplex::Client.new(
|
|
102
|
-
timeout: nil # default is 60
|
|
96
|
+
timeout: nil, # default is 60
|
|
97
|
+
api_key: "My API Key"
|
|
103
98
|
)
|
|
104
99
|
|
|
105
100
|
# Or, configure per-request:
|
|
106
|
-
userplex.
|
|
107
|
-
user_id: "user_id",
|
|
108
|
-
email: "REPLACE_ME",
|
|
109
|
-
name: "REPLACE_ME",
|
|
110
|
-
request_options: {timeout: 5}
|
|
111
|
-
)
|
|
101
|
+
userplex.logs.new(name: "REPLACE_ME", request_options: {timeout: 5})
|
|
112
102
|
```
|
|
113
103
|
|
|
114
104
|
On timeout, `Userplex::Errors::APITimeoutError` is raised.
|
|
@@ -139,9 +129,7 @@ Note: the `extra_` parameters of the same name overrides the documented paramete
|
|
|
139
129
|
|
|
140
130
|
```ruby
|
|
141
131
|
response =
|
|
142
|
-
userplex.
|
|
143
|
-
user_id: "user_id",
|
|
144
|
-
email: "REPLACE_ME",
|
|
132
|
+
userplex.logs.new(
|
|
145
133
|
name: "REPLACE_ME",
|
|
146
134
|
request_options: {
|
|
147
135
|
extra_query: {my_query_parameter: value},
|
|
@@ -188,18 +176,18 @@ This library provides comprehensive [RBI](https://sorbet.org/docs/rbi) definitio
|
|
|
188
176
|
You can provide typesafe request parameters like so:
|
|
189
177
|
|
|
190
178
|
```ruby
|
|
191
|
-
userplex.
|
|
179
|
+
userplex.logs.new(name: "REPLACE_ME")
|
|
192
180
|
```
|
|
193
181
|
|
|
194
182
|
Or, equivalently:
|
|
195
183
|
|
|
196
184
|
```ruby
|
|
197
185
|
# Hashes work, but are not typesafe:
|
|
198
|
-
userplex.
|
|
186
|
+
userplex.logs.new(name: "REPLACE_ME")
|
|
199
187
|
|
|
200
188
|
# You can also splat a full Params class:
|
|
201
|
-
params = Userplex::
|
|
202
|
-
userplex.
|
|
189
|
+
params = Userplex::LogNewParams.new(name: "REPLACE_ME")
|
|
190
|
+
userplex.logs.new(**params)
|
|
203
191
|
```
|
|
204
192
|
|
|
205
193
|
## Versioning
|
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
|
)
|
|
@@ -7,40 +7,29 @@ module Userplex
|
|
|
7
7
|
extend Userplex::Internal::Type::RequestParameters::Converter
|
|
8
8
|
include Userplex::Internal::Type::RequestParameters
|
|
9
9
|
|
|
10
|
-
# @!attribute
|
|
11
|
-
#
|
|
10
|
+
# @!attribute body
|
|
11
|
+
# A list of logs to ingest
|
|
12
12
|
#
|
|
13
|
-
# @return [Array<Userplex::Models::LogBatchParams::
|
|
14
|
-
|
|
13
|
+
# @return [Array<Userplex::Models::LogBatchParams::Body>, nil]
|
|
14
|
+
optional :body, -> { Userplex::Internal::Type::ArrayOf[Userplex::LogBatchParams::Body] }
|
|
15
15
|
|
|
16
|
-
# @!method initialize(
|
|
17
|
-
# @param
|
|
16
|
+
# @!method initialize(body: nil, request_options: {})
|
|
17
|
+
# @param body [Array<Userplex::Models::LogBatchParams::Body>] A list of logs to ingest
|
|
18
18
|
#
|
|
19
19
|
# @param request_options [Userplex::RequestOptions, Hash{Symbol=>Object}]
|
|
20
20
|
|
|
21
|
-
class
|
|
21
|
+
class Body < Userplex::Internal::Type::BaseModel
|
|
22
22
|
# @!attribute name
|
|
23
|
+
# Log name
|
|
23
24
|
#
|
|
24
25
|
# @return [String]
|
|
25
26
|
required :name, String
|
|
26
27
|
|
|
27
|
-
# @!attribute user_id
|
|
28
|
-
# External user ID
|
|
29
|
-
#
|
|
30
|
-
# @return [String]
|
|
31
|
-
required :user_id, String
|
|
32
|
-
|
|
33
28
|
# @!attribute data
|
|
34
29
|
# Additional log data
|
|
35
30
|
#
|
|
36
|
-
# @return [Hash{Symbol=>Object
|
|
37
|
-
optional :data, Userplex::Internal::Type::HashOf[Userplex::Internal::Type::Unknown
|
|
38
|
-
|
|
39
|
-
# @!attribute properties
|
|
40
|
-
# Alias for data, for compatibility
|
|
41
|
-
#
|
|
42
|
-
# @return [Hash{Symbol=>Object, nil}, nil]
|
|
43
|
-
optional :properties, Userplex::Internal::Type::HashOf[Userplex::Internal::Type::Unknown, nil?: true]
|
|
31
|
+
# @return [Hash{Symbol=>Object}, nil]
|
|
32
|
+
optional :data, Userplex::Internal::Type::HashOf[Userplex::Internal::Type::Unknown]
|
|
44
33
|
|
|
45
34
|
# @!attribute timestamp
|
|
46
35
|
# Log timestamp (ISO 8601)
|
|
@@ -48,16 +37,20 @@ module Userplex
|
|
|
48
37
|
# @return [Time, nil]
|
|
49
38
|
optional :timestamp, Time
|
|
50
39
|
|
|
51
|
-
# @!
|
|
52
|
-
#
|
|
53
|
-
#
|
|
54
|
-
# @param user_id [String] External user ID
|
|
40
|
+
# @!attribute user_id
|
|
41
|
+
# External user ID
|
|
55
42
|
#
|
|
56
|
-
# @
|
|
43
|
+
# @return [String, nil]
|
|
44
|
+
optional :user_id, String
|
|
45
|
+
|
|
46
|
+
# @!method initialize(name:, data: nil, timestamp: nil, user_id: nil)
|
|
47
|
+
# @param name [String] Log name
|
|
57
48
|
#
|
|
58
|
-
# @param
|
|
49
|
+
# @param data [Hash{Symbol=>Object}] Additional log data
|
|
59
50
|
#
|
|
60
51
|
# @param timestamp [Time] Log timestamp (ISO 8601)
|
|
52
|
+
#
|
|
53
|
+
# @param user_id [String] External user ID
|
|
61
54
|
end
|
|
62
55
|
end
|
|
63
56
|
end
|
|
@@ -4,22 +4,13 @@ module Userplex
|
|
|
4
4
|
module Models
|
|
5
5
|
# @see Userplex::Resources::Logs#batch
|
|
6
6
|
class LogBatchResponse < Userplex::Internal::Type::BaseModel
|
|
7
|
-
# @!attribute count
|
|
8
|
-
# Number of logs processed
|
|
9
|
-
#
|
|
10
|
-
# @return [Float]
|
|
11
|
-
required :count, Float
|
|
12
|
-
|
|
13
7
|
# @!attribute success
|
|
14
|
-
# Operation success status
|
|
15
8
|
#
|
|
16
9
|
# @return [Boolean]
|
|
17
10
|
required :success, Userplex::Internal::Type::Boolean
|
|
18
11
|
|
|
19
|
-
# @!method initialize(
|
|
20
|
-
# @param
|
|
21
|
-
#
|
|
22
|
-
# @param success [Boolean] Operation success status
|
|
12
|
+
# @!method initialize(success:)
|
|
13
|
+
# @param success [Boolean]
|
|
23
14
|
end
|
|
24
15
|
end
|
|
25
16
|
end
|
|
@@ -8,27 +8,16 @@ module Userplex
|
|
|
8
8
|
include Userplex::Internal::Type::RequestParameters
|
|
9
9
|
|
|
10
10
|
# @!attribute name
|
|
11
|
+
# Log name
|
|
11
12
|
#
|
|
12
13
|
# @return [String]
|
|
13
14
|
required :name, String
|
|
14
15
|
|
|
15
|
-
# @!attribute user_id
|
|
16
|
-
# External user ID
|
|
17
|
-
#
|
|
18
|
-
# @return [String]
|
|
19
|
-
required :user_id, String
|
|
20
|
-
|
|
21
16
|
# @!attribute data
|
|
22
17
|
# Additional log data
|
|
23
18
|
#
|
|
24
|
-
# @return [Hash{Symbol=>Object
|
|
25
|
-
optional :data, Userplex::Internal::Type::HashOf[Userplex::Internal::Type::Unknown
|
|
26
|
-
|
|
27
|
-
# @!attribute properties
|
|
28
|
-
# Alias for data, for compatibility
|
|
29
|
-
#
|
|
30
|
-
# @return [Hash{Symbol=>Object, nil}, nil]
|
|
31
|
-
optional :properties, Userplex::Internal::Type::HashOf[Userplex::Internal::Type::Unknown, nil?: true]
|
|
19
|
+
# @return [Hash{Symbol=>Object}, nil]
|
|
20
|
+
optional :data, Userplex::Internal::Type::HashOf[Userplex::Internal::Type::Unknown]
|
|
32
21
|
|
|
33
22
|
# @!attribute timestamp
|
|
34
23
|
# Log timestamp (ISO 8601)
|
|
@@ -36,17 +25,21 @@ module Userplex
|
|
|
36
25
|
# @return [Time, nil]
|
|
37
26
|
optional :timestamp, Time
|
|
38
27
|
|
|
39
|
-
# @!
|
|
40
|
-
#
|
|
41
|
-
#
|
|
42
|
-
# @param user_id [String] External user ID
|
|
28
|
+
# @!attribute user_id
|
|
29
|
+
# External user ID
|
|
43
30
|
#
|
|
44
|
-
# @
|
|
31
|
+
# @return [String, nil]
|
|
32
|
+
optional :user_id, String
|
|
33
|
+
|
|
34
|
+
# @!method initialize(name:, data: nil, timestamp: nil, user_id: nil, request_options: {})
|
|
35
|
+
# @param name [String] Log name
|
|
45
36
|
#
|
|
46
|
-
# @param
|
|
37
|
+
# @param data [Hash{Symbol=>Object}] Additional log data
|
|
47
38
|
#
|
|
48
39
|
# @param timestamp [Time] Log timestamp (ISO 8601)
|
|
49
40
|
#
|
|
41
|
+
# @param user_id [String] External user ID
|
|
42
|
+
#
|
|
50
43
|
# @param request_options [Userplex::RequestOptions, Hash{Symbol=>Object}]
|
|
51
44
|
end
|
|
52
45
|
end
|
|
@@ -5,13 +5,12 @@ module Userplex
|
|
|
5
5
|
# @see Userplex::Resources::Logs#new
|
|
6
6
|
class LogNewResponse < Userplex::Internal::Type::BaseModel
|
|
7
7
|
# @!attribute success
|
|
8
|
-
# Operation success status
|
|
9
8
|
#
|
|
10
9
|
# @return [Boolean]
|
|
11
10
|
required :success, Userplex::Internal::Type::Boolean
|
|
12
11
|
|
|
13
12
|
# @!method initialize(success:)
|
|
14
|
-
# @param success [Boolean]
|
|
13
|
+
# @param success [Boolean]
|
|
15
14
|
end
|
|
16
15
|
end
|
|
17
16
|
end
|
|
@@ -8,37 +8,37 @@ module Userplex
|
|
|
8
8
|
include Userplex::Internal::Type::RequestParameters
|
|
9
9
|
|
|
10
10
|
# @!attribute user_id
|
|
11
|
-
#
|
|
11
|
+
# External user ID
|
|
12
12
|
#
|
|
13
13
|
# @return [String]
|
|
14
14
|
required :user_id, String
|
|
15
15
|
|
|
16
|
+
# @!attribute attributes
|
|
17
|
+
# Additional user attributes
|
|
18
|
+
#
|
|
19
|
+
# @return [Hash{Symbol=>Object}, nil]
|
|
20
|
+
optional :attributes, Userplex::Internal::Type::HashOf[Userplex::Internal::Type::Unknown]
|
|
21
|
+
|
|
16
22
|
# @!attribute email
|
|
17
|
-
# User email
|
|
23
|
+
# User email
|
|
18
24
|
#
|
|
19
25
|
# @return [String, nil]
|
|
20
26
|
optional :email, String
|
|
21
27
|
|
|
22
28
|
# @!attribute name
|
|
23
|
-
# User
|
|
29
|
+
# User name
|
|
24
30
|
#
|
|
25
31
|
# @return [String, nil]
|
|
26
32
|
optional :name, String
|
|
27
33
|
|
|
28
|
-
# @!
|
|
29
|
-
#
|
|
30
|
-
#
|
|
31
|
-
# @return [Hash{Symbol=>Object, nil}, nil]
|
|
32
|
-
optional :properties, Userplex::Internal::Type::HashOf[Userplex::Internal::Type::Unknown, nil?: true]
|
|
33
|
-
|
|
34
|
-
# @!method initialize(user_id:, email: nil, name: nil, properties: nil, request_options: {})
|
|
35
|
-
# @param user_id [String] Unique identifier for the user
|
|
34
|
+
# @!method initialize(user_id:, attributes: nil, email: nil, name: nil, request_options: {})
|
|
35
|
+
# @param user_id [String] External user ID
|
|
36
36
|
#
|
|
37
|
-
# @param
|
|
37
|
+
# @param attributes [Hash{Symbol=>Object}] Additional user attributes
|
|
38
38
|
#
|
|
39
|
-
# @param
|
|
39
|
+
# @param email [String] User email
|
|
40
40
|
#
|
|
41
|
-
# @param
|
|
41
|
+
# @param name [String] User name
|
|
42
42
|
#
|
|
43
43
|
# @param request_options [Userplex::RequestOptions, Hash{Symbol=>Object}]
|
|
44
44
|
end
|
|
@@ -5,13 +5,12 @@ module Userplex
|
|
|
5
5
|
# @see Userplex::Resources::Users#identify
|
|
6
6
|
class UserIdentifyResponse < Userplex::Internal::Type::BaseModel
|
|
7
7
|
# @!attribute success
|
|
8
|
-
# Operation success status
|
|
9
8
|
#
|
|
10
9
|
# @return [Boolean]
|
|
11
10
|
required :success, Userplex::Internal::Type::Boolean
|
|
12
11
|
|
|
13
12
|
# @!method initialize(success:)
|
|
14
|
-
# @param success [Boolean]
|
|
13
|
+
# @param success [Boolean]
|
|
15
14
|
end
|
|
16
15
|
end
|
|
17
16
|
end
|
|
@@ -3,44 +3,36 @@
|
|
|
3
3
|
module Userplex
|
|
4
4
|
module Resources
|
|
5
5
|
class Logs
|
|
6
|
-
#
|
|
7
|
-
# for authentication.
|
|
6
|
+
# @overload batch(body: nil, request_options: {})
|
|
8
7
|
#
|
|
9
|
-
# @
|
|
10
|
-
#
|
|
11
|
-
# @param logs [Array<Userplex::Models::LogBatchParams::Log>] List of logs to track
|
|
8
|
+
# @param body [Array<Userplex::Models::LogBatchParams::Body>] A list of logs to ingest
|
|
12
9
|
#
|
|
13
10
|
# @param request_options [Userplex::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
14
11
|
#
|
|
15
12
|
# @return [Userplex::Models::LogBatchResponse]
|
|
16
13
|
#
|
|
17
14
|
# @see Userplex::Models::LogBatchParams
|
|
18
|
-
def batch(params)
|
|
15
|
+
def batch(params = {})
|
|
19
16
|
parsed, options = Userplex::LogBatchParams.dump_request(params)
|
|
20
17
|
@client.request(
|
|
21
18
|
method: :post,
|
|
22
|
-
path: "
|
|
23
|
-
body: parsed,
|
|
19
|
+
path: "logs",
|
|
20
|
+
body: parsed[:body],
|
|
24
21
|
model: Userplex::Models::LogBatchResponse,
|
|
25
22
|
options: options
|
|
26
23
|
)
|
|
27
24
|
end
|
|
28
25
|
|
|
29
|
-
#
|
|
30
|
-
# Requires a valid API key for authentication.
|
|
31
|
-
#
|
|
32
|
-
# @overload new(name:, user_id:, data: nil, properties: nil, timestamp: nil, request_options: {})
|
|
33
|
-
#
|
|
34
|
-
# @param name [String]
|
|
26
|
+
# @overload new(name:, data: nil, timestamp: nil, user_id: nil, request_options: {})
|
|
35
27
|
#
|
|
36
|
-
# @param
|
|
37
|
-
#
|
|
38
|
-
# @param data [Hash{Symbol=>Object, nil}] Additional log data
|
|
28
|
+
# @param name [String] Log name
|
|
39
29
|
#
|
|
40
|
-
# @param
|
|
30
|
+
# @param data [Hash{Symbol=>Object}] Additional log data
|
|
41
31
|
#
|
|
42
32
|
# @param timestamp [Time] Log timestamp (ISO 8601)
|
|
43
33
|
#
|
|
34
|
+
# @param user_id [String] External user ID
|
|
35
|
+
#
|
|
44
36
|
# @param request_options [Userplex::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
45
37
|
#
|
|
46
38
|
# @return [Userplex::Models::LogNewResponse]
|
|
@@ -50,7 +42,7 @@ module Userplex
|
|
|
50
42
|
parsed, options = Userplex::LogNewParams.dump_request(params)
|
|
51
43
|
@client.request(
|
|
52
44
|
method: :post,
|
|
53
|
-
path: "
|
|
45
|
+
path: "log",
|
|
54
46
|
body: parsed,
|
|
55
47
|
model: Userplex::Models::LogNewResponse,
|
|
56
48
|
options: options
|
|
@@ -3,18 +3,15 @@
|
|
|
3
3
|
module Userplex
|
|
4
4
|
module Resources
|
|
5
5
|
class Users
|
|
6
|
-
#
|
|
7
|
-
# Requires a valid API key for authentication.
|
|
6
|
+
# @overload identify(user_id:, attributes: nil, email: nil, name: nil, request_options: {})
|
|
8
7
|
#
|
|
9
|
-
# @
|
|
8
|
+
# @param user_id [String] External user ID
|
|
10
9
|
#
|
|
11
|
-
# @param
|
|
10
|
+
# @param attributes [Hash{Symbol=>Object}] Additional user attributes
|
|
12
11
|
#
|
|
13
|
-
# @param email [String] User email
|
|
12
|
+
# @param email [String] User email
|
|
14
13
|
#
|
|
15
|
-
# @param name [String] User
|
|
16
|
-
#
|
|
17
|
-
# @param properties [Hash{Symbol=>Object, nil}] Additional user properties
|
|
14
|
+
# @param name [String] User name
|
|
18
15
|
#
|
|
19
16
|
# @param request_options [Userplex::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
20
17
|
#
|
|
@@ -25,7 +22,7 @@ module Userplex
|
|
|
25
22
|
parsed, options = Userplex::UserIdentifyParams.dump_request(params)
|
|
26
23
|
@client.request(
|
|
27
24
|
method: :post,
|
|
28
|
-
path: "
|
|
25
|
+
path: "identify",
|
|
29
26
|
body: parsed,
|
|
30
27
|
model: Userplex::Models::UserIdentifyResponse,
|
|
31
28
|
options: options
|
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,19 +11,24 @@ module Userplex
|
|
|
11
11
|
T.any(Userplex::LogBatchParams, Userplex::Internal::AnyHash)
|
|
12
12
|
end
|
|
13
13
|
|
|
14
|
-
#
|
|
15
|
-
sig { returns(T::Array[Userplex::LogBatchParams::
|
|
16
|
-
|
|
14
|
+
# A list of logs to ingest
|
|
15
|
+
sig { returns(T.nilable(T::Array[Userplex::LogBatchParams::Body])) }
|
|
16
|
+
attr_reader :body
|
|
17
|
+
|
|
18
|
+
sig do
|
|
19
|
+
params(body: T::Array[Userplex::LogBatchParams::Body::OrHash]).void
|
|
20
|
+
end
|
|
21
|
+
attr_writer :body
|
|
17
22
|
|
|
18
23
|
sig do
|
|
19
24
|
params(
|
|
20
|
-
|
|
25
|
+
body: T::Array[Userplex::LogBatchParams::Body::OrHash],
|
|
21
26
|
request_options: Userplex::RequestOptions::OrHash
|
|
22
27
|
).returns(T.attached_class)
|
|
23
28
|
end
|
|
24
29
|
def self.new(
|
|
25
|
-
#
|
|
26
|
-
|
|
30
|
+
# A list of logs to ingest
|
|
31
|
+
body: nil,
|
|
27
32
|
request_options: {}
|
|
28
33
|
)
|
|
29
34
|
end
|
|
@@ -31,7 +36,7 @@ module Userplex
|
|
|
31
36
|
sig do
|
|
32
37
|
override.returns(
|
|
33
38
|
{
|
|
34
|
-
|
|
39
|
+
body: T::Array[Userplex::LogBatchParams::Body],
|
|
35
40
|
request_options: Userplex::RequestOptions
|
|
36
41
|
}
|
|
37
42
|
)
|
|
@@ -39,33 +44,23 @@ module Userplex
|
|
|
39
44
|
def to_hash
|
|
40
45
|
end
|
|
41
46
|
|
|
42
|
-
class
|
|
47
|
+
class Body < Userplex::Internal::Type::BaseModel
|
|
43
48
|
OrHash =
|
|
44
49
|
T.type_alias do
|
|
45
|
-
T.any(Userplex::LogBatchParams::
|
|
50
|
+
T.any(Userplex::LogBatchParams::Body, Userplex::Internal::AnyHash)
|
|
46
51
|
end
|
|
47
52
|
|
|
53
|
+
# Log name
|
|
48
54
|
sig { returns(String) }
|
|
49
55
|
attr_accessor :name
|
|
50
56
|
|
|
51
|
-
# External user ID
|
|
52
|
-
sig { returns(String) }
|
|
53
|
-
attr_accessor :user_id
|
|
54
|
-
|
|
55
57
|
# Additional log data
|
|
56
|
-
sig { returns(T.nilable(T::Hash[Symbol, T.
|
|
58
|
+
sig { returns(T.nilable(T::Hash[Symbol, T.anything])) }
|
|
57
59
|
attr_reader :data
|
|
58
60
|
|
|
59
|
-
sig { params(data: T::Hash[Symbol, T.
|
|
61
|
+
sig { params(data: T::Hash[Symbol, T.anything]).void }
|
|
60
62
|
attr_writer :data
|
|
61
63
|
|
|
62
|
-
# Alias for data, for compatibility
|
|
63
|
-
sig { returns(T.nilable(T::Hash[Symbol, T.nilable(T.anything)])) }
|
|
64
|
-
attr_reader :properties
|
|
65
|
-
|
|
66
|
-
sig { params(properties: T::Hash[Symbol, T.nilable(T.anything)]).void }
|
|
67
|
-
attr_writer :properties
|
|
68
|
-
|
|
69
64
|
# Log timestamp (ISO 8601)
|
|
70
65
|
sig { returns(T.nilable(Time)) }
|
|
71
66
|
attr_reader :timestamp
|
|
@@ -73,25 +68,30 @@ module Userplex
|
|
|
73
68
|
sig { params(timestamp: Time).void }
|
|
74
69
|
attr_writer :timestamp
|
|
75
70
|
|
|
71
|
+
# External user ID
|
|
72
|
+
sig { returns(T.nilable(String)) }
|
|
73
|
+
attr_reader :user_id
|
|
74
|
+
|
|
75
|
+
sig { params(user_id: String).void }
|
|
76
|
+
attr_writer :user_id
|
|
77
|
+
|
|
76
78
|
sig do
|
|
77
79
|
params(
|
|
78
80
|
name: String,
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
timestamp: Time
|
|
81
|
+
data: T::Hash[Symbol, T.anything],
|
|
82
|
+
timestamp: Time,
|
|
83
|
+
user_id: String
|
|
83
84
|
).returns(T.attached_class)
|
|
84
85
|
end
|
|
85
86
|
def self.new(
|
|
87
|
+
# Log name
|
|
86
88
|
name:,
|
|
87
|
-
# External user ID
|
|
88
|
-
user_id:,
|
|
89
89
|
# Additional log data
|
|
90
90
|
data: nil,
|
|
91
|
-
# Alias for data, for compatibility
|
|
92
|
-
properties: nil,
|
|
93
91
|
# Log timestamp (ISO 8601)
|
|
94
|
-
timestamp: nil
|
|
92
|
+
timestamp: nil,
|
|
93
|
+
# External user ID
|
|
94
|
+
user_id: nil
|
|
95
95
|
)
|
|
96
96
|
end
|
|
97
97
|
|
|
@@ -99,10 +99,9 @@ module Userplex
|
|
|
99
99
|
override.returns(
|
|
100
100
|
{
|
|
101
101
|
name: String,
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
timestamp: Time
|
|
102
|
+
data: T::Hash[Symbol, T.anything],
|
|
103
|
+
timestamp: Time,
|
|
104
|
+
user_id: String
|
|
106
105
|
}
|
|
107
106
|
)
|
|
108
107
|
end
|
|
@@ -8,26 +8,14 @@ module Userplex
|
|
|
8
8
|
T.any(Userplex::Models::LogBatchResponse, Userplex::Internal::AnyHash)
|
|
9
9
|
end
|
|
10
10
|
|
|
11
|
-
# Number of logs processed
|
|
12
|
-
sig { returns(Float) }
|
|
13
|
-
attr_accessor :count
|
|
14
|
-
|
|
15
|
-
# Operation success status
|
|
16
11
|
sig { returns(T::Boolean) }
|
|
17
12
|
attr_accessor :success
|
|
18
13
|
|
|
19
|
-
sig
|
|
20
|
-
|
|
21
|
-
end
|
|
22
|
-
def self.new(
|
|
23
|
-
# Number of logs processed
|
|
24
|
-
count:,
|
|
25
|
-
# Operation success status
|
|
26
|
-
success:
|
|
27
|
-
)
|
|
14
|
+
sig { params(success: T::Boolean).returns(T.attached_class) }
|
|
15
|
+
def self.new(success:)
|
|
28
16
|
end
|
|
29
17
|
|
|
30
|
-
sig { override.returns({
|
|
18
|
+
sig { override.returns({ success: T::Boolean }) }
|
|
31
19
|
def to_hash
|
|
32
20
|
end
|
|
33
21
|
end
|
|
@@ -11,27 +11,17 @@ module Userplex
|
|
|
11
11
|
T.any(Userplex::LogNewParams, Userplex::Internal::AnyHash)
|
|
12
12
|
end
|
|
13
13
|
|
|
14
|
+
# Log name
|
|
14
15
|
sig { returns(String) }
|
|
15
16
|
attr_accessor :name
|
|
16
17
|
|
|
17
|
-
# External user ID
|
|
18
|
-
sig { returns(String) }
|
|
19
|
-
attr_accessor :user_id
|
|
20
|
-
|
|
21
18
|
# Additional log data
|
|
22
|
-
sig { returns(T.nilable(T::Hash[Symbol, T.
|
|
19
|
+
sig { returns(T.nilable(T::Hash[Symbol, T.anything])) }
|
|
23
20
|
attr_reader :data
|
|
24
21
|
|
|
25
|
-
sig { params(data: T::Hash[Symbol, T.
|
|
22
|
+
sig { params(data: T::Hash[Symbol, T.anything]).void }
|
|
26
23
|
attr_writer :data
|
|
27
24
|
|
|
28
|
-
# Alias for data, for compatibility
|
|
29
|
-
sig { returns(T.nilable(T::Hash[Symbol, T.nilable(T.anything)])) }
|
|
30
|
-
attr_reader :properties
|
|
31
|
-
|
|
32
|
-
sig { params(properties: T::Hash[Symbol, T.nilable(T.anything)]).void }
|
|
33
|
-
attr_writer :properties
|
|
34
|
-
|
|
35
25
|
# Log timestamp (ISO 8601)
|
|
36
26
|
sig { returns(T.nilable(Time)) }
|
|
37
27
|
attr_reader :timestamp
|
|
@@ -39,26 +29,31 @@ module Userplex
|
|
|
39
29
|
sig { params(timestamp: Time).void }
|
|
40
30
|
attr_writer :timestamp
|
|
41
31
|
|
|
32
|
+
# External user ID
|
|
33
|
+
sig { returns(T.nilable(String)) }
|
|
34
|
+
attr_reader :user_id
|
|
35
|
+
|
|
36
|
+
sig { params(user_id: String).void }
|
|
37
|
+
attr_writer :user_id
|
|
38
|
+
|
|
42
39
|
sig do
|
|
43
40
|
params(
|
|
44
41
|
name: String,
|
|
45
|
-
|
|
46
|
-
data: T::Hash[Symbol, T.nilable(T.anything)],
|
|
47
|
-
properties: T::Hash[Symbol, T.nilable(T.anything)],
|
|
42
|
+
data: T::Hash[Symbol, T.anything],
|
|
48
43
|
timestamp: Time,
|
|
44
|
+
user_id: String,
|
|
49
45
|
request_options: Userplex::RequestOptions::OrHash
|
|
50
46
|
).returns(T.attached_class)
|
|
51
47
|
end
|
|
52
48
|
def self.new(
|
|
49
|
+
# Log name
|
|
53
50
|
name:,
|
|
54
|
-
# External user ID
|
|
55
|
-
user_id:,
|
|
56
51
|
# Additional log data
|
|
57
52
|
data: nil,
|
|
58
|
-
# Alias for data, for compatibility
|
|
59
|
-
properties: nil,
|
|
60
53
|
# Log timestamp (ISO 8601)
|
|
61
54
|
timestamp: nil,
|
|
55
|
+
# External user ID
|
|
56
|
+
user_id: nil,
|
|
62
57
|
request_options: {}
|
|
63
58
|
)
|
|
64
59
|
end
|
|
@@ -67,10 +62,9 @@ module Userplex
|
|
|
67
62
|
override.returns(
|
|
68
63
|
{
|
|
69
64
|
name: String,
|
|
70
|
-
|
|
71
|
-
data: T::Hash[Symbol, T.nilable(T.anything)],
|
|
72
|
-
properties: T::Hash[Symbol, T.nilable(T.anything)],
|
|
65
|
+
data: T::Hash[Symbol, T.anything],
|
|
73
66
|
timestamp: Time,
|
|
67
|
+
user_id: String,
|
|
74
68
|
request_options: Userplex::RequestOptions
|
|
75
69
|
}
|
|
76
70
|
)
|
|
@@ -8,15 +8,11 @@ module Userplex
|
|
|
8
8
|
T.any(Userplex::Models::LogNewResponse, Userplex::Internal::AnyHash)
|
|
9
9
|
end
|
|
10
10
|
|
|
11
|
-
# Operation success status
|
|
12
11
|
sig { returns(T::Boolean) }
|
|
13
12
|
attr_accessor :success
|
|
14
13
|
|
|
15
14
|
sig { params(success: T::Boolean).returns(T.attached_class) }
|
|
16
|
-
def self.new(
|
|
17
|
-
# Operation success status
|
|
18
|
-
success:
|
|
19
|
-
)
|
|
15
|
+
def self.new(success:)
|
|
20
16
|
end
|
|
21
17
|
|
|
22
18
|
sig { override.returns({ success: T::Boolean }) }
|
|
@@ -11,49 +11,49 @@ module Userplex
|
|
|
11
11
|
T.any(Userplex::UserIdentifyParams, Userplex::Internal::AnyHash)
|
|
12
12
|
end
|
|
13
13
|
|
|
14
|
-
#
|
|
14
|
+
# External user ID
|
|
15
15
|
sig { returns(String) }
|
|
16
16
|
attr_accessor :user_id
|
|
17
17
|
|
|
18
|
-
#
|
|
18
|
+
# Additional user attributes
|
|
19
|
+
sig { returns(T.nilable(T::Hash[Symbol, T.anything])) }
|
|
20
|
+
attr_reader :attributes
|
|
21
|
+
|
|
22
|
+
sig { params(attributes: T::Hash[Symbol, T.anything]).void }
|
|
23
|
+
attr_writer :attributes
|
|
24
|
+
|
|
25
|
+
# User email
|
|
19
26
|
sig { returns(T.nilable(String)) }
|
|
20
27
|
attr_reader :email
|
|
21
28
|
|
|
22
29
|
sig { params(email: String).void }
|
|
23
30
|
attr_writer :email
|
|
24
31
|
|
|
25
|
-
# User
|
|
32
|
+
# User name
|
|
26
33
|
sig { returns(T.nilable(String)) }
|
|
27
34
|
attr_reader :name
|
|
28
35
|
|
|
29
36
|
sig { params(name: String).void }
|
|
30
37
|
attr_writer :name
|
|
31
38
|
|
|
32
|
-
# Additional user properties
|
|
33
|
-
sig { returns(T.nilable(T::Hash[Symbol, T.nilable(T.anything)])) }
|
|
34
|
-
attr_reader :properties
|
|
35
|
-
|
|
36
|
-
sig { params(properties: T::Hash[Symbol, T.nilable(T.anything)]).void }
|
|
37
|
-
attr_writer :properties
|
|
38
|
-
|
|
39
39
|
sig do
|
|
40
40
|
params(
|
|
41
41
|
user_id: String,
|
|
42
|
+
attributes: T::Hash[Symbol, T.anything],
|
|
42
43
|
email: String,
|
|
43
44
|
name: String,
|
|
44
|
-
properties: T::Hash[Symbol, T.nilable(T.anything)],
|
|
45
45
|
request_options: Userplex::RequestOptions::OrHash
|
|
46
46
|
).returns(T.attached_class)
|
|
47
47
|
end
|
|
48
48
|
def self.new(
|
|
49
|
-
#
|
|
49
|
+
# External user ID
|
|
50
50
|
user_id:,
|
|
51
|
-
#
|
|
51
|
+
# Additional user attributes
|
|
52
|
+
attributes: nil,
|
|
53
|
+
# User email
|
|
52
54
|
email: nil,
|
|
53
|
-
# User
|
|
55
|
+
# User name
|
|
54
56
|
name: nil,
|
|
55
|
-
# Additional user properties
|
|
56
|
-
properties: nil,
|
|
57
57
|
request_options: {}
|
|
58
58
|
)
|
|
59
59
|
end
|
|
@@ -62,9 +62,9 @@ module Userplex
|
|
|
62
62
|
override.returns(
|
|
63
63
|
{
|
|
64
64
|
user_id: String,
|
|
65
|
+
attributes: T::Hash[Symbol, T.anything],
|
|
65
66
|
email: String,
|
|
66
67
|
name: String,
|
|
67
|
-
properties: T::Hash[Symbol, T.nilable(T.anything)],
|
|
68
68
|
request_options: Userplex::RequestOptions
|
|
69
69
|
}
|
|
70
70
|
)
|
|
@@ -11,15 +11,11 @@ module Userplex
|
|
|
11
11
|
)
|
|
12
12
|
end
|
|
13
13
|
|
|
14
|
-
# Operation success status
|
|
15
14
|
sig { returns(T::Boolean) }
|
|
16
15
|
attr_accessor :success
|
|
17
16
|
|
|
18
17
|
sig { params(success: T::Boolean).returns(T.attached_class) }
|
|
19
|
-
def self.new(
|
|
20
|
-
# Operation success status
|
|
21
|
-
success:
|
|
22
|
-
)
|
|
18
|
+
def self.new(success:)
|
|
23
19
|
end
|
|
24
20
|
|
|
25
21
|
sig { override.returns({ success: T::Boolean }) }
|
|
@@ -3,43 +3,37 @@
|
|
|
3
3
|
module Userplex
|
|
4
4
|
module Resources
|
|
5
5
|
class Logs
|
|
6
|
-
# Records multiple log occurrences in a single request. Requires a valid API key
|
|
7
|
-
# for authentication.
|
|
8
6
|
sig do
|
|
9
7
|
params(
|
|
10
|
-
|
|
8
|
+
body: T::Array[Userplex::LogBatchParams::Body::OrHash],
|
|
11
9
|
request_options: Userplex::RequestOptions::OrHash
|
|
12
10
|
).returns(Userplex::Models::LogBatchResponse)
|
|
13
11
|
end
|
|
14
12
|
def batch(
|
|
15
|
-
#
|
|
16
|
-
|
|
13
|
+
# A list of logs to ingest
|
|
14
|
+
body: nil,
|
|
17
15
|
request_options: {}
|
|
18
16
|
)
|
|
19
17
|
end
|
|
20
18
|
|
|
21
|
-
# Creates or uses an existing log and records a log occurrence for an end user.
|
|
22
|
-
# Requires a valid API key for authentication.
|
|
23
19
|
sig do
|
|
24
20
|
params(
|
|
25
21
|
name: String,
|
|
26
|
-
|
|
27
|
-
data: T::Hash[Symbol, T.nilable(T.anything)],
|
|
28
|
-
properties: T::Hash[Symbol, T.nilable(T.anything)],
|
|
22
|
+
data: T::Hash[Symbol, T.anything],
|
|
29
23
|
timestamp: Time,
|
|
24
|
+
user_id: String,
|
|
30
25
|
request_options: Userplex::RequestOptions::OrHash
|
|
31
26
|
).returns(Userplex::Models::LogNewResponse)
|
|
32
27
|
end
|
|
33
28
|
def new(
|
|
29
|
+
# Log name
|
|
34
30
|
name:,
|
|
35
|
-
# External user ID
|
|
36
|
-
user_id:,
|
|
37
31
|
# Additional log data
|
|
38
32
|
data: nil,
|
|
39
|
-
# Alias for data, for compatibility
|
|
40
|
-
properties: nil,
|
|
41
33
|
# Log timestamp (ISO 8601)
|
|
42
34
|
timestamp: nil,
|
|
35
|
+
# External user ID
|
|
36
|
+
user_id: nil,
|
|
43
37
|
request_options: {}
|
|
44
38
|
)
|
|
45
39
|
end
|
|
@@ -3,26 +3,24 @@
|
|
|
3
3
|
module Userplex
|
|
4
4
|
module Resources
|
|
5
5
|
class Users
|
|
6
|
-
# Creates or updates an end user in InstantDB with the provided information.
|
|
7
|
-
# Requires a valid API key for authentication.
|
|
8
6
|
sig do
|
|
9
7
|
params(
|
|
10
8
|
user_id: String,
|
|
9
|
+
attributes: T::Hash[Symbol, T.anything],
|
|
11
10
|
email: String,
|
|
12
11
|
name: String,
|
|
13
|
-
properties: T::Hash[Symbol, T.nilable(T.anything)],
|
|
14
12
|
request_options: Userplex::RequestOptions::OrHash
|
|
15
13
|
).returns(Userplex::Models::UserIdentifyResponse)
|
|
16
14
|
end
|
|
17
15
|
def identify(
|
|
18
|
-
#
|
|
16
|
+
# External user ID
|
|
19
17
|
user_id:,
|
|
20
|
-
#
|
|
18
|
+
# Additional user attributes
|
|
19
|
+
attributes: nil,
|
|
20
|
+
# User email
|
|
21
21
|
email: nil,
|
|
22
|
-
# User
|
|
22
|
+
# User name
|
|
23
23
|
name: nil,
|
|
24
|
-
# Additional user properties
|
|
25
|
-
properties: nil,
|
|
26
24
|
request_options: {}
|
|
27
25
|
)
|
|
28
26
|
end
|
data/sig/userplex/client.rbs
CHANGED
|
@@ -1,65 +1,64 @@
|
|
|
1
1
|
module Userplex
|
|
2
2
|
module Models
|
|
3
3
|
type log_batch_params =
|
|
4
|
-
{
|
|
4
|
+
{ body: ::Array[Userplex::LogBatchParams::Body] }
|
|
5
5
|
& Userplex::Internal::Type::request_parameters
|
|
6
6
|
|
|
7
7
|
class LogBatchParams < Userplex::Internal::Type::BaseModel
|
|
8
8
|
extend Userplex::Internal::Type::RequestParameters::Converter
|
|
9
9
|
include Userplex::Internal::Type::RequestParameters
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
attr_reader body: ::Array[Userplex::LogBatchParams::Body]?
|
|
12
|
+
|
|
13
|
+
def body=: (
|
|
14
|
+
::Array[Userplex::LogBatchParams::Body]
|
|
15
|
+
) -> ::Array[Userplex::LogBatchParams::Body]
|
|
12
16
|
|
|
13
17
|
def initialize: (
|
|
14
|
-
|
|
18
|
+
?body: ::Array[Userplex::LogBatchParams::Body],
|
|
15
19
|
?request_options: Userplex::request_opts
|
|
16
20
|
) -> void
|
|
17
21
|
|
|
18
22
|
def to_hash: -> {
|
|
19
|
-
|
|
23
|
+
body: ::Array[Userplex::LogBatchParams::Body],
|
|
20
24
|
request_options: Userplex::RequestOptions
|
|
21
25
|
}
|
|
22
26
|
|
|
23
|
-
type
|
|
27
|
+
type body =
|
|
24
28
|
{
|
|
25
29
|
name: String,
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
timestamp: Time
|
|
30
|
+
data: ::Hash[Symbol, top],
|
|
31
|
+
timestamp: Time,
|
|
32
|
+
user_id: String
|
|
30
33
|
}
|
|
31
34
|
|
|
32
|
-
class
|
|
35
|
+
class Body < Userplex::Internal::Type::BaseModel
|
|
33
36
|
attr_accessor name: String
|
|
34
37
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
attr_reader data: ::Hash[Symbol, top?]?
|
|
38
|
-
|
|
39
|
-
def data=: (::Hash[Symbol, top?]) -> ::Hash[Symbol, top?]
|
|
38
|
+
attr_reader data: ::Hash[Symbol, top]?
|
|
40
39
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
def properties=: (::Hash[Symbol, top?]) -> ::Hash[Symbol, top?]
|
|
40
|
+
def data=: (::Hash[Symbol, top]) -> ::Hash[Symbol, top]
|
|
44
41
|
|
|
45
42
|
attr_reader timestamp: Time?
|
|
46
43
|
|
|
47
44
|
def timestamp=: (Time) -> Time
|
|
48
45
|
|
|
46
|
+
attr_reader user_id: String?
|
|
47
|
+
|
|
48
|
+
def user_id=: (String) -> String
|
|
49
|
+
|
|
49
50
|
def initialize: (
|
|
50
51
|
name: String,
|
|
51
|
-
|
|
52
|
-
?
|
|
53
|
-
?
|
|
54
|
-
?timestamp: Time
|
|
52
|
+
?data: ::Hash[Symbol, top],
|
|
53
|
+
?timestamp: Time,
|
|
54
|
+
?user_id: String
|
|
55
55
|
) -> void
|
|
56
56
|
|
|
57
57
|
def to_hash: -> {
|
|
58
58
|
name: String,
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
timestamp: Time
|
|
59
|
+
data: ::Hash[Symbol, top],
|
|
60
|
+
timestamp: Time,
|
|
61
|
+
user_id: String
|
|
63
62
|
}
|
|
64
63
|
end
|
|
65
64
|
end
|
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
module Userplex
|
|
2
2
|
module Models
|
|
3
|
-
type log_batch_response = {
|
|
3
|
+
type log_batch_response = { success: bool }
|
|
4
4
|
|
|
5
5
|
class LogBatchResponse < Userplex::Internal::Type::BaseModel
|
|
6
|
-
attr_accessor count: Float
|
|
7
|
-
|
|
8
6
|
attr_accessor success: bool
|
|
9
7
|
|
|
10
|
-
def initialize: (
|
|
8
|
+
def initialize: (success: bool) -> void
|
|
11
9
|
|
|
12
|
-
def to_hash: -> {
|
|
10
|
+
def to_hash: -> { success: bool }
|
|
13
11
|
end
|
|
14
12
|
end
|
|
15
13
|
end
|
|
@@ -3,10 +3,9 @@ module Userplex
|
|
|
3
3
|
type log_new_params =
|
|
4
4
|
{
|
|
5
5
|
name: String,
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
timestamp: Time
|
|
6
|
+
data: ::Hash[Symbol, top],
|
|
7
|
+
timestamp: Time,
|
|
8
|
+
user_id: String
|
|
10
9
|
}
|
|
11
10
|
& Userplex::Internal::Type::request_parameters
|
|
12
11
|
|
|
@@ -16,35 +15,31 @@ module Userplex
|
|
|
16
15
|
|
|
17
16
|
attr_accessor name: String
|
|
18
17
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
attr_reader data: ::Hash[Symbol, top?]?
|
|
22
|
-
|
|
23
|
-
def data=: (::Hash[Symbol, top?]) -> ::Hash[Symbol, top?]
|
|
24
|
-
|
|
25
|
-
attr_reader properties: ::Hash[Symbol, top?]?
|
|
18
|
+
attr_reader data: ::Hash[Symbol, top]?
|
|
26
19
|
|
|
27
|
-
def
|
|
20
|
+
def data=: (::Hash[Symbol, top]) -> ::Hash[Symbol, top]
|
|
28
21
|
|
|
29
22
|
attr_reader timestamp: Time?
|
|
30
23
|
|
|
31
24
|
def timestamp=: (Time) -> Time
|
|
32
25
|
|
|
26
|
+
attr_reader user_id: String?
|
|
27
|
+
|
|
28
|
+
def user_id=: (String) -> String
|
|
29
|
+
|
|
33
30
|
def initialize: (
|
|
34
31
|
name: String,
|
|
35
|
-
|
|
36
|
-
?data: ::Hash[Symbol, top?],
|
|
37
|
-
?properties: ::Hash[Symbol, top?],
|
|
32
|
+
?data: ::Hash[Symbol, top],
|
|
38
33
|
?timestamp: Time,
|
|
34
|
+
?user_id: String,
|
|
39
35
|
?request_options: Userplex::request_opts
|
|
40
36
|
) -> void
|
|
41
37
|
|
|
42
38
|
def to_hash: -> {
|
|
43
39
|
name: String,
|
|
44
|
-
|
|
45
|
-
data: ::Hash[Symbol, top?],
|
|
46
|
-
properties: ::Hash[Symbol, top?],
|
|
40
|
+
data: ::Hash[Symbol, top],
|
|
47
41
|
timestamp: Time,
|
|
42
|
+
user_id: String,
|
|
48
43
|
request_options: Userplex::RequestOptions
|
|
49
44
|
}
|
|
50
45
|
end
|
|
@@ -3,9 +3,9 @@ module Userplex
|
|
|
3
3
|
type user_identify_params =
|
|
4
4
|
{
|
|
5
5
|
user_id: String,
|
|
6
|
+
attributes: ::Hash[Symbol, top],
|
|
6
7
|
email: String,
|
|
7
|
-
name: String
|
|
8
|
-
properties: ::Hash[Symbol, top?]
|
|
8
|
+
name: String
|
|
9
9
|
}
|
|
10
10
|
& Userplex::Internal::Type::request_parameters
|
|
11
11
|
|
|
@@ -15,6 +15,10 @@ module Userplex
|
|
|
15
15
|
|
|
16
16
|
attr_accessor user_id: String
|
|
17
17
|
|
|
18
|
+
attr_reader attributes: ::Hash[Symbol, top]?
|
|
19
|
+
|
|
20
|
+
def attributes=: (::Hash[Symbol, top]) -> ::Hash[Symbol, top]
|
|
21
|
+
|
|
18
22
|
attr_reader email: String?
|
|
19
23
|
|
|
20
24
|
def email=: (String) -> String
|
|
@@ -23,23 +27,19 @@ module Userplex
|
|
|
23
27
|
|
|
24
28
|
def name=: (String) -> String
|
|
25
29
|
|
|
26
|
-
attr_reader properties: ::Hash[Symbol, top?]?
|
|
27
|
-
|
|
28
|
-
def properties=: (::Hash[Symbol, top?]) -> ::Hash[Symbol, top?]
|
|
29
|
-
|
|
30
30
|
def initialize: (
|
|
31
31
|
user_id: String,
|
|
32
|
+
?attributes: ::Hash[Symbol, top],
|
|
32
33
|
?email: String,
|
|
33
34
|
?name: String,
|
|
34
|
-
?properties: ::Hash[Symbol, top?],
|
|
35
35
|
?request_options: Userplex::request_opts
|
|
36
36
|
) -> void
|
|
37
37
|
|
|
38
38
|
def to_hash: -> {
|
|
39
39
|
user_id: String,
|
|
40
|
+
attributes: ::Hash[Symbol, top],
|
|
40
41
|
email: String,
|
|
41
42
|
name: String,
|
|
42
|
-
properties: ::Hash[Symbol, top?],
|
|
43
43
|
request_options: Userplex::RequestOptions
|
|
44
44
|
}
|
|
45
45
|
end
|
|
@@ -2,16 +2,15 @@ module Userplex
|
|
|
2
2
|
module Resources
|
|
3
3
|
class Logs
|
|
4
4
|
def batch: (
|
|
5
|
-
|
|
5
|
+
?body: ::Array[Userplex::LogBatchParams::Body],
|
|
6
6
|
?request_options: Userplex::request_opts
|
|
7
7
|
) -> Userplex::Models::LogBatchResponse
|
|
8
8
|
|
|
9
9
|
def new: (
|
|
10
10
|
name: String,
|
|
11
|
-
|
|
12
|
-
?data: ::Hash[Symbol, top?],
|
|
13
|
-
?properties: ::Hash[Symbol, top?],
|
|
11
|
+
?data: ::Hash[Symbol, top],
|
|
14
12
|
?timestamp: Time,
|
|
13
|
+
?user_id: String,
|
|
15
14
|
?request_options: Userplex::request_opts
|
|
16
15
|
) -> Userplex::Models::LogNewResponse
|
|
17
16
|
|
|
@@ -3,9 +3,9 @@ module Userplex
|
|
|
3
3
|
class Users
|
|
4
4
|
def identify: (
|
|
5
5
|
user_id: String,
|
|
6
|
+
?attributes: ::Hash[Symbol, top],
|
|
6
7
|
?email: String,
|
|
7
8
|
?name: String,
|
|
8
|
-
?properties: ::Hash[Symbol, top?],
|
|
9
9
|
?request_options: Userplex::request_opts
|
|
10
10
|
) -> Userplex::Models::UserIdentifyResponse
|
|
11
11
|
|
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.9.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-
|
|
11
|
+
date: 2025-12-23 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: connection_pool
|