statelydb 0.22.0 → 0.24.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5787a49877b344fb15624fd94f01e1a3d9f79634ad24c5ffce1851982674419b
4
- data.tar.gz: 3b652b61fce8e798c6cc8d9df2825a7937c500fb5cae18183f185e1480315b72
3
+ metadata.gz: 79874a278fbc1274780bc6cfdc886038af5b30e0bfa5d78cf19a7154af8e7f7c
4
+ data.tar.gz: 94f6af47f7fe70029dcfde2bb443c3f581353455c5ac1ee8d4685b11c530c7de
5
5
  SHA512:
6
- metadata.gz: 15217833f2abf85cad091d56610b518d1fe0487f51ac1c592427f1d5369edaadd3793de1a3d1fcf4928e18754323f473250b78192e5762f01a234774f20bbab5
7
- data.tar.gz: 2dcc0d0ff681ad38e0fcf985999bde034e0c6123d39d18075fe47896a4b4752b135c7a896fa84107d50f10c1f5afd768a437f0349fa4e143504213394adcf207
6
+ metadata.gz: 9af4e46b124af55084a21277eccf5e275a1cb8e2959ad9b3c13c7ef9457297e764a6b43586918c41d1dda14a0e28642033a8c3af69755aa262910f680141a1e7
7
+ data.tar.gz: fce5c1dadfec2499b76bcb1b42940b6ce031784a43904698860ce1fda905e5a0b13b5fb2d25d7c901a1c7555858f268cef52ea0d542b781197e0cd402fd228c9
data/lib/api/db/put_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/put.proto\x12\nstately.db\x1a\rdb/item.proto\"|\n\nPutRequest\x12\x19\n\x08store_id\x18\x01 \x01(\x04R\x07storeId\x12\'\n\x04puts\x18\x02 \x03(\x0b\x32\x13.stately.db.PutItemR\x04puts\x12*\n\x11schema_version_id\x18\x03 \x01(\rR\x0fschemaVersionId\"\x99\x01\n\x07PutItem\x12$\n\x04item\x18\x01 \x01(\x0b\x32\x10.stately.db.ItemR\x04item\x12\x42\n\x1doverwrite_metadata_timestamps\x18\x02 \x01(\x08R\x1boverwriteMetadataTimestamps\x12$\n\x0emust_not_exist\x18\x03 \x01(\x08R\x0cmustNotExist\"5\n\x0bPutResponse\x12&\n\x05items\x18\x01 \x03(\x0b\x32\x10.stately.db.ItemR\x05itemsBc\n\x0e\x63om.stately.dbB\x08PutProtoP\x01\xa2\x02\x03SDX\xaa\x02\nStately.Db\xca\x02\nStately\\Db\xe2\x02\x16Stately\\Db\\GPBMetadata\xea\x02\x0bStately::Dbb\x06proto3"
10
+ descriptor_data = "\n\x0c\x64\x62/put.proto\x12\nstately.db\x1a\rdb/item.proto\"\x99\x01\n\nPutRequest\x12\x19\n\x08store_id\x18\x01 \x01(\x04R\x07storeId\x12\'\n\x04puts\x18\x02 \x03(\x0b\x32\x13.stately.db.PutItemR\x04puts\x12*\n\x11schema_version_id\x18\x03 \x01(\rR\x0fschemaVersionId\x12\x1b\n\tschema_id\x18\x04 \x01(\x04R\x08schemaId\"\x99\x01\n\x07PutItem\x12$\n\x04item\x18\x01 \x01(\x0b\x32\x10.stately.db.ItemR\x04item\x12\x42\n\x1doverwrite_metadata_timestamps\x18\x02 \x01(\x08R\x1boverwriteMetadataTimestamps\x12$\n\x0emust_not_exist\x18\x03 \x01(\x08R\x0cmustNotExist\"5\n\x0bPutResponse\x12&\n\x05items\x18\x01 \x03(\x0b\x32\x10.stately.db.ItemR\x05itemsBc\n\x0e\x63om.stately.dbB\x08PutProtoP\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)
@@ -14,7 +14,7 @@ require 'api/db/put_pb'
14
14
  require 'google/protobuf/empty_pb'
15
15
 
16
16
 
17
- descriptor_data = "\n\x14\x64\x62/transaction.proto\x12\nstately.db\x1a\x16\x64\x62/continue_list.proto\x1a\x0f\x64\x62/delete.proto\x1a\x0c\x64\x62/get.proto\x1a\rdb/item.proto\x1a\x16\x64\x62/item_property.proto\x1a\rdb/list.proto\x1a\x0c\x64\x62/put.proto\x1a\x1bgoogle/protobuf/empty.proto\"\x9f\x04\n\x12TransactionRequest\x12\x1d\n\nmessage_id\x18\x01 \x01(\rR\tmessageId\x12\x34\n\x05\x62\x65gin\x18\x02 \x01(\x0b\x32\x1c.stately.db.TransactionBeginH\x00R\x05\x62\x65gin\x12\x39\n\tget_items\x18\x03 \x01(\x0b\x32\x1a.stately.db.TransactionGetH\x00R\x08getItems\x12\x41\n\nbegin_list\x18\x04 \x01(\x0b\x32 .stately.db.TransactionBeginListH\x00R\tbeginList\x12J\n\rcontinue_list\x18\x05 \x01(\x0b\x32#.stately.db.TransactionContinueListH\x00R\x0c\x63ontinueList\x12\x39\n\tput_items\x18\x06 \x01(\x0b\x32\x1a.stately.db.TransactionPutH\x00R\x08putItems\x12\x42\n\x0c\x64\x65lete_items\x18\x07 \x01(\x0b\x32\x1d.stately.db.TransactionDeleteH\x00R\x0b\x64\x65leteItems\x12\x30\n\x06\x63ommit\x18\x08 \x01(\x0b\x32\x16.google.protobuf.EmptyH\x00R\x06\x63ommit\x12.\n\x05\x61\x62ort\x18\t \x01(\x0b\x32\x16.google.protobuf.EmptyH\x00R\x05\x61\x62ortB\t\n\x07\x63ommand\"\xc8\x02\n\x13TransactionResponse\x12\x1d\n\nmessage_id\x18\x01 \x01(\rR\tmessageId\x12\x45\n\x0bget_results\x18\x02 \x01(\x0b\x32\".stately.db.TransactionGetResponseH\x00R\ngetResults\x12\x38\n\x07put_ack\x18\x03 \x01(\x0b\x32\x1d.stately.db.TransactionPutAckH\x00R\x06putAck\x12H\n\x0clist_results\x18\x04 \x01(\x0b\x32#.stately.db.TransactionListResponseH\x00R\x0blistResults\x12=\n\x08\x66inished\x18\x05 \x01(\x0b\x32\x1f.stately.db.TransactionFinishedH\x00R\x08\x66inishedB\x08\n\x06result\"Y\n\x10TransactionBegin\x12\x19\n\x08store_id\x18\x01 \x01(\x04R\x07storeId\x12*\n\x11schema_version_id\x18\x02 \x01(\rR\x0fschemaVersionId\"9\n\x0eTransactionGet\x12\'\n\x04gets\x18\x01 \x03(\x0b\x32\x13.stately.db.GetItemR\x04gets\"\xd9\x01\n\x14TransactionBeginList\x12&\n\x0fkey_path_prefix\x18\x01 \x01(\tR\rkeyPathPrefix\x12\x14\n\x05limit\x18\x02 \x01(\rR\x05limit\x12\x41\n\rsort_property\x18\x03 \x01(\x0e\x32\x1c.stately.db.SortablePropertyR\x0csortProperty\x12@\n\x0esort_direction\x18\x04 \x01(\x0e\x32\x19.stately.db.SortDirectionR\rsortDirection\"y\n\x17TransactionContinueList\x12\x1d\n\ntoken_data\x18\x01 \x01(\x0cR\ttokenData\x12?\n\tdirection\x18\x04 \x01(\x0e\x32!.stately.db.ContinueListDirectionR\tdirection\"9\n\x0eTransactionPut\x12\'\n\x04puts\x18\x01 \x03(\x0b\x32\x13.stately.db.PutItemR\x04puts\"E\n\x11TransactionDelete\x12\x30\n\x07\x64\x65letes\x18\x01 \x03(\x0b\x32\x16.stately.db.DeleteItemR\x07\x64\x65letes\"@\n\x16TransactionGetResponse\x12&\n\x05items\x18\x01 \x03(\x0b\x32\x10.stately.db.ItemR\x05items\"D\n\x0bGeneratedID\x12\x14\n\x04uint\x18\x01 \x01(\x04H\x00R\x04uint\x12\x16\n\x05\x62ytes\x18\x02 \x01(\x0cH\x00R\x05\x62ytesB\x07\n\x05value\"Q\n\x11TransactionPutAck\x12<\n\rgenerated_ids\x18\x01 \x03(\x0b\x32\x17.stately.db.GeneratedIDR\x0cgeneratedIds\"\x96\x01\n\x17TransactionListResponse\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\"\xa7\x01\n\x13TransactionFinished\x12\x1c\n\tcommitted\x18\x01 \x01(\x08R\tcommitted\x12\x31\n\x0bput_results\x18\x02 \x03(\x0b\x32\x10.stately.db.ItemR\nputResults\x12?\n\x0e\x64\x65lete_results\x18\x03 \x03(\x0b\x32\x18.stately.db.DeleteResultR\rdeleteResultsBk\n\x0e\x63om.stately.dbB\x10TransactionProtoP\x01\xa2\x02\x03SDX\xaa\x02\nStately.Db\xca\x02\nStately\\Db\xe2\x02\x16Stately\\Db\\GPBMetadata\xea\x02\x0bStately::Dbb\x06proto3"
17
+ descriptor_data = "\n\x14\x64\x62/transaction.proto\x12\nstately.db\x1a\x16\x64\x62/continue_list.proto\x1a\x0f\x64\x62/delete.proto\x1a\x0c\x64\x62/get.proto\x1a\rdb/item.proto\x1a\x16\x64\x62/item_property.proto\x1a\rdb/list.proto\x1a\x0c\x64\x62/put.proto\x1a\x1bgoogle/protobuf/empty.proto\"\x9f\x04\n\x12TransactionRequest\x12\x1d\n\nmessage_id\x18\x01 \x01(\rR\tmessageId\x12\x34\n\x05\x62\x65gin\x18\x02 \x01(\x0b\x32\x1c.stately.db.TransactionBeginH\x00R\x05\x62\x65gin\x12\x39\n\tget_items\x18\x03 \x01(\x0b\x32\x1a.stately.db.TransactionGetH\x00R\x08getItems\x12\x41\n\nbegin_list\x18\x04 \x01(\x0b\x32 .stately.db.TransactionBeginListH\x00R\tbeginList\x12J\n\rcontinue_list\x18\x05 \x01(\x0b\x32#.stately.db.TransactionContinueListH\x00R\x0c\x63ontinueList\x12\x39\n\tput_items\x18\x06 \x01(\x0b\x32\x1a.stately.db.TransactionPutH\x00R\x08putItems\x12\x42\n\x0c\x64\x65lete_items\x18\x07 \x01(\x0b\x32\x1d.stately.db.TransactionDeleteH\x00R\x0b\x64\x65leteItems\x12\x30\n\x06\x63ommit\x18\x08 \x01(\x0b\x32\x16.google.protobuf.EmptyH\x00R\x06\x63ommit\x12.\n\x05\x61\x62ort\x18\t \x01(\x0b\x32\x16.google.protobuf.EmptyH\x00R\x05\x61\x62ortB\t\n\x07\x63ommand\"\xc8\x02\n\x13TransactionResponse\x12\x1d\n\nmessage_id\x18\x01 \x01(\rR\tmessageId\x12\x45\n\x0bget_results\x18\x02 \x01(\x0b\x32\".stately.db.TransactionGetResponseH\x00R\ngetResults\x12\x38\n\x07put_ack\x18\x03 \x01(\x0b\x32\x1d.stately.db.TransactionPutAckH\x00R\x06putAck\x12H\n\x0clist_results\x18\x04 \x01(\x0b\x32#.stately.db.TransactionListResponseH\x00R\x0blistResults\x12=\n\x08\x66inished\x18\x05 \x01(\x0b\x32\x1f.stately.db.TransactionFinishedH\x00R\x08\x66inishedB\x08\n\x06result\"v\n\x10TransactionBegin\x12\x19\n\x08store_id\x18\x01 \x01(\x04R\x07storeId\x12*\n\x11schema_version_id\x18\x02 \x01(\rR\x0fschemaVersionId\x12\x1b\n\tschema_id\x18\x03 \x01(\x04R\x08schemaId\"9\n\x0eTransactionGet\x12\'\n\x04gets\x18\x01 \x03(\x0b\x32\x13.stately.db.GetItemR\x04gets\"\xd9\x01\n\x14TransactionBeginList\x12&\n\x0fkey_path_prefix\x18\x01 \x01(\tR\rkeyPathPrefix\x12\x14\n\x05limit\x18\x02 \x01(\rR\x05limit\x12\x41\n\rsort_property\x18\x03 \x01(\x0e\x32\x1c.stately.db.SortablePropertyR\x0csortProperty\x12@\n\x0esort_direction\x18\x04 \x01(\x0e\x32\x19.stately.db.SortDirectionR\rsortDirection\"y\n\x17TransactionContinueList\x12\x1d\n\ntoken_data\x18\x01 \x01(\x0cR\ttokenData\x12?\n\tdirection\x18\x04 \x01(\x0e\x32!.stately.db.ContinueListDirectionR\tdirection\"9\n\x0eTransactionPut\x12\'\n\x04puts\x18\x01 \x03(\x0b\x32\x13.stately.db.PutItemR\x04puts\"E\n\x11TransactionDelete\x12\x30\n\x07\x64\x65letes\x18\x01 \x03(\x0b\x32\x16.stately.db.DeleteItemR\x07\x64\x65letes\"@\n\x16TransactionGetResponse\x12&\n\x05items\x18\x01 \x03(\x0b\x32\x10.stately.db.ItemR\x05items\"D\n\x0bGeneratedID\x12\x14\n\x04uint\x18\x01 \x01(\x04H\x00R\x04uint\x12\x16\n\x05\x62ytes\x18\x02 \x01(\x0cH\x00R\x05\x62ytesB\x07\n\x05value\"Q\n\x11TransactionPutAck\x12<\n\rgenerated_ids\x18\x01 \x03(\x0b\x32\x17.stately.db.GeneratedIDR\x0cgeneratedIds\"\x96\x01\n\x17TransactionListResponse\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\"\xa7\x01\n\x13TransactionFinished\x12\x1c\n\tcommitted\x18\x01 \x01(\x08R\tcommitted\x12\x31\n\x0bput_results\x18\x02 \x03(\x0b\x32\x10.stately.db.ItemR\nputResults\x12?\n\x0e\x64\x65lete_results\x18\x03 \x03(\x0b\x32\x18.stately.db.DeleteResultR\rdeleteResultsBk\n\x0e\x63om.stately.dbB\x10TransactionProtoP\x01\xa2\x02\x03SDX\xaa\x02\nStately.Db\xca\x02\nStately\\Db\xe2\x02\x16Stately\\Db\\GPBMetadata\xea\x02\x0bStately::Dbb\x06proto3"
18
18
 
19
19
  pool = Google::Protobuf::DescriptorPool.generated_pool
20
20
  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 [::StatelyDB::Schema] the schema to use for marshalling and unmarshalling Items
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,3 @@
1
+ # Code generated by protoc-gen-rbi. DO NOT EDIT.
2
+ # source: auth/service.proto
3
+ # typed: strict
@@ -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
@@ -0,0 +1,123 @@
1
+ # Code generated by protoc-gen-rbi. DO NOT EDIT.
2
+ # source: db/continue_scan.proto
3
+ # typed: strict
4
+
5
+ class Stately::Db::ContinueScanRequest
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
24
+ # to BeginScan or ContinueScan.
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
30
+ # to BeginScan or ContinueScan.
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
36
+ # to BeginScan or ContinueScan.
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 the same schema version is used across each page of the list.
43
+ # If the version the token was created with is different from the client's
44
+ # current version, the operation will error with SchemaVersionMismatch error,
45
+ # in which case you should start over with a fresh BeginScan call.
46
+ sig { returns(Integer) }
47
+ def schema_version_id
48
+ end
49
+
50
+ # schema_version_id is the schema version id the client is using. This is
51
+ # used to ensure the same schema version is used across each page of the list.
52
+ # If the version the token was created with is different from the client's
53
+ # current version, the operation will error with SchemaVersionMismatch error,
54
+ # in which case you should start over with a fresh BeginScan call.
55
+ sig { params(value: Integer).void }
56
+ def schema_version_id=(value)
57
+ end
58
+
59
+ # schema_version_id is the schema version id the client is using. This is
60
+ # used to ensure the same schema version is used across each page of the list.
61
+ # If the version the token was created with is different from the client's
62
+ # current version, the operation will error with SchemaVersionMismatch error,
63
+ # in which case you should start over with a fresh BeginScan call.
64
+ sig { void }
65
+ def clear_schema_version_id
66
+ end
67
+
68
+ # schema_id refers to the schema to use for this operation.
69
+ # If the store_id does not have a schema with this ID, the operation will
70
+ # error with SchemaNotFound error. You should not have to set this manually
71
+ # as your generated SDK should know its schema and wire this in for you.
72
+ sig { returns(Integer) }
73
+ def schema_id
74
+ end
75
+
76
+ # schema_id refers to the schema to use for this operation.
77
+ # If the store_id does not have a schema with this ID, the operation will
78
+ # error with SchemaNotFound error. You should not have to set this manually
79
+ # as your generated SDK should know its schema and wire this in for you.
80
+ sig { params(value: Integer).void }
81
+ def schema_id=(value)
82
+ end
83
+
84
+ # schema_id refers to the schema to use for this operation.
85
+ # If the store_id does not have a schema with this ID, the operation will
86
+ # error with SchemaNotFound error. You should not have to set this manually
87
+ # as your generated SDK should know its schema and wire this in for you.
88
+ sig { void }
89
+ def clear_schema_id
90
+ end
91
+
92
+ sig { params(field: String).returns(T.untyped) }
93
+ def [](field)
94
+ end
95
+
96
+ sig { params(field: String, value: T.untyped).void }
97
+ def []=(field, value)
98
+ end
99
+
100
+ sig { returns(T::Hash[Symbol, T.untyped]) }
101
+ def to_h
102
+ end
103
+
104
+ sig { params(str: String).returns(Stately::Db::ContinueScanRequest) }
105
+ def self.decode(str)
106
+ end
107
+
108
+ sig { params(msg: Stately::Db::ContinueScanRequest).returns(String) }
109
+ def self.encode(msg)
110
+ end
111
+
112
+ sig { params(str: String, kw: T.untyped).returns(Stately::Db::ContinueScanRequest) }
113
+ def self.decode_json(str, **kw)
114
+ end
115
+
116
+ sig { params(msg: Stately::Db::ContinueScanRequest, kw: T.untyped).returns(String) }
117
+ def self.encode_json(msg, **kw)
118
+ end
119
+
120
+ sig { returns(::Google::Protobuf::Descriptor) }
121
+ def self.descriptor
122
+ end
123
+ end