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.
@@ -0,0 +1,301 @@
1
+ # Code generated by protoc-gen-rbi. DO NOT EDIT.
2
+ # source: db/scan_root_paths.proto
3
+ # typed: strict
4
+
5
+ class Stately::Db::ScanRootPathsRequest
6
+ include ::Google::Protobuf::MessageExts
7
+ extend ::Google::Protobuf::MessageExts::ClassMethods
8
+
9
+ sig do
10
+ params(
11
+ store_id: T.nilable(Integer),
12
+ limit: T.nilable(Integer),
13
+ pagination_token: T.nilable(String),
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
+ limit: 0,
21
+ pagination_token: "",
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
+ # Limit sets an upper bound on how many root paths to return.
46
+ sig { returns(Integer) }
47
+ def limit
48
+ end
49
+
50
+ # Limit sets an upper bound on how many root paths to return.
51
+ sig { params(value: Integer).void }
52
+ def limit=(value)
53
+ end
54
+
55
+ # Limit sets an upper bound on how many root paths to return.
56
+ sig { void }
57
+ def clear_limit
58
+ end
59
+
60
+ # pagination_token is an optional token to continue retrieving the next page of results.
61
+ # This value must be read from a ScanRootPathsResponse and passed with a clone of the
62
+ # previous request to fetch the next page of data
63
+ sig { returns(String) }
64
+ def pagination_token
65
+ end
66
+
67
+ # pagination_token is an optional token to continue retrieving the next page of results.
68
+ # This value must be read from a ScanRootPathsResponse and passed with a clone of the
69
+ # previous request to fetch the next page of data
70
+ sig { params(value: String).void }
71
+ def pagination_token=(value)
72
+ end
73
+
74
+ # pagination_token is an optional token to continue retrieving the next page of results.
75
+ # This value must be read from a ScanRootPathsResponse and passed with a clone of the
76
+ # previous request to fetch the next page of data
77
+ sig { void }
78
+ def clear_pagination_token
79
+ end
80
+
81
+ # schema_version_id is the version of the schema to base all queries on.
82
+ sig { returns(Integer) }
83
+ def schema_version_id
84
+ end
85
+
86
+ # schema_version_id is the version of the schema to base all queries on.
87
+ sig { params(value: Integer).void }
88
+ def schema_version_id=(value)
89
+ end
90
+
91
+ # schema_version_id is the version of the schema to base all queries on.
92
+ sig { void }
93
+ def clear_schema_version_id
94
+ end
95
+
96
+ # schema_id refers to the schema to use for this operation.
97
+ # If the store_id does not have a schema with this ID, the operation will
98
+ # error with SchemaNotFound error. You should not have to set this manually
99
+ # as your generated SDK should know its schema and wire this in for you.
100
+ sig { returns(Integer) }
101
+ def schema_id
102
+ end
103
+
104
+ # schema_id refers to the schema to use for this operation.
105
+ # If the store_id does not have a schema with this ID, the operation will
106
+ # error with SchemaNotFound error. You should not have to set this manually
107
+ # as your generated SDK should know its schema and wire this in for you.
108
+ sig { params(value: Integer).void }
109
+ def schema_id=(value)
110
+ end
111
+
112
+ # schema_id refers to the schema to use for this operation.
113
+ # If the store_id does not have a schema with this ID, the operation will
114
+ # error with SchemaNotFound error. You should not have to set this manually
115
+ # as your generated SDK should know its schema and wire this in for you.
116
+ sig { void }
117
+ def clear_schema_id
118
+ end
119
+
120
+ sig { params(field: String).returns(T.untyped) }
121
+ def [](field)
122
+ end
123
+
124
+ sig { params(field: String, value: T.untyped).void }
125
+ def []=(field, value)
126
+ end
127
+
128
+ sig { returns(T::Hash[Symbol, T.untyped]) }
129
+ def to_h
130
+ end
131
+
132
+ sig { params(str: String).returns(Stately::Db::ScanRootPathsRequest) }
133
+ def self.decode(str)
134
+ end
135
+
136
+ sig { params(msg: Stately::Db::ScanRootPathsRequest).returns(String) }
137
+ def self.encode(msg)
138
+ end
139
+
140
+ sig { params(str: String, kw: T.untyped).returns(Stately::Db::ScanRootPathsRequest) }
141
+ def self.decode_json(str, **kw)
142
+ end
143
+
144
+ sig { params(msg: Stately::Db::ScanRootPathsRequest, kw: T.untyped).returns(String) }
145
+ def self.encode_json(msg, **kw)
146
+ end
147
+
148
+ sig { returns(::Google::Protobuf::Descriptor) }
149
+ def self.descriptor
150
+ end
151
+ end
152
+
153
+ class Stately::Db::ScanRootPathsResponse
154
+ include ::Google::Protobuf::MessageExts
155
+ extend ::Google::Protobuf::MessageExts::ClassMethods
156
+
157
+ sig do
158
+ params(
159
+ results: T.nilable(T::Array[T.nilable(Stately::Db::ScanRootPathResult)]),
160
+ pagination_token: T.nilable(String)
161
+ ).void
162
+ end
163
+ def initialize(
164
+ results: [],
165
+ pagination_token: ""
166
+ )
167
+ end
168
+
169
+ # results is a list that contains one entry for each root path that was found.
170
+ sig { returns(T::Array[T.nilable(Stately::Db::ScanRootPathResult)]) }
171
+ def results
172
+ end
173
+
174
+ # results is a list that contains one entry for each root path that was found.
175
+ sig { params(value: ::Google::Protobuf::RepeatedField).void }
176
+ def results=(value)
177
+ end
178
+
179
+ # results is a list that contains one entry for each root path that was found.
180
+ sig { void }
181
+ def clear_results
182
+ end
183
+
184
+ # This field is optional and will be set if there are more query results to fetch.
185
+ # To fetch the next page of results you must make the exact same ScanRootPathsRequest as before
186
+ # but set ScanRootPathsRequest.pagination_token to the value returned here.
187
+ sig { returns(String) }
188
+ def pagination_token
189
+ end
190
+
191
+ # This field is optional and will be set if there are more query results to fetch.
192
+ # To fetch the next page of results you must make the exact same ScanRootPathsRequest as before
193
+ # but set ScanRootPathsRequest.pagination_token to the value returned here.
194
+ sig { params(value: String).void }
195
+ def pagination_token=(value)
196
+ end
197
+
198
+ # This field is optional and will be set if there are more query results to fetch.
199
+ # To fetch the next page of results you must make the exact same ScanRootPathsRequest as before
200
+ # but set ScanRootPathsRequest.pagination_token to the value returned here.
201
+ sig { void }
202
+ def clear_pagination_token
203
+ end
204
+
205
+ sig { params(field: String).returns(T.untyped) }
206
+ def [](field)
207
+ end
208
+
209
+ sig { params(field: String, value: T.untyped).void }
210
+ def []=(field, value)
211
+ end
212
+
213
+ sig { returns(T::Hash[Symbol, T.untyped]) }
214
+ def to_h
215
+ end
216
+
217
+ sig { params(str: String).returns(Stately::Db::ScanRootPathsResponse) }
218
+ def self.decode(str)
219
+ end
220
+
221
+ sig { params(msg: Stately::Db::ScanRootPathsResponse).returns(String) }
222
+ def self.encode(msg)
223
+ end
224
+
225
+ sig { params(str: String, kw: T.untyped).returns(Stately::Db::ScanRootPathsResponse) }
226
+ def self.decode_json(str, **kw)
227
+ end
228
+
229
+ sig { params(msg: Stately::Db::ScanRootPathsResponse, kw: T.untyped).returns(String) }
230
+ def self.encode_json(msg, **kw)
231
+ end
232
+
233
+ sig { returns(::Google::Protobuf::Descriptor) }
234
+ def self.descriptor
235
+ end
236
+ end
237
+
238
+ class Stately::Db::ScanRootPathResult
239
+ include ::Google::Protobuf::MessageExts
240
+ extend ::Google::Protobuf::MessageExts::ClassMethods
241
+
242
+ sig do
243
+ params(
244
+ key_path: T.nilable(String)
245
+ ).void
246
+ end
247
+ def initialize(
248
+ key_path: ""
249
+ )
250
+ end
251
+
252
+ # key_path is a single root key path. Users can Query by this root path to
253
+ # get all of the items under it.
254
+ sig { returns(String) }
255
+ def key_path
256
+ end
257
+
258
+ # key_path is a single root key path. Users can Query by this root path to
259
+ # get all of the items under it.
260
+ sig { params(value: String).void }
261
+ def key_path=(value)
262
+ end
263
+
264
+ # key_path is a single root key path. Users can Query by this root path to
265
+ # get all of the items under it.
266
+ sig { void }
267
+ def clear_key_path
268
+ end
269
+
270
+ sig { params(field: String).returns(T.untyped) }
271
+ def [](field)
272
+ end
273
+
274
+ sig { params(field: String, value: T.untyped).void }
275
+ def []=(field, value)
276
+ end
277
+
278
+ sig { returns(T::Hash[Symbol, T.untyped]) }
279
+ def to_h
280
+ end
281
+
282
+ sig { params(str: String).returns(Stately::Db::ScanRootPathResult) }
283
+ def self.decode(str)
284
+ end
285
+
286
+ sig { params(msg: Stately::Db::ScanRootPathResult).returns(String) }
287
+ def self.encode(msg)
288
+ end
289
+
290
+ sig { params(str: String, kw: T.untyped).returns(Stately::Db::ScanRootPathResult) }
291
+ def self.decode_json(str, **kw)
292
+ end
293
+
294
+ sig { params(msg: Stately::Db::ScanRootPathResult, kw: T.untyped).returns(String) }
295
+ def self.encode_json(msg, **kw)
296
+ end
297
+
298
+ sig { returns(::Google::Protobuf::Descriptor) }
299
+ def self.descriptor
300
+ end
301
+ end
@@ -0,0 +1,3 @@
1
+ # Code generated by protoc-gen-rbi. DO NOT EDIT.
2
+ # source: db/service.proto
3
+ # typed: strict
@@ -0,0 +1,184 @@
1
+ # Code generated by protoc-gen-rbi. DO NOT EDIT.
2
+ # source: db/service.proto
3
+ # typed: strict
4
+
5
+ module Stately::Db::DatabaseService
6
+ class Service
7
+ include ::GRPC::GenericService
8
+ end
9
+
10
+ class Stub < ::GRPC::ClientStub
11
+ sig do
12
+ params(
13
+ host: String,
14
+ creds: T.any(::GRPC::Core::ChannelCredentials, Symbol),
15
+ kw: T.untyped,
16
+ ).void
17
+ end
18
+ def initialize(host, creds, **kw)
19
+ end
20
+
21
+ # Put adds one or more Items to the Store, or replaces the Items if they
22
+ # already exist. This will fail if the caller does not have permission to
23
+ # create or update Items, if there is no schema registered for the provided
24
+ # item type, or if an item is invalid. All puts are applied atomically;
25
+ # either all will fail or all will succeed. If an item's schema specifies an
26
+ # `initialValue` for one or more properties used in its key paths, and the
27
+ # item is new, you should not provide those values - the database will choose
28
+ # them for you, and Data must be provided as either serialized binary
29
+ # protobuf or JSON.
30
+ sig do
31
+ params(
32
+ request: Stately::Db::PutRequest
33
+ ).returns(Stately::Db::PutResponse)
34
+ end
35
+ def put(request)
36
+ end
37
+
38
+ # Get retrieves one or more Items by their key paths. This will return any of
39
+ # the Items that exist. It will fail if the caller does not have permission
40
+ # to read Items. Use the List APIs if you want to retrieve multiple items but
41
+ # don't already know the full key paths of the items you want to get.
42
+ sig do
43
+ params(
44
+ request: Stately::Db::GetRequest
45
+ ).returns(Stately::Db::GetResponse)
46
+ end
47
+ def get(request)
48
+ end
49
+
50
+ # Delete removes one or more Items from the Store by their key paths. This
51
+ # will fail if the caller does not have permission to delete Items.
52
+ # Tombstones will be saved for deleted items for some time, so
53
+ # that SyncList can return information about deleted items. Deletes are
54
+ # always applied atomically; all will fail or all will succeed.
55
+ sig do
56
+ params(
57
+ request: Stately::Db::DeleteRequest
58
+ ).returns(Stately::Db::DeleteResponse)
59
+ end
60
+ def delete(request)
61
+ end
62
+
63
+ # BeginList retrieves Items that start with a specified key path prefix. The
64
+ # key path prefix must minimally contain a Group Key (a single key segment
65
+ # with a namespace and an ID). BeginList will return an empty result set if
66
+ # there are no items matching that key prefix. This API returns a token that
67
+ # you can pass to ContinueList to expand the result set, or to SyncList to
68
+ # get updates within the result set. This can fail if the caller does not
69
+ # have permission to read Items.
70
+ # buf:lint:ignore RPC_RESPONSE_STANDARD_NAME
71
+ sig do
72
+ params(
73
+ request: Stately::Db::BeginListRequest
74
+ ).returns(T::Enumerable[Stately::Db::ListResponse])
75
+ end
76
+ def begin_list(request)
77
+ end
78
+
79
+ # ContinueList takes the token from a BeginList call and returns more results
80
+ # based on the original query parameters and pagination options. It has very
81
+ # few options of its own because it is a continuation of a previous list
82
+ # operation. It will return a new token which can be used for another
83
+ # ContinueList call, and so on. The token is the same one used by SyncList -
84
+ # each time you call either ContinueList or SyncList, you should pass the
85
+ # latest version of the token, and then use the new token from the result in
86
+ # subsequent calls. You may interleave ContinueList and SyncList calls
87
+ # however you like, but it does not make sense to make both calls in
88
+ # parallel. Calls to ContinueList are tied to the authorization of the
89
+ # original BeginList call, so if the original BeginList call was allowed,
90
+ # ContinueList with its token should also be allowed.
91
+ # buf:lint:ignore RPC_RESPONSE_STANDARD_NAME
92
+ sig do
93
+ params(
94
+ request: Stately::Db::ContinueListRequest
95
+ ).returns(T::Enumerable[Stately::Db::ListResponse])
96
+ end
97
+ def continue_list(request)
98
+ end
99
+
100
+ # BeginScan initiates a scan request which will scan over the entire store
101
+ # and apply the provided filters. This API returns a token that you can pass
102
+ # to ContinueScan to paginate through the result set. This can fail if the
103
+ # caller does not have permission to read Items.
104
+ # WARNING: THIS API CAN BE EXTREMELY EXPENSIVE FOR STORES WITH A LARGE NUMBER
105
+ # OF ITEMS.
106
+ # buf:lint:ignore RPC_RESPONSE_STANDARD_NAME
107
+ sig do
108
+ params(
109
+ request: Stately::Db::BeginScanRequest
110
+ ).returns(T::Enumerable[Stately::Db::ListResponse])
111
+ end
112
+ def begin_scan(request)
113
+ end
114
+
115
+ # ContinueScan takes the token from a BeginScan call and returns more results
116
+ # based on the original request parameters and pagination options. It has
117
+ # very few options of its own because it is a continuation of a previous list
118
+ # operation. It will return a new token which can be used for another
119
+ # ContinueScan call, and so on. Calls to ContinueScan are tied to the
120
+ # authorization of the original BeginScan call, so if the original BeginScan
121
+ # call was allowed, ContinueScan with its token should also be allowed.
122
+ # WARNING: THIS API CAN BE EXTREMELY EXPENSIVE FOR STORES WITH A LARGE NUMBER OF ITEMS.
123
+ # buf:lint:ignore RPC_RESPONSE_STANDARD_NAME
124
+ sig do
125
+ params(
126
+ request: Stately::Db::ContinueScanRequest
127
+ ).returns(T::Enumerable[Stately::Db::ListResponse])
128
+ end
129
+ def continue_scan(request)
130
+ end
131
+
132
+ # SyncList returns all changes to Items within the result set of a previous
133
+ # List operation. For all Items within the result set that were modified, it
134
+ # returns the full Item at in its current state. It also returns a list of
135
+ # Item key paths that were deleted since the last SyncList, which you should
136
+ # reconcile with your view of items returned from previous
137
+ # BeginList/ContinueList calls. Using this API, you can start with an initial
138
+ # set of items from BeginList, and then stay up to date on any changes via
139
+ # repeated SyncList requests over time. The token is the same one used by
140
+ # ContinueList - each time you call either ContinueList or SyncList, you
141
+ # should pass the latest version of the token, and then use the new token
142
+ # from the result in subsequent calls. Note that if the result set has
143
+ # already been expanded to the end (in the direction of the original
144
+ # BeginList request), SyncList will return newly created Items. You may
145
+ # interleave ContinueList and SyncList calls however you like, but it does
146
+ # not make sense to make both calls in parallel. Calls to SyncList are tied
147
+ # to the authorization of the original BeginList call, so if the original
148
+ # BeginList call was allowed, SyncList with its token should also be allowed.
149
+ sig do
150
+ params(
151
+ request: Stately::Db::SyncListRequest
152
+ ).returns(T::Enumerable[Stately::Db::SyncListResponse])
153
+ end
154
+ def sync_list(request)
155
+ end
156
+
157
+ # Transaction performs a transaction, within which you can issue writes
158
+ # (Put/Delete) and reads (Get/List) in any order, followed by a commit
159
+ # message. Reads are guaranteed to reflect the state as of when the
160
+ # transaction started, and writes are committed atomically. This method may
161
+ # fail if another transaction commits before this one finishes - in that
162
+ # case, you should retry your transaction.
163
+ sig do
164
+ params(
165
+ request: T::Enumerable[Stately::Db::TransactionRequest]
166
+ ).returns(T::Enumerable[Stately::Db::TransactionResponse])
167
+ end
168
+ def transaction(request)
169
+ end
170
+
171
+ # ScanRootPaths lists root paths (Groups) in the Store. This is a very
172
+ # expensive operation, as it must consult multiple partitions and it reads
173
+ # and ignores a lot of data. It is provided for use in the web console's data
174
+ # browser and is not exposed to customers. This operation will fail if the
175
+ # caller does not have permission to read Items.
176
+ sig do
177
+ params(
178
+ request: Stately::Db::ScanRootPathsRequest
179
+ ).returns(Stately::Db::ScanRootPathsResponse)
180
+ end
181
+ def scan_root_paths(request)
182
+ end
183
+ end
184
+ end