Skip to content

Commit

Permalink
ci: regenerated with OpenAPI Doc 1.0.0, Speakeasy CLI 1.269.1
Browse files Browse the repository at this point in the history
  • Loading branch information
speakeasybot committed Apr 23, 2024
1 parent 7935d40 commit bad5d36
Show file tree
Hide file tree
Showing 44 changed files with 1,723 additions and 547 deletions.
2 changes: 2 additions & 0 deletions submission/.gitattributes
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
6 changes: 6 additions & 0 deletions submission/.gitignore
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
57 changes: 57 additions & 0 deletions submission/.speakeasy/gen.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
lockVersion: 2.0.0
id: 10c30c50-231f-4672-b225-8be4e7bd56e3
management:
docChecksum: 3e73a0b032d576778d71b4b1bce49714
docVersion: 1.0.0
speakeasyVersion: 1.269.1
generationVersion: 2.312.1
releaseVersion: 1.3.0
configChecksum: e42c0b11b06754209ea416c74fbd505f
repoURL: https://github.com/epilot-dev/sdk-python.git
repoSubDirectory: submission
installationURL: https://github.com/epilot-dev/sdk-python.git#subdirectory=submission
features:
python:
additionalProperties: 0.1.0
core: 4.6.5
deprecations: 2.81.1
globalServerURLs: 2.82.2
responseFormat: 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
- tests/helpers.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
276 changes: 232 additions & 44 deletions submission/README.md
Original file line number Diff line number Diff line change
@@ -1,76 +1,264 @@
# 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 = 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',
)

res = s.submissions.create_submission(req)

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.

req = shared.SubmissionPayload(
ivy_opportunity_ids=[
"deserunt",
"porro",
"nulla",
| Error Object | Status Code | Content Type |
| --------------- | --------------- | --------------- |
| errors.SDKError | 4xx-5xx | */* |

### Example

```python
import epilot
from epilot.models import components, errors

s = epilot.Epilot()

req = 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',
)

res = None
try:
res = s.submissions.create_submission(req)
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,
)

req = 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",
opt_ins=[
shared.OptIn(
identifier="[email protected]",
meta={
"dicta": "est",
"voluptatem": "consequatur",
organization_id='123',
source_id='ce99875f-fba9-4fe2-a8f9-afaf52059051',
source_type='journey',
journey_submit_id='123',
)

res = s.submissions.create_submission(req)

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",
)

req = 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',
)

res = s.submissions.create_submission(req)

if res.status_code == 200:
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)
10 changes: 9 additions & 1 deletion submission/RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,12 @@ Based on:
### Changes
Based on:
- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/submission-api.yaml
- Speakeasy CLI 1.19.2 (2.16.5) https://github.com/speakeasy-api/speakeasy
- Speakeasy CLI 1.19.2 (2.16.5) https://github.com/speakeasy-api/speakeasy

## 2024-04-23 00:20:54
### Changes
Based on:
- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/submission-api.yaml
- Speakeasy CLI 1.269.1 (2.312.1) https://github.com/speakeasy-api/speakeasy
### Generated
- [python v1.3.0] submission
Loading

0 comments on commit bad5d36

Please sign in to comment.