Skip to content

Commit d0305ef

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

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

+1722
-545
lines changed

Diff for: 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

Diff for: 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

Diff for: submission/.speakeasy/gen.lock

+56
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
lockVersion: 2.0.0
2+
id: 379b7531-e115-4c0b-a7bd-ffe3f1ab54a8
3+
management:
4+
docChecksum: 3e73a0b032d576778d71b4b1bce49714
5+
docVersion: 1.0.0
6+
speakeasyVersion: 1.280.1
7+
generationVersion: 2.322.5
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.7
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+
- src/epilot/models/operations/createsubmission.py
33+
- src/epilot/models/components/httpmetadata.py
34+
- src/epilot/models/components/submissionpayload.py
35+
- src/epilot/models/components/optin.py
36+
- src/epilot/models/components/submissionentity.py
37+
- src/epilot/models/components/s3reference.py
38+
- src/epilot/models/__init__.py
39+
- src/epilot/models/errors/__init__.py
40+
- src/epilot/models/operations/__init__.py
41+
- src/epilot/models/components/__init__.py
42+
- docs/models/operations/createsubmissionresponse.md
43+
- docs/models/components/httpmetadata.md
44+
- docs/models/components/submissionpayload.md
45+
- docs/models/components/optin.md
46+
- docs/models/components/schema.md
47+
- docs/models/components/files.md
48+
- docs/models/components/submissionentity.md
49+
- docs/models/components/s3reference.md
50+
- docs/sdks/epilot/README.md
51+
- docs/sdks/submissions/README.md
52+
- USAGE.md
53+
- .gitattributes
54+
- src/epilot/_hooks/sdkhooks.py
55+
- src/epilot/_hooks/types.py
56+
- src/epilot/_hooks/__init__.py

Diff for: submission/README.md

+255-43
Original file line numberDiff line numberDiff line change
@@ -1,76 +1,288 @@
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+
opt_ins=[
52+
components.OptIn(
53+
identifier='[email protected]',
54+
topic='EMAIL_MARKETING',
55+
),
56+
],
57+
)
58+
59+
res = s.submissions.create_submission(req)
60+
61+
if res is not None:
62+
# handle response
63+
pass
64+
65+
```
66+
<!-- End SDK Example Usage [usage] -->
67+
68+
<!-- Start Available Resources and Operations [operations] -->
69+
## Available Resources and Operations
70+
71+
### [submissions](docs/sdks/submissions/README.md)
72+
73+
* [create_submission](docs/sdks/submissions/README.md#create_submission) - createSubmission
74+
<!-- End Available Resources and Operations [operations] -->
75+
76+
<!-- Start Error Handling [errors] -->
77+
## Error Handling
78+
79+
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.
1980

20-
req = shared.SubmissionPayload(
21-
ivy_opportunity_ids=[
22-
"deserunt",
23-
"porro",
24-
"nulla",
81+
| Error Object | Status Code | Content Type |
82+
| --------------- | --------------- | --------------- |
83+
| errors.SDKError | 4xx-5xx | */* |
84+
85+
### Example
86+
87+
```python
88+
import epilot
89+
from epilot.models import components, errors
90+
91+
s = epilot.Epilot()
92+
93+
req = components.SubmissionPayload(
94+
entities=[
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+
),
25117
],
118+
organization_id='123',
119+
source_id='ce99875f-fba9-4fe2-a8f9-afaf52059051',
120+
source_type='journey',
121+
journey_submit_id='123',
122+
opt_ins=[
123+
components.OptIn(
124+
identifier='[email protected]',
125+
topic='EMAIL_MARKETING',
126+
),
127+
],
128+
)
129+
130+
res = None
131+
try:
132+
res = s.submissions.create_submission(req)
133+
except errors.SDKError as e:
134+
# handle exception
135+
raise(e)
136+
137+
if res is not None:
138+
# handle response
139+
pass
140+
141+
```
142+
<!-- End Error Handling [errors] -->
143+
144+
<!-- Start Server Selection [server] -->
145+
## Server Selection
146+
147+
### Select Server by Index
148+
149+
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:
150+
151+
| # | Server | Variables |
152+
| - | ------ | --------- |
153+
| 0 | `https://submission.sls.epilot.io` | None |
154+
155+
#### Example
156+
157+
```python
158+
import epilot
159+
from epilot.models import components
160+
161+
s = epilot.Epilot(
162+
server_idx=0,
163+
)
164+
165+
req = components.SubmissionPayload(
26166
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-
},
167+
components.SubmissionEntity(
168+
schema=components.Schema.SUBMISSION,
169+
additional_properties={
170+
'_schema': 'submission',
171+
'description': 'Submission created via API',
172+
'contact_first_name': 'First',
173+
'contact_last_name': 'Last',
174+
'contact_email': '[email protected]',
175+
'request': 'I would like to know more about electric vehicles',
176+
'files': '<value>',
177+
},
178+
description='Submission created via API',
179+
files=[
180+
components.Files(
181+
s3ref=components.S3Reference(
182+
bucket='epilot-user-content',
183+
key='temp/123/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf',
184+
),
185+
filename='document.pdf',
186+
),
187+
],
188+
),
43189
],
44-
journey_submit_id="123",
190+
organization_id='123',
191+
source_id='ce99875f-fba9-4fe2-a8f9-afaf52059051',
192+
source_type='journey',
193+
journey_submit_id='123',
45194
opt_ins=[
46-
shared.OptIn(
47-
identifier="[email protected]",
48-
meta={
49-
"dicta": "est",
50-
"voluptatem": "consequatur",
195+
components.OptIn(
196+
identifier='[email protected]',
197+
topic='EMAIL_MARKETING',
198+
),
199+
],
200+
)
201+
202+
res = s.submissions.create_submission(req)
203+
204+
if res is not None:
205+
# handle response
206+
pass
207+
208+
```
209+
210+
211+
### Override Server URL Per-Client
212+
213+
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:
214+
```python
215+
import epilot
216+
from epilot.models import components
217+
218+
s = epilot.Epilot(
219+
server_url="https://submission.sls.epilot.io",
220+
)
221+
222+
req = components.SubmissionPayload(
223+
entities=[
224+
components.SubmissionEntity(
225+
schema=components.Schema.SUBMISSION,
226+
additional_properties={
227+
'_schema': 'submission',
228+
'description': 'Submission created via API',
229+
'contact_first_name': 'First',
230+
'contact_last_name': 'Last',
231+
'contact_email': '[email protected]',
232+
'request': 'I would like to know more about electric vehicles',
233+
'files': '<value>',
51234
},
52-
topic="EMAIL_MARKETING",
235+
description='Submission created via API',
236+
files=[
237+
components.Files(
238+
s3ref=components.S3Reference(
239+
bucket='epilot-user-content',
240+
key='temp/123/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf',
241+
),
242+
filename='document.pdf',
243+
),
244+
],
245+
),
246+
],
247+
organization_id='123',
248+
source_id='ce99875f-fba9-4fe2-a8f9-afaf52059051',
249+
source_type='journey',
250+
journey_submit_id='123',
251+
opt_ins=[
252+
components.OptIn(
253+
identifier='[email protected]',
254+
topic='EMAIL_MARKETING',
53255
),
54256
],
55-
organization_id="123",
56-
source_id="ce99875f-fba9-4fe2-a8f9-afaf52059051",
57-
source_type="journey",
58257
)
59-
258+
60259
res = s.submissions.create_submission(req)
61260

62-
if res.status_code == 200:
261+
if res is not None:
63262
# handle response
263+
pass
264+
64265
```
65-
<!-- End SDK Example Usage -->
266+
<!-- End Server Selection [server] -->
267+
268+
<!-- Start Custom HTTP Client [http-client] -->
269+
## Custom HTTP Client
66270

67-
<!-- Start SDK Available Operations -->
68-
## SDK Available Operations
271+
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.
272+
273+
For example, you could specify a header for every request that this sdk makes as follows:
274+
```python
275+
import epilot
276+
import requests
277+
278+
http_client = requests.Session()
279+
http_client.headers.update({'x-custom-header': 'someValue'})
280+
s = epilot.Epilot(client=http_client)
281+
```
282+
<!-- End Custom HTTP Client [http-client] -->
69283

284+
<!-- Placeholder for Future Speakeasy SDK Sections -->
70285

71-
### submissions
72286

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

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

0 commit comments

Comments
 (0)