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,114 +1,41 @@
1
+ # frozen_string_literal: true
1
2
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
3
  # source: authzed/api/v1/permission_service.proto
3
4
 
4
5
  require 'google/protobuf'
5
6
 
7
+ require 'google/protobuf/struct_pb'
6
8
  require 'google/api/annotations_pb'
7
9
  require 'validate/validate_pb'
8
10
  require 'authzed/api/v1/core_pb'
9
11
 
10
- Google::Protobuf::DescriptorPool.generated_pool.build do
11
- add_file("authzed/api/v1/permission_service.proto", :syntax => :proto3) do
12
- add_message "authzed.api.v1.Consistency" do
13
- oneof :requirement do
14
- optional :minimize_latency, :bool, 1, json_name: "minimizeLatency"
15
- optional :at_least_as_fresh, :message, 2, "authzed.api.v1.ZedToken", json_name: "atLeastAsFresh"
16
- optional :at_exact_snapshot, :message, 3, "authzed.api.v1.ZedToken", json_name: "atExactSnapshot"
17
- optional :fully_consistent, :bool, 4, json_name: "fullyConsistent"
18
- end
19
- end
20
- add_message "authzed.api.v1.RelationshipFilter" do
21
- optional :resource_type, :string, 1, json_name: "resourceType"
22
- optional :optional_resource_id, :string, 2, json_name: "optionalResourceId"
23
- optional :optional_relation, :string, 3, json_name: "optionalRelation"
24
- optional :optional_subject_filter, :message, 4, "authzed.api.v1.SubjectFilter", json_name: "optionalSubjectFilter"
25
- end
26
- add_message "authzed.api.v1.SubjectFilter" do
27
- optional :subject_type, :string, 1, json_name: "subjectType"
28
- optional :optional_subject_id, :string, 2, json_name: "optionalSubjectId"
29
- optional :optional_relation, :message, 3, "authzed.api.v1.SubjectFilter.RelationFilter", json_name: "optionalRelation"
30
- end
31
- add_message "authzed.api.v1.SubjectFilter.RelationFilter" do
32
- optional :relation, :string, 1, json_name: "relation"
33
- end
34
- add_message "authzed.api.v1.ReadRelationshipsRequest" do
35
- optional :consistency, :message, 1, "authzed.api.v1.Consistency", json_name: "consistency"
36
- optional :relationship_filter, :message, 2, "authzed.api.v1.RelationshipFilter", json_name: "relationshipFilter"
37
- end
38
- add_message "authzed.api.v1.ReadRelationshipsResponse" do
39
- optional :read_at, :message, 1, "authzed.api.v1.ZedToken", json_name: "readAt"
40
- optional :relationship, :message, 2, "authzed.api.v1.Relationship", json_name: "relationship"
41
- end
42
- add_message "authzed.api.v1.Precondition" do
43
- optional :operation, :enum, 1, "authzed.api.v1.Precondition.Operation", json_name: "operation"
44
- optional :filter, :message, 2, "authzed.api.v1.RelationshipFilter", json_name: "filter"
45
- end
46
- add_enum "authzed.api.v1.Precondition.Operation" do
47
- value :OPERATION_UNSPECIFIED, 0
48
- value :OPERATION_MUST_NOT_MATCH, 1
49
- value :OPERATION_MUST_MATCH, 2
50
- end
51
- add_message "authzed.api.v1.WriteRelationshipsRequest" do
52
- repeated :updates, :message, 1, "authzed.api.v1.RelationshipUpdate", json_name: "updates"
53
- repeated :optional_preconditions, :message, 2, "authzed.api.v1.Precondition", json_name: "optionalPreconditions"
54
- end
55
- add_message "authzed.api.v1.WriteRelationshipsResponse" do
56
- optional :written_at, :message, 1, "authzed.api.v1.ZedToken", json_name: "writtenAt"
57
- end
58
- add_message "authzed.api.v1.DeleteRelationshipsRequest" do
59
- optional :relationship_filter, :message, 1, "authzed.api.v1.RelationshipFilter", json_name: "relationshipFilter"
60
- repeated :optional_preconditions, :message, 2, "authzed.api.v1.Precondition", json_name: "optionalPreconditions"
61
- end
62
- add_message "authzed.api.v1.DeleteRelationshipsResponse" do
63
- optional :deleted_at, :message, 1, "authzed.api.v1.ZedToken", json_name: "deletedAt"
64
- end
65
- add_message "authzed.api.v1.CheckPermissionRequest" do
66
- optional :consistency, :message, 1, "authzed.api.v1.Consistency", json_name: "consistency"
67
- optional :resource, :message, 2, "authzed.api.v1.ObjectReference", json_name: "resource"
68
- optional :permission, :string, 3, json_name: "permission"
69
- optional :subject, :message, 4, "authzed.api.v1.SubjectReference", json_name: "subject"
70
- end
71
- add_message "authzed.api.v1.CheckPermissionResponse" do
72
- optional :checked_at, :message, 1, "authzed.api.v1.ZedToken", json_name: "checkedAt"
73
- optional :permissionship, :enum, 2, "authzed.api.v1.CheckPermissionResponse.Permissionship", json_name: "permissionship"
74
- end
75
- add_enum "authzed.api.v1.CheckPermissionResponse.Permissionship" do
76
- value :PERMISSIONSHIP_UNSPECIFIED, 0
77
- value :PERMISSIONSHIP_NO_PERMISSION, 1
78
- value :PERMISSIONSHIP_HAS_PERMISSION, 2
79
- end
80
- add_message "authzed.api.v1.ExpandPermissionTreeRequest" do
81
- optional :consistency, :message, 1, "authzed.api.v1.Consistency", json_name: "consistency"
82
- optional :resource, :message, 2, "authzed.api.v1.ObjectReference", json_name: "resource"
83
- optional :permission, :string, 3, json_name: "permission"
84
- end
85
- add_message "authzed.api.v1.ExpandPermissionTreeResponse" do
86
- optional :expanded_at, :message, 1, "authzed.api.v1.ZedToken", json_name: "expandedAt"
87
- optional :tree_root, :message, 2, "authzed.api.v1.PermissionRelationshipTree", json_name: "treeRoot"
88
- end
89
- add_message "authzed.api.v1.LookupResourcesRequest" do
90
- optional :consistency, :message, 1, "authzed.api.v1.Consistency", json_name: "consistency"
91
- optional :resource_object_type, :string, 2, json_name: "resourceObjectType"
92
- optional :permission, :string, 3, json_name: "permission"
93
- optional :subject, :message, 4, "authzed.api.v1.SubjectReference", json_name: "subject"
94
- end
95
- add_message "authzed.api.v1.LookupResourcesResponse" do
96
- optional :looked_up_at, :message, 1, "authzed.api.v1.ZedToken", json_name: "lookedUpAt"
97
- optional :resource_object_id, :string, 2, json_name: "resourceObjectId"
98
- end
99
- add_message "authzed.api.v1.LookupSubjectsRequest" do
100
- optional :consistency, :message, 1, "authzed.api.v1.Consistency", json_name: "consistency"
101
- optional :resource, :message, 2, "authzed.api.v1.ObjectReference", json_name: "resource"
102
- optional :permission, :string, 3, json_name: "permission"
103
- optional :subject_object_type, :string, 4, json_name: "subjectObjectType"
104
- optional :optional_subject_relation, :string, 5, json_name: "optionalSubjectRelation"
105
- end
106
- add_message "authzed.api.v1.LookupSubjectsResponse" do
107
- optional :looked_up_at, :message, 1, "authzed.api.v1.ZedToken", json_name: "lookedUpAt"
108
- optional :subject_object_id, :string, 2, json_name: "subjectObjectId"
109
- repeated :excluded_subject_ids, :string, 3, json_name: "excludedSubjectIds"
12
+
13
+ descriptor_data = "\n\'authzed/api/v1/permission_service.proto\x12\x0e\x61uthzed.api.v1\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x17validate/validate.proto\x1a\x19\x61uthzed/api/v1/core.proto\"\x9c\x02\n\x0b\x43onsistency\x12\x34\n\x10minimize_latency\x18\x01 \x01(\x08\x42\x07\xfa\x42\x04j\x02\x08\x01H\x00R\x0fminimizeLatency\x12\x45\n\x11\x61t_least_as_fresh\x18\x02 \x01(\x0b\x32\x18.authzed.api.v1.ZedTokenH\x00R\x0e\x61tLeastAsFresh\x12\x46\n\x11\x61t_exact_snapshot\x18\x03 \x01(\x0b\x32\x18.authzed.api.v1.ZedTokenH\x00R\x0f\x61tExactSnapshot\x12\x34\n\x10\x66ully_consistent\x18\x04 \x01(\x08\x42\x07\xfa\x42\x04j\x02\x08\x01H\x00R\x0f\x66ullyConsistentB\x12\n\x0brequirement\x12\x03\xf8\x42\x01\"\x8c\x03\n\x12RelationshipFilter\x12m\n\rresource_type\x18\x01 \x01(\tBH\xfa\x42\x45rC(\x80\x01\x32>^([a-z][a-z0-9_]{1,61}[a-z0-9]/)*[a-z][a-z0-9_]{1,62}[a-z0-9]$R\x0cresourceType\x12W\n\x14optional_resource_id\x18\x02 \x01(\tB%\xfa\x42\"r (\x80\x08\x32\x1b^([a-zA-Z0-9/_|\\-=+]{1,})?$R\x12optionalResourceId\x12W\n\x11optional_relation\x18\x03 \x01(\tB*\xfa\x42\'r%(@2!^([a-z][a-z0-9_]{1,62}[a-z0-9])?$R\x10optionalRelation\x12U\n\x17optional_subject_filter\x18\x04 \x01(\x0b\x32\x1d.authzed.api.v1.SubjectFilterR\x15optionalSubjectFilter\"\x8d\x03\n\rSubjectFilter\x12k\n\x0csubject_type\x18\x01 \x01(\tBH\xfa\x42\x45rC(\x80\x01\x32>^([a-z][a-z0-9_]{1,61}[a-z0-9]/)*[a-z][a-z0-9_]{1,62}[a-z0-9]$R\x0bsubjectType\x12Z\n\x13optional_subject_id\x18\x02 \x01(\tB*\xfa\x42\'r%(\x80\x08\x32 ^(([a-zA-Z0-9/_|\\-=+]{1,})|\\*)?$R\x11optionalSubjectId\x12Y\n\x11optional_relation\x18\x03 \x01(\x0b\x32,.authzed.api.v1.SubjectFilter.RelationFilterR\x10optionalRelation\x1aX\n\x0eRelationFilter\x12\x46\n\x08relation\x18\x01 \x01(\tB*\xfa\x42\'r%(@2!^([a-z][a-z0-9_]{1,62}[a-z0-9])?$R\x08relation\"\xac\x02\n\x18ReadRelationshipsRequest\x12=\n\x0b\x63onsistency\x18\x01 \x01(\x0b\x32\x1b.authzed.api.v1.ConsistencyR\x0b\x63onsistency\x12]\n\x13relationship_filter\x18\x02 \x01(\x0b\x32\".authzed.api.v1.RelationshipFilterB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01R\x12relationshipFilter\x12\x31\n\x0eoptional_limit\x18\x03 \x01(\rB\n\xfa\x42\x07*\x05\x18\xe8\x07(\x00R\roptionalLimit\x12?\n\x0foptional_cursor\x18\x04 \x01(\x0b\x32\x16.authzed.api.v1.CursorR\x0eoptionalCursor\"\xec\x01\n\x19ReadRelationshipsResponse\x12;\n\x07read_at\x18\x01 \x01(\x0b\x32\x18.authzed.api.v1.ZedTokenB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01R\x06readAt\x12J\n\x0crelationship\x18\x02 \x01(\x0b\x32\x1c.authzed.api.v1.RelationshipB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01R\x0crelationship\x12\x46\n\x13\x61\x66ter_result_cursor\x18\x03 \x01(\x0b\x32\x16.authzed.api.v1.CursorR\x11\x61\x66terResultCursor\"\x86\x02\n\x0cPrecondition\x12P\n\toperation\x18\x01 \x01(\x0e\x32&.authzed.api.v1.Precondition.OperationB\n\xfa\x42\x07\x82\x01\x04\x10\x01 \x00R\toperation\x12\x44\n\x06\x66ilter\x18\x02 \x01(\x0b\x32\".authzed.api.v1.RelationshipFilterB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01R\x06\x66ilter\"^\n\tOperation\x12\x19\n\x15OPERATION_UNSPECIFIED\x10\x00\x12\x1c\n\x18OPERATION_MUST_NOT_MATCH\x10\x01\x12\x18\n\x14OPERATION_MUST_MATCH\x10\x02\"\xcc\x01\n\x19WriteRelationshipsRequest\x12K\n\x07updates\x18\x01 \x03(\x0b\x32\".authzed.api.v1.RelationshipUpdateB\r\xfa\x42\n\x92\x01\x07\"\x05\x8a\x01\x02\x10\x01R\x07updates\x12\x62\n\x16optional_preconditions\x18\x02 \x03(\x0b\x32\x1c.authzed.api.v1.PreconditionB\r\xfa\x42\n\x92\x01\x07\"\x05\x8a\x01\x02\x10\x01R\x15optionalPreconditions\"U\n\x1aWriteRelationshipsResponse\x12\x37\n\nwritten_at\x18\x01 \x01(\x0b\x32\x18.authzed.api.v1.ZedTokenR\twrittenAt\"\xdb\x02\n\x1a\x44\x65leteRelationshipsRequest\x12]\n\x13relationship_filter\x18\x01 \x01(\x0b\x32\".authzed.api.v1.RelationshipFilterB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01R\x12relationshipFilter\x12\x62\n\x16optional_preconditions\x18\x02 \x03(\x0b\x32\x1c.authzed.api.v1.PreconditionB\r\xfa\x42\n\x92\x01\x07\"\x05\x8a\x01\x02\x10\x01R\x15optionalPreconditions\x12\x31\n\x0eoptional_limit\x18\x03 \x01(\rB\n\xfa\x42\x07*\x05\x18\xe8\x07(\x00R\roptionalLimit\x12G\n optional_allow_partial_deletions\x18\x04 \x01(\x08R\x1doptionalAllowPartialDeletions\"\xb7\x02\n\x1b\x44\x65leteRelationshipsResponse\x12\x37\n\ndeleted_at\x18\x01 \x01(\x0b\x32\x18.authzed.api.v1.ZedTokenR\tdeletedAt\x12i\n\x11\x64\x65letion_progress\x18\x02 \x01(\x0e\x32<.authzed.api.v1.DeleteRelationshipsResponse.DeletionProgressR\x10\x64\x65letionProgress\"t\n\x10\x44\x65letionProgress\x12!\n\x1d\x44\x45LETION_PROGRESS_UNSPECIFIED\x10\x00\x12\x1e\n\x1a\x44\x45LETION_PROGRESS_COMPLETE\x10\x01\x12\x1d\n\x19\x44\x45LETION_PROGRESS_PARTIAL\x10\x02\"\xed\x02\n\x16\x43heckPermissionRequest\x12=\n\x0b\x63onsistency\x18\x01 \x01(\x0b\x32\x1b.authzed.api.v1.ConsistencyR\x0b\x63onsistency\x12\x45\n\x08resource\x18\x02 \x01(\x0b\x32\x1f.authzed.api.v1.ObjectReferenceB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01R\x08resource\x12J\n\npermission\x18\x03 \x01(\tB*\xfa\x42\'r%(@2!^([a-z][a-z0-9_]{1,62}[a-z0-9])?$R\npermission\x12\x44\n\x07subject\x18\x04 \x01(\x0b\x32 .authzed.api.v1.SubjectReferenceB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01R\x07subject\x12;\n\x07\x63ontext\x18\x05 \x01(\x0b\x32\x17.google.protobuf.StructB\x08\xfa\x42\x05\x8a\x01\x02\x10\x00R\x07\x63ontext\"\xc8\x03\n\x17\x43heckPermissionResponse\x12\x41\n\nchecked_at\x18\x01 \x01(\x0b\x32\x18.authzed.api.v1.ZedTokenB\x08\xfa\x42\x05\x8a\x01\x02\x10\x00R\tcheckedAt\x12j\n\x0epermissionship\x18\x02 \x01(\x0e\x32\x36.authzed.api.v1.CheckPermissionResponse.PermissionshipB\n\xfa\x42\x07\x82\x01\x04\x10\x01 \x00R\x0epermissionship\x12[\n\x13partial_caveat_info\x18\x03 \x01(\x0b\x32!.authzed.api.v1.PartialCaveatInfoB\x08\xfa\x42\x05\x8a\x01\x02\x10\x00R\x11partialCaveatInfo\"\xa0\x01\n\x0ePermissionship\x12\x1e\n\x1aPERMISSIONSHIP_UNSPECIFIED\x10\x00\x12 \n\x1cPERMISSIONSHIP_NO_PERMISSION\x10\x01\x12!\n\x1dPERMISSIONSHIP_HAS_PERMISSION\x10\x02\x12)\n%PERMISSIONSHIP_CONDITIONAL_PERMISSION\x10\x03\"\xef\x01\n\x1b\x45xpandPermissionTreeRequest\x12=\n\x0b\x63onsistency\x18\x01 \x01(\x0b\x32\x1b.authzed.api.v1.ConsistencyR\x0b\x63onsistency\x12\x45\n\x08resource\x18\x02 \x01(\x0b\x32\x1f.authzed.api.v1.ObjectReferenceB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01R\x08resource\x12J\n\npermission\x18\x03 \x01(\tB*\xfa\x42\'r%(@2!^([a-z][a-z0-9_]{1,62}[a-z0-9])?$R\npermission\"\xa2\x01\n\x1c\x45xpandPermissionTreeResponse\x12\x39\n\x0b\x65xpanded_at\x18\x01 \x01(\x0b\x32\x18.authzed.api.v1.ZedTokenR\nexpandedAt\x12G\n\ttree_root\x18\x02 \x01(\x0b\x32*.authzed.api.v1.PermissionRelationshipTreeR\x08treeRoot\"\x93\x04\n\x16LookupResourcesRequest\x12=\n\x0b\x63onsistency\x18\x01 \x01(\x0b\x32\x1b.authzed.api.v1.ConsistencyR\x0b\x63onsistency\x12z\n\x14resource_object_type\x18\x02 \x01(\tBH\xfa\x42\x45rC(\x80\x01\x32>^([a-z][a-z0-9_]{1,61}[a-z0-9]/)*[a-z][a-z0-9_]{1,62}[a-z0-9]$R\x12resourceObjectType\x12G\n\npermission\x18\x03 \x01(\tB\'\xfa\x42$r\"(@2\x1e^[a-z][a-z0-9_]{1,62}[a-z0-9]$R\npermission\x12\x44\n\x07subject\x18\x04 \x01(\x0b\x32 .authzed.api.v1.SubjectReferenceB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01R\x07subject\x12;\n\x07\x63ontext\x18\x05 \x01(\x0b\x32\x17.google.protobuf.StructB\x08\xfa\x42\x05\x8a\x01\x02\x10\x00R\x07\x63ontext\x12\x31\n\x0eoptional_limit\x18\x06 \x01(\rB\n\xfa\x42\x07*\x05\x18\xe8\x07(\x00R\roptionalLimit\x12?\n\x0foptional_cursor\x18\x07 \x01(\x0b\x32\x16.authzed.api.v1.CursorR\x0eoptionalCursor\"\x82\x03\n\x17LookupResourcesResponse\x12:\n\x0clooked_up_at\x18\x01 \x01(\x0b\x32\x18.authzed.api.v1.ZedTokenR\nlookedUpAt\x12,\n\x12resource_object_id\x18\x02 \x01(\tR\x10resourceObjectId\x12X\n\x0epermissionship\x18\x03 \x01(\x0e\x32$.authzed.api.v1.LookupPermissionshipB\n\xfa\x42\x07\x82\x01\x04\x10\x01 \x00R\x0epermissionship\x12[\n\x13partial_caveat_info\x18\x04 \x01(\x0b\x32!.authzed.api.v1.PartialCaveatInfoB\x08\xfa\x42\x05\x8a\x01\x02\x10\x00R\x11partialCaveatInfo\x12\x46\n\x13\x61\x66ter_result_cursor\x18\x05 \x01(\x0b\x32\x16.authzed.api.v1.CursorR\x11\x61\x66terResultCursor\"\xed\x06\n\x15LookupSubjectsRequest\x12=\n\x0b\x63onsistency\x18\x01 \x01(\x0b\x32\x1b.authzed.api.v1.ConsistencyR\x0b\x63onsistency\x12\x45\n\x08resource\x18\x02 \x01(\x0b\x32\x1f.authzed.api.v1.ObjectReferenceB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01R\x08resource\x12J\n\npermission\x18\x03 \x01(\tB*\xfa\x42\'r%(@2!^([a-z][a-z0-9_]{1,62}[a-z0-9])?$R\npermission\x12x\n\x13subject_object_type\x18\x04 \x01(\tBH\xfa\x42\x45rC(\x80\x01\x32>^([a-z][a-z0-9_]{1,61}[a-z0-9]/)*[a-z][a-z0-9_]{1,62}[a-z0-9]$R\x11subjectObjectType\x12\x66\n\x19optional_subject_relation\x18\x05 \x01(\tB*\xfa\x42\'r%(@2!^([a-z][a-z0-9_]{1,62}[a-z0-9])?$R\x17optionalSubjectRelation\x12;\n\x07\x63ontext\x18\x06 \x01(\x0b\x32\x17.google.protobuf.StructB\x08\xfa\x42\x05\x8a\x01\x02\x10\x00R\x07\x63ontext\x12\x42\n\x17optional_concrete_limit\x18\x07 \x01(\rB\n\xfa\x42\x07*\x05\x18\xe8\x07(\x00R\x15optionalConcreteLimit\x12?\n\x0foptional_cursor\x18\x08 \x01(\x0b\x32\x16.authzed.api.v1.CursorR\x0eoptionalCursor\x12]\n\x0fwildcard_option\x18\t \x01(\x0e\x32\x34.authzed.api.v1.LookupSubjectsRequest.WildcardOptionR\x0ewildcardOption\"\x7f\n\x0eWildcardOption\x12\x1f\n\x1bWILDCARD_OPTION_UNSPECIFIED\x10\x00\x12%\n!WILDCARD_OPTION_INCLUDE_WILDCARDS\x10\x01\x12%\n!WILDCARD_OPTION_EXCLUDE_WILDCARDS\x10\x02\"\xc6\x04\n\x16LookupSubjectsResponse\x12:\n\x0clooked_up_at\x18\x01 \x01(\x0b\x32\x18.authzed.api.v1.ZedTokenR\nlookedUpAt\x12.\n\x11subject_object_id\x18\x02 \x01(\tB\x02\x18\x01R\x0fsubjectObjectId\x12\x34\n\x14\x65xcluded_subject_ids\x18\x03 \x03(\tB\x02\x18\x01R\x12\x65xcludedSubjectIds\x12Z\n\x0epermissionship\x18\x04 \x01(\x0e\x32$.authzed.api.v1.LookupPermissionshipB\x0c\x18\x01\xfa\x42\x07\x82\x01\x04\x10\x01 \x00R\x0epermissionship\x12]\n\x13partial_caveat_info\x18\x05 \x01(\x0b\x32!.authzed.api.v1.PartialCaveatInfoB\n\x18\x01\xfa\x42\x05\x8a\x01\x02\x10\x00R\x11partialCaveatInfo\x12\x39\n\x07subject\x18\x06 \x01(\x0b\x32\x1f.authzed.api.v1.ResolvedSubjectR\x07subject\x12L\n\x11\x65xcluded_subjects\x18\x07 \x03(\x0b\x32\x1f.authzed.api.v1.ResolvedSubjectR\x10\x65xcludedSubjects\x12\x46\n\x13\x61\x66ter_result_cursor\x18\x08 \x01(\x0b\x32\x16.authzed.api.v1.CursorR\x11\x61\x66terResultCursor\"\xf4\x01\n\x0fResolvedSubject\x12*\n\x11subject_object_id\x18\x01 \x01(\tR\x0fsubjectObjectId\x12X\n\x0epermissionship\x18\x02 \x01(\x0e\x32$.authzed.api.v1.LookupPermissionshipB\n\xfa\x42\x07\x82\x01\x04\x10\x01 \x00R\x0epermissionship\x12[\n\x13partial_caveat_info\x18\x03 \x01(\x0b\x32!.authzed.api.v1.PartialCaveatInfoB\x08\xfa\x42\x05\x8a\x01\x02\x10\x00R\x11partialCaveatInfo*\x99\x01\n\x14LookupPermissionship\x12%\n!LOOKUP_PERMISSIONSHIP_UNSPECIFIED\x10\x00\x12(\n$LOOKUP_PERMISSIONSHIP_HAS_PERMISSION\x10\x01\x12\x30\n,LOOKUP_PERMISSIONSHIP_CONDITIONAL_PERMISSION\x10\x02\x32\x80\x08\n\x12PermissionsService\x12\x8d\x01\n\x11ReadRelationships\x12(.authzed.api.v1.ReadRelationshipsRequest\x1a).authzed.api.v1.ReadRelationshipsResponse\"!\x82\xd3\xe4\x93\x02\x1b:\x01*\"\x16/v1/relationships/read0\x01\x12\x8f\x01\n\x12WriteRelationships\x12).authzed.api.v1.WriteRelationshipsRequest\x1a*.authzed.api.v1.WriteRelationshipsResponse\"\"\x82\xd3\xe4\x93\x02\x1c:\x01*\"\x17/v1/relationships/write\x12\x93\x01\n\x13\x44\x65leteRelationships\x12*.authzed.api.v1.DeleteRelationshipsRequest\x1a+.authzed.api.v1.DeleteRelationshipsResponse\"#\x82\xd3\xe4\x93\x02\x1d:\x01*\"\x18/v1/relationships/delete\x12\x84\x01\n\x0f\x43heckPermission\x12&.authzed.api.v1.CheckPermissionRequest\x1a\'.authzed.api.v1.CheckPermissionResponse\" \x82\xd3\xe4\x93\x02\x1a:\x01*\"\x15/v1/permissions/check\x12\x94\x01\n\x14\x45xpandPermissionTree\x12+.authzed.api.v1.ExpandPermissionTreeRequest\x1a,.authzed.api.v1.ExpandPermissionTreeResponse\"!\x82\xd3\xe4\x93\x02\x1b:\x01*\"\x16/v1/permissions/expand\x12\x8a\x01\n\x0fLookupResources\x12&.authzed.api.v1.LookupResourcesRequest\x1a\'.authzed.api.v1.LookupResourcesResponse\"$\x82\xd3\xe4\x93\x02\x1e:\x01*\"\x19/v1/permissions/resources0\x01\x12\x86\x01\n\x0eLookupSubjects\x12%.authzed.api.v1.LookupSubjectsRequest\x1a&.authzed.api.v1.LookupSubjectsResponse\"#\x82\xd3\xe4\x93\x02\x1d:\x01*\"\x18/v1/permissions/subjects0\x01\x42H\n\x12\x63om.authzed.api.v1Z2github.com/authzed/authzed-go/proto/authzed/api/v1b\x06proto3"
14
+
15
+ pool = Google::Protobuf::DescriptorPool.generated_pool
16
+
17
+ begin
18
+ pool.add_serialized_file(descriptor_data)
19
+ rescue TypeError => e
20
+ # Compatibility code: will be removed in the next major version.
21
+ require 'google/protobuf/descriptor_pb'
22
+ parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
23
+ parsed.clear_dependency
24
+ serialized = parsed.class.encode(parsed)
25
+ file = pool.add_serialized_file(serialized)
26
+ warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
27
+ imports = [
28
+ ["authzed.api.v1.ZedToken", "authzed/api/v1/core.proto"],
29
+ ["google.protobuf.Struct", "google/protobuf/struct.proto"],
30
+ ]
31
+ imports.each do |type_name, expected_filename|
32
+ import_file = pool.lookup(type_name).file_descriptor
33
+ if import_file.name != expected_filename
34
+ warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
110
35
  end
111
36
  end
37
+ warn "Each proto file must use a consistent fully-qualified name."
38
+ warn "This will become an error in the next major version."
112
39
  end
113
40
 
114
41
  module Authzed
@@ -126,6 +53,7 @@ module Authzed
126
53
  WriteRelationshipsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v1.WriteRelationshipsResponse").msgclass
127
54
  DeleteRelationshipsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v1.DeleteRelationshipsRequest").msgclass
128
55
  DeleteRelationshipsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v1.DeleteRelationshipsResponse").msgclass
56
+ DeleteRelationshipsResponse::DeletionProgress = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v1.DeleteRelationshipsResponse.DeletionProgress").enummodule
129
57
  CheckPermissionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v1.CheckPermissionRequest").msgclass
130
58
  CheckPermissionResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v1.CheckPermissionResponse").msgclass
131
59
  CheckPermissionResponse::Permissionship = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v1.CheckPermissionResponse.Permissionship").enummodule
@@ -134,7 +62,10 @@ module Authzed
134
62
  LookupResourcesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v1.LookupResourcesRequest").msgclass
135
63
  LookupResourcesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v1.LookupResourcesResponse").msgclass
136
64
  LookupSubjectsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v1.LookupSubjectsRequest").msgclass
65
+ LookupSubjectsRequest::WildcardOption = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v1.LookupSubjectsRequest.WildcardOption").enummodule
137
66
  LookupSubjectsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v1.LookupSubjectsResponse").msgclass
67
+ ResolvedSubject = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v1.ResolvedSubject").msgclass
68
+ LookupPermissionship = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v1.LookupPermissionship").enummodule
138
69
  end
139
70
  end
140
71
  end
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
3
  # source: authzed/api/v1/schema_service.proto
3
4
 
@@ -5,20 +6,34 @@ require 'google/protobuf'
5
6
 
6
7
  require 'google/api/annotations_pb'
7
8
  require 'validate/validate_pb'
9
+ require 'authzed/api/v1/core_pb'
8
10
 
9
- Google::Protobuf::DescriptorPool.generated_pool.build do
10
- add_file("authzed/api/v1/schema_service.proto", :syntax => :proto3) do
11
- add_message "authzed.api.v1.ReadSchemaRequest" do
12
- end
13
- add_message "authzed.api.v1.ReadSchemaResponse" do
14
- optional :schema_text, :string, 1, json_name: "schemaText"
15
- end
16
- add_message "authzed.api.v1.WriteSchemaRequest" do
17
- optional :schema, :string, 1, json_name: "schema"
18
- end
19
- add_message "authzed.api.v1.WriteSchemaResponse" do
11
+
12
+ descriptor_data = "\n#authzed/api/v1/schema_service.proto\x12\x0e\x61uthzed.api.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17validate/validate.proto\x1a\x19\x61uthzed/api/v1/core.proto\"\x13\n\x11ReadSchemaRequest\"r\n\x12ReadSchemaResponse\x12\x1f\n\x0bschema_text\x18\x01 \x01(\tR\nschemaText\x12;\n\x07read_at\x18\x02 \x01(\x0b\x32\x18.authzed.api.v1.ZedTokenB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01R\x06readAt\"7\n\x12WriteSchemaRequest\x12!\n\x06schema\x18\x01 \x01(\tB\t\xfa\x42\x06r\x04(\x80\x80\x10R\x06schema\"X\n\x13WriteSchemaResponse\x12\x41\n\nwritten_at\x18\x01 \x01(\x0b\x32\x18.authzed.api.v1.ZedTokenB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01R\twrittenAt2\xf5\x01\n\rSchemaService\x12o\n\nReadSchema\x12!.authzed.api.v1.ReadSchemaRequest\x1a\".authzed.api.v1.ReadSchemaResponse\"\x1a\x82\xd3\xe4\x93\x02\x14:\x01*\"\x0f/v1/schema/read\x12s\n\x0bWriteSchema\x12\".authzed.api.v1.WriteSchemaRequest\x1a#.authzed.api.v1.WriteSchemaResponse\"\x1b\x82\xd3\xe4\x93\x02\x15:\x01*\"\x10/v1/schema/writeBH\n\x12\x63om.authzed.api.v1Z2github.com/authzed/authzed-go/proto/authzed/api/v1b\x06proto3"
13
+
14
+ pool = Google::Protobuf::DescriptorPool.generated_pool
15
+
16
+ begin
17
+ pool.add_serialized_file(descriptor_data)
18
+ rescue TypeError => e
19
+ # Compatibility code: will be removed in the next major version.
20
+ require 'google/protobuf/descriptor_pb'
21
+ parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
22
+ parsed.clear_dependency
23
+ serialized = parsed.class.encode(parsed)
24
+ file = pool.add_serialized_file(serialized)
25
+ warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
26
+ imports = [
27
+ ["authzed.api.v1.ZedToken", "authzed/api/v1/core.proto"],
28
+ ]
29
+ imports.each do |type_name, expected_filename|
30
+ import_file = pool.lookup(type_name).file_descriptor
31
+ if import_file.name != expected_filename
32
+ warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
20
33
  end
21
34
  end
35
+ warn "Each proto file must use a consistent fully-qualified name."
36
+ warn "This will become an error in the next major version."
22
37
  end
23
38
 
24
39
  module Authzed
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
3
  # source: authzed/api/v1/watch_service.proto
3
4
 
@@ -7,17 +8,32 @@ require 'google/api/annotations_pb'
7
8
  require 'validate/validate_pb'
8
9
  require 'authzed/api/v1/core_pb'
9
10
 
10
- Google::Protobuf::DescriptorPool.generated_pool.build do
11
- add_file("authzed/api/v1/watch_service.proto", :syntax => :proto3) do
12
- add_message "authzed.api.v1.WatchRequest" do
13
- repeated :optional_object_types, :string, 1, json_name: "optionalObjectTypes"
14
- optional :optional_start_cursor, :message, 2, "authzed.api.v1.ZedToken", json_name: "optionalStartCursor"
15
- end
16
- add_message "authzed.api.v1.WatchResponse" do
17
- repeated :updates, :message, 1, "authzed.api.v1.RelationshipUpdate", json_name: "updates"
18
- optional :changes_through, :message, 2, "authzed.api.v1.ZedToken", json_name: "changesThrough"
11
+
12
+ descriptor_data = "\n\"authzed/api/v1/watch_service.proto\x12\x0e\x61uthzed.api.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17validate/validate.proto\x1a\x19\x61uthzed/api/v1/core.proto\"\xe2\x01\n\x0cWatchRequest\x12\x83\x01\n\x15optional_object_types\x18\x01 \x03(\tBO\xfa\x42L\x92\x01I\x08\x00\"ErC(\x80\x01\x32>^([a-z][a-z0-9_]{1,62}[a-z0-9]/)*[a-z][a-z0-9_]{1,62}[a-z0-9]$R\x13optionalObjectTypes\x12L\n\x15optional_start_cursor\x18\x02 \x01(\x0b\x32\x18.authzed.api.v1.ZedTokenR\x13optionalStartCursor\"\x90\x01\n\rWatchResponse\x12<\n\x07updates\x18\x01 \x03(\x0b\x32\".authzed.api.v1.RelationshipUpdateR\x07updates\x12\x41\n\x0f\x63hanges_through\x18\x02 \x01(\x0b\x32\x18.authzed.api.v1.ZedTokenR\x0e\x63hangesThrough2l\n\x0cWatchService\x12\\\n\x05Watch\x12\x1c.authzed.api.v1.WatchRequest\x1a\x1d.authzed.api.v1.WatchResponse\"\x14\x82\xd3\xe4\x93\x02\x0e:\x01*\"\t/v1/watch0\x01\x42H\n\x12\x63om.authzed.api.v1Z2github.com/authzed/authzed-go/proto/authzed/api/v1b\x06proto3"
13
+
14
+ pool = Google::Protobuf::DescriptorPool.generated_pool
15
+
16
+ begin
17
+ pool.add_serialized_file(descriptor_data)
18
+ rescue TypeError => e
19
+ # Compatibility code: will be removed in the next major version.
20
+ require 'google/protobuf/descriptor_pb'
21
+ parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
22
+ parsed.clear_dependency
23
+ serialized = parsed.class.encode(parsed)
24
+ file = pool.add_serialized_file(serialized)
25
+ warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
26
+ imports = [
27
+ ["authzed.api.v1.ZedToken", "authzed/api/v1/core.proto"],
28
+ ]
29
+ imports.each do |type_name, expected_filename|
30
+ import_file = pool.lookup(type_name).file_descriptor
31
+ if import_file.name != expected_filename
32
+ warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
19
33
  end
20
34
  end
35
+ warn "Each proto file must use a consistent fully-qualified name."
36
+ warn "This will become an error in the next major version."
21
37
  end
22
38
 
23
39
  module Authzed
data/lib/authzed.rb CHANGED
@@ -1,11 +1,9 @@
1
- require 'authzed/api/v1alpha1/schema_pb'
2
- require 'authzed/api/v1alpha1/schema_services_pb'
3
- require 'authzed/api/v1alpha1/client'
4
- require 'authzed/api/v1/schema_services_pb'
1
+ require 'authzed/api/v1/schema_service_services_pb'
5
2
  require 'authzed/api/v1/watch_service_services_pb'
6
3
  require 'authzed/api/v1/permission_service_services_pb'
4
+ require 'authzed/api/v1/experimental_service_services_pb'
7
5
  require 'authzed/api/v1/client'
8
6
  require 'grpcutil/bearer_token'
9
7
 
10
8
  module Authzed
11
- end
9
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: authzed
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Authzed
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-09-09 00:00:00.000000000 Z
11
+ date: 2023-09-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: grpc
@@ -62,34 +62,19 @@ files:
62
62
  - LICENSE
63
63
  - README.md
64
64
  - lib/authzed.rb
65
- - lib/authzed/api/v0/acl_service_pb.rb
66
- - lib/authzed/api/v0/acl_service_services_pb.rb
67
- - lib/authzed/api/v0/client.rb
68
- - lib/authzed/api/v0/core_pb.rb
69
- - lib/authzed/api/v0/developer_pb.rb
70
- - lib/authzed/api/v0/developer_services_pb.rb
71
- - lib/authzed/api/v0/namespace_pb.rb
72
- - lib/authzed/api/v0/namespace_service_pb.rb
73
- - lib/authzed/api/v0/namespace_service_services_pb.rb
74
- - lib/authzed/api/v0/watch_service_pb.rb
75
- - lib/authzed/api/v0/watch_service_services_pb.rb
76
65
  - lib/authzed/api/v1/client.rb
77
66
  - lib/authzed/api/v1/core_pb.rb
78
67
  - lib/authzed/api/v1/debug_pb.rb
68
+ - lib/authzed/api/v1/error_reason_pb.rb
69
+ - lib/authzed/api/v1/experimental_service_pb.rb
70
+ - lib/authzed/api/v1/experimental_service_services_pb.rb
79
71
  - lib/authzed/api/v1/openapi_pb.rb
80
72
  - lib/authzed/api/v1/permission_service_pb.rb
81
73
  - lib/authzed/api/v1/permission_service_services_pb.rb
82
- - lib/authzed/api/v1/schema_pb.rb
83
74
  - lib/authzed/api/v1/schema_service_pb.rb
84
75
  - lib/authzed/api/v1/schema_service_services_pb.rb
85
- - lib/authzed/api/v1/schema_services_pb.rb
86
76
  - lib/authzed/api/v1/watch_service_pb.rb
87
77
  - lib/authzed/api/v1/watch_service_services_pb.rb
88
- - lib/authzed/api/v1alpha1/client.rb
89
- - lib/authzed/api/v1alpha1/schema_pb.rb
90
- - lib/authzed/api/v1alpha1/schema_services_pb.rb
91
- - lib/authzed/api/v1alpha1/watchresources_service_pb.rb
92
- - lib/authzed/api/v1alpha1/watchresources_service_services_pb.rb
93
78
  - lib/grpcutil/bearer_token.rb
94
79
  - lib/validate/validate_pb.rb
95
80
  homepage: https://authzed.com
@@ -1,104 +0,0 @@
1
- # Generated by the protocol buffer compiler. DO NOT EDIT!
2
- # source: authzed/api/v0/acl_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/acl_service.proto", :syntax => :proto3) do
11
- add_message "authzed.api.v0.RelationTupleFilter" do
12
- optional :namespace, :string, 1, json_name: "namespace"
13
- optional :object_id, :string, 2, json_name: "objectId"
14
- optional :relation, :string, 3, json_name: "relation"
15
- optional :userset, :message, 5, "authzed.api.v0.ObjectAndRelation", json_name: "userset"
16
- repeated :filters, :enum, 6, "authzed.api.v0.RelationTupleFilter.Filter", json_name: "filters"
17
- end
18
- add_enum "authzed.api.v0.RelationTupleFilter.Filter" do
19
- value :UNKNOWN, 0
20
- value :OBJECT_ID, 1
21
- value :RELATION, 2
22
- value :USERSET, 4
23
- end
24
- add_message "authzed.api.v0.ReadRequest" do
25
- repeated :tuplesets, :message, 1, "authzed.api.v0.RelationTupleFilter", json_name: "tuplesets"
26
- optional :at_revision, :message, 2, "authzed.api.v0.Zookie", json_name: "atRevision"
27
- end
28
- add_message "authzed.api.v0.ReadResponse" do
29
- repeated :tuplesets, :message, 1, "authzed.api.v0.ReadResponse.Tupleset", json_name: "tuplesets"
30
- optional :revision, :message, 2, "authzed.api.v0.Zookie", json_name: "revision"
31
- end
32
- add_message "authzed.api.v0.ReadResponse.Tupleset" do
33
- repeated :tuples, :message, 1, "authzed.api.v0.RelationTuple", json_name: "tuples"
34
- end
35
- add_message "authzed.api.v0.WriteRequest" do
36
- repeated :write_conditions, :message, 1, "authzed.api.v0.RelationTuple", json_name: "writeConditions"
37
- repeated :updates, :message, 2, "authzed.api.v0.RelationTupleUpdate", json_name: "updates"
38
- end
39
- add_message "authzed.api.v0.WriteResponse" do
40
- optional :revision, :message, 1, "authzed.api.v0.Zookie", json_name: "revision"
41
- end
42
- add_message "authzed.api.v0.CheckRequest" do
43
- optional :test_userset, :message, 1, "authzed.api.v0.ObjectAndRelation", json_name: "testUserset"
44
- optional :user, :message, 2, "authzed.api.v0.User", json_name: "user"
45
- optional :at_revision, :message, 3, "authzed.api.v0.Zookie", json_name: "atRevision"
46
- end
47
- add_message "authzed.api.v0.ContentChangeCheckRequest" do
48
- optional :test_userset, :message, 1, "authzed.api.v0.ObjectAndRelation", json_name: "testUserset"
49
- optional :user, :message, 2, "authzed.api.v0.User", json_name: "user"
50
- end
51
- add_message "authzed.api.v0.CheckResponse" do
52
- optional :is_member, :bool, 1, json_name: "isMember"
53
- optional :revision, :message, 2, "authzed.api.v0.Zookie", json_name: "revision"
54
- optional :membership, :enum, 3, "authzed.api.v0.CheckResponse.Membership", json_name: "membership"
55
- end
56
- add_enum "authzed.api.v0.CheckResponse.Membership" do
57
- value :UNKNOWN, 0
58
- value :NOT_MEMBER, 1
59
- value :MEMBER, 2
60
- end
61
- add_message "authzed.api.v0.ExpandRequest" do
62
- optional :userset, :message, 1, "authzed.api.v0.ObjectAndRelation", json_name: "userset"
63
- optional :at_revision, :message, 2, "authzed.api.v0.Zookie", json_name: "atRevision"
64
- end
65
- add_message "authzed.api.v0.ExpandResponse" do
66
- optional :tree_node, :message, 1, "authzed.api.v0.RelationTupleTreeNode", json_name: "treeNode"
67
- optional :revision, :message, 3, "authzed.api.v0.Zookie", json_name: "revision"
68
- end
69
- add_message "authzed.api.v0.LookupRequest" do
70
- optional :object_relation, :message, 1, "authzed.api.v0.RelationReference", json_name: "objectRelation"
71
- optional :user, :message, 2, "authzed.api.v0.ObjectAndRelation", json_name: "user"
72
- optional :at_revision, :message, 3, "authzed.api.v0.Zookie", json_name: "atRevision"
73
- optional :page_reference, :string, 4, json_name: "pageReference"
74
- optional :limit, :uint32, 5, json_name: "limit"
75
- end
76
- add_message "authzed.api.v0.LookupResponse" do
77
- repeated :resolved_object_ids, :string, 1, json_name: "resolvedObjectIds"
78
- optional :next_page_reference, :string, 2, json_name: "nextPageReference"
79
- optional :revision, :message, 3, "authzed.api.v0.Zookie", json_name: "revision"
80
- end
81
- end
82
- end
83
-
84
- module Authzed
85
- module Api
86
- module V0
87
- RelationTupleFilter = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v0.RelationTupleFilter").msgclass
88
- RelationTupleFilter::Filter = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v0.RelationTupleFilter.Filter").enummodule
89
- ReadRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v0.ReadRequest").msgclass
90
- ReadResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v0.ReadResponse").msgclass
91
- ReadResponse::Tupleset = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v0.ReadResponse.Tupleset").msgclass
92
- WriteRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v0.WriteRequest").msgclass
93
- WriteResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v0.WriteResponse").msgclass
94
- CheckRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v0.CheckRequest").msgclass
95
- ContentChangeCheckRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v0.ContentChangeCheckRequest").msgclass
96
- CheckResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v0.CheckResponse").msgclass
97
- CheckResponse::Membership = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v0.CheckResponse.Membership").enummodule
98
- ExpandRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v0.ExpandRequest").msgclass
99
- ExpandResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v0.ExpandResponse").msgclass
100
- LookupRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v0.LookupRequest").msgclass
101
- LookupResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v0.LookupResponse").msgclass
102
- end
103
- end
104
- end
@@ -1,31 +0,0 @@
1
- # Generated by the protocol buffer compiler. DO NOT EDIT!
2
- # Source: authzed/api/v0/acl_service.proto for package 'authzed.api.v0'
3
-
4
- require 'grpc'
5
- require 'authzed/api/v0/acl_service_pb'
6
-
7
- module Authzed
8
- module Api
9
- module V0
10
- module ACLService
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.ACLService'
18
-
19
- rpc :Read, ::Authzed::Api::V0::ReadRequest, ::Authzed::Api::V0::ReadResponse
20
- rpc :Write, ::Authzed::Api::V0::WriteRequest, ::Authzed::Api::V0::WriteResponse
21
- rpc :Check, ::Authzed::Api::V0::CheckRequest, ::Authzed::Api::V0::CheckResponse
22
- rpc :ContentChangeCheck, ::Authzed::Api::V0::ContentChangeCheckRequest, ::Authzed::Api::V0::CheckResponse
23
- rpc :Expand, ::Authzed::Api::V0::ExpandRequest, ::Authzed::Api::V0::ExpandResponse
24
- rpc :Lookup, ::Authzed::Api::V0::LookupRequest, ::Authzed::Api::V0::LookupResponse
25
- end
26
-
27
- Stub = Service.rpc_stub_class
28
- end
29
- end
30
- end
31
- end
@@ -1,61 +0,0 @@
1
- require 'grpc'
2
-
3
- module Authzed
4
- module Api
5
- module V0
6
- class Client
7
- attr_reader :acl_service, :developer_service, :namespace_service, :watch_service
8
-
9
- def initialize(target:, credentials: nil, interceptors: [], options: {}, timeout: nil)
10
- creds = credentials || GRPC::Core::ChannelCredentials.new
11
-
12
- @acl_service = ACLService::Stub.new(
13
- target,
14
- creds,
15
- timeout: timeout,
16
- interceptors: interceptors,
17
- channel_args: options,
18
- )
19
- @developer_service = DeveloperService::Stub.new(
20
- target,
21
- creds,
22
- timeout: timeout,
23
- interceptors: interceptors,
24
- channel_args: options,
25
- )
26
- @namespace_service = NamespaceService::Stub.new(
27
- target,
28
- creds,
29
- timeout: timeout,
30
- interceptors: interceptors,
31
- channel_args: options,
32
- )
33
- @watch_service = WatchService::Stub.new(
34
- target,
35
- creds,
36
- timeout: timeout,
37
- interceptors: interceptors,
38
- channel_args: options,
39
- )
40
- end
41
- end
42
-
43
- # Utility method for creating usersets
44
- module UserPatch
45
- def self.included(base)
46
- def base.for(namespace:, object_id:)
47
- Authzed::Api::V0::User.new(
48
- userset: Authzed::Api::V0::ObjectAndRelation.new(
49
- namespace: namespace,
50
- object_id: object_id,
51
- relation: '...',
52
- )
53
- )
54
- end
55
- end
56
- end
57
-
58
- User.include(UserPatch)
59
- end
60
- end
61
- end
@@ -1,40 +0,0 @@
1
- # Generated by the protocol buffer compiler. DO NOT EDIT!
2
- # source: authzed/api/v0/core.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/v0/core.proto", :syntax => :proto3) do
10
- add_message "authzed.api.v0.RelationTuple" do
11
- optional :object_and_relation, :message, 1, "authzed.api.v0.ObjectAndRelation", json_name: "objectAndRelation"
12
- optional :user, :message, 2, "authzed.api.v0.User", json_name: "user"
13
- end
14
- add_message "authzed.api.v0.ObjectAndRelation" do
15
- optional :namespace, :string, 1, json_name: "namespace"
16
- optional :object_id, :string, 2, json_name: "objectId"
17
- optional :relation, :string, 3, json_name: "relation"
18
- end
19
- add_message "authzed.api.v0.RelationReference" do
20
- optional :namespace, :string, 1, json_name: "namespace"
21
- optional :relation, :string, 3, json_name: "relation"
22
- end
23
- add_message "authzed.api.v0.User" do
24
- oneof :user_oneof do
25
- optional :userset, :message, 2, "authzed.api.v0.ObjectAndRelation", json_name: "userset"
26
- end
27
- end
28
- end
29
- end
30
-
31
- module Authzed
32
- module Api
33
- module V0
34
- RelationTuple = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v0.RelationTuple").msgclass
35
- ObjectAndRelation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v0.ObjectAndRelation").msgclass
36
- RelationReference = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v0.RelationReference").msgclass
37
- User = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v0.User").msgclass
38
- end
39
- end
40
- end