Skip to content

Commit bad5d36

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

Some content is hidden

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

44 files changed

+1723
-547
lines changed

submission/.gitattributes

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

submission/.gitignore

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

submission/.speakeasy/gen.lock

+57
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
lockVersion: 2.0.0
2+
id: 10c30c50-231f-4672-b225-8be4e7bd56e3
3+
management:
4+
docChecksum: 3e73a0b032d576778d71b4b1bce49714
5+
docVersion: 1.0.0
6+
speakeasyVersion: 1.269.1
7+
generationVersion: 2.312.1
8+
releaseVersion: 1.3.0
9+
configChecksum: e42c0b11b06754209ea416c74fbd505f
10+
repoURL: https://github.com/epilot-dev/sdk-python.git
11+
repoSubDirectory: submission
12+
installationURL: https://github.com/epilot-dev/sdk-python.git#subdirectory=submission
13+
features:
14+
python:
15+
additionalProperties: 0.1.0
16+
core: 4.6.5
17+
deprecations: 2.81.1
18+
globalServerURLs: 2.82.2
19+
responseFormat: 0.1.0
20+
generatedFiles:
21+
- src/epilot/sdkconfiguration.py
22+
- src/epilot/submissions.py
23+
- src/epilot/sdk.py
24+
- py.typed
25+
- pylintrc
26+
- setup.py
27+
- src/epilot/__init__.py
28+
- src/epilot/utils/__init__.py
29+
- src/epilot/utils/retries.py
30+
- src/epilot/utils/utils.py
31+
- src/epilot/models/errors/sdkerror.py
32+
- tests/helpers.py
33+
- src/epilot/models/operations/createsubmission.py
34+
- src/epilot/models/components/httpmetadata.py
35+
- src/epilot/models/components/submissionpayload.py
36+
- src/epilot/models/components/optin.py
37+
- src/epilot/models/components/submissionentity.py
38+
- src/epilot/models/components/s3reference.py
39+
- src/epilot/models/__init__.py
40+
- src/epilot/models/errors/__init__.py
41+
- src/epilot/models/operations/__init__.py
42+
- src/epilot/models/components/__init__.py
43+
- docs/models/operations/createsubmissionresponse.md
44+
- docs/models/components/httpmetadata.md
45+
- docs/models/components/submissionpayload.md
46+
- docs/models/components/optin.md
47+
- docs/models/components/schema.md
48+
- docs/models/components/files.md
49+
- docs/models/components/submissionentity.md
50+
- docs/models/components/s3reference.md
51+
- docs/sdks/epilot/README.md
52+
- docs/sdks/submissions/README.md
53+
- USAGE.md
54+
- .gitattributes
55+
- src/epilot/_hooks/sdkhooks.py
56+
- src/epilot/_hooks/types.py
57+
- src/epilot/_hooks/__init__.py

submission/README.md

+232-44
Original file line numberDiff line numberDiff line change
@@ -1,76 +1,264 @@
11
# epilot-submission
22

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

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

11+
<!-- Start SDK Example Usage [usage] -->
1112
## SDK Example Usage
12-
<!-- Start SDK Example Usage -->
13+
14+
### Example
15+
1316
```python
1417
import epilot
15-
from epilot.models import operations, shared
18+
from epilot.models import components
1619

1720
s = epilot.Epilot()
1821

22+
req = components.SubmissionPayload(
23+
entities=[
24+
components.SubmissionEntity(
25+
schema=components.Schema.SUBMISSION,
26+
additional_properties={
27+
'_schema': 'submission',
28+
'description': 'Submission created via API',
29+
'contact_first_name': 'First',
30+
'contact_last_name': 'Last',
31+
'contact_email': '[email protected]',
32+
'request': 'I would like to know more about electric vehicles',
33+
'files': '<value>',
34+
},
35+
description='Submission created via API',
36+
files=[
37+
components.Files(
38+
s3ref=components.S3Reference(
39+
bucket='epilot-user-content',
40+
key='temp/123/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf',
41+
),
42+
filename='document.pdf',
43+
),
44+
],
45+
),
46+
],
47+
organization_id='123',
48+
source_id='ce99875f-fba9-4fe2-a8f9-afaf52059051',
49+
source_type='journey',
50+
journey_submit_id='123',
51+
)
52+
53+
res = s.submissions.create_submission(req)
54+
55+
if res is not None:
56+
# handle response
57+
pass
58+
59+
```
60+
<!-- End SDK Example Usage [usage] -->
61+
62+
<!-- Start Available Resources and Operations [operations] -->
63+
## Available Resources and Operations
64+
65+
### [submissions](docs/sdks/submissions/README.md)
66+
67+
* [create_submission](docs/sdks/submissions/README.md#create_submission) - createSubmission
68+
<!-- End Available Resources and Operations [operations] -->
69+
70+
<!-- Start Error Handling [errors] -->
71+
## Error Handling
72+
73+
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.
1974

20-
req = shared.SubmissionPayload(
21-
ivy_opportunity_ids=[
22-
"deserunt",
23-
"porro",
24-
"nulla",
75+
| Error Object | Status Code | Content Type |
76+
| --------------- | --------------- | --------------- |
77+
| errors.SDKError | 4xx-5xx | */* |
78+
79+
### Example
80+
81+
```python
82+
import epilot
83+
from epilot.models import components, errors
84+
85+
s = epilot.Epilot()
86+
87+
req = components.SubmissionPayload(
88+
entities=[
89+
components.SubmissionEntity(
90+
schema=components.Schema.SUBMISSION,
91+
additional_properties={
92+
'_schema': 'submission',
93+
'description': 'Submission created via API',
94+
'contact_first_name': 'First',
95+
'contact_last_name': 'Last',
96+
'contact_email': '[email protected]',
97+
'request': 'I would like to know more about electric vehicles',
98+
'files': '<value>',
99+
},
100+
description='Submission created via API',
101+
files=[
102+
components.Files(
103+
s3ref=components.S3Reference(
104+
bucket='epilot-user-content',
105+
key='temp/123/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf',
106+
),
107+
filename='document.pdf',
108+
),
109+
],
110+
),
25111
],
112+
organization_id='123',
113+
source_id='ce99875f-fba9-4fe2-a8f9-afaf52059051',
114+
source_type='journey',
115+
journey_submit_id='123',
116+
)
117+
118+
res = None
119+
try:
120+
res = s.submissions.create_submission(req)
121+
except errors.SDKError as e:
122+
# handle exception
123+
raise(e)
124+
125+
if res is not None:
126+
# handle response
127+
pass
128+
129+
```
130+
<!-- End Error Handling [errors] -->
131+
132+
<!-- Start Server Selection [server] -->
133+
## Server Selection
134+
135+
### Select Server by Index
136+
137+
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:
138+
139+
| # | Server | Variables |
140+
| - | ------ | --------- |
141+
| 0 | `https://submission.sls.epilot.io` | None |
142+
143+
#### Example
144+
145+
```python
146+
import epilot
147+
from epilot.models import components
148+
149+
s = epilot.Epilot(
150+
server_idx=0,
151+
)
152+
153+
req = components.SubmissionPayload(
26154
entities=[
27-
{
28-
"perspiciatis": "nulla",
29-
"nihil": "fuga",
30-
"facilis": "eum",
31-
"iusto": "ullam",
32-
},
33-
{
34-
"inventore": "sapiente",
35-
"enim": "eum",
36-
"voluptatum": "autem",
37-
"vel": "non",
38-
},
39-
{
40-
"similique": "reprehenderit",
41-
"molestiae": "quo",
42-
},
155+
components.SubmissionEntity(
156+
schema=components.Schema.SUBMISSION,
157+
additional_properties={
158+
'_schema': 'submission',
159+
'description': 'Submission created via API',
160+
'contact_first_name': 'First',
161+
'contact_last_name': 'Last',
162+
'contact_email': '[email protected]',
163+
'request': 'I would like to know more about electric vehicles',
164+
'files': '<value>',
165+
},
166+
description='Submission created via API',
167+
files=[
168+
components.Files(
169+
s3ref=components.S3Reference(
170+
bucket='epilot-user-content',
171+
key='temp/123/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf',
172+
),
173+
filename='document.pdf',
174+
),
175+
],
176+
),
43177
],
44-
journey_submit_id="123",
45-
opt_ins=[
46-
shared.OptIn(
47-
identifier="[email protected]",
48-
meta={
49-
"dicta": "est",
50-
"voluptatem": "consequatur",
178+
organization_id='123',
179+
source_id='ce99875f-fba9-4fe2-a8f9-afaf52059051',
180+
source_type='journey',
181+
journey_submit_id='123',
182+
)
183+
184+
res = s.submissions.create_submission(req)
185+
186+
if res is not None:
187+
# handle response
188+
pass
189+
190+
```
191+
192+
193+
### Override Server URL Per-Client
194+
195+
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:
196+
```python
197+
import epilot
198+
from epilot.models import components
199+
200+
s = epilot.Epilot(
201+
server_url="https://submission.sls.epilot.io",
202+
)
203+
204+
req = components.SubmissionPayload(
205+
entities=[
206+
components.SubmissionEntity(
207+
schema=components.Schema.SUBMISSION,
208+
additional_properties={
209+
'_schema': 'submission',
210+
'description': 'Submission created via API',
211+
'contact_first_name': 'First',
212+
'contact_last_name': 'Last',
213+
'contact_email': '[email protected]',
214+
'request': 'I would like to know more about electric vehicles',
215+
'files': '<value>',
51216
},
52-
topic="EMAIL_MARKETING",
217+
description='Submission created via API',
218+
files=[
219+
components.Files(
220+
s3ref=components.S3Reference(
221+
bucket='epilot-user-content',
222+
key='temp/123/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf',
223+
),
224+
filename='document.pdf',
225+
),
226+
],
53227
),
54228
],
55-
organization_id="123",
56-
source_id="ce99875f-fba9-4fe2-a8f9-afaf52059051",
57-
source_type="journey",
229+
organization_id='123',
230+
source_id='ce99875f-fba9-4fe2-a8f9-afaf52059051',
231+
source_type='journey',
232+
journey_submit_id='123',
58233
)
59-
234+
60235
res = s.submissions.create_submission(req)
61236

62-
if res.status_code == 200:
237+
if res is not None:
63238
# handle response
239+
pass
240+
64241
```
65-
<!-- End SDK Example Usage -->
242+
<!-- End Server Selection [server] -->
243+
244+
<!-- Start Custom HTTP Client [http-client] -->
245+
## Custom HTTP Client
246+
247+
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.
66248

67-
<!-- Start SDK Available Operations -->
68-
## SDK Available Operations
249+
For example, you could specify a header for every request that this sdk makes as follows:
250+
```python
251+
import epilot
252+
import requests
253+
254+
http_client = requests.Session()
255+
http_client.headers.update({'x-custom-header': 'someValue'})
256+
s = epilot.Epilot(client=http_client)
257+
```
258+
<!-- End Custom HTTP Client [http-client] -->
69259

260+
<!-- Placeholder for Future Speakeasy SDK Sections -->
70261

71-
### submissions
72262

73-
* `create_submission` - createSubmission
74-
<!-- End SDK Available Operations -->
75263

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

submission/RELEASES.md

+9-1
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,12 @@ Based on:
3434
### Changes
3535
Based on:
3636
- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/submission-api.yaml
37-
- Speakeasy CLI 1.19.2 (2.16.5) https://github.com/speakeasy-api/speakeasy
37+
- Speakeasy CLI 1.19.2 (2.16.5) https://github.com/speakeasy-api/speakeasy
38+
39+
## 2024-04-23 00:20:54
40+
### Changes
41+
Based on:
42+
- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/submission-api.yaml
43+
- Speakeasy CLI 1.269.1 (2.312.1) https://github.com/speakeasy-api/speakeasy
44+
### Generated
45+
- [python v1.3.0] submission

0 commit comments

Comments
 (0)