Skip to content

Commit caa870e

Browse files
authored
chore: update Java SDK from latest OpenAPI specification
1 parent 29e60b5 commit caa870e

File tree

297 files changed

+2436
-293
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

297 files changed

+2436
-293
lines changed

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ plugins {
99
}
1010

1111
group = 'co.permify'
12-
version = '1.4.4'
12+
version = '1.5.4'
1313

1414
repositories {
1515
mavenCentral()

docs/BulkCheckBody.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
2+
3+
# BulkCheckBody
4+
5+
PermissionBulkCheckRequest is the request message for the BulkCheck method in the Permission service.
6+
7+
## Properties
8+
9+
| Name | Type | Description | Notes |
10+
|------------ | ------------- | ------------- | -------------|
11+
|**metadata** | [**PermissionCheckRequestMetadata**](PermissionCheckRequestMetadata.md) | | [optional] |
12+
|**items** | [**List<PermissionBulkCheckRequestItem>**](PermissionBulkCheckRequestItem.md) | List of permission check requests, maximum 100 items. | [optional] |
13+
|**context** | [**Context**](Context.md) | | [optional] |
14+
|**arguments** | [**List<Argument>**](Argument.md) | Additional arguments associated with this request. | [optional] |
15+
16+
17+

docs/Component.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
2+
3+
# Component
4+
5+
## Enum
6+
7+
8+
* `PARSER` (value: `"COMPONENT_PARSER"`)
9+
10+
* `TYPE_CHECKER` (value: `"COMPONENT_TYPE_CHECKER"`)
11+
12+
* `RUNTIME` (value: `"COMPONENT_RUNTIME"`)
13+
14+
15+

docs/Comprehension.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,14 @@
22

33
# Comprehension
44

5-
A comprehension expression applied to a list or map. Comprehensions are not part of the core syntax, but enabled with macros. A macro matches a specific call signature within a parsed AST and replaces the call with an alternate AST block. Macro expansion happens at parse time. The following macros are supported within CEL: Aggregate type macros may be applied to all elements in a list or all keys in a map: * `all`, `exists`, `exists_one` - test a predicate expression against the inputs and return `true` if the predicate is satisfied for all, any, or only one value `list.all(x, x < 10)`. * `filter` - test a predicate expression against the inputs and return the subset of elements which satisfy the predicate: `payments.filter(p, p > 1000)`. * `map` - apply an expression to all elements in the input and return the output aggregate type: `[1, 2, 3].map(i, i * i)`. The `has(m.x)` macro tests whether the property `x` is present in struct `m`. The semantics of this macro depend on the type of `m`. For proto2 messages `has(m.x)` is defined as 'defined, but not set`. For proto3, the macro tests whether the property is set to its default. For map and struct types, the macro tests whether the property `x` is defined on `m`.
5+
A comprehension expression applied to a list or map. Comprehensions are not part of the core syntax, but enabled with macros. A macro matches a specific call signature within a parsed AST and replaces the call with an alternate AST block. Macro expansion happens at parse time. The following macros are supported within CEL: Aggregate type macros may be applied to all elements in a list or all keys in a map: * `all`, `exists`, `exists_one` - test a predicate expression against the inputs and return `true` if the predicate is satisfied for all, any, or only one value `list.all(x, x < 10)`. * `filter` - test a predicate expression against the inputs and return the subset of elements which satisfy the predicate: `payments.filter(p, p > 1000)`. * `map` - apply an expression to all elements in the input and return the output aggregate type: `[1, 2, 3].map(i, i * i)`. The `has(m.x)` macro tests whether the property `x` is present in struct `m`. The semantics of this macro depend on the type of `m`. For proto2 messages `has(m.x)` is defined as 'defined, but not set`. For proto3, the macro tests whether the property is set to its default. For map and struct types, the macro tests whether the property `x` is defined on `m`. Comprehensions for the standard environment macros evaluation can be best visualized as the following pseudocode: ``` let `accu_var` = `accu_init` for (let `iter_var` in `iter_range`) { if (!`loop_condition`) { break } `accu_var` = `loop_step` } return `result` ``` Comprehensions for the optional V2 macros which support map-to-map translation differ slightly from the standard environment macros in that they expose both the key or index in addition to the value for each list or map entry: ``` let `accu_var` = `accu_init` for (let `iter_var`, `iter_var2` in `iter_range`) { if (!`loop_condition`) { break } `accu_var` = `loop_step` } return `result` ```
66

77
## Properties
88

99
| Name | Type | Description | Notes |
1010
|------------ | ------------- | ------------- | -------------|
11-
|**iterVar** | **String** | The name of the iteration variable. | [optional] |
11+
|**iterVar** | **String** | The name of the first iteration variable. When the iter_range is a list, this variable is the list element. When the iter_range is a map, this variable is the map entry key. | [optional] |
12+
|**iterVar2** | **String** | The name of the second iteration variable, empty if not set. When the iter_range is a list, this variable is the integer index. When the iter_range is a map, this variable is the map entry value. This field is only set for comprehension v2 macros. | [optional] |
1213
|**iterRange** | [**Expr**](Expr.md) | | [optional] |
1314
|**accuVar** | **String** | The name of the variable used for accumulation of the result. | [optional] |
1415
|**accuInit** | [**Expr**](Expr.md) | | [optional] |

docs/Extension.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
2+
3+
# Extension
4+
5+
An extension that was requested for the source expression.
6+
7+
## Properties
8+
9+
| Name | Type | Description | Notes |
10+
|------------ | ------------- | ------------- | -------------|
11+
|**id** | **String** | | [optional] |
12+
|**affectedComponents** | **List&lt;Component&gt;** | If set, the listed components must understand the extension for the expression to evaluate correctly. This field has set semantics, repeated values should be deduplicated. | [optional] |
13+
|**version** | [**Version**](Version.md) | | [optional] |
14+
15+
16+

docs/PermissionApi.md

Lines changed: 142 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ All URIs are relative to *http://localhost*
44

55
| Method | HTTP request | Description |
66
|------------- | ------------- | -------------|
7+
| [**permissionsBulkCheck**](PermissionApi.md#permissionsBulkCheck) | **POST** /v1/tenants/{tenant_id}/permissions/bulk-check | bulk check api |
8+
| [**permissionsBulkCheckWithHttpInfo**](PermissionApi.md#permissionsBulkCheckWithHttpInfo) | **POST** /v1/tenants/{tenant_id}/permissions/bulk-check | bulk check api |
79
| [**permissionsCheck**](PermissionApi.md#permissionsCheck) | **POST** /v1/tenants/{tenant_id}/permissions/check | check api |
810
| [**permissionsCheckWithHttpInfo**](PermissionApi.md#permissionsCheckWithHttpInfo) | **POST** /v1/tenants/{tenant_id}/permissions/check | check api |
911
| [**permissionsExpand**](PermissionApi.md#permissionsExpand) | **POST** /v1/tenants/{tenant_id}/permissions/expand | expand api |
@@ -19,6 +21,146 @@ All URIs are relative to *http://localhost*
1921

2022

2123

24+
## permissionsBulkCheck
25+
26+
> PermissionBulkCheckResponse permissionsBulkCheck(tenantId, body)
27+
28+
bulk check api
29+
30+
Check multiple permissions in a single request. Maximum 100 requests allowed.
31+
32+
### Example
33+
34+
```java
35+
// Import classes:
36+
import co.permify.sdk.client.ApiClient;
37+
import co.permify.sdk.client.ApiException;
38+
import co.permify.sdk.client.Configuration;
39+
import co.permify.sdk.client.models.*;
40+
import co.permify.sdk.api.PermissionApi;
41+
42+
public class Example {
43+
public static void main(String[] args) {
44+
ApiClient defaultClient = Configuration.getDefaultApiClient();
45+
defaultClient.setBasePath("http://localhost");
46+
47+
PermissionApi apiInstance = new PermissionApi(defaultClient);
48+
String tenantId = "tenantId_example"; // String | Identifier of the tenant, if you are not using multi-tenancy (have only one tenant) use pre-inserted tenant <code>t1</code> for this field. Required, and must match the pattern \\“[a-zA-Z0-9-,]+\\“, max 64 bytes.
49+
BulkCheckBody body = new BulkCheckBody(); // BulkCheckBody |
50+
try {
51+
PermissionBulkCheckResponse result = apiInstance.permissionsBulkCheck(tenantId, body);
52+
System.out.println(result);
53+
} catch (ApiException e) {
54+
System.err.println("Exception when calling PermissionApi#permissionsBulkCheck");
55+
System.err.println("Status code: " + e.getCode());
56+
System.err.println("Reason: " + e.getResponseBody());
57+
System.err.println("Response headers: " + e.getResponseHeaders());
58+
e.printStackTrace();
59+
}
60+
}
61+
}
62+
```
63+
64+
### Parameters
65+
66+
67+
| Name | Type | Description | Notes |
68+
|------------- | ------------- | ------------- | -------------|
69+
| **tenantId** | **String**| Identifier of the tenant, if you are not using multi-tenancy (have only one tenant) use pre-inserted tenant &lt;code&gt;t1&lt;/code&gt; for this field. Required, and must match the pattern \\[a-zA-Z0-9-,]+\\“, max 64 bytes. | |
70+
| **body** | [**BulkCheckBody**](BulkCheckBody.md)| | |
71+
72+
### Return type
73+
74+
[**PermissionBulkCheckResponse**](PermissionBulkCheckResponse.md)
75+
76+
77+
### Authorization
78+
79+
No authorization required
80+
81+
### HTTP request headers
82+
83+
- **Content-Type**: application/json
84+
- **Accept**: application/json
85+
86+
### HTTP response details
87+
| Status code | Description | Response headers |
88+
|-------------|-------------|------------------|
89+
| **200** | A successful response. | - |
90+
| **0** | An unexpected error response. | - |
91+
92+
## permissionsBulkCheckWithHttpInfo
93+
94+
> ApiResponse<PermissionBulkCheckResponse> permissionsBulkCheck permissionsBulkCheckWithHttpInfo(tenantId, body)
95+
96+
bulk check api
97+
98+
Check multiple permissions in a single request. Maximum 100 requests allowed.
99+
100+
### Example
101+
102+
```java
103+
// Import classes:
104+
import co.permify.sdk.client.ApiClient;
105+
import co.permify.sdk.client.ApiException;
106+
import co.permify.sdk.client.ApiResponse;
107+
import co.permify.sdk.client.Configuration;
108+
import co.permify.sdk.client.models.*;
109+
import co.permify.sdk.api.PermissionApi;
110+
111+
public class Example {
112+
public static void main(String[] args) {
113+
ApiClient defaultClient = Configuration.getDefaultApiClient();
114+
defaultClient.setBasePath("http://localhost");
115+
116+
PermissionApi apiInstance = new PermissionApi(defaultClient);
117+
String tenantId = "tenantId_example"; // String | Identifier of the tenant, if you are not using multi-tenancy (have only one tenant) use pre-inserted tenant <code>t1</code> for this field. Required, and must match the pattern \\“[a-zA-Z0-9-,]+\\“, max 64 bytes.
118+
BulkCheckBody body = new BulkCheckBody(); // BulkCheckBody |
119+
try {
120+
ApiResponse<PermissionBulkCheckResponse> response = apiInstance.permissionsBulkCheckWithHttpInfo(tenantId, body);
121+
System.out.println("Status code: " + response.getStatusCode());
122+
System.out.println("Response headers: " + response.getHeaders());
123+
System.out.println("Response body: " + response.getData());
124+
} catch (ApiException e) {
125+
System.err.println("Exception when calling PermissionApi#permissionsBulkCheck");
126+
System.err.println("Status code: " + e.getCode());
127+
System.err.println("Response headers: " + e.getResponseHeaders());
128+
System.err.println("Reason: " + e.getResponseBody());
129+
e.printStackTrace();
130+
}
131+
}
132+
}
133+
```
134+
135+
### Parameters
136+
137+
138+
| Name | Type | Description | Notes |
139+
|------------- | ------------- | ------------- | -------------|
140+
| **tenantId** | **String**| Identifier of the tenant, if you are not using multi-tenancy (have only one tenant) use pre-inserted tenant &lt;code&gt;t1&lt;/code&gt; for this field. Required, and must match the pattern \\[a-zA-Z0-9-,]+\\“, max 64 bytes. | |
141+
| **body** | [**BulkCheckBody**](BulkCheckBody.md)| | |
142+
143+
### Return type
144+
145+
ApiResponse<[**PermissionBulkCheckResponse**](PermissionBulkCheckResponse.md)>
146+
147+
148+
### Authorization
149+
150+
No authorization required
151+
152+
### HTTP request headers
153+
154+
- **Content-Type**: application/json
155+
- **Accept**: application/json
156+
157+
### HTTP response details
158+
| Status code | Description | Response headers |
159+
|-------------|-------------|------------------|
160+
| **200** | A successful response. | - |
161+
| **0** | An unexpected error response. | - |
162+
163+
22164
## permissionsCheck
23165

24166
> PermissionCheckResponse permissionsCheck(tenantId, body)
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
2+
3+
# PermissionBulkCheckRequestItem
4+
5+
6+
## Properties
7+
8+
| Name | Type | Description | Notes |
9+
|------------ | ------------- | ------------- | -------------|
10+
|**entity** | [**Entity**](Entity.md) | | [optional] |
11+
|**permission** | **String** | The action the user wants to perform on the resource | [optional] |
12+
|**subject** | [**Subject**](Subject.md) | | [optional] |
13+
14+
15+
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
2+
3+
# PermissionBulkCheckResponse
4+
5+
PermissionBulkCheckResponse is the response message for the BulkCheck method in the Permission service.
6+
7+
## Properties
8+
9+
| Name | Type | Description | Notes |
10+
|------------ | ------------- | ------------- | -------------|
11+
|**results** | [**List&lt;PermissionCheckResponse&gt;**](PermissionCheckResponse.md) | List of permission check responses corresponding to each request. | [optional] |
12+
13+
14+

docs/SourceInfo.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ Source information collected at parse time.
1313
|**lineOffsets** | **List&lt;Integer&gt;** | Monotonically increasing list of code point offsets where newlines &#x60;\\n&#x60; appear. The line number of a given position is the index &#x60;i&#x60; where for a given &#x60;id&#x60; the &#x60;line_offsets[i] &lt; id_positions[id] &lt; line_offsets[i+1]&#x60;. The column may be derivd from &#x60;id_positions[id] - line_offsets[i]&#x60;. | [optional] |
1414
|**positions** | **Map&lt;String, Integer&gt;** | A map from the parse node id (e.g. &#x60;Expr.id&#x60;) to the code point offset within the source. | [optional] |
1515
|**macroCalls** | [**Map&lt;String, Expr&gt;**](Expr.md) | A map from the parse node id where a macro replacement was made to the call &#x60;Expr&#x60; that resulted in a macro expansion. For example, &#x60;has(value.field)&#x60; is a function call that is replaced by a &#x60;test_only&#x60; field selection in the AST. Likewise, the call &#x60;list.exists(e, e &gt; 10)&#x60; translates to a comprehension expression. The key in the map corresponds to the expression id of the expanded macro, and the value is the call &#x60;Expr&#x60; that was replaced. | [optional] |
16+
|**extensions** | [**List&lt;Extension&gt;**](Extension.md) | A list of tags for extensions that were used while parsing or type checking the source expression. For example, optimizations that require special runtime support may be specified. These are used to check feature support between components in separate implementations. This can be used to either skip redundant work or report an error if the extension is unsupported. | [optional] |
1617

1718

1819

docs/Version.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
2+
3+
# Version
4+
5+
6+
## Properties
7+
8+
| Name | Type | Description | Notes |
9+
|------------ | ------------- | ------------- | -------------|
10+
|**major** | **String** | Major version changes indicate different required support level from the required components. | [optional] |
11+
|**minor** | **String** | Minor version changes must not change the observed behavior from existing implementations, but may be provided informationally. | [optional] |
12+
13+
14+

0 commit comments

Comments
 (0)