You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
**items** | [**List[PermissionBulkCheckRequestItem]**](PermissionBulkCheckRequestItem.md) | List of permission check requests, maximum 100 items. | [optional]
[[Back to Model list]](../README.md#documentation-for-models)[[Back to API list]](../README.md#documentation-for-api-endpoints)[[Back to README]](../README.md)
CEL component specifier. - COMPONENT_PARSER: Parser. Converts a CEL string to an AST. - COMPONENT_TYPE_CHECKER: Type checker. Checks that references in an AST are defined and types agree. - COMPONENT_RUNTIME: Runtime. Evaluates a parsed and optionally checked CEL AST against a context.
[[Back to Model list]](../README.md#documentation-for-models)[[Back to API list]](../README.md#documentation-for-api-endpoints)[[Back to README]](../README.md)
Copy file name to clipboardExpand all lines: docs/Comprehension.md
+3-2Lines changed: 3 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,12 +1,13 @@
1
1
# Comprehension
2
2
3
-
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`.
3
+
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` ```
**iter_var** | **str** | The name of the iteration variable. | [optional]
9
+
**iter_var** | **str** | 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]
10
+
**iter_var2** | **str** | 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]
**affected_components** | [**List[Component]**](Component.md) | 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]
[[Back to Model list]](../README.md#documentation-for-models)[[Back to API list]](../README.md#documentation-for-api-endpoints)[[Back to README]](../README.md)
Check multiple permissions in a single request. Maximum 100 requests allowed.
22
+
23
+
### Example
24
+
25
+
26
+
```python
27
+
import time
28
+
import os
29
+
import permify
30
+
from permify.models.bulk_check_body import BulkCheckBody
31
+
from permify.models.permission_bulk_check_response import PermissionBulkCheckResponse
32
+
from permify.rest import ApiException
33
+
from pprint import pprint
34
+
35
+
# Defining the host is optional and defaults to http://localhost
36
+
# See configuration.py for a list of all supported configuration parameters.
37
+
configuration = permify.Configuration(
38
+
host="http://localhost"
39
+
)
40
+
41
+
42
+
# Enter a context with an instance of the API client
43
+
with permify.ApiClient(configuration) as api_client:
44
+
# Create an instance of the API class
45
+
api_instance = permify.PermissionApi(api_client)
46
+
tenant_id ='tenant_id_example'# str | 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.
**tenant_id** | **str**| 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. |
[[Back to top]](#)[[Back to API list]](../README.md#documentation-for-api-endpoints)[[Back to Model list]](../README.md#documentation-for-models)[[Back to README]](../README.md)
[[Back to Model list]](../README.md#documentation-for-models)[[Back to API list]](../README.md#documentation-for-api-endpoints)[[Back to README]](../README.md)
**results** | [**List[PermissionCheckResponse]**](PermissionCheckResponse.md) | List of permission check responses corresponding to each request. | [optional]
10
+
11
+
## Example
12
+
13
+
```python
14
+
from permify.models.permission_bulk_check_response import PermissionBulkCheckResponse
15
+
16
+
#TODO update the JSON string below
17
+
json ="{}"
18
+
# create an instance of PermissionBulkCheckResponse from a JSON string
[[Back to Model list]](../README.md#documentation-for-models)[[Back to API list]](../README.md#documentation-for-api-endpoints)[[Back to README]](../README.md)
Copy file name to clipboardExpand all lines: docs/SourceInfo.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,6 +11,7 @@ Name | Type | Description | Notes
11
11
**line_offsets** | **List[int]** | Monotonically increasing list of code point offsets where newlines `\\n` appear. The line number of a given position is the index `i` where for a given `id` the `line_offsets[i]< id_positions[id]< line_offsets[i+1]`. The column may be derivd from `id_positions[id] - line_offsets[i]`. | [optional]
12
12
**positions** | **Dict[str, int]** | A map from the parse node id (e.g. `Expr.id`) to the code point offset within the source. | [optional]
13
13
**macro_calls** | [**Dict[str, Expr]**](Expr.md) | A map from the parse node id where a macro replacement was made to the call `Expr` that resulted in a macro expansion. For example, `has(value.field)` is a function call that is replaced by a `test_only` field selection in the AST. Likewise, the call `list.exists(e, e > 10)` 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 `Expr` that was replaced. | [optional]
14
+
**extensions** | [**List[Extension]**](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]
**major** | **str** | Major version changes indicate different required support level from the required components. | [optional]
9
+
**minor** | **str** | Minor version changes must not change the observed behavior from existing implementations, but may be provided informationally. | [optional]
10
+
11
+
## Example
12
+
13
+
```python
14
+
from permify.models.version import Version
15
+
16
+
#TODO update the JSON string below
17
+
json ="{}"
18
+
# create an instance of Version from a JSON string
19
+
version_instance = Version.from_json(json)
20
+
# print the JSON string representation of the object
[[Back to Model list]](../README.md#documentation-for-models)[[Back to API list]](../README.md#documentation-for-api-endpoints)[[Back to README]](../README.md)
0 commit comments