turbopuffer-ruby 0.2.1 → 0.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f74d6f24c603153315a8058ef7d2e3de69d0e67cc8826e67dd11b99b21ca3f78
4
- data.tar.gz: a93a4d2debfde1e1d0b50ab1f88a1183ae63059e807926f78bb00a0832e80954
3
+ metadata.gz: 99e3eb20688e659187c07ca3df07cef9944c9693c33943a6aae50d8478522825
4
+ data.tar.gz: 875c6325825502c3a526b7a1d6aef25d4f35b4a2bed71a9969e628ae7d923c02
5
5
  SHA512:
6
- metadata.gz: dce1477f36f20639b896b23f7bd3ff288a1b7f48b1a72de98118f773e0ff48c45cbda88eed2fdc6c511e4e5f0f96a75513171d5591a25da4ed362ad6ad737195
7
- data.tar.gz: c3122f443bdde73ae799e2451f2c74a3b23a89a85623c97029cc21f9fa6910b216a241f792181756d2a6b0ed70b578b516cae45d8748f721b808fe0c5a953a4f
6
+ metadata.gz: abc1a9f6fcbbf0f4a327dc021f3c1da3cba5a575a9078cf345e2ea1d8f4bd099a9697c320d5000a9075419b11aa3b887d476e42bd75a75a54d9db5eab2e1e9f7
7
+ data.tar.gz: 1e1ffce5e90387ed0125c5e2bcb548c4f6e0e345f4ab87d28f1efe2cdfd75ecb729ebdd231887dbfb27f8acc508c217cbd7d8c00dd03b4e29aead0d2f529a83e
data/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.2.2 (2025-07-29)
4
+
5
+ Full Changelog: [v0.2.1...v0.2.2](https://github.com/turbopuffer/turbopuffer-ruby/compare/v0.2.1...v0.2.2)
6
+
7
+ ### Bug Fixes
8
+
9
+ * **api:** api update ([9650229](https://github.com/turbopuffer/turbopuffer-ruby/commit/965022936b5551d035ccba9dceb98f7b180ed34d))
10
+ * **api:** api update ([f27319a](https://github.com/turbopuffer/turbopuffer-ruby/commit/f27319a7f811a5f6975acbb2d714c113f32fb8e8))
11
+ * **internal:** ensure sorbet test always runs serially ([954ee15](https://github.com/turbopuffer/turbopuffer-ruby/commit/954ee1533f161a7da823cd98077edb0d7bb4b750))
12
+
3
13
  ## 0.2.1 (2025-07-28)
4
14
 
5
15
  Full Changelog: [v0.2.0...v0.2.1](https://github.com/turbopuffer/turbopuffer-ruby/compare/v0.2.0...v0.2.1)
data/README.md CHANGED
@@ -17,7 +17,7 @@ To use this gem, install via Bundler by adding the following to your application
17
17
  <!-- x-release-please-start-version -->
18
18
 
19
19
  ```ruby
20
- gem "turbopuffer-ruby", "~> 0.2.1"
20
+ gem "turbopuffer-ruby", "~> 0.2.2"
21
21
  ```
22
22
 
23
23
  <!-- x-release-please-end -->
@@ -10,6 +10,12 @@ module Turbopuffer
10
10
  # @return [Integer]
11
11
  required :approx_logical_bytes, Integer
12
12
 
13
+ # @!attribute approx_row_count
14
+ # The approximate number of rows in the namespace.
15
+ #
16
+ # @return [Integer]
17
+ required :approx_row_count, Integer
18
+
13
19
  # @!attribute created_at
14
20
  # The timestamp when the namespace was created.
15
21
  #
@@ -22,11 +28,13 @@ module Turbopuffer
22
28
  # @return [Hash{Symbol=>Turbopuffer::Models::AttributeSchemaConfig}]
23
29
  required :schema, -> { Turbopuffer::Internal::Type::HashOf[Turbopuffer::AttributeSchemaConfig] }
24
30
 
25
- # @!method initialize(approx_logical_bytes:, created_at:, schema:)
31
+ # @!method initialize(approx_logical_bytes:, approx_row_count:, created_at:, schema:)
26
32
  # Metadata about a namespace.
27
33
  #
28
34
  # @param approx_logical_bytes [Integer] The approximate number of logical bytes in the namespace.
29
35
  #
36
+ # @param approx_row_count [Integer] The approximate number of rows in the namespace.
37
+ #
30
38
  # @param created_at [Time] The timestamp when the namespace was created.
31
39
  #
32
40
  # @param schema [Hash{Symbol=>Turbopuffer::Models::AttributeSchemaConfig}] The schema of the namespace.
@@ -31,6 +31,13 @@ module Turbopuffer
31
31
  # @return [Symbol, Turbopuffer::Models::DistanceMetric, nil]
32
32
  optional :distance_metric, enum: -> { Turbopuffer::DistanceMetric }
33
33
 
34
+ # @!attribute exclude_attributes
35
+ # List of attribute names to exclude from the response. All other attributes will
36
+ # be included in the response.
37
+ #
38
+ # @return [Array<String>, nil]
39
+ optional :exclude_attributes, Turbopuffer::Internal::Type::ArrayOf[String]
40
+
34
41
  # @!attribute filters
35
42
  # Exact filters for attributes to refine search results for. Think of it as a SQL
36
43
  # WHERE clause.
@@ -62,7 +69,7 @@ module Turbopuffer
62
69
  # @return [Symbol, Turbopuffer::Models::VectorEncoding, nil]
63
70
  optional :vector_encoding, enum: -> { Turbopuffer::VectorEncoding }
64
71
 
65
- # @!method initialize(namespace: nil, aggregate_by: nil, consistency: nil, distance_metric: nil, filters: nil, include_attributes: nil, rank_by: nil, top_k: nil, vector_encoding: nil, request_options: {})
72
+ # @!method initialize(namespace: nil, aggregate_by: nil, consistency: nil, distance_metric: nil, exclude_attributes: nil, filters: nil, include_attributes: nil, rank_by: nil, top_k: nil, vector_encoding: nil, request_options: {})
66
73
  # Some parameter documentations has been truncated, see
67
74
  # {Turbopuffer::Models::NamespaceQueryParams} for more details.
68
75
  #
@@ -74,6 +81,8 @@ module Turbopuffer
74
81
  #
75
82
  # @param distance_metric [Symbol, Turbopuffer::Models::DistanceMetric] A function used to calculate vector similarity.
76
83
  #
84
+ # @param exclude_attributes [Array<String>] List of attribute names to exclude from the response. All other attributes will
85
+ #
77
86
  # @param filters [Object] Exact filters for attributes to refine search results for. Think of it as a SQL
78
87
  #
79
88
  # @param include_attributes [Boolean, Array<String>] Whether to include attributes in the response.
@@ -16,6 +16,13 @@ module Turbopuffer
16
16
  # @return [Symbol, Turbopuffer::Models::DistanceMetric, nil]
17
17
  optional :distance_metric, enum: -> { Turbopuffer::DistanceMetric }
18
18
 
19
+ # @!attribute exclude_attributes
20
+ # List of attribute names to exclude from the response. All other attributes will
21
+ # be included in the response.
22
+ #
23
+ # @return [Array<String>, nil]
24
+ optional :exclude_attributes, Turbopuffer::Internal::Type::ArrayOf[String]
25
+
19
26
  # @!attribute filters
20
27
  # Exact filters for attributes to refine search results for. Think of it as a SQL
21
28
  # WHERE clause.
@@ -41,7 +48,7 @@ module Turbopuffer
41
48
  # @return [Integer, nil]
42
49
  optional :top_k, Integer
43
50
 
44
- # @!method initialize(aggregate_by: nil, distance_metric: nil, filters: nil, include_attributes: nil, rank_by: nil, top_k: nil)
51
+ # @!method initialize(aggregate_by: nil, distance_metric: nil, exclude_attributes: nil, filters: nil, include_attributes: nil, rank_by: nil, top_k: nil)
45
52
  # Some parameter documentations has been truncated, see
46
53
  # {Turbopuffer::Models::Query} for more details.
47
54
  #
@@ -51,6 +58,8 @@ module Turbopuffer
51
58
  #
52
59
  # @param distance_metric [Symbol, Turbopuffer::Models::DistanceMetric] A function used to calculate vector similarity.
53
60
  #
61
+ # @param exclude_attributes [Array<String>] List of attribute names to exclude from the response. All other attributes will
62
+ #
54
63
  # @param filters [Object] Exact filters for attributes to refine search results for. Think of it as a SQL
55
64
  #
56
65
  # @param include_attributes [Boolean, Array<String>] Whether to include attributes in the response.
@@ -115,7 +115,7 @@ module Turbopuffer
115
115
  #
116
116
  # Query, filter, full-text search and vector search documents.
117
117
  #
118
- # @overload query(namespace: nil, aggregate_by: nil, consistency: nil, distance_metric: nil, filters: nil, include_attributes: nil, rank_by: nil, top_k: nil, vector_encoding: nil, request_options: {})
118
+ # @overload query(namespace: nil, aggregate_by: nil, consistency: nil, distance_metric: nil, exclude_attributes: nil, filters: nil, include_attributes: nil, rank_by: nil, top_k: nil, vector_encoding: nil, request_options: {})
119
119
  #
120
120
  # @param namespace [String] Path param: The name of the namespace.
121
121
  #
@@ -125,6 +125,8 @@ module Turbopuffer
125
125
  #
126
126
  # @param distance_metric [Symbol, Turbopuffer::Models::DistanceMetric] Body param: A function used to calculate vector similarity.
127
127
  #
128
+ # @param exclude_attributes [Array<String>] Body param: List of attribute names to exclude from the response. All other attr
129
+ #
128
130
  # @param filters [Object] Body param: Exact filters for attributes to refine search results for. Think of
129
131
  #
130
132
  # @param include_attributes [Boolean, Array<String>] Body param: Whether to include attributes in the response.
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Turbopuffer
4
- VERSION = "0.2.1"
4
+ VERSION = "0.2.2"
5
5
  end
@@ -12,6 +12,10 @@ module Turbopuffer
12
12
  sig { returns(Integer) }
13
13
  attr_accessor :approx_logical_bytes
14
14
 
15
+ # The approximate number of rows in the namespace.
16
+ sig { returns(Integer) }
17
+ attr_accessor :approx_row_count
18
+
15
19
  # The timestamp when the namespace was created.
16
20
  sig { returns(Time) }
17
21
  attr_accessor :created_at
@@ -24,6 +28,7 @@ module Turbopuffer
24
28
  sig do
25
29
  params(
26
30
  approx_logical_bytes: Integer,
31
+ approx_row_count: Integer,
27
32
  created_at: Time,
28
33
  schema: T::Hash[Symbol, Turbopuffer::AttributeSchemaConfig::OrHash]
29
34
  ).returns(T.attached_class)
@@ -31,6 +36,8 @@ module Turbopuffer
31
36
  def self.new(
32
37
  # The approximate number of logical bytes in the namespace.
33
38
  approx_logical_bytes:,
39
+ # The approximate number of rows in the namespace.
40
+ approx_row_count:,
34
41
  # The timestamp when the namespace was created.
35
42
  created_at:,
36
43
  # The schema of the namespace.
@@ -42,6 +49,7 @@ module Turbopuffer
42
49
  override.returns(
43
50
  {
44
51
  approx_logical_bytes: Integer,
52
+ approx_row_count: Integer,
45
53
  created_at: Time,
46
54
  schema: T::Hash[Symbol, Turbopuffer::AttributeSchemaConfig]
47
55
  }
@@ -48,6 +48,14 @@ module Turbopuffer
48
48
  end
49
49
  attr_writer :distance_metric
50
50
 
51
+ # List of attribute names to exclude from the response. All other attributes will
52
+ # be included in the response.
53
+ sig { returns(T.nilable(T::Array[String])) }
54
+ attr_reader :exclude_attributes
55
+
56
+ sig { params(exclude_attributes: T::Array[String]).void }
57
+ attr_writer :exclude_attributes
58
+
51
59
  # Exact filters for attributes to refine search results for. Think of it as a SQL
52
60
  # WHERE clause.
53
61
  sig { returns(T.nilable(T.anything)) }
@@ -96,6 +104,7 @@ module Turbopuffer
96
104
  aggregate_by: T::Hash[Symbol, T.anything],
97
105
  consistency: Turbopuffer::NamespaceQueryParams::Consistency::OrHash,
98
106
  distance_metric: Turbopuffer::DistanceMetric::OrSymbol,
107
+ exclude_attributes: T::Array[String],
99
108
  filters: T.anything,
100
109
  include_attributes: Turbopuffer::IncludeAttributes::Variants,
101
110
  rank_by: T.anything,
@@ -113,6 +122,9 @@ module Turbopuffer
113
122
  consistency: nil,
114
123
  # A function used to calculate vector similarity.
115
124
  distance_metric: nil,
125
+ # List of attribute names to exclude from the response. All other attributes will
126
+ # be included in the response.
127
+ exclude_attributes: nil,
116
128
  # Exact filters for attributes to refine search results for. Think of it as a SQL
117
129
  # WHERE clause.
118
130
  filters: nil,
@@ -135,6 +147,7 @@ module Turbopuffer
135
147
  aggregate_by: T::Hash[Symbol, T.anything],
136
148
  consistency: Turbopuffer::NamespaceQueryParams::Consistency,
137
149
  distance_metric: Turbopuffer::DistanceMetric::OrSymbol,
150
+ exclude_attributes: T::Array[String],
138
151
  filters: T.anything,
139
152
  include_attributes: Turbopuffer::IncludeAttributes::Variants,
140
153
  rank_by: T.anything,
@@ -25,6 +25,14 @@ module Turbopuffer
25
25
  end
26
26
  attr_writer :distance_metric
27
27
 
28
+ # List of attribute names to exclude from the response. All other attributes will
29
+ # be included in the response.
30
+ sig { returns(T.nilable(T::Array[String])) }
31
+ attr_reader :exclude_attributes
32
+
33
+ sig { params(exclude_attributes: T::Array[String]).void }
34
+ attr_writer :exclude_attributes
35
+
28
36
  # Exact filters for attributes to refine search results for. Think of it as a SQL
29
37
  # WHERE clause.
30
38
  sig { returns(T.nilable(T.anything)) }
@@ -63,6 +71,7 @@ module Turbopuffer
63
71
  params(
64
72
  aggregate_by: T::Hash[Symbol, T.anything],
65
73
  distance_metric: Turbopuffer::DistanceMetric::OrSymbol,
74
+ exclude_attributes: T::Array[String],
66
75
  filters: T.anything,
67
76
  include_attributes: Turbopuffer::IncludeAttributes::Variants,
68
77
  rank_by: T.anything,
@@ -75,6 +84,9 @@ module Turbopuffer
75
84
  aggregate_by: nil,
76
85
  # A function used to calculate vector similarity.
77
86
  distance_metric: nil,
87
+ # List of attribute names to exclude from the response. All other attributes will
88
+ # be included in the response.
89
+ exclude_attributes: nil,
78
90
  # Exact filters for attributes to refine search results for. Think of it as a SQL
79
91
  # WHERE clause.
80
92
  filters: nil,
@@ -92,6 +104,7 @@ module Turbopuffer
92
104
  {
93
105
  aggregate_by: T::Hash[Symbol, T.anything],
94
106
  distance_metric: Turbopuffer::DistanceMetric::OrSymbol,
107
+ exclude_attributes: T::Array[String],
95
108
  filters: T.anything,
96
109
  include_attributes: Turbopuffer::IncludeAttributes::Variants,
97
110
  rank_by: T.anything,
@@ -76,6 +76,7 @@ module Turbopuffer
76
76
  aggregate_by: T::Hash[Symbol, T.anything],
77
77
  consistency: Turbopuffer::NamespaceQueryParams::Consistency::OrHash,
78
78
  distance_metric: Turbopuffer::DistanceMetric::OrSymbol,
79
+ exclude_attributes: T::Array[String],
79
80
  filters: T.anything,
80
81
  include_attributes: Turbopuffer::IncludeAttributes::Variants,
81
82
  rank_by: T.anything,
@@ -94,6 +95,9 @@ module Turbopuffer
94
95
  consistency: nil,
95
96
  # Body param: A function used to calculate vector similarity.
96
97
  distance_metric: nil,
98
+ # Body param: List of attribute names to exclude from the response. All other
99
+ # attributes will be included in the response.
100
+ exclude_attributes: nil,
97
101
  # Body param: Exact filters for attributes to refine search results for. Think of
98
102
  # it as a SQL WHERE clause.
99
103
  filters: nil,
@@ -3,6 +3,7 @@ module Turbopuffer
3
3
  type namespace_metadata =
4
4
  {
5
5
  approx_logical_bytes: Integer,
6
+ approx_row_count: Integer,
6
7
  created_at: Time,
7
8
  schema: ::Hash[Symbol, Turbopuffer::AttributeSchemaConfig]
8
9
  }
@@ -10,18 +11,22 @@ module Turbopuffer
10
11
  class NamespaceMetadata < Turbopuffer::Internal::Type::BaseModel
11
12
  attr_accessor approx_logical_bytes: Integer
12
13
 
14
+ attr_accessor approx_row_count: Integer
15
+
13
16
  attr_accessor created_at: Time
14
17
 
15
18
  attr_accessor schema: ::Hash[Symbol, Turbopuffer::AttributeSchemaConfig]
16
19
 
17
20
  def initialize: (
18
21
  approx_logical_bytes: Integer,
22
+ approx_row_count: Integer,
19
23
  created_at: Time,
20
24
  schema: ::Hash[Symbol, Turbopuffer::AttributeSchemaConfig]
21
25
  ) -> void
22
26
 
23
27
  def to_hash: -> {
24
28
  approx_logical_bytes: Integer,
29
+ approx_row_count: Integer,
25
30
  created_at: Time,
26
31
  schema: ::Hash[Symbol, Turbopuffer::AttributeSchemaConfig]
27
32
  }
@@ -6,6 +6,7 @@ module Turbopuffer
6
6
  aggregate_by: ::Hash[Symbol, top],
7
7
  consistency: Turbopuffer::NamespaceQueryParams::Consistency,
8
8
  distance_metric: Turbopuffer::Models::distance_metric,
9
+ exclude_attributes: ::Array[String],
9
10
  filters: top,
10
11
  include_attributes: Turbopuffer::Models::include_attributes,
11
12
  rank_by: top,
@@ -38,6 +39,10 @@ module Turbopuffer
38
39
  Turbopuffer::Models::distance_metric
39
40
  ) -> Turbopuffer::Models::distance_metric
40
41
 
42
+ attr_reader exclude_attributes: ::Array[String]?
43
+
44
+ def exclude_attributes=: (::Array[String]) -> ::Array[String]
45
+
41
46
  attr_reader filters: top?
42
47
 
43
48
  def filters=: (top) -> top
@@ -67,6 +72,7 @@ module Turbopuffer
67
72
  ?aggregate_by: ::Hash[Symbol, top],
68
73
  ?consistency: Turbopuffer::NamespaceQueryParams::Consistency,
69
74
  ?distance_metric: Turbopuffer::Models::distance_metric,
75
+ ?exclude_attributes: ::Array[String],
70
76
  ?filters: top,
71
77
  ?include_attributes: Turbopuffer::Models::include_attributes,
72
78
  ?rank_by: top,
@@ -80,6 +86,7 @@ module Turbopuffer
80
86
  aggregate_by: ::Hash[Symbol, top],
81
87
  consistency: Turbopuffer::NamespaceQueryParams::Consistency,
82
88
  distance_metric: Turbopuffer::Models::distance_metric,
89
+ exclude_attributes: ::Array[String],
83
90
  filters: top,
84
91
  include_attributes: Turbopuffer::Models::include_attributes,
85
92
  rank_by: top,
@@ -4,6 +4,7 @@ module Turbopuffer
4
4
  {
5
5
  aggregate_by: ::Hash[Symbol, top],
6
6
  distance_metric: Turbopuffer::Models::distance_metric,
7
+ exclude_attributes: ::Array[String],
7
8
  filters: top,
8
9
  include_attributes: Turbopuffer::Models::include_attributes,
9
10
  rank_by: top,
@@ -21,6 +22,10 @@ module Turbopuffer
21
22
  Turbopuffer::Models::distance_metric
22
23
  ) -> Turbopuffer::Models::distance_metric
23
24
 
25
+ attr_reader exclude_attributes: ::Array[String]?
26
+
27
+ def exclude_attributes=: (::Array[String]) -> ::Array[String]
28
+
24
29
  attr_reader filters: top?
25
30
 
26
31
  def filters=: (top) -> top
@@ -42,6 +47,7 @@ module Turbopuffer
42
47
  def initialize: (
43
48
  ?aggregate_by: ::Hash[Symbol, top],
44
49
  ?distance_metric: Turbopuffer::Models::distance_metric,
50
+ ?exclude_attributes: ::Array[String],
45
51
  ?filters: top,
46
52
  ?include_attributes: Turbopuffer::Models::include_attributes,
47
53
  ?rank_by: top,
@@ -51,6 +57,7 @@ module Turbopuffer
51
57
  def to_hash: -> {
52
58
  aggregate_by: ::Hash[Symbol, top],
53
59
  distance_metric: Turbopuffer::Models::distance_metric,
60
+ exclude_attributes: ::Array[String],
54
61
  filters: top,
55
62
  include_attributes: Turbopuffer::Models::include_attributes,
56
63
  rank_by: top,
@@ -29,6 +29,7 @@ module Turbopuffer
29
29
  ?aggregate_by: ::Hash[Symbol, top],
30
30
  ?consistency: Turbopuffer::NamespaceQueryParams::Consistency,
31
31
  ?distance_metric: Turbopuffer::Models::distance_metric,
32
+ ?exclude_attributes: ::Array[String],
32
33
  ?filters: top,
33
34
  ?include_attributes: Turbopuffer::Models::include_attributes,
34
35
  ?rank_by: top,
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: turbopuffer-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Turbopuffer
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-07-28 00:00:00.000000000 Z
11
+ date: 2025-07-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: connection_pool