Skip to content

Commit 04aa7ea

Browse files
author
GitHub Actions Bot
committed
Update python SDK from OpenAPI changes
1 parent cb7ff77 commit 04aa7ea

18 files changed

+120
-223
lines changed

README.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -91,25 +91,25 @@ Class | Method | HTTP request | Description
9191
*BundleApi* | [**bundle_read**](docs/BundleApi.md#bundle_read) | **POST** /v1/tenants/{tenant_id}/bundle/read | read bundle
9292
*BundleApi* | [**bundle_write**](docs/BundleApi.md#bundle_write) | **POST** /v1/tenants/{tenant_id}/bundle/write | write bundle
9393
*DataApi* | [**bundle_run**](docs/DataApi.md#bundle_run) | **POST** /v1/tenants/{tenant_id}/data/run-bundle | run bundle
94-
*DataApi* | [**data_attributes_read**](docs/DataApi.md#data_attributes_read) | **POST** /v1/tenants/{tenant_id}/data/attributes/read | read attribute(s)
94+
*DataApi* | [**data_attributes_read**](docs/DataApi.md#data_attributes_read) | **POST** /v1/tenants/{tenant_id}/data/attributes/read | read attributes
9595
*DataApi* | [**data_delete**](docs/DataApi.md#data_delete) | **POST** /v1/tenants/{tenant_id}/data/delete | delete data
96-
*DataApi* | [**data_relationships_read**](docs/DataApi.md#data_relationships_read) | **POST** /v1/tenants/{tenant_id}/data/relationships/read | read relation tuple(s)
97-
*DataApi* | [**data_write**](docs/DataApi.md#data_write) | **POST** /v1/tenants/{tenant_id}/data/write | create data
96+
*DataApi* | [**data_relationships_read**](docs/DataApi.md#data_relationships_read) | **POST** /v1/tenants/{tenant_id}/data/relationships/read | read relationships
97+
*DataApi* | [**data_write**](docs/DataApi.md#data_write) | **POST** /v1/tenants/{tenant_id}/data/write | write data
9898
*DataApi* | [**relationships_delete**](docs/DataApi.md#relationships_delete) | **POST** /v1/tenants/{tenant_id}/relationships/delete | delete relationships
99-
*DataApi* | [**relationships_write**](docs/DataApi.md#relationships_write) | **POST** /v1/tenants/{tenant_id}/relationships/write | create new relationships
100-
*PermissionApi* | [**permissions_check**](docs/PermissionApi.md#permissions_check) | **POST** /v1/tenants/{tenant_id}/permissions/check | This method returns a decision about whether user can perform an permission on a certain resource.
101-
*PermissionApi* | [**permissions_expand**](docs/PermissionApi.md#permissions_expand) | **POST** /v1/tenants/{tenant_id}/permissions/expand | expand relationships according to schema
102-
*PermissionApi* | [**permissions_lookup_entity**](docs/PermissionApi.md#permissions_lookup_entity) | **POST** /v1/tenants/{tenant_id}/permissions/lookup-entity | Retrieve an entity by its identifier.
103-
*PermissionApi* | [**permissions_lookup_entity_stream**](docs/PermissionApi.md#permissions_lookup_entity_stream) | **POST** /v1/tenants/{tenant_id}/permissions/lookup-entity-stream | Stream entities by their identifiers.
104-
*PermissionApi* | [**permissions_lookup_subject**](docs/PermissionApi.md#permissions_lookup_subject) | **POST** /v1/tenants/{tenant_id}/permissions/lookup-subject | Retrieve a subject by its identifier.
105-
*PermissionApi* | [**permissions_subject_permission**](docs/PermissionApi.md#permissions_subject_permission) | **POST** /v1/tenants/{tenant_id}/permissions/subject-permission | Retrieve permissions related to a specific subject.
106-
*SchemaApi* | [**schemas_list**](docs/SchemaApi.md#schemas_list) | **POST** /v1/tenants/{tenant_id}/schemas/list | list all authorization models
107-
*SchemaApi* | [**schemas_read**](docs/SchemaApi.md#schemas_read) | **POST** /v1/tenants/{tenant_id}/schemas/read | read your authorization model
108-
*SchemaApi* | [**schemas_write**](docs/SchemaApi.md#schemas_write) | **POST** /v1/tenants/{tenant_id}/schemas/write | write your authorization model
109-
*TenancyApi* | [**tenants_create**](docs/TenancyApi.md#tenants_create) | **POST** /v1/tenants/create | create new tenant
99+
*DataApi* | [**relationships_write**](docs/DataApi.md#relationships_write) | **POST** /v1/tenants/{tenant_id}/relationships/write | write relationships
100+
*PermissionApi* | [**permissions_check**](docs/PermissionApi.md#permissions_check) | **POST** /v1/tenants/{tenant_id}/permissions/check | check api
101+
*PermissionApi* | [**permissions_expand**](docs/PermissionApi.md#permissions_expand) | **POST** /v1/tenants/{tenant_id}/permissions/expand | expand api
102+
*PermissionApi* | [**permissions_lookup_entity**](docs/PermissionApi.md#permissions_lookup_entity) | **POST** /v1/tenants/{tenant_id}/permissions/lookup-entity | lookup entity
103+
*PermissionApi* | [**permissions_lookup_entity_stream**](docs/PermissionApi.md#permissions_lookup_entity_stream) | **POST** /v1/tenants/{tenant_id}/permissions/lookup-entity-stream | lookup entity stream
104+
*PermissionApi* | [**permissions_lookup_subject**](docs/PermissionApi.md#permissions_lookup_subject) | **POST** /v1/tenants/{tenant_id}/permissions/lookup-subject | lookup-subject
105+
*PermissionApi* | [**permissions_subject_permission**](docs/PermissionApi.md#permissions_subject_permission) | **POST** /v1/tenants/{tenant_id}/permissions/subject-permission | subject permission
106+
*SchemaApi* | [**schemas_list**](docs/SchemaApi.md#schemas_list) | **POST** /v1/tenants/{tenant_id}/schemas/list | list schema
107+
*SchemaApi* | [**schemas_read**](docs/SchemaApi.md#schemas_read) | **POST** /v1/tenants/{tenant_id}/schemas/read | read schema
108+
*SchemaApi* | [**schemas_write**](docs/SchemaApi.md#schemas_write) | **POST** /v1/tenants/{tenant_id}/schemas/write | write schema
109+
*TenancyApi* | [**tenants_create**](docs/TenancyApi.md#tenants_create) | **POST** /v1/tenants/create | create tenant
110110
*TenancyApi* | [**tenants_delete**](docs/TenancyApi.md#tenants_delete) | **DELETE** /v1/tenants/{id} | delete tenant
111111
*TenancyApi* | [**tenants_list**](docs/TenancyApi.md#tenants_list) | **POST** /v1/tenants/list | list tenants
112-
*WatchApi* | [**watch_watch**](docs/WatchApi.md#watch_watch) | **POST** /v1/tenants/{tenant_id}/watch |
112+
*WatchApi* | [**watch_watch**](docs/WatchApi.md#watch_watch) | **POST** /v1/tenants/{tenant_id}/watch | watch changes
113113

114114

115115
## Documentation For Models

docs/BundleApi.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@ Method | HTTP request | Description
1414
1515
delete bundle
1616

17-
The \"Delete Bundle\" API is designed for removing specific data bundles within a multi-tenant application environment. This API facilitates the deletion of a bundle, identified by its unique name, from a designated tenant's environment.
18-
1917
### Example
2018

2119

@@ -86,8 +84,6 @@ No authorization required
8684
8785
read bundle
8886

89-
The \"Read Bundle\" API is a crucial tool for retrieving details of specific data bundles in a multi-tenant application setup. It is designed to access information about a bundle, uniquely identified by its name, within the specified tenant's environment.
90-
9187
### Example
9288

9389

@@ -158,8 +154,6 @@ No authorization required
158154
159155
write bundle
160156

161-
The \"Write Bundle\" API is designed for handling data in a multi-tenant application environment. Its primary function is to write and delete data according to predefined structures. This API allows users to define or update data bundles, each distinguished by a unique name.
162-
163157
### Example
164158

165159

docs/DataApi.md

Lines changed: 12 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,19 @@ All URIs are relative to *http://localhost*
55
Method | HTTP request | Description
66
------------- | ------------- | -------------
77
[**bundle_run**](DataApi.md#bundle_run) | **POST** /v1/tenants/{tenant_id}/data/run-bundle | run bundle
8-
[**data_attributes_read**](DataApi.md#data_attributes_read) | **POST** /v1/tenants/{tenant_id}/data/attributes/read | read attribute(s)
8+
[**data_attributes_read**](DataApi.md#data_attributes_read) | **POST** /v1/tenants/{tenant_id}/data/attributes/read | read attributes
99
[**data_delete**](DataApi.md#data_delete) | **POST** /v1/tenants/{tenant_id}/data/delete | delete data
10-
[**data_relationships_read**](DataApi.md#data_relationships_read) | **POST** /v1/tenants/{tenant_id}/data/relationships/read | read relation tuple(s)
11-
[**data_write**](DataApi.md#data_write) | **POST** /v1/tenants/{tenant_id}/data/write | create data
10+
[**data_relationships_read**](DataApi.md#data_relationships_read) | **POST** /v1/tenants/{tenant_id}/data/relationships/read | read relationships
11+
[**data_write**](DataApi.md#data_write) | **POST** /v1/tenants/{tenant_id}/data/write | write data
1212
[**relationships_delete**](DataApi.md#relationships_delete) | **POST** /v1/tenants/{tenant_id}/relationships/delete | delete relationships
13-
[**relationships_write**](DataApi.md#relationships_write) | **POST** /v1/tenants/{tenant_id}/relationships/write | create new relationships
13+
[**relationships_write**](DataApi.md#relationships_write) | **POST** /v1/tenants/{tenant_id}/relationships/write | write relationships
1414

1515

1616
# **bundle_run**
1717
> BundleRunResponse bundle_run(tenant_id, body)
1818
1919
run bundle
2020

21-
The \"Run Bundle\" API provides a straightforward way to execute predefined bundles within your application's tenant environment. By sending a POST request to this endpoint, you can activate specific functionalities or processes encapsulated in a bundle.
22-
2321
### Example
2422

2523

@@ -88,9 +86,7 @@ No authorization required
8886
# **data_attributes_read**
8987
> AttributeReadResponse data_attributes_read(tenant_id, body)
9088
91-
read attribute(s)
92-
93-
Read API allows for directly querying the stored graph data to display and filter stored attributes.
89+
read attributes
9490

9591
### Example
9692

@@ -117,7 +113,7 @@ with permify.ApiClient(configuration) as api_client:
117113
body = permify.DataAttributesReadRequest() # DataAttributesReadRequest |
118114

119115
try:
120-
# read attribute(s)
116+
# read attributes
121117
api_response = api_instance.data_attributes_read(tenant_id, body)
122118
print("The response of DataApi->data_attributes_read:\n")
123119
pprint(api_response)
@@ -162,8 +158,6 @@ No authorization required
162158
163159
delete data
164160

165-
You can delete any stored relation tuples or attributes with following API.
166-
167161
### Example
168162

169163

@@ -232,9 +226,7 @@ No authorization required
232226
# **data_relationships_read**
233227
> RelationshipReadResponse data_relationships_read(tenant_id, body)
234228
235-
read relation tuple(s)
236-
237-
Read API allows for directly querying the stored graph data to display and filter stored relational tuples.
229+
read relationships
238230

239231
### Example
240232

@@ -261,7 +253,7 @@ with permify.ApiClient(configuration) as api_client:
261253
body = permify.DataRelationshipsReadRequest() # DataRelationshipsReadRequest |
262254

263255
try:
264-
# read relation tuple(s)
256+
# read relationships
265257
api_response = api_instance.data_relationships_read(tenant_id, body)
266258
print("The response of DataApi->data_relationships_read:\n")
267259
pprint(api_response)
@@ -304,9 +296,7 @@ No authorization required
304296
# **data_write**
305297
> DataWriteResponse data_write(tenant_id, body)
306298
307-
create data
308-
309-
In Permify, attributes and relations between your entities, objects and users represents your authorization data. These data stored as tuples in a preferred database.
299+
write data
310300

311301
### Example
312302

@@ -333,7 +323,7 @@ with permify.ApiClient(configuration) as api_client:
333323
body = permify.DataWriteRequest() # DataWriteRequest |
334324

335325
try:
336-
# create data
326+
# write data
337327
api_response = api_instance.data_write(tenant_id, body)
338328
print("The response of DataApi->data_write:\n")
339329
pprint(api_response)
@@ -446,7 +436,7 @@ No authorization required
446436
# **relationships_write**
447437
> RelationshipWriteResponse relationships_write(tenant_id, body)
448438
449-
create new relationships
439+
write relationships
450440

451441
### Example
452442

@@ -473,7 +463,7 @@ with permify.ApiClient(configuration) as api_client:
473463
body = permify.RelationshipsWriteRequest() # RelationshipsWriteRequest |
474464

475465
try:
476-
# create new relationships
466+
# write relationships
477467
api_response = api_instance.relationships_write(tenant_id, body)
478468
print("The response of DataApi->relationships_write:\n")
479469
pprint(api_response)

docs/PermissionApi.md

Lines changed: 18 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,18 @@ All URIs are relative to *http://localhost*
44

55
Method | HTTP request | Description
66
------------- | ------------- | -------------
7-
[**permissions_check**](PermissionApi.md#permissions_check) | **POST** /v1/tenants/{tenant_id}/permissions/check | This method returns a decision about whether user can perform an permission on a certain resource.
8-
[**permissions_expand**](PermissionApi.md#permissions_expand) | **POST** /v1/tenants/{tenant_id}/permissions/expand | expand relationships according to schema
9-
[**permissions_lookup_entity**](PermissionApi.md#permissions_lookup_entity) | **POST** /v1/tenants/{tenant_id}/permissions/lookup-entity | Retrieve an entity by its identifier.
10-
[**permissions_lookup_entity_stream**](PermissionApi.md#permissions_lookup_entity_stream) | **POST** /v1/tenants/{tenant_id}/permissions/lookup-entity-stream | Stream entities by their identifiers.
11-
[**permissions_lookup_subject**](PermissionApi.md#permissions_lookup_subject) | **POST** /v1/tenants/{tenant_id}/permissions/lookup-subject | Retrieve a subject by its identifier.
12-
[**permissions_subject_permission**](PermissionApi.md#permissions_subject_permission) | **POST** /v1/tenants/{tenant_id}/permissions/subject-permission | Retrieve permissions related to a specific subject.
7+
[**permissions_check**](PermissionApi.md#permissions_check) | **POST** /v1/tenants/{tenant_id}/permissions/check | check api
8+
[**permissions_expand**](PermissionApi.md#permissions_expand) | **POST** /v1/tenants/{tenant_id}/permissions/expand | expand api
9+
[**permissions_lookup_entity**](PermissionApi.md#permissions_lookup_entity) | **POST** /v1/tenants/{tenant_id}/permissions/lookup-entity | lookup entity
10+
[**permissions_lookup_entity_stream**](PermissionApi.md#permissions_lookup_entity_stream) | **POST** /v1/tenants/{tenant_id}/permissions/lookup-entity-stream | lookup entity stream
11+
[**permissions_lookup_subject**](PermissionApi.md#permissions_lookup_subject) | **POST** /v1/tenants/{tenant_id}/permissions/lookup-subject | lookup-subject
12+
[**permissions_subject_permission**](PermissionApi.md#permissions_subject_permission) | **POST** /v1/tenants/{tenant_id}/permissions/subject-permission | subject permission
1313

1414

1515
# **permissions_check**
1616
> PermissionCheckResponse permissions_check(tenant_id, body)
1717
18-
This method returns a decision about whether user can perform an permission on a certain resource.
19-
20-
In Permify, you can perform two different types access checks, resource based authorization checks, in form of Can user U perform action Y in resource Z? subject based authorization checks, in form of Which resources can user U edit? In this section we'll look at the resource based check request of Permify. You can find subject based access checks in Entity (Data) Filtering section.
18+
check api
2119

2220
### Example
2321

@@ -44,7 +42,7 @@ with permify.ApiClient(configuration) as api_client:
4442
body = permify.PermissionsCheckRequest() # PermissionsCheckRequest |
4543

4644
try:
47-
# This method returns a decision about whether user can perform an permission on a certain resource.
45+
# check api
4846
api_response = api_instance.permissions_check(tenant_id, body)
4947
print("The response of PermissionApi->permissions_check:\n")
5048
pprint(api_response)
@@ -87,9 +85,7 @@ No authorization required
8785
# **permissions_expand**
8886
> PermissionExpandResponse permissions_expand(tenant_id, body)
8987
90-
expand relationships according to schema
91-
92-
Retrieve all subjects (users and user sets) that have a relationship or attribute with given entity and permission. Expand API response is represented by a user set tree, whose leaf nodes are user IDs or user sets pointing to other ⟨object#relation⟩ pairs. <Tip>WHEN TO USE ? Expand is designed for reasoning the complete set of users that have access to their objects, which allows our users to build efficient search indices for access-controlled content. It is not designed to use as a check access. Expand request has a high latency which can cause a performance issues when its used as access check.</Tip>
88+
expand api
9389

9490
### Example
9591

@@ -116,7 +112,7 @@ with permify.ApiClient(configuration) as api_client:
116112
body = permify.PermissionsExpandRequest() # PermissionsExpandRequest |
117113

118114
try:
119-
# expand relationships according to schema
115+
# expand api
120116
api_response = api_instance.permissions_expand(tenant_id, body)
121117
print("The response of PermissionApi->permissions_expand:\n")
122118
pprint(api_response)
@@ -159,9 +155,7 @@ No authorization required
159155
# **permissions_lookup_entity**
160156
> PermissionLookupEntityResponse permissions_lookup_entity(tenant_id, body)
161157
162-
Retrieve an entity by its identifier.
163-
164-
Lookup Entity endpoint lets you ask questions in form of “Which resources can user:X do action Y?”. As a response of this you’ll get a entity results in a format of string array.
158+
lookup entity
165159

166160
### Example
167161

@@ -188,7 +182,7 @@ with permify.ApiClient(configuration) as api_client:
188182
body = permify.PermissionsLookupEntityRequest() # PermissionsLookupEntityRequest |
189183

190184
try:
191-
# Retrieve an entity by its identifier.
185+
# lookup entity
192186
api_response = api_instance.permissions_lookup_entity(tenant_id, body)
193187
print("The response of PermissionApi->permissions_lookup_entity:\n")
194188
pprint(api_response)
@@ -231,9 +225,7 @@ No authorization required
231225
# **permissions_lookup_entity_stream**
232226
> StreamResultOfPermissionLookupEntityStreamResponse permissions_lookup_entity_stream(tenant_id, body)
233227
234-
Stream entities by their identifiers.
235-
236-
Lookup Entity endpoint lets you ask questions in form of “Which resources can user:X do action Y?”. As a response of this you’ll get a entity results in a format of as a streaming response.
228+
lookup entity stream
237229

238230
### Example
239231

@@ -260,7 +252,7 @@ with permify.ApiClient(configuration) as api_client:
260252
body = permify.PermissionsLookupEntityRequest() # PermissionsLookupEntityRequest |
261253

262254
try:
263-
# Stream entities by their identifiers.
255+
# lookup entity stream
264256
api_response = api_instance.permissions_lookup_entity_stream(tenant_id, body)
265257
print("The response of PermissionApi->permissions_lookup_entity_stream:\n")
266258
pprint(api_response)
@@ -303,9 +295,7 @@ No authorization required
303295
# **permissions_lookup_subject**
304296
> PermissionLookupSubjectResponse permissions_lookup_subject(tenant_id, body)
305297
306-
Retrieve a subject by its identifier.
307-
308-
Lookup Subject endpoint lets you ask questions in form of “Which subjects can do action Y on entity:X?”. As a response of this you’ll get a subject results in a format of string array.
298+
lookup-subject
309299

310300
### Example
311301

@@ -332,7 +322,7 @@ with permify.ApiClient(configuration) as api_client:
332322
body = permify.PermissionsLookupSubjectRequest() # PermissionsLookupSubjectRequest |
333323

334324
try:
335-
# Retrieve a subject by its identifier.
325+
# lookup-subject
336326
api_response = api_instance.permissions_lookup_subject(tenant_id, body)
337327
print("The response of PermissionApi->permissions_lookup_subject:\n")
338328
pprint(api_response)
@@ -375,9 +365,7 @@ No authorization required
375365
# **permissions_subject_permission**
376366
> PermissionSubjectPermissionResponse permissions_subject_permission(tenant_id, body)
377367
378-
Retrieve permissions related to a specific subject.
379-
380-
The Subject Permission List endpoint allows you to inquire in the form of “Which permissions user:x can perform on entity:y?”. In response, you'll receive a list of permissions specific to the user for the given entity, returned in the format of a map. In this endpoint, you'll receive a map of permissions and their statuses directly. The structure is map[string]CheckResult, such as \"sample-permission\" -> \"ALLOWED\". This represents the permissions and their associated states in a key-value pair format.
368+
subject permission
381369

382370
### Example
383371

@@ -404,7 +392,7 @@ with permify.ApiClient(configuration) as api_client:
404392
body = permify.PermissionsSubjectPermissionRequest() # PermissionsSubjectPermissionRequest |
405393

406394
try:
407-
# Retrieve permissions related to a specific subject.
395+
# subject permission
408396
api_response = api_instance.permissions_subject_permission(tenant_id, body)
409397
print("The response of PermissionApi->permissions_subject_permission:\n")
410398
pprint(api_response)

0 commit comments

Comments
 (0)