pingram-python 1.0.32__py3-none-any.whl → 1.0.33__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- pingram/__init__.py +7 -1
- pingram/api/__init__.py +1 -0
- pingram/api/account_api.py +3 -3
- pingram/api/sub_notifications_api.py +649 -0
- pingram/api_client.py +1 -1
- pingram/client_wrapper.py +15 -0
- pingram/configuration.py +1 -1
- pingram/models/__init__.py +2 -0
- pingram/models/sub_notification.py +93 -0
- pingram/models/sub_notification_put_request.py +87 -0
- {pingram_python-1.0.32.dist-info → pingram_python-1.0.33.dist-info}/METADATA +1 -1
- {pingram_python-1.0.32.dist-info → pingram_python-1.0.33.dist-info}/RECORD +15 -12
- {pingram_python-1.0.32.dist-info → pingram_python-1.0.33.dist-info}/WHEEL +0 -0
- {pingram_python-1.0.32.dist-info → pingram_python-1.0.33.dist-info}/licenses/LICENSE +0 -0
- {pingram_python-1.0.32.dist-info → pingram_python-1.0.33.dist-info}/top_level.txt +0 -0
pingram/__init__.py
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
""" # noqa: E501
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
__version__ = "1.0.
|
|
17
|
+
__version__ = "1.0.33"
|
|
18
18
|
|
|
19
19
|
# Define package exports
|
|
20
20
|
__all__ = [
|
|
@@ -38,6 +38,7 @@ __all__ = [
|
|
|
38
38
|
"RegistrationsApi",
|
|
39
39
|
"SenderApi",
|
|
40
40
|
"SmsApi",
|
|
41
|
+
"SubNotificationsApi",
|
|
41
42
|
"TemplatesApi",
|
|
42
43
|
"TypesApi",
|
|
43
44
|
"UserApi",
|
|
@@ -303,6 +304,8 @@ __all__ = [
|
|
|
303
304
|
"SenderPostResponse",
|
|
304
305
|
"SetDefaultTemplateRequest",
|
|
305
306
|
"SlackInteractivityResponse",
|
|
307
|
+
"SubNotification",
|
|
308
|
+
"SubNotificationPUTRequest",
|
|
306
309
|
"SuccessResponse",
|
|
307
310
|
"SupabaseConfigureRequest",
|
|
308
311
|
"SupabaseConfigureResponse",
|
|
@@ -366,6 +369,7 @@ from pingram.api.profile_api import ProfileApi as ProfileApi
|
|
|
366
369
|
from pingram.api.registrations_api import RegistrationsApi as RegistrationsApi
|
|
367
370
|
from pingram.api.sender_api import SenderApi as SenderApi
|
|
368
371
|
from pingram.api.sms_api import SmsApi as SmsApi
|
|
372
|
+
from pingram.api.sub_notifications_api import SubNotificationsApi as SubNotificationsApi
|
|
369
373
|
from pingram.api.templates_api import TemplatesApi as TemplatesApi
|
|
370
374
|
from pingram.api.types_api import TypesApi as TypesApi
|
|
371
375
|
from pingram.api.user_api import UserApi as UserApi
|
|
@@ -635,6 +639,8 @@ from pingram.models.sender_post_body_web_push import SenderPostBodyWebPush as Se
|
|
|
635
639
|
from pingram.models.sender_post_response import SenderPostResponse as SenderPostResponse
|
|
636
640
|
from pingram.models.set_default_template_request import SetDefaultTemplateRequest as SetDefaultTemplateRequest
|
|
637
641
|
from pingram.models.slack_interactivity_response import SlackInteractivityResponse as SlackInteractivityResponse
|
|
642
|
+
from pingram.models.sub_notification import SubNotification as SubNotification
|
|
643
|
+
from pingram.models.sub_notification_put_request import SubNotificationPUTRequest as SubNotificationPUTRequest
|
|
638
644
|
from pingram.models.success_response import SuccessResponse as SuccessResponse
|
|
639
645
|
from pingram.models.supabase_configure_request import SupabaseConfigureRequest as SupabaseConfigureRequest
|
|
640
646
|
from pingram.models.supabase_configure_response import SupabaseConfigureResponse as SupabaseConfigureResponse
|
pingram/api/__init__.py
CHANGED
|
@@ -21,6 +21,7 @@ from pingram.api.profile_api import ProfileApi
|
|
|
21
21
|
from pingram.api.registrations_api import RegistrationsApi
|
|
22
22
|
from pingram.api.sender_api import SenderApi
|
|
23
23
|
from pingram.api.sms_api import SmsApi
|
|
24
|
+
from pingram.api.sub_notifications_api import SubNotificationsApi
|
|
24
25
|
from pingram.api.templates_api import TemplatesApi
|
|
25
26
|
from pingram.api.types_api import TypesApi
|
|
26
27
|
from pingram.api.user_api import UserApi
|
pingram/api/account_api.py
CHANGED
|
@@ -2881,7 +2881,7 @@ class AccountApi:
|
|
|
2881
2881
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2882
2882
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2883
2883
|
) -> AccountGetResponse:
|
|
2884
|
-
"""Update account billing preferences
|
|
2884
|
+
"""Update account billing preferences such as auto upgrade.
|
|
2885
2885
|
|
|
2886
2886
|
|
|
2887
2887
|
:param account_patch_request: (required)
|
|
@@ -2952,7 +2952,7 @@ class AccountApi:
|
|
|
2952
2952
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2953
2953
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2954
2954
|
) -> ApiResponse[AccountGetResponse]:
|
|
2955
|
-
"""Update account billing preferences
|
|
2955
|
+
"""Update account billing preferences such as auto upgrade.
|
|
2956
2956
|
|
|
2957
2957
|
|
|
2958
2958
|
:param account_patch_request: (required)
|
|
@@ -3023,7 +3023,7 @@ class AccountApi:
|
|
|
3023
3023
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
3024
3024
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
3025
3025
|
) -> RESTResponseType:
|
|
3026
|
-
"""Update account billing preferences
|
|
3026
|
+
"""Update account billing preferences such as auto upgrade.
|
|
3027
3027
|
|
|
3028
3028
|
|
|
3029
3029
|
:param account_patch_request: (required)
|
|
@@ -0,0 +1,649 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Pingram
|
|
5
|
+
|
|
6
|
+
Internal API for notification delivery and management
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 1.0.0
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
import warnings
|
|
15
|
+
from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
|
|
16
|
+
from typing import Any, Dict, List, Optional, Tuple, Union
|
|
17
|
+
from typing_extensions import Annotated
|
|
18
|
+
|
|
19
|
+
from pydantic import Field, StrictStr
|
|
20
|
+
from typing_extensions import Annotated
|
|
21
|
+
from pingram.models.sub_notification import SubNotification
|
|
22
|
+
from pingram.models.sub_notification_put_request import SubNotificationPUTRequest
|
|
23
|
+
|
|
24
|
+
from pingram.api_client import ApiClient, RequestSerialized
|
|
25
|
+
from pingram.api_response import ApiResponse
|
|
26
|
+
from pingram.rest import RESTResponseType
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
class SubNotificationsApi:
|
|
30
|
+
"""NOTE: This class is auto generated by OpenAPI Generator
|
|
31
|
+
Ref: https://openapi-generator.tech
|
|
32
|
+
|
|
33
|
+
Do not edit the class manually.
|
|
34
|
+
"""
|
|
35
|
+
|
|
36
|
+
def __init__(self, api_client=None) -> None:
|
|
37
|
+
if api_client is None:
|
|
38
|
+
api_client = ApiClient.get_default()
|
|
39
|
+
self.api_client = api_client
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
@validate_call
|
|
43
|
+
async def sub_notifications_delete_sub_notification(
|
|
44
|
+
self,
|
|
45
|
+
notification_id: Annotated[StrictStr, Field(description="The notification ID")],
|
|
46
|
+
sub_notification_id: Annotated[StrictStr, Field(description="The sub-notification ID")],
|
|
47
|
+
_request_timeout: Union[
|
|
48
|
+
None,
|
|
49
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
50
|
+
Tuple[
|
|
51
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
52
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
53
|
+
]
|
|
54
|
+
] = None,
|
|
55
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
56
|
+
_content_type: Optional[StrictStr] = None,
|
|
57
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
58
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
59
|
+
) -> None:
|
|
60
|
+
"""This endpoint is no longer maintained and should not be used.
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
:param notification_id: The notification ID (required)
|
|
64
|
+
:type notification_id: str
|
|
65
|
+
:param sub_notification_id: The sub-notification ID (required)
|
|
66
|
+
:type sub_notification_id: str
|
|
67
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
68
|
+
number provided, it will be total request
|
|
69
|
+
timeout. It can also be a pair (tuple) of
|
|
70
|
+
(connection, read) timeouts.
|
|
71
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
72
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
73
|
+
request; this effectively ignores the
|
|
74
|
+
authentication in the spec for a single request.
|
|
75
|
+
:type _request_auth: dict, optional
|
|
76
|
+
:param _content_type: force content-type for the request.
|
|
77
|
+
:type _content_type: str, Optional
|
|
78
|
+
:param _headers: set to override the headers for a single
|
|
79
|
+
request; this effectively ignores the headers
|
|
80
|
+
in the spec for a single request.
|
|
81
|
+
:type _headers: dict, optional
|
|
82
|
+
:param _host_index: set to override the host_index for a single
|
|
83
|
+
request; this effectively ignores the host_index
|
|
84
|
+
in the spec for a single request.
|
|
85
|
+
:type _host_index: int, optional
|
|
86
|
+
:return: Returns the result object.
|
|
87
|
+
""" # noqa: E501
|
|
88
|
+
|
|
89
|
+
_param = self._sub_notifications_delete_sub_notification_serialize(
|
|
90
|
+
notification_id=notification_id,
|
|
91
|
+
sub_notification_id=sub_notification_id,
|
|
92
|
+
_request_auth=_request_auth,
|
|
93
|
+
_content_type=_content_type,
|
|
94
|
+
_headers=_headers,
|
|
95
|
+
_host_index=_host_index
|
|
96
|
+
)
|
|
97
|
+
|
|
98
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
99
|
+
'204': None,
|
|
100
|
+
'400': "ApiErrorResponse",
|
|
101
|
+
'401': None,
|
|
102
|
+
'402': "ApiErrorResponse",
|
|
103
|
+
'500': None,
|
|
104
|
+
'502': "ApiErrorResponse",
|
|
105
|
+
}
|
|
106
|
+
response_data = await self.api_client.call_api(
|
|
107
|
+
*_param,
|
|
108
|
+
_request_timeout=_request_timeout
|
|
109
|
+
)
|
|
110
|
+
await response_data.read()
|
|
111
|
+
return self.api_client.response_deserialize(
|
|
112
|
+
response_data=response_data,
|
|
113
|
+
response_types_map=_response_types_map,
|
|
114
|
+
).data
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
@validate_call
|
|
118
|
+
async def sub_notifications_delete_sub_notification_with_http_info(
|
|
119
|
+
self,
|
|
120
|
+
notification_id: Annotated[StrictStr, Field(description="The notification ID")],
|
|
121
|
+
sub_notification_id: Annotated[StrictStr, Field(description="The sub-notification ID")],
|
|
122
|
+
_request_timeout: Union[
|
|
123
|
+
None,
|
|
124
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
125
|
+
Tuple[
|
|
126
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
127
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
128
|
+
]
|
|
129
|
+
] = None,
|
|
130
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
131
|
+
_content_type: Optional[StrictStr] = None,
|
|
132
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
133
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
134
|
+
) -> ApiResponse[None]:
|
|
135
|
+
"""This endpoint is no longer maintained and should not be used.
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
:param notification_id: The notification ID (required)
|
|
139
|
+
:type notification_id: str
|
|
140
|
+
:param sub_notification_id: The sub-notification ID (required)
|
|
141
|
+
:type sub_notification_id: str
|
|
142
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
143
|
+
number provided, it will be total request
|
|
144
|
+
timeout. It can also be a pair (tuple) of
|
|
145
|
+
(connection, read) timeouts.
|
|
146
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
147
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
148
|
+
request; this effectively ignores the
|
|
149
|
+
authentication in the spec for a single request.
|
|
150
|
+
:type _request_auth: dict, optional
|
|
151
|
+
:param _content_type: force content-type for the request.
|
|
152
|
+
:type _content_type: str, Optional
|
|
153
|
+
:param _headers: set to override the headers for a single
|
|
154
|
+
request; this effectively ignores the headers
|
|
155
|
+
in the spec for a single request.
|
|
156
|
+
:type _headers: dict, optional
|
|
157
|
+
:param _host_index: set to override the host_index for a single
|
|
158
|
+
request; this effectively ignores the host_index
|
|
159
|
+
in the spec for a single request.
|
|
160
|
+
:type _host_index: int, optional
|
|
161
|
+
:return: Returns the result object.
|
|
162
|
+
""" # noqa: E501
|
|
163
|
+
|
|
164
|
+
_param = self._sub_notifications_delete_sub_notification_serialize(
|
|
165
|
+
notification_id=notification_id,
|
|
166
|
+
sub_notification_id=sub_notification_id,
|
|
167
|
+
_request_auth=_request_auth,
|
|
168
|
+
_content_type=_content_type,
|
|
169
|
+
_headers=_headers,
|
|
170
|
+
_host_index=_host_index
|
|
171
|
+
)
|
|
172
|
+
|
|
173
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
174
|
+
'204': None,
|
|
175
|
+
'400': "ApiErrorResponse",
|
|
176
|
+
'401': None,
|
|
177
|
+
'402': "ApiErrorResponse",
|
|
178
|
+
'500': None,
|
|
179
|
+
'502': "ApiErrorResponse",
|
|
180
|
+
}
|
|
181
|
+
response_data = await self.api_client.call_api(
|
|
182
|
+
*_param,
|
|
183
|
+
_request_timeout=_request_timeout
|
|
184
|
+
)
|
|
185
|
+
await response_data.read()
|
|
186
|
+
return self.api_client.response_deserialize(
|
|
187
|
+
response_data=response_data,
|
|
188
|
+
response_types_map=_response_types_map,
|
|
189
|
+
)
|
|
190
|
+
|
|
191
|
+
|
|
192
|
+
@validate_call
|
|
193
|
+
async def sub_notifications_delete_sub_notification_without_preload_content(
|
|
194
|
+
self,
|
|
195
|
+
notification_id: Annotated[StrictStr, Field(description="The notification ID")],
|
|
196
|
+
sub_notification_id: Annotated[StrictStr, Field(description="The sub-notification ID")],
|
|
197
|
+
_request_timeout: Union[
|
|
198
|
+
None,
|
|
199
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
200
|
+
Tuple[
|
|
201
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
202
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
203
|
+
]
|
|
204
|
+
] = None,
|
|
205
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
206
|
+
_content_type: Optional[StrictStr] = None,
|
|
207
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
208
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
209
|
+
) -> RESTResponseType:
|
|
210
|
+
"""This endpoint is no longer maintained and should not be used.
|
|
211
|
+
|
|
212
|
+
|
|
213
|
+
:param notification_id: The notification ID (required)
|
|
214
|
+
:type notification_id: str
|
|
215
|
+
:param sub_notification_id: The sub-notification ID (required)
|
|
216
|
+
:type sub_notification_id: str
|
|
217
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
218
|
+
number provided, it will be total request
|
|
219
|
+
timeout. It can also be a pair (tuple) of
|
|
220
|
+
(connection, read) timeouts.
|
|
221
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
222
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
223
|
+
request; this effectively ignores the
|
|
224
|
+
authentication in the spec for a single request.
|
|
225
|
+
:type _request_auth: dict, optional
|
|
226
|
+
:param _content_type: force content-type for the request.
|
|
227
|
+
:type _content_type: str, Optional
|
|
228
|
+
:param _headers: set to override the headers for a single
|
|
229
|
+
request; this effectively ignores the headers
|
|
230
|
+
in the spec for a single request.
|
|
231
|
+
:type _headers: dict, optional
|
|
232
|
+
:param _host_index: set to override the host_index for a single
|
|
233
|
+
request; this effectively ignores the host_index
|
|
234
|
+
in the spec for a single request.
|
|
235
|
+
:type _host_index: int, optional
|
|
236
|
+
:return: Returns the result object.
|
|
237
|
+
""" # noqa: E501
|
|
238
|
+
|
|
239
|
+
_param = self._sub_notifications_delete_sub_notification_serialize(
|
|
240
|
+
notification_id=notification_id,
|
|
241
|
+
sub_notification_id=sub_notification_id,
|
|
242
|
+
_request_auth=_request_auth,
|
|
243
|
+
_content_type=_content_type,
|
|
244
|
+
_headers=_headers,
|
|
245
|
+
_host_index=_host_index
|
|
246
|
+
)
|
|
247
|
+
|
|
248
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
249
|
+
'204': None,
|
|
250
|
+
'400': "ApiErrorResponse",
|
|
251
|
+
'401': None,
|
|
252
|
+
'402': "ApiErrorResponse",
|
|
253
|
+
'500': None,
|
|
254
|
+
'502': "ApiErrorResponse",
|
|
255
|
+
}
|
|
256
|
+
response_data = await self.api_client.call_api(
|
|
257
|
+
*_param,
|
|
258
|
+
_request_timeout=_request_timeout
|
|
259
|
+
)
|
|
260
|
+
return response_data.response
|
|
261
|
+
|
|
262
|
+
|
|
263
|
+
def _sub_notifications_delete_sub_notification_serialize(
|
|
264
|
+
self,
|
|
265
|
+
notification_id,
|
|
266
|
+
sub_notification_id,
|
|
267
|
+
_request_auth,
|
|
268
|
+
_content_type,
|
|
269
|
+
_headers,
|
|
270
|
+
_host_index,
|
|
271
|
+
) -> RequestSerialized:
|
|
272
|
+
|
|
273
|
+
_host = None
|
|
274
|
+
|
|
275
|
+
_collection_formats: Dict[str, str] = {
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
_path_params: Dict[str, str] = {}
|
|
279
|
+
_query_params: List[Tuple[str, str]] = []
|
|
280
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
281
|
+
_form_params: List[Tuple[str, str]] = []
|
|
282
|
+
_files: Dict[
|
|
283
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
284
|
+
] = {}
|
|
285
|
+
_body_params: Optional[bytes] = None
|
|
286
|
+
|
|
287
|
+
# process the path parameters
|
|
288
|
+
if notification_id is not None:
|
|
289
|
+
_path_params['notificationId'] = notification_id
|
|
290
|
+
if sub_notification_id is not None:
|
|
291
|
+
_path_params['subNotificationId'] = sub_notification_id
|
|
292
|
+
# process the query parameters
|
|
293
|
+
# process the header parameters
|
|
294
|
+
# process the form parameters
|
|
295
|
+
# process the body parameter
|
|
296
|
+
|
|
297
|
+
|
|
298
|
+
# set the HTTP header `Accept`
|
|
299
|
+
if 'Accept' not in _header_params:
|
|
300
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
301
|
+
[
|
|
302
|
+
'application/json'
|
|
303
|
+
]
|
|
304
|
+
)
|
|
305
|
+
|
|
306
|
+
|
|
307
|
+
# authentication setting
|
|
308
|
+
_auth_settings: List[str] = [
|
|
309
|
+
'endUserHashed',
|
|
310
|
+
'endUser',
|
|
311
|
+
'apiKey',
|
|
312
|
+
'clientCredentials'
|
|
313
|
+
]
|
|
314
|
+
|
|
315
|
+
return self.api_client.param_serialize(
|
|
316
|
+
method='DELETE',
|
|
317
|
+
resource_path='/notifications/{notificationId}/subNotifications/{subNotificationId}',
|
|
318
|
+
path_params=_path_params,
|
|
319
|
+
query_params=_query_params,
|
|
320
|
+
header_params=_header_params,
|
|
321
|
+
body=_body_params,
|
|
322
|
+
post_params=_form_params,
|
|
323
|
+
files=_files,
|
|
324
|
+
auth_settings=_auth_settings,
|
|
325
|
+
collection_formats=_collection_formats,
|
|
326
|
+
_host=_host,
|
|
327
|
+
_request_auth=_request_auth
|
|
328
|
+
)
|
|
329
|
+
|
|
330
|
+
|
|
331
|
+
|
|
332
|
+
|
|
333
|
+
@validate_call
|
|
334
|
+
async def sub_notifications_put_sub_notification(
|
|
335
|
+
self,
|
|
336
|
+
notification_id: Annotated[StrictStr, Field(description="The notification ID")],
|
|
337
|
+
sub_notification_id: Annotated[StrictStr, Field(description="The sub-notification ID")],
|
|
338
|
+
sub_notification_put_request: SubNotificationPUTRequest,
|
|
339
|
+
_request_timeout: Union[
|
|
340
|
+
None,
|
|
341
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
342
|
+
Tuple[
|
|
343
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
344
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
345
|
+
]
|
|
346
|
+
] = None,
|
|
347
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
348
|
+
_content_type: Optional[StrictStr] = None,
|
|
349
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
350
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
351
|
+
) -> SubNotification:
|
|
352
|
+
"""This endpoint is no longer maintained and should not be used.
|
|
353
|
+
|
|
354
|
+
|
|
355
|
+
:param notification_id: The notification ID (required)
|
|
356
|
+
:type notification_id: str
|
|
357
|
+
:param sub_notification_id: The sub-notification ID (required)
|
|
358
|
+
:type sub_notification_id: str
|
|
359
|
+
:param sub_notification_put_request: (required)
|
|
360
|
+
:type sub_notification_put_request: SubNotificationPUTRequest
|
|
361
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
362
|
+
number provided, it will be total request
|
|
363
|
+
timeout. It can also be a pair (tuple) of
|
|
364
|
+
(connection, read) timeouts.
|
|
365
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
366
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
367
|
+
request; this effectively ignores the
|
|
368
|
+
authentication in the spec for a single request.
|
|
369
|
+
:type _request_auth: dict, optional
|
|
370
|
+
:param _content_type: force content-type for the request.
|
|
371
|
+
:type _content_type: str, Optional
|
|
372
|
+
:param _headers: set to override the headers for a single
|
|
373
|
+
request; this effectively ignores the headers
|
|
374
|
+
in the spec for a single request.
|
|
375
|
+
:type _headers: dict, optional
|
|
376
|
+
:param _host_index: set to override the host_index for a single
|
|
377
|
+
request; this effectively ignores the host_index
|
|
378
|
+
in the spec for a single request.
|
|
379
|
+
:type _host_index: int, optional
|
|
380
|
+
:return: Returns the result object.
|
|
381
|
+
""" # noqa: E501
|
|
382
|
+
|
|
383
|
+
_param = self._sub_notifications_put_sub_notification_serialize(
|
|
384
|
+
notification_id=notification_id,
|
|
385
|
+
sub_notification_id=sub_notification_id,
|
|
386
|
+
sub_notification_put_request=sub_notification_put_request,
|
|
387
|
+
_request_auth=_request_auth,
|
|
388
|
+
_content_type=_content_type,
|
|
389
|
+
_headers=_headers,
|
|
390
|
+
_host_index=_host_index
|
|
391
|
+
)
|
|
392
|
+
|
|
393
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
394
|
+
'200': "SubNotification",
|
|
395
|
+
'400': "ApiErrorResponse",
|
|
396
|
+
'401': None,
|
|
397
|
+
'402': "ApiErrorResponse",
|
|
398
|
+
'500': None,
|
|
399
|
+
'502': "ApiErrorResponse",
|
|
400
|
+
}
|
|
401
|
+
response_data = await self.api_client.call_api(
|
|
402
|
+
*_param,
|
|
403
|
+
_request_timeout=_request_timeout
|
|
404
|
+
)
|
|
405
|
+
await response_data.read()
|
|
406
|
+
return self.api_client.response_deserialize(
|
|
407
|
+
response_data=response_data,
|
|
408
|
+
response_types_map=_response_types_map,
|
|
409
|
+
).data
|
|
410
|
+
|
|
411
|
+
|
|
412
|
+
@validate_call
|
|
413
|
+
async def sub_notifications_put_sub_notification_with_http_info(
|
|
414
|
+
self,
|
|
415
|
+
notification_id: Annotated[StrictStr, Field(description="The notification ID")],
|
|
416
|
+
sub_notification_id: Annotated[StrictStr, Field(description="The sub-notification ID")],
|
|
417
|
+
sub_notification_put_request: SubNotificationPUTRequest,
|
|
418
|
+
_request_timeout: Union[
|
|
419
|
+
None,
|
|
420
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
421
|
+
Tuple[
|
|
422
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
423
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
424
|
+
]
|
|
425
|
+
] = None,
|
|
426
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
427
|
+
_content_type: Optional[StrictStr] = None,
|
|
428
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
429
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
430
|
+
) -> ApiResponse[SubNotification]:
|
|
431
|
+
"""This endpoint is no longer maintained and should not be used.
|
|
432
|
+
|
|
433
|
+
|
|
434
|
+
:param notification_id: The notification ID (required)
|
|
435
|
+
:type notification_id: str
|
|
436
|
+
:param sub_notification_id: The sub-notification ID (required)
|
|
437
|
+
:type sub_notification_id: str
|
|
438
|
+
:param sub_notification_put_request: (required)
|
|
439
|
+
:type sub_notification_put_request: SubNotificationPUTRequest
|
|
440
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
441
|
+
number provided, it will be total request
|
|
442
|
+
timeout. It can also be a pair (tuple) of
|
|
443
|
+
(connection, read) timeouts.
|
|
444
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
445
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
446
|
+
request; this effectively ignores the
|
|
447
|
+
authentication in the spec for a single request.
|
|
448
|
+
:type _request_auth: dict, optional
|
|
449
|
+
:param _content_type: force content-type for the request.
|
|
450
|
+
:type _content_type: str, Optional
|
|
451
|
+
:param _headers: set to override the headers for a single
|
|
452
|
+
request; this effectively ignores the headers
|
|
453
|
+
in the spec for a single request.
|
|
454
|
+
:type _headers: dict, optional
|
|
455
|
+
:param _host_index: set to override the host_index for a single
|
|
456
|
+
request; this effectively ignores the host_index
|
|
457
|
+
in the spec for a single request.
|
|
458
|
+
:type _host_index: int, optional
|
|
459
|
+
:return: Returns the result object.
|
|
460
|
+
""" # noqa: E501
|
|
461
|
+
|
|
462
|
+
_param = self._sub_notifications_put_sub_notification_serialize(
|
|
463
|
+
notification_id=notification_id,
|
|
464
|
+
sub_notification_id=sub_notification_id,
|
|
465
|
+
sub_notification_put_request=sub_notification_put_request,
|
|
466
|
+
_request_auth=_request_auth,
|
|
467
|
+
_content_type=_content_type,
|
|
468
|
+
_headers=_headers,
|
|
469
|
+
_host_index=_host_index
|
|
470
|
+
)
|
|
471
|
+
|
|
472
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
473
|
+
'200': "SubNotification",
|
|
474
|
+
'400': "ApiErrorResponse",
|
|
475
|
+
'401': None,
|
|
476
|
+
'402': "ApiErrorResponse",
|
|
477
|
+
'500': None,
|
|
478
|
+
'502': "ApiErrorResponse",
|
|
479
|
+
}
|
|
480
|
+
response_data = await self.api_client.call_api(
|
|
481
|
+
*_param,
|
|
482
|
+
_request_timeout=_request_timeout
|
|
483
|
+
)
|
|
484
|
+
await response_data.read()
|
|
485
|
+
return self.api_client.response_deserialize(
|
|
486
|
+
response_data=response_data,
|
|
487
|
+
response_types_map=_response_types_map,
|
|
488
|
+
)
|
|
489
|
+
|
|
490
|
+
|
|
491
|
+
@validate_call
|
|
492
|
+
async def sub_notifications_put_sub_notification_without_preload_content(
|
|
493
|
+
self,
|
|
494
|
+
notification_id: Annotated[StrictStr, Field(description="The notification ID")],
|
|
495
|
+
sub_notification_id: Annotated[StrictStr, Field(description="The sub-notification ID")],
|
|
496
|
+
sub_notification_put_request: SubNotificationPUTRequest,
|
|
497
|
+
_request_timeout: Union[
|
|
498
|
+
None,
|
|
499
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
500
|
+
Tuple[
|
|
501
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
502
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
503
|
+
]
|
|
504
|
+
] = None,
|
|
505
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
506
|
+
_content_type: Optional[StrictStr] = None,
|
|
507
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
508
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
509
|
+
) -> RESTResponseType:
|
|
510
|
+
"""This endpoint is no longer maintained and should not be used.
|
|
511
|
+
|
|
512
|
+
|
|
513
|
+
:param notification_id: The notification ID (required)
|
|
514
|
+
:type notification_id: str
|
|
515
|
+
:param sub_notification_id: The sub-notification ID (required)
|
|
516
|
+
:type sub_notification_id: str
|
|
517
|
+
:param sub_notification_put_request: (required)
|
|
518
|
+
:type sub_notification_put_request: SubNotificationPUTRequest
|
|
519
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
520
|
+
number provided, it will be total request
|
|
521
|
+
timeout. It can also be a pair (tuple) of
|
|
522
|
+
(connection, read) timeouts.
|
|
523
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
524
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
525
|
+
request; this effectively ignores the
|
|
526
|
+
authentication in the spec for a single request.
|
|
527
|
+
:type _request_auth: dict, optional
|
|
528
|
+
:param _content_type: force content-type for the request.
|
|
529
|
+
:type _content_type: str, Optional
|
|
530
|
+
:param _headers: set to override the headers for a single
|
|
531
|
+
request; this effectively ignores the headers
|
|
532
|
+
in the spec for a single request.
|
|
533
|
+
:type _headers: dict, optional
|
|
534
|
+
:param _host_index: set to override the host_index for a single
|
|
535
|
+
request; this effectively ignores the host_index
|
|
536
|
+
in the spec for a single request.
|
|
537
|
+
:type _host_index: int, optional
|
|
538
|
+
:return: Returns the result object.
|
|
539
|
+
""" # noqa: E501
|
|
540
|
+
|
|
541
|
+
_param = self._sub_notifications_put_sub_notification_serialize(
|
|
542
|
+
notification_id=notification_id,
|
|
543
|
+
sub_notification_id=sub_notification_id,
|
|
544
|
+
sub_notification_put_request=sub_notification_put_request,
|
|
545
|
+
_request_auth=_request_auth,
|
|
546
|
+
_content_type=_content_type,
|
|
547
|
+
_headers=_headers,
|
|
548
|
+
_host_index=_host_index
|
|
549
|
+
)
|
|
550
|
+
|
|
551
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
552
|
+
'200': "SubNotification",
|
|
553
|
+
'400': "ApiErrorResponse",
|
|
554
|
+
'401': None,
|
|
555
|
+
'402': "ApiErrorResponse",
|
|
556
|
+
'500': None,
|
|
557
|
+
'502': "ApiErrorResponse",
|
|
558
|
+
}
|
|
559
|
+
response_data = await self.api_client.call_api(
|
|
560
|
+
*_param,
|
|
561
|
+
_request_timeout=_request_timeout
|
|
562
|
+
)
|
|
563
|
+
return response_data.response
|
|
564
|
+
|
|
565
|
+
|
|
566
|
+
def _sub_notifications_put_sub_notification_serialize(
|
|
567
|
+
self,
|
|
568
|
+
notification_id,
|
|
569
|
+
sub_notification_id,
|
|
570
|
+
sub_notification_put_request,
|
|
571
|
+
_request_auth,
|
|
572
|
+
_content_type,
|
|
573
|
+
_headers,
|
|
574
|
+
_host_index,
|
|
575
|
+
) -> RequestSerialized:
|
|
576
|
+
|
|
577
|
+
_host = None
|
|
578
|
+
|
|
579
|
+
_collection_formats: Dict[str, str] = {
|
|
580
|
+
}
|
|
581
|
+
|
|
582
|
+
_path_params: Dict[str, str] = {}
|
|
583
|
+
_query_params: List[Tuple[str, str]] = []
|
|
584
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
585
|
+
_form_params: List[Tuple[str, str]] = []
|
|
586
|
+
_files: Dict[
|
|
587
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
588
|
+
] = {}
|
|
589
|
+
_body_params: Optional[bytes] = None
|
|
590
|
+
|
|
591
|
+
# process the path parameters
|
|
592
|
+
if notification_id is not None:
|
|
593
|
+
_path_params['notificationId'] = notification_id
|
|
594
|
+
if sub_notification_id is not None:
|
|
595
|
+
_path_params['subNotificationId'] = sub_notification_id
|
|
596
|
+
# process the query parameters
|
|
597
|
+
# process the header parameters
|
|
598
|
+
# process the form parameters
|
|
599
|
+
# process the body parameter
|
|
600
|
+
if sub_notification_put_request is not None:
|
|
601
|
+
_body_params = sub_notification_put_request
|
|
602
|
+
|
|
603
|
+
|
|
604
|
+
# set the HTTP header `Accept`
|
|
605
|
+
if 'Accept' not in _header_params:
|
|
606
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
607
|
+
[
|
|
608
|
+
'application/json'
|
|
609
|
+
]
|
|
610
|
+
)
|
|
611
|
+
|
|
612
|
+
# set the HTTP header `Content-Type`
|
|
613
|
+
if _content_type:
|
|
614
|
+
_header_params['Content-Type'] = _content_type
|
|
615
|
+
else:
|
|
616
|
+
_default_content_type = (
|
|
617
|
+
self.api_client.select_header_content_type(
|
|
618
|
+
[
|
|
619
|
+
'application/json'
|
|
620
|
+
]
|
|
621
|
+
)
|
|
622
|
+
)
|
|
623
|
+
if _default_content_type is not None:
|
|
624
|
+
_header_params['Content-Type'] = _default_content_type
|
|
625
|
+
|
|
626
|
+
# authentication setting
|
|
627
|
+
_auth_settings: List[str] = [
|
|
628
|
+
'endUserHashed',
|
|
629
|
+
'endUser',
|
|
630
|
+
'apiKey',
|
|
631
|
+
'clientCredentials'
|
|
632
|
+
]
|
|
633
|
+
|
|
634
|
+
return self.api_client.param_serialize(
|
|
635
|
+
method='PUT',
|
|
636
|
+
resource_path='/notifications/{notificationId}/subNotifications/{subNotificationId}',
|
|
637
|
+
path_params=_path_params,
|
|
638
|
+
query_params=_query_params,
|
|
639
|
+
header_params=_header_params,
|
|
640
|
+
body=_body_params,
|
|
641
|
+
post_params=_form_params,
|
|
642
|
+
files=_files,
|
|
643
|
+
auth_settings=_auth_settings,
|
|
644
|
+
collection_formats=_collection_formats,
|
|
645
|
+
_host=_host,
|
|
646
|
+
_request_auth=_request_auth
|
|
647
|
+
)
|
|
648
|
+
|
|
649
|
+
|
pingram/api_client.py
CHANGED
|
@@ -91,7 +91,7 @@ class ApiClient:
|
|
|
91
91
|
self.default_headers[header_name] = header_value
|
|
92
92
|
self.cookie = cookie
|
|
93
93
|
# Set default User-Agent.
|
|
94
|
-
self.user_agent = 'pingram-python/1.0.
|
|
94
|
+
self.user_agent = 'pingram-python/1.0.33'
|
|
95
95
|
self.client_side_validation = configuration.client_side_validation
|
|
96
96
|
|
|
97
97
|
async def __aenter__(self):
|
pingram/client_wrapper.py
CHANGED
|
@@ -49,6 +49,8 @@ from .api.sender_api import SenderApi
|
|
|
49
49
|
|
|
50
50
|
from .api.sms_api import SmsApi
|
|
51
51
|
|
|
52
|
+
from .api.sub_notifications_api import SubNotificationsApi
|
|
53
|
+
|
|
52
54
|
from .api.templates_api import TemplatesApi
|
|
53
55
|
|
|
54
56
|
from .api.types_api import TypesApi
|
|
@@ -178,6 +180,8 @@ class Pingram:
|
|
|
178
180
|
|
|
179
181
|
self._sms: Optional[SmsApi] = None
|
|
180
182
|
|
|
183
|
+
self._sub_notifications: Optional[SubNotificationsApi] = None
|
|
184
|
+
|
|
181
185
|
self._templates: Optional[TemplatesApi] = None
|
|
182
186
|
|
|
183
187
|
self._types: Optional[TypesApi] = None
|
|
@@ -237,6 +241,8 @@ class Pingram:
|
|
|
237
241
|
|
|
238
242
|
self._sms = SmsApi(self._api_client)
|
|
239
243
|
|
|
244
|
+
self._sub_notifications = SubNotificationsApi(self._api_client)
|
|
245
|
+
|
|
240
246
|
self._templates = TemplatesApi(self._api_client)
|
|
241
247
|
|
|
242
248
|
self._types = TypesApi(self._api_client)
|
|
@@ -298,6 +304,8 @@ class Pingram:
|
|
|
298
304
|
|
|
299
305
|
self._sms = None
|
|
300
306
|
|
|
307
|
+
self._sub_notifications = None
|
|
308
|
+
|
|
301
309
|
self._templates = None
|
|
302
310
|
|
|
303
311
|
self._types = None
|
|
@@ -459,6 +467,13 @@ class Pingram:
|
|
|
459
467
|
return self._sms
|
|
460
468
|
|
|
461
469
|
|
|
470
|
+
@property
|
|
471
|
+
def sub_notifications(self) -> SubNotificationsApi:
|
|
472
|
+
if self._sub_notifications is None:
|
|
473
|
+
raise RuntimeError("Pingram must be used as async context manager: async with Pingram(...) as client:")
|
|
474
|
+
return self._sub_notifications
|
|
475
|
+
|
|
476
|
+
|
|
462
477
|
@property
|
|
463
478
|
def templates(self) -> TemplatesApi:
|
|
464
479
|
if self._templates is None:
|
pingram/configuration.py
CHANGED
|
@@ -551,7 +551,7 @@ conf = pingram.Configuration(
|
|
|
551
551
|
"OS: {env}\n"\
|
|
552
552
|
"Python Version: {pyversion}\n"\
|
|
553
553
|
"Version of the API: 1.0.0\n"\
|
|
554
|
-
"SDK Package Version: 1.0.
|
|
554
|
+
"SDK Package Version: 1.0.33".\
|
|
555
555
|
format(env=sys.platform, pyversion=sys.version)
|
|
556
556
|
|
|
557
557
|
def get_host_settings(self) -> List[HostSetting]:
|
pingram/models/__init__.py
CHANGED
|
@@ -262,6 +262,8 @@ from pingram.models.sender_post_body_web_push import SenderPostBodyWebPush
|
|
|
262
262
|
from pingram.models.sender_post_response import SenderPostResponse
|
|
263
263
|
from pingram.models.set_default_template_request import SetDefaultTemplateRequest
|
|
264
264
|
from pingram.models.slack_interactivity_response import SlackInteractivityResponse
|
|
265
|
+
from pingram.models.sub_notification import SubNotification
|
|
266
|
+
from pingram.models.sub_notification_put_request import SubNotificationPUTRequest
|
|
265
267
|
from pingram.models.success_response import SuccessResponse
|
|
266
268
|
from pingram.models.supabase_configure_request import SupabaseConfigureRequest
|
|
267
269
|
from pingram.models.supabase_configure_response import SupabaseConfigureResponse
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Pingram
|
|
5
|
+
|
|
6
|
+
Internal API for notification delivery and management
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 1.0.0
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
import pprint
|
|
17
|
+
import re # noqa: F401
|
|
18
|
+
import json
|
|
19
|
+
|
|
20
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictStr
|
|
21
|
+
from typing import Any, ClassVar, Dict, List
|
|
22
|
+
from typing import Optional, Set
|
|
23
|
+
from typing_extensions import Self
|
|
24
|
+
|
|
25
|
+
class SubNotification(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
SubNotification
|
|
28
|
+
""" # noqa: E501
|
|
29
|
+
account_id: StrictStr = Field(alias="accountId")
|
|
30
|
+
notification_id: StrictStr = Field(alias="notificationId")
|
|
31
|
+
sub_notification_id: StrictStr = Field(alias="subNotificationId")
|
|
32
|
+
title: StrictStr
|
|
33
|
+
__properties: ClassVar[List[str]] = ["accountId", "notificationId", "subNotificationId", "title"]
|
|
34
|
+
|
|
35
|
+
model_config = ConfigDict(
|
|
36
|
+
populate_by_name=True,
|
|
37
|
+
validate_assignment=True,
|
|
38
|
+
protected_namespaces=(),
|
|
39
|
+
)
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
def to_str(self) -> str:
|
|
43
|
+
"""Returns the string representation of the model using alias"""
|
|
44
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
45
|
+
|
|
46
|
+
def to_json(self) -> str:
|
|
47
|
+
"""Returns the JSON representation of the model using alias"""
|
|
48
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
49
|
+
return json.dumps(self.to_dict())
|
|
50
|
+
|
|
51
|
+
@classmethod
|
|
52
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
53
|
+
"""Create an instance of SubNotification from a JSON string"""
|
|
54
|
+
return cls.from_dict(json.loads(json_str))
|
|
55
|
+
|
|
56
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
57
|
+
"""Return the dictionary representation of the model using alias.
|
|
58
|
+
|
|
59
|
+
This has the following differences from calling pydantic's
|
|
60
|
+
`self.model_dump(by_alias=True)`:
|
|
61
|
+
|
|
62
|
+
* `None` is only added to the output dict for nullable fields that
|
|
63
|
+
were set at model initialization. Other fields with value `None`
|
|
64
|
+
are ignored.
|
|
65
|
+
"""
|
|
66
|
+
excluded_fields: Set[str] = set([
|
|
67
|
+
])
|
|
68
|
+
|
|
69
|
+
_dict = self.model_dump(
|
|
70
|
+
by_alias=True,
|
|
71
|
+
exclude=excluded_fields,
|
|
72
|
+
exclude_none=True,
|
|
73
|
+
)
|
|
74
|
+
return _dict
|
|
75
|
+
|
|
76
|
+
@classmethod
|
|
77
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
78
|
+
"""Create an instance of SubNotification from a dict"""
|
|
79
|
+
if obj is None:
|
|
80
|
+
return None
|
|
81
|
+
|
|
82
|
+
if not isinstance(obj, dict):
|
|
83
|
+
return cls.model_validate(obj)
|
|
84
|
+
|
|
85
|
+
_obj = cls.model_validate({
|
|
86
|
+
"accountId": obj.get("accountId"),
|
|
87
|
+
"notificationId": obj.get("notificationId"),
|
|
88
|
+
"subNotificationId": obj.get("subNotificationId"),
|
|
89
|
+
"title": obj.get("title")
|
|
90
|
+
})
|
|
91
|
+
return _obj
|
|
92
|
+
|
|
93
|
+
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Pingram
|
|
5
|
+
|
|
6
|
+
Internal API for notification delivery and management
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 1.0.0
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
import pprint
|
|
17
|
+
import re # noqa: F401
|
|
18
|
+
import json
|
|
19
|
+
|
|
20
|
+
from pydantic import BaseModel, ConfigDict, StrictStr
|
|
21
|
+
from typing import Any, ClassVar, Dict, List
|
|
22
|
+
from typing import Optional, Set
|
|
23
|
+
from typing_extensions import Self
|
|
24
|
+
|
|
25
|
+
class SubNotificationPUTRequest(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
SubNotificationPUTRequest
|
|
28
|
+
""" # noqa: E501
|
|
29
|
+
title: StrictStr
|
|
30
|
+
__properties: ClassVar[List[str]] = ["title"]
|
|
31
|
+
|
|
32
|
+
model_config = ConfigDict(
|
|
33
|
+
populate_by_name=True,
|
|
34
|
+
validate_assignment=True,
|
|
35
|
+
protected_namespaces=(),
|
|
36
|
+
)
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
def to_str(self) -> str:
|
|
40
|
+
"""Returns the string representation of the model using alias"""
|
|
41
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
42
|
+
|
|
43
|
+
def to_json(self) -> str:
|
|
44
|
+
"""Returns the JSON representation of the model using alias"""
|
|
45
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
46
|
+
return json.dumps(self.to_dict())
|
|
47
|
+
|
|
48
|
+
@classmethod
|
|
49
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
50
|
+
"""Create an instance of SubNotificationPUTRequest from a JSON string"""
|
|
51
|
+
return cls.from_dict(json.loads(json_str))
|
|
52
|
+
|
|
53
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
54
|
+
"""Return the dictionary representation of the model using alias.
|
|
55
|
+
|
|
56
|
+
This has the following differences from calling pydantic's
|
|
57
|
+
`self.model_dump(by_alias=True)`:
|
|
58
|
+
|
|
59
|
+
* `None` is only added to the output dict for nullable fields that
|
|
60
|
+
were set at model initialization. Other fields with value `None`
|
|
61
|
+
are ignored.
|
|
62
|
+
"""
|
|
63
|
+
excluded_fields: Set[str] = set([
|
|
64
|
+
])
|
|
65
|
+
|
|
66
|
+
_dict = self.model_dump(
|
|
67
|
+
by_alias=True,
|
|
68
|
+
exclude=excluded_fields,
|
|
69
|
+
exclude_none=True,
|
|
70
|
+
)
|
|
71
|
+
return _dict
|
|
72
|
+
|
|
73
|
+
@classmethod
|
|
74
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
75
|
+
"""Create an instance of SubNotificationPUTRequest from a dict"""
|
|
76
|
+
if obj is None:
|
|
77
|
+
return None
|
|
78
|
+
|
|
79
|
+
if not isinstance(obj, dict):
|
|
80
|
+
return cls.model_validate(obj)
|
|
81
|
+
|
|
82
|
+
_obj = cls.model_validate({
|
|
83
|
+
"title": obj.get("title")
|
|
84
|
+
})
|
|
85
|
+
return _obj
|
|
86
|
+
|
|
87
|
+
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
pingram/__init__.py,sha256=
|
|
2
|
-
pingram/api_client.py,sha256=
|
|
1
|
+
pingram/__init__.py,sha256=HFMH89m77gdiO1zRFtCNc_AS8vp3XUChiiBJkBgkwNQ,48252
|
|
2
|
+
pingram/api_client.py,sha256=nsuIeVloO8F3eHCl3fD14Y1IcVMgMhzPFWAB19arKHA,27792
|
|
3
3
|
pingram/api_response.py,sha256=eMxw1mpmJcoGZ3gs9z6jM4oYoZ10Gjk333s9sKxGv7s,652
|
|
4
|
-
pingram/client_wrapper.py,sha256=
|
|
5
|
-
pingram/configuration.py,sha256=
|
|
4
|
+
pingram/client_wrapper.py,sha256=sreT63NgmWEWLUzdYQWZTN0PneHhYITsfPTSjthCjqw,15358
|
|
5
|
+
pingram/configuration.py,sha256=7vCjqub7KWGReAJ0NTlLCiKjtnnBm3pCHOeESVW_iGI,19466
|
|
6
6
|
pingram/exceptions.py,sha256=0l6B9dlFRwmPx-sfytj3wC9rdGgVPJY3AQ39qHx3GS4,8483
|
|
7
7
|
pingram/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
8
8
|
pingram/rest.py,sha256=soB0_p6OMFlXrz5pDmdf2nIZchqPua9hgtuj8A5Yea4,6426
|
|
9
9
|
pingram/webhooks.py,sha256=KepgOXETX0og96wGdxOapc8HQcRw3JA4RwKQr78NGzg,3570
|
|
10
|
-
pingram/api/__init__.py,sha256=
|
|
11
|
-
pingram/api/account_api.py,sha256=
|
|
10
|
+
pingram/api/__init__.py,sha256=AMrcqsq7lVHQGC0CiQ3ZcWQceoniDF4bN9Fpo8i9P-0,1383
|
|
11
|
+
pingram/api/account_api.py,sha256=AZE302nmde2aQdlomTbV3icWoIDCK0WHa84oKBUXXpc,123916
|
|
12
12
|
pingram/api/accounts_api.py,sha256=v_r92h3AqvJPPePiU7hp-ysUv_FjxIaNsx-bKVhefdM,22366
|
|
13
13
|
pingram/api/addresses_api.py,sha256=lhczuYDLvFzjO9ht5FJ5n6_PLXFBxqHz8Pth7ov8wJE,45196
|
|
14
14
|
pingram/api/broadcasts_api.py,sha256=YfpmDI-nntLT2C7ihLGG7ZCidFGhzSy9CgqAYIv-diw,164930
|
|
@@ -29,13 +29,14 @@ pingram/api/profile_api.py,sha256=JvWxOWYR35oXSZ4uOMR4UMxuG8qRxtM1KrRqYGpgN2I,77
|
|
|
29
29
|
pingram/api/registrations_api.py,sha256=xj9ZGY28RpSuaIGVPYvr_kjCfHv3ltNPW96pk1ssnXs,57220
|
|
30
30
|
pingram/api/sender_api.py,sha256=LDst-NVk9N5kOKixZp_s2_S276KvmCaf-dHWKNCMiSY,35372
|
|
31
31
|
pingram/api/sms_api.py,sha256=gQV3E0NcjIjgtG4mcP5mcF268sVAUzwY3YVRyZpxEYA,12283
|
|
32
|
+
pingram/api/sub_notifications_api.py,sha256=RMZ335pO-N_x7QZyYh84N8-YQQos4LoLIjvVM6lIABw,26305
|
|
32
33
|
pingram/api/templates_api.py,sha256=7pbClEjvA-c9rrkKnrPIGdMD9cxiCWiX7it3wmCOaK8,75823
|
|
33
34
|
pingram/api/types_api.py,sha256=AL7Hj6hLe-pWYiXRUGYnevVDfZeVJDi2V8x70uYgqfg,56396
|
|
34
35
|
pingram/api/user_api.py,sha256=lgPwwZzo9_nrouwmUa6gzUOLe30r8W_RnT-vccTIF5Y,79230
|
|
35
36
|
pingram/api/users_api.py,sha256=AERWQ8wGRve3TovcVBp9CamZOUV8lpjJb_P9HnsxV4g,37532
|
|
36
37
|
pingram/api/voice_api.py,sha256=ML4Xbnn64f47nkM7_Bn2kwvcvng_T4Nv1uLg6Jhd3-Y,125242
|
|
37
38
|
pingram/api/webhooks_api.py,sha256=yMzgXx8tSps1Wg04ghSh5IMnEqkte5d6k2pMFcCLA2E,45241
|
|
38
|
-
pingram/models/__init__.py,sha256
|
|
39
|
+
pingram/models/__init__.py,sha256=-a67SEmqoXXmIQTpRXMvgShUUDBmTCezek7sLL7hCaE,25662
|
|
39
40
|
pingram/models/accept_invite_request.py,sha256=ZXIkBQFXWjD0g0Akfuz6CuWTWZ8AWpWXHfY8EMgo4XE,2443
|
|
40
41
|
pingram/models/accept_invite_response.py,sha256=R-fqCEzKwX1XxJscgtPSU7MUCeKGmuBkzh8fha-9KEM,2869
|
|
41
42
|
pingram/models/account_addresses_response.py,sha256=0nev-caxYCmHQHHTXSvpmrz6yYPx92UcB8Umzkt2RK8,3068
|
|
@@ -285,6 +286,8 @@ pingram/models/sender_post_body_web_push.py,sha256=6aJT-QRqg9IqD5AbSqpGRamhS1zqF
|
|
|
285
286
|
pingram/models/sender_post_response.py,sha256=CLUFGdzNVbJEY8Oh9Ut0DBhzeJgK62VN-Lpnuw1Itzg,2582
|
|
286
287
|
pingram/models/set_default_template_request.py,sha256=gY8rMuEUcJ6NKBx1yntIE1d3YgVF-q6qXNyEOJO__uk,2965
|
|
287
288
|
pingram/models/slack_interactivity_response.py,sha256=eNsfRl-0wRzZiDIVfOvaft_9hLLEBmk2_x_H0EOTyzk,2524
|
|
289
|
+
pingram/models/sub_notification.py,sha256=mMMCA4x34DtNS7F1r8H1Zby9y32Ok77xrB-TgULRSxc,2839
|
|
290
|
+
pingram/models/sub_notification_put_request.py,sha256=amZToL4DqVyBcGXFgm7CCARzXffTvEaVuJyGImTpDlY,2467
|
|
288
291
|
pingram/models/success_response.py,sha256=eDmPsP27a51wmPvcTq7JDTnn-uQLXTPdmRRHyq2hLIQ,2437
|
|
289
292
|
pingram/models/supabase_configure_request.py,sha256=74H3mxkHJNi3lEF7CLWMEo_cY8o-3Jjyqlr4Q_3yJWY,2883
|
|
290
293
|
pingram/models/supabase_configure_response.py,sha256=vsfBGx3W9Y-GNIeLSjEVFZ4ez4HCN1cXc-tRmzIu-xY,2592
|
|
@@ -325,8 +328,8 @@ pingram/models/webhook_endpoints_response.py,sha256=ukoMTHiFVi1h2lUsZKCzxhOcwZqZ
|
|
|
325
328
|
pingram/models/webhook_endpoints_response_endpoints_inner.py,sha256=DJn-BfmHcxyJSxZxiOwUKZOBTzuKdJ-WG3TB8HmMuVs,4164
|
|
326
329
|
pingram/models/webhook_event.py,sha256=T_f1G9eLhOjMlCDwHru3J6KDCKBxgiZBmata_pvBlU8,4879
|
|
327
330
|
pingram/models/webhook_response.py,sha256=rwCh3OTCE3TK6tVEKOKVlq9w0b1fZ-fKKEoe9Tz0tIc,3233
|
|
328
|
-
pingram_python-1.0.
|
|
329
|
-
pingram_python-1.0.
|
|
330
|
-
pingram_python-1.0.
|
|
331
|
-
pingram_python-1.0.
|
|
332
|
-
pingram_python-1.0.
|
|
331
|
+
pingram_python-1.0.33.dist-info/licenses/LICENSE,sha256=jFcP99OXuZ-3f_86j4Q4OjmvvHNm7SG94ytcAhqvldk,1059
|
|
332
|
+
pingram_python-1.0.33.dist-info/METADATA,sha256=qwWWGZ1Qd-Xjy4ZEw8uyyHz4WJXhHzwwc1Ror7CinaM,2268
|
|
333
|
+
pingram_python-1.0.33.dist-info/WHEEL,sha256=YVMoNqKzERt-wjUZwJ33xBGAwnFl-4cqbYkTtWa4itE,91
|
|
334
|
+
pingram_python-1.0.33.dist-info/top_level.txt,sha256=6BmMatn4_wswGo1u11HkRU892yP2gG5dddsmmRhSjD8,8
|
|
335
|
+
pingram_python-1.0.33.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|