This commit is contained in:
Ruben Fiszel
2022-10-08 13:25:26 +02:00
parent ac09681d49
commit d4dfb4f050
1419 changed files with 0 additions and 95449 deletions
-23
View File
@@ -1,23 +0,0 @@
__pycache__/
build/
dist/
*.egg-info/
.pytest_cache/
# pyenv
.python-version
# Environments
.env
.venv
# mypy
.mypy_cache/
.dmypy.json
dmypy.json
# JetBrains
.idea/
/coverage.xml
/.coverage
-201
View File
@@ -1,201 +0,0 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright 2022 Windmill Labs, Inc
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-77
View File
@@ -1,77 +0,0 @@
# Autogenerated Windmill OpenApi Client
This is the raw autogenerated api client. You are most likely more interested in [wmill](https://pypi.org/project/wmill/) which leverages this client to offer an user friendly experience. We use [this openapi python client generator](https://github.com/openapi-generators/openapi-python-client/)
# windmill-api
A client library for accessing Windmill server API
## Usage
First, create a client:
```python
from windmill_api import Client
client = Client(base_url="https://api.example.com")
```
If the endpoints you're going to hit require authentication, use `AuthenticatedClient` instead:
```python
from windmill_api import AuthenticatedClient
client = AuthenticatedClient(base_url="https://api.example.com", token="SuperSecretToken")
```
Now call your endpoint and use your models:
```python
from windmill_api.models import MyDataModel
from windmill_api.api.my_tag import get_my_data_model
from windmill_api.types import Response
my_data: MyDataModel = get_my_data_model.sync(client=client)
# or if you need more info (e.g. status_code)
response: Response[MyDataModel] = get_my_data_model.sync_detailed(client=client)
```
Or do the same thing with an async version:
```python
from windmill_api.models import MyDataModel
from windmill_api.api.my_tag import get_my_data_model
from windmill_api.types import Response
my_data: MyDataModel = await get_my_data_model.asyncio(client=client)
response: Response[MyDataModel] = await get_my_data_model.asyncio_detailed(client=client)
```
By default, when you're calling an HTTPS API it will attempt to verify that SSL is working correctly. Using certificate verification is highly recommended most of the time, but sometimes you may need to authenticate to a server (especially an internal server) using a custom certificate bundle.
```python
client = AuthenticatedClient(
base_url="https://internal_api.example.com",
token="SuperSecretToken",
verify_ssl="/path/to/certificate_bundle.pem",
)
```
You can also disable certificate validation altogether, but beware that **this is a security risk**.
```python
client = AuthenticatedClient(
base_url="https://internal_api.example.com",
token="SuperSecretToken",
verify_ssl=False
)
```
Things to know:
1. Every path/method combo becomes a Python module with four functions:
1. `sync`: Blocking request that returns parsed data (if successful) or `None`
1. `sync_detailed`: Blocking request that always returns a `Request`, optionally with `parsed` set if the request was successful.
1. `asyncio`: Like `sync` but the async instead of blocking
1. `asyncio_detailed`: Like `sync_detailed` by async instead of blocking
1. All path/query params, and bodies become method arguments.
1. If your endpoint had any tags on it, the first tag will be used as a module name for the function (my_tag above)
1. Any endpoint which did not have a tag will be in `windmill_api.api.default`
-40
View File
@@ -1,40 +0,0 @@
[tool.poetry]
name = "windmill-api"
version = "1.36.0"
description = "A client library for accessing Windmill server API"
license = "Apache-2.0"
authors = ["Ruben Fiszel <ruben@windmill.dev>"]
readme = "README.md"
packages = [
{include = "windmill_api"},
]
include = ["CHANGELOG.md", "windmill_api/py.typed"]
[tool.poetry.dependencies]
python = "^3.7"
httpx = ">=0.15.4,<0.23.0"
attrs = ">=21.3.0"
python-dateutil = "^2.8.0"
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
[tool.black]
line-length = 120
target_version = ['py37', 'py38', 'py39']
exclude = '''
(
/(
| \.git
| \.venv
| \.mypy_cache
)/
)
'''
[tool.isort]
line_length = 120
profile = "black"
@@ -1,2 +0,0 @@
""" A client library for accessing Windmill server API """
from .client import AuthenticatedClient, Client
@@ -1 +0,0 @@
""" Contains methods for accessing the API """
@@ -1,150 +0,0 @@
from typing import Any, Dict, Optional
import httpx
from ...client import Client
from ...models.get_audit_log_response_200 import GetAuditLogResponse200
from ...types import Response
def _get_kwargs(
workspace: str,
id: int,
*,
client: Client,
) -> Dict[str, Any]:
url = "{}/w/{workspace}/audit/get/{id}".format(client.base_url, workspace=workspace, id=id)
headers: Dict[str, str] = client.get_headers()
cookies: Dict[str, Any] = client.get_cookies()
return {
"method": "get",
"url": url,
"headers": headers,
"cookies": cookies,
"timeout": client.get_timeout(),
}
def _parse_response(*, response: httpx.Response) -> Optional[GetAuditLogResponse200]:
if response.status_code == 200:
response_200 = GetAuditLogResponse200.from_dict(response.json())
return response_200
return None
def _build_response(*, response: httpx.Response) -> Response[GetAuditLogResponse200]:
return Response(
status_code=response.status_code,
content=response.content,
headers=response.headers,
parsed=_parse_response(response=response),
)
def sync_detailed(
workspace: str,
id: int,
*,
client: Client,
) -> Response[GetAuditLogResponse200]:
"""get audit log (requires admin privilege)
Args:
workspace (str):
id (int):
Returns:
Response[GetAuditLogResponse200]
"""
kwargs = _get_kwargs(
workspace=workspace,
id=id,
client=client,
)
response = httpx.request(
verify=client.verify_ssl,
**kwargs,
)
return _build_response(response=response)
def sync(
workspace: str,
id: int,
*,
client: Client,
) -> Optional[GetAuditLogResponse200]:
"""get audit log (requires admin privilege)
Args:
workspace (str):
id (int):
Returns:
Response[GetAuditLogResponse200]
"""
return sync_detailed(
workspace=workspace,
id=id,
client=client,
).parsed
async def asyncio_detailed(
workspace: str,
id: int,
*,
client: Client,
) -> Response[GetAuditLogResponse200]:
"""get audit log (requires admin privilege)
Args:
workspace (str):
id (int):
Returns:
Response[GetAuditLogResponse200]
"""
kwargs = _get_kwargs(
workspace=workspace,
id=id,
client=client,
)
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
response = await _client.request(**kwargs)
return _build_response(response=response)
async def asyncio(
workspace: str,
id: int,
*,
client: Client,
) -> Optional[GetAuditLogResponse200]:
"""get audit log (requires admin privilege)
Args:
workspace (str):
id (int):
Returns:
Response[GetAuditLogResponse200]
"""
return (
await asyncio_detailed(
workspace=workspace,
id=id,
client=client,
)
).parsed
@@ -1,280 +0,0 @@
import datetime
from typing import Any, Dict, List, Optional, Union
import httpx
from ...client import Client
from ...models.list_audit_logs_action_kind import ListAuditLogsActionKind
from ...models.list_audit_logs_response_200_item import ListAuditLogsResponse200Item
from ...types import UNSET, Response, Unset
def _get_kwargs(
workspace: str,
*,
client: Client,
page: Union[Unset, None, int] = UNSET,
per_page: Union[Unset, None, int] = UNSET,
before: Union[Unset, None, datetime.datetime] = UNSET,
after: Union[Unset, None, datetime.datetime] = UNSET,
username: Union[Unset, None, str] = UNSET,
operation: Union[Unset, None, str] = UNSET,
resource: Union[Unset, None, str] = UNSET,
action_kind: Union[Unset, None, ListAuditLogsActionKind] = UNSET,
) -> Dict[str, Any]:
url = "{}/w/{workspace}/audit/list".format(client.base_url, workspace=workspace)
headers: Dict[str, str] = client.get_headers()
cookies: Dict[str, Any] = client.get_cookies()
params: Dict[str, Any] = {}
params["page"] = page
params["per_page"] = per_page
json_before: Union[Unset, None, str] = UNSET
if not isinstance(before, Unset):
json_before = before.isoformat() if before else None
params["before"] = json_before
json_after: Union[Unset, None, str] = UNSET
if not isinstance(after, Unset):
json_after = after.isoformat() if after else None
params["after"] = json_after
params["username"] = username
params["operation"] = operation
params["resource"] = resource
json_action_kind: Union[Unset, None, str] = UNSET
if not isinstance(action_kind, Unset):
json_action_kind = action_kind.value if action_kind else None
params["action_kind"] = json_action_kind
params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
return {
"method": "get",
"url": url,
"headers": headers,
"cookies": cookies,
"timeout": client.get_timeout(),
"params": params,
}
def _parse_response(*, response: httpx.Response) -> Optional[List[ListAuditLogsResponse200Item]]:
if response.status_code == 200:
response_200 = []
_response_200 = response.json()
for response_200_item_data in _response_200:
response_200_item = ListAuditLogsResponse200Item.from_dict(response_200_item_data)
response_200.append(response_200_item)
return response_200
return None
def _build_response(*, response: httpx.Response) -> Response[List[ListAuditLogsResponse200Item]]:
return Response(
status_code=response.status_code,
content=response.content,
headers=response.headers,
parsed=_parse_response(response=response),
)
def sync_detailed(
workspace: str,
*,
client: Client,
page: Union[Unset, None, int] = UNSET,
per_page: Union[Unset, None, int] = UNSET,
before: Union[Unset, None, datetime.datetime] = UNSET,
after: Union[Unset, None, datetime.datetime] = UNSET,
username: Union[Unset, None, str] = UNSET,
operation: Union[Unset, None, str] = UNSET,
resource: Union[Unset, None, str] = UNSET,
action_kind: Union[Unset, None, ListAuditLogsActionKind] = UNSET,
) -> Response[List[ListAuditLogsResponse200Item]]:
"""list audit logs (requires admin privilege)
Args:
workspace (str):
page (Union[Unset, None, int]):
per_page (Union[Unset, None, int]):
before (Union[Unset, None, datetime.datetime]):
after (Union[Unset, None, datetime.datetime]):
username (Union[Unset, None, str]):
operation (Union[Unset, None, str]):
resource (Union[Unset, None, str]):
action_kind (Union[Unset, None, ListAuditLogsActionKind]):
Returns:
Response[List[ListAuditLogsResponse200Item]]
"""
kwargs = _get_kwargs(
workspace=workspace,
client=client,
page=page,
per_page=per_page,
before=before,
after=after,
username=username,
operation=operation,
resource=resource,
action_kind=action_kind,
)
response = httpx.request(
verify=client.verify_ssl,
**kwargs,
)
return _build_response(response=response)
def sync(
workspace: str,
*,
client: Client,
page: Union[Unset, None, int] = UNSET,
per_page: Union[Unset, None, int] = UNSET,
before: Union[Unset, None, datetime.datetime] = UNSET,
after: Union[Unset, None, datetime.datetime] = UNSET,
username: Union[Unset, None, str] = UNSET,
operation: Union[Unset, None, str] = UNSET,
resource: Union[Unset, None, str] = UNSET,
action_kind: Union[Unset, None, ListAuditLogsActionKind] = UNSET,
) -> Optional[List[ListAuditLogsResponse200Item]]:
"""list audit logs (requires admin privilege)
Args:
workspace (str):
page (Union[Unset, None, int]):
per_page (Union[Unset, None, int]):
before (Union[Unset, None, datetime.datetime]):
after (Union[Unset, None, datetime.datetime]):
username (Union[Unset, None, str]):
operation (Union[Unset, None, str]):
resource (Union[Unset, None, str]):
action_kind (Union[Unset, None, ListAuditLogsActionKind]):
Returns:
Response[List[ListAuditLogsResponse200Item]]
"""
return sync_detailed(
workspace=workspace,
client=client,
page=page,
per_page=per_page,
before=before,
after=after,
username=username,
operation=operation,
resource=resource,
action_kind=action_kind,
).parsed
async def asyncio_detailed(
workspace: str,
*,
client: Client,
page: Union[Unset, None, int] = UNSET,
per_page: Union[Unset, None, int] = UNSET,
before: Union[Unset, None, datetime.datetime] = UNSET,
after: Union[Unset, None, datetime.datetime] = UNSET,
username: Union[Unset, None, str] = UNSET,
operation: Union[Unset, None, str] = UNSET,
resource: Union[Unset, None, str] = UNSET,
action_kind: Union[Unset, None, ListAuditLogsActionKind] = UNSET,
) -> Response[List[ListAuditLogsResponse200Item]]:
"""list audit logs (requires admin privilege)
Args:
workspace (str):
page (Union[Unset, None, int]):
per_page (Union[Unset, None, int]):
before (Union[Unset, None, datetime.datetime]):
after (Union[Unset, None, datetime.datetime]):
username (Union[Unset, None, str]):
operation (Union[Unset, None, str]):
resource (Union[Unset, None, str]):
action_kind (Union[Unset, None, ListAuditLogsActionKind]):
Returns:
Response[List[ListAuditLogsResponse200Item]]
"""
kwargs = _get_kwargs(
workspace=workspace,
client=client,
page=page,
per_page=per_page,
before=before,
after=after,
username=username,
operation=operation,
resource=resource,
action_kind=action_kind,
)
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
response = await _client.request(**kwargs)
return _build_response(response=response)
async def asyncio(
workspace: str,
*,
client: Client,
page: Union[Unset, None, int] = UNSET,
per_page: Union[Unset, None, int] = UNSET,
before: Union[Unset, None, datetime.datetime] = UNSET,
after: Union[Unset, None, datetime.datetime] = UNSET,
username: Union[Unset, None, str] = UNSET,
operation: Union[Unset, None, str] = UNSET,
resource: Union[Unset, None, str] = UNSET,
action_kind: Union[Unset, None, ListAuditLogsActionKind] = UNSET,
) -> Optional[List[ListAuditLogsResponse200Item]]:
"""list audit logs (requires admin privilege)
Args:
workspace (str):
page (Union[Unset, None, int]):
per_page (Union[Unset, None, int]):
before (Union[Unset, None, datetime.datetime]):
after (Union[Unset, None, datetime.datetime]):
username (Union[Unset, None, str]):
operation (Union[Unset, None, str]):
resource (Union[Unset, None, str]):
action_kind (Union[Unset, None, ListAuditLogsActionKind]):
Returns:
Response[List[ListAuditLogsResponse200Item]]
"""
return (
await asyncio_detailed(
workspace=workspace,
client=client,
page=page,
per_page=per_page,
before=before,
after=after,
username=username,
operation=operation,
resource=resource,
action_kind=action_kind,
)
).parsed
@@ -1,93 +0,0 @@
from typing import Any, Dict
import httpx
from ...client import Client
from ...types import Response
def _get_kwargs(
workspace: str,
path: str,
*,
client: Client,
) -> Dict[str, Any]:
url = "{}/w/{workspace}/flows/archive/{path}".format(client.base_url, workspace=workspace, path=path)
headers: Dict[str, str] = client.get_headers()
cookies: Dict[str, Any] = client.get_cookies()
return {
"method": "post",
"url": url,
"headers": headers,
"cookies": cookies,
"timeout": client.get_timeout(),
}
def _build_response(*, response: httpx.Response) -> Response[Any]:
return Response(
status_code=response.status_code,
content=response.content,
headers=response.headers,
parsed=None,
)
def sync_detailed(
workspace: str,
path: str,
*,
client: Client,
) -> Response[Any]:
"""archive flow by path
Args:
workspace (str):
path (str):
Returns:
Response[Any]
"""
kwargs = _get_kwargs(
workspace=workspace,
path=path,
client=client,
)
response = httpx.request(
verify=client.verify_ssl,
**kwargs,
)
return _build_response(response=response)
async def asyncio_detailed(
workspace: str,
path: str,
*,
client: Client,
) -> Response[Any]:
"""archive flow by path
Args:
workspace (str):
path (str):
Returns:
Response[Any]
"""
kwargs = _get_kwargs(
workspace=workspace,
path=path,
client=client,
)
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
response = await _client.request(**kwargs)
return _build_response(response=response)
@@ -1,97 +0,0 @@
from typing import Any, Dict
import httpx
from ...client import Client
from ...models.create_flow_json_body import CreateFlowJsonBody
from ...types import Response
def _get_kwargs(
workspace: str,
*,
client: Client,
json_body: CreateFlowJsonBody,
) -> Dict[str, Any]:
url = "{}/w/{workspace}/flows/create".format(client.base_url, workspace=workspace)
headers: Dict[str, str] = client.get_headers()
cookies: Dict[str, Any] = client.get_cookies()
json_json_body = json_body.to_dict()
return {
"method": "post",
"url": url,
"headers": headers,
"cookies": cookies,
"timeout": client.get_timeout(),
"json": json_json_body,
}
def _build_response(*, response: httpx.Response) -> Response[Any]:
return Response(
status_code=response.status_code,
content=response.content,
headers=response.headers,
parsed=None,
)
def sync_detailed(
workspace: str,
*,
client: Client,
json_body: CreateFlowJsonBody,
) -> Response[Any]:
"""create flow
Args:
workspace (str):
json_body (CreateFlowJsonBody):
Returns:
Response[Any]
"""
kwargs = _get_kwargs(
workspace=workspace,
client=client,
json_body=json_body,
)
response = httpx.request(
verify=client.verify_ssl,
**kwargs,
)
return _build_response(response=response)
async def asyncio_detailed(
workspace: str,
*,
client: Client,
json_body: CreateFlowJsonBody,
) -> Response[Any]:
"""create flow
Args:
workspace (str):
json_body (CreateFlowJsonBody):
Returns:
Response[Any]
"""
kwargs = _get_kwargs(
workspace=workspace,
client=client,
json_body=json_body,
)
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
response = await _client.request(**kwargs)
return _build_response(response=response)
@@ -1,148 +0,0 @@
from typing import Any, Dict, Optional, cast
import httpx
from ...client import Client
from ...types import Response
def _get_kwargs(
workspace: str,
path: str,
*,
client: Client,
) -> Dict[str, Any]:
url = "{}/w/{workspace}/flows/exists/{path}".format(client.base_url, workspace=workspace, path=path)
headers: Dict[str, str] = client.get_headers()
cookies: Dict[str, Any] = client.get_cookies()
return {
"method": "get",
"url": url,
"headers": headers,
"cookies": cookies,
"timeout": client.get_timeout(),
}
def _parse_response(*, response: httpx.Response) -> Optional[bool]:
if response.status_code == 200:
response_200 = cast(bool, response.json())
return response_200
return None
def _build_response(*, response: httpx.Response) -> Response[bool]:
return Response(
status_code=response.status_code,
content=response.content,
headers=response.headers,
parsed=_parse_response(response=response),
)
def sync_detailed(
workspace: str,
path: str,
*,
client: Client,
) -> Response[bool]:
"""exists flow by path
Args:
workspace (str):
path (str):
Returns:
Response[bool]
"""
kwargs = _get_kwargs(
workspace=workspace,
path=path,
client=client,
)
response = httpx.request(
verify=client.verify_ssl,
**kwargs,
)
return _build_response(response=response)
def sync(
workspace: str,
path: str,
*,
client: Client,
) -> Optional[bool]:
"""exists flow by path
Args:
workspace (str):
path (str):
Returns:
Response[bool]
"""
return sync_detailed(
workspace=workspace,
path=path,
client=client,
).parsed
async def asyncio_detailed(
workspace: str,
path: str,
*,
client: Client,
) -> Response[bool]:
"""exists flow by path
Args:
workspace (str):
path (str):
Returns:
Response[bool]
"""
kwargs = _get_kwargs(
workspace=workspace,
path=path,
client=client,
)
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
response = await _client.request(**kwargs)
return _build_response(response=response)
async def asyncio(
workspace: str,
path: str,
*,
client: Client,
) -> Optional[bool]:
"""exists flow by path
Args:
workspace (str):
path (str):
Returns:
Response[bool]
"""
return (
await asyncio_detailed(
workspace=workspace,
path=path,
client=client,
)
).parsed
@@ -1,150 +0,0 @@
from typing import Any, Dict, Optional
import httpx
from ...client import Client
from ...models.get_flow_by_path_response_200 import GetFlowByPathResponse200
from ...types import Response
def _get_kwargs(
workspace: str,
path: str,
*,
client: Client,
) -> Dict[str, Any]:
url = "{}/w/{workspace}/flows/get/{path}".format(client.base_url, workspace=workspace, path=path)
headers: Dict[str, str] = client.get_headers()
cookies: Dict[str, Any] = client.get_cookies()
return {
"method": "get",
"url": url,
"headers": headers,
"cookies": cookies,
"timeout": client.get_timeout(),
}
def _parse_response(*, response: httpx.Response) -> Optional[GetFlowByPathResponse200]:
if response.status_code == 200:
response_200 = GetFlowByPathResponse200.from_dict(response.json())
return response_200
return None
def _build_response(*, response: httpx.Response) -> Response[GetFlowByPathResponse200]:
return Response(
status_code=response.status_code,
content=response.content,
headers=response.headers,
parsed=_parse_response(response=response),
)
def sync_detailed(
workspace: str,
path: str,
*,
client: Client,
) -> Response[GetFlowByPathResponse200]:
"""get flow by path
Args:
workspace (str):
path (str):
Returns:
Response[GetFlowByPathResponse200]
"""
kwargs = _get_kwargs(
workspace=workspace,
path=path,
client=client,
)
response = httpx.request(
verify=client.verify_ssl,
**kwargs,
)
return _build_response(response=response)
def sync(
workspace: str,
path: str,
*,
client: Client,
) -> Optional[GetFlowByPathResponse200]:
"""get flow by path
Args:
workspace (str):
path (str):
Returns:
Response[GetFlowByPathResponse200]
"""
return sync_detailed(
workspace=workspace,
path=path,
client=client,
).parsed
async def asyncio_detailed(
workspace: str,
path: str,
*,
client: Client,
) -> Response[GetFlowByPathResponse200]:
"""get flow by path
Args:
workspace (str):
path (str):
Returns:
Response[GetFlowByPathResponse200]
"""
kwargs = _get_kwargs(
workspace=workspace,
path=path,
client=client,
)
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
response = await _client.request(**kwargs)
return _build_response(response=response)
async def asyncio(
workspace: str,
path: str,
*,
client: Client,
) -> Optional[GetFlowByPathResponse200]:
"""get flow by path
Args:
workspace (str):
path (str):
Returns:
Response[GetFlowByPathResponse200]
"""
return (
await asyncio_detailed(
workspace=workspace,
path=path,
client=client,
)
).parsed
@@ -1,137 +0,0 @@
from typing import Any, Dict, Optional
import httpx
from ...client import Client
from ...models.get_hub_flow_by_id_response_200 import GetHubFlowByIdResponse200
from ...types import Response
def _get_kwargs(
id: int,
*,
client: Client,
) -> Dict[str, Any]:
url = "{}/flows/hub/get/{id}".format(client.base_url, id=id)
headers: Dict[str, str] = client.get_headers()
cookies: Dict[str, Any] = client.get_cookies()
return {
"method": "get",
"url": url,
"headers": headers,
"cookies": cookies,
"timeout": client.get_timeout(),
}
def _parse_response(*, response: httpx.Response) -> Optional[GetHubFlowByIdResponse200]:
if response.status_code == 200:
response_200 = GetHubFlowByIdResponse200.from_dict(response.json())
return response_200
return None
def _build_response(*, response: httpx.Response) -> Response[GetHubFlowByIdResponse200]:
return Response(
status_code=response.status_code,
content=response.content,
headers=response.headers,
parsed=_parse_response(response=response),
)
def sync_detailed(
id: int,
*,
client: Client,
) -> Response[GetHubFlowByIdResponse200]:
"""get hub flow by id
Args:
id (int):
Returns:
Response[GetHubFlowByIdResponse200]
"""
kwargs = _get_kwargs(
id=id,
client=client,
)
response = httpx.request(
verify=client.verify_ssl,
**kwargs,
)
return _build_response(response=response)
def sync(
id: int,
*,
client: Client,
) -> Optional[GetHubFlowByIdResponse200]:
"""get hub flow by id
Args:
id (int):
Returns:
Response[GetHubFlowByIdResponse200]
"""
return sync_detailed(
id=id,
client=client,
).parsed
async def asyncio_detailed(
id: int,
*,
client: Client,
) -> Response[GetHubFlowByIdResponse200]:
"""get hub flow by id
Args:
id (int):
Returns:
Response[GetHubFlowByIdResponse200]
"""
kwargs = _get_kwargs(
id=id,
client=client,
)
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
response = await _client.request(**kwargs)
return _build_response(response=response)
async def asyncio(
id: int,
*,
client: Client,
) -> Optional[GetHubFlowByIdResponse200]:
"""get hub flow by id
Args:
id (int):
Returns:
Response[GetHubFlowByIdResponse200]
"""
return (
await asyncio_detailed(
id=id,
client=client,
)
).parsed
@@ -1,251 +0,0 @@
from typing import Any, Dict, List, Optional, Union
import httpx
from ...client import Client
from ...models.list_flows_response_200_item import ListFlowsResponse200Item
from ...types import UNSET, Response, Unset
def _get_kwargs(
workspace: str,
*,
client: Client,
page: Union[Unset, None, int] = UNSET,
per_page: Union[Unset, None, int] = UNSET,
order_desc: Union[Unset, None, bool] = UNSET,
created_by: Union[Unset, None, str] = UNSET,
path_start: Union[Unset, None, str] = UNSET,
path_exact: Union[Unset, None, str] = UNSET,
show_archived: Union[Unset, None, bool] = UNSET,
) -> Dict[str, Any]:
url = "{}/w/{workspace}/flows/list".format(client.base_url, workspace=workspace)
headers: Dict[str, str] = client.get_headers()
cookies: Dict[str, Any] = client.get_cookies()
params: Dict[str, Any] = {}
params["page"] = page
params["per_page"] = per_page
params["order_desc"] = order_desc
params["created_by"] = created_by
params["path_start"] = path_start
params["path_exact"] = path_exact
params["show_archived"] = show_archived
params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
return {
"method": "get",
"url": url,
"headers": headers,
"cookies": cookies,
"timeout": client.get_timeout(),
"params": params,
}
def _parse_response(*, response: httpx.Response) -> Optional[List[ListFlowsResponse200Item]]:
if response.status_code == 200:
response_200 = []
_response_200 = response.json()
for response_200_item_data in _response_200:
response_200_item = ListFlowsResponse200Item.from_dict(response_200_item_data)
response_200.append(response_200_item)
return response_200
return None
def _build_response(*, response: httpx.Response) -> Response[List[ListFlowsResponse200Item]]:
return Response(
status_code=response.status_code,
content=response.content,
headers=response.headers,
parsed=_parse_response(response=response),
)
def sync_detailed(
workspace: str,
*,
client: Client,
page: Union[Unset, None, int] = UNSET,
per_page: Union[Unset, None, int] = UNSET,
order_desc: Union[Unset, None, bool] = UNSET,
created_by: Union[Unset, None, str] = UNSET,
path_start: Union[Unset, None, str] = UNSET,
path_exact: Union[Unset, None, str] = UNSET,
show_archived: Union[Unset, None, bool] = UNSET,
) -> Response[List[ListFlowsResponse200Item]]:
"""list all available flows
Args:
workspace (str):
page (Union[Unset, None, int]):
per_page (Union[Unset, None, int]):
order_desc (Union[Unset, None, bool]):
created_by (Union[Unset, None, str]):
path_start (Union[Unset, None, str]):
path_exact (Union[Unset, None, str]):
show_archived (Union[Unset, None, bool]):
Returns:
Response[List[ListFlowsResponse200Item]]
"""
kwargs = _get_kwargs(
workspace=workspace,
client=client,
page=page,
per_page=per_page,
order_desc=order_desc,
created_by=created_by,
path_start=path_start,
path_exact=path_exact,
show_archived=show_archived,
)
response = httpx.request(
verify=client.verify_ssl,
**kwargs,
)
return _build_response(response=response)
def sync(
workspace: str,
*,
client: Client,
page: Union[Unset, None, int] = UNSET,
per_page: Union[Unset, None, int] = UNSET,
order_desc: Union[Unset, None, bool] = UNSET,
created_by: Union[Unset, None, str] = UNSET,
path_start: Union[Unset, None, str] = UNSET,
path_exact: Union[Unset, None, str] = UNSET,
show_archived: Union[Unset, None, bool] = UNSET,
) -> Optional[List[ListFlowsResponse200Item]]:
"""list all available flows
Args:
workspace (str):
page (Union[Unset, None, int]):
per_page (Union[Unset, None, int]):
order_desc (Union[Unset, None, bool]):
created_by (Union[Unset, None, str]):
path_start (Union[Unset, None, str]):
path_exact (Union[Unset, None, str]):
show_archived (Union[Unset, None, bool]):
Returns:
Response[List[ListFlowsResponse200Item]]
"""
return sync_detailed(
workspace=workspace,
client=client,
page=page,
per_page=per_page,
order_desc=order_desc,
created_by=created_by,
path_start=path_start,
path_exact=path_exact,
show_archived=show_archived,
).parsed
async def asyncio_detailed(
workspace: str,
*,
client: Client,
page: Union[Unset, None, int] = UNSET,
per_page: Union[Unset, None, int] = UNSET,
order_desc: Union[Unset, None, bool] = UNSET,
created_by: Union[Unset, None, str] = UNSET,
path_start: Union[Unset, None, str] = UNSET,
path_exact: Union[Unset, None, str] = UNSET,
show_archived: Union[Unset, None, bool] = UNSET,
) -> Response[List[ListFlowsResponse200Item]]:
"""list all available flows
Args:
workspace (str):
page (Union[Unset, None, int]):
per_page (Union[Unset, None, int]):
order_desc (Union[Unset, None, bool]):
created_by (Union[Unset, None, str]):
path_start (Union[Unset, None, str]):
path_exact (Union[Unset, None, str]):
show_archived (Union[Unset, None, bool]):
Returns:
Response[List[ListFlowsResponse200Item]]
"""
kwargs = _get_kwargs(
workspace=workspace,
client=client,
page=page,
per_page=per_page,
order_desc=order_desc,
created_by=created_by,
path_start=path_start,
path_exact=path_exact,
show_archived=show_archived,
)
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
response = await _client.request(**kwargs)
return _build_response(response=response)
async def asyncio(
workspace: str,
*,
client: Client,
page: Union[Unset, None, int] = UNSET,
per_page: Union[Unset, None, int] = UNSET,
order_desc: Union[Unset, None, bool] = UNSET,
created_by: Union[Unset, None, str] = UNSET,
path_start: Union[Unset, None, str] = UNSET,
path_exact: Union[Unset, None, str] = UNSET,
show_archived: Union[Unset, None, bool] = UNSET,
) -> Optional[List[ListFlowsResponse200Item]]:
"""list all available flows
Args:
workspace (str):
page (Union[Unset, None, int]):
per_page (Union[Unset, None, int]):
order_desc (Union[Unset, None, bool]):
created_by (Union[Unset, None, str]):
path_start (Union[Unset, None, str]):
path_exact (Union[Unset, None, str]):
show_archived (Union[Unset, None, bool]):
Returns:
Response[List[ListFlowsResponse200Item]]
"""
return (
await asyncio_detailed(
workspace=workspace,
client=client,
page=page,
per_page=per_page,
order_desc=order_desc,
created_by=created_by,
path_start=path_start,
path_exact=path_exact,
show_archived=show_archived,
)
).parsed
@@ -1,116 +0,0 @@
from typing import Any, Dict, Optional
import httpx
from ...client import Client
from ...models.list_hub_flows_response_200 import ListHubFlowsResponse200
from ...types import Response
def _get_kwargs(
*,
client: Client,
) -> Dict[str, Any]:
url = "{}/flows/hub/list".format(client.base_url)
headers: Dict[str, str] = client.get_headers()
cookies: Dict[str, Any] = client.get_cookies()
return {
"method": "get",
"url": url,
"headers": headers,
"cookies": cookies,
"timeout": client.get_timeout(),
}
def _parse_response(*, response: httpx.Response) -> Optional[ListHubFlowsResponse200]:
if response.status_code == 200:
response_200 = ListHubFlowsResponse200.from_dict(response.json())
return response_200
return None
def _build_response(*, response: httpx.Response) -> Response[ListHubFlowsResponse200]:
return Response(
status_code=response.status_code,
content=response.content,
headers=response.headers,
parsed=_parse_response(response=response),
)
def sync_detailed(
*,
client: Client,
) -> Response[ListHubFlowsResponse200]:
"""list all available hub flows
Returns:
Response[ListHubFlowsResponse200]
"""
kwargs = _get_kwargs(
client=client,
)
response = httpx.request(
verify=client.verify_ssl,
**kwargs,
)
return _build_response(response=response)
def sync(
*,
client: Client,
) -> Optional[ListHubFlowsResponse200]:
"""list all available hub flows
Returns:
Response[ListHubFlowsResponse200]
"""
return sync_detailed(
client=client,
).parsed
async def asyncio_detailed(
*,
client: Client,
) -> Response[ListHubFlowsResponse200]:
"""list all available hub flows
Returns:
Response[ListHubFlowsResponse200]
"""
kwargs = _get_kwargs(
client=client,
)
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
response = await _client.request(**kwargs)
return _build_response(response=response)
async def asyncio(
*,
client: Client,
) -> Optional[ListHubFlowsResponse200]:
"""list all available hub flows
Returns:
Response[ListHubFlowsResponse200]
"""
return (
await asyncio_detailed(
client=client,
)
).parsed
@@ -1,104 +0,0 @@
from typing import Any, Dict
import httpx
from ...client import Client
from ...models.update_flow_json_body import UpdateFlowJsonBody
from ...types import Response
def _get_kwargs(
workspace: str,
path: str,
*,
client: Client,
json_body: UpdateFlowJsonBody,
) -> Dict[str, Any]:
url = "{}/w/{workspace}/flows/update/{path}".format(client.base_url, workspace=workspace, path=path)
headers: Dict[str, str] = client.get_headers()
cookies: Dict[str, Any] = client.get_cookies()
json_json_body = json_body.to_dict()
return {
"method": "post",
"url": url,
"headers": headers,
"cookies": cookies,
"timeout": client.get_timeout(),
"json": json_json_body,
}
def _build_response(*, response: httpx.Response) -> Response[Any]:
return Response(
status_code=response.status_code,
content=response.content,
headers=response.headers,
parsed=None,
)
def sync_detailed(
workspace: str,
path: str,
*,
client: Client,
json_body: UpdateFlowJsonBody,
) -> Response[Any]:
"""update flow
Args:
workspace (str):
path (str):
json_body (UpdateFlowJsonBody):
Returns:
Response[Any]
"""
kwargs = _get_kwargs(
workspace=workspace,
path=path,
client=client,
json_body=json_body,
)
response = httpx.request(
verify=client.verify_ssl,
**kwargs,
)
return _build_response(response=response)
async def asyncio_detailed(
workspace: str,
path: str,
*,
client: Client,
json_body: UpdateFlowJsonBody,
) -> Response[Any]:
"""update flow
Args:
workspace (str):
path (str):
json_body (UpdateFlowJsonBody):
Returns:
Response[Any]
"""
kwargs = _get_kwargs(
workspace=workspace,
path=path,
client=client,
json_body=json_body,
)
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
response = await _client.request(**kwargs)
return _build_response(response=response)
@@ -1,112 +0,0 @@
from typing import Any, Dict
import httpx
from ...client import Client
from ...models.add_granular_acls_json_body import AddGranularAclsJsonBody
from ...models.add_granular_acls_kind import AddGranularAclsKind
from ...types import Response
def _get_kwargs(
workspace: str,
kind: AddGranularAclsKind,
path: str,
*,
client: Client,
json_body: AddGranularAclsJsonBody,
) -> Dict[str, Any]:
url = "{}/w/{workspace}/acls/add/{kind}/{path}".format(client.base_url, workspace=workspace, kind=kind, path=path)
headers: Dict[str, str] = client.get_headers()
cookies: Dict[str, Any] = client.get_cookies()
json_json_body = json_body.to_dict()
return {
"method": "post",
"url": url,
"headers": headers,
"cookies": cookies,
"timeout": client.get_timeout(),
"json": json_json_body,
}
def _build_response(*, response: httpx.Response) -> Response[Any]:
return Response(
status_code=response.status_code,
content=response.content,
headers=response.headers,
parsed=None,
)
def sync_detailed(
workspace: str,
kind: AddGranularAclsKind,
path: str,
*,
client: Client,
json_body: AddGranularAclsJsonBody,
) -> Response[Any]:
"""add granular acls
Args:
workspace (str):
kind (AddGranularAclsKind):
path (str):
json_body (AddGranularAclsJsonBody):
Returns:
Response[Any]
"""
kwargs = _get_kwargs(
workspace=workspace,
kind=kind,
path=path,
client=client,
json_body=json_body,
)
response = httpx.request(
verify=client.verify_ssl,
**kwargs,
)
return _build_response(response=response)
async def asyncio_detailed(
workspace: str,
kind: AddGranularAclsKind,
path: str,
*,
client: Client,
json_body: AddGranularAclsJsonBody,
) -> Response[Any]:
"""add granular acls
Args:
workspace (str):
kind (AddGranularAclsKind):
path (str):
json_body (AddGranularAclsJsonBody):
Returns:
Response[Any]
"""
kwargs = _get_kwargs(
workspace=workspace,
kind=kind,
path=path,
client=client,
json_body=json_body,
)
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
response = await _client.request(**kwargs)
return _build_response(response=response)
@@ -1,164 +0,0 @@
from typing import Any, Dict, Optional
import httpx
from ...client import Client
from ...models.get_granular_acls_kind import GetGranularAclsKind
from ...models.get_granular_acls_response_200 import GetGranularAclsResponse200
from ...types import Response
def _get_kwargs(
workspace: str,
kind: GetGranularAclsKind,
path: str,
*,
client: Client,
) -> Dict[str, Any]:
url = "{}/w/{workspace}/acls/get/{kind}/{path}".format(client.base_url, workspace=workspace, kind=kind, path=path)
headers: Dict[str, str] = client.get_headers()
cookies: Dict[str, Any] = client.get_cookies()
return {
"method": "get",
"url": url,
"headers": headers,
"cookies": cookies,
"timeout": client.get_timeout(),
}
def _parse_response(*, response: httpx.Response) -> Optional[GetGranularAclsResponse200]:
if response.status_code == 200:
response_200 = GetGranularAclsResponse200.from_dict(response.json())
return response_200
return None
def _build_response(*, response: httpx.Response) -> Response[GetGranularAclsResponse200]:
return Response(
status_code=response.status_code,
content=response.content,
headers=response.headers,
parsed=_parse_response(response=response),
)
def sync_detailed(
workspace: str,
kind: GetGranularAclsKind,
path: str,
*,
client: Client,
) -> Response[GetGranularAclsResponse200]:
"""get granular acls
Args:
workspace (str):
kind (GetGranularAclsKind):
path (str):
Returns:
Response[GetGranularAclsResponse200]
"""
kwargs = _get_kwargs(
workspace=workspace,
kind=kind,
path=path,
client=client,
)
response = httpx.request(
verify=client.verify_ssl,
**kwargs,
)
return _build_response(response=response)
def sync(
workspace: str,
kind: GetGranularAclsKind,
path: str,
*,
client: Client,
) -> Optional[GetGranularAclsResponse200]:
"""get granular acls
Args:
workspace (str):
kind (GetGranularAclsKind):
path (str):
Returns:
Response[GetGranularAclsResponse200]
"""
return sync_detailed(
workspace=workspace,
kind=kind,
path=path,
client=client,
).parsed
async def asyncio_detailed(
workspace: str,
kind: GetGranularAclsKind,
path: str,
*,
client: Client,
) -> Response[GetGranularAclsResponse200]:
"""get granular acls
Args:
workspace (str):
kind (GetGranularAclsKind):
path (str):
Returns:
Response[GetGranularAclsResponse200]
"""
kwargs = _get_kwargs(
workspace=workspace,
kind=kind,
path=path,
client=client,
)
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
response = await _client.request(**kwargs)
return _build_response(response=response)
async def asyncio(
workspace: str,
kind: GetGranularAclsKind,
path: str,
*,
client: Client,
) -> Optional[GetGranularAclsResponse200]:
"""get granular acls
Args:
workspace (str):
kind (GetGranularAclsKind):
path (str):
Returns:
Response[GetGranularAclsResponse200]
"""
return (
await asyncio_detailed(
workspace=workspace,
kind=kind,
path=path,
client=client,
)
).parsed
@@ -1,114 +0,0 @@
from typing import Any, Dict
import httpx
from ...client import Client
from ...models.remove_granular_acls_json_body import RemoveGranularAclsJsonBody
from ...models.remove_granular_acls_kind import RemoveGranularAclsKind
from ...types import Response
def _get_kwargs(
workspace: str,
kind: RemoveGranularAclsKind,
path: str,
*,
client: Client,
json_body: RemoveGranularAclsJsonBody,
) -> Dict[str, Any]:
url = "{}/w/{workspace}/acls/remove/{kind}/{path}".format(
client.base_url, workspace=workspace, kind=kind, path=path
)
headers: Dict[str, str] = client.get_headers()
cookies: Dict[str, Any] = client.get_cookies()
json_json_body = json_body.to_dict()
return {
"method": "post",
"url": url,
"headers": headers,
"cookies": cookies,
"timeout": client.get_timeout(),
"json": json_json_body,
}
def _build_response(*, response: httpx.Response) -> Response[Any]:
return Response(
status_code=response.status_code,
content=response.content,
headers=response.headers,
parsed=None,
)
def sync_detailed(
workspace: str,
kind: RemoveGranularAclsKind,
path: str,
*,
client: Client,
json_body: RemoveGranularAclsJsonBody,
) -> Response[Any]:
"""remove granular acls
Args:
workspace (str):
kind (RemoveGranularAclsKind):
path (str):
json_body (RemoveGranularAclsJsonBody):
Returns:
Response[Any]
"""
kwargs = _get_kwargs(
workspace=workspace,
kind=kind,
path=path,
client=client,
json_body=json_body,
)
response = httpx.request(
verify=client.verify_ssl,
**kwargs,
)
return _build_response(response=response)
async def asyncio_detailed(
workspace: str,
kind: RemoveGranularAclsKind,
path: str,
*,
client: Client,
json_body: RemoveGranularAclsJsonBody,
) -> Response[Any]:
"""remove granular acls
Args:
workspace (str):
kind (RemoveGranularAclsKind):
path (str):
json_body (RemoveGranularAclsJsonBody):
Returns:
Response[Any]
"""
kwargs = _get_kwargs(
workspace=workspace,
kind=kind,
path=path,
client=client,
json_body=json_body,
)
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
response = await _client.request(**kwargs)
return _build_response(response=response)
@@ -1,104 +0,0 @@
from typing import Any, Dict
import httpx
from ...client import Client
from ...models.add_user_to_group_json_body import AddUserToGroupJsonBody
from ...types import Response
def _get_kwargs(
workspace: str,
name: str,
*,
client: Client,
json_body: AddUserToGroupJsonBody,
) -> Dict[str, Any]:
url = "{}/w/{workspace}/groups/adduser/{name}".format(client.base_url, workspace=workspace, name=name)
headers: Dict[str, str] = client.get_headers()
cookies: Dict[str, Any] = client.get_cookies()
json_json_body = json_body.to_dict()
return {
"method": "post",
"url": url,
"headers": headers,
"cookies": cookies,
"timeout": client.get_timeout(),
"json": json_json_body,
}
def _build_response(*, response: httpx.Response) -> Response[Any]:
return Response(
status_code=response.status_code,
content=response.content,
headers=response.headers,
parsed=None,
)
def sync_detailed(
workspace: str,
name: str,
*,
client: Client,
json_body: AddUserToGroupJsonBody,
) -> Response[Any]:
"""add user to group
Args:
workspace (str):
name (str):
json_body (AddUserToGroupJsonBody):
Returns:
Response[Any]
"""
kwargs = _get_kwargs(
workspace=workspace,
name=name,
client=client,
json_body=json_body,
)
response = httpx.request(
verify=client.verify_ssl,
**kwargs,
)
return _build_response(response=response)
async def asyncio_detailed(
workspace: str,
name: str,
*,
client: Client,
json_body: AddUserToGroupJsonBody,
) -> Response[Any]:
"""add user to group
Args:
workspace (str):
name (str):
json_body (AddUserToGroupJsonBody):
Returns:
Response[Any]
"""
kwargs = _get_kwargs(
workspace=workspace,
name=name,
client=client,
json_body=json_body,
)
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
response = await _client.request(**kwargs)
return _build_response(response=response)
@@ -1,97 +0,0 @@
from typing import Any, Dict
import httpx
from ...client import Client
from ...models.create_group_json_body import CreateGroupJsonBody
from ...types import Response
def _get_kwargs(
workspace: str,
*,
client: Client,
json_body: CreateGroupJsonBody,
) -> Dict[str, Any]:
url = "{}/w/{workspace}/groups/create".format(client.base_url, workspace=workspace)
headers: Dict[str, str] = client.get_headers()
cookies: Dict[str, Any] = client.get_cookies()
json_json_body = json_body.to_dict()
return {
"method": "post",
"url": url,
"headers": headers,
"cookies": cookies,
"timeout": client.get_timeout(),
"json": json_json_body,
}
def _build_response(*, response: httpx.Response) -> Response[Any]:
return Response(
status_code=response.status_code,
content=response.content,
headers=response.headers,
parsed=None,
)
def sync_detailed(
workspace: str,
*,
client: Client,
json_body: CreateGroupJsonBody,
) -> Response[Any]:
"""create group
Args:
workspace (str):
json_body (CreateGroupJsonBody):
Returns:
Response[Any]
"""
kwargs = _get_kwargs(
workspace=workspace,
client=client,
json_body=json_body,
)
response = httpx.request(
verify=client.verify_ssl,
**kwargs,
)
return _build_response(response=response)
async def asyncio_detailed(
workspace: str,
*,
client: Client,
json_body: CreateGroupJsonBody,
) -> Response[Any]:
"""create group
Args:
workspace (str):
json_body (CreateGroupJsonBody):
Returns:
Response[Any]
"""
kwargs = _get_kwargs(
workspace=workspace,
client=client,
json_body=json_body,
)
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
response = await _client.request(**kwargs)
return _build_response(response=response)
@@ -1,93 +0,0 @@
from typing import Any, Dict
import httpx
from ...client import Client
from ...types import Response
def _get_kwargs(
workspace: str,
name: str,
*,
client: Client,
) -> Dict[str, Any]:
url = "{}/w/{workspace}/groups/delete/{name}".format(client.base_url, workspace=workspace, name=name)
headers: Dict[str, str] = client.get_headers()
cookies: Dict[str, Any] = client.get_cookies()
return {
"method": "delete",
"url": url,
"headers": headers,
"cookies": cookies,
"timeout": client.get_timeout(),
}
def _build_response(*, response: httpx.Response) -> Response[Any]:
return Response(
status_code=response.status_code,
content=response.content,
headers=response.headers,
parsed=None,
)
def sync_detailed(
workspace: str,
name: str,
*,
client: Client,
) -> Response[Any]:
"""delete group
Args:
workspace (str):
name (str):
Returns:
Response[Any]
"""
kwargs = _get_kwargs(
workspace=workspace,
name=name,
client=client,
)
response = httpx.request(
verify=client.verify_ssl,
**kwargs,
)
return _build_response(response=response)
async def asyncio_detailed(
workspace: str,
name: str,
*,
client: Client,
) -> Response[Any]:
"""delete group
Args:
workspace (str):
name (str):
Returns:
Response[Any]
"""
kwargs = _get_kwargs(
workspace=workspace,
name=name,
client=client,
)
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
response = await _client.request(**kwargs)
return _build_response(response=response)
@@ -1,150 +0,0 @@
from typing import Any, Dict, Optional
import httpx
from ...client import Client
from ...models.get_group_response_200 import GetGroupResponse200
from ...types import Response
def _get_kwargs(
workspace: str,
name: str,
*,
client: Client,
) -> Dict[str, Any]:
url = "{}/w/{workspace}/groups/get/{name}".format(client.base_url, workspace=workspace, name=name)
headers: Dict[str, str] = client.get_headers()
cookies: Dict[str, Any] = client.get_cookies()
return {
"method": "get",
"url": url,
"headers": headers,
"cookies": cookies,
"timeout": client.get_timeout(),
}
def _parse_response(*, response: httpx.Response) -> Optional[GetGroupResponse200]:
if response.status_code == 200:
response_200 = GetGroupResponse200.from_dict(response.json())
return response_200
return None
def _build_response(*, response: httpx.Response) -> Response[GetGroupResponse200]:
return Response(
status_code=response.status_code,
content=response.content,
headers=response.headers,
parsed=_parse_response(response=response),
)
def sync_detailed(
workspace: str,
name: str,
*,
client: Client,
) -> Response[GetGroupResponse200]:
"""get group
Args:
workspace (str):
name (str):
Returns:
Response[GetGroupResponse200]
"""
kwargs = _get_kwargs(
workspace=workspace,
name=name,
client=client,
)
response = httpx.request(
verify=client.verify_ssl,
**kwargs,
)
return _build_response(response=response)
def sync(
workspace: str,
name: str,
*,
client: Client,
) -> Optional[GetGroupResponse200]:
"""get group
Args:
workspace (str):
name (str):
Returns:
Response[GetGroupResponse200]
"""
return sync_detailed(
workspace=workspace,
name=name,
client=client,
).parsed
async def asyncio_detailed(
workspace: str,
name: str,
*,
client: Client,
) -> Response[GetGroupResponse200]:
"""get group
Args:
workspace (str):
name (str):
Returns:
Response[GetGroupResponse200]
"""
kwargs = _get_kwargs(
workspace=workspace,
name=name,
client=client,
)
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
response = await _client.request(**kwargs)
return _build_response(response=response)
async def asyncio(
workspace: str,
name: str,
*,
client: Client,
) -> Optional[GetGroupResponse200]:
"""get group
Args:
workspace (str):
name (str):
Returns:
Response[GetGroupResponse200]
"""
return (
await asyncio_detailed(
workspace=workspace,
name=name,
client=client,
)
).parsed
@@ -1,136 +0,0 @@
from typing import Any, Dict, List, Optional, cast
import httpx
from ...client import Client
from ...types import Response
def _get_kwargs(
workspace: str,
*,
client: Client,
) -> Dict[str, Any]:
url = "{}/w/{workspace}/groups/listnames".format(client.base_url, workspace=workspace)
headers: Dict[str, str] = client.get_headers()
cookies: Dict[str, Any] = client.get_cookies()
return {
"method": "get",
"url": url,
"headers": headers,
"cookies": cookies,
"timeout": client.get_timeout(),
}
def _parse_response(*, response: httpx.Response) -> Optional[List[str]]:
if response.status_code == 200:
response_200 = cast(List[str], response.json())
return response_200
return None
def _build_response(*, response: httpx.Response) -> Response[List[str]]:
return Response(
status_code=response.status_code,
content=response.content,
headers=response.headers,
parsed=_parse_response(response=response),
)
def sync_detailed(
workspace: str,
*,
client: Client,
) -> Response[List[str]]:
"""list group names
Args:
workspace (str):
Returns:
Response[List[str]]
"""
kwargs = _get_kwargs(
workspace=workspace,
client=client,
)
response = httpx.request(
verify=client.verify_ssl,
**kwargs,
)
return _build_response(response=response)
def sync(
workspace: str,
*,
client: Client,
) -> Optional[List[str]]:
"""list group names
Args:
workspace (str):
Returns:
Response[List[str]]
"""
return sync_detailed(
workspace=workspace,
client=client,
).parsed
async def asyncio_detailed(
workspace: str,
*,
client: Client,
) -> Response[List[str]]:
"""list group names
Args:
workspace (str):
Returns:
Response[List[str]]
"""
kwargs = _get_kwargs(
workspace=workspace,
client=client,
)
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
response = await _client.request(**kwargs)
return _build_response(response=response)
async def asyncio(
workspace: str,
*,
client: Client,
) -> Optional[List[str]]:
"""list group names
Args:
workspace (str):
Returns:
Response[List[str]]
"""
return (
await asyncio_detailed(
workspace=workspace,
client=client,
)
).parsed
@@ -1,176 +0,0 @@
from typing import Any, Dict, List, Optional, Union
import httpx
from ...client import Client
from ...models.list_groups_response_200_item import ListGroupsResponse200Item
from ...types import UNSET, Response, Unset
def _get_kwargs(
workspace: str,
*,
client: Client,
page: Union[Unset, None, int] = UNSET,
per_page: Union[Unset, None, int] = UNSET,
) -> Dict[str, Any]:
url = "{}/w/{workspace}/groups/list".format(client.base_url, workspace=workspace)
headers: Dict[str, str] = client.get_headers()
cookies: Dict[str, Any] = client.get_cookies()
params: Dict[str, Any] = {}
params["page"] = page
params["per_page"] = per_page
params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
return {
"method": "get",
"url": url,
"headers": headers,
"cookies": cookies,
"timeout": client.get_timeout(),
"params": params,
}
def _parse_response(*, response: httpx.Response) -> Optional[List[ListGroupsResponse200Item]]:
if response.status_code == 200:
response_200 = []
_response_200 = response.json()
for response_200_item_data in _response_200:
response_200_item = ListGroupsResponse200Item.from_dict(response_200_item_data)
response_200.append(response_200_item)
return response_200
return None
def _build_response(*, response: httpx.Response) -> Response[List[ListGroupsResponse200Item]]:
return Response(
status_code=response.status_code,
content=response.content,
headers=response.headers,
parsed=_parse_response(response=response),
)
def sync_detailed(
workspace: str,
*,
client: Client,
page: Union[Unset, None, int] = UNSET,
per_page: Union[Unset, None, int] = UNSET,
) -> Response[List[ListGroupsResponse200Item]]:
"""list groups
Args:
workspace (str):
page (Union[Unset, None, int]):
per_page (Union[Unset, None, int]):
Returns:
Response[List[ListGroupsResponse200Item]]
"""
kwargs = _get_kwargs(
workspace=workspace,
client=client,
page=page,
per_page=per_page,
)
response = httpx.request(
verify=client.verify_ssl,
**kwargs,
)
return _build_response(response=response)
def sync(
workspace: str,
*,
client: Client,
page: Union[Unset, None, int] = UNSET,
per_page: Union[Unset, None, int] = UNSET,
) -> Optional[List[ListGroupsResponse200Item]]:
"""list groups
Args:
workspace (str):
page (Union[Unset, None, int]):
per_page (Union[Unset, None, int]):
Returns:
Response[List[ListGroupsResponse200Item]]
"""
return sync_detailed(
workspace=workspace,
client=client,
page=page,
per_page=per_page,
).parsed
async def asyncio_detailed(
workspace: str,
*,
client: Client,
page: Union[Unset, None, int] = UNSET,
per_page: Union[Unset, None, int] = UNSET,
) -> Response[List[ListGroupsResponse200Item]]:
"""list groups
Args:
workspace (str):
page (Union[Unset, None, int]):
per_page (Union[Unset, None, int]):
Returns:
Response[List[ListGroupsResponse200Item]]
"""
kwargs = _get_kwargs(
workspace=workspace,
client=client,
page=page,
per_page=per_page,
)
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
response = await _client.request(**kwargs)
return _build_response(response=response)
async def asyncio(
workspace: str,
*,
client: Client,
page: Union[Unset, None, int] = UNSET,
per_page: Union[Unset, None, int] = UNSET,
) -> Optional[List[ListGroupsResponse200Item]]:
"""list groups
Args:
workspace (str):
page (Union[Unset, None, int]):
per_page (Union[Unset, None, int]):
Returns:
Response[List[ListGroupsResponse200Item]]
"""
return (
await asyncio_detailed(
workspace=workspace,
client=client,
page=page,
per_page=per_page,
)
).parsed
@@ -1,104 +0,0 @@
from typing import Any, Dict
import httpx
from ...client import Client
from ...models.remove_user_to_group_json_body import RemoveUserToGroupJsonBody
from ...types import Response
def _get_kwargs(
workspace: str,
name: str,
*,
client: Client,
json_body: RemoveUserToGroupJsonBody,
) -> Dict[str, Any]:
url = "{}/w/{workspace}/groups/removeuser/{name}".format(client.base_url, workspace=workspace, name=name)
headers: Dict[str, str] = client.get_headers()
cookies: Dict[str, Any] = client.get_cookies()
json_json_body = json_body.to_dict()
return {
"method": "post",
"url": url,
"headers": headers,
"cookies": cookies,
"timeout": client.get_timeout(),
"json": json_json_body,
}
def _build_response(*, response: httpx.Response) -> Response[Any]:
return Response(
status_code=response.status_code,
content=response.content,
headers=response.headers,
parsed=None,
)
def sync_detailed(
workspace: str,
name: str,
*,
client: Client,
json_body: RemoveUserToGroupJsonBody,
) -> Response[Any]:
"""remove user to group
Args:
workspace (str):
name (str):
json_body (RemoveUserToGroupJsonBody):
Returns:
Response[Any]
"""
kwargs = _get_kwargs(
workspace=workspace,
name=name,
client=client,
json_body=json_body,
)
response = httpx.request(
verify=client.verify_ssl,
**kwargs,
)
return _build_response(response=response)
async def asyncio_detailed(
workspace: str,
name: str,
*,
client: Client,
json_body: RemoveUserToGroupJsonBody,
) -> Response[Any]:
"""remove user to group
Args:
workspace (str):
name (str):
json_body (RemoveUserToGroupJsonBody):
Returns:
Response[Any]
"""
kwargs = _get_kwargs(
workspace=workspace,
name=name,
client=client,
json_body=json_body,
)
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
response = await _client.request(**kwargs)
return _build_response(response=response)
@@ -1,104 +0,0 @@
from typing import Any, Dict
import httpx
from ...client import Client
from ...models.update_group_json_body import UpdateGroupJsonBody
from ...types import Response
def _get_kwargs(
workspace: str,
name: str,
*,
client: Client,
json_body: UpdateGroupJsonBody,
) -> Dict[str, Any]:
url = "{}/w/{workspace}/groups/update/{name}".format(client.base_url, workspace=workspace, name=name)
headers: Dict[str, str] = client.get_headers()
cookies: Dict[str, Any] = client.get_cookies()
json_json_body = json_body.to_dict()
return {
"method": "post",
"url": url,
"headers": headers,
"cookies": cookies,
"timeout": client.get_timeout(),
"json": json_json_body,
}
def _build_response(*, response: httpx.Response) -> Response[Any]:
return Response(
status_code=response.status_code,
content=response.content,
headers=response.headers,
parsed=None,
)
def sync_detailed(
workspace: str,
name: str,
*,
client: Client,
json_body: UpdateGroupJsonBody,
) -> Response[Any]:
"""update group
Args:
workspace (str):
name (str):
json_body (UpdateGroupJsonBody):
Returns:
Response[Any]
"""
kwargs = _get_kwargs(
workspace=workspace,
name=name,
client=client,
json_body=json_body,
)
response = httpx.request(
verify=client.verify_ssl,
**kwargs,
)
return _build_response(response=response)
async def asyncio_detailed(
workspace: str,
name: str,
*,
client: Client,
json_body: UpdateGroupJsonBody,
) -> Response[Any]:
"""update group
Args:
workspace (str):
name (str):
json_body (UpdateGroupJsonBody):
Returns:
Response[Any]
"""
kwargs = _get_kwargs(
workspace=workspace,
name=name,
client=client,
json_body=json_body,
)
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
response = await _client.request(**kwargs)
return _build_response(response=response)
@@ -1,104 +0,0 @@
from typing import Any, Dict
import httpx
from ...client import Client
from ...models.cancel_queued_job_json_body import CancelQueuedJobJsonBody
from ...types import Response
def _get_kwargs(
workspace: str,
id: str,
*,
client: Client,
json_body: CancelQueuedJobJsonBody,
) -> Dict[str, Any]:
url = "{}/w/{workspace}/jobs/queue/cancel/{id}".format(client.base_url, workspace=workspace, id=id)
headers: Dict[str, str] = client.get_headers()
cookies: Dict[str, Any] = client.get_cookies()
json_json_body = json_body.to_dict()
return {
"method": "post",
"url": url,
"headers": headers,
"cookies": cookies,
"timeout": client.get_timeout(),
"json": json_json_body,
}
def _build_response(*, response: httpx.Response) -> Response[Any]:
return Response(
status_code=response.status_code,
content=response.content,
headers=response.headers,
parsed=None,
)
def sync_detailed(
workspace: str,
id: str,
*,
client: Client,
json_body: CancelQueuedJobJsonBody,
) -> Response[Any]:
"""cancel queued job
Args:
workspace (str):
id (str):
json_body (CancelQueuedJobJsonBody):
Returns:
Response[Any]
"""
kwargs = _get_kwargs(
workspace=workspace,
id=id,
client=client,
json_body=json_body,
)
response = httpx.request(
verify=client.verify_ssl,
**kwargs,
)
return _build_response(response=response)
async def asyncio_detailed(
workspace: str,
id: str,
*,
client: Client,
json_body: CancelQueuedJobJsonBody,
) -> Response[Any]:
"""cancel queued job
Args:
workspace (str):
id (str):
json_body (CancelQueuedJobJsonBody):
Returns:
Response[Any]
"""
kwargs = _get_kwargs(
workspace=workspace,
id=id,
client=client,
json_body=json_body,
)
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
response = await _client.request(**kwargs)
return _build_response(response=response)
@@ -1,104 +0,0 @@
from typing import Any, Dict
import httpx
from ...client import Client
from ...models.cancel_suspended_job_json_body import CancelSuspendedJobJsonBody
from ...types import Response
def _get_kwargs(
workspace: str,
id: str,
*,
client: Client,
json_body: CancelSuspendedJobJsonBody,
) -> Dict[str, Any]:
url = "{}/w/{workspace}/jobs/cancel/{id}".format(client.base_url, workspace=workspace, id=id)
headers: Dict[str, str] = client.get_headers()
cookies: Dict[str, Any] = client.get_cookies()
json_json_body = json_body.to_dict()
return {
"method": "post",
"url": url,
"headers": headers,
"cookies": cookies,
"timeout": client.get_timeout(),
"json": json_json_body,
}
def _build_response(*, response: httpx.Response) -> Response[Any]:
return Response(
status_code=response.status_code,
content=response.content,
headers=response.headers,
parsed=None,
)
def sync_detailed(
workspace: str,
id: str,
*,
client: Client,
json_body: CancelSuspendedJobJsonBody,
) -> Response[Any]:
"""cancel a job for a suspended flow
Args:
workspace (str):
id (str):
json_body (CancelSuspendedJobJsonBody):
Returns:
Response[Any]
"""
kwargs = _get_kwargs(
workspace=workspace,
id=id,
client=client,
json_body=json_body,
)
response = httpx.request(
verify=client.verify_ssl,
**kwargs,
)
return _build_response(response=response)
async def asyncio_detailed(
workspace: str,
id: str,
*,
client: Client,
json_body: CancelSuspendedJobJsonBody,
) -> Response[Any]:
"""cancel a job for a suspended flow
Args:
workspace (str):
id (str):
json_body (CancelSuspendedJobJsonBody):
Returns:
Response[Any]
"""
kwargs = _get_kwargs(
workspace=workspace,
id=id,
client=client,
json_body=json_body,
)
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
response = await _client.request(**kwargs)
return _build_response(response=response)
@@ -1,150 +0,0 @@
from typing import Any, Dict, Optional
import httpx
from ...client import Client
from ...models.delete_completed_job_response_200 import DeleteCompletedJobResponse200
from ...types import Response
def _get_kwargs(
workspace: str,
id: str,
*,
client: Client,
) -> Dict[str, Any]:
url = "{}/w/{workspace}/jobs/completed/delete/{id}".format(client.base_url, workspace=workspace, id=id)
headers: Dict[str, str] = client.get_headers()
cookies: Dict[str, Any] = client.get_cookies()
return {
"method": "post",
"url": url,
"headers": headers,
"cookies": cookies,
"timeout": client.get_timeout(),
}
def _parse_response(*, response: httpx.Response) -> Optional[DeleteCompletedJobResponse200]:
if response.status_code == 200:
response_200 = DeleteCompletedJobResponse200.from_dict(response.json())
return response_200
return None
def _build_response(*, response: httpx.Response) -> Response[DeleteCompletedJobResponse200]:
return Response(
status_code=response.status_code,
content=response.content,
headers=response.headers,
parsed=_parse_response(response=response),
)
def sync_detailed(
workspace: str,
id: str,
*,
client: Client,
) -> Response[DeleteCompletedJobResponse200]:
"""delete completed job (erase content but keep run id)
Args:
workspace (str):
id (str):
Returns:
Response[DeleteCompletedJobResponse200]
"""
kwargs = _get_kwargs(
workspace=workspace,
id=id,
client=client,
)
response = httpx.request(
verify=client.verify_ssl,
**kwargs,
)
return _build_response(response=response)
def sync(
workspace: str,
id: str,
*,
client: Client,
) -> Optional[DeleteCompletedJobResponse200]:
"""delete completed job (erase content but keep run id)
Args:
workspace (str):
id (str):
Returns:
Response[DeleteCompletedJobResponse200]
"""
return sync_detailed(
workspace=workspace,
id=id,
client=client,
).parsed
async def asyncio_detailed(
workspace: str,
id: str,
*,
client: Client,
) -> Response[DeleteCompletedJobResponse200]:
"""delete completed job (erase content but keep run id)
Args:
workspace (str):
id (str):
Returns:
Response[DeleteCompletedJobResponse200]
"""
kwargs = _get_kwargs(
workspace=workspace,
id=id,
client=client,
)
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
response = await _client.request(**kwargs)
return _build_response(response=response)
async def asyncio(
workspace: str,
id: str,
*,
client: Client,
) -> Optional[DeleteCompletedJobResponse200]:
"""delete completed job (erase content but keep run id)
Args:
workspace (str):
id (str):
Returns:
Response[DeleteCompletedJobResponse200]
"""
return (
await asyncio_detailed(
workspace=workspace,
id=id,
client=client,
)
).parsed
@@ -1,150 +0,0 @@
from typing import Any, Dict, Optional
import httpx
from ...client import Client
from ...models.get_completed_job_response_200 import GetCompletedJobResponse200
from ...types import Response
def _get_kwargs(
workspace: str,
id: str,
*,
client: Client,
) -> Dict[str, Any]:
url = "{}/w/{workspace}/jobs/completed/get/{id}".format(client.base_url, workspace=workspace, id=id)
headers: Dict[str, str] = client.get_headers()
cookies: Dict[str, Any] = client.get_cookies()
return {
"method": "get",
"url": url,
"headers": headers,
"cookies": cookies,
"timeout": client.get_timeout(),
}
def _parse_response(*, response: httpx.Response) -> Optional[GetCompletedJobResponse200]:
if response.status_code == 200:
response_200 = GetCompletedJobResponse200.from_dict(response.json())
return response_200
return None
def _build_response(*, response: httpx.Response) -> Response[GetCompletedJobResponse200]:
return Response(
status_code=response.status_code,
content=response.content,
headers=response.headers,
parsed=_parse_response(response=response),
)
def sync_detailed(
workspace: str,
id: str,
*,
client: Client,
) -> Response[GetCompletedJobResponse200]:
"""get completed job
Args:
workspace (str):
id (str):
Returns:
Response[GetCompletedJobResponse200]
"""
kwargs = _get_kwargs(
workspace=workspace,
id=id,
client=client,
)
response = httpx.request(
verify=client.verify_ssl,
**kwargs,
)
return _build_response(response=response)
def sync(
workspace: str,
id: str,
*,
client: Client,
) -> Optional[GetCompletedJobResponse200]:
"""get completed job
Args:
workspace (str):
id (str):
Returns:
Response[GetCompletedJobResponse200]
"""
return sync_detailed(
workspace=workspace,
id=id,
client=client,
).parsed
async def asyncio_detailed(
workspace: str,
id: str,
*,
client: Client,
) -> Response[GetCompletedJobResponse200]:
"""get completed job
Args:
workspace (str):
id (str):
Returns:
Response[GetCompletedJobResponse200]
"""
kwargs = _get_kwargs(
workspace=workspace,
id=id,
client=client,
)
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
response = await _client.request(**kwargs)
return _build_response(response=response)
async def asyncio(
workspace: str,
id: str,
*,
client: Client,
) -> Optional[GetCompletedJobResponse200]:
"""get completed job
Args:
workspace (str):
id (str):
Returns:
Response[GetCompletedJobResponse200]
"""
return (
await asyncio_detailed(
workspace=workspace,
id=id,
client=client,
)
).parsed
@@ -1,150 +0,0 @@
from typing import Any, Dict, Optional
import httpx
from ...client import Client
from ...models.get_job_response_200 import GetJobResponse200
from ...types import Response
def _get_kwargs(
workspace: str,
id: str,
*,
client: Client,
) -> Dict[str, Any]:
url = "{}/w/{workspace}/jobs/get/{id}".format(client.base_url, workspace=workspace, id=id)
headers: Dict[str, str] = client.get_headers()
cookies: Dict[str, Any] = client.get_cookies()
return {
"method": "get",
"url": url,
"headers": headers,
"cookies": cookies,
"timeout": client.get_timeout(),
}
def _parse_response(*, response: httpx.Response) -> Optional[GetJobResponse200]:
if response.status_code == 200:
response_200 = GetJobResponse200.from_dict(response.json())
return response_200
return None
def _build_response(*, response: httpx.Response) -> Response[GetJobResponse200]:
return Response(
status_code=response.status_code,
content=response.content,
headers=response.headers,
parsed=_parse_response(response=response),
)
def sync_detailed(
workspace: str,
id: str,
*,
client: Client,
) -> Response[GetJobResponse200]:
"""get job
Args:
workspace (str):
id (str):
Returns:
Response[GetJobResponse200]
"""
kwargs = _get_kwargs(
workspace=workspace,
id=id,
client=client,
)
response = httpx.request(
verify=client.verify_ssl,
**kwargs,
)
return _build_response(response=response)
def sync(
workspace: str,
id: str,
*,
client: Client,
) -> Optional[GetJobResponse200]:
"""get job
Args:
workspace (str):
id (str):
Returns:
Response[GetJobResponse200]
"""
return sync_detailed(
workspace=workspace,
id=id,
client=client,
).parsed
async def asyncio_detailed(
workspace: str,
id: str,
*,
client: Client,
) -> Response[GetJobResponse200]:
"""get job
Args:
workspace (str):
id (str):
Returns:
Response[GetJobResponse200]
"""
kwargs = _get_kwargs(
workspace=workspace,
id=id,
client=client,
)
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
response = await _client.request(**kwargs)
return _build_response(response=response)
async def asyncio(
workspace: str,
id: str,
*,
client: Client,
) -> Optional[GetJobResponse200]:
"""get job
Args:
workspace (str):
id (str):
Returns:
Response[GetJobResponse200]
"""
return (
await asyncio_detailed(
workspace=workspace,
id=id,
client=client,
)
).parsed
@@ -1,184 +0,0 @@
from typing import Any, Dict, Optional, Union
import httpx
from ...client import Client
from ...models.get_job_updates_response_200 import GetJobUpdatesResponse200
from ...types import UNSET, Response, Unset
def _get_kwargs(
workspace: str,
id: str,
*,
client: Client,
running: Union[Unset, None, bool] = UNSET,
log_offset: Union[Unset, None, float] = UNSET,
) -> Dict[str, Any]:
url = "{}/w/{workspace}/jobs/getupdate/{id}".format(client.base_url, workspace=workspace, id=id)
headers: Dict[str, str] = client.get_headers()
cookies: Dict[str, Any] = client.get_cookies()
params: Dict[str, Any] = {}
params["running"] = running
params["log_offset"] = log_offset
params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
return {
"method": "get",
"url": url,
"headers": headers,
"cookies": cookies,
"timeout": client.get_timeout(),
"params": params,
}
def _parse_response(*, response: httpx.Response) -> Optional[GetJobUpdatesResponse200]:
if response.status_code == 200:
response_200 = GetJobUpdatesResponse200.from_dict(response.json())
return response_200
return None
def _build_response(*, response: httpx.Response) -> Response[GetJobUpdatesResponse200]:
return Response(
status_code=response.status_code,
content=response.content,
headers=response.headers,
parsed=_parse_response(response=response),
)
def sync_detailed(
workspace: str,
id: str,
*,
client: Client,
running: Union[Unset, None, bool] = UNSET,
log_offset: Union[Unset, None, float] = UNSET,
) -> Response[GetJobUpdatesResponse200]:
"""get job updates
Args:
workspace (str):
id (str):
running (Union[Unset, None, bool]):
log_offset (Union[Unset, None, float]):
Returns:
Response[GetJobUpdatesResponse200]
"""
kwargs = _get_kwargs(
workspace=workspace,
id=id,
client=client,
running=running,
log_offset=log_offset,
)
response = httpx.request(
verify=client.verify_ssl,
**kwargs,
)
return _build_response(response=response)
def sync(
workspace: str,
id: str,
*,
client: Client,
running: Union[Unset, None, bool] = UNSET,
log_offset: Union[Unset, None, float] = UNSET,
) -> Optional[GetJobUpdatesResponse200]:
"""get job updates
Args:
workspace (str):
id (str):
running (Union[Unset, None, bool]):
log_offset (Union[Unset, None, float]):
Returns:
Response[GetJobUpdatesResponse200]
"""
return sync_detailed(
workspace=workspace,
id=id,
client=client,
running=running,
log_offset=log_offset,
).parsed
async def asyncio_detailed(
workspace: str,
id: str,
*,
client: Client,
running: Union[Unset, None, bool] = UNSET,
log_offset: Union[Unset, None, float] = UNSET,
) -> Response[GetJobUpdatesResponse200]:
"""get job updates
Args:
workspace (str):
id (str):
running (Union[Unset, None, bool]):
log_offset (Union[Unset, None, float]):
Returns:
Response[GetJobUpdatesResponse200]
"""
kwargs = _get_kwargs(
workspace=workspace,
id=id,
client=client,
running=running,
log_offset=log_offset,
)
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
response = await _client.request(**kwargs)
return _build_response(response=response)
async def asyncio(
workspace: str,
id: str,
*,
client: Client,
running: Union[Unset, None, bool] = UNSET,
log_offset: Union[Unset, None, float] = UNSET,
) -> Optional[GetJobUpdatesResponse200]:
"""get job updates
Args:
workspace (str):
id (str):
running (Union[Unset, None, bool]):
log_offset (Union[Unset, None, float]):
Returns:
Response[GetJobUpdatesResponse200]
"""
return (
await asyncio_detailed(
workspace=workspace,
id=id,
client=client,
running=running,
log_offset=log_offset,
)
).parsed
@@ -1,335 +0,0 @@
import datetime
from typing import Any, Dict, List, Optional, Union
import httpx
from ...client import Client
from ...models.list_completed_jobs_response_200_item import ListCompletedJobsResponse200Item
from ...types import UNSET, Response, Unset
def _get_kwargs(
workspace: str,
*,
client: Client,
order_desc: Union[Unset, None, bool] = UNSET,
created_by: Union[Unset, None, str] = UNSET,
parent_job: Union[Unset, None, str] = UNSET,
script_path_exact: Union[Unset, None, str] = UNSET,
script_path_start: Union[Unset, None, str] = UNSET,
script_hash: Union[Unset, None, str] = UNSET,
created_before: Union[Unset, None, datetime.datetime] = UNSET,
created_after: Union[Unset, None, datetime.datetime] = UNSET,
success: Union[Unset, None, bool] = UNSET,
job_kinds: Union[Unset, None, str] = UNSET,
is_skipped: Union[Unset, None, bool] = UNSET,
is_flow_step: Union[Unset, None, bool] = UNSET,
) -> Dict[str, Any]:
url = "{}/w/{workspace}/jobs/completed/list".format(client.base_url, workspace=workspace)
headers: Dict[str, str] = client.get_headers()
cookies: Dict[str, Any] = client.get_cookies()
params: Dict[str, Any] = {}
params["order_desc"] = order_desc
params["created_by"] = created_by
params["parent_job"] = parent_job
params["script_path_exact"] = script_path_exact
params["script_path_start"] = script_path_start
params["script_hash"] = script_hash
json_created_before: Union[Unset, None, str] = UNSET
if not isinstance(created_before, Unset):
json_created_before = created_before.isoformat() if created_before else None
params["created_before"] = json_created_before
json_created_after: Union[Unset, None, str] = UNSET
if not isinstance(created_after, Unset):
json_created_after = created_after.isoformat() if created_after else None
params["created_after"] = json_created_after
params["success"] = success
params["job_kinds"] = job_kinds
params["is_skipped"] = is_skipped
params["is_flow_step"] = is_flow_step
params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
return {
"method": "get",
"url": url,
"headers": headers,
"cookies": cookies,
"timeout": client.get_timeout(),
"params": params,
}
def _parse_response(*, response: httpx.Response) -> Optional[List[ListCompletedJobsResponse200Item]]:
if response.status_code == 200:
response_200 = []
_response_200 = response.json()
for response_200_item_data in _response_200:
response_200_item = ListCompletedJobsResponse200Item.from_dict(response_200_item_data)
response_200.append(response_200_item)
return response_200
return None
def _build_response(*, response: httpx.Response) -> Response[List[ListCompletedJobsResponse200Item]]:
return Response(
status_code=response.status_code,
content=response.content,
headers=response.headers,
parsed=_parse_response(response=response),
)
def sync_detailed(
workspace: str,
*,
client: Client,
order_desc: Union[Unset, None, bool] = UNSET,
created_by: Union[Unset, None, str] = UNSET,
parent_job: Union[Unset, None, str] = UNSET,
script_path_exact: Union[Unset, None, str] = UNSET,
script_path_start: Union[Unset, None, str] = UNSET,
script_hash: Union[Unset, None, str] = UNSET,
created_before: Union[Unset, None, datetime.datetime] = UNSET,
created_after: Union[Unset, None, datetime.datetime] = UNSET,
success: Union[Unset, None, bool] = UNSET,
job_kinds: Union[Unset, None, str] = UNSET,
is_skipped: Union[Unset, None, bool] = UNSET,
is_flow_step: Union[Unset, None, bool] = UNSET,
) -> Response[List[ListCompletedJobsResponse200Item]]:
"""list all available completed jobs
Args:
workspace (str):
order_desc (Union[Unset, None, bool]):
created_by (Union[Unset, None, str]):
parent_job (Union[Unset, None, str]):
script_path_exact (Union[Unset, None, str]):
script_path_start (Union[Unset, None, str]):
script_hash (Union[Unset, None, str]):
created_before (Union[Unset, None, datetime.datetime]):
created_after (Union[Unset, None, datetime.datetime]):
success (Union[Unset, None, bool]):
job_kinds (Union[Unset, None, str]):
is_skipped (Union[Unset, None, bool]):
is_flow_step (Union[Unset, None, bool]):
Returns:
Response[List[ListCompletedJobsResponse200Item]]
"""
kwargs = _get_kwargs(
workspace=workspace,
client=client,
order_desc=order_desc,
created_by=created_by,
parent_job=parent_job,
script_path_exact=script_path_exact,
script_path_start=script_path_start,
script_hash=script_hash,
created_before=created_before,
created_after=created_after,
success=success,
job_kinds=job_kinds,
is_skipped=is_skipped,
is_flow_step=is_flow_step,
)
response = httpx.request(
verify=client.verify_ssl,
**kwargs,
)
return _build_response(response=response)
def sync(
workspace: str,
*,
client: Client,
order_desc: Union[Unset, None, bool] = UNSET,
created_by: Union[Unset, None, str] = UNSET,
parent_job: Union[Unset, None, str] = UNSET,
script_path_exact: Union[Unset, None, str] = UNSET,
script_path_start: Union[Unset, None, str] = UNSET,
script_hash: Union[Unset, None, str] = UNSET,
created_before: Union[Unset, None, datetime.datetime] = UNSET,
created_after: Union[Unset, None, datetime.datetime] = UNSET,
success: Union[Unset, None, bool] = UNSET,
job_kinds: Union[Unset, None, str] = UNSET,
is_skipped: Union[Unset, None, bool] = UNSET,
is_flow_step: Union[Unset, None, bool] = UNSET,
) -> Optional[List[ListCompletedJobsResponse200Item]]:
"""list all available completed jobs
Args:
workspace (str):
order_desc (Union[Unset, None, bool]):
created_by (Union[Unset, None, str]):
parent_job (Union[Unset, None, str]):
script_path_exact (Union[Unset, None, str]):
script_path_start (Union[Unset, None, str]):
script_hash (Union[Unset, None, str]):
created_before (Union[Unset, None, datetime.datetime]):
created_after (Union[Unset, None, datetime.datetime]):
success (Union[Unset, None, bool]):
job_kinds (Union[Unset, None, str]):
is_skipped (Union[Unset, None, bool]):
is_flow_step (Union[Unset, None, bool]):
Returns:
Response[List[ListCompletedJobsResponse200Item]]
"""
return sync_detailed(
workspace=workspace,
client=client,
order_desc=order_desc,
created_by=created_by,
parent_job=parent_job,
script_path_exact=script_path_exact,
script_path_start=script_path_start,
script_hash=script_hash,
created_before=created_before,
created_after=created_after,
success=success,
job_kinds=job_kinds,
is_skipped=is_skipped,
is_flow_step=is_flow_step,
).parsed
async def asyncio_detailed(
workspace: str,
*,
client: Client,
order_desc: Union[Unset, None, bool] = UNSET,
created_by: Union[Unset, None, str] = UNSET,
parent_job: Union[Unset, None, str] = UNSET,
script_path_exact: Union[Unset, None, str] = UNSET,
script_path_start: Union[Unset, None, str] = UNSET,
script_hash: Union[Unset, None, str] = UNSET,
created_before: Union[Unset, None, datetime.datetime] = UNSET,
created_after: Union[Unset, None, datetime.datetime] = UNSET,
success: Union[Unset, None, bool] = UNSET,
job_kinds: Union[Unset, None, str] = UNSET,
is_skipped: Union[Unset, None, bool] = UNSET,
is_flow_step: Union[Unset, None, bool] = UNSET,
) -> Response[List[ListCompletedJobsResponse200Item]]:
"""list all available completed jobs
Args:
workspace (str):
order_desc (Union[Unset, None, bool]):
created_by (Union[Unset, None, str]):
parent_job (Union[Unset, None, str]):
script_path_exact (Union[Unset, None, str]):
script_path_start (Union[Unset, None, str]):
script_hash (Union[Unset, None, str]):
created_before (Union[Unset, None, datetime.datetime]):
created_after (Union[Unset, None, datetime.datetime]):
success (Union[Unset, None, bool]):
job_kinds (Union[Unset, None, str]):
is_skipped (Union[Unset, None, bool]):
is_flow_step (Union[Unset, None, bool]):
Returns:
Response[List[ListCompletedJobsResponse200Item]]
"""
kwargs = _get_kwargs(
workspace=workspace,
client=client,
order_desc=order_desc,
created_by=created_by,
parent_job=parent_job,
script_path_exact=script_path_exact,
script_path_start=script_path_start,
script_hash=script_hash,
created_before=created_before,
created_after=created_after,
success=success,
job_kinds=job_kinds,
is_skipped=is_skipped,
is_flow_step=is_flow_step,
)
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
response = await _client.request(**kwargs)
return _build_response(response=response)
async def asyncio(
workspace: str,
*,
client: Client,
order_desc: Union[Unset, None, bool] = UNSET,
created_by: Union[Unset, None, str] = UNSET,
parent_job: Union[Unset, None, str] = UNSET,
script_path_exact: Union[Unset, None, str] = UNSET,
script_path_start: Union[Unset, None, str] = UNSET,
script_hash: Union[Unset, None, str] = UNSET,
created_before: Union[Unset, None, datetime.datetime] = UNSET,
created_after: Union[Unset, None, datetime.datetime] = UNSET,
success: Union[Unset, None, bool] = UNSET,
job_kinds: Union[Unset, None, str] = UNSET,
is_skipped: Union[Unset, None, bool] = UNSET,
is_flow_step: Union[Unset, None, bool] = UNSET,
) -> Optional[List[ListCompletedJobsResponse200Item]]:
"""list all available completed jobs
Args:
workspace (str):
order_desc (Union[Unset, None, bool]):
created_by (Union[Unset, None, str]):
parent_job (Union[Unset, None, str]):
script_path_exact (Union[Unset, None, str]):
script_path_start (Union[Unset, None, str]):
script_hash (Union[Unset, None, str]):
created_before (Union[Unset, None, datetime.datetime]):
created_after (Union[Unset, None, datetime.datetime]):
success (Union[Unset, None, bool]):
job_kinds (Union[Unset, None, str]):
is_skipped (Union[Unset, None, bool]):
is_flow_step (Union[Unset, None, bool]):
Returns:
Response[List[ListCompletedJobsResponse200Item]]
"""
return (
await asyncio_detailed(
workspace=workspace,
client=client,
order_desc=order_desc,
created_by=created_by,
parent_job=parent_job,
script_path_exact=script_path_exact,
script_path_start=script_path_start,
script_hash=script_hash,
created_before=created_before,
created_after=created_after,
success=success,
job_kinds=job_kinds,
is_skipped=is_skipped,
is_flow_step=is_flow_step,
)
).parsed
@@ -1,320 +0,0 @@
import datetime
from typing import Any, Dict, List, Optional, Union
import httpx
from ...client import Client
from ...models.list_jobs_response_200_item import ListJobsResponse200Item
from ...types import UNSET, Response, Unset
def _get_kwargs(
workspace: str,
*,
client: Client,
created_by: Union[Unset, None, str] = UNSET,
parent_job: Union[Unset, None, str] = UNSET,
script_path_exact: Union[Unset, None, str] = UNSET,
script_path_start: Union[Unset, None, str] = UNSET,
script_hash: Union[Unset, None, str] = UNSET,
created_before: Union[Unset, None, datetime.datetime] = UNSET,
created_after: Union[Unset, None, datetime.datetime] = UNSET,
job_kinds: Union[Unset, None, str] = UNSET,
is_skipped: Union[Unset, None, bool] = UNSET,
is_flow_step: Union[Unset, None, bool] = UNSET,
success: Union[Unset, None, bool] = UNSET,
) -> Dict[str, Any]:
url = "{}/w/{workspace}/jobs/list".format(client.base_url, workspace=workspace)
headers: Dict[str, str] = client.get_headers()
cookies: Dict[str, Any] = client.get_cookies()
params: Dict[str, Any] = {}
params["created_by"] = created_by
params["parent_job"] = parent_job
params["script_path_exact"] = script_path_exact
params["script_path_start"] = script_path_start
params["script_hash"] = script_hash
json_created_before: Union[Unset, None, str] = UNSET
if not isinstance(created_before, Unset):
json_created_before = created_before.isoformat() if created_before else None
params["created_before"] = json_created_before
json_created_after: Union[Unset, None, str] = UNSET
if not isinstance(created_after, Unset):
json_created_after = created_after.isoformat() if created_after else None
params["created_after"] = json_created_after
params["job_kinds"] = job_kinds
params["is_skipped"] = is_skipped
params["is_flow_step"] = is_flow_step
params["success"] = success
params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
return {
"method": "get",
"url": url,
"headers": headers,
"cookies": cookies,
"timeout": client.get_timeout(),
"params": params,
}
def _parse_response(*, response: httpx.Response) -> Optional[List[ListJobsResponse200Item]]:
if response.status_code == 200:
response_200 = []
_response_200 = response.json()
for response_200_item_data in _response_200:
response_200_item = ListJobsResponse200Item.from_dict(response_200_item_data)
response_200.append(response_200_item)
return response_200
return None
def _build_response(*, response: httpx.Response) -> Response[List[ListJobsResponse200Item]]:
return Response(
status_code=response.status_code,
content=response.content,
headers=response.headers,
parsed=_parse_response(response=response),
)
def sync_detailed(
workspace: str,
*,
client: Client,
created_by: Union[Unset, None, str] = UNSET,
parent_job: Union[Unset, None, str] = UNSET,
script_path_exact: Union[Unset, None, str] = UNSET,
script_path_start: Union[Unset, None, str] = UNSET,
script_hash: Union[Unset, None, str] = UNSET,
created_before: Union[Unset, None, datetime.datetime] = UNSET,
created_after: Union[Unset, None, datetime.datetime] = UNSET,
job_kinds: Union[Unset, None, str] = UNSET,
is_skipped: Union[Unset, None, bool] = UNSET,
is_flow_step: Union[Unset, None, bool] = UNSET,
success: Union[Unset, None, bool] = UNSET,
) -> Response[List[ListJobsResponse200Item]]:
"""list all available jobs
Args:
workspace (str):
created_by (Union[Unset, None, str]):
parent_job (Union[Unset, None, str]):
script_path_exact (Union[Unset, None, str]):
script_path_start (Union[Unset, None, str]):
script_hash (Union[Unset, None, str]):
created_before (Union[Unset, None, datetime.datetime]):
created_after (Union[Unset, None, datetime.datetime]):
job_kinds (Union[Unset, None, str]):
is_skipped (Union[Unset, None, bool]):
is_flow_step (Union[Unset, None, bool]):
success (Union[Unset, None, bool]):
Returns:
Response[List[ListJobsResponse200Item]]
"""
kwargs = _get_kwargs(
workspace=workspace,
client=client,
created_by=created_by,
parent_job=parent_job,
script_path_exact=script_path_exact,
script_path_start=script_path_start,
script_hash=script_hash,
created_before=created_before,
created_after=created_after,
job_kinds=job_kinds,
is_skipped=is_skipped,
is_flow_step=is_flow_step,
success=success,
)
response = httpx.request(
verify=client.verify_ssl,
**kwargs,
)
return _build_response(response=response)
def sync(
workspace: str,
*,
client: Client,
created_by: Union[Unset, None, str] = UNSET,
parent_job: Union[Unset, None, str] = UNSET,
script_path_exact: Union[Unset, None, str] = UNSET,
script_path_start: Union[Unset, None, str] = UNSET,
script_hash: Union[Unset, None, str] = UNSET,
created_before: Union[Unset, None, datetime.datetime] = UNSET,
created_after: Union[Unset, None, datetime.datetime] = UNSET,
job_kinds: Union[Unset, None, str] = UNSET,
is_skipped: Union[Unset, None, bool] = UNSET,
is_flow_step: Union[Unset, None, bool] = UNSET,
success: Union[Unset, None, bool] = UNSET,
) -> Optional[List[ListJobsResponse200Item]]:
"""list all available jobs
Args:
workspace (str):
created_by (Union[Unset, None, str]):
parent_job (Union[Unset, None, str]):
script_path_exact (Union[Unset, None, str]):
script_path_start (Union[Unset, None, str]):
script_hash (Union[Unset, None, str]):
created_before (Union[Unset, None, datetime.datetime]):
created_after (Union[Unset, None, datetime.datetime]):
job_kinds (Union[Unset, None, str]):
is_skipped (Union[Unset, None, bool]):
is_flow_step (Union[Unset, None, bool]):
success (Union[Unset, None, bool]):
Returns:
Response[List[ListJobsResponse200Item]]
"""
return sync_detailed(
workspace=workspace,
client=client,
created_by=created_by,
parent_job=parent_job,
script_path_exact=script_path_exact,
script_path_start=script_path_start,
script_hash=script_hash,
created_before=created_before,
created_after=created_after,
job_kinds=job_kinds,
is_skipped=is_skipped,
is_flow_step=is_flow_step,
success=success,
).parsed
async def asyncio_detailed(
workspace: str,
*,
client: Client,
created_by: Union[Unset, None, str] = UNSET,
parent_job: Union[Unset, None, str] = UNSET,
script_path_exact: Union[Unset, None, str] = UNSET,
script_path_start: Union[Unset, None, str] = UNSET,
script_hash: Union[Unset, None, str] = UNSET,
created_before: Union[Unset, None, datetime.datetime] = UNSET,
created_after: Union[Unset, None, datetime.datetime] = UNSET,
job_kinds: Union[Unset, None, str] = UNSET,
is_skipped: Union[Unset, None, bool] = UNSET,
is_flow_step: Union[Unset, None, bool] = UNSET,
success: Union[Unset, None, bool] = UNSET,
) -> Response[List[ListJobsResponse200Item]]:
"""list all available jobs
Args:
workspace (str):
created_by (Union[Unset, None, str]):
parent_job (Union[Unset, None, str]):
script_path_exact (Union[Unset, None, str]):
script_path_start (Union[Unset, None, str]):
script_hash (Union[Unset, None, str]):
created_before (Union[Unset, None, datetime.datetime]):
created_after (Union[Unset, None, datetime.datetime]):
job_kinds (Union[Unset, None, str]):
is_skipped (Union[Unset, None, bool]):
is_flow_step (Union[Unset, None, bool]):
success (Union[Unset, None, bool]):
Returns:
Response[List[ListJobsResponse200Item]]
"""
kwargs = _get_kwargs(
workspace=workspace,
client=client,
created_by=created_by,
parent_job=parent_job,
script_path_exact=script_path_exact,
script_path_start=script_path_start,
script_hash=script_hash,
created_before=created_before,
created_after=created_after,
job_kinds=job_kinds,
is_skipped=is_skipped,
is_flow_step=is_flow_step,
success=success,
)
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
response = await _client.request(**kwargs)
return _build_response(response=response)
async def asyncio(
workspace: str,
*,
client: Client,
created_by: Union[Unset, None, str] = UNSET,
parent_job: Union[Unset, None, str] = UNSET,
script_path_exact: Union[Unset, None, str] = UNSET,
script_path_start: Union[Unset, None, str] = UNSET,
script_hash: Union[Unset, None, str] = UNSET,
created_before: Union[Unset, None, datetime.datetime] = UNSET,
created_after: Union[Unset, None, datetime.datetime] = UNSET,
job_kinds: Union[Unset, None, str] = UNSET,
is_skipped: Union[Unset, None, bool] = UNSET,
is_flow_step: Union[Unset, None, bool] = UNSET,
success: Union[Unset, None, bool] = UNSET,
) -> Optional[List[ListJobsResponse200Item]]:
"""list all available jobs
Args:
workspace (str):
created_by (Union[Unset, None, str]):
parent_job (Union[Unset, None, str]):
script_path_exact (Union[Unset, None, str]):
script_path_start (Union[Unset, None, str]):
script_hash (Union[Unset, None, str]):
created_before (Union[Unset, None, datetime.datetime]):
created_after (Union[Unset, None, datetime.datetime]):
job_kinds (Union[Unset, None, str]):
is_skipped (Union[Unset, None, bool]):
is_flow_step (Union[Unset, None, bool]):
success (Union[Unset, None, bool]):
Returns:
Response[List[ListJobsResponse200Item]]
"""
return (
await asyncio_detailed(
workspace=workspace,
client=client,
created_by=created_by,
parent_job=parent_job,
script_path_exact=script_path_exact,
script_path_start=script_path_start,
script_hash=script_hash,
created_before=created_before,
created_after=created_after,
job_kinds=job_kinds,
is_skipped=is_skipped,
is_flow_step=is_flow_step,
success=success,
)
).parsed
@@ -1,305 +0,0 @@
import datetime
from typing import Any, Dict, List, Optional, Union
import httpx
from ...client import Client
from ...models.list_queue_response_200_item import ListQueueResponse200Item
from ...types import UNSET, Response, Unset
def _get_kwargs(
workspace: str,
*,
client: Client,
order_desc: Union[Unset, None, bool] = UNSET,
created_by: Union[Unset, None, str] = UNSET,
parent_job: Union[Unset, None, str] = UNSET,
script_path_exact: Union[Unset, None, str] = UNSET,
script_path_start: Union[Unset, None, str] = UNSET,
script_hash: Union[Unset, None, str] = UNSET,
created_before: Union[Unset, None, datetime.datetime] = UNSET,
created_after: Union[Unset, None, datetime.datetime] = UNSET,
success: Union[Unset, None, bool] = UNSET,
job_kinds: Union[Unset, None, str] = UNSET,
) -> Dict[str, Any]:
url = "{}/w/{workspace}/jobs/queue/list".format(client.base_url, workspace=workspace)
headers: Dict[str, str] = client.get_headers()
cookies: Dict[str, Any] = client.get_cookies()
params: Dict[str, Any] = {}
params["order_desc"] = order_desc
params["created_by"] = created_by
params["parent_job"] = parent_job
params["script_path_exact"] = script_path_exact
params["script_path_start"] = script_path_start
params["script_hash"] = script_hash
json_created_before: Union[Unset, None, str] = UNSET
if not isinstance(created_before, Unset):
json_created_before = created_before.isoformat() if created_before else None
params["created_before"] = json_created_before
json_created_after: Union[Unset, None, str] = UNSET
if not isinstance(created_after, Unset):
json_created_after = created_after.isoformat() if created_after else None
params["created_after"] = json_created_after
params["success"] = success
params["job_kinds"] = job_kinds
params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
return {
"method": "get",
"url": url,
"headers": headers,
"cookies": cookies,
"timeout": client.get_timeout(),
"params": params,
}
def _parse_response(*, response: httpx.Response) -> Optional[List[ListQueueResponse200Item]]:
if response.status_code == 200:
response_200 = []
_response_200 = response.json()
for response_200_item_data in _response_200:
response_200_item = ListQueueResponse200Item.from_dict(response_200_item_data)
response_200.append(response_200_item)
return response_200
return None
def _build_response(*, response: httpx.Response) -> Response[List[ListQueueResponse200Item]]:
return Response(
status_code=response.status_code,
content=response.content,
headers=response.headers,
parsed=_parse_response(response=response),
)
def sync_detailed(
workspace: str,
*,
client: Client,
order_desc: Union[Unset, None, bool] = UNSET,
created_by: Union[Unset, None, str] = UNSET,
parent_job: Union[Unset, None, str] = UNSET,
script_path_exact: Union[Unset, None, str] = UNSET,
script_path_start: Union[Unset, None, str] = UNSET,
script_hash: Union[Unset, None, str] = UNSET,
created_before: Union[Unset, None, datetime.datetime] = UNSET,
created_after: Union[Unset, None, datetime.datetime] = UNSET,
success: Union[Unset, None, bool] = UNSET,
job_kinds: Union[Unset, None, str] = UNSET,
) -> Response[List[ListQueueResponse200Item]]:
"""list all available queued jobs
Args:
workspace (str):
order_desc (Union[Unset, None, bool]):
created_by (Union[Unset, None, str]):
parent_job (Union[Unset, None, str]):
script_path_exact (Union[Unset, None, str]):
script_path_start (Union[Unset, None, str]):
script_hash (Union[Unset, None, str]):
created_before (Union[Unset, None, datetime.datetime]):
created_after (Union[Unset, None, datetime.datetime]):
success (Union[Unset, None, bool]):
job_kinds (Union[Unset, None, str]):
Returns:
Response[List[ListQueueResponse200Item]]
"""
kwargs = _get_kwargs(
workspace=workspace,
client=client,
order_desc=order_desc,
created_by=created_by,
parent_job=parent_job,
script_path_exact=script_path_exact,
script_path_start=script_path_start,
script_hash=script_hash,
created_before=created_before,
created_after=created_after,
success=success,
job_kinds=job_kinds,
)
response = httpx.request(
verify=client.verify_ssl,
**kwargs,
)
return _build_response(response=response)
def sync(
workspace: str,
*,
client: Client,
order_desc: Union[Unset, None, bool] = UNSET,
created_by: Union[Unset, None, str] = UNSET,
parent_job: Union[Unset, None, str] = UNSET,
script_path_exact: Union[Unset, None, str] = UNSET,
script_path_start: Union[Unset, None, str] = UNSET,
script_hash: Union[Unset, None, str] = UNSET,
created_before: Union[Unset, None, datetime.datetime] = UNSET,
created_after: Union[Unset, None, datetime.datetime] = UNSET,
success: Union[Unset, None, bool] = UNSET,
job_kinds: Union[Unset, None, str] = UNSET,
) -> Optional[List[ListQueueResponse200Item]]:
"""list all available queued jobs
Args:
workspace (str):
order_desc (Union[Unset, None, bool]):
created_by (Union[Unset, None, str]):
parent_job (Union[Unset, None, str]):
script_path_exact (Union[Unset, None, str]):
script_path_start (Union[Unset, None, str]):
script_hash (Union[Unset, None, str]):
created_before (Union[Unset, None, datetime.datetime]):
created_after (Union[Unset, None, datetime.datetime]):
success (Union[Unset, None, bool]):
job_kinds (Union[Unset, None, str]):
Returns:
Response[List[ListQueueResponse200Item]]
"""
return sync_detailed(
workspace=workspace,
client=client,
order_desc=order_desc,
created_by=created_by,
parent_job=parent_job,
script_path_exact=script_path_exact,
script_path_start=script_path_start,
script_hash=script_hash,
created_before=created_before,
created_after=created_after,
success=success,
job_kinds=job_kinds,
).parsed
async def asyncio_detailed(
workspace: str,
*,
client: Client,
order_desc: Union[Unset, None, bool] = UNSET,
created_by: Union[Unset, None, str] = UNSET,
parent_job: Union[Unset, None, str] = UNSET,
script_path_exact: Union[Unset, None, str] = UNSET,
script_path_start: Union[Unset, None, str] = UNSET,
script_hash: Union[Unset, None, str] = UNSET,
created_before: Union[Unset, None, datetime.datetime] = UNSET,
created_after: Union[Unset, None, datetime.datetime] = UNSET,
success: Union[Unset, None, bool] = UNSET,
job_kinds: Union[Unset, None, str] = UNSET,
) -> Response[List[ListQueueResponse200Item]]:
"""list all available queued jobs
Args:
workspace (str):
order_desc (Union[Unset, None, bool]):
created_by (Union[Unset, None, str]):
parent_job (Union[Unset, None, str]):
script_path_exact (Union[Unset, None, str]):
script_path_start (Union[Unset, None, str]):
script_hash (Union[Unset, None, str]):
created_before (Union[Unset, None, datetime.datetime]):
created_after (Union[Unset, None, datetime.datetime]):
success (Union[Unset, None, bool]):
job_kinds (Union[Unset, None, str]):
Returns:
Response[List[ListQueueResponse200Item]]
"""
kwargs = _get_kwargs(
workspace=workspace,
client=client,
order_desc=order_desc,
created_by=created_by,
parent_job=parent_job,
script_path_exact=script_path_exact,
script_path_start=script_path_start,
script_hash=script_hash,
created_before=created_before,
created_after=created_after,
success=success,
job_kinds=job_kinds,
)
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
response = await _client.request(**kwargs)
return _build_response(response=response)
async def asyncio(
workspace: str,
*,
client: Client,
order_desc: Union[Unset, None, bool] = UNSET,
created_by: Union[Unset, None, str] = UNSET,
parent_job: Union[Unset, None, str] = UNSET,
script_path_exact: Union[Unset, None, str] = UNSET,
script_path_start: Union[Unset, None, str] = UNSET,
script_hash: Union[Unset, None, str] = UNSET,
created_before: Union[Unset, None, datetime.datetime] = UNSET,
created_after: Union[Unset, None, datetime.datetime] = UNSET,
success: Union[Unset, None, bool] = UNSET,
job_kinds: Union[Unset, None, str] = UNSET,
) -> Optional[List[ListQueueResponse200Item]]:
"""list all available queued jobs
Args:
workspace (str):
order_desc (Union[Unset, None, bool]):
created_by (Union[Unset, None, str]):
parent_job (Union[Unset, None, str]):
script_path_exact (Union[Unset, None, str]):
script_path_start (Union[Unset, None, str]):
script_hash (Union[Unset, None, str]):
created_before (Union[Unset, None, datetime.datetime]):
created_after (Union[Unset, None, datetime.datetime]):
success (Union[Unset, None, bool]):
job_kinds (Union[Unset, None, str]):
Returns:
Response[List[ListQueueResponse200Item]]
"""
return (
await asyncio_detailed(
workspace=workspace,
client=client,
order_desc=order_desc,
created_by=created_by,
parent_job=parent_job,
script_path_exact=script_path_exact,
script_path_start=script_path_start,
script_hash=script_hash,
created_before=created_before,
created_after=created_after,
success=success,
job_kinds=job_kinds,
)
).parsed
@@ -1,104 +0,0 @@
from typing import Any, Dict
import httpx
from ...client import Client
from ...models.resume_suspended_job_json_body import ResumeSuspendedJobJsonBody
from ...types import Response
def _get_kwargs(
workspace: str,
id: str,
*,
client: Client,
json_body: ResumeSuspendedJobJsonBody,
) -> Dict[str, Any]:
url = "{}/w/{workspace}/jobs/resume/{id}".format(client.base_url, workspace=workspace, id=id)
headers: Dict[str, str] = client.get_headers()
cookies: Dict[str, Any] = client.get_cookies()
json_json_body = json_body.to_dict()
return {
"method": "post",
"url": url,
"headers": headers,
"cookies": cookies,
"timeout": client.get_timeout(),
"json": json_json_body,
}
def _build_response(*, response: httpx.Response) -> Response[Any]:
return Response(
status_code=response.status_code,
content=response.content,
headers=response.headers,
parsed=None,
)
def sync_detailed(
workspace: str,
id: str,
*,
client: Client,
json_body: ResumeSuspendedJobJsonBody,
) -> Response[Any]:
"""resume a job for a suspended flow
Args:
workspace (str):
id (str):
json_body (ResumeSuspendedJobJsonBody):
Returns:
Response[Any]
"""
kwargs = _get_kwargs(
workspace=workspace,
id=id,
client=client,
json_body=json_body,
)
response = httpx.request(
verify=client.verify_ssl,
**kwargs,
)
return _build_response(response=response)
async def asyncio_detailed(
workspace: str,
id: str,
*,
client: Client,
json_body: ResumeSuspendedJobJsonBody,
) -> Response[Any]:
"""resume a job for a suspended flow
Args:
workspace (str):
id (str):
json_body (ResumeSuspendedJobJsonBody):
Returns:
Response[Any]
"""
kwargs = _get_kwargs(
workspace=workspace,
id=id,
client=client,
json_body=json_body,
)
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
response = await _client.request(**kwargs)
return _build_response(response=response)
@@ -1,140 +0,0 @@
import datetime
from typing import Any, Dict, Union
import httpx
from ...client import Client
from ...models.run_flow_by_path_json_body import RunFlowByPathJsonBody
from ...types import UNSET, Response, Unset
def _get_kwargs(
workspace: str,
path: str,
*,
client: Client,
json_body: RunFlowByPathJsonBody,
scheduled_for: Union[Unset, None, datetime.datetime] = UNSET,
scheduled_in_secs: Union[Unset, None, float] = UNSET,
parent_job: Union[Unset, None, str] = UNSET,
) -> Dict[str, Any]:
url = "{}/w/{workspace}/jobs/run/f/{path}".format(client.base_url, workspace=workspace, path=path)
headers: Dict[str, str] = client.get_headers()
cookies: Dict[str, Any] = client.get_cookies()
params: Dict[str, Any] = {}
json_scheduled_for: Union[Unset, None, str] = UNSET
if not isinstance(scheduled_for, Unset):
json_scheduled_for = scheduled_for.isoformat() if scheduled_for else None
params["scheduled_for"] = json_scheduled_for
params["scheduled_in_secs"] = scheduled_in_secs
params["parent_job"] = parent_job
params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
json_json_body = json_body.to_dict()
return {
"method": "post",
"url": url,
"headers": headers,
"cookies": cookies,
"timeout": client.get_timeout(),
"json": json_json_body,
"params": params,
}
def _build_response(*, response: httpx.Response) -> Response[Any]:
return Response(
status_code=response.status_code,
content=response.content,
headers=response.headers,
parsed=None,
)
def sync_detailed(
workspace: str,
path: str,
*,
client: Client,
json_body: RunFlowByPathJsonBody,
scheduled_for: Union[Unset, None, datetime.datetime] = UNSET,
scheduled_in_secs: Union[Unset, None, float] = UNSET,
parent_job: Union[Unset, None, str] = UNSET,
) -> Response[Any]:
"""run flow by path
Args:
workspace (str):
path (str):
scheduled_for (Union[Unset, None, datetime.datetime]):
scheduled_in_secs (Union[Unset, None, float]):
parent_job (Union[Unset, None, str]):
json_body (RunFlowByPathJsonBody):
Returns:
Response[Any]
"""
kwargs = _get_kwargs(
workspace=workspace,
path=path,
client=client,
json_body=json_body,
scheduled_for=scheduled_for,
scheduled_in_secs=scheduled_in_secs,
parent_job=parent_job,
)
response = httpx.request(
verify=client.verify_ssl,
**kwargs,
)
return _build_response(response=response)
async def asyncio_detailed(
workspace: str,
path: str,
*,
client: Client,
json_body: RunFlowByPathJsonBody,
scheduled_for: Union[Unset, None, datetime.datetime] = UNSET,
scheduled_in_secs: Union[Unset, None, float] = UNSET,
parent_job: Union[Unset, None, str] = UNSET,
) -> Response[Any]:
"""run flow by path
Args:
workspace (str):
path (str):
scheduled_for (Union[Unset, None, datetime.datetime]):
scheduled_in_secs (Union[Unset, None, float]):
parent_job (Union[Unset, None, str]):
json_body (RunFlowByPathJsonBody):
Returns:
Response[Any]
"""
kwargs = _get_kwargs(
workspace=workspace,
path=path,
client=client,
json_body=json_body,
scheduled_for=scheduled_for,
scheduled_in_secs=scheduled_in_secs,
parent_job=parent_job,
)
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
response = await _client.request(**kwargs)
return _build_response(response=response)
@@ -1,97 +0,0 @@
from typing import Any, Dict
import httpx
from ...client import Client
from ...models.run_flow_preview_json_body import RunFlowPreviewJsonBody
from ...types import Response
def _get_kwargs(
workspace: str,
*,
client: Client,
json_body: RunFlowPreviewJsonBody,
) -> Dict[str, Any]:
url = "{}/w/{workspace}/jobs/run/preview_flow".format(client.base_url, workspace=workspace)
headers: Dict[str, str] = client.get_headers()
cookies: Dict[str, Any] = client.get_cookies()
json_json_body = json_body.to_dict()
return {
"method": "post",
"url": url,
"headers": headers,
"cookies": cookies,
"timeout": client.get_timeout(),
"json": json_json_body,
}
def _build_response(*, response: httpx.Response) -> Response[Any]:
return Response(
status_code=response.status_code,
content=response.content,
headers=response.headers,
parsed=None,
)
def sync_detailed(
workspace: str,
*,
client: Client,
json_body: RunFlowPreviewJsonBody,
) -> Response[Any]:
"""run flow preview
Args:
workspace (str):
json_body (RunFlowPreviewJsonBody):
Returns:
Response[Any]
"""
kwargs = _get_kwargs(
workspace=workspace,
client=client,
json_body=json_body,
)
response = httpx.request(
verify=client.verify_ssl,
**kwargs,
)
return _build_response(response=response)
async def asyncio_detailed(
workspace: str,
*,
client: Client,
json_body: RunFlowPreviewJsonBody,
) -> Response[Any]:
"""run flow preview
Args:
workspace (str):
json_body (RunFlowPreviewJsonBody):
Returns:
Response[Any]
"""
kwargs = _get_kwargs(
workspace=workspace,
client=client,
json_body=json_body,
)
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
response = await _client.request(**kwargs)
return _build_response(response=response)
@@ -1,140 +0,0 @@
import datetime
from typing import Any, Dict, Union
import httpx
from ...client import Client
from ...models.run_script_by_hash_json_body import RunScriptByHashJsonBody
from ...types import UNSET, Response, Unset
def _get_kwargs(
workspace: str,
hash_: str,
*,
client: Client,
json_body: RunScriptByHashJsonBody,
scheduled_for: Union[Unset, None, datetime.datetime] = UNSET,
scheduled_in_secs: Union[Unset, None, float] = UNSET,
parent_job: Union[Unset, None, str] = UNSET,
) -> Dict[str, Any]:
url = "{}/w/{workspace}/jobs/run/h/{hash}".format(client.base_url, workspace=workspace, hash=hash_)
headers: Dict[str, str] = client.get_headers()
cookies: Dict[str, Any] = client.get_cookies()
params: Dict[str, Any] = {}
json_scheduled_for: Union[Unset, None, str] = UNSET
if not isinstance(scheduled_for, Unset):
json_scheduled_for = scheduled_for.isoformat() if scheduled_for else None
params["scheduled_for"] = json_scheduled_for
params["scheduled_in_secs"] = scheduled_in_secs
params["parent_job"] = parent_job
params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
json_json_body = json_body.to_dict()
return {
"method": "post",
"url": url,
"headers": headers,
"cookies": cookies,
"timeout": client.get_timeout(),
"json": json_json_body,
"params": params,
}
def _build_response(*, response: httpx.Response) -> Response[Any]:
return Response(
status_code=response.status_code,
content=response.content,
headers=response.headers,
parsed=None,
)
def sync_detailed(
workspace: str,
hash_: str,
*,
client: Client,
json_body: RunScriptByHashJsonBody,
scheduled_for: Union[Unset, None, datetime.datetime] = UNSET,
scheduled_in_secs: Union[Unset, None, float] = UNSET,
parent_job: Union[Unset, None, str] = UNSET,
) -> Response[Any]:
"""run script by hash
Args:
workspace (str):
hash_ (str):
scheduled_for (Union[Unset, None, datetime.datetime]):
scheduled_in_secs (Union[Unset, None, float]):
parent_job (Union[Unset, None, str]):
json_body (RunScriptByHashJsonBody):
Returns:
Response[Any]
"""
kwargs = _get_kwargs(
workspace=workspace,
hash_=hash_,
client=client,
json_body=json_body,
scheduled_for=scheduled_for,
scheduled_in_secs=scheduled_in_secs,
parent_job=parent_job,
)
response = httpx.request(
verify=client.verify_ssl,
**kwargs,
)
return _build_response(response=response)
async def asyncio_detailed(
workspace: str,
hash_: str,
*,
client: Client,
json_body: RunScriptByHashJsonBody,
scheduled_for: Union[Unset, None, datetime.datetime] = UNSET,
scheduled_in_secs: Union[Unset, None, float] = UNSET,
parent_job: Union[Unset, None, str] = UNSET,
) -> Response[Any]:
"""run script by hash
Args:
workspace (str):
hash_ (str):
scheduled_for (Union[Unset, None, datetime.datetime]):
scheduled_in_secs (Union[Unset, None, float]):
parent_job (Union[Unset, None, str]):
json_body (RunScriptByHashJsonBody):
Returns:
Response[Any]
"""
kwargs = _get_kwargs(
workspace=workspace,
hash_=hash_,
client=client,
json_body=json_body,
scheduled_for=scheduled_for,
scheduled_in_secs=scheduled_in_secs,
parent_job=parent_job,
)
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
response = await _client.request(**kwargs)
return _build_response(response=response)
@@ -1,140 +0,0 @@
import datetime
from typing import Any, Dict, Union
import httpx
from ...client import Client
from ...models.run_script_by_path_json_body import RunScriptByPathJsonBody
from ...types import UNSET, Response, Unset
def _get_kwargs(
workspace: str,
path: str,
*,
client: Client,
json_body: RunScriptByPathJsonBody,
scheduled_for: Union[Unset, None, datetime.datetime] = UNSET,
scheduled_in_secs: Union[Unset, None, float] = UNSET,
parent_job: Union[Unset, None, str] = UNSET,
) -> Dict[str, Any]:
url = "{}/w/{workspace}/jobs/run/p/{path}".format(client.base_url, workspace=workspace, path=path)
headers: Dict[str, str] = client.get_headers()
cookies: Dict[str, Any] = client.get_cookies()
params: Dict[str, Any] = {}
json_scheduled_for: Union[Unset, None, str] = UNSET
if not isinstance(scheduled_for, Unset):
json_scheduled_for = scheduled_for.isoformat() if scheduled_for else None
params["scheduled_for"] = json_scheduled_for
params["scheduled_in_secs"] = scheduled_in_secs
params["parent_job"] = parent_job
params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
json_json_body = json_body.to_dict()
return {
"method": "post",
"url": url,
"headers": headers,
"cookies": cookies,
"timeout": client.get_timeout(),
"json": json_json_body,
"params": params,
}
def _build_response(*, response: httpx.Response) -> Response[Any]:
return Response(
status_code=response.status_code,
content=response.content,
headers=response.headers,
parsed=None,
)
def sync_detailed(
workspace: str,
path: str,
*,
client: Client,
json_body: RunScriptByPathJsonBody,
scheduled_for: Union[Unset, None, datetime.datetime] = UNSET,
scheduled_in_secs: Union[Unset, None, float] = UNSET,
parent_job: Union[Unset, None, str] = UNSET,
) -> Response[Any]:
"""run script by path
Args:
workspace (str):
path (str):
scheduled_for (Union[Unset, None, datetime.datetime]):
scheduled_in_secs (Union[Unset, None, float]):
parent_job (Union[Unset, None, str]):
json_body (RunScriptByPathJsonBody):
Returns:
Response[Any]
"""
kwargs = _get_kwargs(
workspace=workspace,
path=path,
client=client,
json_body=json_body,
scheduled_for=scheduled_for,
scheduled_in_secs=scheduled_in_secs,
parent_job=parent_job,
)
response = httpx.request(
verify=client.verify_ssl,
**kwargs,
)
return _build_response(response=response)
async def asyncio_detailed(
workspace: str,
path: str,
*,
client: Client,
json_body: RunScriptByPathJsonBody,
scheduled_for: Union[Unset, None, datetime.datetime] = UNSET,
scheduled_in_secs: Union[Unset, None, float] = UNSET,
parent_job: Union[Unset, None, str] = UNSET,
) -> Response[Any]:
"""run script by path
Args:
workspace (str):
path (str):
scheduled_for (Union[Unset, None, datetime.datetime]):
scheduled_in_secs (Union[Unset, None, float]):
parent_job (Union[Unset, None, str]):
json_body (RunScriptByPathJsonBody):
Returns:
Response[Any]
"""
kwargs = _get_kwargs(
workspace=workspace,
path=path,
client=client,
json_body=json_body,
scheduled_for=scheduled_for,
scheduled_in_secs=scheduled_in_secs,
parent_job=parent_job,
)
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
response = await _client.request(**kwargs)
return _build_response(response=response)
@@ -1,97 +0,0 @@
from typing import Any, Dict
import httpx
from ...client import Client
from ...models.run_script_preview_json_body import RunScriptPreviewJsonBody
from ...types import Response
def _get_kwargs(
workspace: str,
*,
client: Client,
json_body: RunScriptPreviewJsonBody,
) -> Dict[str, Any]:
url = "{}/w/{workspace}/jobs/run/preview".format(client.base_url, workspace=workspace)
headers: Dict[str, str] = client.get_headers()
cookies: Dict[str, Any] = client.get_cookies()
json_json_body = json_body.to_dict()
return {
"method": "post",
"url": url,
"headers": headers,
"cookies": cookies,
"timeout": client.get_timeout(),
"json": json_json_body,
}
def _build_response(*, response: httpx.Response) -> Response[Any]:
return Response(
status_code=response.status_code,
content=response.content,
headers=response.headers,
parsed=None,
)
def sync_detailed(
workspace: str,
*,
client: Client,
json_body: RunScriptPreviewJsonBody,
) -> Response[Any]:
"""run script preview
Args:
workspace (str):
json_body (RunScriptPreviewJsonBody):
Returns:
Response[Any]
"""
kwargs = _get_kwargs(
workspace=workspace,
client=client,
json_body=json_body,
)
response = httpx.request(
verify=client.verify_ssl,
**kwargs,
)
return _build_response(response=response)
async def asyncio_detailed(
workspace: str,
*,
client: Client,
json_body: RunScriptPreviewJsonBody,
) -> Response[Any]:
"""run script preview
Args:
workspace (str):
json_body (RunScriptPreviewJsonBody):
Returns:
Response[Any]
"""
kwargs = _get_kwargs(
workspace=workspace,
client=client,
json_body=json_body,
)
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
response = await _client.request(**kwargs)
return _build_response(response=response)
@@ -1,140 +0,0 @@
import datetime
from typing import Any, Dict, Union
import httpx
from ...client import Client
from ...models.run_wait_result_script_by_path_json_body import RunWaitResultScriptByPathJsonBody
from ...types import UNSET, Response, Unset
def _get_kwargs(
workspace: str,
path: str,
*,
client: Client,
json_body: RunWaitResultScriptByPathJsonBody,
scheduled_for: Union[Unset, None, datetime.datetime] = UNSET,
scheduled_in_secs: Union[Unset, None, float] = UNSET,
parent_job: Union[Unset, None, str] = UNSET,
) -> Dict[str, Any]:
url = "{}/w/{workspace}/jobs/run_wait_result/p/{path}".format(client.base_url, workspace=workspace, path=path)
headers: Dict[str, str] = client.get_headers()
cookies: Dict[str, Any] = client.get_cookies()
params: Dict[str, Any] = {}
json_scheduled_for: Union[Unset, None, str] = UNSET
if not isinstance(scheduled_for, Unset):
json_scheduled_for = scheduled_for.isoformat() if scheduled_for else None
params["scheduled_for"] = json_scheduled_for
params["scheduled_in_secs"] = scheduled_in_secs
params["parent_job"] = parent_job
params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
json_json_body = json_body.to_dict()
return {
"method": "post",
"url": url,
"headers": headers,
"cookies": cookies,
"timeout": client.get_timeout(),
"json": json_json_body,
"params": params,
}
def _build_response(*, response: httpx.Response) -> Response[Any]:
return Response(
status_code=response.status_code,
content=response.content,
headers=response.headers,
parsed=None,
)
def sync_detailed(
workspace: str,
path: str,
*,
client: Client,
json_body: RunWaitResultScriptByPathJsonBody,
scheduled_for: Union[Unset, None, datetime.datetime] = UNSET,
scheduled_in_secs: Union[Unset, None, float] = UNSET,
parent_job: Union[Unset, None, str] = UNSET,
) -> Response[Any]:
"""run script by path
Args:
workspace (str):
path (str):
scheduled_for (Union[Unset, None, datetime.datetime]):
scheduled_in_secs (Union[Unset, None, float]):
parent_job (Union[Unset, None, str]):
json_body (RunWaitResultScriptByPathJsonBody):
Returns:
Response[Any]
"""
kwargs = _get_kwargs(
workspace=workspace,
path=path,
client=client,
json_body=json_body,
scheduled_for=scheduled_for,
scheduled_in_secs=scheduled_in_secs,
parent_job=parent_job,
)
response = httpx.request(
verify=client.verify_ssl,
**kwargs,
)
return _build_response(response=response)
async def asyncio_detailed(
workspace: str,
path: str,
*,
client: Client,
json_body: RunWaitResultScriptByPathJsonBody,
scheduled_for: Union[Unset, None, datetime.datetime] = UNSET,
scheduled_in_secs: Union[Unset, None, float] = UNSET,
parent_job: Union[Unset, None, str] = UNSET,
) -> Response[Any]:
"""run script by path
Args:
workspace (str):
path (str):
scheduled_for (Union[Unset, None, datetime.datetime]):
scheduled_in_secs (Union[Unset, None, float]):
parent_job (Union[Unset, None, str]):
json_body (RunWaitResultScriptByPathJsonBody):
Returns:
Response[Any]
"""
kwargs = _get_kwargs(
workspace=workspace,
path=path,
client=client,
json_body=json_body,
scheduled_for=scheduled_for,
scheduled_in_secs=scheduled_in_secs,
parent_job=parent_job,
)
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
response = await _client.request(**kwargs)
return _build_response(response=response)
@@ -1,154 +0,0 @@
from typing import Any, Dict, Optional
import httpx
from ...client import Client
from ...models.connect_callback_json_body import ConnectCallbackJsonBody
from ...models.connect_callback_response_200 import ConnectCallbackResponse200
from ...types import Response
def _get_kwargs(
client_name: str,
*,
client: Client,
json_body: ConnectCallbackJsonBody,
) -> Dict[str, Any]:
url = "{}/oauth/connect_callback/{client_name}".format(client.base_url, client_name=client_name)
headers: Dict[str, str] = client.get_headers()
cookies: Dict[str, Any] = client.get_cookies()
json_json_body = json_body.to_dict()
return {
"method": "post",
"url": url,
"headers": headers,
"cookies": cookies,
"timeout": client.get_timeout(),
"json": json_json_body,
}
def _parse_response(*, response: httpx.Response) -> Optional[ConnectCallbackResponse200]:
if response.status_code == 200:
response_200 = ConnectCallbackResponse200.from_dict(response.json())
return response_200
return None
def _build_response(*, response: httpx.Response) -> Response[ConnectCallbackResponse200]:
return Response(
status_code=response.status_code,
content=response.content,
headers=response.headers,
parsed=_parse_response(response=response),
)
def sync_detailed(
client_name: str,
*,
client: Client,
json_body: ConnectCallbackJsonBody,
) -> Response[ConnectCallbackResponse200]:
"""connect callback
Args:
client_name (str):
json_body (ConnectCallbackJsonBody):
Returns:
Response[ConnectCallbackResponse200]
"""
kwargs = _get_kwargs(
client_name=client_name,
client=client,
json_body=json_body,
)
response = httpx.request(
verify=client.verify_ssl,
**kwargs,
)
return _build_response(response=response)
def sync(
client_name: str,
*,
client: Client,
json_body: ConnectCallbackJsonBody,
) -> Optional[ConnectCallbackResponse200]:
"""connect callback
Args:
client_name (str):
json_body (ConnectCallbackJsonBody):
Returns:
Response[ConnectCallbackResponse200]
"""
return sync_detailed(
client_name=client_name,
client=client,
json_body=json_body,
).parsed
async def asyncio_detailed(
client_name: str,
*,
client: Client,
json_body: ConnectCallbackJsonBody,
) -> Response[ConnectCallbackResponse200]:
"""connect callback
Args:
client_name (str):
json_body (ConnectCallbackJsonBody):
Returns:
Response[ConnectCallbackResponse200]
"""
kwargs = _get_kwargs(
client_name=client_name,
client=client,
json_body=json_body,
)
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
response = await _client.request(**kwargs)
return _build_response(response=response)
async def asyncio(
client_name: str,
*,
client: Client,
json_body: ConnectCallbackJsonBody,
) -> Optional[ConnectCallbackResponse200]:
"""connect callback
Args:
client_name (str):
json_body (ConnectCallbackJsonBody):
Returns:
Response[ConnectCallbackResponse200]
"""
return (
await asyncio_detailed(
client_name=client_name,
client=client,
json_body=json_body,
)
).parsed
@@ -1,141 +0,0 @@
from typing import Any, Dict, Optional
import httpx
from ...client import Client
from ...models.connect_slack_callback_json_body import ConnectSlackCallbackJsonBody
from ...models.connect_slack_callback_response_200 import ConnectSlackCallbackResponse200
from ...types import Response
def _get_kwargs(
*,
client: Client,
json_body: ConnectSlackCallbackJsonBody,
) -> Dict[str, Any]:
url = "{}/oauth/connect_slack_callback".format(client.base_url)
headers: Dict[str, str] = client.get_headers()
cookies: Dict[str, Any] = client.get_cookies()
json_json_body = json_body.to_dict()
return {
"method": "post",
"url": url,
"headers": headers,
"cookies": cookies,
"timeout": client.get_timeout(),
"json": json_json_body,
}
def _parse_response(*, response: httpx.Response) -> Optional[ConnectSlackCallbackResponse200]:
if response.status_code == 200:
response_200 = ConnectSlackCallbackResponse200.from_dict(response.json())
return response_200
return None
def _build_response(*, response: httpx.Response) -> Response[ConnectSlackCallbackResponse200]:
return Response(
status_code=response.status_code,
content=response.content,
headers=response.headers,
parsed=_parse_response(response=response),
)
def sync_detailed(
*,
client: Client,
json_body: ConnectSlackCallbackJsonBody,
) -> Response[ConnectSlackCallbackResponse200]:
"""connect slack callback
Args:
json_body (ConnectSlackCallbackJsonBody):
Returns:
Response[ConnectSlackCallbackResponse200]
"""
kwargs = _get_kwargs(
client=client,
json_body=json_body,
)
response = httpx.request(
verify=client.verify_ssl,
**kwargs,
)
return _build_response(response=response)
def sync(
*,
client: Client,
json_body: ConnectSlackCallbackJsonBody,
) -> Optional[ConnectSlackCallbackResponse200]:
"""connect slack callback
Args:
json_body (ConnectSlackCallbackJsonBody):
Returns:
Response[ConnectSlackCallbackResponse200]
"""
return sync_detailed(
client=client,
json_body=json_body,
).parsed
async def asyncio_detailed(
*,
client: Client,
json_body: ConnectSlackCallbackJsonBody,
) -> Response[ConnectSlackCallbackResponse200]:
"""connect slack callback
Args:
json_body (ConnectSlackCallbackJsonBody):
Returns:
Response[ConnectSlackCallbackResponse200]
"""
kwargs = _get_kwargs(
client=client,
json_body=json_body,
)
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
response = await _client.request(**kwargs)
return _build_response(response=response)
async def asyncio(
*,
client: Client,
json_body: ConnectSlackCallbackJsonBody,
) -> Optional[ConnectSlackCallbackResponse200]:
"""connect slack callback
Args:
json_body (ConnectSlackCallbackJsonBody):
Returns:
Response[ConnectSlackCallbackResponse200]
"""
return (
await asyncio_detailed(
client=client,
json_body=json_body,
)
).parsed
@@ -1,97 +0,0 @@
from typing import Any, Dict
import httpx
from ...client import Client
from ...models.create_account_json_body import CreateAccountJsonBody
from ...types import Response
def _get_kwargs(
workspace: str,
*,
client: Client,
json_body: CreateAccountJsonBody,
) -> Dict[str, Any]:
url = "{}/w/{workspace}/oauth/create_account".format(client.base_url, workspace=workspace)
headers: Dict[str, str] = client.get_headers()
cookies: Dict[str, Any] = client.get_cookies()
json_json_body = json_body.to_dict()
return {
"method": "post",
"url": url,
"headers": headers,
"cookies": cookies,
"timeout": client.get_timeout(),
"json": json_json_body,
}
def _build_response(*, response: httpx.Response) -> Response[Any]:
return Response(
status_code=response.status_code,
content=response.content,
headers=response.headers,
parsed=None,
)
def sync_detailed(
workspace: str,
*,
client: Client,
json_body: CreateAccountJsonBody,
) -> Response[Any]:
"""create OAuth account
Args:
workspace (str):
json_body (CreateAccountJsonBody):
Returns:
Response[Any]
"""
kwargs = _get_kwargs(
workspace=workspace,
client=client,
json_body=json_body,
)
response = httpx.request(
verify=client.verify_ssl,
**kwargs,
)
return _build_response(response=response)
async def asyncio_detailed(
workspace: str,
*,
client: Client,
json_body: CreateAccountJsonBody,
) -> Response[Any]:
"""create OAuth account
Args:
workspace (str):
json_body (CreateAccountJsonBody):
Returns:
Response[Any]
"""
kwargs = _get_kwargs(
workspace=workspace,
client=client,
json_body=json_body,
)
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
response = await _client.request(**kwargs)
return _build_response(response=response)
@@ -1,93 +0,0 @@
from typing import Any, Dict
import httpx
from ...client import Client
from ...types import Response
def _get_kwargs(
workspace: str,
id: str,
*,
client: Client,
) -> Dict[str, Any]:
url = "{}/w/{workspace}/oauth/disconnect/{id}".format(client.base_url, workspace=workspace, id=id)
headers: Dict[str, str] = client.get_headers()
cookies: Dict[str, Any] = client.get_cookies()
return {
"method": "post",
"url": url,
"headers": headers,
"cookies": cookies,
"timeout": client.get_timeout(),
}
def _build_response(*, response: httpx.Response) -> Response[Any]:
return Response(
status_code=response.status_code,
content=response.content,
headers=response.headers,
parsed=None,
)
def sync_detailed(
workspace: str,
id: str,
*,
client: Client,
) -> Response[Any]:
"""disconnect account
Args:
workspace (str):
id (str):
Returns:
Response[Any]
"""
kwargs = _get_kwargs(
workspace=workspace,
id=id,
client=client,
)
response = httpx.request(
verify=client.verify_ssl,
**kwargs,
)
return _build_response(response=response)
async def asyncio_detailed(
workspace: str,
id: str,
*,
client: Client,
) -> Response[Any]:
"""disconnect account
Args:
workspace (str):
id (str):
Returns:
Response[Any]
"""
kwargs = _get_kwargs(
workspace=workspace,
id=id,
client=client,
)
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
response = await _client.request(**kwargs)
return _build_response(response=response)
@@ -1,86 +0,0 @@
from typing import Any, Dict
import httpx
from ...client import Client
from ...types import Response
def _get_kwargs(
workspace: str,
*,
client: Client,
) -> Dict[str, Any]:
url = "{}/w/{workspace}/oauth/disconnect_slack".format(client.base_url, workspace=workspace)
headers: Dict[str, str] = client.get_headers()
cookies: Dict[str, Any] = client.get_cookies()
return {
"method": "post",
"url": url,
"headers": headers,
"cookies": cookies,
"timeout": client.get_timeout(),
}
def _build_response(*, response: httpx.Response) -> Response[Any]:
return Response(
status_code=response.status_code,
content=response.content,
headers=response.headers,
parsed=None,
)
def sync_detailed(
workspace: str,
*,
client: Client,
) -> Response[Any]:
"""disconnect slack
Args:
workspace (str):
Returns:
Response[Any]
"""
kwargs = _get_kwargs(
workspace=workspace,
client=client,
)
response = httpx.request(
verify=client.verify_ssl,
**kwargs,
)
return _build_response(response=response)
async def asyncio_detailed(
workspace: str,
*,
client: Client,
) -> Response[Any]:
"""disconnect slack
Args:
workspace (str):
Returns:
Response[Any]
"""
kwargs = _get_kwargs(
workspace=workspace,
client=client,
)
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
response = await _client.request(**kwargs)
return _build_response(response=response)
@@ -1,75 +0,0 @@
from typing import Any, Dict
import httpx
from ...client import Client
from ...types import Response
def _get_kwargs(
*,
client: Client,
) -> Dict[str, Any]:
url = "{}/oauth/list_connects".format(client.base_url)
headers: Dict[str, str] = client.get_headers()
cookies: Dict[str, Any] = client.get_cookies()
return {
"method": "get",
"url": url,
"headers": headers,
"cookies": cookies,
"timeout": client.get_timeout(),
}
def _build_response(*, response: httpx.Response) -> Response[Any]:
return Response(
status_code=response.status_code,
content=response.content,
headers=response.headers,
parsed=None,
)
def sync_detailed(
*,
client: Client,
) -> Response[Any]:
"""list oauth connects
Returns:
Response[Any]
"""
kwargs = _get_kwargs(
client=client,
)
response = httpx.request(
verify=client.verify_ssl,
**kwargs,
)
return _build_response(response=response)
async def asyncio_detailed(
*,
client: Client,
) -> Response[Any]:
"""list oauth connects
Returns:
Response[Any]
"""
kwargs = _get_kwargs(
client=client,
)
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
response = await _client.request(**kwargs)
return _build_response(response=response)
@@ -1,115 +0,0 @@
from typing import Any, Dict, List, Optional, cast
import httpx
from ...client import Client
from ...types import Response
def _get_kwargs(
*,
client: Client,
) -> Dict[str, Any]:
url = "{}/oauth/list_logins".format(client.base_url)
headers: Dict[str, str] = client.get_headers()
cookies: Dict[str, Any] = client.get_cookies()
return {
"method": "get",
"url": url,
"headers": headers,
"cookies": cookies,
"timeout": client.get_timeout(),
}
def _parse_response(*, response: httpx.Response) -> Optional[List[str]]:
if response.status_code == 200:
response_200 = cast(List[str], response.json())
return response_200
return None
def _build_response(*, response: httpx.Response) -> Response[List[str]]:
return Response(
status_code=response.status_code,
content=response.content,
headers=response.headers,
parsed=_parse_response(response=response),
)
def sync_detailed(
*,
client: Client,
) -> Response[List[str]]:
"""list oauth logins
Returns:
Response[List[str]]
"""
kwargs = _get_kwargs(
client=client,
)
response = httpx.request(
verify=client.verify_ssl,
**kwargs,
)
return _build_response(response=response)
def sync(
*,
client: Client,
) -> Optional[List[str]]:
"""list oauth logins
Returns:
Response[List[str]]
"""
return sync_detailed(
client=client,
).parsed
async def asyncio_detailed(
*,
client: Client,
) -> Response[List[str]]:
"""list oauth logins
Returns:
Response[List[str]]
"""
kwargs = _get_kwargs(
client=client,
)
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
response = await _client.request(**kwargs)
return _build_response(response=response)
async def asyncio(
*,
client: Client,
) -> Optional[List[str]]:
"""list oauth logins
Returns:
Response[List[str]]
"""
return (
await asyncio_detailed(
client=client,
)
).parsed
@@ -1,104 +0,0 @@
from typing import Any, Dict
import httpx
from ...client import Client
from ...models.refresh_token_json_body import RefreshTokenJsonBody
from ...types import Response
def _get_kwargs(
workspace: str,
id: str,
*,
client: Client,
json_body: RefreshTokenJsonBody,
) -> Dict[str, Any]:
url = "{}/w/{workspace}/oauth/refresh_token/{id}".format(client.base_url, workspace=workspace, id=id)
headers: Dict[str, str] = client.get_headers()
cookies: Dict[str, Any] = client.get_cookies()
json_json_body = json_body.to_dict()
return {
"method": "post",
"url": url,
"headers": headers,
"cookies": cookies,
"timeout": client.get_timeout(),
"json": json_json_body,
}
def _build_response(*, response: httpx.Response) -> Response[Any]:
return Response(
status_code=response.status_code,
content=response.content,
headers=response.headers,
parsed=None,
)
def sync_detailed(
workspace: str,
id: str,
*,
client: Client,
json_body: RefreshTokenJsonBody,
) -> Response[Any]:
"""refresh token
Args:
workspace (str):
id (str):
json_body (RefreshTokenJsonBody):
Returns:
Response[Any]
"""
kwargs = _get_kwargs(
workspace=workspace,
id=id,
client=client,
json_body=json_body,
)
response = httpx.request(
verify=client.verify_ssl,
**kwargs,
)
return _build_response(response=response)
async def asyncio_detailed(
workspace: str,
id: str,
*,
client: Client,
json_body: RefreshTokenJsonBody,
) -> Response[Any]:
"""refresh token
Args:
workspace (str):
id (str):
json_body (RefreshTokenJsonBody):
Returns:
Response[Any]
"""
kwargs = _get_kwargs(
workspace=workspace,
id=id,
client=client,
json_body=json_body,
)
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
response = await _client.request(**kwargs)
return _build_response(response=response)
@@ -1,97 +0,0 @@
from typing import Any, Dict
import httpx
from ...client import Client
from ...models.set_workspace_slack_json_body import SetWorkspaceSlackJsonBody
from ...types import Response
def _get_kwargs(
workspace: str,
*,
client: Client,
json_body: SetWorkspaceSlackJsonBody,
) -> Dict[str, Any]:
url = "{}/w/{workspace}/oauth/set_workspace_slack".format(client.base_url, workspace=workspace)
headers: Dict[str, str] = client.get_headers()
cookies: Dict[str, Any] = client.get_cookies()
json_json_body = json_body.to_dict()
return {
"method": "post",
"url": url,
"headers": headers,
"cookies": cookies,
"timeout": client.get_timeout(),
"json": json_json_body,
}
def _build_response(*, response: httpx.Response) -> Response[Any]:
return Response(
status_code=response.status_code,
content=response.content,
headers=response.headers,
parsed=None,
)
def sync_detailed(
workspace: str,
*,
client: Client,
json_body: SetWorkspaceSlackJsonBody,
) -> Response[Any]:
"""set workspace's slack
Args:
workspace (str):
json_body (SetWorkspaceSlackJsonBody):
Returns:
Response[Any]
"""
kwargs = _get_kwargs(
workspace=workspace,
client=client,
json_body=json_body,
)
response = httpx.request(
verify=client.verify_ssl,
**kwargs,
)
return _build_response(response=response)
async def asyncio_detailed(
workspace: str,
*,
client: Client,
json_body: SetWorkspaceSlackJsonBody,
) -> Response[Any]:
"""set workspace's slack
Args:
workspace (str):
json_body (SetWorkspaceSlackJsonBody):
Returns:
Response[Any]
"""
kwargs = _get_kwargs(
workspace=workspace,
client=client,
json_body=json_body,
)
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
response = await _client.request(**kwargs)
return _build_response(response=response)
@@ -1,97 +0,0 @@
from typing import Any, Dict
import httpx
from ...client import Client
from ...models.create_resource_json_body import CreateResourceJsonBody
from ...types import Response
def _get_kwargs(
workspace: str,
*,
client: Client,
json_body: CreateResourceJsonBody,
) -> Dict[str, Any]:
url = "{}/w/{workspace}/resources/create".format(client.base_url, workspace=workspace)
headers: Dict[str, str] = client.get_headers()
cookies: Dict[str, Any] = client.get_cookies()
json_json_body = json_body.to_dict()
return {
"method": "post",
"url": url,
"headers": headers,
"cookies": cookies,
"timeout": client.get_timeout(),
"json": json_json_body,
}
def _build_response(*, response: httpx.Response) -> Response[Any]:
return Response(
status_code=response.status_code,
content=response.content,
headers=response.headers,
parsed=None,
)
def sync_detailed(
workspace: str,
*,
client: Client,
json_body: CreateResourceJsonBody,
) -> Response[Any]:
"""create resource
Args:
workspace (str):
json_body (CreateResourceJsonBody):
Returns:
Response[Any]
"""
kwargs = _get_kwargs(
workspace=workspace,
client=client,
json_body=json_body,
)
response = httpx.request(
verify=client.verify_ssl,
**kwargs,
)
return _build_response(response=response)
async def asyncio_detailed(
workspace: str,
*,
client: Client,
json_body: CreateResourceJsonBody,
) -> Response[Any]:
"""create resource
Args:
workspace (str):
json_body (CreateResourceJsonBody):
Returns:
Response[Any]
"""
kwargs = _get_kwargs(
workspace=workspace,
client=client,
json_body=json_body,
)
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
response = await _client.request(**kwargs)
return _build_response(response=response)
@@ -1,97 +0,0 @@
from typing import Any, Dict
import httpx
from ...client import Client
from ...models.create_resource_type_json_body import CreateResourceTypeJsonBody
from ...types import Response
def _get_kwargs(
workspace: str,
*,
client: Client,
json_body: CreateResourceTypeJsonBody,
) -> Dict[str, Any]:
url = "{}/w/{workspace}/resources/type/create".format(client.base_url, workspace=workspace)
headers: Dict[str, str] = client.get_headers()
cookies: Dict[str, Any] = client.get_cookies()
json_json_body = json_body.to_dict()
return {
"method": "post",
"url": url,
"headers": headers,
"cookies": cookies,
"timeout": client.get_timeout(),
"json": json_json_body,
}
def _build_response(*, response: httpx.Response) -> Response[Any]:
return Response(
status_code=response.status_code,
content=response.content,
headers=response.headers,
parsed=None,
)
def sync_detailed(
workspace: str,
*,
client: Client,
json_body: CreateResourceTypeJsonBody,
) -> Response[Any]:
"""create resource_type
Args:
workspace (str):
json_body (CreateResourceTypeJsonBody):
Returns:
Response[Any]
"""
kwargs = _get_kwargs(
workspace=workspace,
client=client,
json_body=json_body,
)
response = httpx.request(
verify=client.verify_ssl,
**kwargs,
)
return _build_response(response=response)
async def asyncio_detailed(
workspace: str,
*,
client: Client,
json_body: CreateResourceTypeJsonBody,
) -> Response[Any]:
"""create resource_type
Args:
workspace (str):
json_body (CreateResourceTypeJsonBody):
Returns:
Response[Any]
"""
kwargs = _get_kwargs(
workspace=workspace,
client=client,
json_body=json_body,
)
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
response = await _client.request(**kwargs)
return _build_response(response=response)
@@ -1,93 +0,0 @@
from typing import Any, Dict
import httpx
from ...client import Client
from ...types import Response
def _get_kwargs(
workspace: str,
path: str,
*,
client: Client,
) -> Dict[str, Any]:
url = "{}/w/{workspace}/resources/delete/{path}".format(client.base_url, workspace=workspace, path=path)
headers: Dict[str, str] = client.get_headers()
cookies: Dict[str, Any] = client.get_cookies()
return {
"method": "delete",
"url": url,
"headers": headers,
"cookies": cookies,
"timeout": client.get_timeout(),
}
def _build_response(*, response: httpx.Response) -> Response[Any]:
return Response(
status_code=response.status_code,
content=response.content,
headers=response.headers,
parsed=None,
)
def sync_detailed(
workspace: str,
path: str,
*,
client: Client,
) -> Response[Any]:
"""delete resource
Args:
workspace (str):
path (str):
Returns:
Response[Any]
"""
kwargs = _get_kwargs(
workspace=workspace,
path=path,
client=client,
)
response = httpx.request(
verify=client.verify_ssl,
**kwargs,
)
return _build_response(response=response)
async def asyncio_detailed(
workspace: str,
path: str,
*,
client: Client,
) -> Response[Any]:
"""delete resource
Args:
workspace (str):
path (str):
Returns:
Response[Any]
"""
kwargs = _get_kwargs(
workspace=workspace,
path=path,
client=client,
)
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
response = await _client.request(**kwargs)
return _build_response(response=response)
@@ -1,93 +0,0 @@
from typing import Any, Dict
import httpx
from ...client import Client
from ...types import Response
def _get_kwargs(
workspace: str,
path: str,
*,
client: Client,
) -> Dict[str, Any]:
url = "{}/w/{workspace}/resources/type/delete/{path}".format(client.base_url, workspace=workspace, path=path)
headers: Dict[str, str] = client.get_headers()
cookies: Dict[str, Any] = client.get_cookies()
return {
"method": "delete",
"url": url,
"headers": headers,
"cookies": cookies,
"timeout": client.get_timeout(),
}
def _build_response(*, response: httpx.Response) -> Response[Any]:
return Response(
status_code=response.status_code,
content=response.content,
headers=response.headers,
parsed=None,
)
def sync_detailed(
workspace: str,
path: str,
*,
client: Client,
) -> Response[Any]:
"""delete resource_type
Args:
workspace (str):
path (str):
Returns:
Response[Any]
"""
kwargs = _get_kwargs(
workspace=workspace,
path=path,
client=client,
)
response = httpx.request(
verify=client.verify_ssl,
**kwargs,
)
return _build_response(response=response)
async def asyncio_detailed(
workspace: str,
path: str,
*,
client: Client,
) -> Response[Any]:
"""delete resource_type
Args:
workspace (str):
path (str):
Returns:
Response[Any]
"""
kwargs = _get_kwargs(
workspace=workspace,
path=path,
client=client,
)
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
response = await _client.request(**kwargs)
return _build_response(response=response)
@@ -1,148 +0,0 @@
from typing import Any, Dict, Optional, cast
import httpx
from ...client import Client
from ...types import Response
def _get_kwargs(
workspace: str,
path: str,
*,
client: Client,
) -> Dict[str, Any]:
url = "{}/w/{workspace}/resources/exists/{path}".format(client.base_url, workspace=workspace, path=path)
headers: Dict[str, str] = client.get_headers()
cookies: Dict[str, Any] = client.get_cookies()
return {
"method": "get",
"url": url,
"headers": headers,
"cookies": cookies,
"timeout": client.get_timeout(),
}
def _parse_response(*, response: httpx.Response) -> Optional[bool]:
if response.status_code == 200:
response_200 = cast(bool, response.json())
return response_200
return None
def _build_response(*, response: httpx.Response) -> Response[bool]:
return Response(
status_code=response.status_code,
content=response.content,
headers=response.headers,
parsed=_parse_response(response=response),
)
def sync_detailed(
workspace: str,
path: str,
*,
client: Client,
) -> Response[bool]:
"""does resource exists
Args:
workspace (str):
path (str):
Returns:
Response[bool]
"""
kwargs = _get_kwargs(
workspace=workspace,
path=path,
client=client,
)
response = httpx.request(
verify=client.verify_ssl,
**kwargs,
)
return _build_response(response=response)
def sync(
workspace: str,
path: str,
*,
client: Client,
) -> Optional[bool]:
"""does resource exists
Args:
workspace (str):
path (str):
Returns:
Response[bool]
"""
return sync_detailed(
workspace=workspace,
path=path,
client=client,
).parsed
async def asyncio_detailed(
workspace: str,
path: str,
*,
client: Client,
) -> Response[bool]:
"""does resource exists
Args:
workspace (str):
path (str):
Returns:
Response[bool]
"""
kwargs = _get_kwargs(
workspace=workspace,
path=path,
client=client,
)
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
response = await _client.request(**kwargs)
return _build_response(response=response)
async def asyncio(
workspace: str,
path: str,
*,
client: Client,
) -> Optional[bool]:
"""does resource exists
Args:
workspace (str):
path (str):
Returns:
Response[bool]
"""
return (
await asyncio_detailed(
workspace=workspace,
path=path,
client=client,
)
).parsed
@@ -1,148 +0,0 @@
from typing import Any, Dict, Optional, cast
import httpx
from ...client import Client
from ...types import Response
def _get_kwargs(
workspace: str,
path: str,
*,
client: Client,
) -> Dict[str, Any]:
url = "{}/w/{workspace}/resources/type/exists/{path}".format(client.base_url, workspace=workspace, path=path)
headers: Dict[str, str] = client.get_headers()
cookies: Dict[str, Any] = client.get_cookies()
return {
"method": "get",
"url": url,
"headers": headers,
"cookies": cookies,
"timeout": client.get_timeout(),
}
def _parse_response(*, response: httpx.Response) -> Optional[bool]:
if response.status_code == 200:
response_200 = cast(bool, response.json())
return response_200
return None
def _build_response(*, response: httpx.Response) -> Response[bool]:
return Response(
status_code=response.status_code,
content=response.content,
headers=response.headers,
parsed=_parse_response(response=response),
)
def sync_detailed(
workspace: str,
path: str,
*,
client: Client,
) -> Response[bool]:
"""does resource_type exists
Args:
workspace (str):
path (str):
Returns:
Response[bool]
"""
kwargs = _get_kwargs(
workspace=workspace,
path=path,
client=client,
)
response = httpx.request(
verify=client.verify_ssl,
**kwargs,
)
return _build_response(response=response)
def sync(
workspace: str,
path: str,
*,
client: Client,
) -> Optional[bool]:
"""does resource_type exists
Args:
workspace (str):
path (str):
Returns:
Response[bool]
"""
return sync_detailed(
workspace=workspace,
path=path,
client=client,
).parsed
async def asyncio_detailed(
workspace: str,
path: str,
*,
client: Client,
) -> Response[bool]:
"""does resource_type exists
Args:
workspace (str):
path (str):
Returns:
Response[bool]
"""
kwargs = _get_kwargs(
workspace=workspace,
path=path,
client=client,
)
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
response = await _client.request(**kwargs)
return _build_response(response=response)
async def asyncio(
workspace: str,
path: str,
*,
client: Client,
) -> Optional[bool]:
"""does resource_type exists
Args:
workspace (str):
path (str):
Returns:
Response[bool]
"""
return (
await asyncio_detailed(
workspace=workspace,
path=path,
client=client,
)
).parsed
@@ -1,150 +0,0 @@
from typing import Any, Dict, Optional
import httpx
from ...client import Client
from ...models.get_resource_response_200 import GetResourceResponse200
from ...types import Response
def _get_kwargs(
workspace: str,
path: str,
*,
client: Client,
) -> Dict[str, Any]:
url = "{}/w/{workspace}/resources/get/{path}".format(client.base_url, workspace=workspace, path=path)
headers: Dict[str, str] = client.get_headers()
cookies: Dict[str, Any] = client.get_cookies()
return {
"method": "get",
"url": url,
"headers": headers,
"cookies": cookies,
"timeout": client.get_timeout(),
}
def _parse_response(*, response: httpx.Response) -> Optional[GetResourceResponse200]:
if response.status_code == 200:
response_200 = GetResourceResponse200.from_dict(response.json())
return response_200
return None
def _build_response(*, response: httpx.Response) -> Response[GetResourceResponse200]:
return Response(
status_code=response.status_code,
content=response.content,
headers=response.headers,
parsed=_parse_response(response=response),
)
def sync_detailed(
workspace: str,
path: str,
*,
client: Client,
) -> Response[GetResourceResponse200]:
"""get resource
Args:
workspace (str):
path (str):
Returns:
Response[GetResourceResponse200]
"""
kwargs = _get_kwargs(
workspace=workspace,
path=path,
client=client,
)
response = httpx.request(
verify=client.verify_ssl,
**kwargs,
)
return _build_response(response=response)
def sync(
workspace: str,
path: str,
*,
client: Client,
) -> Optional[GetResourceResponse200]:
"""get resource
Args:
workspace (str):
path (str):
Returns:
Response[GetResourceResponse200]
"""
return sync_detailed(
workspace=workspace,
path=path,
client=client,
).parsed
async def asyncio_detailed(
workspace: str,
path: str,
*,
client: Client,
) -> Response[GetResourceResponse200]:
"""get resource
Args:
workspace (str):
path (str):
Returns:
Response[GetResourceResponse200]
"""
kwargs = _get_kwargs(
workspace=workspace,
path=path,
client=client,
)
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
response = await _client.request(**kwargs)
return _build_response(response=response)
async def asyncio(
workspace: str,
path: str,
*,
client: Client,
) -> Optional[GetResourceResponse200]:
"""get resource
Args:
workspace (str):
path (str):
Returns:
Response[GetResourceResponse200]
"""
return (
await asyncio_detailed(
workspace=workspace,
path=path,
client=client,
)
).parsed
@@ -1,150 +0,0 @@
from typing import Any, Dict, Optional
import httpx
from ...client import Client
from ...models.get_resource_type_response_200 import GetResourceTypeResponse200
from ...types import Response
def _get_kwargs(
workspace: str,
path: str,
*,
client: Client,
) -> Dict[str, Any]:
url = "{}/w/{workspace}/resources/type/get/{path}".format(client.base_url, workspace=workspace, path=path)
headers: Dict[str, str] = client.get_headers()
cookies: Dict[str, Any] = client.get_cookies()
return {
"method": "get",
"url": url,
"headers": headers,
"cookies": cookies,
"timeout": client.get_timeout(),
}
def _parse_response(*, response: httpx.Response) -> Optional[GetResourceTypeResponse200]:
if response.status_code == 200:
response_200 = GetResourceTypeResponse200.from_dict(response.json())
return response_200
return None
def _build_response(*, response: httpx.Response) -> Response[GetResourceTypeResponse200]:
return Response(
status_code=response.status_code,
content=response.content,
headers=response.headers,
parsed=_parse_response(response=response),
)
def sync_detailed(
workspace: str,
path: str,
*,
client: Client,
) -> Response[GetResourceTypeResponse200]:
"""get resource_type
Args:
workspace (str):
path (str):
Returns:
Response[GetResourceTypeResponse200]
"""
kwargs = _get_kwargs(
workspace=workspace,
path=path,
client=client,
)
response = httpx.request(
verify=client.verify_ssl,
**kwargs,
)
return _build_response(response=response)
def sync(
workspace: str,
path: str,
*,
client: Client,
) -> Optional[GetResourceTypeResponse200]:
"""get resource_type
Args:
workspace (str):
path (str):
Returns:
Response[GetResourceTypeResponse200]
"""
return sync_detailed(
workspace=workspace,
path=path,
client=client,
).parsed
async def asyncio_detailed(
workspace: str,
path: str,
*,
client: Client,
) -> Response[GetResourceTypeResponse200]:
"""get resource_type
Args:
workspace (str):
path (str):
Returns:
Response[GetResourceTypeResponse200]
"""
kwargs = _get_kwargs(
workspace=workspace,
path=path,
client=client,
)
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
response = await _client.request(**kwargs)
return _build_response(response=response)
async def asyncio(
workspace: str,
path: str,
*,
client: Client,
) -> Optional[GetResourceTypeResponse200]:
"""get resource_type
Args:
workspace (str):
path (str):
Returns:
Response[GetResourceTypeResponse200]
"""
return (
await asyncio_detailed(
workspace=workspace,
path=path,
client=client,
)
).parsed
@@ -1,191 +0,0 @@
from typing import Any, Dict, List, Optional, Union
import httpx
from ...client import Client
from ...models.list_resource_response_200_item import ListResourceResponse200Item
from ...types import UNSET, Response, Unset
def _get_kwargs(
workspace: str,
*,
client: Client,
page: Union[Unset, None, int] = UNSET,
per_page: Union[Unset, None, int] = UNSET,
resource_type: Union[Unset, None, str] = UNSET,
) -> Dict[str, Any]:
url = "{}/w/{workspace}/resources/list".format(client.base_url, workspace=workspace)
headers: Dict[str, str] = client.get_headers()
cookies: Dict[str, Any] = client.get_cookies()
params: Dict[str, Any] = {}
params["page"] = page
params["per_page"] = per_page
params["resource_type"] = resource_type
params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
return {
"method": "get",
"url": url,
"headers": headers,
"cookies": cookies,
"timeout": client.get_timeout(),
"params": params,
}
def _parse_response(*, response: httpx.Response) -> Optional[List[ListResourceResponse200Item]]:
if response.status_code == 200:
response_200 = []
_response_200 = response.json()
for response_200_item_data in _response_200:
response_200_item = ListResourceResponse200Item.from_dict(response_200_item_data)
response_200.append(response_200_item)
return response_200
return None
def _build_response(*, response: httpx.Response) -> Response[List[ListResourceResponse200Item]]:
return Response(
status_code=response.status_code,
content=response.content,
headers=response.headers,
parsed=_parse_response(response=response),
)
def sync_detailed(
workspace: str,
*,
client: Client,
page: Union[Unset, None, int] = UNSET,
per_page: Union[Unset, None, int] = UNSET,
resource_type: Union[Unset, None, str] = UNSET,
) -> Response[List[ListResourceResponse200Item]]:
"""list resources
Args:
workspace (str):
page (Union[Unset, None, int]):
per_page (Union[Unset, None, int]):
resource_type (Union[Unset, None, str]):
Returns:
Response[List[ListResourceResponse200Item]]
"""
kwargs = _get_kwargs(
workspace=workspace,
client=client,
page=page,
per_page=per_page,
resource_type=resource_type,
)
response = httpx.request(
verify=client.verify_ssl,
**kwargs,
)
return _build_response(response=response)
def sync(
workspace: str,
*,
client: Client,
page: Union[Unset, None, int] = UNSET,
per_page: Union[Unset, None, int] = UNSET,
resource_type: Union[Unset, None, str] = UNSET,
) -> Optional[List[ListResourceResponse200Item]]:
"""list resources
Args:
workspace (str):
page (Union[Unset, None, int]):
per_page (Union[Unset, None, int]):
resource_type (Union[Unset, None, str]):
Returns:
Response[List[ListResourceResponse200Item]]
"""
return sync_detailed(
workspace=workspace,
client=client,
page=page,
per_page=per_page,
resource_type=resource_type,
).parsed
async def asyncio_detailed(
workspace: str,
*,
client: Client,
page: Union[Unset, None, int] = UNSET,
per_page: Union[Unset, None, int] = UNSET,
resource_type: Union[Unset, None, str] = UNSET,
) -> Response[List[ListResourceResponse200Item]]:
"""list resources
Args:
workspace (str):
page (Union[Unset, None, int]):
per_page (Union[Unset, None, int]):
resource_type (Union[Unset, None, str]):
Returns:
Response[List[ListResourceResponse200Item]]
"""
kwargs = _get_kwargs(
workspace=workspace,
client=client,
page=page,
per_page=per_page,
resource_type=resource_type,
)
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
response = await _client.request(**kwargs)
return _build_response(response=response)
async def asyncio(
workspace: str,
*,
client: Client,
page: Union[Unset, None, int] = UNSET,
per_page: Union[Unset, None, int] = UNSET,
resource_type: Union[Unset, None, str] = UNSET,
) -> Optional[List[ListResourceResponse200Item]]:
"""list resources
Args:
workspace (str):
page (Union[Unset, None, int]):
per_page (Union[Unset, None, int]):
resource_type (Union[Unset, None, str]):
Returns:
Response[List[ListResourceResponse200Item]]
"""
return (
await asyncio_detailed(
workspace=workspace,
client=client,
page=page,
per_page=per_page,
resource_type=resource_type,
)
).parsed
@@ -1,142 +0,0 @@
from typing import Any, Dict, List, Optional
import httpx
from ...client import Client
from ...models.list_resource_type_response_200_item import ListResourceTypeResponse200Item
from ...types import Response
def _get_kwargs(
workspace: str,
*,
client: Client,
) -> Dict[str, Any]:
url = "{}/w/{workspace}/resources/type/list".format(client.base_url, workspace=workspace)
headers: Dict[str, str] = client.get_headers()
cookies: Dict[str, Any] = client.get_cookies()
return {
"method": "get",
"url": url,
"headers": headers,
"cookies": cookies,
"timeout": client.get_timeout(),
}
def _parse_response(*, response: httpx.Response) -> Optional[List[ListResourceTypeResponse200Item]]:
if response.status_code == 200:
response_200 = []
_response_200 = response.json()
for response_200_item_data in _response_200:
response_200_item = ListResourceTypeResponse200Item.from_dict(response_200_item_data)
response_200.append(response_200_item)
return response_200
return None
def _build_response(*, response: httpx.Response) -> Response[List[ListResourceTypeResponse200Item]]:
return Response(
status_code=response.status_code,
content=response.content,
headers=response.headers,
parsed=_parse_response(response=response),
)
def sync_detailed(
workspace: str,
*,
client: Client,
) -> Response[List[ListResourceTypeResponse200Item]]:
"""list resource_types
Args:
workspace (str):
Returns:
Response[List[ListResourceTypeResponse200Item]]
"""
kwargs = _get_kwargs(
workspace=workspace,
client=client,
)
response = httpx.request(
verify=client.verify_ssl,
**kwargs,
)
return _build_response(response=response)
def sync(
workspace: str,
*,
client: Client,
) -> Optional[List[ListResourceTypeResponse200Item]]:
"""list resource_types
Args:
workspace (str):
Returns:
Response[List[ListResourceTypeResponse200Item]]
"""
return sync_detailed(
workspace=workspace,
client=client,
).parsed
async def asyncio_detailed(
workspace: str,
*,
client: Client,
) -> Response[List[ListResourceTypeResponse200Item]]:
"""list resource_types
Args:
workspace (str):
Returns:
Response[List[ListResourceTypeResponse200Item]]
"""
kwargs = _get_kwargs(
workspace=workspace,
client=client,
)
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
response = await _client.request(**kwargs)
return _build_response(response=response)
async def asyncio(
workspace: str,
*,
client: Client,
) -> Optional[List[ListResourceTypeResponse200Item]]:
"""list resource_types
Args:
workspace (str):
Returns:
Response[List[ListResourceTypeResponse200Item]]
"""
return (
await asyncio_detailed(
workspace=workspace,
client=client,
)
).parsed
@@ -1,136 +0,0 @@
from typing import Any, Dict, List, Optional, cast
import httpx
from ...client import Client
from ...types import Response
def _get_kwargs(
workspace: str,
*,
client: Client,
) -> Dict[str, Any]:
url = "{}/w/{workspace}/resources/type/listnames".format(client.base_url, workspace=workspace)
headers: Dict[str, str] = client.get_headers()
cookies: Dict[str, Any] = client.get_cookies()
return {
"method": "get",
"url": url,
"headers": headers,
"cookies": cookies,
"timeout": client.get_timeout(),
}
def _parse_response(*, response: httpx.Response) -> Optional[List[str]]:
if response.status_code == 200:
response_200 = cast(List[str], response.json())
return response_200
return None
def _build_response(*, response: httpx.Response) -> Response[List[str]]:
return Response(
status_code=response.status_code,
content=response.content,
headers=response.headers,
parsed=_parse_response(response=response),
)
def sync_detailed(
workspace: str,
*,
client: Client,
) -> Response[List[str]]:
"""list resource_types names
Args:
workspace (str):
Returns:
Response[List[str]]
"""
kwargs = _get_kwargs(
workspace=workspace,
client=client,
)
response = httpx.request(
verify=client.verify_ssl,
**kwargs,
)
return _build_response(response=response)
def sync(
workspace: str,
*,
client: Client,
) -> Optional[List[str]]:
"""list resource_types names
Args:
workspace (str):
Returns:
Response[List[str]]
"""
return sync_detailed(
workspace=workspace,
client=client,
).parsed
async def asyncio_detailed(
workspace: str,
*,
client: Client,
) -> Response[List[str]]:
"""list resource_types names
Args:
workspace (str):
Returns:
Response[List[str]]
"""
kwargs = _get_kwargs(
workspace=workspace,
client=client,
)
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
response = await _client.request(**kwargs)
return _build_response(response=response)
async def asyncio(
workspace: str,
*,
client: Client,
) -> Optional[List[str]]:
"""list resource_types names
Args:
workspace (str):
Returns:
Response[List[str]]
"""
return (
await asyncio_detailed(
workspace=workspace,
client=client,
)
).parsed
@@ -1,104 +0,0 @@
from typing import Any, Dict
import httpx
from ...client import Client
from ...models.update_resource_json_body import UpdateResourceJsonBody
from ...types import Response
def _get_kwargs(
workspace: str,
path: str,
*,
client: Client,
json_body: UpdateResourceJsonBody,
) -> Dict[str, Any]:
url = "{}/w/{workspace}/resources/update/{path}".format(client.base_url, workspace=workspace, path=path)
headers: Dict[str, str] = client.get_headers()
cookies: Dict[str, Any] = client.get_cookies()
json_json_body = json_body.to_dict()
return {
"method": "post",
"url": url,
"headers": headers,
"cookies": cookies,
"timeout": client.get_timeout(),
"json": json_json_body,
}
def _build_response(*, response: httpx.Response) -> Response[Any]:
return Response(
status_code=response.status_code,
content=response.content,
headers=response.headers,
parsed=None,
)
def sync_detailed(
workspace: str,
path: str,
*,
client: Client,
json_body: UpdateResourceJsonBody,
) -> Response[Any]:
"""update resource
Args:
workspace (str):
path (str):
json_body (UpdateResourceJsonBody):
Returns:
Response[Any]
"""
kwargs = _get_kwargs(
workspace=workspace,
path=path,
client=client,
json_body=json_body,
)
response = httpx.request(
verify=client.verify_ssl,
**kwargs,
)
return _build_response(response=response)
async def asyncio_detailed(
workspace: str,
path: str,
*,
client: Client,
json_body: UpdateResourceJsonBody,
) -> Response[Any]:
"""update resource
Args:
workspace (str):
path (str):
json_body (UpdateResourceJsonBody):
Returns:
Response[Any]
"""
kwargs = _get_kwargs(
workspace=workspace,
path=path,
client=client,
json_body=json_body,
)
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
response = await _client.request(**kwargs)
return _build_response(response=response)
@@ -1,104 +0,0 @@
from typing import Any, Dict
import httpx
from ...client import Client
from ...models.update_resource_type_json_body import UpdateResourceTypeJsonBody
from ...types import Response
def _get_kwargs(
workspace: str,
path: str,
*,
client: Client,
json_body: UpdateResourceTypeJsonBody,
) -> Dict[str, Any]:
url = "{}/w/{workspace}/resources/type/update/{path}".format(client.base_url, workspace=workspace, path=path)
headers: Dict[str, str] = client.get_headers()
cookies: Dict[str, Any] = client.get_cookies()
json_json_body = json_body.to_dict()
return {
"method": "post",
"url": url,
"headers": headers,
"cookies": cookies,
"timeout": client.get_timeout(),
"json": json_json_body,
}
def _build_response(*, response: httpx.Response) -> Response[Any]:
return Response(
status_code=response.status_code,
content=response.content,
headers=response.headers,
parsed=None,
)
def sync_detailed(
workspace: str,
path: str,
*,
client: Client,
json_body: UpdateResourceTypeJsonBody,
) -> Response[Any]:
"""update resource_type
Args:
workspace (str):
path (str):
json_body (UpdateResourceTypeJsonBody):
Returns:
Response[Any]
"""
kwargs = _get_kwargs(
workspace=workspace,
path=path,
client=client,
json_body=json_body,
)
response = httpx.request(
verify=client.verify_ssl,
**kwargs,
)
return _build_response(response=response)
async def asyncio_detailed(
workspace: str,
path: str,
*,
client: Client,
json_body: UpdateResourceTypeJsonBody,
) -> Response[Any]:
"""update resource_type
Args:
workspace (str):
path (str):
json_body (UpdateResourceTypeJsonBody):
Returns:
Response[Any]
"""
kwargs = _get_kwargs(
workspace=workspace,
path=path,
client=client,
json_body=json_body,
)
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
response = await _client.request(**kwargs)
return _build_response(response=response)
@@ -1,97 +0,0 @@
from typing import Any, Dict
import httpx
from ...client import Client
from ...models.create_schedule_json_body import CreateScheduleJsonBody
from ...types import Response
def _get_kwargs(
workspace: str,
*,
client: Client,
json_body: CreateScheduleJsonBody,
) -> Dict[str, Any]:
url = "{}/w/{workspace}/schedules/create".format(client.base_url, workspace=workspace)
headers: Dict[str, str] = client.get_headers()
cookies: Dict[str, Any] = client.get_cookies()
json_json_body = json_body.to_dict()
return {
"method": "post",
"url": url,
"headers": headers,
"cookies": cookies,
"timeout": client.get_timeout(),
"json": json_json_body,
}
def _build_response(*, response: httpx.Response) -> Response[Any]:
return Response(
status_code=response.status_code,
content=response.content,
headers=response.headers,
parsed=None,
)
def sync_detailed(
workspace: str,
*,
client: Client,
json_body: CreateScheduleJsonBody,
) -> Response[Any]:
"""create schedule
Args:
workspace (str):
json_body (CreateScheduleJsonBody):
Returns:
Response[Any]
"""
kwargs = _get_kwargs(
workspace=workspace,
client=client,
json_body=json_body,
)
response = httpx.request(
verify=client.verify_ssl,
**kwargs,
)
return _build_response(response=response)
async def asyncio_detailed(
workspace: str,
*,
client: Client,
json_body: CreateScheduleJsonBody,
) -> Response[Any]:
"""create schedule
Args:
workspace (str):
json_body (CreateScheduleJsonBody):
Returns:
Response[Any]
"""
kwargs = _get_kwargs(
workspace=workspace,
client=client,
json_body=json_body,
)
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
response = await _client.request(**kwargs)
return _build_response(response=response)
@@ -1,93 +0,0 @@
from typing import Any, Dict
import httpx
from ...client import Client
from ...types import Response
def _get_kwargs(
workspace: str,
path: str,
*,
client: Client,
) -> Dict[str, Any]:
url = "{}/w/{workspace}/schedules/delete/{path}".format(client.base_url, workspace=workspace, path=path)
headers: Dict[str, str] = client.get_headers()
cookies: Dict[str, Any] = client.get_cookies()
return {
"method": "delete",
"url": url,
"headers": headers,
"cookies": cookies,
"timeout": client.get_timeout(),
}
def _build_response(*, response: httpx.Response) -> Response[Any]:
return Response(
status_code=response.status_code,
content=response.content,
headers=response.headers,
parsed=None,
)
def sync_detailed(
workspace: str,
path: str,
*,
client: Client,
) -> Response[Any]:
"""delete schedule
Args:
workspace (str):
path (str):
Returns:
Response[Any]
"""
kwargs = _get_kwargs(
workspace=workspace,
path=path,
client=client,
)
response = httpx.request(
verify=client.verify_ssl,
**kwargs,
)
return _build_response(response=response)
async def asyncio_detailed(
workspace: str,
path: str,
*,
client: Client,
) -> Response[Any]:
"""delete schedule
Args:
workspace (str):
path (str):
Returns:
Response[Any]
"""
kwargs = _get_kwargs(
workspace=workspace,
path=path,
client=client,
)
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
response = await _client.request(**kwargs)
return _build_response(response=response)
@@ -1,148 +0,0 @@
from typing import Any, Dict, Optional, cast
import httpx
from ...client import Client
from ...types import Response
def _get_kwargs(
workspace: str,
path: str,
*,
client: Client,
) -> Dict[str, Any]:
url = "{}/w/{workspace}/schedules/exists/{path}".format(client.base_url, workspace=workspace, path=path)
headers: Dict[str, str] = client.get_headers()
cookies: Dict[str, Any] = client.get_cookies()
return {
"method": "get",
"url": url,
"headers": headers,
"cookies": cookies,
"timeout": client.get_timeout(),
}
def _parse_response(*, response: httpx.Response) -> Optional[bool]:
if response.status_code == 200:
response_200 = cast(bool, response.json())
return response_200
return None
def _build_response(*, response: httpx.Response) -> Response[bool]:
return Response(
status_code=response.status_code,
content=response.content,
headers=response.headers,
parsed=_parse_response(response=response),
)
def sync_detailed(
workspace: str,
path: str,
*,
client: Client,
) -> Response[bool]:
"""does schedule exists
Args:
workspace (str):
path (str):
Returns:
Response[bool]
"""
kwargs = _get_kwargs(
workspace=workspace,
path=path,
client=client,
)
response = httpx.request(
verify=client.verify_ssl,
**kwargs,
)
return _build_response(response=response)
def sync(
workspace: str,
path: str,
*,
client: Client,
) -> Optional[bool]:
"""does schedule exists
Args:
workspace (str):
path (str):
Returns:
Response[bool]
"""
return sync_detailed(
workspace=workspace,
path=path,
client=client,
).parsed
async def asyncio_detailed(
workspace: str,
path: str,
*,
client: Client,
) -> Response[bool]:
"""does schedule exists
Args:
workspace (str):
path (str):
Returns:
Response[bool]
"""
kwargs = _get_kwargs(
workspace=workspace,
path=path,
client=client,
)
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
response = await _client.request(**kwargs)
return _build_response(response=response)
async def asyncio(
workspace: str,
path: str,
*,
client: Client,
) -> Optional[bool]:
"""does schedule exists
Args:
workspace (str):
path (str):
Returns:
Response[bool]
"""
return (
await asyncio_detailed(
workspace=workspace,
path=path,
client=client,
)
).parsed
@@ -1,150 +0,0 @@
from typing import Any, Dict, Optional
import httpx
from ...client import Client
from ...models.get_schedule_response_200 import GetScheduleResponse200
from ...types import Response
def _get_kwargs(
workspace: str,
path: str,
*,
client: Client,
) -> Dict[str, Any]:
url = "{}/w/{workspace}/schedules/get/{path}".format(client.base_url, workspace=workspace, path=path)
headers: Dict[str, str] = client.get_headers()
cookies: Dict[str, Any] = client.get_cookies()
return {
"method": "get",
"url": url,
"headers": headers,
"cookies": cookies,
"timeout": client.get_timeout(),
}
def _parse_response(*, response: httpx.Response) -> Optional[GetScheduleResponse200]:
if response.status_code == 200:
response_200 = GetScheduleResponse200.from_dict(response.json())
return response_200
return None
def _build_response(*, response: httpx.Response) -> Response[GetScheduleResponse200]:
return Response(
status_code=response.status_code,
content=response.content,
headers=response.headers,
parsed=_parse_response(response=response),
)
def sync_detailed(
workspace: str,
path: str,
*,
client: Client,
) -> Response[GetScheduleResponse200]:
"""get schedule
Args:
workspace (str):
path (str):
Returns:
Response[GetScheduleResponse200]
"""
kwargs = _get_kwargs(
workspace=workspace,
path=path,
client=client,
)
response = httpx.request(
verify=client.verify_ssl,
**kwargs,
)
return _build_response(response=response)
def sync(
workspace: str,
path: str,
*,
client: Client,
) -> Optional[GetScheduleResponse200]:
"""get schedule
Args:
workspace (str):
path (str):
Returns:
Response[GetScheduleResponse200]
"""
return sync_detailed(
workspace=workspace,
path=path,
client=client,
).parsed
async def asyncio_detailed(
workspace: str,
path: str,
*,
client: Client,
) -> Response[GetScheduleResponse200]:
"""get schedule
Args:
workspace (str):
path (str):
Returns:
Response[GetScheduleResponse200]
"""
kwargs = _get_kwargs(
workspace=workspace,
path=path,
client=client,
)
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
response = await _client.request(**kwargs)
return _build_response(response=response)
async def asyncio(
workspace: str,
path: str,
*,
client: Client,
) -> Optional[GetScheduleResponse200]:
"""get schedule
Args:
workspace (str):
path (str):
Returns:
Response[GetScheduleResponse200]
"""
return (
await asyncio_detailed(
workspace=workspace,
path=path,
client=client,
)
).parsed
@@ -1,176 +0,0 @@
from typing import Any, Dict, List, Optional, Union
import httpx
from ...client import Client
from ...models.list_schedules_response_200_item import ListSchedulesResponse200Item
from ...types import UNSET, Response, Unset
def _get_kwargs(
workspace: str,
*,
client: Client,
page: Union[Unset, None, int] = UNSET,
per_page: Union[Unset, None, int] = UNSET,
) -> Dict[str, Any]:
url = "{}/w/{workspace}/schedules/list".format(client.base_url, workspace=workspace)
headers: Dict[str, str] = client.get_headers()
cookies: Dict[str, Any] = client.get_cookies()
params: Dict[str, Any] = {}
params["page"] = page
params["per_page"] = per_page
params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
return {
"method": "get",
"url": url,
"headers": headers,
"cookies": cookies,
"timeout": client.get_timeout(),
"params": params,
}
def _parse_response(*, response: httpx.Response) -> Optional[List[ListSchedulesResponse200Item]]:
if response.status_code == 200:
response_200 = []
_response_200 = response.json()
for response_200_item_data in _response_200:
response_200_item = ListSchedulesResponse200Item.from_dict(response_200_item_data)
response_200.append(response_200_item)
return response_200
return None
def _build_response(*, response: httpx.Response) -> Response[List[ListSchedulesResponse200Item]]:
return Response(
status_code=response.status_code,
content=response.content,
headers=response.headers,
parsed=_parse_response(response=response),
)
def sync_detailed(
workspace: str,
*,
client: Client,
page: Union[Unset, None, int] = UNSET,
per_page: Union[Unset, None, int] = UNSET,
) -> Response[List[ListSchedulesResponse200Item]]:
"""list schedules
Args:
workspace (str):
page (Union[Unset, None, int]):
per_page (Union[Unset, None, int]):
Returns:
Response[List[ListSchedulesResponse200Item]]
"""
kwargs = _get_kwargs(
workspace=workspace,
client=client,
page=page,
per_page=per_page,
)
response = httpx.request(
verify=client.verify_ssl,
**kwargs,
)
return _build_response(response=response)
def sync(
workspace: str,
*,
client: Client,
page: Union[Unset, None, int] = UNSET,
per_page: Union[Unset, None, int] = UNSET,
) -> Optional[List[ListSchedulesResponse200Item]]:
"""list schedules
Args:
workspace (str):
page (Union[Unset, None, int]):
per_page (Union[Unset, None, int]):
Returns:
Response[List[ListSchedulesResponse200Item]]
"""
return sync_detailed(
workspace=workspace,
client=client,
page=page,
per_page=per_page,
).parsed
async def asyncio_detailed(
workspace: str,
*,
client: Client,
page: Union[Unset, None, int] = UNSET,
per_page: Union[Unset, None, int] = UNSET,
) -> Response[List[ListSchedulesResponse200Item]]:
"""list schedules
Args:
workspace (str):
page (Union[Unset, None, int]):
per_page (Union[Unset, None, int]):
Returns:
Response[List[ListSchedulesResponse200Item]]
"""
kwargs = _get_kwargs(
workspace=workspace,
client=client,
page=page,
per_page=per_page,
)
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
response = await _client.request(**kwargs)
return _build_response(response=response)
async def asyncio(
workspace: str,
*,
client: Client,
page: Union[Unset, None, int] = UNSET,
per_page: Union[Unset, None, int] = UNSET,
) -> Optional[List[ListSchedulesResponse200Item]]:
"""list schedules
Args:
workspace (str):
page (Union[Unset, None, int]):
per_page (Union[Unset, None, int]):
Returns:
Response[List[ListSchedulesResponse200Item]]
"""
return (
await asyncio_detailed(
workspace=workspace,
client=client,
page=page,
per_page=per_page,
)
).parsed
@@ -1,147 +0,0 @@
import datetime
from typing import Any, Dict, List, Optional
import httpx
from dateutil.parser import isoparse
from ...client import Client
from ...models.preview_schedule_json_body import PreviewScheduleJsonBody
from ...types import Response
def _get_kwargs(
*,
client: Client,
json_body: PreviewScheduleJsonBody,
) -> Dict[str, Any]:
url = "{}/schedules/preview".format(client.base_url)
headers: Dict[str, str] = client.get_headers()
cookies: Dict[str, Any] = client.get_cookies()
json_json_body = json_body.to_dict()
return {
"method": "post",
"url": url,
"headers": headers,
"cookies": cookies,
"timeout": client.get_timeout(),
"json": json_json_body,
}
def _parse_response(*, response: httpx.Response) -> Optional[List[datetime.datetime]]:
if response.status_code == 200:
response_200 = []
_response_200 = response.json()
for response_200_item_data in _response_200:
response_200_item = isoparse(response_200_item_data)
response_200.append(response_200_item)
return response_200
return None
def _build_response(*, response: httpx.Response) -> Response[List[datetime.datetime]]:
return Response(
status_code=response.status_code,
content=response.content,
headers=response.headers,
parsed=_parse_response(response=response),
)
def sync_detailed(
*,
client: Client,
json_body: PreviewScheduleJsonBody,
) -> Response[List[datetime.datetime]]:
"""preview schedule
Args:
json_body (PreviewScheduleJsonBody):
Returns:
Response[List[datetime.datetime]]
"""
kwargs = _get_kwargs(
client=client,
json_body=json_body,
)
response = httpx.request(
verify=client.verify_ssl,
**kwargs,
)
return _build_response(response=response)
def sync(
*,
client: Client,
json_body: PreviewScheduleJsonBody,
) -> Optional[List[datetime.datetime]]:
"""preview schedule
Args:
json_body (PreviewScheduleJsonBody):
Returns:
Response[List[datetime.datetime]]
"""
return sync_detailed(
client=client,
json_body=json_body,
).parsed
async def asyncio_detailed(
*,
client: Client,
json_body: PreviewScheduleJsonBody,
) -> Response[List[datetime.datetime]]:
"""preview schedule
Args:
json_body (PreviewScheduleJsonBody):
Returns:
Response[List[datetime.datetime]]
"""
kwargs = _get_kwargs(
client=client,
json_body=json_body,
)
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
response = await _client.request(**kwargs)
return _build_response(response=response)
async def asyncio(
*,
client: Client,
json_body: PreviewScheduleJsonBody,
) -> Optional[List[datetime.datetime]]:
"""preview schedule
Args:
json_body (PreviewScheduleJsonBody):
Returns:
Response[List[datetime.datetime]]
"""
return (
await asyncio_detailed(
client=client,
json_body=json_body,
)
).parsed
@@ -1,104 +0,0 @@
from typing import Any, Dict
import httpx
from ...client import Client
from ...models.set_schedule_enabled_json_body import SetScheduleEnabledJsonBody
from ...types import Response
def _get_kwargs(
workspace: str,
path: str,
*,
client: Client,
json_body: SetScheduleEnabledJsonBody,
) -> Dict[str, Any]:
url = "{}/w/{workspace}/schedules/setenabled/{path}".format(client.base_url, workspace=workspace, path=path)
headers: Dict[str, str] = client.get_headers()
cookies: Dict[str, Any] = client.get_cookies()
json_json_body = json_body.to_dict()
return {
"method": "post",
"url": url,
"headers": headers,
"cookies": cookies,
"timeout": client.get_timeout(),
"json": json_json_body,
}
def _build_response(*, response: httpx.Response) -> Response[Any]:
return Response(
status_code=response.status_code,
content=response.content,
headers=response.headers,
parsed=None,
)
def sync_detailed(
workspace: str,
path: str,
*,
client: Client,
json_body: SetScheduleEnabledJsonBody,
) -> Response[Any]:
"""set enabled schedule
Args:
workspace (str):
path (str):
json_body (SetScheduleEnabledJsonBody):
Returns:
Response[Any]
"""
kwargs = _get_kwargs(
workspace=workspace,
path=path,
client=client,
json_body=json_body,
)
response = httpx.request(
verify=client.verify_ssl,
**kwargs,
)
return _build_response(response=response)
async def asyncio_detailed(
workspace: str,
path: str,
*,
client: Client,
json_body: SetScheduleEnabledJsonBody,
) -> Response[Any]:
"""set enabled schedule
Args:
workspace (str):
path (str):
json_body (SetScheduleEnabledJsonBody):
Returns:
Response[Any]
"""
kwargs = _get_kwargs(
workspace=workspace,
path=path,
client=client,
json_body=json_body,
)
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
response = await _client.request(**kwargs)
return _build_response(response=response)
@@ -1,104 +0,0 @@
from typing import Any, Dict
import httpx
from ...client import Client
from ...models.update_schedule_json_body import UpdateScheduleJsonBody
from ...types import Response
def _get_kwargs(
workspace: str,
path: str,
*,
client: Client,
json_body: UpdateScheduleJsonBody,
) -> Dict[str, Any]:
url = "{}/w/{workspace}/schedules/update/{path}".format(client.base_url, workspace=workspace, path=path)
headers: Dict[str, str] = client.get_headers()
cookies: Dict[str, Any] = client.get_cookies()
json_json_body = json_body.to_dict()
return {
"method": "post",
"url": url,
"headers": headers,
"cookies": cookies,
"timeout": client.get_timeout(),
"json": json_json_body,
}
def _build_response(*, response: httpx.Response) -> Response[Any]:
return Response(
status_code=response.status_code,
content=response.content,
headers=response.headers,
parsed=None,
)
def sync_detailed(
workspace: str,
path: str,
*,
client: Client,
json_body: UpdateScheduleJsonBody,
) -> Response[Any]:
"""update schedule
Args:
workspace (str):
path (str):
json_body (UpdateScheduleJsonBody):
Returns:
Response[Any]
"""
kwargs = _get_kwargs(
workspace=workspace,
path=path,
client=client,
json_body=json_body,
)
response = httpx.request(
verify=client.verify_ssl,
**kwargs,
)
return _build_response(response=response)
async def asyncio_detailed(
workspace: str,
path: str,
*,
client: Client,
json_body: UpdateScheduleJsonBody,
) -> Response[Any]:
"""update schedule
Args:
workspace (str):
path (str):
json_body (UpdateScheduleJsonBody):
Returns:
Response[Any]
"""
kwargs = _get_kwargs(
workspace=workspace,
path=path,
client=client,
json_body=json_body,
)
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
response = await _client.request(**kwargs)
return _build_response(response=response)
@@ -1,150 +0,0 @@
from typing import Any, Dict, Optional
import httpx
from ...client import Client
from ...models.archive_script_by_hash_response_200 import ArchiveScriptByHashResponse200
from ...types import Response
def _get_kwargs(
workspace: str,
hash_: str,
*,
client: Client,
) -> Dict[str, Any]:
url = "{}/w/{workspace}/scripts/archive/h/{hash}".format(client.base_url, workspace=workspace, hash=hash_)
headers: Dict[str, str] = client.get_headers()
cookies: Dict[str, Any] = client.get_cookies()
return {
"method": "post",
"url": url,
"headers": headers,
"cookies": cookies,
"timeout": client.get_timeout(),
}
def _parse_response(*, response: httpx.Response) -> Optional[ArchiveScriptByHashResponse200]:
if response.status_code == 200:
response_200 = ArchiveScriptByHashResponse200.from_dict(response.json())
return response_200
return None
def _build_response(*, response: httpx.Response) -> Response[ArchiveScriptByHashResponse200]:
return Response(
status_code=response.status_code,
content=response.content,
headers=response.headers,
parsed=_parse_response(response=response),
)
def sync_detailed(
workspace: str,
hash_: str,
*,
client: Client,
) -> Response[ArchiveScriptByHashResponse200]:
"""archive script by hash
Args:
workspace (str):
hash_ (str):
Returns:
Response[ArchiveScriptByHashResponse200]
"""
kwargs = _get_kwargs(
workspace=workspace,
hash_=hash_,
client=client,
)
response = httpx.request(
verify=client.verify_ssl,
**kwargs,
)
return _build_response(response=response)
def sync(
workspace: str,
hash_: str,
*,
client: Client,
) -> Optional[ArchiveScriptByHashResponse200]:
"""archive script by hash
Args:
workspace (str):
hash_ (str):
Returns:
Response[ArchiveScriptByHashResponse200]
"""
return sync_detailed(
workspace=workspace,
hash_=hash_,
client=client,
).parsed
async def asyncio_detailed(
workspace: str,
hash_: str,
*,
client: Client,
) -> Response[ArchiveScriptByHashResponse200]:
"""archive script by hash
Args:
workspace (str):
hash_ (str):
Returns:
Response[ArchiveScriptByHashResponse200]
"""
kwargs = _get_kwargs(
workspace=workspace,
hash_=hash_,
client=client,
)
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
response = await _client.request(**kwargs)
return _build_response(response=response)
async def asyncio(
workspace: str,
hash_: str,
*,
client: Client,
) -> Optional[ArchiveScriptByHashResponse200]:
"""archive script by hash
Args:
workspace (str):
hash_ (str):
Returns:
Response[ArchiveScriptByHashResponse200]
"""
return (
await asyncio_detailed(
workspace=workspace,
hash_=hash_,
client=client,
)
).parsed
@@ -1,93 +0,0 @@
from typing import Any, Dict
import httpx
from ...client import Client
from ...types import Response
def _get_kwargs(
workspace: str,
path: str,
*,
client: Client,
) -> Dict[str, Any]:
url = "{}/w/{workspace}/scripts/archive/p/{path}".format(client.base_url, workspace=workspace, path=path)
headers: Dict[str, str] = client.get_headers()
cookies: Dict[str, Any] = client.get_cookies()
return {
"method": "post",
"url": url,
"headers": headers,
"cookies": cookies,
"timeout": client.get_timeout(),
}
def _build_response(*, response: httpx.Response) -> Response[Any]:
return Response(
status_code=response.status_code,
content=response.content,
headers=response.headers,
parsed=None,
)
def sync_detailed(
workspace: str,
path: str,
*,
client: Client,
) -> Response[Any]:
"""archive script by path
Args:
workspace (str):
path (str):
Returns:
Response[Any]
"""
kwargs = _get_kwargs(
workspace=workspace,
path=path,
client=client,
)
response = httpx.request(
verify=client.verify_ssl,
**kwargs,
)
return _build_response(response=response)
async def asyncio_detailed(
workspace: str,
path: str,
*,
client: Client,
) -> Response[Any]:
"""archive script by path
Args:
workspace (str):
path (str):
Returns:
Response[Any]
"""
kwargs = _get_kwargs(
workspace=workspace,
path=path,
client=client,
)
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
response = await _client.request(**kwargs)
return _build_response(response=response)
@@ -1,97 +0,0 @@
from typing import Any, Dict
import httpx
from ...client import Client
from ...models.create_script_json_body import CreateScriptJsonBody
from ...types import Response
def _get_kwargs(
workspace: str,
*,
client: Client,
json_body: CreateScriptJsonBody,
) -> Dict[str, Any]:
url = "{}/w/{workspace}/scripts/create".format(client.base_url, workspace=workspace)
headers: Dict[str, str] = client.get_headers()
cookies: Dict[str, Any] = client.get_cookies()
json_json_body = json_body.to_dict()
return {
"method": "post",
"url": url,
"headers": headers,
"cookies": cookies,
"timeout": client.get_timeout(),
"json": json_json_body,
}
def _build_response(*, response: httpx.Response) -> Response[Any]:
return Response(
status_code=response.status_code,
content=response.content,
headers=response.headers,
parsed=None,
)
def sync_detailed(
workspace: str,
*,
client: Client,
json_body: CreateScriptJsonBody,
) -> Response[Any]:
"""create script
Args:
workspace (str):
json_body (CreateScriptJsonBody):
Returns:
Response[Any]
"""
kwargs = _get_kwargs(
workspace=workspace,
client=client,
json_body=json_body,
)
response = httpx.request(
verify=client.verify_ssl,
**kwargs,
)
return _build_response(response=response)
async def asyncio_detailed(
workspace: str,
*,
client: Client,
json_body: CreateScriptJsonBody,
) -> Response[Any]:
"""create script
Args:
workspace (str):
json_body (CreateScriptJsonBody):
Returns:
Response[Any]
"""
kwargs = _get_kwargs(
workspace=workspace,
client=client,
json_body=json_body,
)
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
response = await _client.request(**kwargs)
return _build_response(response=response)
@@ -1,150 +0,0 @@
from typing import Any, Dict, Optional
import httpx
from ...client import Client
from ...models.delete_script_by_hash_response_200 import DeleteScriptByHashResponse200
from ...types import Response
def _get_kwargs(
workspace: str,
hash_: str,
*,
client: Client,
) -> Dict[str, Any]:
url = "{}/w/{workspace}/scripts/delete/h/{hash}".format(client.base_url, workspace=workspace, hash=hash_)
headers: Dict[str, str] = client.get_headers()
cookies: Dict[str, Any] = client.get_cookies()
return {
"method": "post",
"url": url,
"headers": headers,
"cookies": cookies,
"timeout": client.get_timeout(),
}
def _parse_response(*, response: httpx.Response) -> Optional[DeleteScriptByHashResponse200]:
if response.status_code == 200:
response_200 = DeleteScriptByHashResponse200.from_dict(response.json())
return response_200
return None
def _build_response(*, response: httpx.Response) -> Response[DeleteScriptByHashResponse200]:
return Response(
status_code=response.status_code,
content=response.content,
headers=response.headers,
parsed=_parse_response(response=response),
)
def sync_detailed(
workspace: str,
hash_: str,
*,
client: Client,
) -> Response[DeleteScriptByHashResponse200]:
"""delete script by hash (erase content but keep hash)
Args:
workspace (str):
hash_ (str):
Returns:
Response[DeleteScriptByHashResponse200]
"""
kwargs = _get_kwargs(
workspace=workspace,
hash_=hash_,
client=client,
)
response = httpx.request(
verify=client.verify_ssl,
**kwargs,
)
return _build_response(response=response)
def sync(
workspace: str,
hash_: str,
*,
client: Client,
) -> Optional[DeleteScriptByHashResponse200]:
"""delete script by hash (erase content but keep hash)
Args:
workspace (str):
hash_ (str):
Returns:
Response[DeleteScriptByHashResponse200]
"""
return sync_detailed(
workspace=workspace,
hash_=hash_,
client=client,
).parsed
async def asyncio_detailed(
workspace: str,
hash_: str,
*,
client: Client,
) -> Response[DeleteScriptByHashResponse200]:
"""delete script by hash (erase content but keep hash)
Args:
workspace (str):
hash_ (str):
Returns:
Response[DeleteScriptByHashResponse200]
"""
kwargs = _get_kwargs(
workspace=workspace,
hash_=hash_,
client=client,
)
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
response = await _client.request(**kwargs)
return _build_response(response=response)
async def asyncio(
workspace: str,
hash_: str,
*,
client: Client,
) -> Optional[DeleteScriptByHashResponse200]:
"""delete script by hash (erase content but keep hash)
Args:
workspace (str):
hash_ (str):
Returns:
Response[DeleteScriptByHashResponse200]
"""
return (
await asyncio_detailed(
workspace=workspace,
hash_=hash_,
client=client,
)
).parsed
@@ -1,140 +0,0 @@
from typing import Any, Dict, Optional
import httpx
from ...client import Client
from ...models.deno_to_jsonschema_response_200 import DenoToJsonschemaResponse200
from ...types import Response
def _get_kwargs(
*,
client: Client,
json_body: str,
) -> Dict[str, Any]:
url = "{}/scripts/deno/tojsonschema".format(client.base_url)
headers: Dict[str, str] = client.get_headers()
cookies: Dict[str, Any] = client.get_cookies()
json_json_body = json_body
return {
"method": "post",
"url": url,
"headers": headers,
"cookies": cookies,
"timeout": client.get_timeout(),
"json": json_json_body,
}
def _parse_response(*, response: httpx.Response) -> Optional[DenoToJsonschemaResponse200]:
if response.status_code == 200:
response_200 = DenoToJsonschemaResponse200.from_dict(response.json())
return response_200
return None
def _build_response(*, response: httpx.Response) -> Response[DenoToJsonschemaResponse200]:
return Response(
status_code=response.status_code,
content=response.content,
headers=response.headers,
parsed=_parse_response(response=response),
)
def sync_detailed(
*,
client: Client,
json_body: str,
) -> Response[DenoToJsonschemaResponse200]:
"""inspect deno code to infer jsonschema of arguments
Args:
json_body (str):
Returns:
Response[DenoToJsonschemaResponse200]
"""
kwargs = _get_kwargs(
client=client,
json_body=json_body,
)
response = httpx.request(
verify=client.verify_ssl,
**kwargs,
)
return _build_response(response=response)
def sync(
*,
client: Client,
json_body: str,
) -> Optional[DenoToJsonschemaResponse200]:
"""inspect deno code to infer jsonschema of arguments
Args:
json_body (str):
Returns:
Response[DenoToJsonschemaResponse200]
"""
return sync_detailed(
client=client,
json_body=json_body,
).parsed
async def asyncio_detailed(
*,
client: Client,
json_body: str,
) -> Response[DenoToJsonschemaResponse200]:
"""inspect deno code to infer jsonschema of arguments
Args:
json_body (str):
Returns:
Response[DenoToJsonschemaResponse200]
"""
kwargs = _get_kwargs(
client=client,
json_body=json_body,
)
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
response = await _client.request(**kwargs)
return _build_response(response=response)
async def asyncio(
*,
client: Client,
json_body: str,
) -> Optional[DenoToJsonschemaResponse200]:
"""inspect deno code to infer jsonschema of arguments
Args:
json_body (str):
Returns:
Response[DenoToJsonschemaResponse200]
"""
return (
await asyncio_detailed(
client=client,
json_body=json_body,
)
).parsed
@@ -1,148 +0,0 @@
from typing import Any, Dict, Optional, cast
import httpx
from ...client import Client
from ...types import Response
def _get_kwargs(
workspace: str,
path: str,
*,
client: Client,
) -> Dict[str, Any]:
url = "{}/w/{workspace}/scripts/exists/p/{path}".format(client.base_url, workspace=workspace, path=path)
headers: Dict[str, str] = client.get_headers()
cookies: Dict[str, Any] = client.get_cookies()
return {
"method": "get",
"url": url,
"headers": headers,
"cookies": cookies,
"timeout": client.get_timeout(),
}
def _parse_response(*, response: httpx.Response) -> Optional[bool]:
if response.status_code == 200:
response_200 = cast(bool, response.json())
return response_200
return None
def _build_response(*, response: httpx.Response) -> Response[bool]:
return Response(
status_code=response.status_code,
content=response.content,
headers=response.headers,
parsed=_parse_response(response=response),
)
def sync_detailed(
workspace: str,
path: str,
*,
client: Client,
) -> Response[bool]:
"""exists script by path
Args:
workspace (str):
path (str):
Returns:
Response[bool]
"""
kwargs = _get_kwargs(
workspace=workspace,
path=path,
client=client,
)
response = httpx.request(
verify=client.verify_ssl,
**kwargs,
)
return _build_response(response=response)
def sync(
workspace: str,
path: str,
*,
client: Client,
) -> Optional[bool]:
"""exists script by path
Args:
workspace (str):
path (str):
Returns:
Response[bool]
"""
return sync_detailed(
workspace=workspace,
path=path,
client=client,
).parsed
async def asyncio_detailed(
workspace: str,
path: str,
*,
client: Client,
) -> Response[bool]:
"""exists script by path
Args:
workspace (str):
path (str):
Returns:
Response[bool]
"""
kwargs = _get_kwargs(
workspace=workspace,
path=path,
client=client,
)
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
response = await _client.request(**kwargs)
return _build_response(response=response)
async def asyncio(
workspace: str,
path: str,
*,
client: Client,
) -> Optional[bool]:
"""exists script by path
Args:
workspace (str):
path (str):
Returns:
Response[bool]
"""
return (
await asyncio_detailed(
workspace=workspace,
path=path,
client=client,
)
).parsed
@@ -1,86 +0,0 @@
from typing import Any, Dict
import httpx
from ...client import Client
from ...types import Response
def _get_kwargs(
path: str,
*,
client: Client,
) -> Dict[str, Any]:
url = "{}/scripts/hub/get/{path}".format(client.base_url, path=path)
headers: Dict[str, str] = client.get_headers()
cookies: Dict[str, Any] = client.get_cookies()
return {
"method": "get",
"url": url,
"headers": headers,
"cookies": cookies,
"timeout": client.get_timeout(),
}
def _build_response(*, response: httpx.Response) -> Response[Any]:
return Response(
status_code=response.status_code,
content=response.content,
headers=response.headers,
parsed=None,
)
def sync_detailed(
path: str,
*,
client: Client,
) -> Response[Any]:
"""get hub script content by path
Args:
path (str):
Returns:
Response[Any]
"""
kwargs = _get_kwargs(
path=path,
client=client,
)
response = httpx.request(
verify=client.verify_ssl,
**kwargs,
)
return _build_response(response=response)
async def asyncio_detailed(
path: str,
*,
client: Client,
) -> Response[Any]:
"""get hub script content by path
Args:
path (str):
Returns:
Response[Any]
"""
kwargs = _get_kwargs(
path=path,
client=client,
)
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
response = await _client.request(**kwargs)
return _build_response(response=response)
@@ -1,150 +0,0 @@
from typing import Any, Dict, Optional
import httpx
from ...client import Client
from ...models.get_script_by_hash_response_200 import GetScriptByHashResponse200
from ...types import Response
def _get_kwargs(
workspace: str,
hash_: str,
*,
client: Client,
) -> Dict[str, Any]:
url = "{}/w/{workspace}/scripts/get/h/{hash}".format(client.base_url, workspace=workspace, hash=hash_)
headers: Dict[str, str] = client.get_headers()
cookies: Dict[str, Any] = client.get_cookies()
return {
"method": "get",
"url": url,
"headers": headers,
"cookies": cookies,
"timeout": client.get_timeout(),
}
def _parse_response(*, response: httpx.Response) -> Optional[GetScriptByHashResponse200]:
if response.status_code == 200:
response_200 = GetScriptByHashResponse200.from_dict(response.json())
return response_200
return None
def _build_response(*, response: httpx.Response) -> Response[GetScriptByHashResponse200]:
return Response(
status_code=response.status_code,
content=response.content,
headers=response.headers,
parsed=_parse_response(response=response),
)
def sync_detailed(
workspace: str,
hash_: str,
*,
client: Client,
) -> Response[GetScriptByHashResponse200]:
"""get script by hash
Args:
workspace (str):
hash_ (str):
Returns:
Response[GetScriptByHashResponse200]
"""
kwargs = _get_kwargs(
workspace=workspace,
hash_=hash_,
client=client,
)
response = httpx.request(
verify=client.verify_ssl,
**kwargs,
)
return _build_response(response=response)
def sync(
workspace: str,
hash_: str,
*,
client: Client,
) -> Optional[GetScriptByHashResponse200]:
"""get script by hash
Args:
workspace (str):
hash_ (str):
Returns:
Response[GetScriptByHashResponse200]
"""
return sync_detailed(
workspace=workspace,
hash_=hash_,
client=client,
).parsed
async def asyncio_detailed(
workspace: str,
hash_: str,
*,
client: Client,
) -> Response[GetScriptByHashResponse200]:
"""get script by hash
Args:
workspace (str):
hash_ (str):
Returns:
Response[GetScriptByHashResponse200]
"""
kwargs = _get_kwargs(
workspace=workspace,
hash_=hash_,
client=client,
)
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
response = await _client.request(**kwargs)
return _build_response(response=response)
async def asyncio(
workspace: str,
hash_: str,
*,
client: Client,
) -> Optional[GetScriptByHashResponse200]:
"""get script by hash
Args:
workspace (str):
hash_ (str):
Returns:
Response[GetScriptByHashResponse200]
"""
return (
await asyncio_detailed(
workspace=workspace,
hash_=hash_,
client=client,
)
).parsed
@@ -1,150 +0,0 @@
from typing import Any, Dict, Optional
import httpx
from ...client import Client
from ...models.get_script_by_path_response_200 import GetScriptByPathResponse200
from ...types import Response
def _get_kwargs(
workspace: str,
path: str,
*,
client: Client,
) -> Dict[str, Any]:
url = "{}/w/{workspace}/scripts/get/p/{path}".format(client.base_url, workspace=workspace, path=path)
headers: Dict[str, str] = client.get_headers()
cookies: Dict[str, Any] = client.get_cookies()
return {
"method": "get",
"url": url,
"headers": headers,
"cookies": cookies,
"timeout": client.get_timeout(),
}
def _parse_response(*, response: httpx.Response) -> Optional[GetScriptByPathResponse200]:
if response.status_code == 200:
response_200 = GetScriptByPathResponse200.from_dict(response.json())
return response_200
return None
def _build_response(*, response: httpx.Response) -> Response[GetScriptByPathResponse200]:
return Response(
status_code=response.status_code,
content=response.content,
headers=response.headers,
parsed=_parse_response(response=response),
)
def sync_detailed(
workspace: str,
path: str,
*,
client: Client,
) -> Response[GetScriptByPathResponse200]:
"""get script by path
Args:
workspace (str):
path (str):
Returns:
Response[GetScriptByPathResponse200]
"""
kwargs = _get_kwargs(
workspace=workspace,
path=path,
client=client,
)
response = httpx.request(
verify=client.verify_ssl,
**kwargs,
)
return _build_response(response=response)
def sync(
workspace: str,
path: str,
*,
client: Client,
) -> Optional[GetScriptByPathResponse200]:
"""get script by path
Args:
workspace (str):
path (str):
Returns:
Response[GetScriptByPathResponse200]
"""
return sync_detailed(
workspace=workspace,
path=path,
client=client,
).parsed
async def asyncio_detailed(
workspace: str,
path: str,
*,
client: Client,
) -> Response[GetScriptByPathResponse200]:
"""get script by path
Args:
workspace (str):
path (str):
Returns:
Response[GetScriptByPathResponse200]
"""
kwargs = _get_kwargs(
workspace=workspace,
path=path,
client=client,
)
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
response = await _client.request(**kwargs)
return _build_response(response=response)
async def asyncio(
workspace: str,
path: str,
*,
client: Client,
) -> Optional[GetScriptByPathResponse200]:
"""get script by path
Args:
workspace (str):
path (str):
Returns:
Response[GetScriptByPathResponse200]
"""
return (
await asyncio_detailed(
workspace=workspace,
path=path,
client=client,
)
).parsed
@@ -1,150 +0,0 @@
from typing import Any, Dict, Optional
import httpx
from ...client import Client
from ...models.get_script_deployment_status_response_200 import GetScriptDeploymentStatusResponse200
from ...types import Response
def _get_kwargs(
workspace: str,
hash_: str,
*,
client: Client,
) -> Dict[str, Any]:
url = "{}/w/{workspace}/scripts/deployment_status/h/{hash}".format(client.base_url, workspace=workspace, hash=hash_)
headers: Dict[str, str] = client.get_headers()
cookies: Dict[str, Any] = client.get_cookies()
return {
"method": "get",
"url": url,
"headers": headers,
"cookies": cookies,
"timeout": client.get_timeout(),
}
def _parse_response(*, response: httpx.Response) -> Optional[GetScriptDeploymentStatusResponse200]:
if response.status_code == 200:
response_200 = GetScriptDeploymentStatusResponse200.from_dict(response.json())
return response_200
return None
def _build_response(*, response: httpx.Response) -> Response[GetScriptDeploymentStatusResponse200]:
return Response(
status_code=response.status_code,
content=response.content,
headers=response.headers,
parsed=_parse_response(response=response),
)
def sync_detailed(
workspace: str,
hash_: str,
*,
client: Client,
) -> Response[GetScriptDeploymentStatusResponse200]:
"""get script deployment status
Args:
workspace (str):
hash_ (str):
Returns:
Response[GetScriptDeploymentStatusResponse200]
"""
kwargs = _get_kwargs(
workspace=workspace,
hash_=hash_,
client=client,
)
response = httpx.request(
verify=client.verify_ssl,
**kwargs,
)
return _build_response(response=response)
def sync(
workspace: str,
hash_: str,
*,
client: Client,
) -> Optional[GetScriptDeploymentStatusResponse200]:
"""get script deployment status
Args:
workspace (str):
hash_ (str):
Returns:
Response[GetScriptDeploymentStatusResponse200]
"""
return sync_detailed(
workspace=workspace,
hash_=hash_,
client=client,
).parsed
async def asyncio_detailed(
workspace: str,
hash_: str,
*,
client: Client,
) -> Response[GetScriptDeploymentStatusResponse200]:
"""get script deployment status
Args:
workspace (str):
hash_ (str):
Returns:
Response[GetScriptDeploymentStatusResponse200]
"""
kwargs = _get_kwargs(
workspace=workspace,
hash_=hash_,
client=client,
)
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
response = await _client.request(**kwargs)
return _build_response(response=response)
async def asyncio(
workspace: str,
hash_: str,
*,
client: Client,
) -> Optional[GetScriptDeploymentStatusResponse200]:
"""get script deployment status
Args:
workspace (str):
hash_ (str):
Returns:
Response[GetScriptDeploymentStatusResponse200]
"""
return (
await asyncio_detailed(
workspace=workspace,
hash_=hash_,
client=client,
)
).parsed
@@ -1,140 +0,0 @@
from typing import Any, Dict, Optional
import httpx
from ...client import Client
from ...models.go_to_jsonschema_response_200 import GoToJsonschemaResponse200
from ...types import Response
def _get_kwargs(
*,
client: Client,
json_body: str,
) -> Dict[str, Any]:
url = "{}/scripts/go/tojsonschema".format(client.base_url)
headers: Dict[str, str] = client.get_headers()
cookies: Dict[str, Any] = client.get_cookies()
json_json_body = json_body
return {
"method": "post",
"url": url,
"headers": headers,
"cookies": cookies,
"timeout": client.get_timeout(),
"json": json_json_body,
}
def _parse_response(*, response: httpx.Response) -> Optional[GoToJsonschemaResponse200]:
if response.status_code == 200:
response_200 = GoToJsonschemaResponse200.from_dict(response.json())
return response_200
return None
def _build_response(*, response: httpx.Response) -> Response[GoToJsonschemaResponse200]:
return Response(
status_code=response.status_code,
content=response.content,
headers=response.headers,
parsed=_parse_response(response=response),
)
def sync_detailed(
*,
client: Client,
json_body: str,
) -> Response[GoToJsonschemaResponse200]:
"""inspect go code to infer jsonschema of arguments
Args:
json_body (str):
Returns:
Response[GoToJsonschemaResponse200]
"""
kwargs = _get_kwargs(
client=client,
json_body=json_body,
)
response = httpx.request(
verify=client.verify_ssl,
**kwargs,
)
return _build_response(response=response)
def sync(
*,
client: Client,
json_body: str,
) -> Optional[GoToJsonschemaResponse200]:
"""inspect go code to infer jsonschema of arguments
Args:
json_body (str):
Returns:
Response[GoToJsonschemaResponse200]
"""
return sync_detailed(
client=client,
json_body=json_body,
).parsed
async def asyncio_detailed(
*,
client: Client,
json_body: str,
) -> Response[GoToJsonschemaResponse200]:
"""inspect go code to infer jsonschema of arguments
Args:
json_body (str):
Returns:
Response[GoToJsonschemaResponse200]
"""
kwargs = _get_kwargs(
client=client,
json_body=json_body,
)
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
response = await _client.request(**kwargs)
return _build_response(response=response)
async def asyncio(
*,
client: Client,
json_body: str,
) -> Optional[GoToJsonschemaResponse200]:
"""inspect go code to infer jsonschema of arguments
Args:
json_body (str):
Returns:
Response[GoToJsonschemaResponse200]
"""
return (
await asyncio_detailed(
client=client,
json_body=json_body,
)
).parsed
@@ -1,116 +0,0 @@
from typing import Any, Dict, Optional
import httpx
from ...client import Client
from ...models.list_hub_scripts_response_200 import ListHubScriptsResponse200
from ...types import Response
def _get_kwargs(
*,
client: Client,
) -> Dict[str, Any]:
url = "{}/scripts/hub/list".format(client.base_url)
headers: Dict[str, str] = client.get_headers()
cookies: Dict[str, Any] = client.get_cookies()
return {
"method": "get",
"url": url,
"headers": headers,
"cookies": cookies,
"timeout": client.get_timeout(),
}
def _parse_response(*, response: httpx.Response) -> Optional[ListHubScriptsResponse200]:
if response.status_code == 200:
response_200 = ListHubScriptsResponse200.from_dict(response.json())
return response_200
return None
def _build_response(*, response: httpx.Response) -> Response[ListHubScriptsResponse200]:
return Response(
status_code=response.status_code,
content=response.content,
headers=response.headers,
parsed=_parse_response(response=response),
)
def sync_detailed(
*,
client: Client,
) -> Response[ListHubScriptsResponse200]:
"""list all available hub scripts
Returns:
Response[ListHubScriptsResponse200]
"""
kwargs = _get_kwargs(
client=client,
)
response = httpx.request(
verify=client.verify_ssl,
**kwargs,
)
return _build_response(response=response)
def sync(
*,
client: Client,
) -> Optional[ListHubScriptsResponse200]:
"""list all available hub scripts
Returns:
Response[ListHubScriptsResponse200]
"""
return sync_detailed(
client=client,
).parsed
async def asyncio_detailed(
*,
client: Client,
) -> Response[ListHubScriptsResponse200]:
"""list all available hub scripts
Returns:
Response[ListHubScriptsResponse200]
"""
kwargs = _get_kwargs(
client=client,
)
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
response = await _client.request(**kwargs)
return _build_response(response=response)
async def asyncio(
*,
client: Client,
) -> Optional[ListHubScriptsResponse200]:
"""list all available hub scripts
Returns:
Response[ListHubScriptsResponse200]
"""
return (
await asyncio_detailed(
client=client,
)
).parsed
@@ -1,326 +0,0 @@
from typing import Any, Dict, List, Optional, Union
import httpx
from ...client import Client
from ...models.list_scripts_response_200_item import ListScriptsResponse200Item
from ...types import UNSET, Response, Unset
def _get_kwargs(
workspace: str,
*,
client: Client,
page: Union[Unset, None, int] = UNSET,
per_page: Union[Unset, None, int] = UNSET,
order_desc: Union[Unset, None, bool] = UNSET,
created_by: Union[Unset, None, str] = UNSET,
path_start: Union[Unset, None, str] = UNSET,
path_exact: Union[Unset, None, str] = UNSET,
first_parent_hash: Union[Unset, None, str] = UNSET,
last_parent_hash: Union[Unset, None, str] = UNSET,
parent_hash: Union[Unset, None, str] = UNSET,
show_archived: Union[Unset, None, bool] = UNSET,
is_template: Union[Unset, None, bool] = UNSET,
kind: Union[Unset, None, str] = UNSET,
) -> Dict[str, Any]:
url = "{}/w/{workspace}/scripts/list".format(client.base_url, workspace=workspace)
headers: Dict[str, str] = client.get_headers()
cookies: Dict[str, Any] = client.get_cookies()
params: Dict[str, Any] = {}
params["page"] = page
params["per_page"] = per_page
params["order_desc"] = order_desc
params["created_by"] = created_by
params["path_start"] = path_start
params["path_exact"] = path_exact
params["first_parent_hash"] = first_parent_hash
params["last_parent_hash"] = last_parent_hash
params["parent_hash"] = parent_hash
params["show_archived"] = show_archived
params["is_template"] = is_template
params["kind"] = kind
params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
return {
"method": "get",
"url": url,
"headers": headers,
"cookies": cookies,
"timeout": client.get_timeout(),
"params": params,
}
def _parse_response(*, response: httpx.Response) -> Optional[List[ListScriptsResponse200Item]]:
if response.status_code == 200:
response_200 = []
_response_200 = response.json()
for response_200_item_data in _response_200:
response_200_item = ListScriptsResponse200Item.from_dict(response_200_item_data)
response_200.append(response_200_item)
return response_200
return None
def _build_response(*, response: httpx.Response) -> Response[List[ListScriptsResponse200Item]]:
return Response(
status_code=response.status_code,
content=response.content,
headers=response.headers,
parsed=_parse_response(response=response),
)
def sync_detailed(
workspace: str,
*,
client: Client,
page: Union[Unset, None, int] = UNSET,
per_page: Union[Unset, None, int] = UNSET,
order_desc: Union[Unset, None, bool] = UNSET,
created_by: Union[Unset, None, str] = UNSET,
path_start: Union[Unset, None, str] = UNSET,
path_exact: Union[Unset, None, str] = UNSET,
first_parent_hash: Union[Unset, None, str] = UNSET,
last_parent_hash: Union[Unset, None, str] = UNSET,
parent_hash: Union[Unset, None, str] = UNSET,
show_archived: Union[Unset, None, bool] = UNSET,
is_template: Union[Unset, None, bool] = UNSET,
kind: Union[Unset, None, str] = UNSET,
) -> Response[List[ListScriptsResponse200Item]]:
"""list all available scripts
Args:
workspace (str):
page (Union[Unset, None, int]):
per_page (Union[Unset, None, int]):
order_desc (Union[Unset, None, bool]):
created_by (Union[Unset, None, str]):
path_start (Union[Unset, None, str]):
path_exact (Union[Unset, None, str]):
first_parent_hash (Union[Unset, None, str]):
last_parent_hash (Union[Unset, None, str]):
parent_hash (Union[Unset, None, str]):
show_archived (Union[Unset, None, bool]):
is_template (Union[Unset, None, bool]):
kind (Union[Unset, None, str]):
Returns:
Response[List[ListScriptsResponse200Item]]
"""
kwargs = _get_kwargs(
workspace=workspace,
client=client,
page=page,
per_page=per_page,
order_desc=order_desc,
created_by=created_by,
path_start=path_start,
path_exact=path_exact,
first_parent_hash=first_parent_hash,
last_parent_hash=last_parent_hash,
parent_hash=parent_hash,
show_archived=show_archived,
is_template=is_template,
kind=kind,
)
response = httpx.request(
verify=client.verify_ssl,
**kwargs,
)
return _build_response(response=response)
def sync(
workspace: str,
*,
client: Client,
page: Union[Unset, None, int] = UNSET,
per_page: Union[Unset, None, int] = UNSET,
order_desc: Union[Unset, None, bool] = UNSET,
created_by: Union[Unset, None, str] = UNSET,
path_start: Union[Unset, None, str] = UNSET,
path_exact: Union[Unset, None, str] = UNSET,
first_parent_hash: Union[Unset, None, str] = UNSET,
last_parent_hash: Union[Unset, None, str] = UNSET,
parent_hash: Union[Unset, None, str] = UNSET,
show_archived: Union[Unset, None, bool] = UNSET,
is_template: Union[Unset, None, bool] = UNSET,
kind: Union[Unset, None, str] = UNSET,
) -> Optional[List[ListScriptsResponse200Item]]:
"""list all available scripts
Args:
workspace (str):
page (Union[Unset, None, int]):
per_page (Union[Unset, None, int]):
order_desc (Union[Unset, None, bool]):
created_by (Union[Unset, None, str]):
path_start (Union[Unset, None, str]):
path_exact (Union[Unset, None, str]):
first_parent_hash (Union[Unset, None, str]):
last_parent_hash (Union[Unset, None, str]):
parent_hash (Union[Unset, None, str]):
show_archived (Union[Unset, None, bool]):
is_template (Union[Unset, None, bool]):
kind (Union[Unset, None, str]):
Returns:
Response[List[ListScriptsResponse200Item]]
"""
return sync_detailed(
workspace=workspace,
client=client,
page=page,
per_page=per_page,
order_desc=order_desc,
created_by=created_by,
path_start=path_start,
path_exact=path_exact,
first_parent_hash=first_parent_hash,
last_parent_hash=last_parent_hash,
parent_hash=parent_hash,
show_archived=show_archived,
is_template=is_template,
kind=kind,
).parsed
async def asyncio_detailed(
workspace: str,
*,
client: Client,
page: Union[Unset, None, int] = UNSET,
per_page: Union[Unset, None, int] = UNSET,
order_desc: Union[Unset, None, bool] = UNSET,
created_by: Union[Unset, None, str] = UNSET,
path_start: Union[Unset, None, str] = UNSET,
path_exact: Union[Unset, None, str] = UNSET,
first_parent_hash: Union[Unset, None, str] = UNSET,
last_parent_hash: Union[Unset, None, str] = UNSET,
parent_hash: Union[Unset, None, str] = UNSET,
show_archived: Union[Unset, None, bool] = UNSET,
is_template: Union[Unset, None, bool] = UNSET,
kind: Union[Unset, None, str] = UNSET,
) -> Response[List[ListScriptsResponse200Item]]:
"""list all available scripts
Args:
workspace (str):
page (Union[Unset, None, int]):
per_page (Union[Unset, None, int]):
order_desc (Union[Unset, None, bool]):
created_by (Union[Unset, None, str]):
path_start (Union[Unset, None, str]):
path_exact (Union[Unset, None, str]):
first_parent_hash (Union[Unset, None, str]):
last_parent_hash (Union[Unset, None, str]):
parent_hash (Union[Unset, None, str]):
show_archived (Union[Unset, None, bool]):
is_template (Union[Unset, None, bool]):
kind (Union[Unset, None, str]):
Returns:
Response[List[ListScriptsResponse200Item]]
"""
kwargs = _get_kwargs(
workspace=workspace,
client=client,
page=page,
per_page=per_page,
order_desc=order_desc,
created_by=created_by,
path_start=path_start,
path_exact=path_exact,
first_parent_hash=first_parent_hash,
last_parent_hash=last_parent_hash,
parent_hash=parent_hash,
show_archived=show_archived,
is_template=is_template,
kind=kind,
)
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
response = await _client.request(**kwargs)
return _build_response(response=response)
async def asyncio(
workspace: str,
*,
client: Client,
page: Union[Unset, None, int] = UNSET,
per_page: Union[Unset, None, int] = UNSET,
order_desc: Union[Unset, None, bool] = UNSET,
created_by: Union[Unset, None, str] = UNSET,
path_start: Union[Unset, None, str] = UNSET,
path_exact: Union[Unset, None, str] = UNSET,
first_parent_hash: Union[Unset, None, str] = UNSET,
last_parent_hash: Union[Unset, None, str] = UNSET,
parent_hash: Union[Unset, None, str] = UNSET,
show_archived: Union[Unset, None, bool] = UNSET,
is_template: Union[Unset, None, bool] = UNSET,
kind: Union[Unset, None, str] = UNSET,
) -> Optional[List[ListScriptsResponse200Item]]:
"""list all available scripts
Args:
workspace (str):
page (Union[Unset, None, int]):
per_page (Union[Unset, None, int]):
order_desc (Union[Unset, None, bool]):
created_by (Union[Unset, None, str]):
path_start (Union[Unset, None, str]):
path_exact (Union[Unset, None, str]):
first_parent_hash (Union[Unset, None, str]):
last_parent_hash (Union[Unset, None, str]):
parent_hash (Union[Unset, None, str]):
show_archived (Union[Unset, None, bool]):
is_template (Union[Unset, None, bool]):
kind (Union[Unset, None, str]):
Returns:
Response[List[ListScriptsResponse200Item]]
"""
return (
await asyncio_detailed(
workspace=workspace,
client=client,
page=page,
per_page=per_page,
order_desc=order_desc,
created_by=created_by,
path_start=path_start,
path_exact=path_exact,
first_parent_hash=first_parent_hash,
last_parent_hash=last_parent_hash,
parent_hash=parent_hash,
show_archived=show_archived,
is_template=is_template,
kind=kind,
)
).parsed
@@ -1,140 +0,0 @@
from typing import Any, Dict, Optional
import httpx
from ...client import Client
from ...models.python_to_jsonschema_response_200 import PythonToJsonschemaResponse200
from ...types import Response
def _get_kwargs(
*,
client: Client,
json_body: str,
) -> Dict[str, Any]:
url = "{}/scripts/python/tojsonschema".format(client.base_url)
headers: Dict[str, str] = client.get_headers()
cookies: Dict[str, Any] = client.get_cookies()
json_json_body = json_body
return {
"method": "post",
"url": url,
"headers": headers,
"cookies": cookies,
"timeout": client.get_timeout(),
"json": json_json_body,
}
def _parse_response(*, response: httpx.Response) -> Optional[PythonToJsonschemaResponse200]:
if response.status_code == 200:
response_200 = PythonToJsonschemaResponse200.from_dict(response.json())
return response_200
return None
def _build_response(*, response: httpx.Response) -> Response[PythonToJsonschemaResponse200]:
return Response(
status_code=response.status_code,
content=response.content,
headers=response.headers,
parsed=_parse_response(response=response),
)
def sync_detailed(
*,
client: Client,
json_body: str,
) -> Response[PythonToJsonschemaResponse200]:
"""inspect python code to infer jsonschema of arguments
Args:
json_body (str):
Returns:
Response[PythonToJsonschemaResponse200]
"""
kwargs = _get_kwargs(
client=client,
json_body=json_body,
)
response = httpx.request(
verify=client.verify_ssl,
**kwargs,
)
return _build_response(response=response)
def sync(
*,
client: Client,
json_body: str,
) -> Optional[PythonToJsonschemaResponse200]:
"""inspect python code to infer jsonschema of arguments
Args:
json_body (str):
Returns:
Response[PythonToJsonschemaResponse200]
"""
return sync_detailed(
client=client,
json_body=json_body,
).parsed
async def asyncio_detailed(
*,
client: Client,
json_body: str,
) -> Response[PythonToJsonschemaResponse200]:
"""inspect python code to infer jsonschema of arguments
Args:
json_body (str):
Returns:
Response[PythonToJsonschemaResponse200]
"""
kwargs = _get_kwargs(
client=client,
json_body=json_body,
)
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
response = await _client.request(**kwargs)
return _build_response(response=response)
async def asyncio(
*,
client: Client,
json_body: str,
) -> Optional[PythonToJsonschemaResponse200]:
"""inspect python code to infer jsonschema of arguments
Args:
json_body (str):
Returns:
Response[PythonToJsonschemaResponse200]
"""
return (
await asyncio_detailed(
client=client,
json_body=json_body,
)
).parsed
@@ -1,93 +0,0 @@
from typing import Any, Dict
import httpx
from ...client import Client
from ...types import Response
def _get_kwargs(
workspace: str,
path: str,
*,
client: Client,
) -> Dict[str, Any]:
url = "{}/w/{workspace}/scripts/raw/h/{path}".format(client.base_url, workspace=workspace, path=path)
headers: Dict[str, str] = client.get_headers()
cookies: Dict[str, Any] = client.get_cookies()
return {
"method": "get",
"url": url,
"headers": headers,
"cookies": cookies,
"timeout": client.get_timeout(),
}
def _build_response(*, response: httpx.Response) -> Response[Any]:
return Response(
status_code=response.status_code,
content=response.content,
headers=response.headers,
parsed=None,
)
def sync_detailed(
workspace: str,
path: str,
*,
client: Client,
) -> Response[Any]:
"""raw script by hash
Args:
workspace (str):
path (str):
Returns:
Response[Any]
"""
kwargs = _get_kwargs(
workspace=workspace,
path=path,
client=client,
)
response = httpx.request(
verify=client.verify_ssl,
**kwargs,
)
return _build_response(response=response)
async def asyncio_detailed(
workspace: str,
path: str,
*,
client: Client,
) -> Response[Any]:
"""raw script by hash
Args:
workspace (str):
path (str):
Returns:
Response[Any]
"""
kwargs = _get_kwargs(
workspace=workspace,
path=path,
client=client,
)
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
response = await _client.request(**kwargs)
return _build_response(response=response)
@@ -1,93 +0,0 @@
from typing import Any, Dict
import httpx
from ...client import Client
from ...types import Response
def _get_kwargs(
workspace: str,
path: str,
*,
client: Client,
) -> Dict[str, Any]:
url = "{}/w/{workspace}/scripts/raw/p/{path}".format(client.base_url, workspace=workspace, path=path)
headers: Dict[str, str] = client.get_headers()
cookies: Dict[str, Any] = client.get_cookies()
return {
"method": "get",
"url": url,
"headers": headers,
"cookies": cookies,
"timeout": client.get_timeout(),
}
def _build_response(*, response: httpx.Response) -> Response[Any]:
return Response(
status_code=response.status_code,
content=response.content,
headers=response.headers,
parsed=None,
)
def sync_detailed(
workspace: str,
path: str,
*,
client: Client,
) -> Response[Any]:
"""raw script by path
Args:
workspace (str):
path (str):
Returns:
Response[Any]
"""
kwargs = _get_kwargs(
workspace=workspace,
path=path,
client=client,
)
response = httpx.request(
verify=client.verify_ssl,
**kwargs,
)
return _build_response(response=response)
async def asyncio_detailed(
workspace: str,
path: str,
*,
client: Client,
) -> Response[Any]:
"""raw script by path
Args:
workspace (str):
path (str):
Returns:
Response[Any]
"""
kwargs = _get_kwargs(
workspace=workspace,
path=path,
client=client,
)
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
response = await _client.request(**kwargs)
return _build_response(response=response)
@@ -1,75 +0,0 @@
from typing import Any, Dict
import httpx
from ...client import Client
from ...types import Response
def _get_kwargs(
*,
client: Client,
) -> Dict[str, Any]:
url = "{}/version".format(client.base_url)
headers: Dict[str, str] = client.get_headers()
cookies: Dict[str, Any] = client.get_cookies()
return {
"method": "get",
"url": url,
"headers": headers,
"cookies": cookies,
"timeout": client.get_timeout(),
}
def _build_response(*, response: httpx.Response) -> Response[Any]:
return Response(
status_code=response.status_code,
content=response.content,
headers=response.headers,
parsed=None,
)
def sync_detailed(
*,
client: Client,
) -> Response[Any]:
"""get backend version
Returns:
Response[Any]
"""
kwargs = _get_kwargs(
client=client,
)
response = httpx.request(
verify=client.verify_ssl,
**kwargs,
)
return _build_response(response=response)
async def asyncio_detailed(
*,
client: Client,
) -> Response[Any]:
"""get backend version
Returns:
Response[Any]
"""
kwargs = _get_kwargs(
client=client,
)
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
response = await _client.request(**kwargs)
return _build_response(response=response)

Some files were not shown because too many files have changed in this diff Show More