altertable 0.3.0 → 1.0.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/.github/workflows/ci.yml +15 -0
- data/.release-please-manifest.json +1 -1
- data/CHANGELOG.md +18 -0
- data/Gemfile +2 -0
- data/Gemfile.lock +46 -2
- data/README.md +5 -5
- data/altertable.gemspec +4 -1
- data/lib/altertable/client.rb +16 -7
- data/lib/altertable/version.rb +1 -1
- data/lib/altertable.rb +6 -6
- data/mise.toml +2 -0
- data/rbi/altertable.rbi +133 -0
- data/rbi/todo.rbi +6 -0
- data/sig/altertable/client.rbs +3 -3
- data/sig/altertable.rbs +3 -3
- metadata +46 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 574aa97c12dd4aa1269c82025cb2d754e6efacd84b5ab731677be50489e53798
|
|
4
|
+
data.tar.gz: 90686c8a67e974d038bf4cf72749c02ef981e159096ab033b6273e50b3ad3f87
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 84bfd405b72decd8ab65dced443a74ea5d6bf7b53a16cd206b965e2735085fb3e36e52a71e0a100aa10a6e60801d3e28a1e89a65cdec00e078f97bd35842f071
|
|
7
|
+
data.tar.gz: ac1939bddc0385a4df1727b98e1eb33d7c85cef7d76d9fb9c151afd22bb8b132522656d6ff75d50126bbb0575c279b0ea722f29c79ff6ed6280db161b5b998ea
|
data/.github/workflows/ci.yml
CHANGED
|
@@ -40,3 +40,18 @@ jobs:
|
|
|
40
40
|
|
|
41
41
|
- name: Run tests
|
|
42
42
|
run: bundle exec rake spec
|
|
43
|
+
|
|
44
|
+
typing:
|
|
45
|
+
name: "Typing & lint"
|
|
46
|
+
runs-on: ubuntu-latest
|
|
47
|
+
steps:
|
|
48
|
+
- uses: actions/checkout@v4
|
|
49
|
+
- name: Set up Ruby
|
|
50
|
+
uses: ruby/setup-ruby@v1
|
|
51
|
+
with:
|
|
52
|
+
ruby-version: "3.4"
|
|
53
|
+
bundler-cache: true
|
|
54
|
+
- name: Validate RBS
|
|
55
|
+
run: bundle exec rbs validate
|
|
56
|
+
- name: Typecheck with Sorbet
|
|
57
|
+
run: bundle exec srb tc
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.0.0](https://github.com/altertable-ai/altertable-ruby/compare/altertable/v0.4.0...altertable/v1.0.0) (2026-03-09)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### ⚠ BREAKING CHANGES
|
|
7
|
+
|
|
8
|
+
* update method signatures to v0.9.0 specs ([#23](https://github.com/altertable-ai/altertable-ruby/issues/23))
|
|
9
|
+
|
|
10
|
+
### Features
|
|
11
|
+
|
|
12
|
+
* update method signatures to v0.9.0 specs ([#23](https://github.com/altertable-ai/altertable-ruby/issues/23)) ([1c26f52](https://github.com/altertable-ai/altertable-ruby/commit/1c26f5229aa4bd3811ac83351df06d3275496d2f))
|
|
13
|
+
|
|
14
|
+
## [0.4.0](https://github.com/altertable-ai/altertable-ruby/compare/altertable/v0.3.0...altertable/v0.4.0) (2026-03-09)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Features
|
|
18
|
+
|
|
19
|
+
* Add Sorbet typings (RBI) ([#21](https://github.com/altertable-ai/altertable-ruby/issues/21)) ([507b41c](https://github.com/altertable-ai/altertable-ruby/commit/507b41c755d76758ed0de777acb8eeadea420758))
|
|
20
|
+
|
|
3
21
|
## [0.3.0](https://github.com/altertable-ai/altertable-ruby/compare/altertable/v0.2.2...altertable/v0.3.0) (2026-03-09)
|
|
4
22
|
|
|
5
23
|
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
altertable (0.
|
|
4
|
+
altertable (1.0.0)
|
|
5
5
|
|
|
6
6
|
GEM
|
|
7
7
|
remote: https://rubygems.org/
|
|
@@ -10,11 +10,13 @@ GEM
|
|
|
10
10
|
public_suffix (>= 2.0.2, < 8.0)
|
|
11
11
|
ast (2.4.3)
|
|
12
12
|
base64 (0.3.0)
|
|
13
|
+
benchmark (0.5.0)
|
|
13
14
|
bigdecimal (4.0.1)
|
|
14
15
|
diff-lcs (1.6.2)
|
|
15
16
|
docker-api (2.4.0)
|
|
16
17
|
excon (>= 0.64.0)
|
|
17
18
|
multi_json
|
|
19
|
+
erubi (1.13.1)
|
|
18
20
|
excon (1.4.0)
|
|
19
21
|
logger
|
|
20
22
|
faraday (2.14.1)
|
|
@@ -40,6 +42,7 @@ GEM
|
|
|
40
42
|
multi_json (1.19.1)
|
|
41
43
|
net-http (0.9.1)
|
|
42
44
|
uri (>= 0.11.1)
|
|
45
|
+
netrc (0.11.0)
|
|
43
46
|
parallel (1.27.0)
|
|
44
47
|
parser (3.3.10.2)
|
|
45
48
|
ast (~> 2.4.1)
|
|
@@ -49,7 +52,14 @@ GEM
|
|
|
49
52
|
racc (1.8.1)
|
|
50
53
|
rainbow (3.1.1)
|
|
51
54
|
rake (13.3.1)
|
|
55
|
+
rbi (0.3.9)
|
|
56
|
+
prism (~> 1.0)
|
|
57
|
+
rbs (>= 3.4.4)
|
|
58
|
+
rbs (3.10.3)
|
|
59
|
+
logger
|
|
60
|
+
tsort
|
|
52
61
|
regexp_parser (2.11.3)
|
|
62
|
+
rexml (3.4.4)
|
|
53
63
|
rspec (3.13.2)
|
|
54
64
|
rspec-core (~> 3.13.0)
|
|
55
65
|
rspec-expectations (~> 3.13.0)
|
|
@@ -96,18 +106,48 @@ GEM
|
|
|
96
106
|
rubocop-rspec_rails (2.29.1)
|
|
97
107
|
rubocop (~> 1.61)
|
|
98
108
|
ruby-progressbar (1.13.0)
|
|
109
|
+
sorbet (0.6.12997)
|
|
110
|
+
sorbet-static (= 0.6.12997)
|
|
111
|
+
sorbet-runtime (0.6.12997)
|
|
112
|
+
sorbet-static (0.6.12997-universal-darwin)
|
|
113
|
+
sorbet-static (0.6.12997-x86_64-linux)
|
|
114
|
+
sorbet-static-and-runtime (0.6.12997)
|
|
115
|
+
sorbet (= 0.6.12997)
|
|
116
|
+
sorbet-runtime (= 0.6.12997)
|
|
117
|
+
spoom (1.6.3)
|
|
118
|
+
erubi (>= 1.10.0)
|
|
119
|
+
prism (>= 0.28.0)
|
|
120
|
+
rbi (>= 0.3.3)
|
|
121
|
+
rexml (>= 3.2.6)
|
|
122
|
+
sorbet-static-and-runtime (>= 0.5.10187)
|
|
123
|
+
thor (>= 0.19.2)
|
|
124
|
+
tapioca (0.16.11)
|
|
125
|
+
benchmark
|
|
126
|
+
bundler (>= 2.2.25)
|
|
127
|
+
netrc (>= 0.11.0)
|
|
128
|
+
parallel (>= 1.21.0)
|
|
129
|
+
rbi (~> 0.2)
|
|
130
|
+
sorbet-static-and-runtime (>= 0.5.11087)
|
|
131
|
+
spoom (>= 1.2.0)
|
|
132
|
+
thor (>= 1.2.0)
|
|
133
|
+
yard-sorbet
|
|
99
134
|
testcontainers (0.2.0)
|
|
100
135
|
testcontainers-core (= 0.2.0)
|
|
101
136
|
testcontainers-core (0.2.0)
|
|
102
137
|
docker-api (~> 2.2)
|
|
138
|
+
thor (1.5.0)
|
|
139
|
+
tsort (0.2.0)
|
|
103
140
|
unicode-display_width (3.2.0)
|
|
104
141
|
unicode-emoji (~> 4.1)
|
|
105
142
|
unicode-emoji (4.2.0)
|
|
106
143
|
uri (1.1.1)
|
|
144
|
+
yard (0.9.38)
|
|
145
|
+
yard-sorbet (0.9.0)
|
|
146
|
+
sorbet-runtime
|
|
147
|
+
yard
|
|
107
148
|
|
|
108
149
|
PLATFORMS
|
|
109
150
|
arm64-darwin-25
|
|
110
|
-
ruby
|
|
111
151
|
x86_64-linux
|
|
112
152
|
|
|
113
153
|
DEPENDENCIES
|
|
@@ -118,10 +158,14 @@ DEPENDENCIES
|
|
|
118
158
|
faraday-retry
|
|
119
159
|
httpx
|
|
120
160
|
rake (~> 13.0)
|
|
161
|
+
rbs
|
|
121
162
|
rspec (~> 3.0, >= 0)
|
|
122
163
|
rubocop (~> 1.0)
|
|
123
164
|
rubocop-performance (~> 1.0)
|
|
124
165
|
rubocop-rspec (~> 2.0)
|
|
166
|
+
sorbet
|
|
167
|
+
sorbet-runtime
|
|
168
|
+
tapioca
|
|
125
169
|
testcontainers
|
|
126
170
|
|
|
127
171
|
BUNDLED WITH
|
data/README.md
CHANGED
|
@@ -29,25 +29,25 @@ Altertable.init('your_api_key', {
|
|
|
29
29
|
### Tracking Events
|
|
30
30
|
|
|
31
31
|
```ruby
|
|
32
|
-
Altertable.track('button_clicked', 'user_123', {
|
|
32
|
+
Altertable.track('button_clicked', 'user_123', properties: {
|
|
33
33
|
button_id: 'signup_btn',
|
|
34
34
|
page: 'home'
|
|
35
|
-
})
|
|
35
|
+
}, timestamp: Time.now.utc.iso8601)
|
|
36
36
|
```
|
|
37
37
|
|
|
38
38
|
### Identifying Users
|
|
39
39
|
|
|
40
40
|
```ruby
|
|
41
|
-
Altertable.identify('user_123', {
|
|
41
|
+
Altertable.identify('user_123', traits: {
|
|
42
42
|
email: 'user@example.com',
|
|
43
43
|
name: 'John Doe'
|
|
44
|
-
})
|
|
44
|
+
}, anonymous_id: 'previous_anon_id')
|
|
45
45
|
```
|
|
46
46
|
|
|
47
47
|
### Alias
|
|
48
48
|
|
|
49
49
|
```ruby
|
|
50
|
-
Altertable.alias('
|
|
50
|
+
Altertable.alias('previous_anonymous_id', 'new_user_id')
|
|
51
51
|
```
|
|
52
52
|
|
|
53
53
|
## License
|
data/altertable.gemspec
CHANGED
|
@@ -19,7 +19,7 @@ Gem::Specification.new do |spec|
|
|
|
19
19
|
spec.metadata["changelog_uri"] = "https://github.com/altertable-ai/altertable-ruby/blob/main/CHANGELOG.md"
|
|
20
20
|
|
|
21
21
|
spec.files = Dir.chdir(File.expand_path(__dir__)) do
|
|
22
|
-
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
|
22
|
+
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features|sorbet)/}) }
|
|
23
23
|
end
|
|
24
24
|
spec.bindir = "exe"
|
|
25
25
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
|
@@ -31,6 +31,9 @@ Gem::Specification.new do |spec|
|
|
|
31
31
|
spec.add_development_dependency "rubocop-performance", "~> 1.0"
|
|
32
32
|
spec.add_development_dependency "rubocop-rspec", "~> 2.0"
|
|
33
33
|
spec.add_development_dependency "testcontainers"
|
|
34
|
+
spec.add_development_dependency "rbs"
|
|
35
|
+
spec.add_development_dependency "sorbet"
|
|
36
|
+
spec.add_development_dependency "sorbet-runtime"
|
|
34
37
|
|
|
35
38
|
# Optional adapter support (development only)
|
|
36
39
|
spec.add_development_dependency "faraday", "~> 2.0"
|
data/lib/altertable/client.rb
CHANGED
|
@@ -31,9 +31,11 @@ module Altertable
|
|
|
31
31
|
@adapter = select_adapter(adapter_name, { base_url: @base_url, timeout: @timeout, headers: headers })
|
|
32
32
|
end
|
|
33
33
|
|
|
34
|
-
def track(event, distinct_id,
|
|
34
|
+
def track(event, distinct_id, **options)
|
|
35
|
+
properties = options[:properties] || {}
|
|
36
|
+
timestamp = options[:timestamp] || Time.now.utc.iso8601(3)
|
|
35
37
|
payload = {
|
|
36
|
-
timestamp:
|
|
38
|
+
timestamp: timestamp,
|
|
37
39
|
event: event,
|
|
38
40
|
environment: @environment,
|
|
39
41
|
distinct_id: distinct_id,
|
|
@@ -43,26 +45,33 @@ module Altertable
|
|
|
43
45
|
}.merge(properties)
|
|
44
46
|
}
|
|
45
47
|
payload[:properties]["$release"] = @release if @release
|
|
48
|
+
payload[:anonymous_id] = options[:anonymous_id] if options.key?(:anonymous_id)
|
|
49
|
+
payload[:device_id] = options[:device_id] if options.key?(:device_id)
|
|
46
50
|
|
|
47
51
|
post("/track", payload)
|
|
48
52
|
end
|
|
49
53
|
|
|
50
|
-
def identify(user_id,
|
|
54
|
+
def identify(user_id, **options)
|
|
55
|
+
traits = options[:traits] || {}
|
|
56
|
+
timestamp = options[:timestamp] || Time.now.utc.iso8601(3)
|
|
51
57
|
payload = {
|
|
52
|
-
timestamp:
|
|
58
|
+
timestamp: timestamp,
|
|
53
59
|
environment: @environment,
|
|
54
60
|
distinct_id: user_id,
|
|
55
61
|
traits: traits
|
|
56
62
|
}
|
|
63
|
+
payload[:anonymous_id] = options[:anonymous_id] if options.key?(:anonymous_id)
|
|
64
|
+
payload[:device_id] = options[:device_id] if options.key?(:device_id)
|
|
57
65
|
|
|
58
66
|
post("/identify", payload)
|
|
59
67
|
end
|
|
60
68
|
|
|
61
|
-
def alias(new_user_id,
|
|
69
|
+
def alias(distinct_id, new_user_id, **options)
|
|
70
|
+
timestamp = options[:timestamp] || Time.now.utc.iso8601(3)
|
|
62
71
|
payload = {
|
|
63
|
-
timestamp:
|
|
72
|
+
timestamp: timestamp,
|
|
64
73
|
environment: @environment,
|
|
65
|
-
distinct_id:
|
|
74
|
+
distinct_id: distinct_id,
|
|
66
75
|
new_user_id: new_user_id
|
|
67
76
|
}
|
|
68
77
|
|
data/lib/altertable/version.rb
CHANGED
data/lib/altertable.rb
CHANGED
|
@@ -10,16 +10,16 @@ module Altertable
|
|
|
10
10
|
@client = Client.new(api_key, options)
|
|
11
11
|
end
|
|
12
12
|
|
|
13
|
-
def track(event,
|
|
14
|
-
client.track(event,
|
|
13
|
+
def track(event, distinct_id, **options)
|
|
14
|
+
client.track(event, distinct_id, **options)
|
|
15
15
|
end
|
|
16
16
|
|
|
17
|
-
def identify(user_id,
|
|
18
|
-
client.identify(user_id,
|
|
17
|
+
def identify(user_id, **options)
|
|
18
|
+
client.identify(user_id, **options)
|
|
19
19
|
end
|
|
20
20
|
|
|
21
|
-
def alias(new_user_id,
|
|
22
|
-
client.alias(new_user_id,
|
|
21
|
+
def alias(distinct_id, new_user_id, **options)
|
|
22
|
+
client.alias(distinct_id, new_user_id, **options)
|
|
23
23
|
end
|
|
24
24
|
|
|
25
25
|
def client
|
data/mise.toml
ADDED
data/rbi/altertable.rbi
ADDED
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
# typed: true
|
|
2
|
+
|
|
3
|
+
module Altertable
|
|
4
|
+
VERSION = T.let(T.unsafe(nil), String)
|
|
5
|
+
|
|
6
|
+
class AltertableError < StandardError
|
|
7
|
+
sig { returns(T.nilable(Exception)) }
|
|
8
|
+
attr_reader :cause
|
|
9
|
+
|
|
10
|
+
sig { params(message: String, cause: T.nilable(Exception)).void }
|
|
11
|
+
def initialize(message, cause = nil); end
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
class ConfigurationError < AltertableError; end
|
|
15
|
+
|
|
16
|
+
class ApiError < AltertableError
|
|
17
|
+
sig { returns(Integer) }
|
|
18
|
+
attr_reader :status
|
|
19
|
+
|
|
20
|
+
sig { returns(T::Hash[String, T.untyped]) }
|
|
21
|
+
attr_reader :details
|
|
22
|
+
|
|
23
|
+
sig { params(message: String, status: Integer, details: T::Hash[String, T.untyped]).void }
|
|
24
|
+
def initialize(message, status, details = {}); end
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
class NetworkError < AltertableError; end
|
|
28
|
+
|
|
29
|
+
class Client
|
|
30
|
+
DEFAULT_BASE_URL = T.let(T.unsafe(nil), String)
|
|
31
|
+
DEFAULT_TIMEOUT = T.let(T.unsafe(nil), Integer)
|
|
32
|
+
DEFAULT_ENVIRONMENT = T.let(T.unsafe(nil), String)
|
|
33
|
+
|
|
34
|
+
sig { params(api_key: String, options: T::Hash[Symbol, T.untyped]).void }
|
|
35
|
+
def initialize(api_key, options = {}); end
|
|
36
|
+
|
|
37
|
+
sig { params(event: String, distinct_id: String, options: T.untyped).returns(T.untyped) }
|
|
38
|
+
def track(event, distinct_id, **options); end
|
|
39
|
+
|
|
40
|
+
sig { params(user_id: String, options: T.untyped).returns(T.untyped) }
|
|
41
|
+
def identify(user_id, **options); end
|
|
42
|
+
|
|
43
|
+
sig { params(distinct_id: String, new_user_id: String, options: T.untyped).returns(T.untyped) }
|
|
44
|
+
def alias(distinct_id, new_user_id, **options); end
|
|
45
|
+
|
|
46
|
+
private
|
|
47
|
+
|
|
48
|
+
sig { params(name: T.nilable(Symbol), options: T::Hash[Symbol, T.untyped]).returns(T.untyped) }
|
|
49
|
+
def select_adapter(name, options); end
|
|
50
|
+
|
|
51
|
+
sig { params(gem_name: String).returns(T::Boolean) }
|
|
52
|
+
def try_require(gem_name); end
|
|
53
|
+
|
|
54
|
+
sig { params(path: String, payload: T::Hash[T.any(Symbol, String), T.untyped]).returns(T.untyped) }
|
|
55
|
+
def post(path, payload); end
|
|
56
|
+
|
|
57
|
+
sig { params(res: T.untyped).returns(T.untyped) }
|
|
58
|
+
def handle_response(res); end
|
|
59
|
+
|
|
60
|
+
sig { params(error: Exception).returns(T.untyped) }
|
|
61
|
+
def handle_error(error); end
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
module Adapters
|
|
65
|
+
class Response
|
|
66
|
+
sig { returns(Integer) }
|
|
67
|
+
attr_reader :status
|
|
68
|
+
|
|
69
|
+
sig { returns(String) }
|
|
70
|
+
attr_reader :body
|
|
71
|
+
|
|
72
|
+
sig { params(status: Integer, body: String).void }
|
|
73
|
+
def initialize(status, body); end
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
class Base
|
|
77
|
+
sig { params(base_url: String, timeout: T.any(Integer, Float), headers: T.nilable(T::Hash[String, String])).void }
|
|
78
|
+
def initialize(base_url:, timeout:, headers: nil); end
|
|
79
|
+
|
|
80
|
+
sig { params(path: String, body: T.nilable(String), params: T.nilable(T::Hash[T.any(Symbol, String), T.untyped]), block: T.nilable(T.proc.params(arg0: T.untyped).void)).returns(Response) }
|
|
81
|
+
def post(path, body: nil, params: nil, &block); end
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
class FaradayAdapter < Base
|
|
85
|
+
sig { params(base_url: String, timeout: T.any(Integer, Float), headers: T.nilable(T::Hash[String, String])).void }
|
|
86
|
+
def initialize(base_url:, timeout:, headers: nil); end
|
|
87
|
+
|
|
88
|
+
sig { params(path: String, body: T.nilable(String), params: T.nilable(T::Hash[T.any(Symbol, String), T.untyped]), block: T.nilable(T.proc.params(arg0: T.untyped).void)).returns(Response) }
|
|
89
|
+
def post(path, body: nil, params: nil, &block); end
|
|
90
|
+
|
|
91
|
+
private
|
|
92
|
+
|
|
93
|
+
sig { params(resp: T.untyped).returns(Response) }
|
|
94
|
+
def wrap_response(resp); end
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
class HttpxAdapter < Base
|
|
98
|
+
sig { params(base_url: String, timeout: T.any(Integer, Float), headers: T.nilable(T::Hash[String, String])).void }
|
|
99
|
+
def initialize(base_url:, timeout:, headers: nil); end
|
|
100
|
+
|
|
101
|
+
sig { params(path: String, body: T.nilable(String), params: T.nilable(T::Hash[T.any(Symbol, String), T.untyped]), block: T.nilable(T.proc.params(arg0: T.untyped).void)).returns(Response) }
|
|
102
|
+
def post(path, body: nil, params: nil, &block); end
|
|
103
|
+
|
|
104
|
+
private
|
|
105
|
+
|
|
106
|
+
sig { params(resp: T.untyped).returns(Response) }
|
|
107
|
+
def wrap_response(resp); end
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
class NetHttpAdapter < Base
|
|
111
|
+
sig { params(base_url: String, timeout: T.any(Integer, Float), headers: T.nilable(T::Hash[String, String])).void }
|
|
112
|
+
def initialize(base_url:, timeout:, headers: nil); end
|
|
113
|
+
|
|
114
|
+
sig { params(path: String, body: T.nilable(String), params: T.nilable(T::Hash[T.any(Symbol, String), T.untyped]), block: T.nilable(T.proc.params(arg0: T.untyped).void)).returns(Response) }
|
|
115
|
+
def post(path, body: nil, params: nil, &block); end
|
|
116
|
+
end
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
sig { params(api_key: String, options: T::Hash[Symbol, T.untyped]).returns(Client) }
|
|
120
|
+
def self.init(api_key, options = {}); end
|
|
121
|
+
|
|
122
|
+
sig { params(event: String, distinct_id: String, options: T.untyped).returns(T.untyped) }
|
|
123
|
+
def self.track(event, distinct_id, **options); end
|
|
124
|
+
|
|
125
|
+
sig { params(user_id: String, options: T.untyped).returns(T.untyped) }
|
|
126
|
+
def self.identify(user_id, **options); end
|
|
127
|
+
|
|
128
|
+
sig { params(distinct_id: String, new_user_id: String, options: T.untyped).returns(T.untyped) }
|
|
129
|
+
def self.alias(distinct_id, new_user_id, **options); end
|
|
130
|
+
|
|
131
|
+
sig { returns(Client) }
|
|
132
|
+
def self.client; end
|
|
133
|
+
end
|
data/rbi/todo.rbi
ADDED
data/sig/altertable/client.rbs
CHANGED
|
@@ -15,11 +15,11 @@ module Altertable
|
|
|
15
15
|
|
|
16
16
|
def initialize: (String api_key, ?::Hash[Symbol, untyped] options) -> void
|
|
17
17
|
|
|
18
|
-
def track: (String event, String distinct_id,
|
|
18
|
+
def track: (String event, String distinct_id, **untyped options) -> untyped
|
|
19
19
|
|
|
20
|
-
def identify: (String user_id,
|
|
20
|
+
def identify: (String user_id, **untyped options) -> untyped
|
|
21
21
|
|
|
22
|
-
def alias: (String
|
|
22
|
+
def alias: (String distinct_id, String new_user_id, **untyped options) -> untyped
|
|
23
23
|
|
|
24
24
|
private
|
|
25
25
|
|
data/sig/altertable.rbs
CHANGED
|
@@ -3,11 +3,11 @@ module Altertable
|
|
|
3
3
|
|
|
4
4
|
def self.init: (String api_key, ?::Hash[Symbol, untyped] options) -> Client
|
|
5
5
|
|
|
6
|
-
def self.track: (String event, String
|
|
6
|
+
def self.track: (String event, String distinct_id, **untyped options) -> untyped
|
|
7
7
|
|
|
8
|
-
def self.identify: (String user_id,
|
|
8
|
+
def self.identify: (String user_id, **untyped options) -> untyped
|
|
9
9
|
|
|
10
|
-
def self.alias: (String
|
|
10
|
+
def self.alias: (String distinct_id, String new_user_id, **untyped options) -> untyped
|
|
11
11
|
|
|
12
12
|
def self.client: () -> Client
|
|
13
13
|
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: altertable
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 1.0.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Altertable
|
|
@@ -93,6 +93,48 @@ dependencies:
|
|
|
93
93
|
- - ">="
|
|
94
94
|
- !ruby/object:Gem::Version
|
|
95
95
|
version: '0'
|
|
96
|
+
- !ruby/object:Gem::Dependency
|
|
97
|
+
name: rbs
|
|
98
|
+
requirement: !ruby/object:Gem::Requirement
|
|
99
|
+
requirements:
|
|
100
|
+
- - ">="
|
|
101
|
+
- !ruby/object:Gem::Version
|
|
102
|
+
version: '0'
|
|
103
|
+
type: :development
|
|
104
|
+
prerelease: false
|
|
105
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
106
|
+
requirements:
|
|
107
|
+
- - ">="
|
|
108
|
+
- !ruby/object:Gem::Version
|
|
109
|
+
version: '0'
|
|
110
|
+
- !ruby/object:Gem::Dependency
|
|
111
|
+
name: sorbet
|
|
112
|
+
requirement: !ruby/object:Gem::Requirement
|
|
113
|
+
requirements:
|
|
114
|
+
- - ">="
|
|
115
|
+
- !ruby/object:Gem::Version
|
|
116
|
+
version: '0'
|
|
117
|
+
type: :development
|
|
118
|
+
prerelease: false
|
|
119
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
120
|
+
requirements:
|
|
121
|
+
- - ">="
|
|
122
|
+
- !ruby/object:Gem::Version
|
|
123
|
+
version: '0'
|
|
124
|
+
- !ruby/object:Gem::Dependency
|
|
125
|
+
name: sorbet-runtime
|
|
126
|
+
requirement: !ruby/object:Gem::Requirement
|
|
127
|
+
requirements:
|
|
128
|
+
- - ">="
|
|
129
|
+
- !ruby/object:Gem::Version
|
|
130
|
+
version: '0'
|
|
131
|
+
type: :development
|
|
132
|
+
prerelease: false
|
|
133
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
134
|
+
requirements:
|
|
135
|
+
- - ">="
|
|
136
|
+
- !ruby/object:Gem::Version
|
|
137
|
+
version: '0'
|
|
96
138
|
- !ruby/object:Gem::Dependency
|
|
97
139
|
name: faraday
|
|
98
140
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -178,6 +220,9 @@ files:
|
|
|
178
220
|
- lib/altertable/client.rb
|
|
179
221
|
- lib/altertable/errors.rb
|
|
180
222
|
- lib/altertable/version.rb
|
|
223
|
+
- mise.toml
|
|
224
|
+
- rbi/altertable.rbi
|
|
225
|
+
- rbi/todo.rbi
|
|
181
226
|
- release-please-config.json
|
|
182
227
|
- sig/altertable.rbs
|
|
183
228
|
- sig/altertable/adapters.rbs
|