Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: speakeasy sdk regeneration - Generate Notification SDK #62

Open
wants to merge 83 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
83 commits
Select commit Hold shift + click to select a range
6c8a791
ci: regenerated with OpenAPI Doc 1.0.0, Speakeay CLI 1.19.3
speakeasybot Apr 1, 2023
2f2e169
ci: regenerated with OpenAPI Doc 1.0.0, Speakeay CLI 1.19.6
speakeasybot Apr 6, 2023
5d44d28
ci: regenerated with OpenAPI Doc 1.0.0, Speakeay CLI 1.19.7
speakeasybot Apr 12, 2023
4c0595f
ci: regenerated with OpenAPI Doc 1.0.0, Speakeay CLI 1.20.0
speakeasybot Apr 14, 2023
6094b0c
ci: regenerated with OpenAPI Doc 1.0.0, Speakeay CLI 1.20.1
speakeasybot Apr 18, 2023
e2f80d3
ci: regenerated with OpenAPI Doc 1.0.0, Speakeay CLI 1.20.2
speakeasybot Apr 19, 2023
df56f92
ci: regenerated with OpenAPI Doc 1.0.0, Speakeay CLI 1.21.4
speakeasybot Apr 21, 2023
9ec098d
ci: regenerated with OpenAPI Doc 1.0.0, Speakeay CLI 1.22.1
speakeasybot Apr 22, 2023
8d909c9
ci: regenerated with OpenAPI Doc 1.0.0, Speakeay CLI 1.23.1
speakeasybot Apr 26, 2023
1526e91
ci: regenerated with OpenAPI Doc 1.0.0, Speakeay CLI 1.25.1
speakeasybot Apr 27, 2023
d0ee829
ci: regenerated with OpenAPI Doc 1.0.0, Speakeay CLI 1.26.2
speakeasybot Apr 28, 2023
9c77160
ci: regenerated with OpenAPI Doc 1.0.0, Speakeay CLI 1.26.4
speakeasybot Apr 29, 2023
e86103d
ci: regenerated with OpenAPI Doc 1.0.0, Speakeay CLI 1.26.5
speakeasybot May 2, 2023
4f1be43
ci: regenerated with OpenAPI Doc 1.0.0, Speakeay CLI 1.27.0
speakeasybot May 3, 2023
ccb665f
ci: regenerated with OpenAPI Doc 1.0.0, Speakeay CLI 1.29.0
speakeasybot May 5, 2023
30434fd
ci: regenerated with OpenAPI Doc 1.0.0, Speakeay CLI 1.29.1
speakeasybot May 6, 2023
d43bc7f
ci: regenerated with OpenAPI Doc 1.0.0, Speakeay CLI 1.29.2
speakeasybot May 10, 2023
fec88dc
ci: regenerated with OpenAPI Doc 1.0.0, Speakeay CLI 1.30.0
speakeasybot May 11, 2023
87fcdfc
ci: regenerated with OpenAPI Doc 1.0.0, Speakeay CLI 1.30.1
speakeasybot May 12, 2023
8428e82
ci: regenerated with OpenAPI Doc 1.0.0, Speakeay CLI 1.31.1
speakeasybot May 13, 2023
4876ad2
ci: regenerated with OpenAPI Doc 1.0.0, Speakeay CLI 1.32.0
speakeasybot May 16, 2023
c05ca3b
ci: regenerated with OpenAPI Doc 1.0.0, Speakeay CLI 1.33.2
speakeasybot May 17, 2023
ef26f9e
ci: regenerated with OpenAPI Doc 1.0.0, Speakeay CLI 1.34.0
speakeasybot May 18, 2023
5819664
ci: regenerated with OpenAPI Doc 1.0.0, Speakeay CLI 1.35.0
speakeasybot May 19, 2023
5e1d4df
ci: regenerated with OpenAPI Doc 1.0.0, Speakeay CLI 1.37.5
speakeasybot May 23, 2023
d0b9ecc
ci: regenerated with OpenAPI Doc 1.0.0, Speakeay CLI 1.39.0
speakeasybot May 27, 2023
d3cebf5
ci: regenerated with OpenAPI Doc 1.0.0, Speakeay CLI 1.40.2
speakeasybot Jun 1, 2023
3741bc3
ci: regenerated with OpenAPI Doc 1.0.0, Speakeay CLI 1.40.3
speakeasybot Jun 2, 2023
38fc586
ci: regenerated with OpenAPI Doc 1.0.0, Speakeay CLI 1.43.0
speakeasybot Jun 3, 2023
52ac0c0
ci: regenerated with OpenAPI Doc 1.0.0, Speakeay CLI 1.44.2
speakeasybot Jun 7, 2023
de15c23
ci: regenerated with OpenAPI Doc 1.0.0, Speakeay CLI 1.45.0
speakeasybot Jun 8, 2023
de3b74e
ci: regenerated with OpenAPI Doc 1.0.0, Speakeay CLI 1.45.2
speakeasybot Jun 9, 2023
0e23418
ci: regenerated with OpenAPI Doc 1.0.0, Speakeay CLI 1.47.0
speakeasybot Jun 10, 2023
afebdcc
ci: regenerated with OpenAPI Doc 1.0.0, Speakeay CLI 1.47.1
speakeasybot Jun 11, 2023
70fc970
ci: regenerated with OpenAPI Doc 1.0.0, Speakeay CLI 1.47.3
speakeasybot Jun 14, 2023
ec6ab0f
ci: regenerated with OpenAPI Doc 1.0.0, Speakeay CLI 1.48.0
speakeasybot Jun 16, 2023
7c4d78f
ci: regenerated with OpenAPI Doc 1.0.0, Speakeay CLI 1.49.0
speakeasybot Jun 20, 2023
3ed1c0c
ci: regenerated with OpenAPI Doc 1.0.0, Speakeay CLI 1.49.1
speakeasybot Jun 21, 2023
9e66bfd
ci: regenerated with OpenAPI Doc 1.0.0, Speakeay CLI 1.50.1
speakeasybot Jun 23, 2023
712bcbc
ci: regenerated with OpenAPI Doc 1.0.0, Speakeay CLI 1.51.1
speakeasybot Jun 27, 2023
4215de0
ci: regenerated with OpenAPI Doc 1.0.0, Speakeay CLI 1.51.3
speakeasybot Jun 29, 2023
f878258
ci: regenerated with OpenAPI Doc 1.0.0, Speakeay CLI 1.52.0
speakeasybot Jul 1, 2023
4578d13
ci: regenerated with OpenAPI Doc 1.0.0, Speakeay CLI 1.52.2
speakeasybot Jul 6, 2023
4dc7208
ci: regenerated with OpenAPI Doc 1.0.0, Speakeay CLI 1.53.0
speakeasybot Jul 7, 2023
6e81206
ci: regenerated with OpenAPI Doc 1.0.0, Speakeay CLI 1.53.1
speakeasybot Jul 8, 2023
7f4f89e
ci: regenerated with OpenAPI Doc 1.0.0, Speakeay CLI 1.56.0
speakeasybot Jul 11, 2023
f7652a2
ci: regenerated with OpenAPI Doc 1.0.0, Speakeay CLI 1.56.4
speakeasybot Jul 12, 2023
d138224
ci: regenerated with OpenAPI Doc 1.0.0, Speakeay CLI 1.57.0
speakeasybot Jul 13, 2023
d2c6df4
ci: regenerated with OpenAPI Doc 1.0.0, Speakeay CLI 1.59.0
speakeasybot Jul 14, 2023
7aba8bf
ci: regenerated with OpenAPI Doc 1.0.0, Speakeay CLI 1.60.0
speakeasybot Jul 17, 2023
3a849f7
ci: regenerated with OpenAPI Doc 1.0.0, Speakeay CLI 1.61.0
speakeasybot Jul 18, 2023
19f0490
ci: regenerated with OpenAPI Doc 1.0.0, Speakeay CLI 1.62.1
speakeasybot Jul 19, 2023
07d3b44
ci: regenerated with OpenAPI Doc 1.0.0, Speakeay CLI 1.64.0
speakeasybot Jul 22, 2023
2a8c270
ci: regenerated with OpenAPI Doc 1.0.0, Speakeay CLI 1.65.0
speakeasybot Jul 26, 2023
389afe3
ci: regenerated with OpenAPI Doc 1.0.0, Speakeay CLI 1.65.1
speakeasybot Jul 27, 2023
2676321
ci: regenerated with OpenAPI Doc 1.0.0, Speakeay CLI 1.65.2
speakeasybot Jul 28, 2023
258be9f
ci: regenerated with OpenAPI Doc 1.0.0, Speakeay CLI 1.66.1
speakeasybot Aug 1, 2023
56e74c6
ci: regenerated with OpenAPI Doc 1.0.0, Speakeay CLI 1.68.1
speakeasybot Aug 3, 2023
d02f5b3
ci: regenerated with OpenAPI Doc 1.0.0, Speakeay CLI 1.68.3
speakeasybot Aug 4, 2023
f90b9c8
ci: regenerated with OpenAPI Doc 1.0.0, Speakeay CLI 1.69.1
speakeasybot Aug 8, 2023
fc625c9
ci: regenerated with OpenAPI Doc 1.0.0, Speakeay CLI 1.72.0
speakeasybot Aug 15, 2023
a3e6eb0
ci: regenerated with OpenAPI Doc 1.0.0, Speakeay CLI 1.74.3
speakeasybot Aug 19, 2023
f60dfb9
ci: regenerated with OpenAPI Doc 1.0.0, Speakeay CLI 1.74.11
speakeasybot Aug 25, 2023
68b8191
ci: regenerated with OpenAPI Doc 1.0.0, Speakeay CLI 1.74.16
speakeasybot Aug 26, 2023
70ff825
ci: regenerated with OpenAPI Doc 1.0.0, Speakeay CLI 1.74.17
speakeasybot Aug 29, 2023
ff2938f
ci: regenerated with OpenAPI Doc 1.0.0, Speakeay CLI 1.76.1
speakeasybot Aug 31, 2023
7e75ee4
ci: regenerated with OpenAPI Doc 1.0.0, Speakeay CLI 1.77.0
speakeasybot Sep 1, 2023
5718da8
ci: regenerated with OpenAPI Doc 1.0.0, Speakeay CLI 1.77.2
speakeasybot Sep 2, 2023
a1aa2e5
ci: regenerated with OpenAPI Doc 1.0.0, Speakeay CLI 1.78.3
speakeasybot Sep 5, 2023
c54b81b
ci: regenerated with OpenAPI Doc 1.0.0, Speakeay CLI 1.82.5
speakeasybot Sep 12, 2023
51ee79d
ci: regenerated with OpenAPI Doc 1.0.0, Speakeay CLI 1.86.0
speakeasybot Sep 16, 2023
64f73dc
ci: regenerated with OpenAPI Doc 1.0.0, Speakeay CLI 1.88.0
speakeasybot Sep 20, 2023
a64de49
ci: regenerated with OpenAPI Doc 1.0.0, Speakeay CLI 1.91.0
speakeasybot Sep 26, 2023
9885ddb
ci: regenerated with OpenAPI Doc 1.0.0, Speakeay CLI 1.91.2
speakeasybot Sep 27, 2023
9f06a00
ci: regenerated with OpenAPI Doc 1.0.0, Speakeay CLI 1.91.3
speakeasybot Sep 29, 2023
1394f4b
ci: regenerated with OpenAPI Doc 1.0.0, Speakeay CLI 1.92.2
speakeasybot Oct 1, 2023
383384c
ci: regenerated with OpenAPI Doc 1.0.0, Speakeay CLI 1.92.3
speakeasybot Oct 2, 2023
7c4f59b
ci: regenerated with OpenAPI Doc 1.0.0, Speakeay CLI 1.94.0
speakeasybot Oct 5, 2023
d6ba359
ci: regenerated with OpenAPI Doc 1.0.0, Speakeay CLI 1.96.1
speakeasybot Oct 7, 2023
0135e31
ci: regenerated with OpenAPI Doc 1.0.0, Speakeay CLI 1.99.1
speakeasybot Oct 13, 2023
51b8d6f
ci: regenerated with OpenAPI Doc 1.0.0, Speakeay CLI 1.101.0
speakeasybot Oct 18, 2023
8ec2de0
ci: regenerated with OpenAPI Doc 1.0.0, Speakeay CLI 1.104.0
speakeasybot Oct 21, 2023
9cc1e14
ci: regenerated with OpenAPI Doc 1.0.0, Speakeay CLI 1.109.0
speakeasybot Oct 28, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions notification/.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
7 changes: 7 additions & 0 deletions notification/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.python-version
.DS_Store
venv/
src/*.egg-info/
__pycache__/
.pytest_cache/
.python-version`
310 changes: 294 additions & 16 deletions notification/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,40 +12,318 @@ pip install git+https://github.com/epilot-dev/sdk-python.git#subdirectory=notifi
<!-- Start SDK Example Usage -->
```python
import epilot
from epilot.models import operations, shared
from epilot.models import shared

s = epilot.Epilot(
security=shared.Security(
epilot_auth="Bearer YOUR_BEARER_TOKEN_HERE",
epilot_auth="",
),
)

req = shared.Notification(
additional_properties={
"key": 'string',
},
caller=shared.NotificationCallerContext(
additional_properties={
"key": 'string',
},
epilot_auth=shared.NotificationCallerContextEpilotAuth(
token=shared.NotificationCallerContextEpilotAuthToken(
cognito_username='[email protected]',
custom_ivy_user_id='10006129',
email='[email protected]',
sub='476e9b48-42f4-4234-a2b0-4668b34626ce',
),
),
),
force_notify_users={
"12345": 'string',
},
message=shared.NotificationMessage(
de='{{caller}} habe etwas damit gemacht {{contact.entity.id}} {{branch.name}}.',
en='{{caller}} did something with {{contact.entity.id}} {{branch.name}}.',
),
operations=[
shared.EntityOperation(
entity='d9fa50df-3a77-4db4-9782-9e5cd1039cd9',
operation='updateEntity',
params=shared.EntityOperationParams(
slug='contact',
),
payload={
"status": 'string',
"_schema": 'string',
"_org": 'string',
},
),
],
organization_id='206801',
payload={
"entity": 'string',
},
redirect_url='https://epilot.cloud',
title=shared.NotificationTitle(
de='Meine benutzerdefinierte Aktivität',
en='My custom notification',
),
type='workflow',
visibility_user_ids=[
'1',
'2',
'3',
'4',
'5',
],
)

req = {
"deserunt": "porro",
"nulla": "id",
"vero": "perspiciatis",
}

res = s.notification.create_notification(req)

if res.status_code == 200:
# handle response
pass
```
<!-- End SDK Example Usage -->

<!-- Start SDK Available Operations -->
## SDK Available Operations
## Available Resources and Operations


### notification
### [notification](docs/sdks/notification/README.md)

* `create_notification` - createNotification
* `get_notification` - getNotification
* `get_notifications` - getNotifications
* `get_total_unread` - getTotalUnread
* `mark_all_as_read` - markAllAsRead
* `mark_as_read` - markAsRead
* [create_notification](docs/sdks/notification/README.md#create_notification) - createNotification
* [get_notification](docs/sdks/notification/README.md#get_notification) - getNotification
* [get_notifications](docs/sdks/notification/README.md#get_notifications) - getNotifications
* [get_total_unread](docs/sdks/notification/README.md#get_total_unread) - getTotalUnread
* [mark_all_as_read](docs/sdks/notification/README.md#mark_all_as_read) - markAllAsRead
* [mark_as_read](docs/sdks/notification/README.md#mark_as_read) - markAsRead
<!-- End SDK Available Operations -->



<!-- Start Dev Containers -->

<!-- End Dev Containers -->



<!-- Start Pagination -->
# Pagination

Some of the endpoints in this SDK support pagination. To use pagination, you make your SDK calls as usual, but the
returned response object will have a `Next` method that can be called to pull down the next group of results. If the
return value of `Next` is `None`, then there are no more pages to be fetched.

Here's an example of one such pagination call:
<!-- End Pagination -->



<!-- Start Error Handling -->
# Error Handling

Handling errors in your 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.


<!-- End Error Handling -->



<!-- Start Server Selection -->
# 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://notification.sls.epilot.io` | None |

For example:


```python
import epilot
from epilot.models import shared

s = epilot.Epilot(
security=shared.Security(
epilot_auth="",
),
server_idx=0
)

req = shared.Notification(
additional_properties={
"key": 'string',
},
caller=shared.NotificationCallerContext(
additional_properties={
"key": 'string',
},
epilot_auth=shared.NotificationCallerContextEpilotAuth(
token=shared.NotificationCallerContextEpilotAuthToken(
cognito_username='[email protected]',
custom_ivy_user_id='10006129',
email='[email protected]',
sub='476e9b48-42f4-4234-a2b0-4668b34626ce',
),
),
),
force_notify_users={
"12345": 'string',
},
message=shared.NotificationMessage(
de='{{caller}} habe etwas damit gemacht {{contact.entity.id}} {{branch.name}}.',
en='{{caller}} did something with {{contact.entity.id}} {{branch.name}}.',
),
operations=[
shared.EntityOperation(
entity='d9fa50df-3a77-4db4-9782-9e5cd1039cd9',
operation='updateEntity',
params=shared.EntityOperationParams(
slug='contact',
),
payload={
"_schema": 'string',
"_org": 'string',
"status": 'string',
},
),
],
organization_id='206801',
payload={
"entity": 'string',
},
redirect_url='https://epilot.cloud',
title=shared.NotificationTitle(
de='Meine benutzerdefinierte Aktivität',
en='My custom notification',
),
type='workflow',
visibility_user_ids=[
'1',
'2',
'3',
'4',
'5',
],
)

res = s.notification.create_notification(req)

if res.status_code == 200:
# 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 shared

s = epilot.Epilot(
security=shared.Security(
epilot_auth="",
),
server_url="https://notification.sls.epilot.io"
)

req = shared.Notification(
additional_properties={
"key": 'string',
},
caller=shared.NotificationCallerContext(
additional_properties={
"key": 'string',
},
epilot_auth=shared.NotificationCallerContextEpilotAuth(
token=shared.NotificationCallerContextEpilotAuthToken(
cognito_username='[email protected]',
custom_ivy_user_id='10006129',
email='[email protected]',
sub='476e9b48-42f4-4234-a2b0-4668b34626ce',
),
),
),
force_notify_users={
"12345": 'string',
},
message=shared.NotificationMessage(
de='{{caller}} habe etwas damit gemacht {{contact.entity.id}} {{branch.name}}.',
en='{{caller}} did something with {{contact.entity.id}} {{branch.name}}.',
),
operations=[
shared.EntityOperation(
entity='d9fa50df-3a77-4db4-9782-9e5cd1039cd9',
operation='updateEntity',
params=shared.EntityOperationParams(
slug='contact',
),
payload={
"_org": 'string',
"status": 'string',
"_schema": 'string',
},
),
],
organization_id='206801',
payload={
"entity": 'string',
},
redirect_url='https://epilot.cloud',
title=shared.NotificationTitle(
de='Meine benutzerdefinierte Aktivität',
en='My custom notification',
),
type='workflow',
visibility_user_ids=[
'1',
'2',
'3',
'4',
'5',
],
)

res = s.notification.create_notification(req)

if res.status_code == 200:
# handle response
pass
```
<!-- End Server Selection -->



<!-- Start Custom 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.


For example, you could specify a header for every request that your 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 -->

<!-- Placeholder for Future Speakeasy SDK Sections -->



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