turbopuffer 1.4.0 → 1.5.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 +10 -0
- data/README.md +1 -1
- data/lib/turbopuffer/models/namespace_metadata.rb +113 -1
- data/lib/turbopuffer/models/namespace_write_params.rb +29 -1
- data/lib/turbopuffer/resources/namespaces.rb +3 -1
- data/lib/turbopuffer/version.rb +1 -1
- data/rbi/turbopuffer/models/namespace_metadata.rbi +225 -3
- data/rbi/turbopuffer/models/namespace_write_params.rbi +58 -0
- data/rbi/turbopuffer/resources/namespaces.rbi +4 -0
- data/sig/turbopuffer/models/namespace_metadata.rbs +95 -3
- data/sig/turbopuffer/models/namespace_write_params.rbs +21 -0
- data/sig/turbopuffer/resources/namespaces.rbs +1 -0
- 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: a2f5759ef6a54d8d20fd914a7afb761b2f63e9383fe76094336a59d2dd77c887
|
|
4
|
+
data.tar.gz: 6186eaa83038a13743abdc63737933c49666249bf4435067551ac1271c47202e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6c1dc39006702ca0bdba4684355c7c4436522fd796c33031b553523808b2ae6486bbc5865a1e55d5986ccafa837c6ac914319f9171914e1391ff9c9e527f116d
|
|
7
|
+
data.tar.gz: 5b77e8508f24ffbac98423426cc270e812f6ef434d50ceab6397cb8b905e4e4e4a8a2f52f62b84c4051afc2955899f74c39cec35ef6039386eae837567ed5908
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.5.0 (2025-10-21)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v1.4.0...v1.5.0](https://github.com/turbopuffer/turbopuffer-ruby/compare/v1.4.0...v1.5.0)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* Metadata endpoint updates (e.g. to track indexing progress) ([4e631c7](https://github.com/turbopuffer/turbopuffer-ruby/commit/4e631c73375f784d2be0b7acb58c75d336cf1b2c))
|
|
10
|
+
* required for patch_by_filter :facepalm: ([f075887](https://github.com/turbopuffer/turbopuffer-ruby/commit/f0758879e11152cec2506509b5e558c1a6e143c8))
|
|
11
|
+
* stainless: add patch_by_filter ([da661c2](https://github.com/turbopuffer/turbopuffer-ruby/commit/da661c2d9bf4e8eaf3b70ea9430d22998188a02e))
|
|
12
|
+
|
|
3
13
|
## 1.4.0 (2025-10-15)
|
|
4
14
|
|
|
5
15
|
Full Changelog: [v1.3.0...v1.4.0](https://github.com/turbopuffer/turbopuffer-ruby/compare/v1.3.0...v1.4.0)
|
data/README.md
CHANGED
|
@@ -28,7 +28,28 @@ module Turbopuffer
|
|
|
28
28
|
# @return [Hash{Symbol=>Turbopuffer::Models::AttributeSchemaConfig}]
|
|
29
29
|
required :schema, -> { Turbopuffer::Internal::Type::HashOf[Turbopuffer::AttributeSchemaConfig] }
|
|
30
30
|
|
|
31
|
-
# @!
|
|
31
|
+
# @!attribute updated_at
|
|
32
|
+
# The timestamp when the namespace was last modified by a write operation.
|
|
33
|
+
#
|
|
34
|
+
# @return [Time]
|
|
35
|
+
required :updated_at, Time
|
|
36
|
+
|
|
37
|
+
# @!attribute encryption
|
|
38
|
+
# Indicates that the namespace is encrypted with a customer-managed encryption key
|
|
39
|
+
# (CMEK).
|
|
40
|
+
#
|
|
41
|
+
# @return [Boolean, Turbopuffer::Models::NamespaceMetadata::Encryption::Cmek, nil]
|
|
42
|
+
optional :encryption, union: -> { Turbopuffer::NamespaceMetadata::Encryption }
|
|
43
|
+
|
|
44
|
+
# @!attribute index
|
|
45
|
+
#
|
|
46
|
+
# @return [Turbopuffer::Models::NamespaceMetadata::Index::Status, Turbopuffer::Models::NamespaceMetadata::Index::UnionMember1, nil]
|
|
47
|
+
optional :index, union: -> { Turbopuffer::NamespaceMetadata::Index }
|
|
48
|
+
|
|
49
|
+
# @!method initialize(approx_logical_bytes:, approx_row_count:, created_at:, schema:, updated_at:, encryption: nil, index: nil)
|
|
50
|
+
# Some parameter documentations has been truncated, see
|
|
51
|
+
# {Turbopuffer::Models::NamespaceMetadata} for more details.
|
|
52
|
+
#
|
|
32
53
|
# Metadata about a namespace.
|
|
33
54
|
#
|
|
34
55
|
# @param approx_logical_bytes [Integer] The approximate number of logical bytes in the namespace.
|
|
@@ -38,6 +59,97 @@ module Turbopuffer
|
|
|
38
59
|
# @param created_at [Time] The timestamp when the namespace was created.
|
|
39
60
|
#
|
|
40
61
|
# @param schema [Hash{Symbol=>Turbopuffer::Models::AttributeSchemaConfig}] The schema of the namespace.
|
|
62
|
+
#
|
|
63
|
+
# @param updated_at [Time] The timestamp when the namespace was last modified by a write operation.
|
|
64
|
+
#
|
|
65
|
+
# @param encryption [Boolean, Turbopuffer::Models::NamespaceMetadata::Encryption::Cmek] Indicates that the namespace is encrypted with a customer-managed encryption key
|
|
66
|
+
#
|
|
67
|
+
# @param index [Turbopuffer::Models::NamespaceMetadata::Index::Status, Turbopuffer::Models::NamespaceMetadata::Index::UnionMember1]
|
|
68
|
+
|
|
69
|
+
# Indicates that the namespace is encrypted with a customer-managed encryption key
|
|
70
|
+
# (CMEK).
|
|
71
|
+
#
|
|
72
|
+
# @see Turbopuffer::Models::NamespaceMetadata#encryption
|
|
73
|
+
module Encryption
|
|
74
|
+
extend Turbopuffer::Internal::Type::Union
|
|
75
|
+
|
|
76
|
+
variant Turbopuffer::Internal::Type::Boolean
|
|
77
|
+
|
|
78
|
+
# Indicates that the namespace is encrypted with a customer-managed encryption key (CMEK).
|
|
79
|
+
variant -> { Turbopuffer::NamespaceMetadata::Encryption::Cmek }
|
|
80
|
+
|
|
81
|
+
class Cmek < Turbopuffer::Internal::Type::BaseModel
|
|
82
|
+
# @!attribute cmek
|
|
83
|
+
#
|
|
84
|
+
# @return [Turbopuffer::Models::NamespaceMetadata::Encryption::Cmek::Cmek, nil]
|
|
85
|
+
optional :cmek, -> { Turbopuffer::NamespaceMetadata::Encryption::Cmek::Cmek }
|
|
86
|
+
|
|
87
|
+
# @!method initialize(cmek: nil)
|
|
88
|
+
# Indicates that the namespace is encrypted with a customer-managed encryption key
|
|
89
|
+
# (CMEK).
|
|
90
|
+
#
|
|
91
|
+
# @param cmek [Turbopuffer::Models::NamespaceMetadata::Encryption::Cmek::Cmek]
|
|
92
|
+
|
|
93
|
+
# @see Turbopuffer::Models::NamespaceMetadata::Encryption::Cmek#cmek
|
|
94
|
+
class Cmek < Turbopuffer::Internal::Type::BaseModel
|
|
95
|
+
# @!attribute key_name
|
|
96
|
+
# The name of the CMEK key in use.
|
|
97
|
+
#
|
|
98
|
+
# @return [String]
|
|
99
|
+
required :key_name, String
|
|
100
|
+
|
|
101
|
+
# @!method initialize(key_name:)
|
|
102
|
+
# @param key_name [String] The name of the CMEK key in use.
|
|
103
|
+
end
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
# @!method self.variants
|
|
107
|
+
# @return [Array(Boolean, Turbopuffer::Models::NamespaceMetadata::Encryption::Cmek)]
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
# @see Turbopuffer::Models::NamespaceMetadata#index
|
|
111
|
+
module Index
|
|
112
|
+
extend Turbopuffer::Internal::Type::Union
|
|
113
|
+
|
|
114
|
+
variant -> { Turbopuffer::NamespaceMetadata::Index::Status }
|
|
115
|
+
|
|
116
|
+
variant -> { Turbopuffer::NamespaceMetadata::Index::UnionMember1 }
|
|
117
|
+
|
|
118
|
+
class Status < Turbopuffer::Internal::Type::BaseModel
|
|
119
|
+
# @!attribute status
|
|
120
|
+
#
|
|
121
|
+
# @return [Symbol, :"up-to-date"]
|
|
122
|
+
required :status, const: :"up-to-date"
|
|
123
|
+
|
|
124
|
+
# @!method initialize(status: :"up-to-date")
|
|
125
|
+
# @param status [Symbol, :"up-to-date"]
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
class UnionMember1 < Turbopuffer::Internal::Type::BaseModel
|
|
129
|
+
# @!attribute status
|
|
130
|
+
#
|
|
131
|
+
# @return [Symbol, :updating]
|
|
132
|
+
required :status, const: :updating
|
|
133
|
+
|
|
134
|
+
# @!attribute unindexed_bytes
|
|
135
|
+
# The number of bytes in the namespace that are in the write-ahead log but have
|
|
136
|
+
# not yet been indexed.
|
|
137
|
+
#
|
|
138
|
+
# @return [Integer]
|
|
139
|
+
required :unindexed_bytes, Integer
|
|
140
|
+
|
|
141
|
+
# @!method initialize(unindexed_bytes:, status: :updating)
|
|
142
|
+
# Some parameter documentations has been truncated, see
|
|
143
|
+
# {Turbopuffer::Models::NamespaceMetadata::Index::UnionMember1} for more details.
|
|
144
|
+
#
|
|
145
|
+
# @param unindexed_bytes [Integer] The number of bytes in the namespace that are in the write-ahead log but have no
|
|
146
|
+
#
|
|
147
|
+
# @param status [Symbol, :updating]
|
|
148
|
+
end
|
|
149
|
+
|
|
150
|
+
# @!method self.variants
|
|
151
|
+
# @return [Array(Turbopuffer::Models::NamespaceMetadata::Index::Status, Turbopuffer::Models::NamespaceMetadata::Index::UnionMember1)]
|
|
152
|
+
end
|
|
41
153
|
end
|
|
42
154
|
end
|
|
43
155
|
end
|
|
@@ -54,6 +54,12 @@ module Turbopuffer
|
|
|
54
54
|
# @return [Turbopuffer::Models::NamespaceWriteParams::Encryption, nil]
|
|
55
55
|
optional :encryption, -> { Turbopuffer::NamespaceWriteParams::Encryption }
|
|
56
56
|
|
|
57
|
+
# @!attribute patch_by_filter
|
|
58
|
+
# The patch and filter specifying which documents to patch.
|
|
59
|
+
#
|
|
60
|
+
# @return [Turbopuffer::Models::NamespaceWriteParams::PatchByFilter, nil]
|
|
61
|
+
optional :patch_by_filter, -> { Turbopuffer::NamespaceWriteParams::PatchByFilter }
|
|
62
|
+
|
|
57
63
|
# @!attribute patch_columns
|
|
58
64
|
# A list of documents in columnar format. Each key is a column name, mapped to an
|
|
59
65
|
# array of values for that column.
|
|
@@ -98,7 +104,7 @@ module Turbopuffer
|
|
|
98
104
|
# @return [Array<Turbopuffer::Models::Row>, nil]
|
|
99
105
|
optional :upsert_rows, -> { Turbopuffer::Internal::Type::ArrayOf[Turbopuffer::Row] }
|
|
100
106
|
|
|
101
|
-
# @!method initialize(namespace: nil, copy_from_namespace: nil, delete_by_filter: nil, delete_condition: nil, deletes: nil, disable_backpressure: nil, distance_metric: nil, encryption: nil, patch_columns: nil, patch_condition: nil, patch_rows: nil, schema: nil, upsert_columns: nil, upsert_condition: nil, upsert_rows: nil, request_options: {})
|
|
107
|
+
# @!method initialize(namespace: nil, copy_from_namespace: nil, delete_by_filter: nil, delete_condition: nil, deletes: nil, disable_backpressure: nil, distance_metric: nil, encryption: nil, patch_by_filter: nil, patch_columns: nil, patch_condition: nil, patch_rows: nil, schema: nil, upsert_columns: nil, upsert_condition: nil, upsert_rows: nil, request_options: {})
|
|
102
108
|
# Some parameter documentations has been truncated, see
|
|
103
109
|
# {Turbopuffer::Models::NamespaceWriteParams} for more details.
|
|
104
110
|
#
|
|
@@ -118,6 +124,8 @@ module Turbopuffer
|
|
|
118
124
|
#
|
|
119
125
|
# @param encryption [Turbopuffer::Models::NamespaceWriteParams::Encryption] The encryption configuration for a namespace.
|
|
120
126
|
#
|
|
127
|
+
# @param patch_by_filter [Turbopuffer::Models::NamespaceWriteParams::PatchByFilter] The patch and filter specifying which documents to patch.
|
|
128
|
+
#
|
|
121
129
|
# @param patch_columns [Turbopuffer::Models::Columns] A list of documents in columnar format. Each key is a column name, mapped to an
|
|
122
130
|
#
|
|
123
131
|
# @param patch_condition [Object] A condition evaluated against the current value of each document targeted by a p
|
|
@@ -161,6 +169,26 @@ module Turbopuffer
|
|
|
161
169
|
# @param key_name [String] The identifier of the CMEK key to use for encryption. For GCP, the fully-qualifi
|
|
162
170
|
end
|
|
163
171
|
end
|
|
172
|
+
|
|
173
|
+
class PatchByFilter < Turbopuffer::Internal::Type::BaseModel
|
|
174
|
+
# @!attribute filters
|
|
175
|
+
# Filter by attributes. Same syntax as the query endpoint.
|
|
176
|
+
#
|
|
177
|
+
# @return [Object]
|
|
178
|
+
required :filters, Turbopuffer::Internal::Type::Unknown
|
|
179
|
+
|
|
180
|
+
# @!attribute patch
|
|
181
|
+
#
|
|
182
|
+
# @return [Hash{Symbol=>Object}]
|
|
183
|
+
required :patch, Turbopuffer::Internal::Type::HashOf[Turbopuffer::Internal::Type::Unknown]
|
|
184
|
+
|
|
185
|
+
# @!method initialize(filters:, patch:)
|
|
186
|
+
# The patch and filter specifying which documents to patch.
|
|
187
|
+
#
|
|
188
|
+
# @param filters [Object] Filter by attributes. Same syntax as the query endpoint.
|
|
189
|
+
#
|
|
190
|
+
# @param patch [Hash{Symbol=>Object}]
|
|
191
|
+
end
|
|
164
192
|
end
|
|
165
193
|
end
|
|
166
194
|
end
|
|
@@ -305,7 +305,7 @@ module Turbopuffer
|
|
|
305
305
|
#
|
|
306
306
|
# Create, update, or delete documents.
|
|
307
307
|
#
|
|
308
|
-
# @overload write(namespace: nil, copy_from_namespace: nil, delete_by_filter: nil, delete_condition: nil, deletes: nil, disable_backpressure: nil, distance_metric: nil, encryption: nil, patch_columns: nil, patch_condition: nil, patch_rows: nil, schema: nil, upsert_columns: nil, upsert_condition: nil, upsert_rows: nil, request_options: {})
|
|
308
|
+
# @overload write(namespace: nil, copy_from_namespace: nil, delete_by_filter: nil, delete_condition: nil, deletes: nil, disable_backpressure: nil, distance_metric: nil, encryption: nil, patch_by_filter: nil, patch_columns: nil, patch_condition: nil, patch_rows: nil, schema: nil, upsert_columns: nil, upsert_condition: nil, upsert_rows: nil, request_options: {})
|
|
309
309
|
#
|
|
310
310
|
# @param namespace [String] Path param: The name of the namespace.
|
|
311
311
|
#
|
|
@@ -323,6 +323,8 @@ module Turbopuffer
|
|
|
323
323
|
#
|
|
324
324
|
# @param encryption [Turbopuffer::Models::NamespaceWriteParams::Encryption] Body param: The encryption configuration for a namespace.
|
|
325
325
|
#
|
|
326
|
+
# @param patch_by_filter [Turbopuffer::Models::NamespaceWriteParams::PatchByFilter] Body param: The patch and filter specifying which documents to patch.
|
|
327
|
+
#
|
|
326
328
|
# @param patch_columns [Turbopuffer::Models::Columns] Body param: A list of documents in columnar format. Each key is a column name, m
|
|
327
329
|
#
|
|
328
330
|
# @param patch_condition [Object] Body param: A condition evaluated against the current value of each document tar
|
data/lib/turbopuffer/version.rb
CHANGED
|
@@ -24,13 +24,62 @@ module Turbopuffer
|
|
|
24
24
|
sig { returns(T::Hash[Symbol, Turbopuffer::AttributeSchemaConfig]) }
|
|
25
25
|
attr_accessor :schema
|
|
26
26
|
|
|
27
|
+
# The timestamp when the namespace was last modified by a write operation.
|
|
28
|
+
sig { returns(Time) }
|
|
29
|
+
attr_accessor :updated_at
|
|
30
|
+
|
|
31
|
+
# Indicates that the namespace is encrypted with a customer-managed encryption key
|
|
32
|
+
# (CMEK).
|
|
33
|
+
sig do
|
|
34
|
+
returns(T.nilable(Turbopuffer::NamespaceMetadata::Encryption::Variants))
|
|
35
|
+
end
|
|
36
|
+
attr_reader :encryption
|
|
37
|
+
|
|
38
|
+
sig do
|
|
39
|
+
params(
|
|
40
|
+
encryption:
|
|
41
|
+
T.any(
|
|
42
|
+
T::Boolean,
|
|
43
|
+
Turbopuffer::NamespaceMetadata::Encryption::Cmek::OrHash
|
|
44
|
+
)
|
|
45
|
+
).void
|
|
46
|
+
end
|
|
47
|
+
attr_writer :encryption
|
|
48
|
+
|
|
49
|
+
sig do
|
|
50
|
+
returns(T.nilable(Turbopuffer::NamespaceMetadata::Index::Variants))
|
|
51
|
+
end
|
|
52
|
+
attr_reader :index
|
|
53
|
+
|
|
54
|
+
sig do
|
|
55
|
+
params(
|
|
56
|
+
index:
|
|
57
|
+
T.any(
|
|
58
|
+
Turbopuffer::NamespaceMetadata::Index::Status::OrHash,
|
|
59
|
+
Turbopuffer::NamespaceMetadata::Index::UnionMember1::OrHash
|
|
60
|
+
)
|
|
61
|
+
).void
|
|
62
|
+
end
|
|
63
|
+
attr_writer :index
|
|
64
|
+
|
|
27
65
|
# Metadata about a namespace.
|
|
28
66
|
sig do
|
|
29
67
|
params(
|
|
30
68
|
approx_logical_bytes: Integer,
|
|
31
69
|
approx_row_count: Integer,
|
|
32
70
|
created_at: Time,
|
|
33
|
-
schema: T::Hash[Symbol, Turbopuffer::AttributeSchemaConfig::OrHash]
|
|
71
|
+
schema: T::Hash[Symbol, Turbopuffer::AttributeSchemaConfig::OrHash],
|
|
72
|
+
updated_at: Time,
|
|
73
|
+
encryption:
|
|
74
|
+
T.any(
|
|
75
|
+
T::Boolean,
|
|
76
|
+
Turbopuffer::NamespaceMetadata::Encryption::Cmek::OrHash
|
|
77
|
+
),
|
|
78
|
+
index:
|
|
79
|
+
T.any(
|
|
80
|
+
Turbopuffer::NamespaceMetadata::Index::Status::OrHash,
|
|
81
|
+
Turbopuffer::NamespaceMetadata::Index::UnionMember1::OrHash
|
|
82
|
+
)
|
|
34
83
|
).returns(T.attached_class)
|
|
35
84
|
end
|
|
36
85
|
def self.new(
|
|
@@ -41,7 +90,13 @@ module Turbopuffer
|
|
|
41
90
|
# The timestamp when the namespace was created.
|
|
42
91
|
created_at:,
|
|
43
92
|
# The schema of the namespace.
|
|
44
|
-
schema
|
|
93
|
+
schema:,
|
|
94
|
+
# The timestamp when the namespace was last modified by a write operation.
|
|
95
|
+
updated_at:,
|
|
96
|
+
# Indicates that the namespace is encrypted with a customer-managed encryption key
|
|
97
|
+
# (CMEK).
|
|
98
|
+
encryption: nil,
|
|
99
|
+
index: nil
|
|
45
100
|
)
|
|
46
101
|
end
|
|
47
102
|
|
|
@@ -51,12 +106,179 @@ module Turbopuffer
|
|
|
51
106
|
approx_logical_bytes: Integer,
|
|
52
107
|
approx_row_count: Integer,
|
|
53
108
|
created_at: Time,
|
|
54
|
-
schema: T::Hash[Symbol, Turbopuffer::AttributeSchemaConfig]
|
|
109
|
+
schema: T::Hash[Symbol, Turbopuffer::AttributeSchemaConfig],
|
|
110
|
+
updated_at: Time,
|
|
111
|
+
encryption: Turbopuffer::NamespaceMetadata::Encryption::Variants,
|
|
112
|
+
index: Turbopuffer::NamespaceMetadata::Index::Variants
|
|
55
113
|
}
|
|
56
114
|
)
|
|
57
115
|
end
|
|
58
116
|
def to_hash
|
|
59
117
|
end
|
|
118
|
+
|
|
119
|
+
# Indicates that the namespace is encrypted with a customer-managed encryption key
|
|
120
|
+
# (CMEK).
|
|
121
|
+
module Encryption
|
|
122
|
+
extend Turbopuffer::Internal::Type::Union
|
|
123
|
+
|
|
124
|
+
Variants =
|
|
125
|
+
T.type_alias do
|
|
126
|
+
T.any(T::Boolean, Turbopuffer::NamespaceMetadata::Encryption::Cmek)
|
|
127
|
+
end
|
|
128
|
+
|
|
129
|
+
class Cmek < Turbopuffer::Internal::Type::BaseModel
|
|
130
|
+
OrHash =
|
|
131
|
+
T.type_alias do
|
|
132
|
+
T.any(
|
|
133
|
+
Turbopuffer::NamespaceMetadata::Encryption::Cmek,
|
|
134
|
+
Turbopuffer::Internal::AnyHash
|
|
135
|
+
)
|
|
136
|
+
end
|
|
137
|
+
|
|
138
|
+
sig do
|
|
139
|
+
returns(
|
|
140
|
+
T.nilable(Turbopuffer::NamespaceMetadata::Encryption::Cmek::Cmek)
|
|
141
|
+
)
|
|
142
|
+
end
|
|
143
|
+
attr_reader :cmek
|
|
144
|
+
|
|
145
|
+
sig do
|
|
146
|
+
params(
|
|
147
|
+
cmek:
|
|
148
|
+
Turbopuffer::NamespaceMetadata::Encryption::Cmek::Cmek::OrHash
|
|
149
|
+
).void
|
|
150
|
+
end
|
|
151
|
+
attr_writer :cmek
|
|
152
|
+
|
|
153
|
+
# Indicates that the namespace is encrypted with a customer-managed encryption key
|
|
154
|
+
# (CMEK).
|
|
155
|
+
sig do
|
|
156
|
+
params(
|
|
157
|
+
cmek:
|
|
158
|
+
Turbopuffer::NamespaceMetadata::Encryption::Cmek::Cmek::OrHash
|
|
159
|
+
).returns(T.attached_class)
|
|
160
|
+
end
|
|
161
|
+
def self.new(cmek: nil)
|
|
162
|
+
end
|
|
163
|
+
|
|
164
|
+
sig do
|
|
165
|
+
override.returns(
|
|
166
|
+
{ cmek: Turbopuffer::NamespaceMetadata::Encryption::Cmek::Cmek }
|
|
167
|
+
)
|
|
168
|
+
end
|
|
169
|
+
def to_hash
|
|
170
|
+
end
|
|
171
|
+
|
|
172
|
+
class Cmek < Turbopuffer::Internal::Type::BaseModel
|
|
173
|
+
OrHash =
|
|
174
|
+
T.type_alias do
|
|
175
|
+
T.any(
|
|
176
|
+
Turbopuffer::NamespaceMetadata::Encryption::Cmek::Cmek,
|
|
177
|
+
Turbopuffer::Internal::AnyHash
|
|
178
|
+
)
|
|
179
|
+
end
|
|
180
|
+
|
|
181
|
+
# The name of the CMEK key in use.
|
|
182
|
+
sig { returns(String) }
|
|
183
|
+
attr_accessor :key_name
|
|
184
|
+
|
|
185
|
+
sig { params(key_name: String).returns(T.attached_class) }
|
|
186
|
+
def self.new(
|
|
187
|
+
# The name of the CMEK key in use.
|
|
188
|
+
key_name:
|
|
189
|
+
)
|
|
190
|
+
end
|
|
191
|
+
|
|
192
|
+
sig { override.returns({ key_name: String }) }
|
|
193
|
+
def to_hash
|
|
194
|
+
end
|
|
195
|
+
end
|
|
196
|
+
end
|
|
197
|
+
|
|
198
|
+
sig do
|
|
199
|
+
override.returns(
|
|
200
|
+
T::Array[Turbopuffer::NamespaceMetadata::Encryption::Variants]
|
|
201
|
+
)
|
|
202
|
+
end
|
|
203
|
+
def self.variants
|
|
204
|
+
end
|
|
205
|
+
end
|
|
206
|
+
|
|
207
|
+
module Index
|
|
208
|
+
extend Turbopuffer::Internal::Type::Union
|
|
209
|
+
|
|
210
|
+
Variants =
|
|
211
|
+
T.type_alias do
|
|
212
|
+
T.any(
|
|
213
|
+
Turbopuffer::NamespaceMetadata::Index::Status,
|
|
214
|
+
Turbopuffer::NamespaceMetadata::Index::UnionMember1
|
|
215
|
+
)
|
|
216
|
+
end
|
|
217
|
+
|
|
218
|
+
class Status < Turbopuffer::Internal::Type::BaseModel
|
|
219
|
+
OrHash =
|
|
220
|
+
T.type_alias do
|
|
221
|
+
T.any(
|
|
222
|
+
Turbopuffer::NamespaceMetadata::Index::Status,
|
|
223
|
+
Turbopuffer::Internal::AnyHash
|
|
224
|
+
)
|
|
225
|
+
end
|
|
226
|
+
|
|
227
|
+
sig { returns(Symbol) }
|
|
228
|
+
attr_accessor :status
|
|
229
|
+
|
|
230
|
+
sig { params(status: Symbol).returns(T.attached_class) }
|
|
231
|
+
def self.new(status: :"up-to-date")
|
|
232
|
+
end
|
|
233
|
+
|
|
234
|
+
sig { override.returns({ status: Symbol }) }
|
|
235
|
+
def to_hash
|
|
236
|
+
end
|
|
237
|
+
end
|
|
238
|
+
|
|
239
|
+
class UnionMember1 < Turbopuffer::Internal::Type::BaseModel
|
|
240
|
+
OrHash =
|
|
241
|
+
T.type_alias do
|
|
242
|
+
T.any(
|
|
243
|
+
Turbopuffer::NamespaceMetadata::Index::UnionMember1,
|
|
244
|
+
Turbopuffer::Internal::AnyHash
|
|
245
|
+
)
|
|
246
|
+
end
|
|
247
|
+
|
|
248
|
+
sig { returns(Symbol) }
|
|
249
|
+
attr_accessor :status
|
|
250
|
+
|
|
251
|
+
# The number of bytes in the namespace that are in the write-ahead log but have
|
|
252
|
+
# not yet been indexed.
|
|
253
|
+
sig { returns(Integer) }
|
|
254
|
+
attr_accessor :unindexed_bytes
|
|
255
|
+
|
|
256
|
+
sig do
|
|
257
|
+
params(unindexed_bytes: Integer, status: Symbol).returns(
|
|
258
|
+
T.attached_class
|
|
259
|
+
)
|
|
260
|
+
end
|
|
261
|
+
def self.new(
|
|
262
|
+
# The number of bytes in the namespace that are in the write-ahead log but have
|
|
263
|
+
# not yet been indexed.
|
|
264
|
+
unindexed_bytes:,
|
|
265
|
+
status: :updating
|
|
266
|
+
)
|
|
267
|
+
end
|
|
268
|
+
|
|
269
|
+
sig { override.returns({ status: Symbol, unindexed_bytes: Integer }) }
|
|
270
|
+
def to_hash
|
|
271
|
+
end
|
|
272
|
+
end
|
|
273
|
+
|
|
274
|
+
sig do
|
|
275
|
+
override.returns(
|
|
276
|
+
T::Array[Turbopuffer::NamespaceMetadata::Index::Variants]
|
|
277
|
+
)
|
|
278
|
+
end
|
|
279
|
+
def self.variants
|
|
280
|
+
end
|
|
281
|
+
end
|
|
60
282
|
end
|
|
61
283
|
end
|
|
62
284
|
end
|
|
@@ -75,6 +75,20 @@ module Turbopuffer
|
|
|
75
75
|
end
|
|
76
76
|
attr_writer :encryption
|
|
77
77
|
|
|
78
|
+
# The patch and filter specifying which documents to patch.
|
|
79
|
+
sig do
|
|
80
|
+
returns(T.nilable(Turbopuffer::NamespaceWriteParams::PatchByFilter))
|
|
81
|
+
end
|
|
82
|
+
attr_reader :patch_by_filter
|
|
83
|
+
|
|
84
|
+
sig do
|
|
85
|
+
params(
|
|
86
|
+
patch_by_filter:
|
|
87
|
+
Turbopuffer::NamespaceWriteParams::PatchByFilter::OrHash
|
|
88
|
+
).void
|
|
89
|
+
end
|
|
90
|
+
attr_writer :patch_by_filter
|
|
91
|
+
|
|
78
92
|
# A list of documents in columnar format. Each key is a column name, mapped to an
|
|
79
93
|
# array of values for that column.
|
|
80
94
|
sig { returns(T.nilable(Turbopuffer::Columns)) }
|
|
@@ -150,6 +164,8 @@ module Turbopuffer
|
|
|
150
164
|
disable_backpressure: T::Boolean,
|
|
151
165
|
distance_metric: Turbopuffer::DistanceMetric::OrSymbol,
|
|
152
166
|
encryption: Turbopuffer::NamespaceWriteParams::Encryption::OrHash,
|
|
167
|
+
patch_by_filter:
|
|
168
|
+
Turbopuffer::NamespaceWriteParams::PatchByFilter::OrHash,
|
|
153
169
|
patch_columns: Turbopuffer::Columns::OrHash,
|
|
154
170
|
patch_condition: T.anything,
|
|
155
171
|
patch_rows: T::Array[Turbopuffer::Row::OrHash],
|
|
@@ -180,6 +196,8 @@ module Turbopuffer
|
|
|
180
196
|
distance_metric: nil,
|
|
181
197
|
# The encryption configuration for a namespace.
|
|
182
198
|
encryption: nil,
|
|
199
|
+
# The patch and filter specifying which documents to patch.
|
|
200
|
+
patch_by_filter: nil,
|
|
183
201
|
# A list of documents in columnar format. Each key is a column name, mapped to an
|
|
184
202
|
# array of values for that column.
|
|
185
203
|
patch_columns: nil,
|
|
@@ -211,6 +229,7 @@ module Turbopuffer
|
|
|
211
229
|
disable_backpressure: T::Boolean,
|
|
212
230
|
distance_metric: Turbopuffer::DistanceMetric::OrSymbol,
|
|
213
231
|
encryption: Turbopuffer::NamespaceWriteParams::Encryption,
|
|
232
|
+
patch_by_filter: Turbopuffer::NamespaceWriteParams::PatchByFilter,
|
|
214
233
|
patch_columns: Turbopuffer::Columns,
|
|
215
234
|
patch_condition: T.anything,
|
|
216
235
|
patch_rows: T::Array[Turbopuffer::Row],
|
|
@@ -296,6 +315,45 @@ module Turbopuffer
|
|
|
296
315
|
end
|
|
297
316
|
end
|
|
298
317
|
end
|
|
318
|
+
|
|
319
|
+
class PatchByFilter < Turbopuffer::Internal::Type::BaseModel
|
|
320
|
+
OrHash =
|
|
321
|
+
T.type_alias do
|
|
322
|
+
T.any(
|
|
323
|
+
Turbopuffer::NamespaceWriteParams::PatchByFilter,
|
|
324
|
+
Turbopuffer::Internal::AnyHash
|
|
325
|
+
)
|
|
326
|
+
end
|
|
327
|
+
|
|
328
|
+
# Filter by attributes. Same syntax as the query endpoint.
|
|
329
|
+
sig { returns(T.anything) }
|
|
330
|
+
attr_accessor :filters
|
|
331
|
+
|
|
332
|
+
sig { returns(T::Hash[Symbol, T.anything]) }
|
|
333
|
+
attr_accessor :patch
|
|
334
|
+
|
|
335
|
+
# The patch and filter specifying which documents to patch.
|
|
336
|
+
sig do
|
|
337
|
+
params(
|
|
338
|
+
filters: T.anything,
|
|
339
|
+
patch: T::Hash[Symbol, T.anything]
|
|
340
|
+
).returns(T.attached_class)
|
|
341
|
+
end
|
|
342
|
+
def self.new(
|
|
343
|
+
# Filter by attributes. Same syntax as the query endpoint.
|
|
344
|
+
filters:,
|
|
345
|
+
patch:
|
|
346
|
+
)
|
|
347
|
+
end
|
|
348
|
+
|
|
349
|
+
sig do
|
|
350
|
+
override.returns(
|
|
351
|
+
{ filters: T.anything, patch: T::Hash[Symbol, T.anything] }
|
|
352
|
+
)
|
|
353
|
+
end
|
|
354
|
+
def to_hash
|
|
355
|
+
end
|
|
356
|
+
end
|
|
299
357
|
end
|
|
300
358
|
end
|
|
301
359
|
end
|
|
@@ -243,6 +243,8 @@ module Turbopuffer
|
|
|
243
243
|
disable_backpressure: T::Boolean,
|
|
244
244
|
distance_metric: Turbopuffer::DistanceMetric::OrSymbol,
|
|
245
245
|
encryption: Turbopuffer::NamespaceWriteParams::Encryption::OrHash,
|
|
246
|
+
patch_by_filter:
|
|
247
|
+
Turbopuffer::NamespaceWriteParams::PatchByFilter::OrHash,
|
|
246
248
|
patch_columns: Turbopuffer::Columns::OrHash,
|
|
247
249
|
patch_condition: T.anything,
|
|
248
250
|
patch_rows: T::Array[Turbopuffer::Row::OrHash],
|
|
@@ -276,6 +278,8 @@ module Turbopuffer
|
|
|
276
278
|
distance_metric: nil,
|
|
277
279
|
# Body param: The encryption configuration for a namespace.
|
|
278
280
|
encryption: nil,
|
|
281
|
+
# Body param: The patch and filter specifying which documents to patch.
|
|
282
|
+
patch_by_filter: nil,
|
|
279
283
|
# Body param: A list of documents in columnar format. Each key is a column name,
|
|
280
284
|
# mapped to an array of values for that column.
|
|
281
285
|
patch_columns: nil,
|
|
@@ -5,7 +5,10 @@ module Turbopuffer
|
|
|
5
5
|
approx_logical_bytes: Integer,
|
|
6
6
|
approx_row_count: Integer,
|
|
7
7
|
created_at: Time,
|
|
8
|
-
schema: ::Hash[Symbol, Turbopuffer::AttributeSchemaConfig]
|
|
8
|
+
schema: ::Hash[Symbol, Turbopuffer::AttributeSchemaConfig],
|
|
9
|
+
updated_at: Time,
|
|
10
|
+
encryption: Turbopuffer::Models::NamespaceMetadata::encryption,
|
|
11
|
+
index: Turbopuffer::Models::NamespaceMetadata::index
|
|
9
12
|
}
|
|
10
13
|
|
|
11
14
|
class NamespaceMetadata < Turbopuffer::Internal::Type::BaseModel
|
|
@@ -17,19 +20,108 @@ module Turbopuffer
|
|
|
17
20
|
|
|
18
21
|
attr_accessor schema: ::Hash[Symbol, Turbopuffer::AttributeSchemaConfig]
|
|
19
22
|
|
|
23
|
+
attr_accessor updated_at: Time
|
|
24
|
+
|
|
25
|
+
attr_reader encryption: Turbopuffer::Models::NamespaceMetadata::encryption?
|
|
26
|
+
|
|
27
|
+
def encryption=: (
|
|
28
|
+
Turbopuffer::Models::NamespaceMetadata::encryption
|
|
29
|
+
) -> Turbopuffer::Models::NamespaceMetadata::encryption
|
|
30
|
+
|
|
31
|
+
attr_reader index: Turbopuffer::Models::NamespaceMetadata::index?
|
|
32
|
+
|
|
33
|
+
def index=: (
|
|
34
|
+
Turbopuffer::Models::NamespaceMetadata::index
|
|
35
|
+
) -> Turbopuffer::Models::NamespaceMetadata::index
|
|
36
|
+
|
|
20
37
|
def initialize: (
|
|
21
38
|
approx_logical_bytes: Integer,
|
|
22
39
|
approx_row_count: Integer,
|
|
23
40
|
created_at: Time,
|
|
24
|
-
schema: ::Hash[Symbol, Turbopuffer::AttributeSchemaConfig]
|
|
41
|
+
schema: ::Hash[Symbol, Turbopuffer::AttributeSchemaConfig],
|
|
42
|
+
updated_at: Time,
|
|
43
|
+
?encryption: Turbopuffer::Models::NamespaceMetadata::encryption,
|
|
44
|
+
?index: Turbopuffer::Models::NamespaceMetadata::index
|
|
25
45
|
) -> void
|
|
26
46
|
|
|
27
47
|
def to_hash: -> {
|
|
28
48
|
approx_logical_bytes: Integer,
|
|
29
49
|
approx_row_count: Integer,
|
|
30
50
|
created_at: Time,
|
|
31
|
-
schema: ::Hash[Symbol, Turbopuffer::AttributeSchemaConfig]
|
|
51
|
+
schema: ::Hash[Symbol, Turbopuffer::AttributeSchemaConfig],
|
|
52
|
+
updated_at: Time,
|
|
53
|
+
encryption: Turbopuffer::Models::NamespaceMetadata::encryption,
|
|
54
|
+
index: Turbopuffer::Models::NamespaceMetadata::index
|
|
32
55
|
}
|
|
56
|
+
|
|
57
|
+
type encryption = bool | Turbopuffer::NamespaceMetadata::Encryption::Cmek
|
|
58
|
+
|
|
59
|
+
module Encryption
|
|
60
|
+
extend Turbopuffer::Internal::Type::Union
|
|
61
|
+
|
|
62
|
+
type cmek =
|
|
63
|
+
{ cmek: Turbopuffer::NamespaceMetadata::Encryption::Cmek::Cmek }
|
|
64
|
+
|
|
65
|
+
class Cmek < Turbopuffer::Internal::Type::BaseModel
|
|
66
|
+
attr_reader cmek: Turbopuffer::NamespaceMetadata::Encryption::Cmek::Cmek?
|
|
67
|
+
|
|
68
|
+
def cmek=: (
|
|
69
|
+
Turbopuffer::NamespaceMetadata::Encryption::Cmek::Cmek
|
|
70
|
+
) -> Turbopuffer::NamespaceMetadata::Encryption::Cmek::Cmek
|
|
71
|
+
|
|
72
|
+
def initialize: (
|
|
73
|
+
?cmek: Turbopuffer::NamespaceMetadata::Encryption::Cmek::Cmek
|
|
74
|
+
) -> void
|
|
75
|
+
|
|
76
|
+
def to_hash: -> {
|
|
77
|
+
cmek: Turbopuffer::NamespaceMetadata::Encryption::Cmek::Cmek
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
type cmek = { key_name: String }
|
|
81
|
+
|
|
82
|
+
class Cmek < Turbopuffer::Internal::Type::BaseModel
|
|
83
|
+
attr_accessor key_name: String
|
|
84
|
+
|
|
85
|
+
def initialize: (key_name: String) -> void
|
|
86
|
+
|
|
87
|
+
def to_hash: -> { key_name: String }
|
|
88
|
+
end
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
def self?.variants: -> ::Array[Turbopuffer::Models::NamespaceMetadata::encryption]
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
type index =
|
|
95
|
+
Turbopuffer::NamespaceMetadata::Index::Status
|
|
96
|
+
| Turbopuffer::NamespaceMetadata::Index::UnionMember1
|
|
97
|
+
|
|
98
|
+
module Index
|
|
99
|
+
extend Turbopuffer::Internal::Type::Union
|
|
100
|
+
|
|
101
|
+
type status = { status: :"up-to-date" }
|
|
102
|
+
|
|
103
|
+
class Status < Turbopuffer::Internal::Type::BaseModel
|
|
104
|
+
attr_accessor status: :"up-to-date"
|
|
105
|
+
|
|
106
|
+
def initialize: (?status: :"up-to-date") -> void
|
|
107
|
+
|
|
108
|
+
def to_hash: -> { status: :"up-to-date" }
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
type union_member1 = { status: :updating, unindexed_bytes: Integer }
|
|
112
|
+
|
|
113
|
+
class UnionMember1 < Turbopuffer::Internal::Type::BaseModel
|
|
114
|
+
attr_accessor status: :updating
|
|
115
|
+
|
|
116
|
+
attr_accessor unindexed_bytes: Integer
|
|
117
|
+
|
|
118
|
+
def initialize: (unindexed_bytes: Integer, ?status: :updating) -> void
|
|
119
|
+
|
|
120
|
+
def to_hash: -> { status: :updating, unindexed_bytes: Integer }
|
|
121
|
+
end
|
|
122
|
+
|
|
123
|
+
def self?.variants: -> ::Array[Turbopuffer::Models::NamespaceMetadata::index]
|
|
124
|
+
end
|
|
33
125
|
end
|
|
34
126
|
end
|
|
35
127
|
end
|
|
@@ -10,6 +10,7 @@ module Turbopuffer
|
|
|
10
10
|
disable_backpressure: bool,
|
|
11
11
|
distance_metric: Turbopuffer::Models::distance_metric,
|
|
12
12
|
encryption: Turbopuffer::NamespaceWriteParams::Encryption,
|
|
13
|
+
patch_by_filter: Turbopuffer::NamespaceWriteParams::PatchByFilter,
|
|
13
14
|
patch_columns: Turbopuffer::Columns,
|
|
14
15
|
patch_condition: top,
|
|
15
16
|
patch_rows: ::Array[Turbopuffer::Row],
|
|
@@ -62,6 +63,12 @@ module Turbopuffer
|
|
|
62
63
|
Turbopuffer::NamespaceWriteParams::Encryption
|
|
63
64
|
) -> Turbopuffer::NamespaceWriteParams::Encryption
|
|
64
65
|
|
|
66
|
+
attr_reader patch_by_filter: Turbopuffer::NamespaceWriteParams::PatchByFilter?
|
|
67
|
+
|
|
68
|
+
def patch_by_filter=: (
|
|
69
|
+
Turbopuffer::NamespaceWriteParams::PatchByFilter
|
|
70
|
+
) -> Turbopuffer::NamespaceWriteParams::PatchByFilter
|
|
71
|
+
|
|
65
72
|
attr_reader patch_columns: Turbopuffer::Columns?
|
|
66
73
|
|
|
67
74
|
def patch_columns=: (Turbopuffer::Columns) -> Turbopuffer::Columns
|
|
@@ -101,6 +108,7 @@ module Turbopuffer
|
|
|
101
108
|
?disable_backpressure: bool,
|
|
102
109
|
?distance_metric: Turbopuffer::Models::distance_metric,
|
|
103
110
|
?encryption: Turbopuffer::NamespaceWriteParams::Encryption,
|
|
111
|
+
?patch_by_filter: Turbopuffer::NamespaceWriteParams::PatchByFilter,
|
|
104
112
|
?patch_columns: Turbopuffer::Columns,
|
|
105
113
|
?patch_condition: top,
|
|
106
114
|
?patch_rows: ::Array[Turbopuffer::Row],
|
|
@@ -120,6 +128,7 @@ module Turbopuffer
|
|
|
120
128
|
disable_backpressure: bool,
|
|
121
129
|
distance_metric: Turbopuffer::Models::distance_metric,
|
|
122
130
|
encryption: Turbopuffer::NamespaceWriteParams::Encryption,
|
|
131
|
+
patch_by_filter: Turbopuffer::NamespaceWriteParams::PatchByFilter,
|
|
123
132
|
patch_columns: Turbopuffer::Columns,
|
|
124
133
|
patch_condition: top,
|
|
125
134
|
patch_rows: ::Array[Turbopuffer::Row],
|
|
@@ -158,6 +167,18 @@ module Turbopuffer
|
|
|
158
167
|
def to_hash: -> { key_name: String }
|
|
159
168
|
end
|
|
160
169
|
end
|
|
170
|
+
|
|
171
|
+
type patch_by_filter = { filters: top, patch: ::Hash[Symbol, top] }
|
|
172
|
+
|
|
173
|
+
class PatchByFilter < Turbopuffer::Internal::Type::BaseModel
|
|
174
|
+
attr_accessor filters: top
|
|
175
|
+
|
|
176
|
+
attr_accessor patch: ::Hash[Symbol, top]
|
|
177
|
+
|
|
178
|
+
def initialize: (filters: top, patch: ::Hash[Symbol, top]) -> void
|
|
179
|
+
|
|
180
|
+
def to_hash: -> { filters: top, patch: ::Hash[Symbol, top] }
|
|
181
|
+
end
|
|
161
182
|
end
|
|
162
183
|
end
|
|
163
184
|
end
|
|
@@ -84,6 +84,7 @@ module Turbopuffer
|
|
|
84
84
|
?disable_backpressure: bool,
|
|
85
85
|
?distance_metric: Turbopuffer::Models::distance_metric,
|
|
86
86
|
?encryption: Turbopuffer::NamespaceWriteParams::Encryption,
|
|
87
|
+
?patch_by_filter: Turbopuffer::NamespaceWriteParams::PatchByFilter,
|
|
87
88
|
?patch_columns: Turbopuffer::Columns,
|
|
88
89
|
?patch_condition: top,
|
|
89
90
|
?patch_rows: ::Array[Turbopuffer::Row],
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: turbopuffer
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.5.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Turbopuffer
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2025-10-
|
|
11
|
+
date: 2025-10-22 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: connection_pool
|