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,452 @@
1
+ # Code generated by protoc-gen-rbi. DO NOT EDIT.
2
+ # source: db/sync_list.proto
3
+ # typed: strict
4
+
5
+ class Stately::Db::SyncListRequest
6
+ include ::Google::Protobuf::MessageExts
7
+ extend ::Google::Protobuf::MessageExts::ClassMethods
8
+
9
+ sig do
10
+ params(
11
+ token_data: T.nilable(String),
12
+ schema_version_id: T.nilable(Integer),
13
+ schema_id: T.nilable(Integer)
14
+ ).void
15
+ end
16
+ def initialize(
17
+ token_data: "",
18
+ schema_version_id: 0,
19
+ schema_id: 0
20
+ )
21
+ end
22
+
23
+ # token_data is an opaque list continuation token returned by a previous call to
24
+ # List, ContinueList, or SyncList.
25
+ sig { returns(String) }
26
+ def token_data
27
+ end
28
+
29
+ # token_data is an opaque list continuation token returned by a previous call to
30
+ # List, ContinueList, or SyncList.
31
+ sig { params(value: String).void }
32
+ def token_data=(value)
33
+ end
34
+
35
+ # token_data is an opaque list continuation token returned by a previous call to
36
+ # List, ContinueList, or SyncList.
37
+ sig { void }
38
+ def clear_token_data
39
+ end
40
+
41
+ # schema_version_id is the schema version id the client is using. This is
42
+ # used to ensure a consistent schema version is used for all items in the result set.
43
+ # If the version the token was created with is different from the client's
44
+ # current version, the response will contain a SyncListReset response followed by
45
+ # items in the client's current schema version. The returned list token can then
46
+ # be used for further SyncList and ContinueList calls with the current schema
47
+ # version, without having to start a new BeginList call.
48
+ sig { returns(Integer) }
49
+ def schema_version_id
50
+ end
51
+
52
+ # schema_version_id is the schema version id the client is using. This is
53
+ # used to ensure a consistent schema version is used for all items in the result set.
54
+ # If the version the token was created with is different from the client's
55
+ # current version, the response will contain a SyncListReset response followed by
56
+ # items in the client's current schema version. The returned list token can then
57
+ # be used for further SyncList and ContinueList calls with the current schema
58
+ # version, without having to start a new BeginList call.
59
+ sig { params(value: Integer).void }
60
+ def schema_version_id=(value)
61
+ end
62
+
63
+ # schema_version_id is the schema version id the client is using. This is
64
+ # used to ensure a consistent schema version is used for all items in the result set.
65
+ # If the version the token was created with is different from the client's
66
+ # current version, the response will contain a SyncListReset response followed by
67
+ # items in the client's current schema version. The returned list token can then
68
+ # be used for further SyncList and ContinueList calls with the current schema
69
+ # version, without having to start a new BeginList call.
70
+ sig { void }
71
+ def clear_schema_version_id
72
+ end
73
+
74
+ # schema_id refers to the schema to use for this operation.
75
+ # If the store_id does not have a schema with this ID, the operation will
76
+ # error with SchemaNotFound error. You should not have to set this manually
77
+ # as your generated SDK should know its schema and wire this in for you.
78
+ sig { returns(Integer) }
79
+ def schema_id
80
+ end
81
+
82
+ # schema_id refers to the schema to use for this operation.
83
+ # If the store_id does not have a schema with this ID, the operation will
84
+ # error with SchemaNotFound error. You should not have to set this manually
85
+ # as your generated SDK should know its schema and wire this in for you.
86
+ sig { params(value: Integer).void }
87
+ def schema_id=(value)
88
+ end
89
+
90
+ # schema_id refers to the schema to use for this operation.
91
+ # If the store_id does not have a schema with this ID, the operation will
92
+ # error with SchemaNotFound error. You should not have to set this manually
93
+ # as your generated SDK should know its schema and wire this in for you.
94
+ sig { void }
95
+ def clear_schema_id
96
+ end
97
+
98
+ sig { params(field: String).returns(T.untyped) }
99
+ def [](field)
100
+ end
101
+
102
+ sig { params(field: String, value: T.untyped).void }
103
+ def []=(field, value)
104
+ end
105
+
106
+ sig { returns(T::Hash[Symbol, T.untyped]) }
107
+ def to_h
108
+ end
109
+
110
+ sig { params(str: String).returns(Stately::Db::SyncListRequest) }
111
+ def self.decode(str)
112
+ end
113
+
114
+ sig { params(msg: Stately::Db::SyncListRequest).returns(String) }
115
+ def self.encode(msg)
116
+ end
117
+
118
+ sig { params(str: String, kw: T.untyped).returns(Stately::Db::SyncListRequest) }
119
+ def self.decode_json(str, **kw)
120
+ end
121
+
122
+ sig { params(msg: Stately::Db::SyncListRequest, kw: T.untyped).returns(String) }
123
+ def self.encode_json(msg, **kw)
124
+ end
125
+
126
+ sig { returns(::Google::Protobuf::Descriptor) }
127
+ def self.descriptor
128
+ end
129
+ end
130
+
131
+ # These are stream messages, so multiple responses may be sent.
132
+ class Stately::Db::SyncListResponse
133
+ include ::Google::Protobuf::MessageExts
134
+ extend ::Google::Protobuf::MessageExts::ClassMethods
135
+
136
+ sig do
137
+ params(
138
+ reset: T.nilable(Stately::Db::SyncListReset),
139
+ result: T.nilable(Stately::Db::SyncListPartialResponse),
140
+ finished: T.nilable(Stately::Db::ListFinished)
141
+ ).void
142
+ end
143
+ def initialize(
144
+ reset: nil,
145
+ result: nil,
146
+ finished: nil
147
+ )
148
+ end
149
+
150
+ # SyncListReset is returned if the provided token is too far behind to be able to
151
+ # report deleted items, or if the client is using a different schema version than
152
+ # it started the list with. The following results will start over with a fresh
153
+ # result set. Clients should discard any cached data from this result set and start
154
+ # re-populating it from the rest of the sync response.
155
+ sig { returns(T.nilable(Stately::Db::SyncListReset)) }
156
+ def reset
157
+ end
158
+
159
+ # SyncListReset is returned if the provided token is too far behind to be able to
160
+ # report deleted items, or if the client is using a different schema version than
161
+ # it started the list with. The following results will start over with a fresh
162
+ # result set. Clients should discard any cached data from this result set and start
163
+ # re-populating it from the rest of the sync response.
164
+ sig { params(value: T.nilable(Stately::Db::SyncListReset)).void }
165
+ def reset=(value)
166
+ end
167
+
168
+ # SyncListReset is returned if the provided token is too far behind to be able to
169
+ # report deleted items, or if the client is using a different schema version than
170
+ # it started the list with. The following results will start over with a fresh
171
+ # result set. Clients should discard any cached data from this result set and start
172
+ # re-populating it from the rest of the sync response.
173
+ sig { void }
174
+ def clear_reset
175
+ end
176
+
177
+ # Result is a segment of sync results - multiple of these may be returned.
178
+ sig { returns(T.nilable(Stately::Db::SyncListPartialResponse)) }
179
+ def result
180
+ end
181
+
182
+ # Result is a segment of sync results - multiple of these may be returned.
183
+ sig { params(value: T.nilable(Stately::Db::SyncListPartialResponse)).void }
184
+ def result=(value)
185
+ end
186
+
187
+ # Result is a segment of sync results - multiple of these may be returned.
188
+ sig { void }
189
+ def clear_result
190
+ end
191
+
192
+ # Finished is sent when the sync is complete, and there will only be one.
193
+ sig { returns(T.nilable(Stately::Db::ListFinished)) }
194
+ def finished
195
+ end
196
+
197
+ # Finished is sent when the sync is complete, and there will only be one.
198
+ sig { params(value: T.nilable(Stately::Db::ListFinished)).void }
199
+ def finished=(value)
200
+ end
201
+
202
+ # Finished is sent when the sync is complete, and there will only be one.
203
+ sig { void }
204
+ def clear_finished
205
+ end
206
+
207
+ sig { returns(T.nilable(Symbol)) }
208
+ def response
209
+ end
210
+
211
+ sig { params(field: String).returns(T.untyped) }
212
+ def [](field)
213
+ end
214
+
215
+ sig { params(field: String, value: T.untyped).void }
216
+ def []=(field, value)
217
+ end
218
+
219
+ sig { returns(T::Hash[Symbol, T.untyped]) }
220
+ def to_h
221
+ end
222
+
223
+ sig { params(str: String).returns(Stately::Db::SyncListResponse) }
224
+ def self.decode(str)
225
+ end
226
+
227
+ sig { params(msg: Stately::Db::SyncListResponse).returns(String) }
228
+ def self.encode(msg)
229
+ end
230
+
231
+ sig { params(str: String, kw: T.untyped).returns(Stately::Db::SyncListResponse) }
232
+ def self.decode_json(str, **kw)
233
+ end
234
+
235
+ sig { params(msg: Stately::Db::SyncListResponse, kw: T.untyped).returns(String) }
236
+ def self.encode_json(msg, **kw)
237
+ end
238
+
239
+ sig { returns(::Google::Protobuf::Descriptor) }
240
+ def self.descriptor
241
+ end
242
+ end
243
+
244
+ # SyncListReset is returned if the provided token is too far behind to be able to
245
+ # report deleted items, and subsequent results will start over with a fresh result
246
+ # set. Clients should discard any cached data from this result set and start re-populating it.
247
+ class Stately::Db::SyncListReset
248
+ include ::Google::Protobuf::MessageExts
249
+ extend ::Google::Protobuf::MessageExts::ClassMethods
250
+
251
+ sig {void}
252
+ def initialize; end
253
+
254
+ sig { params(field: String).returns(T.untyped) }
255
+ def [](field)
256
+ end
257
+
258
+ sig { params(field: String, value: T.untyped).void }
259
+ def []=(field, value)
260
+ end
261
+
262
+ sig { returns(T::Hash[Symbol, T.untyped]) }
263
+ def to_h
264
+ end
265
+
266
+ sig { params(str: String).returns(Stately::Db::SyncListReset) }
267
+ def self.decode(str)
268
+ end
269
+
270
+ sig { params(msg: Stately::Db::SyncListReset).returns(String) }
271
+ def self.encode(msg)
272
+ end
273
+
274
+ sig { params(str: String, kw: T.untyped).returns(Stately::Db::SyncListReset) }
275
+ def self.decode_json(str, **kw)
276
+ end
277
+
278
+ sig { params(msg: Stately::Db::SyncListReset, kw: T.untyped).returns(String) }
279
+ def self.encode_json(msg, **kw)
280
+ end
281
+
282
+ sig { returns(::Google::Protobuf::Descriptor) }
283
+ def self.descriptor
284
+ end
285
+ end
286
+
287
+ class Stately::Db::SyncListPartialResponse
288
+ include ::Google::Protobuf::MessageExts
289
+ extend ::Google::Protobuf::MessageExts::ClassMethods
290
+
291
+ sig do
292
+ params(
293
+ changed_items: T.nilable(T::Array[T.nilable(Stately::Db::Item)]),
294
+ deleted_items: T.nilable(T::Array[T.nilable(Stately::Db::DeletedItem)]),
295
+ updated_item_keys_outside_list_window: T.nilable(T::Array[String])
296
+ ).void
297
+ end
298
+ def initialize(
299
+ changed_items: [],
300
+ deleted_items: [],
301
+ updated_item_keys_outside_list_window: []
302
+ )
303
+ end
304
+
305
+ # Items in the token window that were added or updated since the last
306
+ # sync/list.
307
+ sig { returns(T::Array[T.nilable(Stately::Db::Item)]) }
308
+ def changed_items
309
+ end
310
+
311
+ # Items in the token window that were added or updated since the last
312
+ # sync/list.
313
+ sig { params(value: ::Google::Protobuf::RepeatedField).void }
314
+ def changed_items=(value)
315
+ end
316
+
317
+ # Items in the token window that were added or updated since the last
318
+ # sync/list.
319
+ sig { void }
320
+ def clear_changed_items
321
+ end
322
+
323
+ # Items in the token window that were deleted since the last sync/list.
324
+ sig { returns(T::Array[T.nilable(Stately::Db::DeletedItem)]) }
325
+ def deleted_items
326
+ end
327
+
328
+ # Items in the token window that were deleted since the last sync/list.
329
+ sig { params(value: ::Google::Protobuf::RepeatedField).void }
330
+ def deleted_items=(value)
331
+ end
332
+
333
+ # Items in the token window that were deleted since the last sync/list.
334
+ sig { void }
335
+ def clear_deleted_items
336
+ end
337
+
338
+ # Keys of items that were updated but Stately cannot tell if they were in the
339
+ # sync window. Treat these as deleted in most cases. For more information
340
+ # see: https://docs.stately.cloud/api/sync
341
+ sig { returns(T::Array[String]) }
342
+ def updated_item_keys_outside_list_window
343
+ end
344
+
345
+ # Keys of items that were updated but Stately cannot tell if they were in the
346
+ # sync window. Treat these as deleted in most cases. For more information
347
+ # see: https://docs.stately.cloud/api/sync
348
+ sig { params(value: ::Google::Protobuf::RepeatedField).void }
349
+ def updated_item_keys_outside_list_window=(value)
350
+ end
351
+
352
+ # Keys of items that were updated but Stately cannot tell if they were in the
353
+ # sync window. Treat these as deleted in most cases. For more information
354
+ # see: https://docs.stately.cloud/api/sync
355
+ sig { void }
356
+ def clear_updated_item_keys_outside_list_window
357
+ end
358
+
359
+ sig { params(field: String).returns(T.untyped) }
360
+ def [](field)
361
+ end
362
+
363
+ sig { params(field: String, value: T.untyped).void }
364
+ def []=(field, value)
365
+ end
366
+
367
+ sig { returns(T::Hash[Symbol, T.untyped]) }
368
+ def to_h
369
+ end
370
+
371
+ sig { params(str: String).returns(Stately::Db::SyncListPartialResponse) }
372
+ def self.decode(str)
373
+ end
374
+
375
+ sig { params(msg: Stately::Db::SyncListPartialResponse).returns(String) }
376
+ def self.encode(msg)
377
+ end
378
+
379
+ sig { params(str: String, kw: T.untyped).returns(Stately::Db::SyncListPartialResponse) }
380
+ def self.decode_json(str, **kw)
381
+ end
382
+
383
+ sig { params(msg: Stately::Db::SyncListPartialResponse, kw: T.untyped).returns(String) }
384
+ def self.encode_json(msg, **kw)
385
+ end
386
+
387
+ sig { returns(::Google::Protobuf::Descriptor) }
388
+ def self.descriptor
389
+ end
390
+ end
391
+
392
+ class Stately::Db::DeletedItem
393
+ include ::Google::Protobuf::MessageExts
394
+ extend ::Google::Protobuf::MessageExts::ClassMethods
395
+
396
+ sig do
397
+ params(
398
+ key_path: T.nilable(String)
399
+ ).void
400
+ end
401
+ def initialize(
402
+ key_path: ""
403
+ )
404
+ end
405
+
406
+ # Since the item was deleted, only the key is provided.
407
+ sig { returns(String) }
408
+ def key_path
409
+ end
410
+
411
+ # Since the item was deleted, only the key is provided.
412
+ sig { params(value: String).void }
413
+ def key_path=(value)
414
+ end
415
+
416
+ # Since the item was deleted, only the key is provided.
417
+ sig { void }
418
+ def clear_key_path
419
+ end
420
+
421
+ sig { params(field: String).returns(T.untyped) }
422
+ def [](field)
423
+ end
424
+
425
+ sig { params(field: String, value: T.untyped).void }
426
+ def []=(field, value)
427
+ end
428
+
429
+ sig { returns(T::Hash[Symbol, T.untyped]) }
430
+ def to_h
431
+ end
432
+
433
+ sig { params(str: String).returns(Stately::Db::DeletedItem) }
434
+ def self.decode(str)
435
+ end
436
+
437
+ sig { params(msg: Stately::Db::DeletedItem).returns(String) }
438
+ def self.encode(msg)
439
+ end
440
+
441
+ sig { params(str: String, kw: T.untyped).returns(Stately::Db::DeletedItem) }
442
+ def self.decode_json(str, **kw)
443
+ end
444
+
445
+ sig { params(msg: Stately::Db::DeletedItem, kw: T.untyped).returns(String) }
446
+ def self.encode_json(msg, **kw)
447
+ end
448
+
449
+ sig { returns(::Google::Protobuf::Descriptor) }
450
+ def self.descriptor
451
+ end
452
+ end