altertable 0.2.2 → 0.3.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/.release-please-manifest.json +1 -1
- data/CHANGELOG.md +7 -0
- data/Gemfile.lock +1 -1
- data/lib/altertable/version.rb +1 -1
- data/sig/altertable/adapters.rbs +48 -0
- data/sig/altertable/client.rbs +32 -0
- data/sig/altertable/errors.rbs +20 -0
- data/sig/altertable/version.rbs +3 -0
- data/sig/altertable.rbs +13 -0
- metadata +6 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 2c8be063d691285f7602a24d6b3a1531423630d7381b458ede9756ada79239c0
|
|
4
|
+
data.tar.gz: 56bcdd6d6fc488b2f611691bf36a483993695580b9e81984529d70bdcea381a9
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 4b8c97dc8b98784b68f65bbd3f60eba9079bb2522cdfc81d5ccec6e49bc0b2af0d231a7fe1b3923b8644106625c271d8a723252cbbfbcd13c1d13f774fc60622
|
|
7
|
+
data.tar.gz: a6f4f4d39a09666af08a85317fb64e66065bc1700ad2c47e8be2d1da791d749c623ceb04adbc4bebb5a5c0dcfff94ab4df3042c2cfcc132b2a15fde4036e5eec
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.3.0](https://github.com/altertable-ai/altertable-ruby/compare/altertable/v0.2.2...altertable/v0.3.0) (2026-03-09)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* add RBS typings for the SDK ([#19](https://github.com/altertable-ai/altertable-ruby/issues/19)) ([38cb619](https://github.com/altertable-ai/altertable-ruby/commit/38cb619f20a7e2c1a1090fb67f7253e122e936c4))
|
|
9
|
+
|
|
3
10
|
## [0.2.2](https://github.com/altertable-ai/altertable-ruby/compare/altertable/v0.2.1...altertable/v0.2.2) (2026-03-08)
|
|
4
11
|
|
|
5
12
|
|
data/Gemfile.lock
CHANGED
data/lib/altertable/version.rb
CHANGED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
module Altertable
|
|
2
|
+
module Adapters
|
|
3
|
+
class Response
|
|
4
|
+
attr_reader status: Integer
|
|
5
|
+
attr_reader body: String
|
|
6
|
+
|
|
7
|
+
def initialize: (Integer status, String body) -> void
|
|
8
|
+
end
|
|
9
|
+
|
|
10
|
+
class Base
|
|
11
|
+
@base_url: String
|
|
12
|
+
@timeout: Integer | Float
|
|
13
|
+
@headers: ::Hash[String, String]
|
|
14
|
+
|
|
15
|
+
def initialize: (base_url: String, timeout: Integer | Float, ?headers: ::Hash[String, String]) -> void
|
|
16
|
+
def post: (String path, ?body: String?, ?params: ::Hash[Symbol | String, untyped]) -> Response
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
class FaradayAdapter < Base
|
|
20
|
+
@conn: untyped
|
|
21
|
+
|
|
22
|
+
def initialize: (base_url: String, timeout: Integer | Float, ?headers: ::Hash[String, String]) -> void
|
|
23
|
+
def post: (String path, ?body: String?, ?params: ::Hash[Symbol | String, untyped]) -> Response
|
|
24
|
+
|
|
25
|
+
private
|
|
26
|
+
|
|
27
|
+
def wrap_response: (untyped resp) -> Response
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
class HttpxAdapter < Base
|
|
31
|
+
@client: untyped
|
|
32
|
+
|
|
33
|
+
def initialize: (base_url: String, timeout: Integer | Float, ?headers: ::Hash[String, String]) -> void
|
|
34
|
+
def post: (String path, ?body: String?, ?params: ::Hash[Symbol | String, untyped]) -> Response
|
|
35
|
+
|
|
36
|
+
private
|
|
37
|
+
|
|
38
|
+
def wrap_response: (untyped resp) -> Response
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
class NetHttpAdapter < Base
|
|
42
|
+
@uri: URI::HTTP | URI::HTTPS
|
|
43
|
+
|
|
44
|
+
def initialize: (base_url: String, timeout: Integer | Float, ?headers: ::Hash[String, String]) -> void
|
|
45
|
+
def post: (String path, ?body: String?, ?params: ::Hash[Symbol | String, untyped]) -> Response
|
|
46
|
+
end
|
|
47
|
+
end
|
|
48
|
+
end
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
module Altertable
|
|
2
|
+
class Client
|
|
3
|
+
@api_key: String
|
|
4
|
+
@base_url: String
|
|
5
|
+
@environment: String
|
|
6
|
+
@timeout: Integer | Float
|
|
7
|
+
@release: String?
|
|
8
|
+
@debug: bool
|
|
9
|
+
@on_error: Proc?
|
|
10
|
+
@adapter: untyped
|
|
11
|
+
|
|
12
|
+
DEFAULT_BASE_URL: String
|
|
13
|
+
DEFAULT_TIMEOUT: Integer
|
|
14
|
+
DEFAULT_ENVIRONMENT: String
|
|
15
|
+
|
|
16
|
+
def initialize: (String api_key, ?::Hash[Symbol, untyped] options) -> void
|
|
17
|
+
|
|
18
|
+
def track: (String event, String distinct_id, ?::Hash[Symbol | String, untyped] properties) -> untyped
|
|
19
|
+
|
|
20
|
+
def identify: (String user_id, ?::Hash[Symbol | String, untyped] traits) -> untyped
|
|
21
|
+
|
|
22
|
+
def alias: (String new_user_id, String previous_id) -> untyped
|
|
23
|
+
|
|
24
|
+
private
|
|
25
|
+
|
|
26
|
+
def select_adapter: (Symbol? name, ::Hash[Symbol, untyped] options) -> untyped
|
|
27
|
+
def try_require: (String gem_name) -> bool
|
|
28
|
+
def post: (String path, ::Hash[Symbol | String, untyped] payload) -> untyped
|
|
29
|
+
def handle_response: (untyped res) -> untyped
|
|
30
|
+
def handle_error: (Exception error) -> untyped
|
|
31
|
+
end
|
|
32
|
+
end
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
module Altertable
|
|
2
|
+
class AltertableError < StandardError
|
|
3
|
+
attr_reader cause: Exception?
|
|
4
|
+
|
|
5
|
+
def initialize: (String message, ?Exception? cause) -> void
|
|
6
|
+
end
|
|
7
|
+
|
|
8
|
+
class ConfigurationError < AltertableError
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
class ApiError < AltertableError
|
|
12
|
+
attr_reader status: Integer
|
|
13
|
+
attr_reader details: ::Hash[String, untyped]
|
|
14
|
+
|
|
15
|
+
def initialize: (String message, Integer status, ?::Hash[String, untyped] details) -> void
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
class NetworkError < AltertableError
|
|
19
|
+
end
|
|
20
|
+
end
|
data/sig/altertable.rbs
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
module Altertable
|
|
2
|
+
@client: Client?
|
|
3
|
+
|
|
4
|
+
def self.init: (String api_key, ?::Hash[Symbol, untyped] options) -> Client
|
|
5
|
+
|
|
6
|
+
def self.track: (String event, String user_id, ?::Hash[Symbol | String, untyped] properties) -> untyped
|
|
7
|
+
|
|
8
|
+
def self.identify: (String user_id, ?::Hash[Symbol | String, untyped] traits) -> untyped
|
|
9
|
+
|
|
10
|
+
def self.alias: (String new_user_id, String previous_id) -> untyped
|
|
11
|
+
|
|
12
|
+
def self.client: () -> Client
|
|
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: 0.3.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Altertable
|
|
@@ -179,6 +179,11 @@ files:
|
|
|
179
179
|
- lib/altertable/errors.rb
|
|
180
180
|
- lib/altertable/version.rb
|
|
181
181
|
- release-please-config.json
|
|
182
|
+
- sig/altertable.rbs
|
|
183
|
+
- sig/altertable/adapters.rbs
|
|
184
|
+
- sig/altertable/client.rbs
|
|
185
|
+
- sig/altertable/errors.rbs
|
|
186
|
+
- sig/altertable/version.rbs
|
|
182
187
|
homepage: https://github.com/altertable-ai/altertable-ruby
|
|
183
188
|
licenses:
|
|
184
189
|
- MIT
|