Skip to content

Commit eee3c1f

Browse files
committed
ci: regenerated with OpenAPI Doc 1.0.0, Speakeasy CLI 1.326.3
1 parent 7935d40 commit eee3c1f

File tree

116 files changed

+3691
-976
lines changed

Some content is hidden

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

116 files changed

+3691
-976
lines changed

permissions/.gitattributes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# This allows generated code to be indexed correctly
2+
*.py linguist-generated=false

permissions/.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
venv/
2+
src/*.egg-info/
3+
__pycache__/
4+
.pytest_cache/
5+
.python-version
6+
.DS_Store

permissions/.speakeasy/gen.lock

Lines changed: 133 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,133 @@
1+
lockVersion: 2.0.0
2+
id: bb3d6e6b-3dee-435e-9c57-7e11e420d022
3+
management:
4+
docChecksum: a0eeed3cfdea16b280c0906629448e71
5+
docVersion: 1.0.0
6+
speakeasyVersion: 1.326.3
7+
generationVersion: 2.359.6
8+
releaseVersion: 1.3.0
9+
configChecksum: ea91a8cd30921f9ed91f0c8a49ca2122
10+
repoURL: https://github.com/epilot-dev/sdk-python.git
11+
repoSubDirectory: permissions
12+
installationURL: https://github.com/epilot-dev/sdk-python.git#subdirectory=permissions
13+
features:
14+
python:
15+
additionalDependencies: 0.1.0
16+
constsAndDefaults: 0.1.3
17+
core: 4.6.13
18+
flattening: 2.81.1
19+
globalSecurity: 2.83.5
20+
globalSecurityCallbacks: 0.1.0
21+
globalServerURLs: 2.82.2
22+
responseFormat: 0.1.0
23+
sdkHooks: 0.1.0
24+
unions: 2.82.8
25+
generatedFiles:
26+
- src/epilot/sdkconfiguration.py
27+
- src/epilot/assignments.py
28+
- src/epilot/roles.py
29+
- src/epilot/sdk.py
30+
- py.typed
31+
- pylintrc
32+
- scripts/publish.sh
33+
- setup.py
34+
- src/epilot/__init__.py
35+
- src/epilot/utils/__init__.py
36+
- src/epilot/utils/retries.py
37+
- src/epilot/utils/utils.py
38+
- src/epilot/models/errors/sdkerror.py
39+
- src/epilot/models/operations/addassignment.py
40+
- src/epilot/models/operations/assignroles.py
41+
- src/epilot/models/operations/getassignedrolesforuser.py
42+
- src/epilot/models/operations/listallassignments.py
43+
- src/epilot/models/operations/removeassignment.py
44+
- src/epilot/models/operations/deleterole.py
45+
- src/epilot/models/operations/getrole.py
46+
- src/epilot/models/operations/listallroles.py
47+
- src/epilot/models/operations/listcurrentroles.py
48+
- src/epilot/models/operations/putrole.py
49+
- src/epilot/models/operations/refreshpermissions.py
50+
- src/epilot/models/operations/searchroles.py
51+
- src/epilot/models/components/httpmetadata.py
52+
- src/epilot/models/components/assignment.py
53+
- src/epilot/models/components/role.py
54+
- src/epilot/models/components/userrole.py
55+
- src/epilot/models/components/grant.py
56+
- src/epilot/models/components/grantcondition.py
57+
- src/epilot/models/components/equalscondition.py
58+
- src/epilot/models/components/orgrole.py
59+
- src/epilot/models/components/sharerole.py
60+
- src/epilot/models/components/partnerrole.py
61+
- src/epilot/models/components/portalrole.py
62+
- src/epilot/models/components/rolepayload.py
63+
- src/epilot/models/components/grantwithdependencies.py
64+
- src/epilot/models/components/rolesearchinput.py
65+
- src/epilot/models/components/security.py
66+
- src/epilot/models/__init__.py
67+
- src/epilot/models/errors/__init__.py
68+
- src/epilot/models/operations/__init__.py
69+
- src/epilot/models/components/__init__.py
70+
- docs/models/operations/addassignmentrequest.md
71+
- docs/models/operations/addassignmentresponse.md
72+
- docs/models/operations/assignrolesrequest.md
73+
- docs/models/operations/assignrolesresponse.md
74+
- docs/models/operations/getassignedrolesforuserrequest.md
75+
- docs/models/operations/getassignedrolesforuserresponse.md
76+
- docs/models/operations/listallassignmentsresponsebody.md
77+
- docs/models/operations/listallassignmentsresponse.md
78+
- docs/models/operations/removeassignmentrequest.md
79+
- docs/models/operations/removeassignmentresponse.md
80+
- docs/models/operations/deleterolerequest.md
81+
- docs/models/operations/deleteroleresponse.md
82+
- docs/models/operations/getrolerequest.md
83+
- docs/models/operations/getroleresponse.md
84+
- docs/models/operations/listallrolesresponsebody.md
85+
- docs/models/operations/listallrolesresponse.md
86+
- docs/models/operations/listcurrentrolesresponsebody.md
87+
- docs/models/operations/listcurrentrolesresponse.md
88+
- docs/models/operations/putrolerequest.md
89+
- docs/models/operations/putroleresponse.md
90+
- docs/models/operations/refreshpermissionsresponse.md
91+
- docs/models/operations/searchrolesresponsebody.md
92+
- docs/models/operations/searchrolesresponse.md
93+
- docs/models/components/httpmetadata.md
94+
- docs/models/components/assignment.md
95+
- docs/models/components/role.md
96+
- docs/models/components/userroletype.md
97+
- docs/models/components/userrole.md
98+
- docs/models/components/effect.md
99+
- docs/models/components/grant.md
100+
- docs/models/components/grantcondition.md
101+
- docs/models/components/operation.md
102+
- docs/models/components/equalscondition.md
103+
- docs/models/components/orgroletype.md
104+
- docs/models/components/orgrole.md
105+
- docs/models/components/shareroletype.md
106+
- docs/models/components/sharerole.md
107+
- docs/models/components/partnerroletype.md
108+
- docs/models/components/partnerrole.md
109+
- docs/models/components/portalroletype.md
110+
- docs/models/components/portalrole.md
111+
- docs/models/components/schemasportalroletype.md
112+
- docs/models/components/portalroleschemas.md
113+
- docs/models/components/schemastype.md
114+
- docs/models/components/partnerroleschemas.md
115+
- docs/models/components/schemasshareroletype.md
116+
- docs/models/components/shareroleschemas.md
117+
- docs/models/components/type.md
118+
- docs/models/components/schemas.md
119+
- docs/models/components/schemasuserroletype.md
120+
- docs/models/components/userroleschemas.md
121+
- docs/models/components/rolepayload.md
122+
- docs/models/components/grantwithdependencieseffect.md
123+
- docs/models/components/grantwithdependencies.md
124+
- docs/models/components/rolesearchinput.md
125+
- docs/models/components/security.md
126+
- docs/sdks/epilot/README.md
127+
- docs/sdks/assignments/README.md
128+
- docs/sdks/roles/README.md
129+
- USAGE.md
130+
- .gitattributes
131+
- src/epilot/_hooks/sdkhooks.py
132+
- src/epilot/_hooks/types.py
133+
- src/epilot/_hooks/__init__.py

permissions/README.md

Lines changed: 175 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,59 +1,205 @@
11
# epilot-permissions
22

3-
<!-- Start SDK Installation -->
3+
<!-- Start SDK Installation [installation] -->
44
## SDK Installation
55

66
```bash
77
pip install git+https://github.com/epilot-dev/sdk-python.git#subdirectory=permissions
88
```
9-
<!-- End SDK Installation -->
9+
<!-- End SDK Installation [installation] -->
1010

11+
<!-- Start SDK Example Usage [usage] -->
1112
## SDK Example Usage
12-
<!-- Start SDK Example Usage -->
13+
14+
### Example
15+
16+
```python
17+
import epilot
18+
from epilot.models import components
19+
20+
s = epilot.Epilot(
21+
security=components.Security(
22+
epilot_auth="<YOUR_BEARER_TOKEN_HERE>",
23+
),
24+
)
25+
26+
27+
res = s.assignments.add_assignment(role_id='123:owner', user_id='1')
28+
29+
if res.assignment is not None:
30+
# handle response
31+
pass
32+
33+
```
34+
<!-- End SDK Example Usage [usage] -->
35+
36+
<!-- Start Available Resources and Operations [operations] -->
37+
## Available Resources and Operations
38+
39+
### [assignments](docs/sdks/assignments/README.md)
40+
41+
* [add_assignment](docs/sdks/assignments/README.md#add_assignment) - addAssignment
42+
* [assign_roles](docs/sdks/assignments/README.md#assign_roles) - assignRoles
43+
* [get_assigned_roles_for_user](docs/sdks/assignments/README.md#get_assigned_roles_for_user) - getAssignedRolesForUser
44+
* [list_all_assignments](docs/sdks/assignments/README.md#list_all_assignments) - listAllAssignments
45+
* [remove_assignment](docs/sdks/assignments/README.md#remove_assignment) - removeAssignment
46+
47+
### [roles](docs/sdks/roles/README.md)
48+
49+
* [delete_role](docs/sdks/roles/README.md#delete_role) - deleteRole
50+
* [get_role](docs/sdks/roles/README.md#get_role) - getRole
51+
* [list_all_roles](docs/sdks/roles/README.md#list_all_roles) - listAllRoles
52+
* [list_current_roles](docs/sdks/roles/README.md#list_current_roles) - listCurrentRoles
53+
* [put_role](docs/sdks/roles/README.md#put_role) - putRole
54+
* [refresh_permissions](docs/sdks/roles/README.md#refresh_permissions) - refreshPermissions
55+
* [search_roles](docs/sdks/roles/README.md#search_roles) - searchRoles
56+
<!-- End Available Resources and Operations [operations] -->
57+
58+
<!-- Start Error Handling [errors] -->
59+
## Error Handling
60+
61+
Handling errors in this SDK should largely match your expectations. All operations return a response object or raise an error. If Error objects are specified in your OpenAPI Spec, the SDK will raise the appropriate Error type.
62+
63+
| Error Object | Status Code | Content Type |
64+
| --------------- | --------------- | --------------- |
65+
| errors.SDKError | 4xx-5xx | */* |
66+
67+
### Example
68+
69+
```python
70+
import epilot
71+
from epilot.models import components, errors
72+
73+
s = epilot.Epilot(
74+
security=components.Security(
75+
epilot_auth="<YOUR_BEARER_TOKEN_HERE>",
76+
),
77+
)
78+
79+
res = None
80+
try:
81+
res = s.assignments.add_assignment(role_id='123:owner', user_id='1')
82+
83+
except errors.SDKError as e:
84+
# handle exception
85+
raise(e)
86+
87+
if res.assignment is not None:
88+
# handle response
89+
pass
90+
91+
```
92+
<!-- End Error Handling [errors] -->
93+
94+
<!-- Start Server Selection [server] -->
95+
## Server Selection
96+
97+
### Select Server by Index
98+
99+
You can override the default server globally by passing a server index to the `server_idx: int` optional parameter when initializing the SDK client instance. The selected server will then be used as the default on the operations that use it. This table lists the indexes associated with the available servers:
100+
101+
| # | Server | Variables |
102+
| - | ------ | --------- |
103+
| 0 | `https://permissions.sls.epilot.io` | None |
104+
105+
#### Example
106+
13107
```python
14108
import epilot
15-
from epilot.models import operations, shared
109+
from epilot.models import components
16110

17111
s = epilot.Epilot(
18-
security=shared.Security(
19-
epilot_auth="Bearer YOUR_BEARER_TOKEN_HERE",
112+
server_idx=0,
113+
security=components.Security(
114+
epilot_auth="<YOUR_BEARER_TOKEN_HERE>",
20115
),
21116
)
22117

23118

24-
req = operations.AddAssignmentRequest(
25-
role_id="123:owner",
26-
user_id="1",
119+
res = s.assignments.add_assignment(role_id='123:owner', user_id='1')
120+
121+
if res.assignment is not None:
122+
# handle response
123+
pass
124+
125+
```
126+
127+
128+
### Override Server URL Per-Client
129+
130+
The default server can also be overridden globally by passing a URL to the `server_url: str` optional parameter when initializing the SDK client instance. For example:
131+
```python
132+
import epilot
133+
from epilot.models import components
134+
135+
s = epilot.Epilot(
136+
server_url="https://permissions.sls.epilot.io",
137+
security=components.Security(
138+
epilot_auth="<YOUR_BEARER_TOKEN_HERE>",
139+
),
27140
)
28-
29-
res = s.assignments.add_assignment(req)
141+
142+
143+
res = s.assignments.add_assignment(role_id='123:owner', user_id='1')
30144

31145
if res.assignment is not None:
32146
# handle response
147+
pass
148+
33149
```
34-
<!-- End SDK Example Usage -->
150+
<!-- End Server Selection [server] -->
35151

36-
<!-- Start SDK Available Operations -->
37-
## SDK Available Operations
152+
<!-- Start Custom HTTP Client [http-client] -->
153+
## Custom HTTP Client
38154

155+
The Python SDK makes API calls using the [requests](https://pypi.org/project/requests/) HTTP library. In order to provide a convenient way to configure timeouts, cookies, proxies, custom headers, and other low-level configuration, you can initialize the SDK client with a custom `requests.Session` object.
39156

40-
### assignments
157+
For example, you could specify a header for every request that this sdk makes as follows:
158+
```python
159+
import epilot
160+
import requests
161+
162+
http_client = requests.Session()
163+
http_client.headers.update({'x-custom-header': 'someValue'})
164+
s = epilot.Epilot(client=http_client)
165+
```
166+
<!-- End Custom HTTP Client [http-client] -->
167+
168+
<!-- Start Authentication [security] -->
169+
## Authentication
170+
171+
### Per-Client Security Schemes
172+
173+
This SDK supports the following security schemes globally:
174+
175+
| Name | Type | Scheme |
176+
| ------------- | ------------- | ------------- |
177+
| `epilot_auth` | http | HTTP Bearer |
178+
| `epilot_org` | apiKey | API key |
179+
180+
You can set the security parameters through the `security` optional parameter when initializing the SDK client instance. The selected scheme will be used by default to authenticate with the API for all operations that support it. For example:
181+
```python
182+
import epilot
183+
from epilot.models import components
184+
185+
s = epilot.Epilot(
186+
security=components.Security(
187+
epilot_auth="<YOUR_BEARER_TOKEN_HERE>",
188+
),
189+
)
190+
191+
192+
res = s.assignments.add_assignment(role_id='123:owner', user_id='1')
193+
194+
if res.assignment is not None:
195+
# handle response
196+
pass
197+
198+
```
199+
<!-- End Authentication [security] -->
41200

42-
* `add_assignment` - addAssignment
43-
* `assign_roles` - assignRoles
44-
* `get_assigned_roles_for_user` - getAssignedRolesForUser
45-
* `list_all_assignments` - listAllAssignments
46-
* `remove_assignment` - removeAssignment
201+
<!-- Placeholder for Future Speakeasy SDK Sections -->
47202

48-
### roles
49203

50-
* `delete_role` - deleteRole
51-
* `get_role` - getRole
52-
* `list_all_roles` - listAllRoles
53-
* `list_current_roles` - listCurrentRoles
54-
* `put_role` - putRole
55-
* `refresh_permissions` - refreshPermissions
56-
* `search_roles` - searchRoles
57-
<!-- End SDK Available Operations -->
58204

59205
### SDK Generated by [Speakeasy](https://docs.speakeasyapi.dev/docs/using-speakeasy/client-sdks)

permissions/RELEASES.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,12 @@ Based on:
3434
### Changes
3535
Based on:
3636
- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/permissions.yaml
37-
- Speakeasy CLI 1.19.2 (2.16.5) https://github.com/speakeasy-api/speakeasy
37+
- Speakeasy CLI 1.19.2 (2.16.5) https://github.com/speakeasy-api/speakeasy
38+
39+
## 2024-07-07 00:19:00
40+
### Changes
41+
Based on:
42+
- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/permissions.yaml
43+
- Speakeasy CLI 1.326.3 (2.359.6) https://github.com/speakeasy-api/speakeasy
44+
### Generated
45+
- [python v1.3.0] permissions

0 commit comments

Comments
 (0)