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.
- checksums.yaml +4 -4
- data/lib/api/db/continue_list_pb.rb +1 -1
- data/lib/api/db/continue_scan_pb.rb +1 -1
- data/lib/api/db/delete_pb.rb +1 -1
- data/lib/api/db/get_pb.rb +1 -1
- data/lib/api/db/list_pb.rb +1 -1
- data/lib/api/db/scan_pb.rb +1 -1
- data/lib/api/db/scan_root_paths_pb.rb +1 -1
- data/lib/api/db/sync_list_pb.rb +1 -1
- data/lib/common/auth/interceptor.rb +1 -1
- data/lib/common/auth/token_fetcher.rb +2 -2
- data/lib/key_path.rb +2 -2
- data/lib/statelydb.rb +2 -2
- data/lib/transaction/transaction.rb +4 -4
- data/rbi/auth/get_auth_token_pb.rbi +169 -0
- data/rbi/auth/service_pb.rbi +3 -0
- data/rbi/auth/service_services_pb.rbi +31 -0
- data/rbi/db/continue_list_pb.rbi +163 -0
- data/rbi/db/continue_scan_pb.rbi +123 -0
- data/rbi/db/delete_pb.rbi +329 -0
- data/rbi/db/get_pb.rbi +293 -0
- data/rbi/db/item_pb.rbi +125 -0
- data/rbi/db/item_property_pb.rbi +24 -0
- data/rbi/db/list_pb.rbi +472 -0
- data/rbi/db/list_token_pb.rbi +154 -0
- data/rbi/db/put_pb.rbi +314 -0
- data/rbi/db/scan_pb.rbi +370 -0
- data/rbi/db/scan_root_paths_pb.rbi +301 -0
- data/rbi/db/service_pb.rbi +3 -0
- data/rbi/db/service_services_pb.rbi +184 -0
- data/rbi/db/sync_list_pb.rbi +452 -0
- data/rbi/db/transaction_pb.rbi +1366 -0
- data/rbi/errors/error_details_pb.rbi +146 -0
- data/rbi/statelydb.rbi +12 -83
- data/sig/statelydb.rbs +8 -8
- metadata +20 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2050e1b7d2a87f24c540925b9b203611a0bf5fbcda159644f3ef1d971d5ae33b
|
4
|
+
data.tar.gz: 22fdcd5e72a6fe129c6ac1ec92f20875be487e095298361c1271bdf478255d52
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 51897647dfb970898b09519af57fc3f1f94235cf88e12b8b32373ebed53a2e18cc858a26b687d0ac252ffddcfff04f4c8f592383d56764c0f149605498a3e5a1
|
7
|
+
data.tar.gz: 294bd0e28f76a0d9871f1249875a3467e01b52dc6a2d9697502a1ee2da5f1d5e70777f2106465d939df8a4814bd49785a7b35a945f7fbfaa7a017201f01289d5
|
@@ -5,7 +5,7 @@
|
|
5
5
|
require 'google/protobuf'
|
6
6
|
|
7
7
|
|
8
|
-
descriptor_data = "\n\x16\x64\x62/continue_list.proto\x12\nstately.db\"\
|
8
|
+
descriptor_data = "\n\x16\x64\x62/continue_list.proto\x12\nstately.db\"\xbe\x01\n\x13\x43ontinueListRequest\x12\x1d\n\ntoken_data\x18\x01 \x01(\x0cR\ttokenData\x12?\n\tdirection\x18\x02 \x01(\x0e\x32!.stately.db.ContinueListDirectionR\tdirection\x12*\n\x11schema_version_id\x18\x05 \x01(\rR\x0fschemaVersionId\x12\x1b\n\tschema_id\x18\x06 \x01(\x04R\x08schemaId*N\n\x15\x43ontinueListDirection\x12\x19\n\x15\x43ONTINUE_LIST_FORWARD\x10\x00\x12\x1a\n\x16\x43ONTINUE_LIST_BACKWARD\x10\x01\x42l\n\x0e\x63om.stately.dbB\x11\x43ontinueListProtoP\x01\xa2\x02\x03SDX\xaa\x02\nStately.Db\xca\x02\nStately\\Db\xe2\x02\x16Stately\\Db\\GPBMetadata\xea\x02\x0bStately::Dbb\x06proto3"
|
9
9
|
|
10
10
|
pool = Google::Protobuf::DescriptorPool.generated_pool
|
11
11
|
pool.add_serialized_file(descriptor_data)
|
@@ -5,7 +5,7 @@
|
|
5
5
|
require 'google/protobuf'
|
6
6
|
|
7
7
|
|
8
|
-
descriptor_data = "\n\x16\x64\x62/continue_scan.proto\x12\nstately.db\"
|
8
|
+
descriptor_data = "\n\x16\x64\x62/continue_scan.proto\x12\nstately.db\"}\n\x13\x43ontinueScanRequest\x12\x1d\n\ntoken_data\x18\x01 \x01(\x0cR\ttokenData\x12*\n\x11schema_version_id\x18\x02 \x01(\rR\x0fschemaVersionId\x12\x1b\n\tschema_id\x18\x03 \x01(\x04R\x08schemaIdBl\n\x0e\x63om.stately.dbB\x11\x43ontinueScanProtoP\x01\xa2\x02\x03SDX\xaa\x02\nStately.Db\xca\x02\nStately\\Db\xe2\x02\x16Stately\\Db\\GPBMetadata\xea\x02\x0bStately::Dbb\x06proto3"
|
9
9
|
|
10
10
|
pool = Google::Protobuf::DescriptorPool.generated_pool
|
11
11
|
pool.add_serialized_file(descriptor_data)
|
data/lib/api/db/delete_pb.rb
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
require 'google/protobuf'
|
6
6
|
|
7
7
|
|
8
|
-
descriptor_data = "\n\x0f\x64\x62/delete.proto\x12\nstately.db\"\
|
8
|
+
descriptor_data = "\n\x0f\x64\x62/delete.proto\x12\nstately.db\"\xab\x01\n\rDeleteRequest\x12\x19\n\x08store_id\x18\x01 \x01(\x04R\x07storeId\x12\x30\n\x07\x64\x65letes\x18\x03 \x03(\x0b\x32\x16.stately.db.DeleteItemR\x07\x64\x65letes\x12*\n\x11schema_version_id\x18\x05 \x01(\rR\x0fschemaVersionId\x12\x1b\n\tschema_id\x18\x06 \x01(\x04R\x08schemaIdJ\x04\x08\x04\x10\x05\"\'\n\nDeleteItem\x12\x19\n\x08key_path\x18\x01 \x01(\tR\x07keyPath\"/\n\x0c\x44\x65leteResult\x12\x19\n\x08key_path\x18\x01 \x01(\tR\x07keyPathJ\x04\x08\x02\x10\x03\"D\n\x0e\x44\x65leteResponse\x12\x32\n\x07results\x18\x01 \x03(\x0b\x32\x18.stately.db.DeleteResultR\x07resultsBf\n\x0e\x63om.stately.dbB\x0b\x44\x65leteProtoP\x01\xa2\x02\x03SDX\xaa\x02\nStately.Db\xca\x02\nStately\\Db\xe2\x02\x16Stately\\Db\\GPBMetadata\xea\x02\x0bStately::Dbb\x06proto3"
|
9
9
|
|
10
10
|
pool = Google::Protobuf::DescriptorPool.generated_pool
|
11
11
|
pool.add_serialized_file(descriptor_data)
|
data/lib/api/db/get_pb.rb
CHANGED
@@ -7,7 +7,7 @@ require 'google/protobuf'
|
|
7
7
|
require 'api/db/item_pb'
|
8
8
|
|
9
9
|
|
10
|
-
descriptor_data = "\n\x0c\x64\x62/get.proto\x12\nstately.db\x1a\rdb/item.proto\"\
|
10
|
+
descriptor_data = "\n\x0c\x64\x62/get.proto\x12\nstately.db\x1a\rdb/item.proto\"\xc0\x01\n\nGetRequest\x12\x19\n\x08store_id\x18\x01 \x01(\x04R\x07storeId\x12\'\n\x04gets\x18\x02 \x03(\x0b\x32\x13.stately.db.GetItemR\x04gets\x12\x1f\n\x0b\x61llow_stale\x18\x03 \x01(\x08R\nallowStale\x12*\n\x11schema_version_id\x18\x05 \x01(\rR\x0fschemaVersionId\x12\x1b\n\tschema_id\x18\x06 \x01(\x04R\x08schemaIdJ\x04\x08\x04\x10\x05\"$\n\x07GetItem\x12\x19\n\x08key_path\x18\x01 \x01(\tR\x07keyPath\"5\n\x0bGetResponse\x12&\n\x05items\x18\x01 \x03(\x0b\x32\x10.stately.db.ItemR\x05itemsBc\n\x0e\x63om.stately.dbB\x08GetProtoP\x01\xa2\x02\x03SDX\xaa\x02\nStately.Db\xca\x02\nStately\\Db\xe2\x02\x16Stately\\Db\\GPBMetadata\xea\x02\x0bStately::Dbb\x06proto3"
|
11
11
|
|
12
12
|
pool = Google::Protobuf::DescriptorPool.generated_pool
|
13
13
|
pool.add_serialized_file(descriptor_data)
|
data/lib/api/db/list_pb.rb
CHANGED
@@ -9,7 +9,7 @@ require 'api/db/item_property_pb'
|
|
9
9
|
require 'api/db/list_token_pb'
|
10
10
|
|
11
11
|
|
12
|
-
descriptor_data = "\n\rdb/list.proto\x12\nstately.db\x1a\rdb/item.proto\x1a\x16\x64\x62/item_property.proto\x1a\x13\x64\x62/list_token.proto\"\
|
12
|
+
descriptor_data = "\n\rdb/list.proto\x12\nstately.db\x1a\rdb/item.proto\x1a\x16\x64\x62/item_property.proto\x1a\x13\x64\x62/list_token.proto\"\xda\x02\n\x10\x42\x65ginListRequest\x12\x19\n\x08store_id\x18\x01 \x01(\x04R\x07storeId\x12&\n\x0fkey_path_prefix\x18\x02 \x01(\tR\rkeyPathPrefix\x12\x14\n\x05limit\x18\x03 \x01(\rR\x05limit\x12\x1f\n\x0b\x61llow_stale\x18\x04 \x01(\x08R\nallowStale\x12\x41\n\rsort_property\x18\x05 \x01(\x0e\x32\x1c.stately.db.SortablePropertyR\x0csortProperty\x12@\n\x0esort_direction\x18\x06 \x01(\x0e\x32\x19.stately.db.SortDirectionR\rsortDirection\x12*\n\x11schema_version_id\x18\x07 \x01(\rR\x0fschemaVersionId\x12\x1b\n\tschema_id\x18\x08 \x01(\x04R\x08schemaId\"\x8b\x01\n\x0cListResponse\x12\x37\n\x06result\x18\x01 \x01(\x0b\x32\x1d.stately.db.ListPartialResultH\x00R\x06result\x12\x36\n\x08\x66inished\x18\x02 \x01(\x0b\x32\x18.stately.db.ListFinishedH\x00R\x08\x66inishedB\n\n\x08response\";\n\x11ListPartialResult\x12&\n\x05items\x18\x01 \x03(\x0b\x32\x10.stately.db.ItemR\x05items\";\n\x0cListFinished\x12+\n\x05token\x18\x01 \x01(\x0b\x32\x15.stately.db.ListTokenR\x05token*8\n\rSortDirection\x12\x12\n\x0eSORT_ASCENDING\x10\x00\x12\x13\n\x0fSORT_DESCENDING\x10\x01\x42\x64\n\x0e\x63om.stately.dbB\tListProtoP\x01\xa2\x02\x03SDX\xaa\x02\nStately.Db\xca\x02\nStately\\Db\xe2\x02\x16Stately\\Db\\GPBMetadata\xea\x02\x0bStately::Dbb\x06proto3"
|
13
13
|
|
14
14
|
pool = Google::Protobuf::DescriptorPool.generated_pool
|
15
15
|
pool.add_serialized_file(descriptor_data)
|
data/lib/api/db/scan_pb.rb
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
require 'google/protobuf'
|
6
6
|
|
7
7
|
|
8
|
-
descriptor_data = "\n\rdb/scan.proto\x12\nstately.db\"9\n\x0f\x46ilterCondition\x12\x1d\n\titem_type\x18\x01 \x01(\tH\x00R\x08itemTypeB\x07\n\x05value\"\
|
8
|
+
descriptor_data = "\n\rdb/scan.proto\x12\nstately.db\"9\n\x0f\x46ilterCondition\x12\x1d\n\titem_type\x18\x01 \x01(\tH\x00R\x08itemTypeB\x07\n\x05value\"\xa5\x02\n\x10\x42\x65ginScanRequest\x12\x19\n\x08store_id\x18\x01 \x01(\x04R\x07storeId\x12\x46\n\x10\x66ilter_condition\x18\x02 \x03(\x0b\x32\x1b.stately.db.FilterConditionR\x0f\x66ilterCondition\x12\x14\n\x05limit\x18\x03 \x01(\rR\x05limit\x12O\n\x13segmentation_params\x18\x04 \x01(\x0b\x32\x1e.stately.db.SegmentationParamsR\x12segmentationParams\x12*\n\x11schema_version_id\x18\x05 \x01(\rR\x0fschemaVersionId\x12\x1b\n\tschema_id\x18\x06 \x01(\x04R\x08schemaId\"`\n\x12SegmentationParams\x12%\n\x0etotal_segments\x18\x05 \x01(\rR\rtotalSegments\x12#\n\rsegment_index\x18\x06 \x01(\rR\x0csegmentIndexBd\n\x0e\x63om.stately.dbB\tScanProtoP\x01\xa2\x02\x03SDX\xaa\x02\nStately.Db\xca\x02\nStately\\Db\xe2\x02\x16Stately\\Db\\GPBMetadata\xea\x02\x0bStately::Dbb\x06proto3"
|
9
9
|
|
10
10
|
pool = Google::Protobuf::DescriptorPool.generated_pool
|
11
11
|
pool.add_serialized_file(descriptor_data)
|
@@ -5,7 +5,7 @@
|
|
5
5
|
require 'google/protobuf'
|
6
6
|
|
7
7
|
|
8
|
-
descriptor_data = "\n\x18\x64\x62/scan_root_paths.proto\x12\nstately.db\"\
|
8
|
+
descriptor_data = "\n\x18\x64\x62/scan_root_paths.proto\x12\nstately.db\"\xbb\x01\n\x14ScanRootPathsRequest\x12\x19\n\x08store_id\x18\x01 \x01(\x04R\x07storeId\x12\x14\n\x05limit\x18\x02 \x01(\rR\x05limit\x12)\n\x10pagination_token\x18\x03 \x01(\x0cR\x0fpaginationToken\x12*\n\x11schema_version_id\x18\x04 \x01(\rR\x0fschemaVersionId\x12\x1b\n\tschema_id\x18\x05 \x01(\x04R\x08schemaId\"|\n\x15ScanRootPathsResponse\x12\x38\n\x07results\x18\x01 \x03(\x0b\x32\x1e.stately.db.ScanRootPathResultR\x07results\x12)\n\x10pagination_token\x18\x02 \x01(\x0cR\x0fpaginationToken\"/\n\x12ScanRootPathResult\x12\x19\n\x08key_path\x18\x01 \x01(\tR\x07keyPathBm\n\x0e\x63om.stately.dbB\x12ScanRootPathsProtoP\x01\xa2\x02\x03SDX\xaa\x02\nStately.Db\xca\x02\nStately\\Db\xe2\x02\x16Stately\\Db\\GPBMetadata\xea\x02\x0bStately::Dbb\x06proto3"
|
9
9
|
|
10
10
|
pool = Google::Protobuf::DescriptorPool.generated_pool
|
11
11
|
pool.add_serialized_file(descriptor_data)
|
data/lib/api/db/sync_list_pb.rb
CHANGED
@@ -8,7 +8,7 @@ require 'api/db/item_pb'
|
|
8
8
|
require 'api/db/list_pb'
|
9
9
|
|
10
10
|
|
11
|
-
descriptor_data = "\n\x12\x64\x62/sync_list.proto\x12\nstately.db\x1a\rdb/item.proto\x1a\rdb/list.proto\"
|
11
|
+
descriptor_data = "\n\x12\x64\x62/sync_list.proto\x12\nstately.db\x1a\rdb/item.proto\x1a\rdb/list.proto\"y\n\x0fSyncListRequest\x12\x1d\n\ntoken_data\x18\x01 \x01(\x0cR\ttokenData\x12*\n\x11schema_version_id\x18\x05 \x01(\rR\x0fschemaVersionId\x12\x1b\n\tschema_id\x18\x06 \x01(\x04R\x08schemaId\"\xc8\x01\n\x10SyncListResponse\x12\x31\n\x05reset\x18\x01 \x01(\x0b\x32\x19.stately.db.SyncListResetH\x00R\x05reset\x12=\n\x06result\x18\x02 \x01(\x0b\x32#.stately.db.SyncListPartialResponseH\x00R\x06result\x12\x36\n\x08\x66inished\x18\x03 \x01(\x0b\x32\x18.stately.db.ListFinishedH\x00R\x08\x66inishedB\n\n\x08response\"\x0f\n\rSyncListReset\"\xdf\x01\n\x17SyncListPartialResponse\x12\x35\n\rchanged_items\x18\x01 \x03(\x0b\x32\x10.stately.db.ItemR\x0c\x63hangedItems\x12<\n\rdeleted_items\x18\x02 \x03(\x0b\x32\x17.stately.db.DeletedItemR\x0c\x64\x65letedItems\x12O\n%updated_item_keys_outside_list_window\x18\x03 \x03(\tR updatedItemKeysOutsideListWindow\"(\n\x0b\x44\x65letedItem\x12\x19\n\x08key_path\x18\x01 \x01(\tR\x07keyPathBh\n\x0e\x63om.stately.dbB\rSyncListProtoP\x01\xa2\x02\x03SDX\xaa\x02\nStately.Db\xca\x02\nStately\\Db\xe2\x02\x16Stately\\Db\\GPBMetadata\xea\x02\x0bStately::Dbb\x06proto3"
|
12
12
|
|
13
13
|
pool = Google::Protobuf::DescriptorPool.generated_pool
|
14
14
|
pool.add_serialized_file(descriptor_data)
|
@@ -9,7 +9,7 @@ module StatelyDB
|
|
9
9
|
module Auth
|
10
10
|
# GRPC interceptor to authenticate against Stately and append bearer tokens to outgoing requests
|
11
11
|
class Interceptor < GRPC::ClientInterceptor
|
12
|
-
# @param [TokenProvider] token_provider The token provider to use for authentication
|
12
|
+
# @param [StatelyDB::Common::Auth::TokenProvider] token_provider The token provider to use for authentication
|
13
13
|
def initialize(
|
14
14
|
token_provider: AuthTokenProvider.new
|
15
15
|
)
|
@@ -31,7 +31,7 @@ module StatelyDB
|
|
31
31
|
# for individual token fetcher implementations
|
32
32
|
class TokenFetcher
|
33
33
|
# Get the current access token
|
34
|
-
# @return [TokenResult] The fetched TokenResult
|
34
|
+
# @return [StatelyDB::Common::Auth::TokenResult] The fetched TokenResult
|
35
35
|
def fetch
|
36
36
|
raise "Not Implemented"
|
37
37
|
end
|
@@ -75,7 +75,7 @@ module StatelyDB
|
|
75
75
|
end
|
76
76
|
|
77
77
|
# Fetch a new token from the StatelyDB API
|
78
|
-
# @return [TokenResult] The fetched TokenResult
|
78
|
+
# @return [StatelyDB::Common::Auth::TokenResult] The fetched TokenResult
|
79
79
|
def fetch
|
80
80
|
RETRY_ATTEMPTS.times do |i|
|
81
81
|
resp = @stub.get_auth_token(Stately::Auth::GetAuthTokenRequest.new(access_key: @access_key))
|
data/lib/key_path.rb
CHANGED
@@ -11,7 +11,7 @@ module StatelyDB
|
|
11
11
|
# Appends a new path segment.
|
12
12
|
# @param namespace [String]
|
13
13
|
# @param identifier [String, StatelyDB::UUID, #to_s]
|
14
|
-
# @return [KeyPath]
|
14
|
+
# @return [StatelyDB::KeyPath]
|
15
15
|
def with(namespace, identifier = nil)
|
16
16
|
if identifier.nil?
|
17
17
|
@path << namespace
|
@@ -39,7 +39,7 @@ module StatelyDB
|
|
39
39
|
# Appends a new path segment.
|
40
40
|
# @param namespace [String]
|
41
41
|
# @param identifier [String, StatelyDB::UUID, #to_s]
|
42
|
-
# @return [KeyPath]
|
42
|
+
# @return [StatelyDB::KeyPath]
|
43
43
|
#
|
44
44
|
# @example
|
45
45
|
# keypath = KeyPath.with("genres", "rock").with("artists", "the-beatles")
|
data/lib/statelydb.rb
CHANGED
@@ -25,7 +25,7 @@ module StatelyDB
|
|
25
25
|
#
|
26
26
|
# @param store_id [Integer] the StatelyDB to use for all operations with this client.
|
27
27
|
# @param schema [Module] the generated Schema module to use for mapping StatelyDB Items.
|
28
|
-
# @param token_provider [Common::Auth::TokenProvider] the token provider to use for authentication.
|
28
|
+
# @param token_provider [StatelyDB::Common::Auth::TokenProvider] the token provider to use for authentication.
|
29
29
|
# @param endpoint [String] the endpoint to connect to.
|
30
30
|
# @param region [String] the region to connect to.
|
31
31
|
# @param no_auth [Boolean] Indicates that the client should not attempt to get
|
@@ -388,7 +388,7 @@ module StatelyDB
|
|
388
388
|
# Process a list response from begin_list or continue_list
|
389
389
|
#
|
390
390
|
# @param resp [::Stately::Db::ListResponse] the response to process
|
391
|
-
# @return [(Array<StatelyDB::Item>, StatelyDB::Token)] the list of Items and the token
|
391
|
+
# @return [Array(Array<StatelyDB::Item>, StatelyDB::Token)] the list of Items and the token
|
392
392
|
# @api private
|
393
393
|
# @!visibility private
|
394
394
|
def process_list_response(resp)
|
@@ -44,7 +44,7 @@ module StatelyDB
|
|
44
44
|
#
|
45
45
|
# @param stub [::Stately::Db::DatabaseService::Stub] a StatelyDB gRPC stub
|
46
46
|
# @param store_id [Integer] the StatelyDB Store to transact against
|
47
|
-
# @param schema [
|
47
|
+
# @param schema [Module] the generated Schema module to use for mapping StatelyDB Items.
|
48
48
|
def initialize(stub:, store_id:, schema:)
|
49
49
|
@stub = stub
|
50
50
|
@store_id = store_id
|
@@ -333,7 +333,7 @@ module StatelyDB
|
|
333
333
|
# @param limit [Integer] the maximum number of items to return
|
334
334
|
# @param sort_property [String] the property to sort by
|
335
335
|
# @param sort_direction [Symbol] the direction to sort by (:ascending or :descending)
|
336
|
-
# @return [(Array<StatelyDB::Item>, ::Stately::Db::ListToken)] the list of Items and the token
|
336
|
+
# @return [Array(Array<StatelyDB::Item>, ::Stately::Db::ListToken)] the list of Items and the token
|
337
337
|
#
|
338
338
|
# Example:
|
339
339
|
# client.data.transaction do |txn|
|
@@ -365,7 +365,7 @@ module StatelyDB
|
|
365
365
|
#
|
366
366
|
# @param token [::Stately::Db::ListToken] the token to continue from
|
367
367
|
# @param continue_direction [Symbol] the direction to continue by (:forward or :backward)
|
368
|
-
# @return [(Array<StatelyDB::Item>, ::Stately::Db::ListToken)] the list of Items and the token
|
368
|
+
# @return [Array(Array<StatelyDB::Item>, ::Stately::Db::ListToken)] the list of Items and the token
|
369
369
|
#
|
370
370
|
# Example:
|
371
371
|
# client.data.transaction do |txn|
|
@@ -389,7 +389,7 @@ module StatelyDB
|
|
389
389
|
# Processes a list response from begin_list or continue_list
|
390
390
|
#
|
391
391
|
# @param req [::Stately::Db::TransactionRequest] the request to send
|
392
|
-
# @return [(Array<StatelyDB::Item>, ::Stately::Db::ListToken)] the list of Items and the token
|
392
|
+
# @return [Array(Array<StatelyDB::Item>, ::Stately::Db::ListToken)] the list of Items and the token
|
393
393
|
# @api private
|
394
394
|
# @!visibility private
|
395
395
|
def do_list_request_response(req)
|
@@ -0,0 +1,169 @@
|
|
1
|
+
# Code generated by protoc-gen-rbi. DO NOT EDIT.
|
2
|
+
# source: auth/get_auth_token.proto
|
3
|
+
# typed: strict
|
4
|
+
|
5
|
+
class Stately::Auth::GetAuthTokenRequest
|
6
|
+
include ::Google::Protobuf::MessageExts
|
7
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
8
|
+
|
9
|
+
sig do
|
10
|
+
params(
|
11
|
+
access_key: T.nilable(String)
|
12
|
+
).void
|
13
|
+
end
|
14
|
+
def initialize(
|
15
|
+
access_key: ""
|
16
|
+
)
|
17
|
+
end
|
18
|
+
|
19
|
+
# access_key is an access key that has been added to an organization via
|
20
|
+
# stately.user.UserService.CreateAccessKey. It is a sensitive secret used
|
21
|
+
# for programmatic access to Stately APIs, equivalent to a
|
22
|
+
# username+password.
|
23
|
+
sig { returns(String) }
|
24
|
+
def access_key
|
25
|
+
end
|
26
|
+
|
27
|
+
# access_key is an access key that has been added to an organization via
|
28
|
+
# stately.user.UserService.CreateAccessKey. It is a sensitive secret used
|
29
|
+
# for programmatic access to Stately APIs, equivalent to a
|
30
|
+
# username+password.
|
31
|
+
sig { params(value: String).void }
|
32
|
+
def access_key=(value)
|
33
|
+
end
|
34
|
+
|
35
|
+
# access_key is an access key that has been added to an organization via
|
36
|
+
# stately.user.UserService.CreateAccessKey. It is a sensitive secret used
|
37
|
+
# for programmatic access to Stately APIs, equivalent to a
|
38
|
+
# username+password.
|
39
|
+
sig { void }
|
40
|
+
def clear_access_key
|
41
|
+
end
|
42
|
+
|
43
|
+
sig { returns(T.nilable(Symbol)) }
|
44
|
+
def identity
|
45
|
+
end
|
46
|
+
|
47
|
+
sig { params(field: String).returns(T.untyped) }
|
48
|
+
def [](field)
|
49
|
+
end
|
50
|
+
|
51
|
+
sig { params(field: String, value: T.untyped).void }
|
52
|
+
def []=(field, value)
|
53
|
+
end
|
54
|
+
|
55
|
+
sig { returns(T::Hash[Symbol, T.untyped]) }
|
56
|
+
def to_h
|
57
|
+
end
|
58
|
+
|
59
|
+
sig { params(str: String).returns(Stately::Auth::GetAuthTokenRequest) }
|
60
|
+
def self.decode(str)
|
61
|
+
end
|
62
|
+
|
63
|
+
sig { params(msg: Stately::Auth::GetAuthTokenRequest).returns(String) }
|
64
|
+
def self.encode(msg)
|
65
|
+
end
|
66
|
+
|
67
|
+
sig { params(str: String, kw: T.untyped).returns(Stately::Auth::GetAuthTokenRequest) }
|
68
|
+
def self.decode_json(str, **kw)
|
69
|
+
end
|
70
|
+
|
71
|
+
sig { params(msg: Stately::Auth::GetAuthTokenRequest, kw: T.untyped).returns(String) }
|
72
|
+
def self.encode_json(msg, **kw)
|
73
|
+
end
|
74
|
+
|
75
|
+
sig { returns(::Google::Protobuf::Descriptor) }
|
76
|
+
def self.descriptor
|
77
|
+
end
|
78
|
+
end
|
79
|
+
|
80
|
+
class Stately::Auth::GetAuthTokenResponse
|
81
|
+
include ::Google::Protobuf::MessageExts
|
82
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
83
|
+
|
84
|
+
sig do
|
85
|
+
params(
|
86
|
+
auth_token: T.nilable(String),
|
87
|
+
expires_in_s: T.nilable(Integer)
|
88
|
+
).void
|
89
|
+
end
|
90
|
+
def initialize(
|
91
|
+
auth_token: "",
|
92
|
+
expires_in_s: 0
|
93
|
+
)
|
94
|
+
end
|
95
|
+
|
96
|
+
# auth_token is the token that can be used to authenticate requests to the
|
97
|
+
# StatelyDB API.
|
98
|
+
sig { returns(String) }
|
99
|
+
def auth_token
|
100
|
+
end
|
101
|
+
|
102
|
+
# auth_token is the token that can be used to authenticate requests to the
|
103
|
+
# StatelyDB API.
|
104
|
+
sig { params(value: String).void }
|
105
|
+
def auth_token=(value)
|
106
|
+
end
|
107
|
+
|
108
|
+
# auth_token is the token that can be used to authenticate requests to the
|
109
|
+
# StatelyDB API.
|
110
|
+
sig { void }
|
111
|
+
def clear_auth_token
|
112
|
+
end
|
113
|
+
|
114
|
+
# expires_in_s is the duration in seconds that this access token is
|
115
|
+
# valid. After this time has passed, the access token will be rejected - you
|
116
|
+
# should refresh the token via another call to GetAuthToken before this
|
117
|
+
# happens.
|
118
|
+
sig { returns(Integer) }
|
119
|
+
def expires_in_s
|
120
|
+
end
|
121
|
+
|
122
|
+
# expires_in_s is the duration in seconds that this access token is
|
123
|
+
# valid. After this time has passed, the access token will be rejected - you
|
124
|
+
# should refresh the token via another call to GetAuthToken before this
|
125
|
+
# happens.
|
126
|
+
sig { params(value: Integer).void }
|
127
|
+
def expires_in_s=(value)
|
128
|
+
end
|
129
|
+
|
130
|
+
# expires_in_s is the duration in seconds that this access token is
|
131
|
+
# valid. After this time has passed, the access token will be rejected - you
|
132
|
+
# should refresh the token via another call to GetAuthToken before this
|
133
|
+
# happens.
|
134
|
+
sig { void }
|
135
|
+
def clear_expires_in_s
|
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::Auth::GetAuthTokenResponse) }
|
151
|
+
def self.decode(str)
|
152
|
+
end
|
153
|
+
|
154
|
+
sig { params(msg: Stately::Auth::GetAuthTokenResponse).returns(String) }
|
155
|
+
def self.encode(msg)
|
156
|
+
end
|
157
|
+
|
158
|
+
sig { params(str: String, kw: T.untyped).returns(Stately::Auth::GetAuthTokenResponse) }
|
159
|
+
def self.decode_json(str, **kw)
|
160
|
+
end
|
161
|
+
|
162
|
+
sig { params(msg: Stately::Auth::GetAuthTokenResponse, 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
|
@@ -0,0 +1,31 @@
|
|
1
|
+
# Code generated by protoc-gen-rbi. DO NOT EDIT.
|
2
|
+
# source: auth/service.proto
|
3
|
+
# typed: strict
|
4
|
+
|
5
|
+
module Stately::Auth::AuthService
|
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
|
+
# GetAuthToken returns a short-lived access token from some proof of
|
22
|
+
# identity. This operation will fail if the identity cannot be verified.
|
23
|
+
sig do
|
24
|
+
params(
|
25
|
+
request: Stately::Auth::GetAuthTokenRequest
|
26
|
+
).returns(Stately::Auth::GetAuthTokenResponse)
|
27
|
+
end
|
28
|
+
def get_auth_token(request)
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
@@ -0,0 +1,163 @@
|
|
1
|
+
# Code generated by protoc-gen-rbi. DO NOT EDIT.
|
2
|
+
# source: db/continue_list.proto
|
3
|
+
# typed: strict
|
4
|
+
|
5
|
+
class Stately::Db::ContinueListRequest
|
6
|
+
include ::Google::Protobuf::MessageExts
|
7
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
8
|
+
|
9
|
+
sig do
|
10
|
+
params(
|
11
|
+
token_data: T.nilable(String),
|
12
|
+
direction: T.nilable(T.any(Symbol, String, Integer)),
|
13
|
+
schema_version_id: T.nilable(Integer),
|
14
|
+
schema_id: T.nilable(Integer)
|
15
|
+
).void
|
16
|
+
end
|
17
|
+
def initialize(
|
18
|
+
token_data: "",
|
19
|
+
direction: :CONTINUE_LIST_FORWARD,
|
20
|
+
schema_version_id: 0,
|
21
|
+
schema_id: 0
|
22
|
+
)
|
23
|
+
end
|
24
|
+
|
25
|
+
# token_data is an opaque list continuation token returned by a previous call to
|
26
|
+
# BeginList, ContinueList, or SyncList.
|
27
|
+
sig { returns(String) }
|
28
|
+
def token_data
|
29
|
+
end
|
30
|
+
|
31
|
+
# token_data is an opaque list continuation token returned by a previous call to
|
32
|
+
# BeginList, ContinueList, or SyncList.
|
33
|
+
sig { params(value: String).void }
|
34
|
+
def token_data=(value)
|
35
|
+
end
|
36
|
+
|
37
|
+
# token_data is an opaque list continuation token returned by a previous call to
|
38
|
+
# BeginList, ContinueList, or SyncList.
|
39
|
+
sig { void }
|
40
|
+
def clear_token_data
|
41
|
+
end
|
42
|
+
|
43
|
+
# direction indicates whether we are expanding the result set (paginating)
|
44
|
+
# forward (in the direction of the original List operation) or backward (in
|
45
|
+
# the opposite direction). The default is to expand forward.
|
46
|
+
sig { returns(T.any(Symbol, Integer)) }
|
47
|
+
def direction
|
48
|
+
end
|
49
|
+
|
50
|
+
# direction indicates whether we are expanding the result set (paginating)
|
51
|
+
# forward (in the direction of the original List operation) or backward (in
|
52
|
+
# the opposite direction). The default is to expand forward.
|
53
|
+
sig { params(value: T.any(Symbol, String, Integer)).void }
|
54
|
+
def direction=(value)
|
55
|
+
end
|
56
|
+
|
57
|
+
# direction indicates whether we are expanding the result set (paginating)
|
58
|
+
# forward (in the direction of the original List operation) or backward (in
|
59
|
+
# the opposite direction). The default is to expand forward.
|
60
|
+
sig { void }
|
61
|
+
def clear_direction
|
62
|
+
end
|
63
|
+
|
64
|
+
# schema_version_id is the schema version id the client is using. This is
|
65
|
+
# used to ensure the same schema version is used across each page of the list.
|
66
|
+
# If the version the token was created with is different from the client's
|
67
|
+
# current version, the operation will error with SchemaVersionMismatch error,
|
68
|
+
# in which case you should start over with a fresh BeginList call.
|
69
|
+
sig { returns(Integer) }
|
70
|
+
def schema_version_id
|
71
|
+
end
|
72
|
+
|
73
|
+
# schema_version_id is the schema version id the client is using. This is
|
74
|
+
# used to ensure the same schema version is used across each page of the list.
|
75
|
+
# If the version the token was created with is different from the client's
|
76
|
+
# current version, the operation will error with SchemaVersionMismatch error,
|
77
|
+
# in which case you should start over with a fresh BeginList call.
|
78
|
+
sig { params(value: Integer).void }
|
79
|
+
def schema_version_id=(value)
|
80
|
+
end
|
81
|
+
|
82
|
+
# schema_version_id is the schema version id the client is using. This is
|
83
|
+
# used to ensure the same schema version is used across each page of the list.
|
84
|
+
# If the version the token was created with is different from the client's
|
85
|
+
# current version, the operation will error with SchemaVersionMismatch error,
|
86
|
+
# in which case you should start over with a fresh BeginList call.
|
87
|
+
sig { void }
|
88
|
+
def clear_schema_version_id
|
89
|
+
end
|
90
|
+
|
91
|
+
# schema_id refers to the schema to use for this operation.
|
92
|
+
# If the store_id does not have a schema with this ID, the operation will
|
93
|
+
# error with SchemaNotFound error. You should not have to set this manually
|
94
|
+
# as your generated SDK should know its schema and wire this in for you.
|
95
|
+
sig { returns(Integer) }
|
96
|
+
def schema_id
|
97
|
+
end
|
98
|
+
|
99
|
+
# schema_id refers to the schema to use for this operation.
|
100
|
+
# If the store_id does not have a schema with this ID, the operation will
|
101
|
+
# error with SchemaNotFound error. You should not have to set this manually
|
102
|
+
# as your generated SDK should know its schema and wire this in for you.
|
103
|
+
sig { params(value: Integer).void }
|
104
|
+
def schema_id=(value)
|
105
|
+
end
|
106
|
+
|
107
|
+
# schema_id refers to the schema to use for this operation.
|
108
|
+
# If the store_id does not have a schema with this ID, the operation will
|
109
|
+
# error with SchemaNotFound error. You should not have to set this manually
|
110
|
+
# as your generated SDK should know its schema and wire this in for you.
|
111
|
+
sig { void }
|
112
|
+
def clear_schema_id
|
113
|
+
end
|
114
|
+
|
115
|
+
sig { params(field: String).returns(T.untyped) }
|
116
|
+
def [](field)
|
117
|
+
end
|
118
|
+
|
119
|
+
sig { params(field: String, value: T.untyped).void }
|
120
|
+
def []=(field, value)
|
121
|
+
end
|
122
|
+
|
123
|
+
sig { returns(T::Hash[Symbol, T.untyped]) }
|
124
|
+
def to_h
|
125
|
+
end
|
126
|
+
|
127
|
+
sig { params(str: String).returns(Stately::Db::ContinueListRequest) }
|
128
|
+
def self.decode(str)
|
129
|
+
end
|
130
|
+
|
131
|
+
sig { params(msg: Stately::Db::ContinueListRequest).returns(String) }
|
132
|
+
def self.encode(msg)
|
133
|
+
end
|
134
|
+
|
135
|
+
sig { params(str: String, kw: T.untyped).returns(Stately::Db::ContinueListRequest) }
|
136
|
+
def self.decode_json(str, **kw)
|
137
|
+
end
|
138
|
+
|
139
|
+
sig { params(msg: Stately::Db::ContinueListRequest, kw: T.untyped).returns(String) }
|
140
|
+
def self.encode_json(msg, **kw)
|
141
|
+
end
|
142
|
+
|
143
|
+
sig { returns(::Google::Protobuf::Descriptor) }
|
144
|
+
def self.descriptor
|
145
|
+
end
|
146
|
+
end
|
147
|
+
|
148
|
+
module Stately::Db::ContinueListDirection
|
149
|
+
self::CONTINUE_LIST_FORWARD = T.let(0, Integer)
|
150
|
+
self::CONTINUE_LIST_BACKWARD = T.let(1, Integer)
|
151
|
+
|
152
|
+
sig { params(value: Integer).returns(T.nilable(Symbol)) }
|
153
|
+
def self.lookup(value)
|
154
|
+
end
|
155
|
+
|
156
|
+
sig { params(value: Symbol).returns(T.nilable(Integer)) }
|
157
|
+
def self.resolve(value)
|
158
|
+
end
|
159
|
+
|
160
|
+
sig { returns(::Google::Protobuf::EnumDescriptor) }
|
161
|
+
def self.descriptor
|
162
|
+
end
|
163
|
+
end
|