-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: regenerated with OpenAPI Doc 1.0.0, Speakeay CLI 0.22.0 (#1)
Co-authored-by: speakeasybot <[email protected]>
- Loading branch information
1 parent
d412379
commit aa1c93b
Showing
178 changed files
with
7,575 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,130 @@ | ||
# epilotapi | ||
|
||
<!-- Start SDK Installation --> | ||
## SDK Installation | ||
|
||
```bash | ||
pip install epilotapi | ||
``` | ||
<!-- End SDK Installation --> | ||
|
||
## SDK Example Usage | ||
<!-- Start SDK Example Usage --> | ||
```python | ||
import epilotapi | ||
from epilotapi.models import operations, shared | ||
|
||
s = epilotapi.EpilotAPI() | ||
s.config_security( | ||
security=shared.Security( | ||
epilot_auth=shared.SchemeEpilotAuth( | ||
authorization="Bearer YOUR_BEARER_TOKEN_HERE", | ||
), | ||
) | ||
) | ||
|
||
req = operations.AttachActivityRequest( | ||
path_params=operations.AttachActivityPathParams( | ||
id="sit", | ||
), | ||
query_params=operations.AttachActivityQueryParams( | ||
entities=[ | ||
"culpa", | ||
], | ||
), | ||
) | ||
|
||
res = s.activity.attach_activity(req) | ||
|
||
if res.activity_item is not None: | ||
# handle response | ||
``` | ||
<!-- End SDK Example Usage --> | ||
|
||
<!-- Start SDK Available Operations --> | ||
## SDK Available Operations | ||
|
||
### Activity | ||
|
||
* `attach_activity` - attachActivity | ||
* `create_activity` - createActivity | ||
* `get_activity` - getActivity | ||
* `get_entity_activity_feed` - getEntityActivityFeed | ||
|
||
### Entities | ||
|
||
* `autocomplete` - autocomplete | ||
* `create_entity` - createEntity | ||
* `delete_entity` - deleteEntity | ||
* `get_entity` - getEntity | ||
* `search_entities` - searchEntities | ||
* `update_entity` - updateEntity | ||
* `upsert_entity` - upsertEntity | ||
|
||
### Export | ||
|
||
* `export_entities` - exportEntities | ||
* `import_entities` - importEntities | ||
|
||
### Journeys | ||
|
||
* `create_journey` - createJourney | ||
* `get_journey` - getJourney | ||
* `get_journeys_by_org_id` - getJourneysByOrgId | ||
* `patch_update_journey` - patchUpdateJourney | ||
* `remove_journey` - removeJourney | ||
* `search_journeys` - searchJourneys | ||
* `update_journey` - updateJourney | ||
|
||
### Relations | ||
|
||
* `add_relations` - addRelations | ||
* `delete_relation` - deleteRelation | ||
* `get_relations` - getRelations | ||
* `update_relation` - updateRelation | ||
|
||
### Saved Views | ||
|
||
* `create_saved_view` - createSavedView | ||
* `delete_saved_view` - deleteSavedView | ||
* `get_saved_view` - getSavedView | ||
* `list_saved_views` - listSavedViews | ||
* `update_saved_view` - updateSavedView | ||
|
||
### Schemas | ||
|
||
* `create_new_schema_version` - createNewSchemaVersion | ||
* `delete_schema_by_id` - deleteSchemaById | ||
* `get_schema` - getSchema | ||
* `get_schema_versions` - getSchemaVersions | ||
* `list_schema_blueprints` - listSchemaBlueprints | ||
* `list_schemas` - listSchemas | ||
* `list_taxonomy_classifications_for_schema` - listTaxonomyClassificationsForSchema | ||
|
||
### Taxonomy | ||
|
||
* `get_taxonomy` - getTaxonomy | ||
* `list_taxonomies` - listTaxonomies | ||
* `taxonomies_classifications_search` - taxonomiesClassificationsSearch | ||
* `taxonomy_autocomplete` - taxonomyAutocomplete | ||
* `update_classifications_for_taxonomy` - updateClassificationsForTaxonomy | ||
|
||
### executions | ||
|
||
* `cancel_execution` - cancelExecution | ||
* `get_execution` - getExecution | ||
* `get_executions` - getExecutions | ||
* `retrigger_action` - retriggerAction | ||
* `start_execution` - startExecution | ||
|
||
### flows | ||
|
||
* `create_flow` - createFlow | ||
* `delete_flow` - deleteFlow | ||
* `get_flow` - getFlow | ||
* `put_flow` - putFlow | ||
* `search_flows` - searchFlows | ||
|
||
<!-- End SDK Available Operations --> | ||
|
||
### SDK Generated by [Speakeasy](https://docs.speakeasyapi.dev/docs/using-speakeasy/client-sdks) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
|
||
|
||
## Version 1.1.0 | ||
### Changes | ||
Based on: | ||
- OpenAPI Doc 1.0.0 ./openapi.yaml | ||
- Speakeasy CLI 0.22.0 https://github.com/speakeasy-api/speakeasy | ||
### Releases | ||
- [PyPI v1.1.0] https://pypi.org/project/epilotapi/1.1.0 - . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<!-- Start SDK Example Usage --> | ||
```python | ||
import epilotapi | ||
from epilotapi.models import operations, shared | ||
|
||
s = epilotapi.EpilotAPI() | ||
s.config_security( | ||
security=shared.Security( | ||
epilot_auth=shared.SchemeEpilotAuth( | ||
authorization="Bearer YOUR_BEARER_TOKEN_HERE", | ||
), | ||
) | ||
) | ||
|
||
req = operations.AttachActivityRequest( | ||
path_params=operations.AttachActivityPathParams( | ||
id="sit", | ||
), | ||
query_params=operations.AttachActivityQueryParams( | ||
entities=[ | ||
"culpa", | ||
], | ||
), | ||
) | ||
|
||
res = s.activity.attach_activity(req) | ||
|
||
if res.activity_item is not None: | ||
# handle response | ||
``` | ||
<!-- End SDK Example Usage --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,9 @@ | ||
management: | ||
openapi-checksum: e5a0a41f38f047f4f80691166ac20b34 | ||
openapi-version: 1.0.0 | ||
speakeasy-version: 0.22.0 | ||
python: | ||
version: 1.0.0 | ||
version: 1.1.0 | ||
packagename: epilotapi | ||
author: epilotapi | ||
sdkclassname: EpilotAPI |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import setuptools | ||
|
||
try: | ||
with open("README.md", "r") as fh: | ||
long_description = fh.read() | ||
except FileNotFoundError: | ||
long_description = "" | ||
|
||
setuptools.setup( | ||
name="epilotapi", | ||
version="1.1.0", | ||
author="epilotapi", | ||
description="Python Client SDK Generated by Speakeasy", | ||
long_description=long_description, | ||
long_description_content_type="text/markdown", | ||
packages=setuptools.find_packages(where="src"), | ||
install_requires=[ | ||
"certifi==2022.12.07", | ||
"charset-normalizer==2.1.1", | ||
"dacite==1.6.0", | ||
"dataclasses-json-speakeasy==0.5.8", | ||
"idna==3.3", | ||
"marshmallow==3.17.1", | ||
"marshmallow-enum==1.5.1", | ||
"mypy-extensions==0.4.3", | ||
"packaging==21.3", | ||
"pyparsing==3.0.9", | ||
"python-dateutil==2.8.2", | ||
"requests==2.28.1", | ||
"six==1.16.0", | ||
"typing-inspect==0.8.0", | ||
"typing_extensions==4.3.0", | ||
"urllib3==1.26.12", | ||
], | ||
package_dir={'': 'src'}, | ||
python_requires='>=3.9' | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
from .sdk import * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,135 @@ | ||
import requests | ||
from typing import Optional | ||
from epilotapi.models import shared, operations | ||
from . import utils | ||
|
||
class Activity: | ||
_client: requests.Session | ||
_security_client: requests.Session | ||
_server_url: str | ||
_language: str | ||
_sdk_version: str | ||
_gen_version: str | ||
|
||
def __init__(self, client: requests.Session, security_client: requests.Session, server_url: str, language: str, sdk_version: str, gen_version: str) -> None: | ||
self._client = client | ||
self._security_client = security_client | ||
self._server_url = server_url | ||
self._language = language | ||
self._sdk_version = sdk_version | ||
self._gen_version = gen_version | ||
|
||
|
||
def attach_activity(self, request: operations.AttachActivityRequest) -> operations.AttachActivityResponse: | ||
r"""attachActivity | ||
Attach existing activity to entity activity feeds | ||
""" | ||
|
||
base_url = self._server_url | ||
|
||
url = utils.generate_url(base_url, "/v1/entity/activity/{id}:attach", request.path_params) | ||
|
||
query_params = utils.get_query_params(request.query_params) | ||
|
||
client = self._security_client | ||
|
||
r = client.request("POST", url, params=query_params) | ||
content_type = r.headers.get("Content-Type") | ||
|
||
res = operations.AttachActivityResponse(status_code=r.status_code, content_type=content_type) | ||
|
||
if r.status_code == 200: | ||
if utils.match_content_type(content_type, "application/json"): | ||
out = utils.unmarshal_json(r.text, Optional[shared.ActivityItem]) | ||
res.activity_item = out | ||
|
||
return res | ||
|
||
|
||
def create_activity(self, request: operations.CreateActivityRequest) -> operations.CreateActivityResponse: | ||
r"""createActivity | ||
Create an activity that can be displayed in activity feeds. | ||
- All activites are published as events on the event bus | ||
- Entity mutations are always part of an activity | ||
""" | ||
|
||
base_url = self._server_url | ||
|
||
url = base_url.removesuffix("/") + "/v1/entity/activity" | ||
|
||
headers = {} | ||
req_content_type, data, json, files = utils.serialize_request_body(request) | ||
if req_content_type != "multipart/form-data" and req_content_type != "multipart/mixed": | ||
headers["content-type"] = req_content_type | ||
query_params = utils.get_query_params(request.query_params) | ||
|
||
client = self._security_client | ||
|
||
r = client.request("POST", url, params=query_params, data=data, json=json, files=files, headers=headers) | ||
content_type = r.headers.get("Content-Type") | ||
|
||
res = operations.CreateActivityResponse(status_code=r.status_code, content_type=content_type) | ||
|
||
if r.status_code == 200: | ||
if utils.match_content_type(content_type, "application/json"): | ||
out = utils.unmarshal_json(r.text, Optional[shared.ActivityItem]) | ||
res.activity_item = out | ||
|
||
return res | ||
|
||
|
||
def get_activity(self, request: operations.GetActivityRequest) -> operations.GetActivityResponse: | ||
r"""getActivity | ||
Get activity by id | ||
""" | ||
|
||
base_url = self._server_url | ||
|
||
url = utils.generate_url(base_url, "/v1/entity/activity/{id}", request.path_params) | ||
|
||
query_params = utils.get_query_params(request.query_params) | ||
|
||
client = self._security_client | ||
|
||
r = client.request("GET", url, params=query_params) | ||
content_type = r.headers.get("Content-Type") | ||
|
||
res = operations.GetActivityResponse(status_code=r.status_code, content_type=content_type) | ||
|
||
if r.status_code == 200: | ||
if utils.match_content_type(content_type, "application/json"): | ||
out = utils.unmarshal_json(r.text, Optional[shared.ActivityItem]) | ||
res.activity_item = out | ||
|
||
return res | ||
|
||
|
||
def get_entity_activity_feed(self, request: operations.GetEntityActivityFeedRequest) -> operations.GetEntityActivityFeedResponse: | ||
r"""getEntityActivityFeed | ||
Get activity feed for an entity | ||
""" | ||
|
||
base_url = self._server_url | ||
|
||
url = utils.generate_url(base_url, "/v1/entity/{slug}/{id}/activity", request.path_params) | ||
|
||
query_params = utils.get_query_params(request.query_params) | ||
|
||
client = self._security_client | ||
|
||
r = client.request("GET", url, params=query_params) | ||
content_type = r.headers.get("Content-Type") | ||
|
||
res = operations.GetEntityActivityFeedResponse(status_code=r.status_code, content_type=content_type) | ||
|
||
if r.status_code == 200: | ||
if utils.match_content_type(content_type, "application/json"): | ||
out = utils.unmarshal_json(r.text, Optional[operations.GetEntityActivityFeed200ApplicationJSON]) | ||
res.get_entity_activity_feed_200_application_json_object = out | ||
|
||
return res | ||
|
||
|
Oops, something went wrong.