authzed 0.5.0 → 0.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/authzed/api/v1/client.rb +8 -1
- data/lib/authzed/api/v1/core_pb.rb +27 -53
- data/lib/authzed/api/v1/debug_pb.rb +31 -29
- data/lib/authzed/api/v1/error_reason_pb.rb +24 -17
- data/lib/authzed/api/v1/experimental_service_pb.rb +61 -0
- data/lib/authzed/api/v1/experimental_service_services_pb.rb +43 -0
- data/lib/authzed/api/v1/openapi_pb.rb +25 -2
- data/lib/authzed/api/v1/permission_service_pb.rb +28 -125
- data/lib/authzed/api/v1/schema_service_pb.rb +26 -11
- data/lib/authzed/api/v1/watch_service_pb.rb +25 -9
- data/lib/authzed.rb +2 -1
- metadata +8 -15
- data/lib/authzed/api/v0/client.rb +0 -61
- data/lib/authzed/api/v0/core_pb.rb +0 -40
- data/lib/authzed/api/v0/developer_pb.rb +0 -132
- data/lib/authzed/api/v0/developer_services_pb.rb +0 -31
- data/lib/authzed/api/v1alpha1/client.rb +0 -25
- data/lib/authzed/api/v1alpha1/schema_pb.rb +0 -37
- data/lib/authzed/api/v1alpha1/schema_services_pb.rb +0 -36
- data/lib/authzed/api/v1alpha1/watchresources_service_pb.rb +0 -46
- data/lib/authzed/api/v1alpha1/watchresources_service_services_pb.rb +0 -30
@@ -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,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
|