-
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, Speakeasy CLI 1.285.1
- Loading branch information
1 parent
7935d40
commit 760d4e0
Showing
43 changed files
with
1,718 additions
and
549 deletions.
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,2 @@ | ||
# This allows generated code to be indexed correctly | ||
*.py linguist-generated=false |
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,6 @@ | ||
venv/ | ||
src/*.egg-info/ | ||
__pycache__/ | ||
.pytest_cache/ | ||
.python-version | ||
.DS_Store |
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,59 @@ | ||
lockVersion: 2.0.0 | ||
id: cc2dfd50-2f42-4648-b965-d48afdf22191 | ||
management: | ||
docChecksum: 3e73a0b032d576778d71b4b1bce49714 | ||
docVersion: 1.0.0 | ||
speakeasyVersion: 1.285.1 | ||
generationVersion: 2.326.3 | ||
releaseVersion: 1.3.0 | ||
configChecksum: 0a9d1b4e44889e99e7c91b60e8f0ce8e | ||
repoURL: https://github.com/epilot-dev/sdk-python.git | ||
repoSubDirectory: submission | ||
installationURL: https://github.com/epilot-dev/sdk-python.git#subdirectory=submission | ||
features: | ||
python: | ||
additionalDependencies: 0.1.0 | ||
additionalProperties: 0.1.0 | ||
core: 4.6.7 | ||
deprecations: 2.81.1 | ||
globalSecurityCallbacks: 0.1.0 | ||
globalServerURLs: 2.82.2 | ||
responseFormat: 0.1.0 | ||
sdkHooks: 0.1.0 | ||
generatedFiles: | ||
- src/epilot/sdkconfiguration.py | ||
- src/epilot/submissions.py | ||
- src/epilot/sdk.py | ||
- py.typed | ||
- pylintrc | ||
- setup.py | ||
- src/epilot/__init__.py | ||
- src/epilot/utils/__init__.py | ||
- src/epilot/utils/retries.py | ||
- src/epilot/utils/utils.py | ||
- src/epilot/models/errors/sdkerror.py | ||
- src/epilot/models/operations/createsubmission.py | ||
- src/epilot/models/components/httpmetadata.py | ||
- src/epilot/models/components/submissionpayload.py | ||
- src/epilot/models/components/optin.py | ||
- src/epilot/models/components/submissionentity.py | ||
- src/epilot/models/components/s3reference.py | ||
- src/epilot/models/__init__.py | ||
- src/epilot/models/errors/__init__.py | ||
- src/epilot/models/operations/__init__.py | ||
- src/epilot/models/components/__init__.py | ||
- docs/models/operations/createsubmissionresponse.md | ||
- docs/models/components/httpmetadata.md | ||
- docs/models/components/submissionpayload.md | ||
- docs/models/components/optin.md | ||
- docs/models/components/schema.md | ||
- docs/models/components/files.md | ||
- docs/models/components/submissionentity.md | ||
- docs/models/components/s3reference.md | ||
- docs/sdks/epilot/README.md | ||
- docs/sdks/submissions/README.md | ||
- USAGE.md | ||
- .gitattributes | ||
- src/epilot/_hooks/sdkhooks.py | ||
- src/epilot/_hooks/types.py | ||
- src/epilot/_hooks/__init__.py |
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,76 +1,280 @@ | ||
# epilot-submission | ||
|
||
<!-- Start SDK Installation --> | ||
<!-- Start SDK Installation [installation] --> | ||
## SDK Installation | ||
|
||
```bash | ||
pip install git+https://github.com/epilot-dev/sdk-python.git#subdirectory=submission | ||
``` | ||
<!-- End SDK Installation --> | ||
<!-- End SDK Installation [installation] --> | ||
|
||
<!-- Start SDK Example Usage [usage] --> | ||
## SDK Example Usage | ||
<!-- Start SDK Example Usage --> | ||
|
||
### Example | ||
|
||
```python | ||
import epilot | ||
from epilot.models import operations, shared | ||
from epilot.models import components | ||
|
||
s = epilot.Epilot() | ||
|
||
|
||
req = shared.SubmissionPayload( | ||
ivy_opportunity_ids=[ | ||
"deserunt", | ||
"porro", | ||
"nulla", | ||
res = s.submissions.create_submission(request=components.SubmissionPayload( | ||
entities=[ | ||
components.SubmissionEntity( | ||
schema=components.Schema.SUBMISSION, | ||
additional_properties={ | ||
'_schema': 'submission', | ||
'description': 'Submission created via API', | ||
'contact_first_name': 'First', | ||
'contact_last_name': 'Last', | ||
'contact_email': '[email protected]', | ||
'request': 'I would like to know more about electric vehicles', | ||
'files': '<value>', | ||
}, | ||
description='Submission created via API', | ||
files=[ | ||
components.Files( | ||
s3ref=components.S3Reference( | ||
bucket='epilot-user-content', | ||
key='temp/123/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf', | ||
), | ||
filename='document.pdf', | ||
), | ||
], | ||
), | ||
], | ||
organization_id='123', | ||
source_id='ce99875f-fba9-4fe2-a8f9-afaf52059051', | ||
source_type='journey', | ||
journey_submit_id='123', | ||
opt_ins=[ | ||
components.OptIn( | ||
identifier='[email protected]', | ||
topic='EMAIL_MARKETING', | ||
), | ||
], | ||
)) | ||
|
||
if res is not None: | ||
# handle response | ||
pass | ||
|
||
``` | ||
<!-- End SDK Example Usage [usage] --> | ||
|
||
<!-- Start Available Resources and Operations [operations] --> | ||
## Available Resources and Operations | ||
|
||
### [submissions](docs/sdks/submissions/README.md) | ||
|
||
* [create_submission](docs/sdks/submissions/README.md#create_submission) - createSubmission | ||
<!-- End Available Resources and Operations [operations] --> | ||
|
||
<!-- Start Error Handling [errors] --> | ||
## Error Handling | ||
|
||
Handling errors in this SDK should largely match your expectations. All operations return a response object or raise an error. If Error objects are specified in your OpenAPI Spec, the SDK will raise the appropriate Error type. | ||
|
||
| Error Object | Status Code | Content Type | | ||
| --------------- | --------------- | --------------- | | ||
| errors.SDKError | 4xx-5xx | */* | | ||
|
||
### Example | ||
|
||
```python | ||
import epilot | ||
from epilot.models import components, errors | ||
|
||
s = epilot.Epilot() | ||
|
||
res = None | ||
try: | ||
res = s.submissions.create_submission(request=components.SubmissionPayload( | ||
entities=[ | ||
{ | ||
"perspiciatis": "nulla", | ||
"nihil": "fuga", | ||
"facilis": "eum", | ||
"iusto": "ullam", | ||
}, | ||
{ | ||
"inventore": "sapiente", | ||
"enim": "eum", | ||
"voluptatum": "autem", | ||
"vel": "non", | ||
}, | ||
{ | ||
"similique": "reprehenderit", | ||
"molestiae": "quo", | ||
}, | ||
components.SubmissionEntity( | ||
schema=components.Schema.SUBMISSION, | ||
additional_properties={ | ||
'_schema': 'submission', | ||
'description': 'Submission created via API', | ||
'contact_first_name': 'First', | ||
'contact_last_name': 'Last', | ||
'contact_email': '[email protected]', | ||
'request': 'I would like to know more about electric vehicles', | ||
'files': '<value>', | ||
}, | ||
description='Submission created via API', | ||
files=[ | ||
components.Files( | ||
s3ref=components.S3Reference( | ||
bucket='epilot-user-content', | ||
key='temp/123/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf', | ||
), | ||
filename='document.pdf', | ||
), | ||
], | ||
), | ||
], | ||
journey_submit_id="123", | ||
organization_id='123', | ||
source_id='ce99875f-fba9-4fe2-a8f9-afaf52059051', | ||
source_type='journey', | ||
journey_submit_id='123', | ||
opt_ins=[ | ||
shared.OptIn( | ||
identifier="[email protected]", | ||
meta={ | ||
"dicta": "est", | ||
"voluptatem": "consequatur", | ||
components.OptIn( | ||
identifier='[email protected]', | ||
topic='EMAIL_MARKETING', | ||
), | ||
], | ||
)) | ||
except errors.SDKError as e: | ||
# handle exception | ||
raise(e) | ||
|
||
if res is not None: | ||
# handle response | ||
pass | ||
|
||
``` | ||
<!-- End Error Handling [errors] --> | ||
|
||
<!-- Start Server Selection [server] --> | ||
## Server Selection | ||
|
||
### Select Server by Index | ||
|
||
You can override the default server globally by passing a server index to the `server_idx: int` optional parameter when initializing the SDK client instance. The selected server will then be used as the default on the operations that use it. This table lists the indexes associated with the available servers: | ||
|
||
| # | Server | Variables | | ||
| - | ------ | --------- | | ||
| 0 | `https://submission.sls.epilot.io` | None | | ||
|
||
#### Example | ||
|
||
```python | ||
import epilot | ||
from epilot.models import components | ||
|
||
s = epilot.Epilot( | ||
server_idx=0, | ||
) | ||
|
||
res = s.submissions.create_submission(request=components.SubmissionPayload( | ||
entities=[ | ||
components.SubmissionEntity( | ||
schema=components.Schema.SUBMISSION, | ||
additional_properties={ | ||
'_schema': 'submission', | ||
'description': 'Submission created via API', | ||
'contact_first_name': 'First', | ||
'contact_last_name': 'Last', | ||
'contact_email': '[email protected]', | ||
'request': 'I would like to know more about electric vehicles', | ||
'files': '<value>', | ||
}, | ||
topic="EMAIL_MARKETING", | ||
description='Submission created via API', | ||
files=[ | ||
components.Files( | ||
s3ref=components.S3Reference( | ||
bucket='epilot-user-content', | ||
key='temp/123/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf', | ||
), | ||
filename='document.pdf', | ||
), | ||
], | ||
), | ||
], | ||
organization_id="123", | ||
source_id="ce99875f-fba9-4fe2-a8f9-afaf52059051", | ||
source_type="journey", | ||
organization_id='123', | ||
source_id='ce99875f-fba9-4fe2-a8f9-afaf52059051', | ||
source_type='journey', | ||
journey_submit_id='123', | ||
opt_ins=[ | ||
components.OptIn( | ||
identifier='[email protected]', | ||
topic='EMAIL_MARKETING', | ||
), | ||
], | ||
)) | ||
|
||
if res is not None: | ||
# handle response | ||
pass | ||
|
||
``` | ||
|
||
|
||
### Override Server URL Per-Client | ||
|
||
The default server can also be overridden globally by passing a URL to the `server_url: str` optional parameter when initializing the SDK client instance. For example: | ||
```python | ||
import epilot | ||
from epilot.models import components | ||
|
||
s = epilot.Epilot( | ||
server_url="https://submission.sls.epilot.io", | ||
) | ||
|
||
res = s.submissions.create_submission(req) | ||
|
||
if res.status_code == 200: | ||
res = s.submissions.create_submission(request=components.SubmissionPayload( | ||
entities=[ | ||
components.SubmissionEntity( | ||
schema=components.Schema.SUBMISSION, | ||
additional_properties={ | ||
'_schema': 'submission', | ||
'description': 'Submission created via API', | ||
'contact_first_name': 'First', | ||
'contact_last_name': 'Last', | ||
'contact_email': '[email protected]', | ||
'request': 'I would like to know more about electric vehicles', | ||
'files': '<value>', | ||
}, | ||
description='Submission created via API', | ||
files=[ | ||
components.Files( | ||
s3ref=components.S3Reference( | ||
bucket='epilot-user-content', | ||
key='temp/123/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf', | ||
), | ||
filename='document.pdf', | ||
), | ||
], | ||
), | ||
], | ||
organization_id='123', | ||
source_id='ce99875f-fba9-4fe2-a8f9-afaf52059051', | ||
source_type='journey', | ||
journey_submit_id='123', | ||
opt_ins=[ | ||
components.OptIn( | ||
identifier='[email protected]', | ||
topic='EMAIL_MARKETING', | ||
), | ||
], | ||
)) | ||
|
||
if res is not None: | ||
# handle response | ||
pass | ||
|
||
``` | ||
<!-- End SDK Example Usage --> | ||
<!-- End Server Selection [server] --> | ||
|
||
<!-- Start Custom HTTP Client [http-client] --> | ||
## Custom HTTP Client | ||
|
||
The Python SDK makes API calls using the [requests](https://pypi.org/project/requests/) HTTP library. In order to provide a convenient way to configure timeouts, cookies, proxies, custom headers, and other low-level configuration, you can initialize the SDK client with a custom `requests.Session` object. | ||
|
||
<!-- Start SDK Available Operations --> | ||
## SDK Available Operations | ||
For example, you could specify a header for every request that this sdk makes as follows: | ||
```python | ||
import epilot | ||
import requests | ||
|
||
http_client = requests.Session() | ||
http_client.headers.update({'x-custom-header': 'someValue'}) | ||
s = epilot.Epilot(client=http_client) | ||
``` | ||
<!-- End Custom HTTP Client [http-client] --> | ||
|
||
<!-- Placeholder for Future Speakeasy SDK Sections --> | ||
|
||
### submissions | ||
|
||
* `create_submission` - createSubmission | ||
<!-- End SDK Available Operations --> | ||
|
||
### SDK Generated by [Speakeasy](https://docs.speakeasyapi.dev/docs/using-speakeasy/client-sdks) |
Oops, something went wrong.