permify 0.0.1 → 1.5.4

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.
Files changed (309) hide show
  1. checksums.yaml +5 -5
  2. data/Gemfile +6 -1
  3. data/README.md +241 -16
  4. data/Rakefile +7 -7
  5. data/generator/generate-sdk.sh +157 -0
  6. data/generator/openapi-generator-cli.jar +0 -0
  7. data/generator/openapi.json +3699 -0
  8. data/lib/permify/api/bundle_api.rb +238 -0
  9. data/lib/permify/api/data_api.rb +526 -0
  10. data/lib/permify/api/permission_api.rb +528 -0
  11. data/lib/permify/api/schema_api.rb +310 -0
  12. data/lib/permify/api/tenancy_api.rb +215 -0
  13. data/lib/permify/api/watch_api.rb +94 -0
  14. data/lib/permify/api_client.rb +394 -0
  15. data/lib/permify/api_error.rb +58 -0
  16. data/lib/permify/configuration.rb +298 -0
  17. data/lib/permify/models/abstract_type.rb +228 -0
  18. data/lib/permify/models/any.rb +216 -0
  19. data/lib/permify/models/argument.rb +215 -0
  20. data/lib/permify/models/attribute.rb +233 -0
  21. data/lib/permify/models/attribute_definition.rb +247 -0
  22. data/lib/permify/models/attribute_filter.rb +226 -0
  23. data/lib/permify/models/attribute_read_request_metadata.rb +216 -0
  24. data/lib/permify/models/attribute_read_response.rb +228 -0
  25. data/lib/permify/models/attribute_type.rb +46 -0
  26. data/lib/permify/models/bulk_check_body.rb +248 -0
  27. data/lib/permify/models/bundle_delete_body.rb +216 -0
  28. data/lib/permify/models/bundle_delete_response.rb +214 -0
  29. data/lib/permify/models/bundle_read_body.rb +214 -0
  30. data/lib/permify/models/bundle_read_response.rb +214 -0
  31. data/lib/permify/models/bundle_run_response.rb +216 -0
  32. data/lib/permify/models/bundle_write_body.rb +218 -0
  33. data/lib/permify/models/bundle_write_response.rb +218 -0
  34. data/lib/permify/models/check_body.rb +264 -0
  35. data/lib/permify/models/check_result.rb +40 -0
  36. data/lib/permify/models/checked_expr.rb +258 -0
  37. data/lib/permify/models/child.rb +224 -0
  38. data/lib/permify/models/component.rb +41 -0
  39. data/lib/permify/models/comprehension.rb +281 -0
  40. data/lib/permify/models/computed_attribute.rb +215 -0
  41. data/lib/permify/models/computed_user_set.rb +215 -0
  42. data/lib/permify/models/constant.rb +317 -0
  43. data/lib/permify/models/context.rb +240 -0
  44. data/lib/permify/models/create_list.rb +230 -0
  45. data/lib/permify/models/create_struct.rb +228 -0
  46. data/lib/permify/models/data_bundle.rb +240 -0
  47. data/lib/permify/models/data_change.rb +255 -0
  48. data/lib/permify/models/data_change_operation.rb +40 -0
  49. data/lib/permify/models/data_changes.rb +228 -0
  50. data/lib/permify/models/data_delete_body.rb +224 -0
  51. data/lib/permify/models/data_delete_response.rb +216 -0
  52. data/lib/permify/models/data_write_body.rb +239 -0
  53. data/lib/permify/models/data_write_request_metadata.rb +216 -0
  54. data/lib/permify/models/data_write_response.rb +216 -0
  55. data/lib/permify/models/delete_relationships_body.rb +214 -0
  56. data/lib/permify/models/entity.rb +224 -0
  57. data/lib/permify/models/entity_definition.rb +264 -0
  58. data/lib/permify/models/entity_definition_reference.rb +41 -0
  59. data/lib/permify/models/entity_filter.rb +226 -0
  60. data/lib/permify/models/entry.rb +254 -0
  61. data/lib/permify/models/expand_leaf.rb +233 -0
  62. data/lib/permify/models/expand_tree_node.rb +248 -0
  63. data/lib/permify/models/expand_tree_node_operation.rb +41 -0
  64. data/lib/permify/models/expr.rb +279 -0
  65. data/lib/permify/models/expr_call.rb +237 -0
  66. data/lib/permify/models/extension.rb +236 -0
  67. data/lib/permify/models/function_type.rb +227 -0
  68. data/lib/permify/models/ident.rb +216 -0
  69. data/lib/permify/models/leaf.rb +242 -0
  70. data/lib/permify/models/list_type.rb +215 -0
  71. data/lib/permify/models/lookup_entity_body.rb +285 -0
  72. data/lib/permify/models/lookup_entity_stream_body.rb +285 -0
  73. data/lib/permify/models/lookup_subject_body.rb +284 -0
  74. data/lib/permify/models/map_type.rb +224 -0
  75. data/lib/permify/models/partial_write_body.rb +225 -0
  76. data/lib/permify/models/partials.rb +238 -0
  77. data/lib/permify/models/permission_bulk_check_request_item.rb +233 -0
  78. data/lib/permify/models/permission_bulk_check_response.rb +218 -0
  79. data/lib/permify/models/permission_check_request_metadata.rb +236 -0
  80. data/lib/permify/models/permission_check_response.rb +246 -0
  81. data/lib/permify/models/permission_check_response_metadata.rb +216 -0
  82. data/lib/permify/models/permission_definition.rb +225 -0
  83. data/lib/permify/models/permission_expand_body.rb +255 -0
  84. data/lib/permify/models/permission_expand_request_metadata.rb +226 -0
  85. data/lib/permify/models/permission_expand_response.rb +215 -0
  86. data/lib/permify/models/permission_lookup_entity_request_metadata.rb +236 -0
  87. data/lib/permify/models/permission_lookup_entity_response.rb +228 -0
  88. data/lib/permify/models/permission_lookup_entity_stream_response.rb +226 -0
  89. data/lib/permify/models/permission_lookup_subject_request_metadata.rb +236 -0
  90. data/lib/permify/models/permission_lookup_subject_response.rb +228 -0
  91. data/lib/permify/models/permission_subject_permission_request_metadata.rb +246 -0
  92. data/lib/permify/models/permission_subject_permission_response.rb +218 -0
  93. data/lib/permify/models/primitive_type.rb +44 -0
  94. data/lib/permify/models/read_attributes_body.rb +244 -0
  95. data/lib/permify/models/read_relationships_body.rb +244 -0
  96. data/lib/permify/models/relation_definition.rb +228 -0
  97. data/lib/permify/models/relation_reference.rb +226 -0
  98. data/lib/permify/models/relationship_delete_response.rb +215 -0
  99. data/lib/permify/models/relationship_read_request_metadata.rb +216 -0
  100. data/lib/permify/models/relationship_read_response.rb +228 -0
  101. data/lib/permify/models/relationship_write_request_metadata.rb +214 -0
  102. data/lib/permify/models/relationship_write_response.rb +215 -0
  103. data/lib/permify/models/rewrite.rb +249 -0
  104. data/lib/permify/models/rewrite_operation.rb +41 -0
  105. data/lib/permify/models/rule_definition.rb +237 -0
  106. data/lib/permify/models/run_bundle_body.rb +228 -0
  107. data/lib/permify/models/schema_definition.rb +242 -0
  108. data/lib/permify/models/schema_definition_reference.rb +40 -0
  109. data/lib/permify/models/schema_list.rb +223 -0
  110. data/lib/permify/models/schema_list_body.rb +226 -0
  111. data/lib/permify/models/schema_list_response.rb +235 -0
  112. data/lib/permify/models/schema_partial_write_request_metadata.rb +216 -0
  113. data/lib/permify/models/schema_partial_write_response.rb +216 -0
  114. data/lib/permify/models/schema_read_body.rb +215 -0
  115. data/lib/permify/models/schema_read_request_metadata.rb +216 -0
  116. data/lib/permify/models/schema_read_response.rb +215 -0
  117. data/lib/permify/models/schema_write_body.rb +216 -0
  118. data/lib/permify/models/schema_write_response.rb +216 -0
  119. data/lib/permify/models/select.rb +235 -0
  120. data/lib/permify/models/source_info.rb +274 -0
  121. data/lib/permify/models/status.rb +234 -0
  122. data/lib/permify/models/stream_result_of_permission_lookup_entity_stream_response.rb +223 -0
  123. data/lib/permify/models/stream_result_of_watch_response.rb +223 -0
  124. data/lib/permify/models/string_array_value.rb +218 -0
  125. data/lib/permify/models/subject.rb +233 -0
  126. data/lib/permify/models/subject_filter.rb +235 -0
  127. data/lib/permify/models/subject_permission_body.rb +242 -0
  128. data/lib/permify/models/subjects.rb +218 -0
  129. data/lib/permify/models/tenant.rb +236 -0
  130. data/lib/permify/models/tenant_create_request.rb +226 -0
  131. data/lib/permify/models/tenant_create_response.rb +215 -0
  132. data/lib/permify/models/tenant_delete_response.rb +216 -0
  133. data/lib/permify/models/tenant_list_request.rb +226 -0
  134. data/lib/permify/models/tenant_list_response.rb +228 -0
  135. data/lib/permify/models/tuple.rb +233 -0
  136. data/lib/permify/models/tuple_filter.rb +233 -0
  137. data/lib/permify/models/tuple_set.rb +215 -0
  138. data/lib/permify/models/tuple_to_user_set.rb +224 -0
  139. data/lib/permify/models/v1_call.rb +226 -0
  140. data/lib/permify/models/v1_expand.rb +255 -0
  141. data/lib/permify/models/v1_operation.rb +254 -0
  142. data/lib/permify/models/v1alpha1_reference.rb +237 -0
  143. data/lib/permify/models/v1alpha1_type.rb +350 -0
  144. data/lib/permify/models/values.rb +216 -0
  145. data/lib/permify/models/version.rb +225 -0
  146. data/lib/permify/models/watch_body.rb +216 -0
  147. data/lib/permify/models/watch_response.rb +215 -0
  148. data/lib/permify/models/well_known_type.rb +41 -0
  149. data/lib/permify/models/write_relationships_body.rb +227 -0
  150. data/lib/permify/version.rb +13 -1
  151. data/lib/permify.rb +175 -15
  152. data/permify-ruby.gemspec +39 -0
  153. data/permify.gemspec +38 -27
  154. data/spec/api/bundle_api_spec.rb +71 -0
  155. data/spec/api/data_api_spec.rb +119 -0
  156. data/spec/api/permission_api_spec.rb +120 -0
  157. data/spec/api/schema_api_spec.rb +83 -0
  158. data/spec/api/tenancy_api_spec.rb +68 -0
  159. data/spec/api/watch_api_spec.rb +47 -0
  160. data/spec/models/abstract_type_spec.rb +42 -0
  161. data/spec/models/any_spec.rb +36 -0
  162. data/spec/models/argument_spec.rb +36 -0
  163. data/spec/models/attribute_definition_spec.rb +42 -0
  164. data/spec/models/attribute_filter_spec.rb +42 -0
  165. data/spec/models/attribute_read_request_metadata_spec.rb +36 -0
  166. data/spec/models/attribute_read_response_spec.rb +42 -0
  167. data/spec/models/attribute_spec.rb +48 -0
  168. data/spec/models/attribute_type_spec.rb +30 -0
  169. data/spec/models/bulk_check_body_spec.rb +54 -0
  170. data/spec/models/bundle_delete_body_spec.rb +36 -0
  171. data/spec/models/bundle_delete_response_spec.rb +36 -0
  172. data/spec/models/bundle_read_body_spec.rb +36 -0
  173. data/spec/models/bundle_read_response_spec.rb +36 -0
  174. data/spec/models/bundle_run_response_spec.rb +36 -0
  175. data/spec/models/bundle_write_body_spec.rb +36 -0
  176. data/spec/models/bundle_write_response_spec.rb +36 -0
  177. data/spec/models/check_body_spec.rb +66 -0
  178. data/spec/models/check_result_spec.rb +30 -0
  179. data/spec/models/checked_expr_spec.rb +60 -0
  180. data/spec/models/child_spec.rb +42 -0
  181. data/spec/models/component_spec.rb +30 -0
  182. data/spec/models/comprehension_spec.rb +78 -0
  183. data/spec/models/computed_attribute_spec.rb +36 -0
  184. data/spec/models/computed_user_set_spec.rb +36 -0
  185. data/spec/models/constant_spec.rb +84 -0
  186. data/spec/models/context_spec.rb +48 -0
  187. data/spec/models/create_list_spec.rb +42 -0
  188. data/spec/models/create_struct_spec.rb +42 -0
  189. data/spec/models/data_bundle_spec.rb +48 -0
  190. data/spec/models/data_change_operation_spec.rb +30 -0
  191. data/spec/models/data_change_spec.rb +48 -0
  192. data/spec/models/data_changes_spec.rb +42 -0
  193. data/spec/models/data_delete_body_spec.rb +42 -0
  194. data/spec/models/data_delete_response_spec.rb +36 -0
  195. data/spec/models/data_write_body_spec.rb +48 -0
  196. data/spec/models/data_write_request_metadata_spec.rb +36 -0
  197. data/spec/models/data_write_response_spec.rb +36 -0
  198. data/spec/models/delete_relationships_body_spec.rb +36 -0
  199. data/spec/models/entity_definition_reference_spec.rb +30 -0
  200. data/spec/models/entity_definition_spec.rb +60 -0
  201. data/spec/models/entity_filter_spec.rb +42 -0
  202. data/spec/models/entity_spec.rb +42 -0
  203. data/spec/models/entry_spec.rb +60 -0
  204. data/spec/models/expand_leaf_spec.rb +48 -0
  205. data/spec/models/expand_tree_node_operation_spec.rb +30 -0
  206. data/spec/models/expand_tree_node_spec.rb +42 -0
  207. data/spec/models/expr_call_spec.rb +48 -0
  208. data/spec/models/expr_spec.rb +78 -0
  209. data/spec/models/extension_spec.rb +48 -0
  210. data/spec/models/function_type_spec.rb +42 -0
  211. data/spec/models/ident_spec.rb +36 -0
  212. data/spec/models/leaf_spec.rb +54 -0
  213. data/spec/models/list_type_spec.rb +36 -0
  214. data/spec/models/lookup_entity_body_spec.rb +78 -0
  215. data/spec/models/lookup_entity_stream_body_spec.rb +78 -0
  216. data/spec/models/lookup_subject_body_spec.rb +78 -0
  217. data/spec/models/map_type_spec.rb +42 -0
  218. data/spec/models/partial_write_body_spec.rb +42 -0
  219. data/spec/models/partials_spec.rb +48 -0
  220. data/spec/models/permission_bulk_check_request_item_spec.rb +48 -0
  221. data/spec/models/permission_bulk_check_response_spec.rb +36 -0
  222. data/spec/models/permission_check_request_metadata_spec.rb +48 -0
  223. data/spec/models/permission_check_response_metadata_spec.rb +36 -0
  224. data/spec/models/permission_check_response_spec.rb +42 -0
  225. data/spec/models/permission_definition_spec.rb +42 -0
  226. data/spec/models/permission_expand_body_spec.rb +60 -0
  227. data/spec/models/permission_expand_request_metadata_spec.rb +42 -0
  228. data/spec/models/permission_expand_response_spec.rb +36 -0
  229. data/spec/models/permission_lookup_entity_request_metadata_spec.rb +48 -0
  230. data/spec/models/permission_lookup_entity_response_spec.rb +42 -0
  231. data/spec/models/permission_lookup_entity_stream_response_spec.rb +42 -0
  232. data/spec/models/permission_lookup_subject_request_metadata_spec.rb +48 -0
  233. data/spec/models/permission_lookup_subject_response_spec.rb +42 -0
  234. data/spec/models/permission_subject_permission_request_metadata_spec.rb +54 -0
  235. data/spec/models/permission_subject_permission_response_spec.rb +36 -0
  236. data/spec/models/primitive_type_spec.rb +30 -0
  237. data/spec/models/read_attributes_body_spec.rb +54 -0
  238. data/spec/models/read_relationships_body_spec.rb +54 -0
  239. data/spec/models/relation_definition_spec.rb +42 -0
  240. data/spec/models/relation_reference_spec.rb +42 -0
  241. data/spec/models/relationship_delete_response_spec.rb +36 -0
  242. data/spec/models/relationship_read_request_metadata_spec.rb +36 -0
  243. data/spec/models/relationship_read_response_spec.rb +42 -0
  244. data/spec/models/relationship_write_request_metadata_spec.rb +36 -0
  245. data/spec/models/relationship_write_response_spec.rb +36 -0
  246. data/spec/models/rewrite_operation_spec.rb +30 -0
  247. data/spec/models/rewrite_spec.rb +42 -0
  248. data/spec/models/rule_definition_spec.rb +48 -0
  249. data/spec/models/run_bundle_body_spec.rb +42 -0
  250. data/spec/models/schema_definition_reference_spec.rb +30 -0
  251. data/spec/models/schema_definition_spec.rb +48 -0
  252. data/spec/models/schema_list_body_spec.rb +42 -0
  253. data/spec/models/schema_list_response_spec.rb +48 -0
  254. data/spec/models/schema_list_spec.rb +42 -0
  255. data/spec/models/schema_partial_write_request_metadata_spec.rb +36 -0
  256. data/spec/models/schema_partial_write_response_spec.rb +36 -0
  257. data/spec/models/schema_read_body_spec.rb +36 -0
  258. data/spec/models/schema_read_request_metadata_spec.rb +36 -0
  259. data/spec/models/schema_read_response_spec.rb +36 -0
  260. data/spec/models/schema_write_body_spec.rb +36 -0
  261. data/spec/models/schema_write_response_spec.rb +36 -0
  262. data/spec/models/select_spec.rb +48 -0
  263. data/spec/models/source_info_spec.rb +66 -0
  264. data/spec/models/status_spec.rb +48 -0
  265. data/spec/models/stream_result_of_permission_lookup_entity_stream_response_spec.rb +42 -0
  266. data/spec/models/stream_result_of_watch_response_spec.rb +42 -0
  267. data/spec/models/string_array_value_spec.rb +36 -0
  268. data/spec/models/subject_filter_spec.rb +48 -0
  269. data/spec/models/subject_permission_body_spec.rb +54 -0
  270. data/spec/models/subject_spec.rb +48 -0
  271. data/spec/models/subjects_spec.rb +36 -0
  272. data/spec/models/tenant_create_request_spec.rb +42 -0
  273. data/spec/models/tenant_create_response_spec.rb +36 -0
  274. data/spec/models/tenant_delete_response_spec.rb +36 -0
  275. data/spec/models/tenant_list_request_spec.rb +42 -0
  276. data/spec/models/tenant_list_response_spec.rb +42 -0
  277. data/spec/models/tenant_spec.rb +48 -0
  278. data/spec/models/tuple_filter_spec.rb +48 -0
  279. data/spec/models/tuple_set_spec.rb +36 -0
  280. data/spec/models/tuple_spec.rb +48 -0
  281. data/spec/models/tuple_to_user_set_spec.rb +42 -0
  282. data/spec/models/v1_call_spec.rb +42 -0
  283. data/spec/models/v1_expand_spec.rb +60 -0
  284. data/spec/models/v1_operation_spec.rb +54 -0
  285. data/spec/models/v1alpha1_reference_spec.rb +48 -0
  286. data/spec/models/v1alpha1_type_spec.rb +108 -0
  287. data/spec/models/values_spec.rb +36 -0
  288. data/spec/models/version_spec.rb +42 -0
  289. data/spec/models/watch_body_spec.rb +36 -0
  290. data/spec/models/watch_response_spec.rb +36 -0
  291. data/spec/models/well_known_type_spec.rb +30 -0
  292. data/spec/models/write_relationships_body_spec.rb +42 -0
  293. data/spec/spec_helper.rb +101 -3
  294. metadata +449 -85
  295. data/.gitignore +0 -17
  296. data/.rspec +0 -2
  297. data/LICENSE.txt +0 -22
  298. data/lib/permify/authorization.rb +0 -17
  299. data/lib/permify/clearance.rb +0 -29
  300. data/lib/permify/permission/combination/any.rb +0 -13
  301. data/lib/permify/permission/combination.rb +0 -4
  302. data/lib/permify/permission/combination_map.rb +0 -23
  303. data/lib/permify/permission/dynamic.rb +0 -13
  304. data/lib/permify/permission/null.rb +0 -7
  305. data/lib/permify/permission/static.rb +0 -7
  306. data/lib/permify/permission.rb +0 -10
  307. data/lib/permify/permission_map.rb +0 -32
  308. data/lib/permify/repository.rb +0 -68
  309. data/spec/integration_spec.rb +0 -114
@@ -0,0 +1,3699 @@
1
+ {
2
+ "swagger": "2.0",
3
+ "info": {
4
+ "title": "Permify API",
5
+ "description": "Permify is an open source authorization service for creating fine-grained and scalable authorization systems.",
6
+ "version": "v1.5.4",
7
+ "contact": {
8
+ "name": "API Support",
9
+ "url": "https://github.com/Permify/permify/issues",
10
+ "email": "hello@permify.co"
11
+ },
12
+ "license": {
13
+ "name": "AGPL-3.0 license",
14
+ "url": "https://github.com/Permify/permify/blob/master/LICENSE"
15
+ }
16
+ },
17
+ "tags": [
18
+ {
19
+ "name": "Permission"
20
+ },
21
+ {
22
+ "name": "Watch"
23
+ },
24
+ {
25
+ "name": "Schema"
26
+ },
27
+ {
28
+ "name": "Data"
29
+ },
30
+ {
31
+ "name": "Bundle"
32
+ },
33
+ {
34
+ "name": "Tenancy"
35
+ }
36
+ ],
37
+ "schemes": [
38
+ "https"
39
+ ],
40
+ "consumes": [
41
+ "application/json"
42
+ ],
43
+ "produces": [
44
+ "application/json"
45
+ ],
46
+ "paths": {
47
+ "/v1/tenants/create": {
48
+ "post": {
49
+ "summary": "create tenant",
50
+ "operationId": "tenants.create",
51
+ "responses": {
52
+ "200": {
53
+ "description": "A successful response.",
54
+ "schema": {
55
+ "$ref": "#/definitions/TenantCreateResponse"
56
+ }
57
+ },
58
+ "default": {
59
+ "description": "An unexpected error response.",
60
+ "schema": {
61
+ "$ref": "#/definitions/Status"
62
+ }
63
+ }
64
+ },
65
+ "parameters": [
66
+ {
67
+ "name": "body",
68
+ "description": "TenantCreateRequest is the message used for the request to create a tenant.",
69
+ "in": "body",
70
+ "required": true,
71
+ "schema": {
72
+ "$ref": "#/definitions/TenantCreateRequest"
73
+ }
74
+ }
75
+ ],
76
+ "tags": [
77
+ "Tenancy"
78
+ ],
79
+ "x-codeSamples": [
80
+ {
81
+ "label": "go",
82
+ "lang": "go",
83
+ "source": "rr, err := client.Tenancy.Create(context.Background(), \u0026v1.TenantCreateRequest{\n Id: \"\",\n Name: \"\"\n})"
84
+ },
85
+ {
86
+ "label": "node",
87
+ "lang": "javascript",
88
+ "source": "client.tenancy.create({\n id: \"\",\n name: \"\"\n}).then((response) =\u003e {\n // handle response\n})"
89
+ },
90
+ {
91
+ "label": "cURL",
92
+ "lang": "curl",
93
+ "source": "curl --location --request POST 'http://localhost:3476/v1/tenants/create' \\\n--header 'Content-Type: application/json' \\\n--data-raw '{\n \"id\": \"\",\n \"name\": \"\"\n}'"
94
+ }
95
+ ]
96
+ }
97
+ },
98
+ "/v1/tenants/list": {
99
+ "post": {
100
+ "summary": "list tenants",
101
+ "operationId": "tenants.list",
102
+ "responses": {
103
+ "200": {
104
+ "description": "A successful response.",
105
+ "schema": {
106
+ "$ref": "#/definitions/TenantListResponse"
107
+ }
108
+ },
109
+ "default": {
110
+ "description": "An unexpected error response.",
111
+ "schema": {
112
+ "$ref": "#/definitions/Status"
113
+ }
114
+ }
115
+ },
116
+ "parameters": [
117
+ {
118
+ "name": "body",
119
+ "description": "TenantListRequest is the message used for the request to list all tenants.",
120
+ "in": "body",
121
+ "required": true,
122
+ "schema": {
123
+ "$ref": "#/definitions/TenantListRequest"
124
+ }
125
+ }
126
+ ],
127
+ "tags": [
128
+ "Tenancy"
129
+ ],
130
+ "x-codeSamples": [
131
+ {
132
+ "label": "go",
133
+ "lang": "go",
134
+ "source": "cr, err := client.Tenancy.List(context.Background(), \u0026v1.TenantListRequest{\n PageSize: 20,\n ContinuousToken: \"\",\n})"
135
+ },
136
+ {
137
+ "label": "node",
138
+ "lang": "javascript",
139
+ "source": "let res = client.tenancy.list({\n pageSize: 20,\n continuousToken: \"\",\n})"
140
+ },
141
+ {
142
+ "label": "cURL",
143
+ "lang": "curl",
144
+ "source": "curl --location --request POST 'localhost:3476/v1/tenants/list' \\\n--header 'Content-Type: application/json' \\\n--data-raw '{\n \"page_size\": 20,\n \"continuous_token\": \"\"\n}'"
145
+ }
146
+ ]
147
+ }
148
+ },
149
+ "/v1/tenants/{id}": {
150
+ "delete": {
151
+ "summary": "delete tenant",
152
+ "operationId": "tenants.delete",
153
+ "responses": {
154
+ "200": {
155
+ "description": "A successful response.",
156
+ "schema": {
157
+ "$ref": "#/definitions/TenantDeleteResponse"
158
+ }
159
+ },
160
+ "default": {
161
+ "description": "An unexpected error response.",
162
+ "schema": {
163
+ "$ref": "#/definitions/Status"
164
+ }
165
+ }
166
+ },
167
+ "parameters": [
168
+ {
169
+ "name": "id",
170
+ "description": "id is the unique identifier of the tenant to be deleted.",
171
+ "in": "path",
172
+ "required": true,
173
+ "type": "string"
174
+ }
175
+ ],
176
+ "tags": [
177
+ "Tenancy"
178
+ ],
179
+ "x-codeSamples": [
180
+ {
181
+ "label": "go",
182
+ "lang": "go",
183
+ "source": "rr, err := client.Tenancy.Delete(context.Background(), \u0026v1.TenantDeleteRequest{\n Id: \"\"\n})"
184
+ },
185
+ {
186
+ "label": "node",
187
+ "lang": "javascript",
188
+ "source": "client.tenancy.delete({\n id: \"\",\n}).then((response) =\u003e {\n // handle response\n})"
189
+ },
190
+ {
191
+ "label": "cURL",
192
+ "lang": "curl",
193
+ "source": "curl --location --request DELETE 'http://localhost:3476/v1/tenants/t1'"
194
+ }
195
+ ]
196
+ }
197
+ },
198
+ "/v1/tenants/{tenant_id}/bundle/delete": {
199
+ "post": {
200
+ "summary": "delete bundle",
201
+ "operationId": "bundle.delete",
202
+ "responses": {
203
+ "200": {
204
+ "description": "A successful response.",
205
+ "schema": {
206
+ "$ref": "#/definitions/BundleDeleteResponse"
207
+ }
208
+ },
209
+ "default": {
210
+ "description": "An unexpected error response.",
211
+ "schema": {
212
+ "$ref": "#/definitions/Status"
213
+ }
214
+ }
215
+ },
216
+ "parameters": [
217
+ {
218
+ "name": "tenant_id",
219
+ "description": "Identifier of the tenant, if you are not using multi-tenancy (have only one tenant) use pre-inserted tenant \u003ccode\u003et1\u003c/code\u003e for this field. Required, and must match the pattern \\“[a-zA-Z0-9-,]+\\“, max 64 bytes.",
220
+ "in": "path",
221
+ "required": true,
222
+ "type": "string"
223
+ },
224
+ {
225
+ "name": "body",
226
+ "in": "body",
227
+ "required": true,
228
+ "schema": {
229
+ "$ref": "#/definitions/Bundle.DeleteBody"
230
+ }
231
+ }
232
+ ],
233
+ "tags": [
234
+ "Bundle"
235
+ ],
236
+ "x-codeSamples": [
237
+ {
238
+ "label": "go",
239
+ "lang": "go",
240
+ "source": "rr, err := client.Bundle.Delete(context.Background(), \u0026v1.BundleDeleteRequest{\n TenantId: \"t1\",\n Name: \"organization_created\",\n})"
241
+ },
242
+ {
243
+ "label": "node",
244
+ "lang": "javascript",
245
+ "source": "client.bundle.delete({\n tenantId: \"t1\",\n name: \"organization_created\",\n}).then((response) =\u003e {\n // handle response\n})"
246
+ },
247
+ {
248
+ "label": "cURL",
249
+ "lang": "curl",
250
+ "source": "curl --location --request POST 'localhost:3476/v1/tenants/{tenant_id}/bundle/delete' \\\n--header 'Content-Type: application/json' \\\n--data-raw '{\n \"name\": \"organization_created\"\n}'"
251
+ }
252
+ ]
253
+ }
254
+ },
255
+ "/v1/tenants/{tenant_id}/bundle/read": {
256
+ "post": {
257
+ "summary": "read bundle",
258
+ "operationId": "bundle.read",
259
+ "responses": {
260
+ "200": {
261
+ "description": "A successful response.",
262
+ "schema": {
263
+ "$ref": "#/definitions/BundleReadResponse"
264
+ }
265
+ },
266
+ "default": {
267
+ "description": "An unexpected error response.",
268
+ "schema": {
269
+ "$ref": "#/definitions/Status"
270
+ }
271
+ }
272
+ },
273
+ "parameters": [
274
+ {
275
+ "name": "tenant_id",
276
+ "description": "Identifier of the tenant, if you are not using multi-tenancy (have only one tenant) use pre-inserted tenant \u003ccode\u003et1\u003c/code\u003e for this field. Required, and must match the pattern \\“[a-zA-Z0-9-,]+\\“, max 64 bytes.",
277
+ "in": "path",
278
+ "required": true,
279
+ "type": "string"
280
+ },
281
+ {
282
+ "name": "body",
283
+ "in": "body",
284
+ "required": true,
285
+ "schema": {
286
+ "$ref": "#/definitions/Bundle.ReadBody"
287
+ }
288
+ }
289
+ ],
290
+ "tags": [
291
+ "Bundle"
292
+ ],
293
+ "x-codeSamples": [
294
+ {
295
+ "label": "go",
296
+ "lang": "go",
297
+ "source": "rr, err := client.Bundle.Read(context.Background(), \u0026v1.BundleReadRequest{\n TenantId: \"t1\",\n Name: \"organization_created\",\n})"
298
+ },
299
+ {
300
+ "label": "node",
301
+ "lang": "javascript",
302
+ "source": "client.bundle.read({\n tenantId: \"t1\",\n name: \"organization_created\",\n}).then((response) =\u003e {\n // handle response\n})"
303
+ },
304
+ {
305
+ "label": "cURL",
306
+ "lang": "curl",
307
+ "source": "curl --location --request POST 'localhost:3476/v1/tenants/{tenant_id}/bundle/read' \\\n--header 'Content-Type: application/json' \\\n--data-raw '{\n \"name\": \"organization_created\"\n}'"
308
+ }
309
+ ]
310
+ }
311
+ },
312
+ "/v1/tenants/{tenant_id}/bundle/write": {
313
+ "post": {
314
+ "summary": "write bundle",
315
+ "operationId": "bundle.write",
316
+ "responses": {
317
+ "200": {
318
+ "description": "A successful response.",
319
+ "schema": {
320
+ "$ref": "#/definitions/BundleWriteResponse"
321
+ }
322
+ },
323
+ "default": {
324
+ "description": "An unexpected error response.",
325
+ "schema": {
326
+ "$ref": "#/definitions/Status"
327
+ }
328
+ }
329
+ },
330
+ "parameters": [
331
+ {
332
+ "name": "tenant_id",
333
+ "description": "Identifier of the tenant, if you are not using multi-tenancy (have only one tenant) use pre-inserted tenant \u003ccode\u003et1\u003c/code\u003e for this field. Required, and must match the pattern \\“[a-zA-Z0-9-,]+\\“, max 64 bytes.",
334
+ "in": "path",
335
+ "required": true,
336
+ "type": "string"
337
+ },
338
+ {
339
+ "name": "body",
340
+ "in": "body",
341
+ "required": true,
342
+ "schema": {
343
+ "$ref": "#/definitions/Bundle.WriteBody"
344
+ }
345
+ }
346
+ ],
347
+ "tags": [
348
+ "Bundle"
349
+ ],
350
+ "x-codeSamples": [
351
+ {
352
+ "label": "go",
353
+ "lang": "go",
354
+ "source": "rr, err := client.Bundle.Write(context.Background(), \u0026v1.BundleWriteRequest{\n TenantId: \"t1\",\n Bundles: []*v1.DataBundle{\n {\n Name: \"organization_created\",\n Arguments: []string{\n \"creatorID\",\n \"organizationID\",\n },\n Operations: []*v1.Operation{\n {\n RelationshipsWrite: []string{\n \"organization:{{.organizationID}}#admin@user:{{.creatorID}}\",\n \"organization:{{.organizationID}}#manager@user:{{.creatorID}}\",\n },\n AttributesWrite: []string{\n \"organization:{{.organizationID}}$public|boolean:false\",\n },\n },\n },\n },\n },\n})"
355
+ },
356
+ {
357
+ "label": "node",
358
+ "lang": "javascript",
359
+ "source": "client.bundle.write({\n tenantId: \"t1\",\n bundles: [\n {\n name: \"organization_created\",\n arguments: [\n \"creatorID\",\n \"organizationID\",\n ],\n operations: [\n {\n relationships_write: [\n \"organization:{{.organizationID}}#admin@user:{{.creatorID}}\",\n \"organization:{{.organizationID}}#manager@user:{{.creatorID}}\",\n ],\n attributes_write: [\n \"organization:{{.organizationID}}$public|boolean:false\",\n ]\n }\n ]\n }\n ]\n}).then((response) =\u003e {\n // handle response\n})"
360
+ },
361
+ {
362
+ "label": "cURL",
363
+ "lang": "curl",
364
+ "source": "curl --location --request POST 'localhost:3476/v1/tenants/{tenant_id}/bundle/write' \\\n--header 'Content-Type: application/json' \\\n--data-raw '{\n \"bundles\": [\n {\n \"name\": \"organization_created\",\n \"arguments\": [\n \"creatorID\",\n \"organizationID\"\n ],\n \"operations\": [\n {\n \"relationships_write\": [\n \"organization:{{.organizationID}}#admin@user:{{.creatorID}}\",\n \"organization:{{.organizationID}}#manager@user:{{.creatorID}}\"\n ],\n \"attributes_write\": [\n \"organization:{{.organizationID}}$public|boolean:false\"\n ]\n }\n ]\n }\n ]\n}'"
365
+ }
366
+ ]
367
+ }
368
+ },
369
+ "/v1/tenants/{tenant_id}/data/attributes/read": {
370
+ "post": {
371
+ "summary": "read attributes",
372
+ "operationId": "data.attributes.read",
373
+ "responses": {
374
+ "200": {
375
+ "description": "A successful response.",
376
+ "schema": {
377
+ "$ref": "#/definitions/AttributeReadResponse"
378
+ }
379
+ },
380
+ "default": {
381
+ "description": "An unexpected error response.",
382
+ "schema": {
383
+ "$ref": "#/definitions/Status"
384
+ }
385
+ }
386
+ },
387
+ "parameters": [
388
+ {
389
+ "name": "tenant_id",
390
+ "description": "Identifier of the tenant, if you are not using multi-tenancy (have only one tenant) use pre-inserted tenant \u003ccode\u003et1\u003c/code\u003e for this field. Required, and must match the pattern \\“[a-zA-Z0-9-,]+\\“, max 64 bytes.",
391
+ "in": "path",
392
+ "required": true,
393
+ "type": "string"
394
+ },
395
+ {
396
+ "name": "body",
397
+ "in": "body",
398
+ "required": true,
399
+ "schema": {
400
+ "$ref": "#/definitions/ReadAttributesBody"
401
+ }
402
+ }
403
+ ],
404
+ "tags": [
405
+ "Data"
406
+ ],
407
+ "x-codeSamples": [
408
+ {
409
+ "label": "go",
410
+ "lang": "go",
411
+ "source": "rr, err := client.Data.ReadAttributes(context.Background(), \u0026v1.Data.AttributeReadRequest{\n TenantId: \"t1\",\n Metadata: \u0026v1.Data.AttributeReadRequestMetadata{\n SnapToken: \"\",\n },\n Filter: \u0026v1.AttributeFilter{\n Entity: \u0026v1.EntityFilter{\n Type: \"organization\",\n Ids: []string{\"1\"},\n },\n Attributes: []string{\"private\"},\n },\n})"
412
+ },
413
+ {
414
+ "label": "node",
415
+ "lang": "javascript",
416
+ "source": "client.data.readAttributes({\n tenantId: \"t1\",\n metadata: {\n snap_token: \"\",\n },\n filter: {\n entity: {\n type: \"organization\",\n ids: [\n \"1\"\n ]\n },\n attributes: [\n \"private\"\n ],\n }\n}).then((response) =\u003e {\n // handle response\n})"
417
+ },
418
+ {
419
+ "label": "cURL",
420
+ "lang": "curl",
421
+ "source": "curl --location --request POST 'localhost:3476/v1/tenants/{tenant_id}/data/attributes/read' \\\n--header 'Content-Type: application/json' \\\n--data-raw '{\n metadata: {\n snap_token: \"\",\n },\n filter: {\n entity: {\n type: \"organization\",\n ids: [\n \"1\"\n ]\n },\n attributes: [\n \"private\"\n ],\n }\n}'"
422
+ }
423
+ ]
424
+ }
425
+ },
426
+ "/v1/tenants/{tenant_id}/data/delete": {
427
+ "post": {
428
+ "summary": "delete data",
429
+ "operationId": "data.delete",
430
+ "responses": {
431
+ "200": {
432
+ "description": "A successful response.",
433
+ "schema": {
434
+ "$ref": "#/definitions/DataDeleteResponse"
435
+ }
436
+ },
437
+ "default": {
438
+ "description": "An unexpected error response.",
439
+ "schema": {
440
+ "$ref": "#/definitions/Status"
441
+ }
442
+ }
443
+ },
444
+ "parameters": [
445
+ {
446
+ "name": "tenant_id",
447
+ "description": "Identifier of the tenant, if you are not using multi-tenancy (have only one tenant) use pre-inserted tenant \u003ccode\u003et1\u003c/code\u003e for this field. Required, and must match the pattern \\“[a-zA-Z0-9-,]+\\“, max 64 bytes.",
448
+ "in": "path",
449
+ "required": true,
450
+ "type": "string"
451
+ },
452
+ {
453
+ "name": "body",
454
+ "in": "body",
455
+ "required": true,
456
+ "schema": {
457
+ "$ref": "#/definitions/Data.DeleteBody"
458
+ }
459
+ }
460
+ ],
461
+ "tags": [
462
+ "Data"
463
+ ],
464
+ "x-codeSamples": [
465
+ {
466
+ "label": "go",
467
+ "lang": "go",
468
+ "source": "rr, err := client.Data.Delete(context.Background(), \u0026v1.DataDeleteRequest{\n TenantId: \"t1\",\n Metadata: \u0026v1.DataDeleteRequestMetadata{\n SnapToken: \"\",\n },\n TupleFilter: \u0026v1.TupleFilter{\n Entity: \u0026v1.EntityFilter{\n Type: \"organization\",\n Ids: []string{\"1\"},\n },\n Relation: \"admin\",\n Subject: \u0026v1.SubjectFilter{\n Type: \"user\",\n Id: []string{\"1\"},\n Relation: \"\"\n }\n }\n})"
469
+ },
470
+ {
471
+ "label": "node",
472
+ "lang": "javascript",
473
+ "source": "client.data.delete({\n tenantId: \"t1\",\n metadata: {\n snap_token: \"\",\n },\n tupleFilter: {\n entity: {\n type: \"organization\",\n ids: [\n \"1\"\n ]\n },\n relation: \"admin\",\n subject: {\n type: \"user\",\n ids: [\n \"1\"\n ],\n relation: \"\"\n }\n }\n}).then((response) =\u003e {\n // handle response\n})"
474
+ },
475
+ {
476
+ "label": "cURL",
477
+ "lang": "curl",
478
+ "source": "curl --location --request POST 'localhost:3476/v1/tenants/{tenant_id}/data/delete' \\\n--header 'Content-Type: application/json' \\\n--data-raw '{\n \"tuple_filter\": {\n \"entity\": {\n \"type\": \"organization\",\n \"ids\": [\n \"1\"\n ]\n },\n \"relation\": \"admin\",\n \"subject\": {\n \"type\": \"user\",\n \"ids\": [\n \"1\"\n ],\n \"relation\": \"\"\n }\n },\n \"attribute_filter\": {}\n}'"
479
+ }
480
+ ]
481
+ }
482
+ },
483
+ "/v1/tenants/{tenant_id}/data/relationships/read": {
484
+ "post": {
485
+ "summary": "read relationships",
486
+ "operationId": "data.relationships.read",
487
+ "responses": {
488
+ "200": {
489
+ "description": "A successful response.",
490
+ "schema": {
491
+ "$ref": "#/definitions/RelationshipReadResponse"
492
+ }
493
+ },
494
+ "default": {
495
+ "description": "An unexpected error response.",
496
+ "schema": {
497
+ "$ref": "#/definitions/Status"
498
+ }
499
+ }
500
+ },
501
+ "parameters": [
502
+ {
503
+ "name": "tenant_id",
504
+ "description": "Identifier of the tenant, if you are not using multi-tenancy (have only one tenant) use pre-inserted tenant \u003ccode\u003et1\u003c/code\u003e for this field. Required, and must match the pattern \\“[a-zA-Z0-9-,]+\\“, max 64 bytes.",
505
+ "in": "path",
506
+ "required": true,
507
+ "type": "string"
508
+ },
509
+ {
510
+ "name": "body",
511
+ "in": "body",
512
+ "required": true,
513
+ "schema": {
514
+ "$ref": "#/definitions/ReadRelationshipsBody"
515
+ }
516
+ }
517
+ ],
518
+ "tags": [
519
+ "Data"
520
+ ],
521
+ "x-codeSamples": [
522
+ {
523
+ "label": "go",
524
+ "lang": "go",
525
+ "source": "rr, err := client.Data.ReadRelationships(context.Background(), \u0026v1.Data.RelationshipReadRequest{\n TenantId: \"t1\",\n Metadata: \u0026v1.Data.RelationshipReadRequestMetadata{\n SnapToken: \"\"\n },\n Filter: \u0026v1.TupleFilter{\n Entity: \u0026v1.EntityFilter{\n Type: \"organization\",\n Ids: []string{\"1\"},\n },\n Relation: \"member\",\n Subject: \u0026v1.SubjectFilter{\n Type: \"\",\n Id: []string{\"\"},\n Relation: \"\"\n }\n }\n})"
526
+ },
527
+ {
528
+ "label": "node",
529
+ "lang": "javascript",
530
+ "source": "client.data.readRelationships({\n tenantId: \"t1\",\n metadata: {\n snap_token: \"\",\n },\n filter: {\n entity: {\n type: \"organization\",\n ids: [\n \"1\"\n ]\n },\n relation: \"member\",\n subject: {\n type: \"\",\n ids: [],\n relation: \"\"\n }\n }\n}).then((response) =\u003e {\n // handle response\n})"
531
+ },
532
+ {
533
+ "label": "cURL",
534
+ "lang": "curl",
535
+ "source": "curl --location --request POST 'localhost:3476/v1/tenants/{tenant_id}/data/relationships/read' \\\n--header 'Content-Type: application/json' \\\n--data-raw '{\n metadata: {\n snap_token: \"\",\n },\n filter: {\n entity: {\n type: \"organization\",\n ids: [\n \"1\"\n ]\n },\n relation: \"member\",\n subject: {\n type: \"\",\n ids: [],\n relation: \"\"\n }\n }\n}'"
536
+ }
537
+ ]
538
+ }
539
+ },
540
+ "/v1/tenants/{tenant_id}/data/run-bundle": {
541
+ "post": {
542
+ "summary": "run bundle",
543
+ "operationId": "bundle.run",
544
+ "responses": {
545
+ "200": {
546
+ "description": "A successful response.",
547
+ "schema": {
548
+ "$ref": "#/definitions/BundleRunResponse"
549
+ }
550
+ },
551
+ "default": {
552
+ "description": "An unexpected error response.",
553
+ "schema": {
554
+ "$ref": "#/definitions/Status"
555
+ }
556
+ }
557
+ },
558
+ "parameters": [
559
+ {
560
+ "name": "tenant_id",
561
+ "description": "Identifier of the tenant, if you are not using multi-tenancy (have only one tenant) use pre-inserted tenant \u003ccode\u003et1\u003c/code\u003e for this field. Required, and must match the pattern \\“[a-zA-Z0-9-,]+\\“, max 64 bytes.",
562
+ "in": "path",
563
+ "required": true,
564
+ "type": "string"
565
+ },
566
+ {
567
+ "name": "body",
568
+ "in": "body",
569
+ "required": true,
570
+ "schema": {
571
+ "$ref": "#/definitions/RunBundleBody"
572
+ }
573
+ }
574
+ ],
575
+ "tags": [
576
+ "Data"
577
+ ],
578
+ "x-codeSamples": [
579
+ {
580
+ "label": "go",
581
+ "lang": "go",
582
+ "source": "rr, err := client.Data.RunBundle(context.Background(), \u0026v1.BundleRunRequest{\n TenantId: \"t1\",\n Name: \"organization_created\",\n Arguments: map[string]string{\n \"creatorID\": \"564\",\n \"organizationID\": \"789\",\n },\n})"
583
+ },
584
+ {
585
+ "label": "node",
586
+ "lang": "javascript",
587
+ "source": "client.data.runBundle({\n tenantId: \"t1\",\n name: \"organization_created\",\n arguments: {\n creatorID: \"564\",\n organizationID: \"789\",\n }\n}).then((response) =\u003e {\n // handle response\n})"
588
+ },
589
+ {
590
+ "label": "cURL",
591
+ "lang": "curl",
592
+ "source": "curl --location --request POST 'localhost:3476/v1/tenants/{tenant_id}/data/run-bundle' \\\n--header 'Content-Type: application/json' \\\n--data-raw '{\n \"name\": \"organization_created\",\n \"arguments\": {\n \"creatorID\": \"564\",\n \"organizationID\": \"789\"\n }\n}'"
593
+ }
594
+ ]
595
+ }
596
+ },
597
+ "/v1/tenants/{tenant_id}/data/write": {
598
+ "post": {
599
+ "summary": "write data",
600
+ "operationId": "data.write",
601
+ "responses": {
602
+ "200": {
603
+ "description": "A successful response.",
604
+ "schema": {
605
+ "$ref": "#/definitions/DataWriteResponse"
606
+ }
607
+ },
608
+ "default": {
609
+ "description": "An unexpected error response.",
610
+ "schema": {
611
+ "$ref": "#/definitions/Status"
612
+ }
613
+ }
614
+ },
615
+ "parameters": [
616
+ {
617
+ "name": "tenant_id",
618
+ "description": "Identifier of the tenant, if you are not using multi-tenancy (have only one tenant) use pre-inserted tenant \u003ccode\u003et1\u003c/code\u003e for this field. Required, and must match the pattern \\“[a-zA-Z0-9-,]+\\“, max 64 bytes.",
619
+ "in": "path",
620
+ "required": true,
621
+ "type": "string"
622
+ },
623
+ {
624
+ "name": "body",
625
+ "in": "body",
626
+ "required": true,
627
+ "schema": {
628
+ "$ref": "#/definitions/Data.WriteBody"
629
+ }
630
+ }
631
+ ],
632
+ "tags": [
633
+ "Data"
634
+ ],
635
+ "x-codeSamples": [
636
+ {
637
+ "label": "go",
638
+ "lang": "go",
639
+ "source": "// Convert the wrapped attribute value into Any proto message\nvalue, err := anypb.New(\u0026v1.BooleanValue{\n Data: true,\n})\nif err != nil {\n // Handle error\n}\n\ncr, err := client.Data.Write(context.Background(), \u0026v1.DataWriteRequest{\n TenantId: \"t1\",\n Metadata: \u0026v1.DataWriteRequestMetadata{\n SchemaVersion: \"\",\n },\n Tuples: []*v1.Tuple{\n {\n Entity: \u0026v1.Entity{\n Type: \"document\",\n Id: \"1\",\n },\n Relation: \"editor\",\n Subject: \u0026v1.Subject{\n Type: \"user\",\n Id: \"1\",\n Relation: \"\",\n },\n },\n },\n Attributes: []*v1.Attribute{\n {\n Entity: \u0026v1.Entity{\n Type: \"document\",\n Id: \"1\",\n },\n Attribute: \"is_private\",\n Value: value,\n },\n },\n})"
640
+ },
641
+ {
642
+ "label": "node",
643
+ "lang": "javascript",
644
+ "source": "const booleanValue = BooleanValue.fromJSON({ data: true });\n\nconst value = Any.fromJSON({\n typeUrl: 'type.googleapis.com/base.v1.BooleanValue',\n value: BooleanValue.encode(booleanValue).finish()\n});\n\nclient.data.write({\n tenantId: \"t1\",\n metadata: {\n schemaVersion: \"\"\n },\n tuples: [{\n entity: {\n type: \"document\",\n id: \"1\"\n },\n relation: \"editor\",\n subject: {\n type: \"user\",\n id: \"1\"\n }\n }],\n attributes: [{\n entity: {\n type: \"document\",\n id: \"1\"\n },\n attribute: \"is_private\",\n value: value,\n }]\n}).then((response) =\u003e {\n // handle response\n})"
645
+ },
646
+ {
647
+ "label": "cURL",
648
+ "lang": "curl",
649
+ "source": "curl --location --request POST 'localhost:3476/v1/tenants/{tenant_id}/data/write' \\\n--header 'Content-Type: application/json' \\\n--data-raw '{\n \"metadata\": {\n \"schema_version\": \"\"\n },\n \"tuples\": [\n {\n \"entity\": {\n \"type\": \"document\",\n \"id\": \"1\"\n },\n \"relation\": \"editor\",\n \"subject\": {\n \"type\": \"user\",\n \"id\": \"1\"\n }\n }\n ],\n \"attributes\": [\n {\n \"entity\": {\n \"type\": \"document\",\n \"id\": \"1\"\n },\n \"attribute\": \"is_private\",\n \"value\": {\n \"@type\": \"type.googleapis.com/base.v1.BooleanValue\",\n \"data\": true\n }\n }\n ]\n}'"
650
+ }
651
+ ]
652
+ }
653
+ },
654
+ "/v1/tenants/{tenant_id}/permissions/bulk-check": {
655
+ "post": {
656
+ "summary": "bulk check api",
657
+ "description": "Check multiple permissions in a single request. Maximum 100 requests allowed.",
658
+ "operationId": "permissions.bulk-check",
659
+ "responses": {
660
+ "200": {
661
+ "description": "A successful response.",
662
+ "schema": {
663
+ "$ref": "#/definitions/PermissionBulkCheckResponse"
664
+ }
665
+ },
666
+ "default": {
667
+ "description": "An unexpected error response.",
668
+ "schema": {
669
+ "$ref": "#/definitions/Status"
670
+ }
671
+ }
672
+ },
673
+ "parameters": [
674
+ {
675
+ "name": "tenant_id",
676
+ "description": "Identifier of the tenant, if you are not using multi-tenancy (have only one tenant) use pre-inserted tenant \u003ccode\u003et1\u003c/code\u003e for this field. Required, and must match the pattern \\“[a-zA-Z0-9-,]+\\“, max 64 bytes.",
677
+ "in": "path",
678
+ "required": true,
679
+ "type": "string"
680
+ },
681
+ {
682
+ "name": "body",
683
+ "in": "body",
684
+ "required": true,
685
+ "schema": {
686
+ "$ref": "#/definitions/BulkCheckBody"
687
+ }
688
+ }
689
+ ],
690
+ "tags": [
691
+ "Permission"
692
+ ]
693
+ }
694
+ },
695
+ "/v1/tenants/{tenant_id}/permissions/check": {
696
+ "post": {
697
+ "summary": "check api",
698
+ "operationId": "permissions.check",
699
+ "responses": {
700
+ "200": {
701
+ "description": "A successful response.",
702
+ "schema": {
703
+ "$ref": "#/definitions/PermissionCheckResponse"
704
+ }
705
+ },
706
+ "default": {
707
+ "description": "An unexpected error response.",
708
+ "schema": {
709
+ "$ref": "#/definitions/Status"
710
+ }
711
+ }
712
+ },
713
+ "parameters": [
714
+ {
715
+ "name": "tenant_id",
716
+ "description": "Identifier of the tenant, if you are not using multi-tenancy (have only one tenant) use pre-inserted tenant \u003ccode\u003et1\u003c/code\u003e for this field. Required, and must match the pattern \\“[a-zA-Z0-9-,]+\\“, max 64 bytes.",
717
+ "in": "path",
718
+ "required": true,
719
+ "type": "string"
720
+ },
721
+ {
722
+ "name": "body",
723
+ "in": "body",
724
+ "required": true,
725
+ "schema": {
726
+ "$ref": "#/definitions/CheckBody"
727
+ }
728
+ }
729
+ ],
730
+ "tags": [
731
+ "Permission"
732
+ ],
733
+ "x-codeSamples": [
734
+ {
735
+ "label": "go",
736
+ "lang": "go",
737
+ "source": "cr, err := client.Permission.Check(context.Background(), \u0026v1.PermissionCheckRequest {\n TenantId: \"t1\",\n Metadata: \u0026v1.PermissionCheckRequestMetadata {\n SnapToken: \"\",\n SchemaVersion: \"\",\n Depth: 20,\n },\n Entity: \u0026v1.Entity {\n Type: \"repository\",\n Id: \"1\",\n },\n Permission: \"edit\",\n Subject: \u0026v1.Subject {\n Type: \"user\",\n Id: \"1\",\n },\n})\nif cr.Can == v1.PermissionCheckResponse_Result_RESULT_ALLOWED {\n // RESULT_ALLOWED\n} else {\n // RESULT_DENIED\n}"
738
+ },
739
+ {
740
+ "label": "node",
741
+ "lang": "javascript",
742
+ "source": "client.permission.check({\n tenantId: \"t1\", \n metadata: {\n snapToken: \"\",\n schemaVersion: \"\",\n depth: 20\n },\n entity: {\n type: \"repository\",\n id: \"1\"\n },\n permission: \"edit\",\n subject: {\n type: \"user\",\n id: \"1\"\n }\n}).then((response) =\u003e {\n if (response.can === PermissionCheckResponse_Result.RESULT_ALLOWED) {\n console.log(\"RESULT_ALLOWED\")\n } else {\n console.log(\"RESULT_DENIED\")\n }\n})"
743
+ },
744
+ {
745
+ "label": "cURL",
746
+ "lang": "curl",
747
+ "source": "curl --location --request POST 'localhost:3476/v1/tenants/{tenant_id}/permissions/check' \\\n--header 'Content-Type: application/json' \\\n--data-raw '{\n \"metadata\": {\n \"snap_token\": \"\",\n \"schema_version\": \"\",\n \"depth\": 20\n },\n \"entity\": {\n \"type\": \"repository\",\n \"id\": \"1\"\n },\n \"permission\": \"edit\",\n \"subject\": {\n \"type\": \"user\",\n \"id\": \"1\",\n \"relation\": \"\"\n }\n}'"
748
+ }
749
+ ]
750
+ }
751
+ },
752
+ "/v1/tenants/{tenant_id}/permissions/expand": {
753
+ "post": {
754
+ "summary": "expand api",
755
+ "operationId": "permissions.expand",
756
+ "responses": {
757
+ "200": {
758
+ "description": "A successful response.",
759
+ "schema": {
760
+ "$ref": "#/definitions/PermissionExpandResponse"
761
+ }
762
+ },
763
+ "default": {
764
+ "description": "An unexpected error response.",
765
+ "schema": {
766
+ "$ref": "#/definitions/Status"
767
+ }
768
+ }
769
+ },
770
+ "parameters": [
771
+ {
772
+ "name": "tenant_id",
773
+ "description": "Identifier of the tenant, if you are not using multi-tenancy (have only one tenant) use pre-inserted tenant \u003ccode\u003et1\u003c/code\u003e for this field. Required, and must match the pattern \\“[a-zA-Z0-9-,]+\\“, max 64 bytes.",
774
+ "in": "path",
775
+ "required": true,
776
+ "type": "string"
777
+ },
778
+ {
779
+ "name": "body",
780
+ "in": "body",
781
+ "required": true,
782
+ "schema": {
783
+ "$ref": "#/definitions/Permission.ExpandBody"
784
+ }
785
+ }
786
+ ],
787
+ "tags": [
788
+ "Permission"
789
+ ],
790
+ "x-codeSamples": [
791
+ {
792
+ "label": "go",
793
+ "lang": "go",
794
+ "source": "cr, err := client.Permission.Expand(context.Background(), \u0026v1.PermissionExpandRequest{\n TenantId: \"t1\",\n Metadata: \u0026v1.PermissionExpandRequestMetadata{\n SnapToken: \"\",\n SchemaVersion: \"\",\n },\n Entity: \u0026v1.Entity{\n Type: \"repository\",\n Id: \"1\",\n },\n Permission: \"push\",\n})"
795
+ },
796
+ {
797
+ "label": "node",
798
+ "lang": "javascript",
799
+ "source": "client.permission.expand({\n tenantId: \"t1\",\n metadata: {\n snapToken: \"\",\n schemaVersion: \"\"\n },\n entity: {\n type: \"repository\",\n id: \"1\"\n },\n permission: \"push\",\n})"
800
+ },
801
+ {
802
+ "label": "cURL",
803
+ "lang": "curl",
804
+ "source": "curl --location --request POST 'localhost:3476/v1/tenants/{tenant_id}/permissions/expand' \\\n--header 'Content-Type: application/json' \\\n--data-raw '{\n \"metadata\": {\n \"schema_version\": \"\",\n \"snap_token\": \"\"\n },\n \"entity\": {\n \"type\": \"repository\",\n \"id\": \"1\"\n },\n \"permission\": \"push\"\n}'"
805
+ }
806
+ ]
807
+ }
808
+ },
809
+ "/v1/tenants/{tenant_id}/permissions/lookup-entity": {
810
+ "post": {
811
+ "summary": "lookup entity",
812
+ "operationId": "permissions.lookupEntity",
813
+ "responses": {
814
+ "200": {
815
+ "description": "A successful response.",
816
+ "schema": {
817
+ "$ref": "#/definitions/PermissionLookupEntityResponse"
818
+ }
819
+ },
820
+ "default": {
821
+ "description": "An unexpected error response.",
822
+ "schema": {
823
+ "$ref": "#/definitions/Status"
824
+ }
825
+ }
826
+ },
827
+ "parameters": [
828
+ {
829
+ "name": "tenant_id",
830
+ "description": "Identifier of the tenant, if you are not using multi-tenancy (have only one tenant) use pre-inserted tenant \u003ccode\u003et1\u003c/code\u003e for this field. Required, and must match the pattern \\“[a-zA-Z0-9-,]+\\“, max 64 bytes.",
831
+ "in": "path",
832
+ "required": true,
833
+ "type": "string"
834
+ },
835
+ {
836
+ "name": "body",
837
+ "in": "body",
838
+ "required": true,
839
+ "schema": {
840
+ "$ref": "#/definitions/LookupEntityBody"
841
+ }
842
+ }
843
+ ],
844
+ "tags": [
845
+ "Permission"
846
+ ],
847
+ "x-codeSamples": [
848
+ {
849
+ "label": "go",
850
+ "lang": "go",
851
+ "source": "cr, err := client.Permission.LookupEntity(context.Background(), \u0026v1.PermissionLookupEntityRequest{\n TenantId: \"t1\",\n Metadata: \u0026v1.PermissionLookupEntityRequestMetadata{\n SnapToken: \"\",\n SchemaVersion: \"\",\n Depth: 20,\n },\n EntityType: \"document\",\n Permission: \"edit\",\n Subject: \u0026v1.Subject{\n Type: \"user\",\n Id: \"1\",\n }\n PageSize: 20,\n ContinuousToken: \"\",\n})"
852
+ },
853
+ {
854
+ "label": "node",
855
+ "lang": "javascript",
856
+ "source": "client.permission.lookupEntity({\n tenantId: \"t1\",\n metadata: {\n snapToken: \"\",\n schemaVersion: \"\",\n depth: 20\n },\n entity_type: \"document\",\n permission: \"edit\",\n subject: {\n type: \"user\",\n id: \"1\"\n },\n page_size: 20,\n continuous_token: \"\"\n}).then((response) =\u003e {\n console.log(response.entity_ids)\n})"
857
+ },
858
+ {
859
+ "label": "cURL",
860
+ "lang": "curl",
861
+ "source": "curl --location --request POST 'localhost:3476/v1/tenants/{tenant_id}/permissions/lookup-entity' \\\n--header 'Content-Type: application/json' \\\n--data-raw '{\n \"metadata\":{\n \"snap_token\": \"\",\n \"schema_version\": \"\",\n \"depth\": 20\n },\n \"entity_type\": \"document\",\n \"permission\": \"edit\",\n \"subject\": {\n \"type\":\"user\",\n \"id\":\"1\"\n },\n \"page_size\": 20,\n \"continuous_token\": \"\",\n}'"
862
+ }
863
+ ]
864
+ }
865
+ },
866
+ "/v1/tenants/{tenant_id}/permissions/lookup-entity-stream": {
867
+ "post": {
868
+ "summary": "lookup entity stream",
869
+ "operationId": "permissions.lookupEntityStream",
870
+ "responses": {
871
+ "200": {
872
+ "description": "A successful response.(streaming responses)",
873
+ "schema": {
874
+ "type": "object",
875
+ "properties": {
876
+ "result": {
877
+ "$ref": "#/definitions/PermissionLookupEntityStreamResponse"
878
+ },
879
+ "error": {
880
+ "$ref": "#/definitions/Status"
881
+ }
882
+ },
883
+ "title": "Stream result of PermissionLookupEntityStreamResponse"
884
+ }
885
+ },
886
+ "default": {
887
+ "description": "An unexpected error response.",
888
+ "schema": {
889
+ "$ref": "#/definitions/Status"
890
+ }
891
+ }
892
+ },
893
+ "parameters": [
894
+ {
895
+ "name": "tenant_id",
896
+ "description": "Identifier of the tenant, if you are not using multi-tenancy (have only one tenant) use pre-inserted tenant \u003ccode\u003et1\u003c/code\u003e for this field. Required, and must match the pattern \\“[a-zA-Z0-9-,]+\\“, max 64 bytes.",
897
+ "in": "path",
898
+ "required": true,
899
+ "type": "string"
900
+ },
901
+ {
902
+ "name": "body",
903
+ "in": "body",
904
+ "required": true,
905
+ "schema": {
906
+ "$ref": "#/definitions/LookupEntityStreamBody"
907
+ }
908
+ }
909
+ ],
910
+ "tags": [
911
+ "Permission"
912
+ ],
913
+ "x-codeSamples": [
914
+ {
915
+ "label": "go",
916
+ "lang": "go",
917
+ "source": "str, err := client.Permission.LookupEntityStream(context.Background(), \u0026v1.PermissionLookupEntityRequest{\n Metadata: \u0026v1.PermissionLookupEntityRequestMetadata{\n SnapToken: \"\",\n SchemaVersion: \"\",\n Depth: 50,\n },\n EntityType: \"document\",\n Permission: \"view\",\n Subject: \u0026v1.Subject{\n Type: \"user\",\n Id: \"1\",\n },\n PageSize: 20,\n ContinuousToken: \"\",\n})\n\n// handle stream response\nfor {\n res, err := str.Recv()\n\n if err == io.EOF {\n break\n }\n\n // res.EntityId\n}"
918
+ },
919
+ {
920
+ "label": "node",
921
+ "lang": "javascript",
922
+ "source": "const permify = require(\"@permify/permify-node\");\nconst {PermissionLookupEntityStreamResponse} = require(\"@permify/permify-node/dist/src/grpc/generated/base/v1/service\");\n\nfunction main() {\n const client = new permify.grpc.newClient({\n endpoint: \"localhost:3478\",\n });\n\n let res = client.permission.lookupEntityStream({\n metadata: {\n snapToken: \"\",\n schemaVersion: \"\",\n depth: 20\n },\n entityType: \"document\",\n permission: \"view\",\n subject: {\n type: \"user\",\n id: \"1\"\n },\n page_size: 20,\n continuous_token: \"\"\n });\n\n handle(res);\n}\n\nasync function handle(res: AsyncIterable\u003cPermissionLookupEntityStreamResponse\u003e) {\n for await (const response of res) {\n // response.entityId\n }\n}"
923
+ }
924
+ ]
925
+ }
926
+ },
927
+ "/v1/tenants/{tenant_id}/permissions/lookup-subject": {
928
+ "post": {
929
+ "summary": "lookup-subject",
930
+ "operationId": "permissions.lookupSubject",
931
+ "responses": {
932
+ "200": {
933
+ "description": "A successful response.",
934
+ "schema": {
935
+ "$ref": "#/definitions/PermissionLookupSubjectResponse"
936
+ }
937
+ },
938
+ "default": {
939
+ "description": "An unexpected error response.",
940
+ "schema": {
941
+ "$ref": "#/definitions/Status"
942
+ }
943
+ }
944
+ },
945
+ "parameters": [
946
+ {
947
+ "name": "tenant_id",
948
+ "description": "Identifier of the tenant, if you are not using multi-tenancy (have only one tenant) use pre-inserted tenant \u003ccode\u003et1\u003c/code\u003e for this field. Required, and must match the pattern \\“[a-zA-Z0-9-,]+\\“, max 64 bytes.",
949
+ "in": "path",
950
+ "required": true,
951
+ "type": "string"
952
+ },
953
+ {
954
+ "name": "body",
955
+ "in": "body",
956
+ "required": true,
957
+ "schema": {
958
+ "$ref": "#/definitions/LookupSubjectBody"
959
+ }
960
+ }
961
+ ],
962
+ "tags": [
963
+ "Permission"
964
+ ],
965
+ "x-codeSamples": [
966
+ {
967
+ "label": "go",
968
+ "lang": "go",
969
+ "source": "cr, err := client.Permission.LookupSubject(context.Background(), \u0026v1.PermissionLookupSubjectRequest{\n TenantId: \"t1\",\n Metadata: \u0026v1.PermissionLookupSubjectRequestMetadata{\n SnapToken: \"\",\n SchemaVersion: \"\",\n Depth: 20,\n },\n Entity: \u0026v1.Entity{\n Type: \"document\",\n Id: \"1\",\n },\n Permission: \"edit\",\n SubjectReference: \u0026v1.RelationReference{\n Type: \"user\",\n Relation: \"\",\n },\n PageSize: 20,\n ContinuousToken: \"\",\n})"
970
+ },
971
+ {
972
+ "label": "node",
973
+ "lang": "javascript",
974
+ "source": "client.permission.lookupSubject({\n tenantId: \"t1\",\n metadata: {\n snapToken: \"\",\n schemaVersion: \"\",\n depth: 20,\n },\n entity: {\n type: \"document\",\n id: \"1\",\n },\n permission: \"edit\",\n subject_reference: {\n type: \"user\",\n relation: \"\"\n },\n page_size: 10,\n continuous_token: \"\"\n}).then((response) =\u003e {\n console.log(response.subject_ids)\n})"
975
+ },
976
+ {
977
+ "label": "cURL",
978
+ "lang": "curl",
979
+ "source": "curl --location --request POST 'localhost:3476/v1/tenants/{tenant_id}/permissions/lookup-subject' \\\n--header 'Content-Type: application/json' \\\n--data-raw '{\n \"metadata\":{\n \"snap_token\": \"\",\n \"schema_version\": \"\",\n \"depth\": 20,\n },\n \"entity\": {\n \"type\": \"document\",\n \"id\": \"1\"\n },\n \"permission\": \"edit\",\n \"subject_reference\": {\n \"type\": \"user\",\n \"relation\": \"\"\n },\n page_size: 20,\n continuous_token: \"\"\n}'"
980
+ }
981
+ ]
982
+ }
983
+ },
984
+ "/v1/tenants/{tenant_id}/permissions/subject-permission": {
985
+ "post": {
986
+ "summary": "subject permission",
987
+ "operationId": "permissions.subjectPermission",
988
+ "responses": {
989
+ "200": {
990
+ "description": "A successful response.",
991
+ "schema": {
992
+ "$ref": "#/definitions/PermissionSubjectPermissionResponse"
993
+ }
994
+ },
995
+ "default": {
996
+ "description": "An unexpected error response.",
997
+ "schema": {
998
+ "$ref": "#/definitions/Status"
999
+ }
1000
+ }
1001
+ },
1002
+ "parameters": [
1003
+ {
1004
+ "name": "tenant_id",
1005
+ "description": "Identifier of the tenant, if you are not using multi-tenancy (have only one tenant) use pre-inserted tenant \u003ccode\u003et1\u003c/code\u003e for this field. Required, and must match the pattern \\“[a-zA-Z0-9-,]+\\“, max 64 bytes.",
1006
+ "in": "path",
1007
+ "required": true,
1008
+ "type": "string"
1009
+ },
1010
+ {
1011
+ "name": "body",
1012
+ "in": "body",
1013
+ "required": true,
1014
+ "schema": {
1015
+ "$ref": "#/definitions/SubjectPermissionBody"
1016
+ }
1017
+ }
1018
+ ],
1019
+ "tags": [
1020
+ "Permission"
1021
+ ],
1022
+ "x-codeSamples": [
1023
+ {
1024
+ "label": "go",
1025
+ "lang": "go",
1026
+ "source": "cr, err := client.Permission.SubjectPermission(context.Background(), \u0026v1.PermissionSubjectPermissionRequest{\n TenantId: \"t1\",\n Metadata: \u0026v1.PermissionSubjectPermissionRequestMetadata{\n SnapToken: \"\",\n SchemaVersion: \"\",\n OnlyPermission: false,\n Depth: 20,\n },\n Entity: \u0026v1.Entity{\n Type: \"repository\",\n Id: \"1\",\n },\n Subject: \u0026v1.Subject{\n Type: \"user\",\n Id: \"1\",\n },\n})"
1027
+ },
1028
+ {
1029
+ "label": "node",
1030
+ "lang": "javascript",
1031
+ "source": "client.permission.subjectPermission({\n tenantId: \"t1\",\n metadata: {\n snapToken: \"\",\n schemaVersion: \"\",\n onlyPermission: true,\n depth: 20\n },\n entity: {\n type: \"repository\",\n id: \"1\"\n },\n subject: {\n type: \"user\",\n id: \"1\"\n }\n}).then((response) =\u003e {\n console.log(response);\n})"
1032
+ },
1033
+ {
1034
+ "label": "cURL",
1035
+ "lang": "curl",
1036
+ "source": "curl --location --request POST 'localhost:3476/v1/tenants/{tenant_id}/permissions/subject-permission' \\\n--header 'Content-Type: application/json' \\\n--data-raw '{\n \"metadata\":{\n \"snap_token\": \"\",\n \"schema_version\": \"\",\n \"only_permission\": true,\n \"depth\": 20\n },\n \"entity\": {\n \"type\": \"repository\",\n \"id\": \"1\"\n },\n \"subject\": {\n \"type\": \"user\",\n \"id\": \"1\",\n \"relation\": \"\"\n }\n}'"
1037
+ }
1038
+ ]
1039
+ }
1040
+ },
1041
+ "/v1/tenants/{tenant_id}/relationships/delete": {
1042
+ "post": {
1043
+ "summary": "delete relationships",
1044
+ "operationId": "relationships.delete",
1045
+ "responses": {
1046
+ "200": {
1047
+ "description": "A successful response.",
1048
+ "schema": {
1049
+ "$ref": "#/definitions/RelationshipDeleteResponse"
1050
+ }
1051
+ },
1052
+ "default": {
1053
+ "description": "An unexpected error response.",
1054
+ "schema": {
1055
+ "$ref": "#/definitions/Status"
1056
+ }
1057
+ }
1058
+ },
1059
+ "parameters": [
1060
+ {
1061
+ "name": "tenant_id",
1062
+ "description": "Identifier of the tenant, if you are not using multi-tenancy (have only one tenant) use pre-inserted tenant \u003ccode\u003et1\u003c/code\u003e for this field. Required, and must match the pattern \\“[a-zA-Z0-9-,]+\\“, max 64 bytes.",
1063
+ "in": "path",
1064
+ "required": true,
1065
+ "type": "string"
1066
+ },
1067
+ {
1068
+ "name": "body",
1069
+ "in": "body",
1070
+ "required": true,
1071
+ "schema": {
1072
+ "$ref": "#/definitions/DeleteRelationshipsBody"
1073
+ }
1074
+ }
1075
+ ],
1076
+ "tags": [
1077
+ "Data"
1078
+ ]
1079
+ }
1080
+ },
1081
+ "/v1/tenants/{tenant_id}/relationships/write": {
1082
+ "post": {
1083
+ "summary": "write relationships",
1084
+ "operationId": "relationships.write",
1085
+ "responses": {
1086
+ "200": {
1087
+ "description": "A successful response.",
1088
+ "schema": {
1089
+ "$ref": "#/definitions/RelationshipWriteResponse"
1090
+ }
1091
+ },
1092
+ "default": {
1093
+ "description": "An unexpected error response.",
1094
+ "schema": {
1095
+ "$ref": "#/definitions/Status"
1096
+ }
1097
+ }
1098
+ },
1099
+ "parameters": [
1100
+ {
1101
+ "name": "tenant_id",
1102
+ "description": "Identifier of the tenant, if you are not using multi-tenancy (have only one tenant) use pre-inserted tenant \u003ccode\u003et1\u003c/code\u003e for this field. Required, and must match the pattern \\“[a-zA-Z0-9-,]+\\“, max 64 bytes.",
1103
+ "in": "path",
1104
+ "required": true,
1105
+ "type": "string"
1106
+ },
1107
+ {
1108
+ "name": "body",
1109
+ "in": "body",
1110
+ "required": true,
1111
+ "schema": {
1112
+ "$ref": "#/definitions/WriteRelationshipsBody"
1113
+ }
1114
+ }
1115
+ ],
1116
+ "tags": [
1117
+ "Data"
1118
+ ]
1119
+ }
1120
+ },
1121
+ "/v1/tenants/{tenant_id}/schemas/list": {
1122
+ "post": {
1123
+ "summary": "list schema",
1124
+ "operationId": "schemas.list",
1125
+ "responses": {
1126
+ "200": {
1127
+ "description": "A successful response.",
1128
+ "schema": {
1129
+ "$ref": "#/definitions/SchemaListResponse"
1130
+ }
1131
+ },
1132
+ "default": {
1133
+ "description": "An unexpected error response.",
1134
+ "schema": {
1135
+ "$ref": "#/definitions/Status"
1136
+ }
1137
+ }
1138
+ },
1139
+ "parameters": [
1140
+ {
1141
+ "name": "tenant_id",
1142
+ "description": "Identifier of the tenant, if you are not using multi-tenancy (have only one tenant) use pre-inserted tenant \u003ccode\u003et1\u003c/code\u003e for this field. Required, and must match the pattern \\“[a-zA-Z0-9-,]+\\“, max 64 bytes.",
1143
+ "in": "path",
1144
+ "required": true,
1145
+ "type": "string"
1146
+ },
1147
+ {
1148
+ "name": "body",
1149
+ "in": "body",
1150
+ "required": true,
1151
+ "schema": {
1152
+ "$ref": "#/definitions/Schema.ListBody"
1153
+ }
1154
+ }
1155
+ ],
1156
+ "tags": [
1157
+ "Schema"
1158
+ ],
1159
+ "x-codeSamples": [
1160
+ {
1161
+ "label": "go",
1162
+ "lang": "go",
1163
+ "source": "sr, err := client.Schema.List(context.Background(), \u0026v1.SchemaListRequest{\n TenantId: \"t1\",\n PageSize: 20,\n ContinuousToken: \"\",\n})"
1164
+ },
1165
+ {
1166
+ "label": "node",
1167
+ "lang": "javascript",
1168
+ "source": "let res = client.schema.list({\n tenantId: \"t1\",\n continuousToken: \"\"\n})"
1169
+ },
1170
+ {
1171
+ "label": "cURL",
1172
+ "lang": "curl",
1173
+ "source": "curl --location --request POST 'localhost:3476/v1/tenants/{tenant_id}/schemas/list' \\\n--header 'Content-Type: application/json' \\\n--data-raw '{\n \"page_size\": 20,\n \"continuous_token\": \"\"\n}'"
1174
+ }
1175
+ ]
1176
+ }
1177
+ },
1178
+ "/v1/tenants/{tenant_id}/schemas/partial-write": {
1179
+ "patch": {
1180
+ "summary": "partially update your authorization model",
1181
+ "operationId": "schemas.partial-write",
1182
+ "responses": {
1183
+ "200": {
1184
+ "description": "A successful response.",
1185
+ "schema": {
1186
+ "$ref": "#/definitions/SchemaPartialWriteResponse"
1187
+ }
1188
+ },
1189
+ "default": {
1190
+ "description": "An unexpected error response.",
1191
+ "schema": {
1192
+ "$ref": "#/definitions/Status"
1193
+ }
1194
+ }
1195
+ },
1196
+ "parameters": [
1197
+ {
1198
+ "name": "tenant_id",
1199
+ "description": "tenant_id is a string that identifies the tenant. It must match the pattern \"[a-zA-Z0-9-,]+\",\nbe a maximum of 64 bytes, and must not be empty.",
1200
+ "in": "path",
1201
+ "required": true,
1202
+ "type": "string"
1203
+ },
1204
+ {
1205
+ "name": "body",
1206
+ "in": "body",
1207
+ "required": true,
1208
+ "schema": {
1209
+ "$ref": "#/definitions/PartialWriteBody"
1210
+ }
1211
+ }
1212
+ ],
1213
+ "tags": [
1214
+ "Schema"
1215
+ ]
1216
+ }
1217
+ },
1218
+ "/v1/tenants/{tenant_id}/schemas/read": {
1219
+ "post": {
1220
+ "summary": "read schema",
1221
+ "operationId": "schemas.read",
1222
+ "responses": {
1223
+ "200": {
1224
+ "description": "A successful response.",
1225
+ "schema": {
1226
+ "$ref": "#/definitions/SchemaReadResponse"
1227
+ }
1228
+ },
1229
+ "default": {
1230
+ "description": "An unexpected error response.",
1231
+ "schema": {
1232
+ "$ref": "#/definitions/Status"
1233
+ }
1234
+ }
1235
+ },
1236
+ "parameters": [
1237
+ {
1238
+ "name": "tenant_id",
1239
+ "description": "Identifier of the tenant, if you are not using multi-tenancy (have only one tenant) use pre-inserted tenant \u003ccode\u003et1\u003c/code\u003e for this field. Required, and must match the pattern \\“[a-zA-Z0-9-,]+\\“, max 64 bytes.",
1240
+ "in": "path",
1241
+ "required": true,
1242
+ "type": "string"
1243
+ },
1244
+ {
1245
+ "name": "body",
1246
+ "in": "body",
1247
+ "required": true,
1248
+ "schema": {
1249
+ "$ref": "#/definitions/Schema.ReadBody"
1250
+ }
1251
+ }
1252
+ ],
1253
+ "tags": [
1254
+ "Schema"
1255
+ ],
1256
+ "x-codeSamples": [
1257
+ {
1258
+ "label": "go",
1259
+ "lang": "go",
1260
+ "source": "sr, err := client.Schema.Read(context.Background(), \u0026v1.SchemaReadRequest{\n TenantId: \"t1\",\n Metadata: \u0026v1.SchemaReadRequestMetadata{\n SchemaVersion: \"cnbe6se5fmal18gpc66g\",\n },\n})"
1261
+ },
1262
+ {
1263
+ "label": "node",
1264
+ "lang": "javascript",
1265
+ "source": "let res = client.schema.read({\n tenantId: \"t1\",\n metadata: {\n schemaVersion: swResponse.schemaVersion,\n },\n})"
1266
+ },
1267
+ {
1268
+ "label": "cURL",
1269
+ "lang": "curl",
1270
+ "source": "curl --location --request POST 'localhost:3476/v1/tenants/{tenant_id}/schemas/read' \\\n--header 'Content-Type: application/json' \\\n--data-raw '{\n \"metadata\": {\n \"schema_version\": \"cnbe6se5fmal18gpc66g\"\n }\n}'"
1271
+ }
1272
+ ]
1273
+ }
1274
+ },
1275
+ "/v1/tenants/{tenant_id}/schemas/write": {
1276
+ "post": {
1277
+ "summary": "write schema",
1278
+ "operationId": "schemas.write",
1279
+ "responses": {
1280
+ "200": {
1281
+ "description": "A successful response.",
1282
+ "schema": {
1283
+ "$ref": "#/definitions/SchemaWriteResponse"
1284
+ }
1285
+ },
1286
+ "default": {
1287
+ "description": "An unexpected error response.",
1288
+ "schema": {
1289
+ "$ref": "#/definitions/Status"
1290
+ }
1291
+ }
1292
+ },
1293
+ "parameters": [
1294
+ {
1295
+ "name": "tenant_id",
1296
+ "description": "Identifier of the tenant, if you are not using multi-tenancy (have only one tenant) use pre-inserted tenant \u003ccode\u003et1\u003c/code\u003e for this field. Required, and must match the pattern \\“[a-zA-Z0-9-,]+\\“, max 64 bytes.",
1297
+ "in": "path",
1298
+ "required": true,
1299
+ "type": "string"
1300
+ },
1301
+ {
1302
+ "name": "body",
1303
+ "in": "body",
1304
+ "required": true,
1305
+ "schema": {
1306
+ "$ref": "#/definitions/Schema.WriteBody"
1307
+ }
1308
+ }
1309
+ ],
1310
+ "tags": [
1311
+ "Schema"
1312
+ ],
1313
+ "x-codeSamples": [
1314
+ {
1315
+ "label": "go",
1316
+ "lang": "go",
1317
+ "source": "sr, err := client.Schema.Write(context.Background(), \u0026v1.SchemaWriteRequest{\n TenantId: \"t1\",\n Schema: `\n entity user {}\n\n entity organization {\n relation admin @user\n relation member @user\n\n action create_repository = (admin or member)\n action delete = admin\n }\n\n entity repository {\n relation owner @user\n relation parent @organization\n\n action push = owner\n action read = (owner and (parent.admin and parent.member))\n action delete = (parent.member and (parent.admin or owner))\n }\n `,\n})"
1318
+ },
1319
+ {
1320
+ "label": "node",
1321
+ "lang": "javascript",
1322
+ "source": "client.schema.write({\n tenantId: \"t1\",\n schema: `\n entity user {}\n\n entity organization {\n relation admin @user\n relation member @user\n\n action create_repository = (admin or member)\n action delete = admin\n }\n\n entity repository {\n relation owner @user\n relation parent @organization\n\n action push = owner\n action read = (owner and (parent.admin and parent.member))\n action delete = (parent.member and (parent.admin or owner))\n }\n `\n}).then((response) =\u003e {\n // handle response\n})"
1323
+ },
1324
+ {
1325
+ "label": "cURL",
1326
+ "lang": "curl",
1327
+ "source": "curl --location --request POST 'localhost:3476/v1/tenants/{tenant_id}/schemas/write' \\\n--header 'Content-Type: application/json' \\\n--data-raw '{\n \"schema\": \"entity user {}\\n\\n entity organization {\\n\\n relation admin @user\\n relation member @user\\n\\n action create_repository = (admin or member)\\n action delete = admin\\n }\\n\\n entity repository {\\n\\n relation owner @user\\n relation parent @organization\\n\\n action push = owner\\n action read = (owner and (parent.admin and parent.member))\\n action delete = (parent.member and (parent.admin or owner))\\n }\"\n}'"
1328
+ }
1329
+ ]
1330
+ }
1331
+ },
1332
+ "/v1/tenants/{tenant_id}/watch": {
1333
+ "post": {
1334
+ "summary": "watch changes",
1335
+ "operationId": "watch.watch",
1336
+ "responses": {
1337
+ "200": {
1338
+ "description": "A successful response.(streaming responses)",
1339
+ "schema": {
1340
+ "type": "object",
1341
+ "properties": {
1342
+ "result": {
1343
+ "$ref": "#/definitions/WatchResponse"
1344
+ },
1345
+ "error": {
1346
+ "$ref": "#/definitions/Status"
1347
+ }
1348
+ },
1349
+ "title": "Stream result of WatchResponse"
1350
+ }
1351
+ },
1352
+ "default": {
1353
+ "description": "An unexpected error response.",
1354
+ "schema": {
1355
+ "$ref": "#/definitions/Status"
1356
+ }
1357
+ }
1358
+ },
1359
+ "parameters": [
1360
+ {
1361
+ "name": "tenant_id",
1362
+ "description": "Identifier of the tenant, if you are not using multi-tenancy (have only one tenant) use pre-inserted tenant \u003ccode\u003et1\u003c/code\u003e for this field. Required, and must match the pattern \\“[a-zA-Z0-9-,]+\\“, max 64 bytes.",
1363
+ "in": "path",
1364
+ "required": true,
1365
+ "type": "string"
1366
+ },
1367
+ {
1368
+ "name": "body",
1369
+ "in": "body",
1370
+ "required": true,
1371
+ "schema": {
1372
+ "$ref": "#/definitions/WatchBody"
1373
+ }
1374
+ }
1375
+ ],
1376
+ "tags": [
1377
+ "Watch"
1378
+ ],
1379
+ "x-codeSamples": [
1380
+ {
1381
+ "label": "go",
1382
+ "lang": "go",
1383
+ "source": "cr, err := client.Watch.Watch(context.Background(), \u0026v1.WatchRequest{\n TenantId: \"t1\",\n SnapToken: \"\",\n})\n// handle stream response\nfor {\n res, err := cr.Recv()\n\n if err == io.EOF {\n break\n }\n\n // res.Changes\n}\n"
1384
+ },
1385
+ {
1386
+ "label": "node",
1387
+ "lang": "javascript",
1388
+ "source": "const permify = require(\"@permify/permify-node\");\nconst {WatchResponse} = require(\"@permify/permify-node/dist/src/grpc/generated/base/v1/service\");\n\nfunction main() {\n const client = new permify.grpc.newClient({\n endpoint: \"localhost:3478\",\n });\n\n let res = client.watch.watch({\n tenantId: \"t1\",\n snapToken: \"\"\n });\n\n handle(res);\n}\n\nasync function handle(res: AsyncIterable\u003cWatchResponse\u003e) {\n for await (const response of res) {\n // response.changes\n }\n}\n"
1389
+ }
1390
+ ]
1391
+ }
1392
+ }
1393
+ },
1394
+ "definitions": {
1395
+ "AbstractType": {
1396
+ "type": "object",
1397
+ "properties": {
1398
+ "name": {
1399
+ "type": "string",
1400
+ "description": "The fully qualified name of this abstract type."
1401
+ },
1402
+ "parameterTypes": {
1403
+ "type": "array",
1404
+ "items": {
1405
+ "type": "object",
1406
+ "$ref": "#/definitions/v1alpha1.Type"
1407
+ },
1408
+ "description": "Parameter types for this abstract type."
1409
+ }
1410
+ },
1411
+ "description": "Application defined abstract type."
1412
+ },
1413
+ "Any": {
1414
+ "type": "object",
1415
+ "properties": {
1416
+ "@type": {
1417
+ "type": "string",
1418
+ "description": "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n URL, or have them precompiled into a binary to avoid any\n lookup. Therefore, binary compatibility needs to be preserved\n on changes to types. (Use versioned type names to manage\n breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com. As of May 2023, there are no widely used type server\nimplementations and no plans to implement one.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics."
1419
+ }
1420
+ },
1421
+ "additionalProperties": {},
1422
+ "description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(\u0026foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := \u0026pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := \u0026pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": \u003cstring\u003e,\n \"lastName\": \u003cstring\u003e\n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }"
1423
+ },
1424
+ "Argument": {
1425
+ "type": "object",
1426
+ "properties": {
1427
+ "computedAttribute": {
1428
+ "$ref": "#/definitions/ComputedAttribute"
1429
+ }
1430
+ },
1431
+ "description": "Argument defines the type of argument in a Call. It can be either a ComputedAttribute or a ContextAttribute."
1432
+ },
1433
+ "Attribute": {
1434
+ "type": "object",
1435
+ "properties": {
1436
+ "entity": {
1437
+ "$ref": "#/definitions/Entity"
1438
+ },
1439
+ "attribute": {
1440
+ "type": "string",
1441
+ "title": "Name of the attribute"
1442
+ },
1443
+ "value": {
1444
+ "$ref": "#/definitions/Any"
1445
+ }
1446
+ },
1447
+ "description": "Attribute represents an attribute of an entity with a specific type and value."
1448
+ },
1449
+ "AttributeDefinition": {
1450
+ "type": "object",
1451
+ "properties": {
1452
+ "name": {
1453
+ "type": "string",
1454
+ "description": "The name of the attribute, which follows a specific string pattern and has a maximum byte size."
1455
+ },
1456
+ "type": {
1457
+ "$ref": "#/definitions/AttributeType",
1458
+ "description": "The type of the attribute."
1459
+ }
1460
+ },
1461
+ "description": "The AttributeDefinition message provides detailed information about a specific attribute."
1462
+ },
1463
+ "AttributeFilter": {
1464
+ "type": "object",
1465
+ "properties": {
1466
+ "entity": {
1467
+ "$ref": "#/definitions/EntityFilter"
1468
+ },
1469
+ "attributes": {
1470
+ "type": "array",
1471
+ "items": {
1472
+ "type": "string"
1473
+ },
1474
+ "title": "Names of the attributes to be filtered"
1475
+ }
1476
+ },
1477
+ "description": "AttributeFilter is used to filter attributes based on the entity and attribute names."
1478
+ },
1479
+ "AttributeReadRequestMetadata": {
1480
+ "type": "object",
1481
+ "properties": {
1482
+ "snap_token": {
1483
+ "type": "string",
1484
+ "description": "The snap token to avoid stale cache, see more details on [Snap Tokens](../../operations/snap-tokens)"
1485
+ }
1486
+ },
1487
+ "description": "AttributeReadRequestMetadata defines the structure for the metadata of an attribute read request.\nIt includes the snap_token associated with a particular state of the database."
1488
+ },
1489
+ "AttributeReadResponse": {
1490
+ "type": "object",
1491
+ "properties": {
1492
+ "attributes": {
1493
+ "type": "array",
1494
+ "items": {
1495
+ "type": "object",
1496
+ "$ref": "#/definitions/Attribute"
1497
+ },
1498
+ "description": "attributes is a list of the attributes retrieved in the read operation."
1499
+ },
1500
+ "continuous_token": {
1501
+ "type": "string",
1502
+ "description": "continuous_token is used in the case of paginated reads to retrieve the next page of results."
1503
+ }
1504
+ },
1505
+ "description": "AttributeReadResponse defines the structure of the response to an attribute read request.\nIt includes the attributes retrieved and a continuous token for handling result pagination."
1506
+ },
1507
+ "AttributeType": {
1508
+ "type": "string",
1509
+ "enum": [
1510
+ "ATTRIBUTE_TYPE_BOOLEAN",
1511
+ "ATTRIBUTE_TYPE_BOOLEAN_ARRAY",
1512
+ "ATTRIBUTE_TYPE_STRING",
1513
+ "ATTRIBUTE_TYPE_STRING_ARRAY",
1514
+ "ATTRIBUTE_TYPE_INTEGER",
1515
+ "ATTRIBUTE_TYPE_INTEGER_ARRAY",
1516
+ "ATTRIBUTE_TYPE_DOUBLE",
1517
+ "ATTRIBUTE_TYPE_DOUBLE_ARRAY"
1518
+ ],
1519
+ "description": "Enumerates the types of attribute.\n\n - ATTRIBUTE_TYPE_BOOLEAN: A boolean attribute type.\n - ATTRIBUTE_TYPE_BOOLEAN_ARRAY: A boolean array attribute type.\n - ATTRIBUTE_TYPE_STRING: A string attribute type.\n - ATTRIBUTE_TYPE_STRING_ARRAY: A string array attribute type.\n - ATTRIBUTE_TYPE_INTEGER: An integer attribute type.\n - ATTRIBUTE_TYPE_INTEGER_ARRAY: An integer array attribute type.\n - ATTRIBUTE_TYPE_DOUBLE: A double attribute type.\n - ATTRIBUTE_TYPE_DOUBLE_ARRAY: A double array attribute type."
1520
+ },
1521
+ "BulkCheckBody": {
1522
+ "type": "object",
1523
+ "properties": {
1524
+ "metadata": {
1525
+ "$ref": "#/definitions/PermissionCheckRequestMetadata",
1526
+ "description": "Metadata associated with this request, required."
1527
+ },
1528
+ "items": {
1529
+ "type": "array",
1530
+ "items": {
1531
+ "type": "object",
1532
+ "$ref": "#/definitions/PermissionBulkCheckRequestItem"
1533
+ },
1534
+ "description": "List of permission check requests, maximum 100 items."
1535
+ },
1536
+ "context": {
1537
+ "$ref": "#/definitions/Context",
1538
+ "description": "Contextual data that can be dynamically added to permission check requests. See details on [Contextual Data](../../operations/contextual-tuples)"
1539
+ },
1540
+ "arguments": {
1541
+ "type": "array",
1542
+ "items": {
1543
+ "type": "object",
1544
+ "$ref": "#/definitions/Argument"
1545
+ },
1546
+ "description": "Additional arguments associated with this request."
1547
+ }
1548
+ },
1549
+ "description": "PermissionBulkCheckRequest is the request message for the BulkCheck method in the Permission service."
1550
+ },
1551
+ "Bundle.DeleteBody": {
1552
+ "type": "object",
1553
+ "properties": {
1554
+ "name": {
1555
+ "type": "string",
1556
+ "description": "Name of the bundle to be deleted."
1557
+ }
1558
+ },
1559
+ "description": "BundleDeleteRequest is used to request the deletion of a bundle.\nIt contains the tenant_id to specify the tenant and the name of the bundle to be deleted."
1560
+ },
1561
+ "Bundle.ReadBody": {
1562
+ "type": "object",
1563
+ "properties": {
1564
+ "name": {
1565
+ "type": "string"
1566
+ }
1567
+ }
1568
+ },
1569
+ "Bundle.WriteBody": {
1570
+ "type": "object",
1571
+ "properties": {
1572
+ "bundles": {
1573
+ "type": "array",
1574
+ "items": {
1575
+ "type": "object",
1576
+ "$ref": "#/definitions/DataBundle"
1577
+ },
1578
+ "description": "Contains the bundle data to be written."
1579
+ }
1580
+ },
1581
+ "description": "BundleWriteRequest is used to request the writing of a bundle.\nIt contains the tenant_id to identify the tenant and the Bundles object."
1582
+ },
1583
+ "BundleDeleteResponse": {
1584
+ "type": "object",
1585
+ "properties": {
1586
+ "name": {
1587
+ "type": "string"
1588
+ }
1589
+ }
1590
+ },
1591
+ "BundleReadResponse": {
1592
+ "type": "object",
1593
+ "properties": {
1594
+ "bundle": {
1595
+ "$ref": "#/definitions/DataBundle"
1596
+ }
1597
+ }
1598
+ },
1599
+ "BundleRunResponse": {
1600
+ "type": "object",
1601
+ "properties": {
1602
+ "snap_token": {
1603
+ "type": "string",
1604
+ "description": "The snap token to avoid stale cache, see more details on [Snap Tokens](../../operations/snap-tokens)"
1605
+ }
1606
+ },
1607
+ "description": "BundleRunResponse is the response for a BundleRunRequest.\nIt includes a snap_token, which may be used for tracking the execution or its results."
1608
+ },
1609
+ "BundleWriteResponse": {
1610
+ "type": "object",
1611
+ "properties": {
1612
+ "names": {
1613
+ "type": "array",
1614
+ "items": {
1615
+ "type": "string"
1616
+ },
1617
+ "description": "Identifier or acknowledgment of the written bundle."
1618
+ }
1619
+ },
1620
+ "description": "BundleWriteResponse is the response for a BundleWriteRequest.\nIt includes a name which could be used as an identifier or acknowledgment."
1621
+ },
1622
+ "CheckBody": {
1623
+ "type": "object",
1624
+ "properties": {
1625
+ "metadata": {
1626
+ "$ref": "#/definitions/PermissionCheckRequestMetadata",
1627
+ "description": "Metadata associated with this request, required."
1628
+ },
1629
+ "entity": {
1630
+ "$ref": "#/definitions/Entity",
1631
+ "example": "repository:1",
1632
+ "description": "Entity on which the permission needs to be checked, required."
1633
+ },
1634
+ "permission": {
1635
+ "type": "string",
1636
+ "description": "The action the user wants to perform on the resource"
1637
+ },
1638
+ "subject": {
1639
+ "$ref": "#/definitions/Subject",
1640
+ "description": "Subject for which the permission needs to be checked, required."
1641
+ },
1642
+ "context": {
1643
+ "$ref": "#/definitions/Context",
1644
+ "description": "Contextual data that can be dynamically added to permission check requests. See details on [Contextual Data](../../operations/contextual-tuples)"
1645
+ },
1646
+ "arguments": {
1647
+ "type": "array",
1648
+ "items": {
1649
+ "type": "object",
1650
+ "$ref": "#/definitions/Argument"
1651
+ },
1652
+ "description": "Additional arguments associated with this request."
1653
+ }
1654
+ },
1655
+ "description": "PermissionCheckRequest is the request message for the Check method in the Permission service."
1656
+ },
1657
+ "CheckResult": {
1658
+ "type": "string",
1659
+ "enum": [
1660
+ "CHECK_RESULT_ALLOWED",
1661
+ "CHECK_RESULT_DENIED"
1662
+ ],
1663
+ "description": "Enumerates results of a check operation.\n\n - CHECK_RESULT_ALLOWED: Represents a successful check (the check allowed the operation).\n - CHECK_RESULT_DENIED: Represents a failed check (the check denied the operation)."
1664
+ },
1665
+ "CheckedExpr": {
1666
+ "type": "object",
1667
+ "properties": {
1668
+ "referenceMap": {
1669
+ "type": "object",
1670
+ "additionalProperties": {
1671
+ "$ref": "#/definitions/v1alpha1.Reference"
1672
+ },
1673
+ "description": "A map from expression ids to resolved references.\n\nThe following entries are in this table:\n\n- An Ident or Select expression is represented here if it resolves to a\n declaration. For instance, if `a.b.c` is represented by\n `select(select(id(a), b), c)`, and `a.b` resolves to a declaration,\n while `c` is a field selection, then the reference is attached to the\n nested select expression (but not to the id or or the outer select).\n In turn, if `a` resolves to a declaration and `b.c` are field selections,\n the reference is attached to the ident expression.\n- Every Call expression has an entry here, identifying the function being\n called.\n- Every CreateStruct expression for a message has an entry, identifying\n the message."
1674
+ },
1675
+ "typeMap": {
1676
+ "type": "object",
1677
+ "additionalProperties": {
1678
+ "$ref": "#/definitions/v1alpha1.Type"
1679
+ },
1680
+ "description": "A map from expression ids to types.\n\nEvery expression node which has a type different than DYN has a mapping\nhere. If an expression has type DYN, it is omitted from this map to save\nspace."
1681
+ },
1682
+ "sourceInfo": {
1683
+ "$ref": "#/definitions/SourceInfo",
1684
+ "description": "The source info derived from input that generated the parsed `expr` and\nany optimizations made during the type-checking pass."
1685
+ },
1686
+ "exprVersion": {
1687
+ "type": "string",
1688
+ "description": "The expr version indicates the major / minor version number of the `expr`\nrepresentation.\n\nThe most common reason for a version change will be to indicate to the CEL\nruntimes that transformations have been performed on the expr during static\nanalysis. In some cases, this will save the runtime the work of applying\nthe same or similar transformations prior to evaluation."
1689
+ },
1690
+ "expr": {
1691
+ "$ref": "#/definitions/Expr",
1692
+ "description": "The checked expression. Semantically equivalent to the parsed `expr`, but\nmay have structural differences."
1693
+ }
1694
+ },
1695
+ "description": "A CEL expression which has been successfully type checked."
1696
+ },
1697
+ "Child": {
1698
+ "type": "object",
1699
+ "properties": {
1700
+ "leaf": {
1701
+ "$ref": "#/definitions/Leaf",
1702
+ "description": "Leaf node in the permission tree."
1703
+ },
1704
+ "rewrite": {
1705
+ "$ref": "#/definitions/Rewrite",
1706
+ "description": "Rewrite operation in the permission tree."
1707
+ }
1708
+ },
1709
+ "description": "Child represents a node in the permission tree."
1710
+ },
1711
+ "Component": {
1712
+ "type": "string",
1713
+ "enum": [
1714
+ "COMPONENT_PARSER",
1715
+ "COMPONENT_TYPE_CHECKER",
1716
+ "COMPONENT_RUNTIME"
1717
+ ],
1718
+ "description": "CEL component specifier.\n\n - COMPONENT_PARSER: Parser. Converts a CEL string to an AST.\n - COMPONENT_TYPE_CHECKER: Type checker. Checks that references in an AST are defined and types\nagree.\n - COMPONENT_RUNTIME: Runtime. Evaluates a parsed and optionally checked CEL AST against a\ncontext."
1719
+ },
1720
+ "Comprehension": {
1721
+ "type": "object",
1722
+ "properties": {
1723
+ "iterVar": {
1724
+ "type": "string",
1725
+ "description": "The name of the first iteration variable.\nWhen the iter_range is a list, this variable is the list element.\nWhen the iter_range is a map, this variable is the map entry key."
1726
+ },
1727
+ "iterVar2": {
1728
+ "type": "string",
1729
+ "description": "The name of the second iteration variable, empty if not set.\nWhen the iter_range is a list, this variable is the integer index.\nWhen the iter_range is a map, this variable is the map entry value.\nThis field is only set for comprehension v2 macros."
1730
+ },
1731
+ "iterRange": {
1732
+ "$ref": "#/definitions/Expr",
1733
+ "description": "The range over which the comprehension iterates."
1734
+ },
1735
+ "accuVar": {
1736
+ "type": "string",
1737
+ "description": "The name of the variable used for accumulation of the result."
1738
+ },
1739
+ "accuInit": {
1740
+ "$ref": "#/definitions/Expr",
1741
+ "description": "The initial value of the accumulator."
1742
+ },
1743
+ "loopCondition": {
1744
+ "$ref": "#/definitions/Expr",
1745
+ "description": "An expression which can contain iter_var, iter_var2, and accu_var.\n\nReturns false when the result has been computed and may be used as\na hint to short-circuit the remainder of the comprehension."
1746
+ },
1747
+ "loopStep": {
1748
+ "$ref": "#/definitions/Expr",
1749
+ "description": "An expression which can contain iter_var, iter_var2, and accu_var.\n\nComputes the next value of accu_var."
1750
+ },
1751
+ "result": {
1752
+ "$ref": "#/definitions/Expr",
1753
+ "description": "An expression which can contain accu_var.\n\nComputes the result."
1754
+ }
1755
+ },
1756
+ "description": "A comprehension expression applied to a list or map.\n\nComprehensions are not part of the core syntax, but enabled with macros.\nA macro matches a specific call signature within a parsed AST and replaces\nthe call with an alternate AST block. Macro expansion happens at parse\ntime.\n\nThe following macros are supported within CEL:\n\nAggregate type macros may be applied to all elements in a list or all keys\nin a map:\n\n* `all`, `exists`, `exists_one` - test a predicate expression against\n the inputs and return `true` if the predicate is satisfied for all,\n any, or only one value `list.all(x, x \u003c 10)`.\n* `filter` - test a predicate expression against the inputs and return\n the subset of elements which satisfy the predicate:\n `payments.filter(p, p \u003e 1000)`.\n* `map` - apply an expression to all elements in the input and return the\n output aggregate type: `[1, 2, 3].map(i, i * i)`.\n\nThe `has(m.x)` macro tests whether the property `x` is present in struct\n`m`. The semantics of this macro depend on the type of `m`. For proto2\nmessages `has(m.x)` is defined as 'defined, but not set`. For proto3, the\nmacro tests whether the property is set to its default. For map and struct\ntypes, the macro tests whether the property `x` is defined on `m`.\n\nComprehensions for the standard environment macros evaluation can be best\nvisualized as the following pseudocode:\n\n```\nlet `accu_var` = `accu_init`\nfor (let `iter_var` in `iter_range`) {\n if (!`loop_condition`) {\n break\n }\n `accu_var` = `loop_step`\n}\nreturn `result`\n```\n\nComprehensions for the optional V2 macros which support map-to-map\ntranslation differ slightly from the standard environment macros in that\nthey expose both the key or index in addition to the value for each list\nor map entry:\n\n```\nlet `accu_var` = `accu_init`\nfor (let `iter_var`, `iter_var2` in `iter_range`) {\n if (!`loop_condition`) {\n break\n }\n `accu_var` = `loop_step`\n}\nreturn `result`\n```"
1757
+ },
1758
+ "ComputedAttribute": {
1759
+ "type": "object",
1760
+ "properties": {
1761
+ "name": {
1762
+ "type": "string",
1763
+ "title": "Name of the computed attribute"
1764
+ }
1765
+ },
1766
+ "description": "ComputedAttribute defines a computed attribute which includes its name."
1767
+ },
1768
+ "ComputedUserSet": {
1769
+ "type": "object",
1770
+ "properties": {
1771
+ "relation": {
1772
+ "type": "string",
1773
+ "title": "Relation name"
1774
+ }
1775
+ },
1776
+ "description": "ComputedUserSet defines a set of computed users which includes the relation name."
1777
+ },
1778
+ "Constant": {
1779
+ "type": "object",
1780
+ "properties": {
1781
+ "nullValue": {
1782
+ "type": "string",
1783
+ "description": "null value."
1784
+ },
1785
+ "boolValue": {
1786
+ "type": "boolean",
1787
+ "description": "boolean value."
1788
+ },
1789
+ "int64Value": {
1790
+ "type": "string",
1791
+ "format": "int64",
1792
+ "description": "int64 value."
1793
+ },
1794
+ "uint64Value": {
1795
+ "type": "string",
1796
+ "format": "uint64",
1797
+ "description": "uint64 value."
1798
+ },
1799
+ "doubleValue": {
1800
+ "type": "number",
1801
+ "format": "double",
1802
+ "description": "double value."
1803
+ },
1804
+ "stringValue": {
1805
+ "type": "string",
1806
+ "description": "string value."
1807
+ },
1808
+ "bytesValue": {
1809
+ "type": "string",
1810
+ "format": "byte",
1811
+ "description": "bytes value."
1812
+ },
1813
+ "durationValue": {
1814
+ "type": "string",
1815
+ "description": "protobuf.Duration value.\n\nDeprecated: duration is no longer considered a builtin cel type."
1816
+ },
1817
+ "timestampValue": {
1818
+ "type": "string",
1819
+ "format": "date-time",
1820
+ "description": "protobuf.Timestamp value.\n\nDeprecated: timestamp is no longer considered a builtin cel type."
1821
+ }
1822
+ },
1823
+ "description": "Represents a primitive literal.\n\nNamed 'Constant' here for backwards compatibility.\n\nThis is similar as the primitives supported in the well-known type\n`google.protobuf.Value`, but richer so it can represent CEL's full range of\nprimitives.\n\nLists and structs are not included as constants as these aggregate types may\ncontain [Expr][google.api.expr.v1alpha1.Expr] elements which require\nevaluation and are thus not constant.\n\nExamples of literals include: `\"hello\"`, `b'bytes'`, `1u`, `4.2`, `-2`,\n`true`, `null`."
1824
+ },
1825
+ "Context": {
1826
+ "type": "object",
1827
+ "properties": {
1828
+ "tuples": {
1829
+ "type": "array",
1830
+ "items": {
1831
+ "type": "object",
1832
+ "$ref": "#/definitions/Tuple"
1833
+ },
1834
+ "description": "A repeated field of tuples involved in the operation."
1835
+ },
1836
+ "attributes": {
1837
+ "type": "array",
1838
+ "items": {
1839
+ "type": "object",
1840
+ "$ref": "#/definitions/Attribute"
1841
+ },
1842
+ "description": "A repeated field of attributes associated with the operation."
1843
+ },
1844
+ "data": {
1845
+ "type": "object",
1846
+ "description": "Additional data associated with the context."
1847
+ }
1848
+ },
1849
+ "description": "Context encapsulates the information related to a single operation,\nincluding the tuples involved and the associated attributes."
1850
+ },
1851
+ "CreateList": {
1852
+ "type": "object",
1853
+ "properties": {
1854
+ "elements": {
1855
+ "type": "array",
1856
+ "items": {
1857
+ "type": "object",
1858
+ "$ref": "#/definitions/Expr"
1859
+ },
1860
+ "description": "The elements part of the list."
1861
+ },
1862
+ "optionalIndices": {
1863
+ "type": "array",
1864
+ "items": {
1865
+ "type": "integer",
1866
+ "format": "int32"
1867
+ },
1868
+ "description": "The indices within the elements list which are marked as optional\nelements.\n\nWhen an optional-typed value is present, the value it contains\nis included in the list. If the optional-typed value is absent, the list\nelement is omitted from the CreateList result."
1869
+ }
1870
+ },
1871
+ "description": "A list creation expression.\n\nLists may either be homogenous, e.g. `[1, 2, 3]`, or heterogeneous, e.g.\n`dyn([1, 'hello', 2.0])`"
1872
+ },
1873
+ "CreateStruct": {
1874
+ "type": "object",
1875
+ "properties": {
1876
+ "messageName": {
1877
+ "type": "string",
1878
+ "description": "The type name of the message to be created, empty when creating map\nliterals."
1879
+ },
1880
+ "entries": {
1881
+ "type": "array",
1882
+ "items": {
1883
+ "type": "object",
1884
+ "$ref": "#/definitions/Entry"
1885
+ },
1886
+ "description": "The entries in the creation expression."
1887
+ }
1888
+ },
1889
+ "description": "A map or message creation expression.\n\nMaps are constructed as `{'key_name': 'value'}`. Message construction is\nsimilar, but prefixed with a type name and composed of field ids:\n`types.MyType{field_id: 'value'}`."
1890
+ },
1891
+ "Data.DeleteBody": {
1892
+ "type": "object",
1893
+ "properties": {
1894
+ "tuple_filter": {
1895
+ "$ref": "#/definitions/TupleFilter",
1896
+ "description": "tuple_filter specifies the criteria used to select the tuples that should be deleted."
1897
+ },
1898
+ "attribute_filter": {
1899
+ "$ref": "#/definitions/AttributeFilter",
1900
+ "description": "attribute_filter specifies the criteria used to select the attributes that should be deleted."
1901
+ }
1902
+ },
1903
+ "description": "DataDeleteRequest defines the structure of a request to delete data.\nIt includes the tenant_id and filters for selecting tuples and attributes to be deleted."
1904
+ },
1905
+ "Data.WriteBody": {
1906
+ "type": "object",
1907
+ "properties": {
1908
+ "metadata": {
1909
+ "$ref": "#/definitions/DataWriteRequestMetadata",
1910
+ "description": "metadata holds additional data related to the request."
1911
+ },
1912
+ "tuples": {
1913
+ "type": "array",
1914
+ "items": {
1915
+ "type": "object",
1916
+ "$ref": "#/definitions/Tuple"
1917
+ },
1918
+ "description": "tuples contains the list of tuples (entity-relation-entity triples) that need to be written."
1919
+ },
1920
+ "attributes": {
1921
+ "type": "array",
1922
+ "items": {
1923
+ "type": "object",
1924
+ "$ref": "#/definitions/Attribute"
1925
+ },
1926
+ "description": "attributes contains the list of attributes (entity-attribute-value triples) that need to be written."
1927
+ }
1928
+ },
1929
+ "description": "DataWriteRequest defines the structure of a request for writing data.\nIt contains the necessary information such as tenant_id, metadata,\ntuples and attributes for the write operation."
1930
+ },
1931
+ "DataBundle": {
1932
+ "type": "object",
1933
+ "properties": {
1934
+ "name": {
1935
+ "type": "string",
1936
+ "description": "'name' is a simple string field representing the name of the DataBundle."
1937
+ },
1938
+ "arguments": {
1939
+ "type": "array",
1940
+ "items": {
1941
+ "type": "string"
1942
+ },
1943
+ "description": "'arguments' is a repeated field, which means it can contain multiple strings.\nThese are used to store a list of arguments related to the DataBundle."
1944
+ },
1945
+ "operations": {
1946
+ "type": "array",
1947
+ "items": {
1948
+ "type": "object",
1949
+ "$ref": "#/definitions/v1.Operation"
1950
+ },
1951
+ "description": "'operations' is a repeated field containing multiple Operation messages.\nEach Operation represents a specific action or set of actions to be performed."
1952
+ }
1953
+ },
1954
+ "description": "DataBundle is a message representing a bundle of data, which includes a name,\na list of arguments, and a series of operations."
1955
+ },
1956
+ "DataChange": {
1957
+ "type": "object",
1958
+ "properties": {
1959
+ "operation": {
1960
+ "$ref": "#/definitions/DataChange.Operation",
1961
+ "description": "The operation type."
1962
+ },
1963
+ "tuple": {
1964
+ "$ref": "#/definitions/Tuple",
1965
+ "description": "If the change is a tuple."
1966
+ },
1967
+ "attribute": {
1968
+ "$ref": "#/definitions/Attribute",
1969
+ "description": "If the change is an attribute."
1970
+ }
1971
+ },
1972
+ "description": "DataChange represents a single change in data, with an operation type and the actual change which could be a tuple or an attribute."
1973
+ },
1974
+ "DataChange.Operation": {
1975
+ "type": "string",
1976
+ "enum": [
1977
+ "OPERATION_CREATE",
1978
+ "OPERATION_DELETE"
1979
+ ],
1980
+ "description": " - OPERATION_CREATE: Creation operation.\n - OPERATION_DELETE: Deletion operation."
1981
+ },
1982
+ "DataChanges": {
1983
+ "type": "object",
1984
+ "properties": {
1985
+ "snap_token": {
1986
+ "type": "string",
1987
+ "description": "The snapshot token."
1988
+ },
1989
+ "data_changes": {
1990
+ "type": "array",
1991
+ "items": {
1992
+ "type": "object",
1993
+ "$ref": "#/definitions/DataChange"
1994
+ },
1995
+ "description": "The list of data changes."
1996
+ }
1997
+ },
1998
+ "description": "DataChanges represent changes in data with a snap token and a list of data change objects."
1999
+ },
2000
+ "DataDeleteResponse": {
2001
+ "type": "object",
2002
+ "properties": {
2003
+ "snap_token": {
2004
+ "type": "string",
2005
+ "description": "The snap token to avoid stale cache, see more details on [Snap Tokens](../../operations/snap-tokens)"
2006
+ }
2007
+ },
2008
+ "description": "DataDeleteResponse defines the structure of the response to a data delete request.\nIt includes a snap_token representing the state of the database after the deletion."
2009
+ },
2010
+ "DataWriteRequestMetadata": {
2011
+ "type": "object",
2012
+ "properties": {
2013
+ "schema_version": {
2014
+ "type": "string",
2015
+ "description": "schema_version represents the version of the schema for the data being written."
2016
+ }
2017
+ },
2018
+ "description": "DataWriteRequestMetadata defines the structure of metadata for a write request.\nIt includes the schema version of the data to be written."
2019
+ },
2020
+ "DataWriteResponse": {
2021
+ "type": "object",
2022
+ "properties": {
2023
+ "snap_token": {
2024
+ "type": "string",
2025
+ "description": "The snap token to avoid stale cache, see more details on [Snap Tokens](../../operations/snap-tokens)."
2026
+ }
2027
+ },
2028
+ "description": "DataWriteResponse defines the structure of the response after writing data.\nIt contains the snap_token generated after the write operation."
2029
+ },
2030
+ "DeleteRelationshipsBody": {
2031
+ "type": "object",
2032
+ "properties": {
2033
+ "filter": {
2034
+ "$ref": "#/definitions/TupleFilter"
2035
+ }
2036
+ },
2037
+ "title": "RelationshipDeleteRequest"
2038
+ },
2039
+ "Entity": {
2040
+ "type": "object",
2041
+ "properties": {
2042
+ "type": {
2043
+ "type": "string"
2044
+ },
2045
+ "id": {
2046
+ "type": "string"
2047
+ }
2048
+ },
2049
+ "description": "Entity represents an entity with a type and an identifier."
2050
+ },
2051
+ "EntityDefinition": {
2052
+ "type": "object",
2053
+ "properties": {
2054
+ "name": {
2055
+ "type": "string",
2056
+ "description": "The name of the entity, which follows a specific string pattern and has a maximum byte size."
2057
+ },
2058
+ "relations": {
2059
+ "type": "object",
2060
+ "additionalProperties": {
2061
+ "$ref": "#/definitions/RelationDefinition"
2062
+ },
2063
+ "description": "Map of relation definitions within this entity. The key is the relation name, and the value is the RelationDefinition."
2064
+ },
2065
+ "permissions": {
2066
+ "type": "object",
2067
+ "additionalProperties": {
2068
+ "$ref": "#/definitions/PermissionDefinition"
2069
+ },
2070
+ "description": "Map of permission definitions within this entity. The key is the permission name, and the value is the PermissionDefinition."
2071
+ },
2072
+ "attributes": {
2073
+ "type": "object",
2074
+ "additionalProperties": {
2075
+ "$ref": "#/definitions/AttributeDefinition"
2076
+ },
2077
+ "description": "Map of attribute definitions within this entity. The key is the attribute name, and the value is the AttributeDefinition."
2078
+ },
2079
+ "references": {
2080
+ "type": "object",
2081
+ "additionalProperties": {
2082
+ "$ref": "#/definitions/EntityDefinition.Reference"
2083
+ },
2084
+ "description": "Map of references indicating whether a string pertains to a relation, permission, or attribute."
2085
+ }
2086
+ },
2087
+ "description": "The EntityDefinition message provides detailed information about a specific entity."
2088
+ },
2089
+ "EntityDefinition.Reference": {
2090
+ "type": "string",
2091
+ "enum": [
2092
+ "REFERENCE_RELATION",
2093
+ "REFERENCE_PERMISSION",
2094
+ "REFERENCE_ATTRIBUTE"
2095
+ ],
2096
+ "description": "The Reference enum specifies whether a name pertains to a relation, permission, or attribute.\n\n - REFERENCE_RELATION: Indicates that the name refers to a relation.\n - REFERENCE_PERMISSION: Indicates that the name refers to a permission.\n - REFERENCE_ATTRIBUTE: Indicates that the name refers to an attribute."
2097
+ },
2098
+ "EntityFilter": {
2099
+ "type": "object",
2100
+ "properties": {
2101
+ "type": {
2102
+ "type": "string",
2103
+ "title": "Type of the entity"
2104
+ },
2105
+ "ids": {
2106
+ "type": "array",
2107
+ "items": {
2108
+ "type": "string"
2109
+ },
2110
+ "title": "List of entity IDs"
2111
+ }
2112
+ },
2113
+ "description": "EntityFilter is used to filter entities based on the type and ids."
2114
+ },
2115
+ "Entry": {
2116
+ "type": "object",
2117
+ "properties": {
2118
+ "id": {
2119
+ "type": "string",
2120
+ "format": "int64",
2121
+ "description": "Required. An id assigned to this node by the parser which is unique\nin a given expression tree. This is used to associate type\ninformation and other attributes to the node."
2122
+ },
2123
+ "fieldKey": {
2124
+ "type": "string",
2125
+ "description": "The field key for a message creator statement."
2126
+ },
2127
+ "mapKey": {
2128
+ "$ref": "#/definitions/Expr",
2129
+ "description": "The key expression for a map creation statement."
2130
+ },
2131
+ "value": {
2132
+ "$ref": "#/definitions/Expr",
2133
+ "description": "Required. The value assigned to the key.\n\nIf the optional_entry field is true, the expression must resolve to an\noptional-typed value. If the optional value is present, the key will be\nset; however, if the optional value is absent, the key will be unset."
2134
+ },
2135
+ "optionalEntry": {
2136
+ "type": "boolean",
2137
+ "description": "Whether the key-value pair is optional."
2138
+ }
2139
+ },
2140
+ "description": "Represents an entry."
2141
+ },
2142
+ "ExpandLeaf": {
2143
+ "type": "object",
2144
+ "properties": {
2145
+ "subjects": {
2146
+ "$ref": "#/definitions/Subjects",
2147
+ "description": "subjects are used when the leaf is a set of subjects."
2148
+ },
2149
+ "values": {
2150
+ "$ref": "#/definitions/Values",
2151
+ "description": "values are used when the leaf node is a set of values."
2152
+ },
2153
+ "value": {
2154
+ "$ref": "#/definitions/Any",
2155
+ "description": "value is used when the leaf node is a single value."
2156
+ }
2157
+ },
2158
+ "description": "ExpandLeaf is the leaf node of an Expand tree and can be either a set of Subjects or a set of Values."
2159
+ },
2160
+ "ExpandTreeNode": {
2161
+ "type": "object",
2162
+ "properties": {
2163
+ "operation": {
2164
+ "$ref": "#/definitions/ExpandTreeNode.Operation",
2165
+ "title": "Operation to be applied on this tree node"
2166
+ },
2167
+ "children": {
2168
+ "type": "array",
2169
+ "items": {
2170
+ "type": "object",
2171
+ "$ref": "#/definitions/v1.Expand"
2172
+ },
2173
+ "title": "The children of this tree node"
2174
+ }
2175
+ },
2176
+ "description": "ExpandTreeNode represents a node in an expansion tree with a specific operation and its children."
2177
+ },
2178
+ "ExpandTreeNode.Operation": {
2179
+ "type": "string",
2180
+ "enum": [
2181
+ "OPERATION_UNION",
2182
+ "OPERATION_INTERSECTION",
2183
+ "OPERATION_EXCLUSION"
2184
+ ],
2185
+ "description": "Operation is an enum representing the type of operation to be applied on the tree node."
2186
+ },
2187
+ "Expr": {
2188
+ "type": "object",
2189
+ "properties": {
2190
+ "id": {
2191
+ "type": "string",
2192
+ "format": "int64",
2193
+ "description": "Required. An id assigned to this node by the parser which is unique in a\ngiven expression tree. This is used to associate type information and other\nattributes to a node in the parse tree."
2194
+ },
2195
+ "constExpr": {
2196
+ "$ref": "#/definitions/Constant",
2197
+ "description": "A literal expression."
2198
+ },
2199
+ "identExpr": {
2200
+ "$ref": "#/definitions/Ident",
2201
+ "description": "An identifier expression."
2202
+ },
2203
+ "selectExpr": {
2204
+ "$ref": "#/definitions/Select",
2205
+ "description": "A field selection expression, e.g. `request.auth`."
2206
+ },
2207
+ "callExpr": {
2208
+ "$ref": "#/definitions/Expr.Call",
2209
+ "description": "A call expression, including calls to predefined functions and operators."
2210
+ },
2211
+ "listExpr": {
2212
+ "$ref": "#/definitions/CreateList",
2213
+ "description": "A list creation expression."
2214
+ },
2215
+ "structExpr": {
2216
+ "$ref": "#/definitions/CreateStruct",
2217
+ "description": "A map or message creation expression."
2218
+ },
2219
+ "comprehensionExpr": {
2220
+ "$ref": "#/definitions/Comprehension",
2221
+ "description": "A comprehension expression."
2222
+ }
2223
+ },
2224
+ "description": "An abstract representation of a common expression.\n\nExpressions are abstractly represented as a collection of identifiers,\nselect statements, function calls, literals, and comprehensions. All\noperators with the exception of the '.' operator are modelled as function\ncalls. This makes it easy to represent new operators into the existing AST.\n\nAll references within expressions must resolve to a\n[Decl][google.api.expr.v1alpha1.Decl] provided at type-check for an\nexpression to be valid. A reference may either be a bare identifier `name` or\na qualified identifier `google.api.name`. References may either refer to a\nvalue or a function declaration.\n\nFor example, the expression `google.api.name.startsWith('expr')` references\nthe declaration `google.api.name` within a\n[Expr.Select][google.api.expr.v1alpha1.Expr.Select] expression, and the\nfunction declaration `startsWith`."
2225
+ },
2226
+ "Expr.Call": {
2227
+ "type": "object",
2228
+ "properties": {
2229
+ "target": {
2230
+ "$ref": "#/definitions/Expr",
2231
+ "description": "The target of an method call-style expression. For example, `x` in\n`x.f()`."
2232
+ },
2233
+ "function": {
2234
+ "type": "string",
2235
+ "description": "Required. The name of the function or method being called."
2236
+ },
2237
+ "args": {
2238
+ "type": "array",
2239
+ "items": {
2240
+ "type": "object",
2241
+ "$ref": "#/definitions/Expr"
2242
+ },
2243
+ "description": "The arguments."
2244
+ }
2245
+ },
2246
+ "description": "A call expression, including calls to predefined functions and operators.\n\nFor example, `value == 10`, `size(map_value)`."
2247
+ },
2248
+ "Extension": {
2249
+ "type": "object",
2250
+ "properties": {
2251
+ "id": {
2252
+ "type": "string",
2253
+ "title": "Identifier for the extension. Example: constant_folding"
2254
+ },
2255
+ "affectedComponents": {
2256
+ "type": "array",
2257
+ "items": {
2258
+ "$ref": "#/definitions/Component"
2259
+ },
2260
+ "description": "If set, the listed components must understand the extension for the\nexpression to evaluate correctly.\n\nThis field has set semantics, repeated values should be deduplicated."
2261
+ },
2262
+ "version": {
2263
+ "$ref": "#/definitions/Version",
2264
+ "description": "Version info. May be skipped if it isn't meaningful for the extension.\n(for example constant_folding might always be v0.0)."
2265
+ }
2266
+ },
2267
+ "description": "An extension that was requested for the source expression."
2268
+ },
2269
+ "FunctionType": {
2270
+ "type": "object",
2271
+ "properties": {
2272
+ "resultType": {
2273
+ "$ref": "#/definitions/v1alpha1.Type",
2274
+ "description": "Result type of the function."
2275
+ },
2276
+ "argTypes": {
2277
+ "type": "array",
2278
+ "items": {
2279
+ "type": "object",
2280
+ "$ref": "#/definitions/v1alpha1.Type"
2281
+ },
2282
+ "description": "Argument types of the function."
2283
+ }
2284
+ },
2285
+ "description": "Function type with result and arg types."
2286
+ },
2287
+ "Ident": {
2288
+ "type": "object",
2289
+ "properties": {
2290
+ "name": {
2291
+ "type": "string",
2292
+ "description": "Required. Holds a single, unqualified identifier, possibly preceded by a\n'.'.\n\nQualified names are represented by the\n[Expr.Select][google.api.expr.v1alpha1.Expr.Select] expression."
2293
+ }
2294
+ },
2295
+ "description": "An identifier expression. e.g. `request`."
2296
+ },
2297
+ "Leaf": {
2298
+ "type": "object",
2299
+ "properties": {
2300
+ "computedUserSet": {
2301
+ "$ref": "#/definitions/ComputedUserSet",
2302
+ "description": "A computed set of users."
2303
+ },
2304
+ "tupleToUserSet": {
2305
+ "$ref": "#/definitions/TupleToUserSet",
2306
+ "description": "A tuple to user set conversion."
2307
+ },
2308
+ "computedAttribute": {
2309
+ "$ref": "#/definitions/ComputedAttribute",
2310
+ "description": "A computed attribute."
2311
+ },
2312
+ "call": {
2313
+ "$ref": "#/definitions/v1.Call",
2314
+ "description": "A call to a function or method."
2315
+ }
2316
+ },
2317
+ "description": "Leaf represents a leaf node in the permission tree."
2318
+ },
2319
+ "ListType": {
2320
+ "type": "object",
2321
+ "properties": {
2322
+ "elemType": {
2323
+ "$ref": "#/definitions/v1alpha1.Type",
2324
+ "description": "The element type."
2325
+ }
2326
+ },
2327
+ "description": "List type with typed elements, e.g. `list\u003cexample.proto.MyMessage\u003e`."
2328
+ },
2329
+ "LookupEntityBody": {
2330
+ "type": "object",
2331
+ "properties": {
2332
+ "metadata": {
2333
+ "$ref": "#/definitions/PermissionLookupEntityRequestMetadata",
2334
+ "description": "Metadata associated with this request, required."
2335
+ },
2336
+ "entity_type": {
2337
+ "type": "string",
2338
+ "description": "Type of the entity to lookup, required, must start with a letter and can include alphanumeric and underscore, max 64 bytes."
2339
+ },
2340
+ "permission": {
2341
+ "type": "string",
2342
+ "description": "Name of the permission to check, required, must start with a letter and can include alphanumeric and underscore, max 64 bytes."
2343
+ },
2344
+ "subject": {
2345
+ "$ref": "#/definitions/Subject",
2346
+ "description": "Subject for which to check the permission, required."
2347
+ },
2348
+ "context": {
2349
+ "$ref": "#/definitions/Context",
2350
+ "description": "Context associated with this request."
2351
+ },
2352
+ "scope": {
2353
+ "type": "object",
2354
+ "additionalProperties": {
2355
+ "$ref": "#/definitions/StringArrayValue"
2356
+ },
2357
+ "description": "Scope: A map that associates entity types with lists of identifiers. Each entry\nhelps filter requests by specifying which entities are relevant to the operation."
2358
+ },
2359
+ "page_size": {
2360
+ "type": "integer",
2361
+ "format": "int64",
2362
+ "description": "page_size is the number of entities to be returned in the response.\nThe value should be between 1 and 100."
2363
+ },
2364
+ "continuous_token": {
2365
+ "type": "string",
2366
+ "description": "continuous_token is an optional parameter used for pagination.\nIt should be the value received in the previous response."
2367
+ }
2368
+ },
2369
+ "description": "PermissionLookupEntityRequest is the request message for the LookupEntity method in the Permission service."
2370
+ },
2371
+ "LookupEntityStreamBody": {
2372
+ "type": "object",
2373
+ "properties": {
2374
+ "metadata": {
2375
+ "$ref": "#/definitions/PermissionLookupEntityRequestMetadata",
2376
+ "description": "Metadata associated with this request, required."
2377
+ },
2378
+ "entity_type": {
2379
+ "type": "string",
2380
+ "description": "Type of the entity to lookup, required, must start with a letter and can include alphanumeric and underscore, max 64 bytes."
2381
+ },
2382
+ "permission": {
2383
+ "type": "string",
2384
+ "description": "Name of the permission to check, required, must start with a letter and can include alphanumeric and underscore, max 64 bytes."
2385
+ },
2386
+ "subject": {
2387
+ "$ref": "#/definitions/Subject",
2388
+ "description": "Subject for which to check the permission, required."
2389
+ },
2390
+ "context": {
2391
+ "$ref": "#/definitions/Context",
2392
+ "description": "Context associated with this request."
2393
+ },
2394
+ "scope": {
2395
+ "type": "object",
2396
+ "additionalProperties": {
2397
+ "$ref": "#/definitions/StringArrayValue"
2398
+ },
2399
+ "description": "Scope: A map that associates entity types with lists of identifiers. Each entry\nhelps filter requests by specifying which entities are relevant to the operation."
2400
+ },
2401
+ "page_size": {
2402
+ "type": "integer",
2403
+ "format": "int64",
2404
+ "description": "page_size is the number of entities to be returned in the response.\nThe value should be between 1 and 100."
2405
+ },
2406
+ "continuous_token": {
2407
+ "type": "string",
2408
+ "description": "continuous_token is an optional parameter used for pagination.\nIt should be the value received in the previous response."
2409
+ }
2410
+ },
2411
+ "description": "PermissionLookupEntityRequest is the request message for the LookupEntity method in the Permission service."
2412
+ },
2413
+ "LookupSubjectBody": {
2414
+ "type": "object",
2415
+ "properties": {
2416
+ "metadata": {
2417
+ "$ref": "#/definitions/PermissionLookupSubjectRequestMetadata",
2418
+ "description": "Metadata associated with this request, required."
2419
+ },
2420
+ "entity": {
2421
+ "$ref": "#/definitions/Entity",
2422
+ "description": "Entity for which to check the permission, required."
2423
+ },
2424
+ "permission": {
2425
+ "type": "string",
2426
+ "description": "Permission to be checked, can be a permission or relation. Required, and must match the pattern \"^([a-zA-Z][a-zA-Z0-9_]{1,62}[a-zA-Z0-9])$\", max 64 bytes."
2427
+ },
2428
+ "subject_reference": {
2429
+ "$ref": "#/definitions/RelationReference",
2430
+ "description": "Reference to the subject to lookup."
2431
+ },
2432
+ "context": {
2433
+ "$ref": "#/definitions/Context",
2434
+ "description": "Context associated with this request."
2435
+ },
2436
+ "arguments": {
2437
+ "type": "array",
2438
+ "items": {
2439
+ "type": "object",
2440
+ "$ref": "#/definitions/Argument"
2441
+ },
2442
+ "description": "Additional arguments associated with this request."
2443
+ },
2444
+ "page_size": {
2445
+ "type": "integer",
2446
+ "format": "int64",
2447
+ "description": "page_size is the number of subjects to be returned in the response.\nThe value should be between 1 and 100."
2448
+ },
2449
+ "continuous_token": {
2450
+ "type": "string",
2451
+ "description": "continuous_token is an optional parameter used for pagination.\nIt should be the value received in the previous response."
2452
+ }
2453
+ },
2454
+ "description": "PermissionLookupSubjectRequest is the request message for the LookupSubject method in the Permission service."
2455
+ },
2456
+ "MapType": {
2457
+ "type": "object",
2458
+ "properties": {
2459
+ "keyType": {
2460
+ "$ref": "#/definitions/v1alpha1.Type",
2461
+ "description": "The type of the key."
2462
+ },
2463
+ "valueType": {
2464
+ "$ref": "#/definitions/v1alpha1.Type",
2465
+ "description": "The type of the value."
2466
+ }
2467
+ },
2468
+ "description": "Map type with parameterized key and value types, e.g. `map\u003cstring, int\u003e`."
2469
+ },
2470
+ "NullValue": {
2471
+ "type": "string",
2472
+ "description": "`NullValue` is a singleton enumeration to represent the null value for the\n`Value` type union.\n\nThe JSON representation for `NullValue` is JSON `null`."
2473
+ },
2474
+ "PartialWriteBody": {
2475
+ "type": "object",
2476
+ "properties": {
2477
+ "metadata": {
2478
+ "$ref": "#/definitions/SchemaPartialWriteRequestMetadata",
2479
+ "description": "metadata is the additional information needed for the Partial Write request."
2480
+ },
2481
+ "partials": {
2482
+ "type": "object",
2483
+ "additionalProperties": {
2484
+ "$ref": "#/definitions/Partials"
2485
+ },
2486
+ "title": "Map of entity name with the values needed to be updated"
2487
+ }
2488
+ },
2489
+ "title": "It contains the tenant_id to identify the tenant and metadata of the schema to be edited,\nwith the corresponding edits to various entities"
2490
+ },
2491
+ "Partials": {
2492
+ "type": "object",
2493
+ "properties": {
2494
+ "write": {
2495
+ "type": "array",
2496
+ "items": {
2497
+ "type": "string"
2498
+ }
2499
+ },
2500
+ "delete": {
2501
+ "type": "array",
2502
+ "items": {
2503
+ "type": "string"
2504
+ }
2505
+ },
2506
+ "update": {
2507
+ "type": "array",
2508
+ "items": {
2509
+ "type": "string"
2510
+ }
2511
+ }
2512
+ },
2513
+ "title": "Partials contains the write, update and delete definitions"
2514
+ },
2515
+ "Permission.ExpandBody": {
2516
+ "type": "object",
2517
+ "properties": {
2518
+ "metadata": {
2519
+ "$ref": "#/definitions/PermissionExpandRequestMetadata",
2520
+ "description": "Metadata associated with this request, required."
2521
+ },
2522
+ "entity": {
2523
+ "$ref": "#/definitions/Entity",
2524
+ "description": "Entity on which the permission needs to be expanded, required."
2525
+ },
2526
+ "permission": {
2527
+ "type": "string",
2528
+ "description": "Name of the permission to be expanded, not required, must start with a letter and can include alphanumeric and underscore, max 64 bytes."
2529
+ },
2530
+ "context": {
2531
+ "$ref": "#/definitions/Context",
2532
+ "description": "Context associated with this request."
2533
+ },
2534
+ "arguments": {
2535
+ "type": "array",
2536
+ "items": {
2537
+ "type": "object",
2538
+ "$ref": "#/definitions/Argument"
2539
+ },
2540
+ "description": "Additional arguments associated with this request."
2541
+ }
2542
+ },
2543
+ "description": "PermissionExpandRequest is the request message for the Expand method in the Permission service."
2544
+ },
2545
+ "PermissionBulkCheckRequestItem": {
2546
+ "type": "object",
2547
+ "properties": {
2548
+ "entity": {
2549
+ "$ref": "#/definitions/Entity",
2550
+ "example": "repository:1",
2551
+ "description": "Entity on which the permission needs to be checked, required."
2552
+ },
2553
+ "permission": {
2554
+ "type": "string",
2555
+ "description": "The action the user wants to perform on the resource"
2556
+ },
2557
+ "subject": {
2558
+ "$ref": "#/definitions/Subject",
2559
+ "description": "Subject for which the permission needs to be checked, required."
2560
+ }
2561
+ },
2562
+ "title": "BULK CHECK"
2563
+ },
2564
+ "PermissionBulkCheckResponse": {
2565
+ "type": "object",
2566
+ "properties": {
2567
+ "results": {
2568
+ "type": "array",
2569
+ "items": {
2570
+ "type": "object",
2571
+ "$ref": "#/definitions/PermissionCheckResponse"
2572
+ },
2573
+ "description": "List of permission check responses corresponding to each request."
2574
+ }
2575
+ },
2576
+ "description": "PermissionBulkCheckResponse is the response message for the BulkCheck method in the Permission service."
2577
+ },
2578
+ "PermissionCheckRequestMetadata": {
2579
+ "type": "object",
2580
+ "properties": {
2581
+ "schema_version": {
2582
+ "type": "string",
2583
+ "description": "Version of the schema."
2584
+ },
2585
+ "snap_token": {
2586
+ "type": "string",
2587
+ "description": "The snap token to avoid stale cache, see more details on [Snap Tokens](../../operations/snap-tokens)"
2588
+ },
2589
+ "depth": {
2590
+ "type": "integer",
2591
+ "format": "int32",
2592
+ "description": "Query limit when if recursive database queries got in loop"
2593
+ }
2594
+ },
2595
+ "description": "PermissionCheckRequestMetadata metadata for the PermissionCheckRequest."
2596
+ },
2597
+ "PermissionCheckResponse": {
2598
+ "type": "object",
2599
+ "properties": {
2600
+ "can": {
2601
+ "$ref": "#/definitions/CheckResult",
2602
+ "description": "Result of the permission check."
2603
+ },
2604
+ "metadata": {
2605
+ "$ref": "#/definitions/PermissionCheckResponseMetadata",
2606
+ "description": "Metadata associated with this response."
2607
+ }
2608
+ },
2609
+ "description": "PermissionCheckResponse is the response message for the Check method in the Permission service."
2610
+ },
2611
+ "PermissionCheckResponseMetadata": {
2612
+ "type": "object",
2613
+ "properties": {
2614
+ "check_count": {
2615
+ "type": "integer",
2616
+ "format": "int32",
2617
+ "description": "The count of the checks performed."
2618
+ }
2619
+ },
2620
+ "description": "PermissionCheckResponseMetadata metadata for the PermissionCheckResponse."
2621
+ },
2622
+ "PermissionDefinition": {
2623
+ "type": "object",
2624
+ "properties": {
2625
+ "name": {
2626
+ "type": "string",
2627
+ "description": "The name of the permission, which follows a specific string pattern and has a maximum byte size."
2628
+ },
2629
+ "child": {
2630
+ "$ref": "#/definitions/Child",
2631
+ "description": "The child related to this permission."
2632
+ }
2633
+ },
2634
+ "description": "The PermissionDefinition message provides detailed information about a specific permission."
2635
+ },
2636
+ "PermissionExpandRequestMetadata": {
2637
+ "type": "object",
2638
+ "properties": {
2639
+ "schema_version": {
2640
+ "type": "string",
2641
+ "description": "Version of the schema."
2642
+ },
2643
+ "snap_token": {
2644
+ "type": "string",
2645
+ "description": "The snap token to avoid stale cache, see more details on [Snap Tokens](../../operations/snap-tokens)."
2646
+ }
2647
+ },
2648
+ "description": "PermissionExpandRequestMetadata metadata for the PermissionExpandRequest."
2649
+ },
2650
+ "PermissionExpandResponse": {
2651
+ "type": "object",
2652
+ "properties": {
2653
+ "tree": {
2654
+ "$ref": "#/definitions/v1.Expand",
2655
+ "description": "Expansion tree."
2656
+ }
2657
+ },
2658
+ "description": "PermissionExpandResponse is the response message for the Expand method in the Permission service."
2659
+ },
2660
+ "PermissionLookupEntityRequestMetadata": {
2661
+ "type": "object",
2662
+ "properties": {
2663
+ "schema_version": {
2664
+ "type": "string",
2665
+ "description": "Version of the schema."
2666
+ },
2667
+ "snap_token": {
2668
+ "type": "string",
2669
+ "description": "The snap token to avoid stale cache, see more details on [Snap Tokens](../../operations/snap-tokens)."
2670
+ },
2671
+ "depth": {
2672
+ "type": "integer",
2673
+ "format": "int32",
2674
+ "description": "Query limit when if recursive database queries got in loop."
2675
+ }
2676
+ },
2677
+ "description": "PermissionLookupEntityRequestMetadata metadata for the PermissionLookupEntityRequest."
2678
+ },
2679
+ "PermissionLookupEntityResponse": {
2680
+ "type": "object",
2681
+ "properties": {
2682
+ "entity_ids": {
2683
+ "type": "array",
2684
+ "items": {
2685
+ "type": "string"
2686
+ },
2687
+ "description": "List of identifiers for entities that match the lookup."
2688
+ },
2689
+ "continuous_token": {
2690
+ "type": "string",
2691
+ "description": "continuous_token is a string that can be used to paginate and retrieve the next set of results."
2692
+ }
2693
+ },
2694
+ "description": "PermissionLookupEntityResponse is the response message for the LookupEntity method in the Permission service."
2695
+ },
2696
+ "PermissionLookupEntityStreamResponse": {
2697
+ "type": "object",
2698
+ "properties": {
2699
+ "entity_id": {
2700
+ "type": "string",
2701
+ "description": "Identifier for an entity that matches the lookup."
2702
+ },
2703
+ "continuous_token": {
2704
+ "type": "string",
2705
+ "description": "continuous_token is a string that can be used to paginate and retrieve the next set of results."
2706
+ }
2707
+ },
2708
+ "description": "PermissionLookupEntityStreamResponse is the response message for the LookupEntityStream method in the Permission service."
2709
+ },
2710
+ "PermissionLookupSubjectRequestMetadata": {
2711
+ "type": "object",
2712
+ "properties": {
2713
+ "schema_version": {
2714
+ "type": "string",
2715
+ "description": "Version of the schema."
2716
+ },
2717
+ "snap_token": {
2718
+ "type": "string",
2719
+ "description": "The snap token to avoid stale cache, see more details on [Snap Tokens](../../operations/snap-tokens)."
2720
+ },
2721
+ "depth": {
2722
+ "type": "integer",
2723
+ "format": "int32",
2724
+ "description": "Query limit when if recursive database queries got in loop."
2725
+ }
2726
+ },
2727
+ "description": "PermissionLookupSubjectRequestMetadata metadata for the PermissionLookupSubjectRequest."
2728
+ },
2729
+ "PermissionLookupSubjectResponse": {
2730
+ "type": "object",
2731
+ "properties": {
2732
+ "subject_ids": {
2733
+ "type": "array",
2734
+ "items": {
2735
+ "type": "string"
2736
+ },
2737
+ "description": "List of identifiers for subjects that match the lookup."
2738
+ },
2739
+ "continuous_token": {
2740
+ "type": "string",
2741
+ "description": "continuous_token is a string that can be used to paginate and retrieve the next set of results."
2742
+ }
2743
+ },
2744
+ "description": "PermissionLookupSubjectResponse is the response message for the LookupSubject method in the Permission service."
2745
+ },
2746
+ "PermissionSubjectPermissionRequestMetadata": {
2747
+ "type": "object",
2748
+ "properties": {
2749
+ "schema_version": {
2750
+ "type": "string",
2751
+ "description": "Version of the schema."
2752
+ },
2753
+ "snap_token": {
2754
+ "type": "string",
2755
+ "description": "The snap token to avoid stale cache, see more details on [Snap Tokens](../../operations/snap-tokens)."
2756
+ },
2757
+ "only_permission": {
2758
+ "type": "boolean",
2759
+ "description": "Whether to only check permissions."
2760
+ },
2761
+ "depth": {
2762
+ "type": "integer",
2763
+ "format": "int32",
2764
+ "description": "Query limit when if recursive database queries got in loop."
2765
+ }
2766
+ },
2767
+ "description": "PermissionSubjectPermissionRequestMetadata metadata for the PermissionSubjectPermissionRequest."
2768
+ },
2769
+ "PermissionSubjectPermissionResponse": {
2770
+ "type": "object",
2771
+ "properties": {
2772
+ "results": {
2773
+ "type": "object",
2774
+ "additionalProperties": {
2775
+ "$ref": "#/definitions/CheckResult"
2776
+ },
2777
+ "description": "Map of results for each permission check."
2778
+ }
2779
+ },
2780
+ "description": "PermissionSubjectPermissionResponse is the response message for the SubjectPermission method in the Permission service."
2781
+ },
2782
+ "PrimitiveType": {
2783
+ "type": "string",
2784
+ "enum": [
2785
+ "BOOL",
2786
+ "INT64",
2787
+ "UINT64",
2788
+ "DOUBLE",
2789
+ "STRING",
2790
+ "BYTES"
2791
+ ],
2792
+ "description": "CEL primitive types.\n\n - BOOL: Boolean type.\n - INT64: Int64 type.\n\nProto-based integer values are widened to int64.\n - UINT64: Uint64 type.\n\nProto-based unsigned integer values are widened to uint64.\n - DOUBLE: Double type.\n\nProto-based float values are widened to double values.\n - STRING: String type.\n - BYTES: Bytes type."
2793
+ },
2794
+ "ReadAttributesBody": {
2795
+ "type": "object",
2796
+ "properties": {
2797
+ "metadata": {
2798
+ "$ref": "#/definitions/AttributeReadRequestMetadata",
2799
+ "description": "metadata holds additional information related to the request."
2800
+ },
2801
+ "filter": {
2802
+ "$ref": "#/definitions/AttributeFilter",
2803
+ "description": "filter specifies the criteria used to select the attributes that should be returned."
2804
+ },
2805
+ "page_size": {
2806
+ "type": "integer",
2807
+ "format": "int64",
2808
+ "description": "page_size specifies the number of results to return in a single page.\nIf more results are available, a continuous_token is included in the response."
2809
+ },
2810
+ "continuous_token": {
2811
+ "type": "string",
2812
+ "description": "continuous_token is used in case of paginated reads to get the next page of results."
2813
+ }
2814
+ },
2815
+ "description": "AttributeReadRequest defines the structure of a request for reading attributes.\nIt includes the tenant_id, metadata, attribute filter, page size for pagination, and a continuous token for multi-page results."
2816
+ },
2817
+ "ReadRelationshipsBody": {
2818
+ "type": "object",
2819
+ "properties": {
2820
+ "metadata": {
2821
+ "$ref": "#/definitions/RelationshipReadRequestMetadata",
2822
+ "description": "metadata holds additional data related to the request."
2823
+ },
2824
+ "filter": {
2825
+ "$ref": "#/definitions/TupleFilter",
2826
+ "description": "filter is used to specify criteria for the data that needs to be read."
2827
+ },
2828
+ "page_size": {
2829
+ "type": "integer",
2830
+ "format": "int64",
2831
+ "description": "page_size specifies the number of results to return in a single page.\nIf more results are available, a continuous_token is included in the response."
2832
+ },
2833
+ "continuous_token": {
2834
+ "type": "string",
2835
+ "description": "continuous_token is used in case of paginated reads to get the next page of results."
2836
+ }
2837
+ },
2838
+ "description": "RelationshipReadRequest defines the structure of a request for reading relationships.\nIt contains the necessary information such as tenant_id, metadata, and filter for the read operation."
2839
+ },
2840
+ "RelationDefinition": {
2841
+ "type": "object",
2842
+ "properties": {
2843
+ "name": {
2844
+ "type": "string",
2845
+ "description": "The name of the relation, which follows a specific string pattern and has a maximum byte size."
2846
+ },
2847
+ "relationReferences": {
2848
+ "type": "array",
2849
+ "items": {
2850
+ "type": "object",
2851
+ "$ref": "#/definitions/RelationReference"
2852
+ },
2853
+ "description": "A list of references to other relations."
2854
+ }
2855
+ },
2856
+ "description": "The RelationDefinition message provides detailed information about a specific relation."
2857
+ },
2858
+ "RelationReference": {
2859
+ "type": "object",
2860
+ "properties": {
2861
+ "type": {
2862
+ "type": "string",
2863
+ "description": "The type of the referenced entity, which follows a specific string pattern and has a maximum byte size."
2864
+ },
2865
+ "relation": {
2866
+ "type": "string",
2867
+ "description": "The name of the referenced relation, which follows a specific string pattern and has a maximum byte size."
2868
+ }
2869
+ },
2870
+ "description": "The RelationReference message provides a reference to a specific relation."
2871
+ },
2872
+ "RelationshipDeleteResponse": {
2873
+ "type": "object",
2874
+ "properties": {
2875
+ "snap_token": {
2876
+ "type": "string",
2877
+ "description": "The snap token to avoid stale cache, see more details on [Snap Tokens](../../operations/snap-tokens)"
2878
+ }
2879
+ },
2880
+ "title": "RelationshipDeleteResponse"
2881
+ },
2882
+ "RelationshipReadRequestMetadata": {
2883
+ "type": "object",
2884
+ "properties": {
2885
+ "snap_token": {
2886
+ "type": "string",
2887
+ "description": "The snap token to avoid stale cache, see more details on [Snap Tokens](../../operations/snap-tokens)"
2888
+ }
2889
+ },
2890
+ "description": "RelationshipReadRequestMetadata defines the structure of the metadata for a read request focused on relationships.\nIt includes the snap_token associated with a particular state of the database."
2891
+ },
2892
+ "RelationshipReadResponse": {
2893
+ "type": "object",
2894
+ "properties": {
2895
+ "tuples": {
2896
+ "type": "array",
2897
+ "items": {
2898
+ "type": "object",
2899
+ "$ref": "#/definitions/Tuple"
2900
+ },
2901
+ "description": "tuples is a list of the relationships retrieved in the read operation, represented as entity-relation-entity triples."
2902
+ },
2903
+ "continuous_token": {
2904
+ "type": "string",
2905
+ "description": "continuous_token is used in the case of paginated reads to retrieve the next page of results."
2906
+ }
2907
+ },
2908
+ "description": "RelationshipReadResponse defines the structure of the response after reading relationships.\nIt includes the tuples representing the relationships and a continuous token for handling result pagination."
2909
+ },
2910
+ "RelationshipWriteRequestMetadata": {
2911
+ "type": "object",
2912
+ "properties": {
2913
+ "schema_version": {
2914
+ "type": "string"
2915
+ }
2916
+ },
2917
+ "title": "RelationshipWriteRequestMetadata"
2918
+ },
2919
+ "RelationshipWriteResponse": {
2920
+ "type": "object",
2921
+ "properties": {
2922
+ "snap_token": {
2923
+ "type": "string",
2924
+ "description": "The snap token to avoid stale cache, see more details on [Snap Tokens](../../operations/snap-tokens)"
2925
+ }
2926
+ },
2927
+ "title": "RelationshipWriteResponse"
2928
+ },
2929
+ "Rewrite": {
2930
+ "type": "object",
2931
+ "properties": {
2932
+ "rewriteOperation": {
2933
+ "$ref": "#/definitions/Rewrite.Operation",
2934
+ "description": "The type of rewrite operation to be performed."
2935
+ },
2936
+ "children": {
2937
+ "type": "array",
2938
+ "items": {
2939
+ "type": "object",
2940
+ "$ref": "#/definitions/Child"
2941
+ },
2942
+ "description": "A list of children that are operated upon by the rewrite operation."
2943
+ }
2944
+ },
2945
+ "description": "The Rewrite message represents a specific rewrite operation.\nThis operation could be one of the following: union, intersection, or exclusion."
2946
+ },
2947
+ "Rewrite.Operation": {
2948
+ "type": "string",
2949
+ "enum": [
2950
+ "OPERATION_UNION",
2951
+ "OPERATION_INTERSECTION",
2952
+ "OPERATION_EXCLUSION"
2953
+ ],
2954
+ "description": "Operation enum includes potential rewrite operations.\nOPERATION_UNION: Represents a union operation.\nOPERATION_INTERSECTION: Represents an intersection operation.\nOPERATION_EXCLUSION: Represents an exclusion operation.\n\n - OPERATION_UNION: Represents a union operation.\n - OPERATION_INTERSECTION: Represents an intersection operation.\n - OPERATION_EXCLUSION: Represents an exclusion operation."
2955
+ },
2956
+ "RuleDefinition": {
2957
+ "type": "object",
2958
+ "properties": {
2959
+ "name": {
2960
+ "type": "string",
2961
+ "description": "The name of the rule, which follows a specific string pattern and has a maximum byte size."
2962
+ },
2963
+ "arguments": {
2964
+ "type": "object",
2965
+ "additionalProperties": {
2966
+ "$ref": "#/definitions/AttributeType"
2967
+ },
2968
+ "description": "Map of arguments for this rule. The key is the attribute name, and the value is the AttributeType."
2969
+ },
2970
+ "expression": {
2971
+ "$ref": "#/definitions/CheckedExpr",
2972
+ "description": "The expression for this rule in the form of a google.api.expr.v1alpha1.CheckedExpr."
2973
+ }
2974
+ },
2975
+ "description": "The RuleDefinition message provides detailed information about a specific rule."
2976
+ },
2977
+ "RunBundleBody": {
2978
+ "type": "object",
2979
+ "properties": {
2980
+ "name": {
2981
+ "type": "string",
2982
+ "description": "Name of the bundle to be executed."
2983
+ },
2984
+ "arguments": {
2985
+ "type": "object",
2986
+ "additionalProperties": {
2987
+ "type": "string"
2988
+ },
2989
+ "description": "Additional key-value pairs for execution arguments."
2990
+ }
2991
+ },
2992
+ "description": "BundleRunRequest is used to request the execution of a bundle.\nIt includes tenant_id, the name of the bundle, and additional arguments for execution."
2993
+ },
2994
+ "Schema.ListBody": {
2995
+ "type": "object",
2996
+ "properties": {
2997
+ "page_size": {
2998
+ "type": "integer",
2999
+ "format": "int64",
3000
+ "description": "page_size is the number of schemas to be returned in the response.\nThe value should be between 1 and 100."
3001
+ },
3002
+ "continuous_token": {
3003
+ "type": "string",
3004
+ "description": "continuous_token is an optional parameter used for pagination.\nIt should be the value received in the previous response."
3005
+ }
3006
+ },
3007
+ "description": "SchemaListRequest is the request message for the List method in the Schema service.\nIt contains tenant_id for which the schemas are to be listed."
3008
+ },
3009
+ "Schema.ReadBody": {
3010
+ "type": "object",
3011
+ "properties": {
3012
+ "metadata": {
3013
+ "$ref": "#/definitions/SchemaReadRequestMetadata",
3014
+ "description": "metadata is the additional information needed for the Read request."
3015
+ }
3016
+ },
3017
+ "description": "SchemaReadRequest is the request message for the Read method in the Schema service.\nIt contains tenant_id and metadata about the schema to be read."
3018
+ },
3019
+ "Schema.WriteBody": {
3020
+ "type": "object",
3021
+ "properties": {
3022
+ "schema": {
3023
+ "type": "string",
3024
+ "description": "schema is the string representation of the schema to be written."
3025
+ }
3026
+ },
3027
+ "description": "SchemaWriteRequest is the request message for the Write method in the Schema service.\nIt contains tenant_id and the schema to be written."
3028
+ },
3029
+ "SchemaDefinition": {
3030
+ "type": "object",
3031
+ "properties": {
3032
+ "entityDefinitions": {
3033
+ "type": "object",
3034
+ "additionalProperties": {
3035
+ "$ref": "#/definitions/EntityDefinition"
3036
+ },
3037
+ "description": "Map of entity definitions. The key is the entity name, and the value is the corresponding EntityDefinition."
3038
+ },
3039
+ "ruleDefinitions": {
3040
+ "type": "object",
3041
+ "additionalProperties": {
3042
+ "$ref": "#/definitions/RuleDefinition"
3043
+ },
3044
+ "description": "Map of rule definitions. The key is the rule name, and the value is the corresponding RuleDefinition."
3045
+ },
3046
+ "references": {
3047
+ "type": "object",
3048
+ "additionalProperties": {
3049
+ "$ref": "#/definitions/SchemaDefinition.Reference"
3050
+ },
3051
+ "description": "Map of references to signify whether a string refers to an entity or a rule."
3052
+ }
3053
+ },
3054
+ "description": "The SchemaDefinition message provides definitions for entities and rules,\nand includes references to clarify whether a name refers to an entity or a rule."
3055
+ },
3056
+ "SchemaDefinition.Reference": {
3057
+ "type": "string",
3058
+ "enum": [
3059
+ "REFERENCE_ENTITY",
3060
+ "REFERENCE_RULE"
3061
+ ],
3062
+ "description": "The Reference enum helps distinguish whether a name corresponds to an entity or a rule.\n\n - REFERENCE_ENTITY: Indicates that the name refers to an entity.\n - REFERENCE_RULE: Indicates that the name refers to a rule."
3063
+ },
3064
+ "SchemaList": {
3065
+ "type": "object",
3066
+ "properties": {
3067
+ "version": {
3068
+ "type": "string"
3069
+ },
3070
+ "created_at": {
3071
+ "type": "string"
3072
+ }
3073
+ },
3074
+ "title": "SchemaList provides a list of schema versions with their corresponding creation timestamps"
3075
+ },
3076
+ "SchemaListResponse": {
3077
+ "type": "object",
3078
+ "properties": {
3079
+ "head": {
3080
+ "type": "string",
3081
+ "title": "head of the schemas is the latest version available for the tenant"
3082
+ },
3083
+ "schemas": {
3084
+ "type": "array",
3085
+ "items": {
3086
+ "type": "object",
3087
+ "$ref": "#/definitions/SchemaList"
3088
+ },
3089
+ "title": "list of schema versions with creation timestamps"
3090
+ },
3091
+ "continuous_token": {
3092
+ "type": "string",
3093
+ "description": "continuous_token is a string that can be used to paginate and retrieve the next set of results."
3094
+ }
3095
+ },
3096
+ "title": "SchemaListResponse is the response message for the List method in the Schema service.\nIt returns a paginated list of schemas"
3097
+ },
3098
+ "SchemaPartialWriteRequestMetadata": {
3099
+ "type": "object",
3100
+ "properties": {
3101
+ "schema_version": {
3102
+ "type": "string",
3103
+ "description": "schema_version is the string that identifies the version of the schema to be read."
3104
+ }
3105
+ },
3106
+ "description": "SchemaPartialWriteRequestMetadata provides additional information for the Schema Partial Write request.\nIt contains schema_version to specify which version of the schema should be read."
3107
+ },
3108
+ "SchemaPartialWriteResponse": {
3109
+ "type": "object",
3110
+ "properties": {
3111
+ "schema_version": {
3112
+ "type": "string",
3113
+ "description": "schema_version is the string that identifies the version of the written schema."
3114
+ }
3115
+ },
3116
+ "description": "SchemaPartialWriteResponse is the response message for the Parietal Write method in the Schema service.\nIt returns the requested schema."
3117
+ },
3118
+ "SchemaReadRequestMetadata": {
3119
+ "type": "object",
3120
+ "properties": {
3121
+ "schema_version": {
3122
+ "type": "string",
3123
+ "description": "schema_version is the string that identifies the version of the schema to be read."
3124
+ }
3125
+ },
3126
+ "description": "SchemaReadRequestMetadata provides additional information for the Schema Read request.\nIt contains schema_version to specify which version of the schema should be read."
3127
+ },
3128
+ "SchemaReadResponse": {
3129
+ "type": "object",
3130
+ "properties": {
3131
+ "schema": {
3132
+ "$ref": "#/definitions/SchemaDefinition",
3133
+ "description": "schema is the SchemaDefinition that represents the read schema."
3134
+ }
3135
+ },
3136
+ "description": "SchemaReadResponse is the response message for the Read method in the Schema service.\nIt returns the requested schema."
3137
+ },
3138
+ "SchemaWriteResponse": {
3139
+ "type": "object",
3140
+ "properties": {
3141
+ "schema_version": {
3142
+ "type": "string",
3143
+ "description": "schema_version is the string that identifies the version of the written schema."
3144
+ }
3145
+ },
3146
+ "description": "SchemaWriteResponse is the response message for the Write method in the Schema service.\nIt returns the version of the written schema."
3147
+ },
3148
+ "Select": {
3149
+ "type": "object",
3150
+ "properties": {
3151
+ "operand": {
3152
+ "$ref": "#/definitions/Expr",
3153
+ "description": "Required. The target of the selection expression.\n\nFor example, in the select expression `request.auth`, the `request`\nportion of the expression is the `operand`."
3154
+ },
3155
+ "field": {
3156
+ "type": "string",
3157
+ "description": "Required. The name of the field to select.\n\nFor example, in the select expression `request.auth`, the `auth` portion\nof the expression would be the `field`."
3158
+ },
3159
+ "testOnly": {
3160
+ "type": "boolean",
3161
+ "description": "Whether the select is to be interpreted as a field presence test.\n\nThis results from the macro `has(request.auth)`."
3162
+ }
3163
+ },
3164
+ "description": "A field selection expression. e.g. `request.auth`."
3165
+ },
3166
+ "SourceInfo": {
3167
+ "type": "object",
3168
+ "properties": {
3169
+ "syntaxVersion": {
3170
+ "type": "string",
3171
+ "description": "The syntax version of the source, e.g. `cel1`."
3172
+ },
3173
+ "location": {
3174
+ "type": "string",
3175
+ "description": "The location name. All position information attached to an expression is\nrelative to this location.\n\nThe location could be a file, UI element, or similar. For example,\n`acme/app/AnvilPolicy.cel`."
3176
+ },
3177
+ "lineOffsets": {
3178
+ "type": "array",
3179
+ "items": {
3180
+ "type": "integer",
3181
+ "format": "int32"
3182
+ },
3183
+ "description": "Monotonically increasing list of code point offsets where newlines\n`\\n` appear.\n\nThe line number of a given position is the index `i` where for a given\n`id` the `line_offsets[i] \u003c id_positions[id] \u003c line_offsets[i+1]`. The\ncolumn may be derivd from `id_positions[id] - line_offsets[i]`."
3184
+ },
3185
+ "positions": {
3186
+ "type": "object",
3187
+ "additionalProperties": {
3188
+ "type": "integer",
3189
+ "format": "int32"
3190
+ },
3191
+ "description": "A map from the parse node id (e.g. `Expr.id`) to the code point offset\nwithin the source."
3192
+ },
3193
+ "macroCalls": {
3194
+ "type": "object",
3195
+ "additionalProperties": {
3196
+ "$ref": "#/definitions/Expr"
3197
+ },
3198
+ "description": "A map from the parse node id where a macro replacement was made to the\ncall `Expr` that resulted in a macro expansion.\n\nFor example, `has(value.field)` is a function call that is replaced by a\n`test_only` field selection in the AST. Likewise, the call\n`list.exists(e, e \u003e 10)` translates to a comprehension expression. The key\nin the map corresponds to the expression id of the expanded macro, and the\nvalue is the call `Expr` that was replaced."
3199
+ },
3200
+ "extensions": {
3201
+ "type": "array",
3202
+ "items": {
3203
+ "type": "object",
3204
+ "$ref": "#/definitions/Extension"
3205
+ },
3206
+ "description": "A list of tags for extensions that were used while parsing or type checking\nthe source expression. For example, optimizations that require special\nruntime support may be specified.\n\nThese are used to check feature support between components in separate\nimplementations. This can be used to either skip redundant work or\nreport an error if the extension is unsupported."
3207
+ }
3208
+ },
3209
+ "description": "Source information collected at parse time."
3210
+ },
3211
+ "Status": {
3212
+ "type": "object",
3213
+ "properties": {
3214
+ "code": {
3215
+ "type": "integer",
3216
+ "format": "int32"
3217
+ },
3218
+ "message": {
3219
+ "type": "string"
3220
+ },
3221
+ "details": {
3222
+ "type": "array",
3223
+ "items": {
3224
+ "type": "object",
3225
+ "$ref": "#/definitions/Any"
3226
+ }
3227
+ }
3228
+ }
3229
+ },
3230
+ "StringArrayValue": {
3231
+ "type": "object",
3232
+ "properties": {
3233
+ "data": {
3234
+ "type": "array",
3235
+ "items": {
3236
+ "type": "string"
3237
+ },
3238
+ "description": "The array of strings."
3239
+ }
3240
+ },
3241
+ "description": "Wrapper for an array of strings."
3242
+ },
3243
+ "Subject": {
3244
+ "type": "object",
3245
+ "properties": {
3246
+ "type": {
3247
+ "type": "string"
3248
+ },
3249
+ "id": {
3250
+ "type": "string"
3251
+ },
3252
+ "relation": {
3253
+ "type": "string"
3254
+ }
3255
+ },
3256
+ "description": "Subject represents an entity subject with a type, an identifier, and a relation."
3257
+ },
3258
+ "SubjectFilter": {
3259
+ "type": "object",
3260
+ "properties": {
3261
+ "type": {
3262
+ "type": "string",
3263
+ "title": "Type of the subject"
3264
+ },
3265
+ "ids": {
3266
+ "type": "array",
3267
+ "items": {
3268
+ "type": "string"
3269
+ },
3270
+ "title": "List of subject IDs"
3271
+ },
3272
+ "relation": {
3273
+ "type": "string"
3274
+ }
3275
+ },
3276
+ "description": "SubjectFilter is used to filter subjects based on the type, ids and relation."
3277
+ },
3278
+ "SubjectPermissionBody": {
3279
+ "type": "object",
3280
+ "properties": {
3281
+ "metadata": {
3282
+ "$ref": "#/definitions/PermissionSubjectPermissionRequestMetadata",
3283
+ "description": "Metadata associated with this request, required."
3284
+ },
3285
+ "entity": {
3286
+ "$ref": "#/definitions/Entity",
3287
+ "description": "Entity for which to check the permission, required."
3288
+ },
3289
+ "subject": {
3290
+ "$ref": "#/definitions/Subject",
3291
+ "description": "Subject for which to check the permission, required."
3292
+ },
3293
+ "context": {
3294
+ "$ref": "#/definitions/Context",
3295
+ "description": "Context associated with this request."
3296
+ }
3297
+ },
3298
+ "description": "PermissionSubjectPermissionRequest is the request message for the SubjectPermission method in the Permission service."
3299
+ },
3300
+ "Subjects": {
3301
+ "type": "object",
3302
+ "properties": {
3303
+ "subjects": {
3304
+ "type": "array",
3305
+ "items": {
3306
+ "type": "object",
3307
+ "$ref": "#/definitions/Subject"
3308
+ },
3309
+ "description": "A list of subjects."
3310
+ }
3311
+ },
3312
+ "description": "Subjects holds a repeated field of Subject type."
3313
+ },
3314
+ "Tenant": {
3315
+ "type": "object",
3316
+ "properties": {
3317
+ "id": {
3318
+ "type": "string",
3319
+ "description": "The ID of the tenant."
3320
+ },
3321
+ "name": {
3322
+ "type": "string",
3323
+ "description": "The name of the tenant."
3324
+ },
3325
+ "created_at": {
3326
+ "type": "string",
3327
+ "format": "date-time",
3328
+ "description": "The time at which the tenant was created."
3329
+ }
3330
+ },
3331
+ "description": "Tenant represents a tenant with an id, a name, and a timestamp indicating when it was created."
3332
+ },
3333
+ "TenantCreateRequest": {
3334
+ "type": "object",
3335
+ "properties": {
3336
+ "id": {
3337
+ "type": "string",
3338
+ "description": "id is a unique identifier for the tenant."
3339
+ },
3340
+ "name": {
3341
+ "type": "string",
3342
+ "description": "name is the name of the tenant."
3343
+ }
3344
+ },
3345
+ "description": "TenantCreateRequest is the message used for the request to create a tenant."
3346
+ },
3347
+ "TenantCreateResponse": {
3348
+ "type": "object",
3349
+ "properties": {
3350
+ "tenant": {
3351
+ "$ref": "#/definitions/Tenant",
3352
+ "description": "tenant is the created tenant information."
3353
+ }
3354
+ },
3355
+ "description": "TenantCreateResponse is the message returned from the request to create a tenant."
3356
+ },
3357
+ "TenantDeleteResponse": {
3358
+ "type": "object",
3359
+ "properties": {
3360
+ "tenant_id": {
3361
+ "type": "string",
3362
+ "description": "tenant_id is the tenant id that was deleted."
3363
+ }
3364
+ },
3365
+ "description": "TenantDeleteResponse is the message returned from the request to delete a tenant."
3366
+ },
3367
+ "TenantListRequest": {
3368
+ "type": "object",
3369
+ "properties": {
3370
+ "page_size": {
3371
+ "type": "integer",
3372
+ "format": "int64",
3373
+ "description": "page_size is the number of tenants to be returned in the response.\nThe value should be between 1 and 100."
3374
+ },
3375
+ "continuous_token": {
3376
+ "type": "string",
3377
+ "description": "continuous_token is an optional parameter used for pagination.\nIt should be the value received in the previous response."
3378
+ }
3379
+ },
3380
+ "description": "TenantListRequest is the message used for the request to list all tenants."
3381
+ },
3382
+ "TenantListResponse": {
3383
+ "type": "object",
3384
+ "properties": {
3385
+ "tenants": {
3386
+ "type": "array",
3387
+ "items": {
3388
+ "type": "object",
3389
+ "$ref": "#/definitions/Tenant"
3390
+ },
3391
+ "description": "tenants is a list of tenants."
3392
+ },
3393
+ "continuous_token": {
3394
+ "type": "string",
3395
+ "description": "continuous_token is a string that can be used to paginate and retrieve the next set of results."
3396
+ }
3397
+ },
3398
+ "description": "TenantListResponse is the message returned from the request to list all tenants."
3399
+ },
3400
+ "Tuple": {
3401
+ "type": "object",
3402
+ "properties": {
3403
+ "entity": {
3404
+ "$ref": "#/definitions/Entity"
3405
+ },
3406
+ "relation": {
3407
+ "type": "string"
3408
+ },
3409
+ "subject": {
3410
+ "$ref": "#/definitions/Subject"
3411
+ }
3412
+ },
3413
+ "description": "Tuple is a structure that includes an entity, a relation, and a subject."
3414
+ },
3415
+ "TupleFilter": {
3416
+ "type": "object",
3417
+ "properties": {
3418
+ "entity": {
3419
+ "$ref": "#/definitions/EntityFilter"
3420
+ },
3421
+ "relation": {
3422
+ "type": "string"
3423
+ },
3424
+ "subject": {
3425
+ "$ref": "#/definitions/SubjectFilter",
3426
+ "title": "The subject filter"
3427
+ }
3428
+ },
3429
+ "description": "TupleFilter is used to filter tuples based on the entity, relation and the subject."
3430
+ },
3431
+ "TupleSet": {
3432
+ "type": "object",
3433
+ "properties": {
3434
+ "relation": {
3435
+ "type": "string"
3436
+ }
3437
+ },
3438
+ "description": "TupleSet represents a set of tuples associated with a specific relation."
3439
+ },
3440
+ "TupleToUserSet": {
3441
+ "type": "object",
3442
+ "properties": {
3443
+ "tupleSet": {
3444
+ "$ref": "#/definitions/TupleSet",
3445
+ "title": "The tuple set"
3446
+ },
3447
+ "computed": {
3448
+ "$ref": "#/definitions/ComputedUserSet",
3449
+ "title": "The computed user set"
3450
+ }
3451
+ },
3452
+ "description": "TupleToUserSet defines a mapping from tuple sets to computed user sets."
3453
+ },
3454
+ "Values": {
3455
+ "type": "object",
3456
+ "properties": {
3457
+ "values": {
3458
+ "type": "object",
3459
+ "additionalProperties": {
3460
+ "$ref": "#/definitions/Any"
3461
+ }
3462
+ }
3463
+ }
3464
+ },
3465
+ "Version": {
3466
+ "type": "object",
3467
+ "properties": {
3468
+ "major": {
3469
+ "type": "string",
3470
+ "format": "int64",
3471
+ "description": "Major version changes indicate different required support level from\nthe required components."
3472
+ },
3473
+ "minor": {
3474
+ "type": "string",
3475
+ "format": "int64",
3476
+ "description": "Minor version changes must not change the observed behavior from\nexisting implementations, but may be provided informationally."
3477
+ }
3478
+ },
3479
+ "title": "Version"
3480
+ },
3481
+ "WatchBody": {
3482
+ "type": "object",
3483
+ "properties": {
3484
+ "snap_token": {
3485
+ "type": "string",
3486
+ "description": "The snap token to avoid stale cache, see more details on [Snap Tokens](../../operations/snap-tokens)."
3487
+ }
3488
+ },
3489
+ "description": "WatchRequest is the request message for the Watch RPC. It contains the\ndetails needed to establish a watch stream."
3490
+ },
3491
+ "WatchResponse": {
3492
+ "type": "object",
3493
+ "properties": {
3494
+ "changes": {
3495
+ "$ref": "#/definitions/DataChanges",
3496
+ "description": "Changes in the data."
3497
+ }
3498
+ },
3499
+ "description": "WatchResponse is the response message for the Watch RPC. It contains the\nchanges in the data that are being watched."
3500
+ },
3501
+ "WellKnownType": {
3502
+ "type": "string",
3503
+ "enum": [
3504
+ "ANY",
3505
+ "TIMESTAMP",
3506
+ "DURATION"
3507
+ ],
3508
+ "description": "Well-known protobuf types treated with first-class support in CEL.\n\n - ANY: Well-known protobuf.Any type.\n\nAny types are a polymorphic message type. During type-checking they are\ntreated like `DYN` types, but at runtime they are resolved to a specific\nmessage type specified at evaluation time.\n - TIMESTAMP: Well-known protobuf.Timestamp type, internally referenced as `timestamp`.\n - DURATION: Well-known protobuf.Duration type, internally referenced as `duration`."
3509
+ },
3510
+ "WriteRelationshipsBody": {
3511
+ "type": "object",
3512
+ "properties": {
3513
+ "metadata": {
3514
+ "$ref": "#/definitions/RelationshipWriteRequestMetadata",
3515
+ "description": "Metadata for the request. It's required."
3516
+ },
3517
+ "tuples": {
3518
+ "type": "array",
3519
+ "items": {
3520
+ "type": "object",
3521
+ "$ref": "#/definitions/Tuple"
3522
+ },
3523
+ "description": "List of tuples for the request. Must have between 1 and 100 items."
3524
+ }
3525
+ },
3526
+ "description": "Represents a request to write relationship data."
3527
+ },
3528
+ "v1.Call": {
3529
+ "type": "object",
3530
+ "properties": {
3531
+ "ruleName": {
3532
+ "type": "string",
3533
+ "title": "Name of the rule"
3534
+ },
3535
+ "arguments": {
3536
+ "type": "array",
3537
+ "items": {
3538
+ "type": "object",
3539
+ "$ref": "#/definitions/Argument"
3540
+ },
3541
+ "title": "Arguments passed to the rule"
3542
+ }
3543
+ },
3544
+ "description": "Call represents a call to a rule. It includes the name of the rule and the arguments passed to it."
3545
+ },
3546
+ "v1.Expand": {
3547
+ "type": "object",
3548
+ "properties": {
3549
+ "entity": {
3550
+ "$ref": "#/definitions/Entity",
3551
+ "description": "entity is the entity for which the hierarchical structure is defined."
3552
+ },
3553
+ "permission": {
3554
+ "type": "string",
3555
+ "description": "permission is the permission applied to the entity."
3556
+ },
3557
+ "arguments": {
3558
+ "type": "array",
3559
+ "items": {
3560
+ "type": "object",
3561
+ "$ref": "#/definitions/Argument"
3562
+ },
3563
+ "description": "arguments are the additional information or context used to evaluate permissions."
3564
+ },
3565
+ "expand": {
3566
+ "$ref": "#/definitions/ExpandTreeNode",
3567
+ "description": "expand contains another hierarchical structure."
3568
+ },
3569
+ "leaf": {
3570
+ "$ref": "#/definitions/ExpandLeaf",
3571
+ "description": "leaf contains a set of subjects."
3572
+ }
3573
+ },
3574
+ "description": "Expand is used to define a hierarchical structure for permissions.\nIt has an entity, permission, and arguments. The node can be either another hierarchical structure or a set of subjects."
3575
+ },
3576
+ "v1.Operation": {
3577
+ "type": "object",
3578
+ "properties": {
3579
+ "relationships_write": {
3580
+ "type": "array",
3581
+ "items": {
3582
+ "type": "string"
3583
+ },
3584
+ "description": "'relationships_write' is a repeated string field for storing relationship keys\nthat are to be written or created."
3585
+ },
3586
+ "relationships_delete": {
3587
+ "type": "array",
3588
+ "items": {
3589
+ "type": "string"
3590
+ },
3591
+ "description": "'relationships_delete' is a repeated string field for storing relationship keys\nthat are to be deleted or removed."
3592
+ },
3593
+ "attributes_write": {
3594
+ "type": "array",
3595
+ "items": {
3596
+ "type": "string"
3597
+ },
3598
+ "description": "'attributes_write' is a repeated string field for storing attribute keys\nthat are to be written or created."
3599
+ },
3600
+ "attributes_delete": {
3601
+ "type": "array",
3602
+ "items": {
3603
+ "type": "string"
3604
+ },
3605
+ "description": "'attributes_delete' is a repeated string field for storing attribute keys\nthat are to be deleted or removed."
3606
+ }
3607
+ },
3608
+ "description": "Operation is a message representing a series of operations that can be performed.\nIt includes fields for writing and deleting relationships and attributes."
3609
+ },
3610
+ "v1alpha1.Reference": {
3611
+ "type": "object",
3612
+ "properties": {
3613
+ "name": {
3614
+ "type": "string",
3615
+ "description": "The fully qualified name of the declaration."
3616
+ },
3617
+ "overloadId": {
3618
+ "type": "array",
3619
+ "items": {
3620
+ "type": "string"
3621
+ },
3622
+ "description": "For references to functions, this is a list of `Overload.overload_id`\nvalues which match according to typing rules.\n\nIf the list has more than one element, overload resolution among the\npresented candidates must happen at runtime because of dynamic types. The\ntype checker attempts to narrow down this list as much as possible.\n\nEmpty if this is not a reference to a\n[Decl.FunctionDecl][google.api.expr.v1alpha1.Decl.FunctionDecl]."
3623
+ },
3624
+ "value": {
3625
+ "$ref": "#/definitions/Constant",
3626
+ "description": "For references to constants, this may contain the value of the\nconstant if known at compile time."
3627
+ }
3628
+ },
3629
+ "description": "Describes a resolved reference to a declaration."
3630
+ },
3631
+ "v1alpha1.Type": {
3632
+ "type": "object",
3633
+ "properties": {
3634
+ "dyn": {
3635
+ "type": "object",
3636
+ "properties": {},
3637
+ "description": "Dynamic type."
3638
+ },
3639
+ "null": {
3640
+ "type": "string",
3641
+ "description": "Null value."
3642
+ },
3643
+ "primitive": {
3644
+ "$ref": "#/definitions/PrimitiveType",
3645
+ "description": "Primitive types: `true`, `1u`, `-2.0`, `'string'`, `b'bytes'`."
3646
+ },
3647
+ "wrapper": {
3648
+ "$ref": "#/definitions/PrimitiveType",
3649
+ "description": "Wrapper of a primitive type, e.g. `google.protobuf.Int64Value`."
3650
+ },
3651
+ "wellKnown": {
3652
+ "$ref": "#/definitions/WellKnownType",
3653
+ "description": "Well-known protobuf type such as `google.protobuf.Timestamp`."
3654
+ },
3655
+ "listType": {
3656
+ "$ref": "#/definitions/ListType",
3657
+ "description": "Parameterized list with elements of `list_type`, e.g. `list\u003ctimestamp\u003e`."
3658
+ },
3659
+ "mapType": {
3660
+ "$ref": "#/definitions/MapType",
3661
+ "description": "Parameterized map with typed keys and values."
3662
+ },
3663
+ "function": {
3664
+ "$ref": "#/definitions/FunctionType",
3665
+ "description": "Function type."
3666
+ },
3667
+ "messageType": {
3668
+ "type": "string",
3669
+ "description": "Protocol buffer message type.\n\nThe `message_type` string specifies the qualified message type name. For\nexample, `google.plus.Profile`."
3670
+ },
3671
+ "typeParam": {
3672
+ "type": "string",
3673
+ "description": "Type param type.\n\nThe `type_param` string specifies the type parameter name, e.g. `list\u003cE\u003e`\nwould be a `list_type` whose element type was a `type_param` type\nnamed `E`."
3674
+ },
3675
+ "type": {
3676
+ "$ref": "#/definitions/v1alpha1.Type",
3677
+ "description": "Type type.\n\nThe `type` value specifies the target type. e.g. int is type with a\ntarget type of `Primitive.INT`."
3678
+ },
3679
+ "error": {
3680
+ "type": "object",
3681
+ "properties": {},
3682
+ "description": "Error type.\n\nDuring type-checking if an expression is an error, its type is propagated\nas the `ERROR` type. This permits the type-checker to discover other\nerrors present in the expression."
3683
+ },
3684
+ "abstractType": {
3685
+ "$ref": "#/definitions/AbstractType",
3686
+ "description": "Abstract, application defined type."
3687
+ }
3688
+ },
3689
+ "description": "Represents a CEL type."
3690
+ }
3691
+ },
3692
+ "securityDefinitions": {
3693
+ "ApiKeyAuth": {
3694
+ "type": "apiKey",
3695
+ "name": "Authorization",
3696
+ "in": "header"
3697
+ }
3698
+ }
3699
+ }