Skip to content

Commit 760d4e0

Browse files
committed
ci: regenerated with OpenAPI Doc 1.0.0, Speakeasy CLI 1.285.1
1 parent 7935d40 commit 760d4e0

Some content is hidden

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

43 files changed

+1718
-549
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

+59
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
lockVersion: 2.0.0
2+
id: cc2dfd50-2f42-4648-b965-d48afdf22191
3+
management:
4+
docChecksum: 3e73a0b032d576778d71b4b1bce49714
5+
docVersion: 1.0.0
6+
speakeasyVersion: 1.285.1
7+
generationVersion: 2.326.3
8+
releaseVersion: 1.3.0
9+
configChecksum: 0a9d1b4e44889e99e7c91b60e8f0ce8e
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+
additionalDependencies: 0.1.0
16+
additionalProperties: 0.1.0
17+
core: 4.6.7
18+
deprecations: 2.81.1
19+
globalSecurityCallbacks: 0.1.0
20+
globalServerURLs: 2.82.2
21+
responseFormat: 0.1.0
22+
sdkHooks: 0.1.0
23+
generatedFiles:
24+
- src/epilot/sdkconfiguration.py
25+
- src/epilot/submissions.py
26+
- src/epilot/sdk.py
27+
- py.typed
28+
- pylintrc
29+
- setup.py
30+
- src/epilot/__init__.py
31+
- src/epilot/utils/__init__.py
32+
- src/epilot/utils/retries.py
33+
- src/epilot/utils/utils.py
34+
- src/epilot/models/errors/sdkerror.py
35+
- src/epilot/models/operations/createsubmission.py
36+
- src/epilot/models/components/httpmetadata.py
37+
- src/epilot/models/components/submissionpayload.py
38+
- src/epilot/models/components/optin.py
39+
- src/epilot/models/components/submissionentity.py
40+
- src/epilot/models/components/s3reference.py
41+
- src/epilot/models/__init__.py
42+
- src/epilot/models/errors/__init__.py
43+
- src/epilot/models/operations/__init__.py
44+
- src/epilot/models/components/__init__.py
45+
- docs/models/operations/createsubmissionresponse.md
46+
- docs/models/components/httpmetadata.md
47+
- docs/models/components/submissionpayload.md
48+
- docs/models/components/optin.md
49+
- docs/models/components/schema.md
50+
- docs/models/components/files.md
51+
- docs/models/components/submissionentity.md
52+
- docs/models/components/s3reference.md
53+
- docs/sdks/epilot/README.md
54+
- docs/sdks/submissions/README.md
55+
- USAGE.md
56+
- .gitattributes
57+
- src/epilot/_hooks/sdkhooks.py
58+
- src/epilot/_hooks/types.py
59+
- src/epilot/_hooks/__init__.py

submission/README.md

+249-45
Original file line numberDiff line numberDiff line change
@@ -1,76 +1,280 @@
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

19-
20-
req = shared.SubmissionPayload(
21-
ivy_opportunity_ids=[
22-
"deserunt",
23-
"porro",
24-
"nulla",
22+
res = s.submissions.create_submission(request=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+
),
2546
],
47+
organization_id='123',
48+
source_id='ce99875f-fba9-4fe2-a8f9-afaf52059051',
49+
source_type='journey',
50+
journey_submit_id='123',
51+
opt_ins=[
52+
components.OptIn(
53+
identifier='[email protected]',
54+
topic='EMAIL_MARKETING',
55+
),
56+
],
57+
))
58+
59+
if res is not None:
60+
# handle response
61+
pass
62+
63+
```
64+
<!-- End SDK Example Usage [usage] -->
65+
66+
<!-- Start Available Resources and Operations [operations] -->
67+
## Available Resources and Operations
68+
69+
### [submissions](docs/sdks/submissions/README.md)
70+
71+
* [create_submission](docs/sdks/submissions/README.md#create_submission) - createSubmission
72+
<!-- End Available Resources and Operations [operations] -->
73+
74+
<!-- Start Error Handling [errors] -->
75+
## Error Handling
76+
77+
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.
78+
79+
| Error Object | Status Code | Content Type |
80+
| --------------- | --------------- | --------------- |
81+
| errors.SDKError | 4xx-5xx | */* |
82+
83+
### Example
84+
85+
```python
86+
import epilot
87+
from epilot.models import components, errors
88+
89+
s = epilot.Epilot()
90+
91+
res = None
92+
try:
93+
res = s.submissions.create_submission(request=components.SubmissionPayload(
2694
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-
},
95+
components.SubmissionEntity(
96+
schema=components.Schema.SUBMISSION,
97+
additional_properties={
98+
'_schema': 'submission',
99+
'description': 'Submission created via API',
100+
'contact_first_name': 'First',
101+
'contact_last_name': 'Last',
102+
'contact_email': '[email protected]',
103+
'request': 'I would like to know more about electric vehicles',
104+
'files': '<value>',
105+
},
106+
description='Submission created via API',
107+
files=[
108+
components.Files(
109+
s3ref=components.S3Reference(
110+
bucket='epilot-user-content',
111+
key='temp/123/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf',
112+
),
113+
filename='document.pdf',
114+
),
115+
],
116+
),
43117
],
44-
journey_submit_id="123",
118+
organization_id='123',
119+
source_id='ce99875f-fba9-4fe2-a8f9-afaf52059051',
120+
source_type='journey',
121+
journey_submit_id='123',
45122
opt_ins=[
46-
shared.OptIn(
47-
identifier="[email protected]",
48-
meta={
49-
"dicta": "est",
50-
"voluptatem": "consequatur",
123+
components.OptIn(
124+
identifier='[email protected]',
125+
topic='EMAIL_MARKETING',
126+
),
127+
],
128+
))
129+
except errors.SDKError as e:
130+
# handle exception
131+
raise(e)
132+
133+
if res is not None:
134+
# handle response
135+
pass
136+
137+
```
138+
<!-- End Error Handling [errors] -->
139+
140+
<!-- Start Server Selection [server] -->
141+
## Server Selection
142+
143+
### Select Server by Index
144+
145+
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:
146+
147+
| # | Server | Variables |
148+
| - | ------ | --------- |
149+
| 0 | `https://submission.sls.epilot.io` | None |
150+
151+
#### Example
152+
153+
```python
154+
import epilot
155+
from epilot.models import components
156+
157+
s = epilot.Epilot(
158+
server_idx=0,
159+
)
160+
161+
res = s.submissions.create_submission(request=components.SubmissionPayload(
162+
entities=[
163+
components.SubmissionEntity(
164+
schema=components.Schema.SUBMISSION,
165+
additional_properties={
166+
'_schema': 'submission',
167+
'description': 'Submission created via API',
168+
'contact_first_name': 'First',
169+
'contact_last_name': 'Last',
170+
'contact_email': '[email protected]',
171+
'request': 'I would like to know more about electric vehicles',
172+
'files': '<value>',
51173
},
52-
topic="EMAIL_MARKETING",
174+
description='Submission created via API',
175+
files=[
176+
components.Files(
177+
s3ref=components.S3Reference(
178+
bucket='epilot-user-content',
179+
key='temp/123/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf',
180+
),
181+
filename='document.pdf',
182+
),
183+
],
53184
),
54185
],
55-
organization_id="123",
56-
source_id="ce99875f-fba9-4fe2-a8f9-afaf52059051",
57-
source_type="journey",
186+
organization_id='123',
187+
source_id='ce99875f-fba9-4fe2-a8f9-afaf52059051',
188+
source_type='journey',
189+
journey_submit_id='123',
190+
opt_ins=[
191+
components.OptIn(
192+
identifier='[email protected]',
193+
topic='EMAIL_MARKETING',
194+
),
195+
],
196+
))
197+
198+
if res is not None:
199+
# handle response
200+
pass
201+
202+
```
203+
204+
205+
### Override Server URL Per-Client
206+
207+
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:
208+
```python
209+
import epilot
210+
from epilot.models import components
211+
212+
s = epilot.Epilot(
213+
server_url="https://submission.sls.epilot.io",
58214
)
59-
60-
res = s.submissions.create_submission(req)
61215

62-
if res.status_code == 200:
216+
res = s.submissions.create_submission(request=components.SubmissionPayload(
217+
entities=[
218+
components.SubmissionEntity(
219+
schema=components.Schema.SUBMISSION,
220+
additional_properties={
221+
'_schema': 'submission',
222+
'description': 'Submission created via API',
223+
'contact_first_name': 'First',
224+
'contact_last_name': 'Last',
225+
'contact_email': '[email protected]',
226+
'request': 'I would like to know more about electric vehicles',
227+
'files': '<value>',
228+
},
229+
description='Submission created via API',
230+
files=[
231+
components.Files(
232+
s3ref=components.S3Reference(
233+
bucket='epilot-user-content',
234+
key='temp/123/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf',
235+
),
236+
filename='document.pdf',
237+
),
238+
],
239+
),
240+
],
241+
organization_id='123',
242+
source_id='ce99875f-fba9-4fe2-a8f9-afaf52059051',
243+
source_type='journey',
244+
journey_submit_id='123',
245+
opt_ins=[
246+
components.OptIn(
247+
identifier='[email protected]',
248+
topic='EMAIL_MARKETING',
249+
),
250+
],
251+
))
252+
253+
if res is not None:
63254
# handle response
255+
pass
256+
64257
```
65-
<!-- End SDK Example Usage -->
258+
<!-- End Server Selection [server] -->
259+
260+
<!-- Start Custom HTTP Client [http-client] -->
261+
## Custom HTTP Client
262+
263+
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.
66264

67-
<!-- Start SDK Available Operations -->
68-
## SDK Available Operations
265+
For example, you could specify a header for every request that this sdk makes as follows:
266+
```python
267+
import epilot
268+
import requests
269+
270+
http_client = requests.Session()
271+
http_client.headers.update({'x-custom-header': 'someValue'})
272+
s = epilot.Epilot(client=http_client)
273+
```
274+
<!-- End Custom HTTP Client [http-client] -->
69275

276+
<!-- Placeholder for Future Speakeasy SDK Sections -->
70277

71-
### submissions
72278

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

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

0 commit comments

Comments
 (0)