statelydb 0.21.0 → 0.23.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.
data/rbi/db/get_pb.rbi ADDED
@@ -0,0 +1,293 @@
1
+ # Code generated by protoc-gen-rbi. DO NOT EDIT.
2
+ # source: db/get.proto
3
+ # typed: strict
4
+
5
+ class Stately::Db::GetRequest
6
+ include ::Google::Protobuf::MessageExts
7
+ extend ::Google::Protobuf::MessageExts::ClassMethods
8
+
9
+ sig do
10
+ params(
11
+ store_id: T.nilable(Integer),
12
+ gets: T.nilable(T::Array[T.nilable(Stately::Db::GetItem)]),
13
+ allow_stale: T.nilable(T::Boolean),
14
+ schema_version_id: T.nilable(Integer),
15
+ schema_id: T.nilable(Integer)
16
+ ).void
17
+ end
18
+ def initialize(
19
+ store_id: 0,
20
+ gets: [],
21
+ allow_stale: false,
22
+ schema_version_id: 0,
23
+ schema_id: 0
24
+ )
25
+ end
26
+
27
+ # store_id is a globally unique Store ID, which can be looked up from the
28
+ # console or CLI.
29
+ sig { returns(Integer) }
30
+ def store_id
31
+ end
32
+
33
+ # store_id is a globally unique Store ID, which can be looked up from the
34
+ # console or CLI.
35
+ sig { params(value: Integer).void }
36
+ def store_id=(value)
37
+ end
38
+
39
+ # store_id is a globally unique Store ID, which can be looked up from the
40
+ # console or CLI.
41
+ sig { void }
42
+ def clear_store_id
43
+ end
44
+
45
+ # gets is up to 100 requests to get an item by its key path.
46
+ sig { returns(T::Array[T.nilable(Stately::Db::GetItem)]) }
47
+ def gets
48
+ end
49
+
50
+ # gets is up to 100 requests to get an item by its key path.
51
+ sig { params(value: ::Google::Protobuf::RepeatedField).void }
52
+ def gets=(value)
53
+ end
54
+
55
+ # gets is up to 100 requests to get an item by its key path.
56
+ sig { void }
57
+ def clear_gets
58
+ end
59
+
60
+ # allow_stale indicates that you're okay with getting a slightly stale item -
61
+ # that is, if you had just changed an item and then call GetItem, you might
62
+ # get the old version of the item. This can result in improved performance,
63
+ # availability, and cost.
64
+ sig { returns(T::Boolean) }
65
+ def allow_stale
66
+ end
67
+
68
+ # allow_stale indicates that you're okay with getting a slightly stale item -
69
+ # that is, if you had just changed an item and then call GetItem, you might
70
+ # get the old version of the item. This can result in improved performance,
71
+ # availability, and cost.
72
+ sig { params(value: T::Boolean).void }
73
+ def allow_stale=(value)
74
+ end
75
+
76
+ # allow_stale indicates that you're okay with getting a slightly stale item -
77
+ # that is, if you had just changed an item and then call GetItem, you might
78
+ # get the old version of the item. This can result in improved performance,
79
+ # availability, and cost.
80
+ sig { void }
81
+ def clear_allow_stale
82
+ end
83
+
84
+ # schema_version_id refers to the item version to return.
85
+ #
86
+ # If the store's schema does not have a version with this version, the operation
87
+ # will error with SchemaVersionNotFound error. You should not have to
88
+ # set this manually as your generated SDK should know its schema version
89
+ # and wire this in for you.
90
+ sig { returns(Integer) }
91
+ def schema_version_id
92
+ end
93
+
94
+ # schema_version_id refers to the item version to return.
95
+ #
96
+ # If the store's schema does not have a version with this version, the operation
97
+ # will error with SchemaVersionNotFound error. You should not have to
98
+ # set this manually as your generated SDK should know its schema version
99
+ # and wire this in for you.
100
+ sig { params(value: Integer).void }
101
+ def schema_version_id=(value)
102
+ end
103
+
104
+ # schema_version_id refers to the item version to return.
105
+ #
106
+ # If the store's schema does not have a version with this version, the operation
107
+ # will error with SchemaVersionNotFound error. You should not have to
108
+ # set this manually as your generated SDK should know its schema version
109
+ # and wire this in for you.
110
+ sig { void }
111
+ def clear_schema_version_id
112
+ end
113
+
114
+ # schema_id refers to the schema to use for this operation.
115
+ # If the store_id does not have a schema with this ID, the operation will
116
+ # error with SchemaNotFound error. You should not have to set this manually
117
+ # as your generated SDK should know its schema and wire this in for you.
118
+ sig { returns(Integer) }
119
+ def schema_id
120
+ end
121
+
122
+ # schema_id refers to the schema to use for this operation.
123
+ # If the store_id does not have a schema with this ID, the operation will
124
+ # error with SchemaNotFound error. You should not have to set this manually
125
+ # as your generated SDK should know its schema and wire this in for you.
126
+ sig { params(value: Integer).void }
127
+ def schema_id=(value)
128
+ end
129
+
130
+ # schema_id refers to the schema to use for this operation.
131
+ # If the store_id does not have a schema with this ID, the operation will
132
+ # error with SchemaNotFound error. You should not have to set this manually
133
+ # as your generated SDK should know its schema and wire this in for you.
134
+ sig { void }
135
+ def clear_schema_id
136
+ end
137
+
138
+ sig { params(field: String).returns(T.untyped) }
139
+ def [](field)
140
+ end
141
+
142
+ sig { params(field: String, value: T.untyped).void }
143
+ def []=(field, value)
144
+ end
145
+
146
+ sig { returns(T::Hash[Symbol, T.untyped]) }
147
+ def to_h
148
+ end
149
+
150
+ sig { params(str: String).returns(Stately::Db::GetRequest) }
151
+ def self.decode(str)
152
+ end
153
+
154
+ sig { params(msg: Stately::Db::GetRequest).returns(String) }
155
+ def self.encode(msg)
156
+ end
157
+
158
+ sig { params(str: String, kw: T.untyped).returns(Stately::Db::GetRequest) }
159
+ def self.decode_json(str, **kw)
160
+ end
161
+
162
+ sig { params(msg: Stately::Db::GetRequest, kw: T.untyped).returns(String) }
163
+ def self.encode_json(msg, **kw)
164
+ end
165
+
166
+ sig { returns(::Google::Protobuf::Descriptor) }
167
+ def self.descriptor
168
+ end
169
+ end
170
+
171
+ class Stately::Db::GetItem
172
+ include ::Google::Protobuf::MessageExts
173
+ extend ::Google::Protobuf::MessageExts::ClassMethods
174
+
175
+ sig do
176
+ params(
177
+ key_path: T.nilable(String)
178
+ ).void
179
+ end
180
+ def initialize(
181
+ key_path: ""
182
+ )
183
+ end
184
+
185
+ # key_path is the full path to the item. See Item#key_path for more details.
186
+ sig { returns(String) }
187
+ def key_path
188
+ end
189
+
190
+ # key_path is the full path to the item. See Item#key_path for more details.
191
+ sig { params(value: String).void }
192
+ def key_path=(value)
193
+ end
194
+
195
+ # key_path is the full path to the item. See Item#key_path for more details.
196
+ sig { void }
197
+ def clear_key_path
198
+ end
199
+
200
+ sig { params(field: String).returns(T.untyped) }
201
+ def [](field)
202
+ end
203
+
204
+ sig { params(field: String, value: T.untyped).void }
205
+ def []=(field, value)
206
+ end
207
+
208
+ sig { returns(T::Hash[Symbol, T.untyped]) }
209
+ def to_h
210
+ end
211
+
212
+ sig { params(str: String).returns(Stately::Db::GetItem) }
213
+ def self.decode(str)
214
+ end
215
+
216
+ sig { params(msg: Stately::Db::GetItem).returns(String) }
217
+ def self.encode(msg)
218
+ end
219
+
220
+ sig { params(str: String, kw: T.untyped).returns(Stately::Db::GetItem) }
221
+ def self.decode_json(str, **kw)
222
+ end
223
+
224
+ sig { params(msg: Stately::Db::GetItem, kw: T.untyped).returns(String) }
225
+ def self.encode_json(msg, **kw)
226
+ end
227
+
228
+ sig { returns(::Google::Protobuf::Descriptor) }
229
+ def self.descriptor
230
+ end
231
+ end
232
+
233
+ class Stately::Db::GetResponse
234
+ include ::Google::Protobuf::MessageExts
235
+ extend ::Google::Protobuf::MessageExts::ClassMethods
236
+
237
+ sig do
238
+ params(
239
+ items: T.nilable(T::Array[T.nilable(Stately::Db::Item)])
240
+ ).void
241
+ end
242
+ def initialize(
243
+ items: []
244
+ )
245
+ end
246
+
247
+ # results is a list that contains one entry for each Item that was found.
248
+ sig { returns(T::Array[T.nilable(Stately::Db::Item)]) }
249
+ def items
250
+ end
251
+
252
+ # results is a list that contains one entry for each Item that was found.
253
+ sig { params(value: ::Google::Protobuf::RepeatedField).void }
254
+ def items=(value)
255
+ end
256
+
257
+ # results is a list that contains one entry for each Item that was found.
258
+ sig { void }
259
+ def clear_items
260
+ end
261
+
262
+ sig { params(field: String).returns(T.untyped) }
263
+ def [](field)
264
+ end
265
+
266
+ sig { params(field: String, value: T.untyped).void }
267
+ def []=(field, value)
268
+ end
269
+
270
+ sig { returns(T::Hash[Symbol, T.untyped]) }
271
+ def to_h
272
+ end
273
+
274
+ sig { params(str: String).returns(Stately::Db::GetResponse) }
275
+ def self.decode(str)
276
+ end
277
+
278
+ sig { params(msg: Stately::Db::GetResponse).returns(String) }
279
+ def self.encode(msg)
280
+ end
281
+
282
+ sig { params(str: String, kw: T.untyped).returns(Stately::Db::GetResponse) }
283
+ def self.decode_json(str, **kw)
284
+ end
285
+
286
+ sig { params(msg: Stately::Db::GetResponse, kw: T.untyped).returns(String) }
287
+ def self.encode_json(msg, **kw)
288
+ end
289
+
290
+ sig { returns(::Google::Protobuf::Descriptor) }
291
+ def self.descriptor
292
+ end
293
+ end
@@ -0,0 +1,125 @@
1
+ # Code generated by protoc-gen-rbi. DO NOT EDIT.
2
+ # source: db/item.proto
3
+ # typed: strict
4
+
5
+ # Item represents data stored in StatelyDB.
6
+ class Stately::Db::Item
7
+ include ::Google::Protobuf::MessageExts
8
+ extend ::Google::Protobuf::MessageExts::ClassMethods
9
+
10
+ sig do
11
+ params(
12
+ item_type: T.nilable(String),
13
+ proto: T.nilable(String),
14
+ json: T.nilable(Google::Protobuf::Struct)
15
+ ).void
16
+ end
17
+ def initialize(
18
+ item_type: "",
19
+ proto: "",
20
+ json: nil
21
+ )
22
+ end
23
+
24
+ # item_type is the schema type of the item. It must correspond to one of the
25
+ # schema's `itemType` declarations.
26
+ sig { returns(String) }
27
+ def item_type
28
+ end
29
+
30
+ # item_type is the schema type of the item. It must correspond to one of the
31
+ # schema's `itemType` declarations.
32
+ sig { params(value: String).void }
33
+ def item_type=(value)
34
+ end
35
+
36
+ # item_type is the schema type of the item. It must correspond to one of the
37
+ # schema's `itemType` declarations.
38
+ sig { void }
39
+ def clear_item_type
40
+ end
41
+
42
+ # proto is a serialized binary proto message, following the schema for this
43
+ # item type. Clients will need to map the item_type to a protobuf message
44
+ # descriptor to be able to unmarshal this.
45
+ sig { returns(String) }
46
+ def proto
47
+ end
48
+
49
+ # proto is a serialized binary proto message, following the schema for this
50
+ # item type. Clients will need to map the item_type to a protobuf message
51
+ # descriptor to be able to unmarshal this.
52
+ sig { params(value: String).void }
53
+ def proto=(value)
54
+ end
55
+
56
+ # proto is a serialized binary proto message, following the schema for this
57
+ # item type. Clients will need to map the item_type to a protobuf message
58
+ # descriptor to be able to unmarshal this.
59
+ sig { void }
60
+ def clear_proto
61
+ end
62
+
63
+ # json is the JSON representation of the item's payload, as an alternative
64
+ # to the binary proto representation. It exists only to support clients
65
+ # that speak the Connect-JSON protocol. Using google.protobuf.Struct means
66
+ # the JSON is embedded inline instead of being a string, and most languages
67
+ # should have special support for it.
68
+ sig { returns(T.nilable(Google::Protobuf::Struct)) }
69
+ def json
70
+ end
71
+
72
+ # json is the JSON representation of the item's payload, as an alternative
73
+ # to the binary proto representation. It exists only to support clients
74
+ # that speak the Connect-JSON protocol. Using google.protobuf.Struct means
75
+ # the JSON is embedded inline instead of being a string, and most languages
76
+ # should have special support for it.
77
+ sig { params(value: T.nilable(Google::Protobuf::Struct)).void }
78
+ def json=(value)
79
+ end
80
+
81
+ # json is the JSON representation of the item's payload, as an alternative
82
+ # to the binary proto representation. It exists only to support clients
83
+ # that speak the Connect-JSON protocol. Using google.protobuf.Struct means
84
+ # the JSON is embedded inline instead of being a string, and most languages
85
+ # should have special support for it.
86
+ sig { void }
87
+ def clear_json
88
+ end
89
+
90
+ sig { returns(T.nilable(Symbol)) }
91
+ def payload
92
+ end
93
+
94
+ sig { params(field: String).returns(T.untyped) }
95
+ def [](field)
96
+ end
97
+
98
+ sig { params(field: String, value: T.untyped).void }
99
+ def []=(field, value)
100
+ end
101
+
102
+ sig { returns(T::Hash[Symbol, T.untyped]) }
103
+ def to_h
104
+ end
105
+
106
+ sig { params(str: String).returns(Stately::Db::Item) }
107
+ def self.decode(str)
108
+ end
109
+
110
+ sig { params(msg: Stately::Db::Item).returns(String) }
111
+ def self.encode(msg)
112
+ end
113
+
114
+ sig { params(str: String, kw: T.untyped).returns(Stately::Db::Item) }
115
+ def self.decode_json(str, **kw)
116
+ end
117
+
118
+ sig { params(msg: Stately::Db::Item, kw: T.untyped).returns(String) }
119
+ def self.encode_json(msg, **kw)
120
+ end
121
+
122
+ sig { returns(::Google::Protobuf::Descriptor) }
123
+ def self.descriptor
124
+ end
125
+ end
@@ -0,0 +1,24 @@
1
+ # Code generated by protoc-gen-rbi. DO NOT EDIT.
2
+ # source: db/item_property.proto
3
+ # typed: strict
4
+
5
+ module Stately::Db::SortableProperty
6
+ self::SORTABLE_PROPERTY_KEY_PATH = T.let(0, Integer)
7
+ self::SORTABLE_PROPERTY_LAST_MODIFIED_VERSION = T.let(1, Integer)
8
+ self::SORTABLE_PROPERTY_GROUP_LOCAL_INDEX_1 = T.let(8, Integer)
9
+ self::SORTABLE_PROPERTY_GROUP_LOCAL_INDEX_2 = T.let(9, Integer)
10
+ self::SORTABLE_PROPERTY_GROUP_LOCAL_INDEX_3 = T.let(10, Integer)
11
+ self::SORTABLE_PROPERTY_GROUP_LOCAL_INDEX_4 = T.let(11, Integer)
12
+
13
+ sig { params(value: Integer).returns(T.nilable(Symbol)) }
14
+ def self.lookup(value)
15
+ end
16
+
17
+ sig { params(value: Symbol).returns(T.nilable(Integer)) }
18
+ def self.resolve(value)
19
+ end
20
+
21
+ sig { returns(::Google::Protobuf::EnumDescriptor) }
22
+ def self.descriptor
23
+ end
24
+ end