statelydb 0.25.0 → 0.28.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/README.md +1 -6
- data/lib/api/auth/get_auth_token_pb.rb +1 -1
- data/lib/api/auth/service_pb.rb +1 -1
- 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/item_pb.rb +1 -1
- data/lib/api/db/item_property_pb.rb +1 -1
- data/lib/api/db/list_filters_pb.rb +17 -0
- data/lib/api/db/list_pb.rb +5 -2
- data/lib/api/db/list_token_pb.rb +1 -1
- data/lib/api/db/put_pb.rb +1 -1
- data/lib/api/db/scan_pb.rb +4 -3
- data/lib/api/db/service_pb.rb +2 -3
- data/lib/api/db/service_services_pb.rb +0 -6
- data/lib/api/db/sync_list_pb.rb +1 -1
- data/lib/api/db/transaction_pb.rb +3 -2
- data/lib/api/errors/error_details_pb.rb +1 -1
- data/lib/common/auth/auth_token_provider.rb +25 -7
- data/lib/common/auth/interceptor.rb +3 -2
- data/lib/common/auth/token_provider.rb +7 -0
- data/lib/statelydb.rb +6 -4
- data/lib/uuid.rb +1 -1
- data/lib/version.rb +5 -0
- data/rbi/db/delete_pb.rbi +3 -3
- data/rbi/db/get_pb.rbi +15 -21
- data/rbi/db/list_filters_pb.rbi +69 -0
- data/rbi/db/list_pb.rbi +275 -20
- data/rbi/db/put_pb.rbi +15 -21
- data/rbi/db/scan_pb.rbi +12 -81
- data/rbi/db/service_services_pb.rbi +0 -13
- data/rbi/db/transaction_pb.rbi +34 -11
- data/rbi/statelydb.rbi +19 -9
- data/sig/statelydb.rbs +21 -12
- metadata +10 -6
- data/lib/api/db/scan_root_paths_pb.rb +0 -19
data/rbi/statelydb.rbi
CHANGED
@@ -14,7 +14,7 @@ module StatelyDB
|
|
14
14
|
sig { returns(String) }
|
15
15
|
def to_s; end
|
16
16
|
|
17
|
-
# to_str returns the UUID as a base16 string (eg: "f4a8a24a-129d-411f-91d2-6d19d0eaa096")
|
17
|
+
# to_str returns the UUID as a base16 string (eg: "f4a8a24a-129d-411f-91d2-6d19d0eaa096").
|
18
18
|
#
|
19
19
|
# Note: to_str is a type coercion method that is called by Ruby when an object is coerced to a string.
|
20
20
|
sig { returns(String) }
|
@@ -529,9 +529,11 @@ module StatelyDB
|
|
529
529
|
module Auth
|
530
530
|
# GRPC interceptor to authenticate against Stately and append bearer tokens to outgoing requests
|
531
531
|
class Interceptor < GRPC::ClientInterceptor
|
532
|
-
#
|
532
|
+
# This must have been started already.
|
533
|
+
#
|
534
|
+
# _@param_ `token_provider` — The token provider to use for authentication.
|
533
535
|
sig { params(token_provider: StatelyDB::Common::Auth::TokenProvider).void }
|
534
|
-
def initialize(token_provider:
|
536
|
+
def initialize(token_provider:); end
|
535
537
|
|
536
538
|
# gRPC client unary interceptor
|
537
539
|
#
|
@@ -694,6 +696,12 @@ module StatelyDB
|
|
694
696
|
# TokenProvider is an abstract base class that should be extended
|
695
697
|
# for individual token provider implementations
|
696
698
|
class TokenProvider
|
699
|
+
# Start the token provider. Starting multiple times should be a no-op.
|
700
|
+
#
|
701
|
+
# _@param_ `endpoint` — The endpoint to connect to
|
702
|
+
sig { params(endpoint: String).void }
|
703
|
+
def start(endpoint: "https://api.stately.cloud"); end
|
704
|
+
|
697
705
|
# Get the current access token
|
698
706
|
#
|
699
707
|
# _@param_ `force` — Whether to force a refresh of the token
|
@@ -712,13 +720,15 @@ module StatelyDB
|
|
712
720
|
# It will default to using the value of `STATELY_ACCESS_KEY` if
|
713
721
|
# no credentials are explicitly passed and will throw an error if no credentials are found.
|
714
722
|
class AuthTokenProvider < StatelyDB::Common::Auth::TokenProvider
|
715
|
-
# _@param_ `endpoint` — The endpoint of the auth server
|
716
|
-
#
|
717
723
|
# _@param_ `access_key` — The StatelyDB access key credential
|
718
724
|
#
|
719
725
|
# _@param_ `base_retry_backoff_secs` — The base retry backoff in seconds
|
720
|
-
sig { params(
|
721
|
-
def initialize(
|
726
|
+
sig { params(access_key: String, base_retry_backoff_secs: Float).void }
|
727
|
+
def initialize(access_key: ENV.fetch("STATELY_ACCESS_KEY", nil), base_retry_backoff_secs: 1); end
|
728
|
+
|
729
|
+
# Start the token provider. Starting multiple times is a no-op.
|
730
|
+
sig { params(endpoint: String).void }
|
731
|
+
def start(endpoint: "https://api.stately.cloud"); end
|
722
732
|
|
723
733
|
# Close the token provider and kill any background operations
|
724
734
|
# This just invokes the close method on the actor which should do the cleanup
|
@@ -742,10 +752,10 @@ module StatelyDB
|
|
742
752
|
sig { params(endpoint: String, access_key: String, base_retry_backoff_secs: Float).void }
|
743
753
|
def initialize(endpoint:, access_key:, base_retry_backoff_secs:); end
|
744
754
|
|
745
|
-
#
|
755
|
+
# Start the actor. This runs on the actor thread which means
|
746
756
|
# we can dispatch async operations here.
|
747
757
|
sig { void }
|
748
|
-
def
|
758
|
+
def start; end
|
749
759
|
|
750
760
|
# Close the token provider and kill any background operations
|
751
761
|
sig { void }
|
data/sig/statelydb.rbs
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
# A module for Stately Cloud auth code
|
2
2
|
module StatelyDB
|
3
|
+
VERSION: untyped
|
4
|
+
|
3
5
|
# UUID is a helper class for working with UUIDs in StatelyDB. The ruby version of a StatelyDB is a binary string,
|
4
6
|
# and this class provides convenience methods for converting to the base16 representation specified in RFC 9562.
|
5
7
|
# Internally this class uses the byte_string attribute to store the UUID as a string with the Encoding::ASCII_8BIT
|
@@ -11,7 +13,7 @@ module StatelyDB
|
|
11
13
|
# to_s returns the UUID as a base16 string (eg: "f4a8a24a-129d-411f-91d2-6d19d0eaa096")
|
12
14
|
def to_s: () -> String
|
13
15
|
|
14
|
-
# to_str returns the UUID as a base16 string (eg: "f4a8a24a-129d-411f-91d2-6d19d0eaa096")
|
16
|
+
# to_str returns the UUID as a base16 string (eg: "f4a8a24a-129d-411f-91d2-6d19d0eaa096").
|
15
17
|
#
|
16
18
|
# Note: to_str is a type coercion method that is called by Ruby when an object is coerced to a string.
|
17
19
|
def to_str: () -> String
|
@@ -463,8 +465,10 @@ module StatelyDB
|
|
463
465
|
module Auth
|
464
466
|
# GRPC interceptor to authenticate against Stately and append bearer tokens to outgoing requests
|
465
467
|
class Interceptor < GRPC::ClientInterceptor
|
466
|
-
#
|
467
|
-
|
468
|
+
# This must have been started already.
|
469
|
+
#
|
470
|
+
# _@param_ `token_provider` — The token provider to use for authentication.
|
471
|
+
def initialize: (token_provider: StatelyDB::Common::Auth::TokenProvider) -> void
|
468
472
|
|
469
473
|
# gRPC client unary interceptor
|
470
474
|
#
|
@@ -608,6 +612,11 @@ module StatelyDB
|
|
608
612
|
# TokenProvider is an abstract base class that should be extended
|
609
613
|
# for individual token provider implementations
|
610
614
|
class TokenProvider
|
615
|
+
# Start the token provider. Starting multiple times should be a no-op.
|
616
|
+
#
|
617
|
+
# _@param_ `endpoint` — The endpoint to connect to
|
618
|
+
def start: (?endpoint: String) -> void
|
619
|
+
|
611
620
|
# Get the current access token
|
612
621
|
#
|
613
622
|
# _@param_ `force` — Whether to force a refresh of the token
|
@@ -624,12 +633,13 @@ module StatelyDB
|
|
624
633
|
# It will default to using the value of `STATELY_ACCESS_KEY` if
|
625
634
|
# no credentials are explicitly passed and will throw an error if no credentials are found.
|
626
635
|
class AuthTokenProvider < StatelyDB::Common::Auth::TokenProvider
|
627
|
-
# _@param_ `endpoint` — The endpoint of the auth server
|
628
|
-
#
|
629
636
|
# _@param_ `access_key` — The StatelyDB access key credential
|
630
637
|
#
|
631
638
|
# _@param_ `base_retry_backoff_secs` — The base retry backoff in seconds
|
632
|
-
def initialize: (?
|
639
|
+
def initialize: (?access_key: String, ?base_retry_backoff_secs: Float) -> void
|
640
|
+
|
641
|
+
# Start the token provider. Starting multiple times is a no-op.
|
642
|
+
def start: (?endpoint: String) -> void
|
633
643
|
|
634
644
|
# Close the token provider and kill any background operations
|
635
645
|
# This just invokes the close method on the actor which should do the cleanup
|
@@ -650,9 +660,9 @@ module StatelyDB
|
|
650
660
|
# _@param_ `base_retry_backoff_secs` — The base retry backoff in seconds
|
651
661
|
def initialize: (endpoint: String, access_key: String, base_retry_backoff_secs: Float) -> void
|
652
662
|
|
653
|
-
#
|
663
|
+
# Start the actor. This runs on the actor thread which means
|
654
664
|
# we can dispatch async operations here.
|
655
|
-
def
|
665
|
+
def start: () -> void
|
656
666
|
|
657
667
|
# Close the token provider and kill any background operations
|
658
668
|
def close: () -> void
|
@@ -978,8 +988,9 @@ module Stately
|
|
978
988
|
ListResponse: untyped
|
979
989
|
ListPartialResult: untyped
|
980
990
|
ListFinished: untyped
|
991
|
+
KeyCondition: untyped
|
981
992
|
SortDirection: untyped
|
982
|
-
|
993
|
+
Operator: untyped
|
983
994
|
BeginScanRequest: untyped
|
984
995
|
SegmentationParams: untyped
|
985
996
|
DeleteRequest: untyped
|
@@ -1005,13 +1016,11 @@ module Stately
|
|
1005
1016
|
TransactionPutAck: untyped
|
1006
1017
|
TransactionListResponse: untyped
|
1007
1018
|
TransactionFinished: untyped
|
1019
|
+
FilterCondition: untyped
|
1008
1020
|
ContinueListRequest: untyped
|
1009
1021
|
ContinueListDirection: untyped
|
1010
1022
|
ContinueScanRequest: untyped
|
1011
1023
|
SortableProperty: untyped
|
1012
|
-
ScanRootPathsRequest: untyped
|
1013
|
-
ScanRootPathsResponse: untyped
|
1014
|
-
ScanRootPathResult: untyped
|
1015
1024
|
|
1016
1025
|
module DatabaseService
|
1017
1026
|
Stub: untyped
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: statelydb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.28.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stately Cloud, Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-
|
11
|
+
date: 2025-06-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: async
|
@@ -66,7 +66,9 @@ dependencies:
|
|
66
66
|
- - '='
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: 1.64.3
|
69
|
-
description:
|
69
|
+
description: Client for StatelyDB, a document database built on top of DynamoDB with
|
70
|
+
Elastic Schema that allows you to change your data model any time with automatic
|
71
|
+
backwards compatibility.
|
70
72
|
email: support@stately.cloud
|
71
73
|
executables: []
|
72
74
|
extensions: []
|
@@ -83,11 +85,11 @@ files:
|
|
83
85
|
- lib/api/db/get_pb.rb
|
84
86
|
- lib/api/db/item_pb.rb
|
85
87
|
- lib/api/db/item_property_pb.rb
|
88
|
+
- lib/api/db/list_filters_pb.rb
|
86
89
|
- lib/api/db/list_pb.rb
|
87
90
|
- lib/api/db/list_token_pb.rb
|
88
91
|
- lib/api/db/put_pb.rb
|
89
92
|
- lib/api/db/scan_pb.rb
|
90
|
-
- lib/api/db/scan_root_paths_pb.rb
|
91
93
|
- lib/api/db/service_pb.rb
|
92
94
|
- lib/api/db/service_services_pb.rb
|
93
95
|
- lib/api/db/sync_list_pb.rb
|
@@ -107,6 +109,7 @@ files:
|
|
107
109
|
- lib/transaction/queue.rb
|
108
110
|
- lib/transaction/transaction.rb
|
109
111
|
- lib/uuid.rb
|
112
|
+
- lib/version.rb
|
110
113
|
- rbi/auth/get_auth_token_pb.rbi
|
111
114
|
- rbi/auth/service_pb.rbi
|
112
115
|
- rbi/auth/service_services_pb.rbi
|
@@ -116,6 +119,7 @@ files:
|
|
116
119
|
- rbi/db/get_pb.rbi
|
117
120
|
- rbi/db/item_pb.rbi
|
118
121
|
- rbi/db/item_property_pb.rbi
|
122
|
+
- rbi/db/list_filters_pb.rbi
|
119
123
|
- rbi/db/list_pb.rbi
|
120
124
|
- rbi/db/list_token_pb.rbi
|
121
125
|
- rbi/db/put_pb.rbi
|
@@ -141,14 +145,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
141
145
|
requirements:
|
142
146
|
- - ">="
|
143
147
|
- !ruby/object:Gem::Version
|
144
|
-
version: 3.
|
148
|
+
version: 3.2.0
|
145
149
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
146
150
|
requirements:
|
147
151
|
- - ">="
|
148
152
|
- !ruby/object:Gem::Version
|
149
153
|
version: '0'
|
150
154
|
requirements: []
|
151
|
-
rubygems_version: 3.5.
|
155
|
+
rubygems_version: 3.5.22
|
152
156
|
signing_key:
|
153
157
|
specification_version: 4
|
154
158
|
summary: A library for interacting with StatelyDB
|
@@ -1,19 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
3
|
-
# source: db/scan_root_paths.proto
|
4
|
-
|
5
|
-
require 'google/protobuf'
|
6
|
-
|
7
|
-
|
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
|
-
|
10
|
-
pool = Google::Protobuf::DescriptorPool.generated_pool
|
11
|
-
pool.add_serialized_file(descriptor_data)
|
12
|
-
|
13
|
-
module Stately
|
14
|
-
module Db
|
15
|
-
ScanRootPathsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("stately.db.ScanRootPathsRequest").msgclass
|
16
|
-
ScanRootPathsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("stately.db.ScanRootPathsResponse").msgclass
|
17
|
-
ScanRootPathResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("stately.db.ScanRootPathResult").msgclass
|
18
|
-
end
|
19
|
-
end
|