authzed 0.4.0 → 0.7.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (32) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -2
  3. data/lib/authzed/api/v1/client.rb +8 -1
  4. data/lib/authzed/api/v1/core_pb.rb +29 -48
  5. data/lib/authzed/api/v1/debug_pb.rb +31 -29
  6. data/lib/authzed/api/v1/error_reason_pb.rb +40 -0
  7. data/lib/authzed/api/v1/experimental_service_pb.rb +61 -0
  8. data/lib/authzed/api/v1/experimental_service_services_pb.rb +43 -0
  9. data/lib/authzed/api/v1/openapi_pb.rb +25 -2
  10. data/lib/authzed/api/v1/permission_service_pb.rb +31 -100
  11. data/lib/authzed/api/v1/schema_service_pb.rb +26 -11
  12. data/lib/authzed/api/v1/watch_service_pb.rb +25 -9
  13. data/lib/authzed.rb +3 -5
  14. metadata +5 -20
  15. data/lib/authzed/api/v0/acl_service_pb.rb +0 -104
  16. data/lib/authzed/api/v0/acl_service_services_pb.rb +0 -31
  17. data/lib/authzed/api/v0/client.rb +0 -61
  18. data/lib/authzed/api/v0/core_pb.rb +0 -40
  19. data/lib/authzed/api/v0/developer_pb.rb +0 -132
  20. data/lib/authzed/api/v0/developer_services_pb.rb +0 -31
  21. data/lib/authzed/api/v0/namespace_pb.rb +0 -95
  22. data/lib/authzed/api/v0/namespace_service_pb.rb +0 -47
  23. data/lib/authzed/api/v0/namespace_service_services_pb.rb +0 -28
  24. data/lib/authzed/api/v0/watch_service_pb.rb +0 -29
  25. data/lib/authzed/api/v0/watch_service_services_pb.rb +0 -26
  26. data/lib/authzed/api/v1/schema_pb.rb +0 -30
  27. data/lib/authzed/api/v1/schema_services_pb.rb +0 -34
  28. data/lib/authzed/api/v1alpha1/client.rb +0 -25
  29. data/lib/authzed/api/v1alpha1/schema_pb.rb +0 -37
  30. data/lib/authzed/api/v1alpha1/schema_services_pb.rb +0 -36
  31. data/lib/authzed/api/v1alpha1/watchresources_service_pb.rb +0 -46
  32. data/lib/authzed/api/v1alpha1/watchresources_service_services_pb.rb +0 -30
@@ -1,132 +0,0 @@
1
- # Generated by the protocol buffer compiler. DO NOT EDIT!
2
- # source: authzed/api/v0/developer.proto
3
-
4
- require 'google/protobuf'
5
-
6
- require 'authzed/api/v0/core_pb'
7
-
8
- Google::Protobuf::DescriptorPool.generated_pool.build do
9
- add_file("authzed/api/v0/developer.proto", :syntax => :proto3) do
10
- add_message "authzed.api.v0.FormatSchemaRequest" do
11
- optional :schema, :string, 1, json_name: "schema"
12
- end
13
- add_message "authzed.api.v0.FormatSchemaResponse" do
14
- optional :error, :message, 1, "authzed.api.v0.DeveloperError", json_name: "error"
15
- optional :formatted_schema, :string, 2, json_name: "formattedSchema"
16
- end
17
- add_message "authzed.api.v0.UpgradeSchemaRequest" do
18
- repeated :namespace_configs, :string, 1, json_name: "namespaceConfigs"
19
- end
20
- add_message "authzed.api.v0.UpgradeSchemaResponse" do
21
- optional :error, :message, 1, "authzed.api.v0.DeveloperError", json_name: "error"
22
- optional :upgraded_schema, :string, 2, json_name: "upgradedSchema"
23
- end
24
- add_message "authzed.api.v0.ShareRequest" do
25
- optional :schema, :string, 1, json_name: "schema"
26
- optional :relationships_yaml, :string, 2, json_name: "relationshipsYaml"
27
- optional :validation_yaml, :string, 3, json_name: "validationYaml"
28
- optional :assertions_yaml, :string, 4, json_name: "assertionsYaml"
29
- end
30
- add_message "authzed.api.v0.ShareResponse" do
31
- optional :share_reference, :string, 1, json_name: "shareReference"
32
- end
33
- add_message "authzed.api.v0.LookupShareRequest" do
34
- optional :share_reference, :string, 1, json_name: "shareReference"
35
- end
36
- add_message "authzed.api.v0.LookupShareResponse" do
37
- optional :status, :enum, 1, "authzed.api.v0.LookupShareResponse.LookupStatus", json_name: "status"
38
- optional :schema, :string, 2, json_name: "schema"
39
- optional :relationships_yaml, :string, 3, json_name: "relationshipsYaml"
40
- optional :validation_yaml, :string, 4, json_name: "validationYaml"
41
- optional :assertions_yaml, :string, 5, json_name: "assertionsYaml"
42
- end
43
- add_enum "authzed.api.v0.LookupShareResponse.LookupStatus" do
44
- value :UNKNOWN_REFERENCE, 0
45
- value :FAILED_TO_LOOKUP, 1
46
- value :VALID_REFERENCE, 2
47
- value :UPGRADED_REFERENCE, 3
48
- end
49
- add_message "authzed.api.v0.RequestContext" do
50
- optional :schema, :string, 1, json_name: "schema"
51
- repeated :relationships, :message, 2, "authzed.api.v0.RelationTuple", json_name: "relationships"
52
- end
53
- add_message "authzed.api.v0.EditCheckRequest" do
54
- optional :context, :message, 1, "authzed.api.v0.RequestContext", json_name: "context"
55
- repeated :check_relationships, :message, 2, "authzed.api.v0.RelationTuple", json_name: "checkRelationships"
56
- end
57
- add_message "authzed.api.v0.EditCheckResult" do
58
- optional :relationship, :message, 1, "authzed.api.v0.RelationTuple", json_name: "relationship"
59
- optional :is_member, :bool, 2, json_name: "isMember"
60
- optional :error, :message, 3, "authzed.api.v0.DeveloperError", json_name: "error"
61
- end
62
- add_message "authzed.api.v0.EditCheckResponse" do
63
- repeated :request_errors, :message, 1, "authzed.api.v0.DeveloperError", json_name: "requestErrors"
64
- repeated :check_results, :message, 2, "authzed.api.v0.EditCheckResult", json_name: "checkResults"
65
- end
66
- add_message "authzed.api.v0.ValidateRequest" do
67
- optional :context, :message, 1, "authzed.api.v0.RequestContext", json_name: "context"
68
- optional :validation_yaml, :string, 3, json_name: "validationYaml"
69
- optional :update_validation_yaml, :bool, 4, json_name: "updateValidationYaml"
70
- optional :assertions_yaml, :string, 5, json_name: "assertionsYaml"
71
- end
72
- add_message "authzed.api.v0.ValidateResponse" do
73
- repeated :request_errors, :message, 1, "authzed.api.v0.DeveloperError", json_name: "requestErrors"
74
- repeated :validation_errors, :message, 2, "authzed.api.v0.DeveloperError", json_name: "validationErrors"
75
- optional :updated_validation_yaml, :string, 3, json_name: "updatedValidationYaml"
76
- end
77
- add_message "authzed.api.v0.DeveloperError" do
78
- optional :message, :string, 1, json_name: "message"
79
- optional :line, :uint32, 2, json_name: "line"
80
- optional :column, :uint32, 3, json_name: "column"
81
- optional :source, :enum, 4, "authzed.api.v0.DeveloperError.Source", json_name: "source"
82
- optional :kind, :enum, 5, "authzed.api.v0.DeveloperError.ErrorKind", json_name: "kind"
83
- repeated :path, :string, 6, json_name: "path"
84
- optional :context, :string, 7, json_name: "context"
85
- end
86
- add_enum "authzed.api.v0.DeveloperError.Source" do
87
- value :UNKNOWN_SOURCE, 0
88
- value :SCHEMA, 1
89
- value :RELATIONSHIP, 2
90
- value :VALIDATION_YAML, 3
91
- value :CHECK_WATCH, 4
92
- value :ASSERTION, 5
93
- end
94
- add_enum "authzed.api.v0.DeveloperError.ErrorKind" do
95
- value :UNKNOWN_KIND, 0
96
- value :PARSE_ERROR, 1
97
- value :SCHEMA_ISSUE, 2
98
- value :DUPLICATE_RELATIONSHIP, 3
99
- value :MISSING_EXPECTED_RELATIONSHIP, 4
100
- value :EXTRA_RELATIONSHIP_FOUND, 5
101
- value :UNKNOWN_OBJECT_TYPE, 6
102
- value :UNKNOWN_RELATION, 7
103
- value :MAXIMUM_RECURSION, 8
104
- value :ASSERTION_FAILED, 9
105
- end
106
- end
107
- end
108
-
109
- module Authzed
110
- module Api
111
- module V0
112
- FormatSchemaRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v0.FormatSchemaRequest").msgclass
113
- FormatSchemaResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v0.FormatSchemaResponse").msgclass
114
- UpgradeSchemaRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v0.UpgradeSchemaRequest").msgclass
115
- UpgradeSchemaResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v0.UpgradeSchemaResponse").msgclass
116
- ShareRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v0.ShareRequest").msgclass
117
- ShareResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v0.ShareResponse").msgclass
118
- LookupShareRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v0.LookupShareRequest").msgclass
119
- LookupShareResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v0.LookupShareResponse").msgclass
120
- LookupShareResponse::LookupStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v0.LookupShareResponse.LookupStatus").enummodule
121
- RequestContext = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v0.RequestContext").msgclass
122
- EditCheckRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v0.EditCheckRequest").msgclass
123
- EditCheckResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v0.EditCheckResult").msgclass
124
- EditCheckResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v0.EditCheckResponse").msgclass
125
- ValidateRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v0.ValidateRequest").msgclass
126
- ValidateResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v0.ValidateResponse").msgclass
127
- DeveloperError = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v0.DeveloperError").msgclass
128
- DeveloperError::Source = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v0.DeveloperError.Source").enummodule
129
- DeveloperError::ErrorKind = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v0.DeveloperError.ErrorKind").enummodule
130
- end
131
- end
132
- end
@@ -1,31 +0,0 @@
1
- # Generated by the protocol buffer compiler. DO NOT EDIT!
2
- # Source: authzed/api/v0/developer.proto for package 'authzed.api.v0'
3
-
4
- require 'grpc'
5
- require 'authzed/api/v0/developer_pb'
6
-
7
- module Authzed
8
- module Api
9
- module V0
10
- module DeveloperService
11
- class Service
12
-
13
- include ::GRPC::GenericService
14
-
15
- self.marshal_class_method = :encode
16
- self.unmarshal_class_method = :decode
17
- self.service_name = 'authzed.api.v0.DeveloperService'
18
-
19
- rpc :EditCheck, ::Authzed::Api::V0::EditCheckRequest, ::Authzed::Api::V0::EditCheckResponse
20
- rpc :Validate, ::Authzed::Api::V0::ValidateRequest, ::Authzed::Api::V0::ValidateResponse
21
- rpc :Share, ::Authzed::Api::V0::ShareRequest, ::Authzed::Api::V0::ShareResponse
22
- rpc :LookupShared, ::Authzed::Api::V0::LookupShareRequest, ::Authzed::Api::V0::LookupShareResponse
23
- rpc :UpgradeSchema, ::Authzed::Api::V0::UpgradeSchemaRequest, ::Authzed::Api::V0::UpgradeSchemaResponse
24
- rpc :FormatSchema, ::Authzed::Api::V0::FormatSchemaRequest, ::Authzed::Api::V0::FormatSchemaResponse
25
- end
26
-
27
- Stub = Service.rpc_stub_class
28
- end
29
- end
30
- end
31
- end
@@ -1,95 +0,0 @@
1
- # Generated by the protocol buffer compiler. DO NOT EDIT!
2
- # source: authzed/api/v0/namespace.proto
3
-
4
- require 'google/protobuf'
5
-
6
- require 'google/protobuf/any_pb'
7
- require 'validate/validate_pb'
8
- require 'authzed/api/v0/core_pb'
9
-
10
- Google::Protobuf::DescriptorPool.generated_pool.build do
11
- add_file("authzed/api/v0/namespace.proto", :syntax => :proto3) do
12
- add_message "authzed.api.v0.Metadata" do
13
- repeated :metadata_message, :message, 1, "google.protobuf.Any", json_name: "metadataMessage"
14
- end
15
- add_message "authzed.api.v0.NamespaceDefinition" do
16
- optional :name, :string, 1, json_name: "name"
17
- repeated :relation, :message, 2, "authzed.api.v0.Relation", json_name: "relation"
18
- optional :metadata, :message, 3, "authzed.api.v0.Metadata", json_name: "metadata"
19
- end
20
- add_message "authzed.api.v0.Relation" do
21
- optional :name, :string, 1, json_name: "name"
22
- optional :userset_rewrite, :message, 2, "authzed.api.v0.UsersetRewrite", json_name: "usersetRewrite"
23
- optional :type_information, :message, 3, "authzed.api.v0.TypeInformation", json_name: "typeInformation"
24
- optional :metadata, :message, 4, "authzed.api.v0.Metadata", json_name: "metadata"
25
- end
26
- add_message "authzed.api.v0.TypeInformation" do
27
- repeated :allowed_direct_relations, :message, 1, "authzed.api.v0.AllowedRelation", json_name: "allowedDirectRelations"
28
- end
29
- add_message "authzed.api.v0.AllowedRelation" do
30
- optional :namespace, :string, 1, json_name: "namespace"
31
- oneof :relation_or_wildcard do
32
- optional :relation, :string, 3, json_name: "relation"
33
- optional :public_wildcard, :message, 4, "authzed.api.v0.AllowedRelation.PublicWildcard", json_name: "publicWildcard"
34
- end
35
- end
36
- add_message "authzed.api.v0.AllowedRelation.PublicWildcard" do
37
- end
38
- add_message "authzed.api.v0.UsersetRewrite" do
39
- oneof :rewrite_operation do
40
- optional :union, :message, 1, "authzed.api.v0.SetOperation", json_name: "union"
41
- optional :intersection, :message, 2, "authzed.api.v0.SetOperation", json_name: "intersection"
42
- optional :exclusion, :message, 3, "authzed.api.v0.SetOperation", json_name: "exclusion"
43
- end
44
- end
45
- add_message "authzed.api.v0.SetOperation" do
46
- repeated :child, :message, 1, "authzed.api.v0.SetOperation.Child", json_name: "child"
47
- end
48
- add_message "authzed.api.v0.SetOperation.Child" do
49
- oneof :child_type do
50
- optional :_this, :message, 1, "authzed.api.v0.SetOperation.Child.This", json_name: "This"
51
- optional :computed_userset, :message, 2, "authzed.api.v0.ComputedUserset", json_name: "computedUserset"
52
- optional :tuple_to_userset, :message, 3, "authzed.api.v0.TupleToUserset", json_name: "tupleToUserset"
53
- optional :userset_rewrite, :message, 4, "authzed.api.v0.UsersetRewrite", json_name: "usersetRewrite"
54
- end
55
- end
56
- add_message "authzed.api.v0.SetOperation.Child.This" do
57
- end
58
- add_message "authzed.api.v0.TupleToUserset" do
59
- optional :tupleset, :message, 1, "authzed.api.v0.TupleToUserset.Tupleset", json_name: "tupleset"
60
- optional :computed_userset, :message, 2, "authzed.api.v0.ComputedUserset", json_name: "computedUserset"
61
- end
62
- add_message "authzed.api.v0.TupleToUserset.Tupleset" do
63
- optional :relation, :string, 1, json_name: "relation"
64
- end
65
- add_message "authzed.api.v0.ComputedUserset" do
66
- optional :object, :enum, 1, "authzed.api.v0.ComputedUserset.Object", json_name: "object"
67
- optional :relation, :string, 2, json_name: "relation"
68
- end
69
- add_enum "authzed.api.v0.ComputedUserset.Object" do
70
- value :TUPLE_OBJECT, 0
71
- value :TUPLE_USERSET_OBJECT, 1
72
- end
73
- end
74
- end
75
-
76
- module Authzed
77
- module Api
78
- module V0
79
- Metadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v0.Metadata").msgclass
80
- NamespaceDefinition = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v0.NamespaceDefinition").msgclass
81
- Relation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v0.Relation").msgclass
82
- TypeInformation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v0.TypeInformation").msgclass
83
- AllowedRelation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v0.AllowedRelation").msgclass
84
- AllowedRelation::PublicWildcard = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v0.AllowedRelation.PublicWildcard").msgclass
85
- UsersetRewrite = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v0.UsersetRewrite").msgclass
86
- SetOperation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v0.SetOperation").msgclass
87
- SetOperation::Child = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v0.SetOperation.Child").msgclass
88
- SetOperation::Child::This = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v0.SetOperation.Child.This").msgclass
89
- TupleToUserset = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v0.TupleToUserset").msgclass
90
- TupleToUserset::Tupleset = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v0.TupleToUserset.Tupleset").msgclass
91
- ComputedUserset = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v0.ComputedUserset").msgclass
92
- ComputedUserset::Object = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v0.ComputedUserset.Object").enummodule
93
- end
94
- end
95
- end
@@ -1,47 +0,0 @@
1
- # Generated by the protocol buffer compiler. DO NOT EDIT!
2
- # source: authzed/api/v0/namespace_service.proto
3
-
4
- require 'google/protobuf'
5
-
6
- require 'validate/validate_pb'
7
- require 'authzed/api/v0/core_pb'
8
- require 'authzed/api/v0/namespace_pb'
9
-
10
- Google::Protobuf::DescriptorPool.generated_pool.build do
11
- add_file("authzed/api/v0/namespace_service.proto", :syntax => :proto3) do
12
- add_message "authzed.api.v0.ReadConfigRequest" do
13
- optional :namespace, :string, 1, json_name: "namespace"
14
- optional :at_revision, :message, 2, "authzed.api.v0.Zookie", json_name: "atRevision"
15
- end
16
- add_message "authzed.api.v0.ReadConfigResponse" do
17
- optional :namespace, :string, 1, json_name: "namespace"
18
- optional :config, :message, 2, "authzed.api.v0.NamespaceDefinition", json_name: "config"
19
- optional :revision, :message, 4, "authzed.api.v0.Zookie", json_name: "revision"
20
- end
21
- add_message "authzed.api.v0.WriteConfigRequest" do
22
- repeated :configs, :message, 2, "authzed.api.v0.NamespaceDefinition", json_name: "configs"
23
- end
24
- add_message "authzed.api.v0.WriteConfigResponse" do
25
- optional :revision, :message, 1, "authzed.api.v0.Zookie", json_name: "revision"
26
- end
27
- add_message "authzed.api.v0.DeleteConfigsRequest" do
28
- repeated :namespaces, :string, 1, json_name: "namespaces"
29
- end
30
- add_message "authzed.api.v0.DeleteConfigsResponse" do
31
- optional :revision, :message, 1, "authzed.api.v0.Zookie", json_name: "revision"
32
- end
33
- end
34
- end
35
-
36
- module Authzed
37
- module Api
38
- module V0
39
- ReadConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v0.ReadConfigRequest").msgclass
40
- ReadConfigResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v0.ReadConfigResponse").msgclass
41
- WriteConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v0.WriteConfigRequest").msgclass
42
- WriteConfigResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v0.WriteConfigResponse").msgclass
43
- DeleteConfigsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v0.DeleteConfigsRequest").msgclass
44
- DeleteConfigsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v0.DeleteConfigsResponse").msgclass
45
- end
46
- end
47
- end
@@ -1,28 +0,0 @@
1
- # Generated by the protocol buffer compiler. DO NOT EDIT!
2
- # Source: authzed/api/v0/namespace_service.proto for package 'authzed.api.v0'
3
-
4
- require 'grpc'
5
- require 'authzed/api/v0/namespace_service_pb'
6
-
7
- module Authzed
8
- module Api
9
- module V0
10
- module NamespaceService
11
- class Service
12
-
13
- include ::GRPC::GenericService
14
-
15
- self.marshal_class_method = :encode
16
- self.unmarshal_class_method = :decode
17
- self.service_name = 'authzed.api.v0.NamespaceService'
18
-
19
- rpc :ReadConfig, ::Authzed::Api::V0::ReadConfigRequest, ::Authzed::Api::V0::ReadConfigResponse
20
- rpc :WriteConfig, ::Authzed::Api::V0::WriteConfigRequest, ::Authzed::Api::V0::WriteConfigResponse
21
- rpc :DeleteConfigs, ::Authzed::Api::V0::DeleteConfigsRequest, ::Authzed::Api::V0::DeleteConfigsResponse
22
- end
23
-
24
- Stub = Service.rpc_stub_class
25
- end
26
- end
27
- end
28
- end
@@ -1,29 +0,0 @@
1
- # Generated by the protocol buffer compiler. DO NOT EDIT!
2
- # source: authzed/api/v0/watch_service.proto
3
-
4
- require 'google/protobuf'
5
-
6
- require 'validate/validate_pb'
7
- require 'authzed/api/v0/core_pb'
8
-
9
- Google::Protobuf::DescriptorPool.generated_pool.build do
10
- add_file("authzed/api/v0/watch_service.proto", :syntax => :proto3) do
11
- add_message "authzed.api.v0.WatchRequest" do
12
- repeated :namespaces, :string, 1, json_name: "namespaces"
13
- optional :start_revision, :message, 2, "authzed.api.v0.Zookie", json_name: "startRevision"
14
- end
15
- add_message "authzed.api.v0.WatchResponse" do
16
- repeated :updates, :message, 1, "authzed.api.v0.RelationTupleUpdate", json_name: "updates"
17
- optional :end_revision, :message, 2, "authzed.api.v0.Zookie", json_name: "endRevision"
18
- end
19
- end
20
- end
21
-
22
- module Authzed
23
- module Api
24
- module V0
25
- WatchRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v0.WatchRequest").msgclass
26
- WatchResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v0.WatchResponse").msgclass
27
- end
28
- end
29
- end
@@ -1,26 +0,0 @@
1
- # Generated by the protocol buffer compiler. DO NOT EDIT!
2
- # Source: authzed/api/v0/watch_service.proto for package 'authzed.api.v0'
3
-
4
- require 'grpc'
5
- require 'authzed/api/v0/watch_service_pb'
6
-
7
- module Authzed
8
- module Api
9
- module V0
10
- module WatchService
11
- class Service
12
-
13
- include ::GRPC::GenericService
14
-
15
- self.marshal_class_method = :encode
16
- self.unmarshal_class_method = :decode
17
- self.service_name = 'authzed.api.v0.WatchService'
18
-
19
- rpc :Watch, ::Authzed::Api::V0::WatchRequest, stream(::Authzed::Api::V0::WatchResponse)
20
- end
21
-
22
- Stub = Service.rpc_stub_class
23
- end
24
- end
25
- end
26
- end
@@ -1,30 +0,0 @@
1
- # Generated by the protocol buffer compiler. DO NOT EDIT!
2
- # source: authzed/api/v1/schema.proto
3
-
4
- require 'google/protobuf'
5
-
6
- Google::Protobuf::DescriptorPool.generated_pool.build do
7
- add_file("authzed/api/v1/schema.proto", :syntax => :proto3) do
8
- add_message "authzed.api.v1.ReadSchemaRequest" do
9
- end
10
- add_message "authzed.api.v1.ReadSchemaResponse" do
11
- optional :schema_text, :string, 1, json_name: "schemaText"
12
- end
13
- add_message "authzed.api.v1.WriteSchemaRequest" do
14
- optional :schema, :string, 1, json_name: "schema"
15
- end
16
- add_message "authzed.api.v1.WriteSchemaResponse" do
17
- end
18
- end
19
- end
20
-
21
- module Authzed
22
- module Api
23
- module V1
24
- ReadSchemaRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v1.ReadSchemaRequest").msgclass
25
- ReadSchemaResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v1.ReadSchemaResponse").msgclass
26
- WriteSchemaRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v1.WriteSchemaRequest").msgclass
27
- WriteSchemaResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v1.WriteSchemaResponse").msgclass
28
- end
29
- end
30
- end
@@ -1,34 +0,0 @@
1
- # Generated by the protocol buffer compiler. DO NOT EDIT!
2
- # Source: authzed/api/v1/schema.proto for package 'authzed.api.v1'
3
-
4
- require 'grpc'
5
- require 'authzed/api/v1/schema_pb'
6
-
7
- module Authzed
8
- module Api
9
- module V1
10
- module SchemaService
11
- # SchemaService implements operations on a Permissions System's Schema.
12
- class Service
13
-
14
- include ::GRPC::GenericService
15
-
16
- self.marshal_class_method = :encode
17
- self.unmarshal_class_method = :decode
18
- self.service_name = 'authzed.api.v1.SchemaService'
19
-
20
- # Read returns the current Object Definitions for a Permissions System.
21
- #
22
- # Errors include:
23
- # - INVALID_ARGUMENT: a provided value has failed to semantically validate
24
- # - NOT_FOUND: no schema has been defined
25
- rpc :ReadSchema, ::Authzed::Api::V1::ReadSchemaRequest, ::Authzed::Api::V1::ReadSchemaResponse
26
- # Write overwrites the current Object Definitions for a Permissions System.
27
- rpc :WriteSchema, ::Authzed::Api::V1::WriteSchemaRequest, ::Authzed::Api::V1::WriteSchemaResponse
28
- end
29
-
30
- Stub = Service.rpc_stub_class
31
- end
32
- end
33
- end
34
- end
@@ -1,25 +0,0 @@
1
- require 'grpc'
2
-
3
- module Authzed
4
- module Api
5
- module V1alpha1
6
- class Client
7
-
8
- attr_reader :schema_service
9
-
10
- def initialize(target:, credentials: nil, interceptors: [], options: {}, timeout: nil)
11
- creds = credentials || GRPC::Core::ChannelCredentials.new
12
-
13
- @schema_service = Authzed::Api::V1alpha1::SchemaService::Stub.new(
14
- target,
15
- creds,
16
- timeout: timeout,
17
- interceptors: interceptors,
18
- channel_args: options,
19
- )
20
- end
21
- end
22
- end
23
- end
24
- end
25
-
@@ -1,37 +0,0 @@
1
- # Generated by the protocol buffer compiler. DO NOT EDIT!
2
- # source: authzed/api/v1alpha1/schema.proto
3
-
4
- require 'google/protobuf'
5
-
6
- require 'validate/validate_pb'
7
-
8
- Google::Protobuf::DescriptorPool.generated_pool.build do
9
- add_file("authzed/api/v1alpha1/schema.proto", :syntax => :proto3) do
10
- add_message "authzed.api.v1alpha1.ReadSchemaRequest" do
11
- repeated :object_definitions_names, :string, 1, json_name: "objectDefinitionsNames"
12
- end
13
- add_message "authzed.api.v1alpha1.ReadSchemaResponse" do
14
- repeated :object_definitions, :string, 1, json_name: "objectDefinitions"
15
- optional :computed_definitions_revision, :string, 2, json_name: "computedDefinitionsRevision"
16
- end
17
- add_message "authzed.api.v1alpha1.WriteSchemaRequest" do
18
- optional :schema, :string, 1, json_name: "schema"
19
- optional :optional_definitions_revision_precondition, :string, 2, json_name: "optionalDefinitionsRevisionPrecondition"
20
- end
21
- add_message "authzed.api.v1alpha1.WriteSchemaResponse" do
22
- repeated :object_definitions_names, :string, 1, json_name: "objectDefinitionsNames"
23
- optional :computed_definitions_revision, :string, 2, json_name: "computedDefinitionsRevision"
24
- end
25
- end
26
- end
27
-
28
- module Authzed
29
- module Api
30
- module V1alpha1
31
- ReadSchemaRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v1alpha1.ReadSchemaRequest").msgclass
32
- ReadSchemaResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v1alpha1.ReadSchemaResponse").msgclass
33
- WriteSchemaRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v1alpha1.WriteSchemaRequest").msgclass
34
- WriteSchemaResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v1alpha1.WriteSchemaResponse").msgclass
35
- end
36
- end
37
- end
@@ -1,36 +0,0 @@
1
- # Generated by the protocol buffer compiler. DO NOT EDIT!
2
- # Source: authzed/api/v1alpha1/schema.proto for package 'authzed.api.v1alpha1'
3
-
4
- require 'grpc'
5
- require 'authzed/api/v1alpha1/schema_pb'
6
-
7
- module Authzed
8
- module Api
9
- module V1alpha1
10
- module SchemaService
11
- # SchemaService implements operations on a Permissions System's Schema.
12
- class Service
13
-
14
- include ::GRPC::GenericService
15
-
16
- self.marshal_class_method = :encode
17
- self.unmarshal_class_method = :decode
18
- self.service_name = 'authzed.api.v1alpha1.SchemaService'
19
-
20
- # Read returns the current Object Definitions for a Permissions System.
21
- #
22
- # Errors include:
23
- # - INVALID_ARGUMENT: a provided value has failed to semantically validate
24
- # - NOT_FOUND: one of the Object Definitions being requested does not exist
25
- rpc :ReadSchema, ::Authzed::Api::V1alpha1::ReadSchemaRequest, ::Authzed::Api::V1alpha1::ReadSchemaResponse
26
- # Write overwrites the current Object Definitions for a Permissions System.
27
- #
28
- # Any Object Definitions that exist, but are not included will be deleted.
29
- rpc :WriteSchema, ::Authzed::Api::V1alpha1::WriteSchemaRequest, ::Authzed::Api::V1alpha1::WriteSchemaResponse
30
- end
31
-
32
- Stub = Service.rpc_stub_class
33
- end
34
- end
35
- end
36
- end
@@ -1,46 +0,0 @@
1
- # Generated by the protocol buffer compiler. DO NOT EDIT!
2
- # source: authzed/api/v1alpha1/watchresources_service.proto
3
-
4
- require 'google/protobuf'
5
-
6
- require 'google/api/annotations_pb'
7
- require 'validate/validate_pb'
8
- require 'authzed/api/v1/core_pb'
9
-
10
- Google::Protobuf::DescriptorPool.generated_pool.build do
11
- add_file("authzed/api/v1alpha1/watchresources_service.proto", :syntax => :proto3) do
12
- add_message "authzed.api.v1alpha1.WatchResourcesRequest" do
13
- optional :resource_object_type, :string, 1, json_name: "resourceObjectType"
14
- optional :permission, :string, 2, json_name: "permission"
15
- optional :subject_object_type, :string, 3, json_name: "subjectObjectType"
16
- optional :optional_subject_relation, :string, 4, json_name: "optionalSubjectRelation"
17
- optional :optional_start_cursor, :message, 5, "authzed.api.v1.ZedToken", json_name: "optionalStartCursor"
18
- end
19
- add_message "authzed.api.v1alpha1.PermissionUpdate" do
20
- optional :subject, :message, 1, "authzed.api.v1.SubjectReference", json_name: "subject"
21
- optional :resource, :message, 2, "authzed.api.v1.ObjectReference", json_name: "resource"
22
- optional :relation, :string, 3, json_name: "relation"
23
- optional :updated_permission, :enum, 4, "authzed.api.v1alpha1.PermissionUpdate.Permissionship", json_name: "updatedPermission"
24
- end
25
- add_enum "authzed.api.v1alpha1.PermissionUpdate.Permissionship" do
26
- value :PERMISSIONSHIP_UNSPECIFIED, 0
27
- value :PERMISSIONSHIP_NO_PERMISSION, 1
28
- value :PERMISSIONSHIP_HAS_PERMISSION, 2
29
- end
30
- add_message "authzed.api.v1alpha1.WatchResourcesResponse" do
31
- repeated :updates, :message, 1, "authzed.api.v1alpha1.PermissionUpdate", json_name: "updates"
32
- optional :changes_through, :message, 2, "authzed.api.v1.ZedToken", json_name: "changesThrough"
33
- end
34
- end
35
- end
36
-
37
- module Authzed
38
- module Api
39
- module V1alpha1
40
- WatchResourcesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v1alpha1.WatchResourcesRequest").msgclass
41
- PermissionUpdate = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v1alpha1.PermissionUpdate").msgclass
42
- PermissionUpdate::Permissionship = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v1alpha1.PermissionUpdate.Permissionship").enummodule
43
- WatchResourcesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v1alpha1.WatchResourcesResponse").msgclass
44
- end
45
- end
46
- end
@@ -1,30 +0,0 @@
1
- # Generated by the protocol buffer compiler. DO NOT EDIT!
2
- # Source: authzed/api/v1alpha1/watchresources_service.proto for package 'authzed.api.v1alpha1'
3
-
4
- require 'grpc'
5
- require 'authzed/api/v1alpha1/watchresources_service_pb'
6
-
7
- module Authzed
8
- module Api
9
- module V1alpha1
10
- module WatchResourcesService
11
- # WatchResourcesService is used to receive a stream of updates for resources of a
12
- # specific (resource type, permission, subject) combination.
13
- class Service
14
-
15
- include ::GRPC::GenericService
16
-
17
- self.marshal_class_method = :encode
18
- self.unmarshal_class_method = :decode
19
- self.service_name = 'authzed.api.v1alpha1.WatchResourcesService'
20
-
21
- # WatchResources initiates a watch for permission changes for the provided
22
- # (resource type, permission, subject) pair.
23
- rpc :WatchResources, ::Authzed::Api::V1alpha1::WatchResourcesRequest, stream(::Authzed::Api::V1alpha1::WatchResourcesResponse)
24
- end
25
-
26
- Stub = Service.rpc_stub_class
27
- end
28
- end
29
- end
30
- end