pingram-python 0.1.0__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.
Files changed (189) hide show
  1. pingram/__init__.py +395 -0
  2. pingram/api/__init__.py +21 -0
  3. pingram/api/account_api.py +2198 -0
  4. pingram/api/addresses_api.py +860 -0
  5. pingram/api/components_api.py +1681 -0
  6. pingram/api/default_api.py +320 -0
  7. pingram/api/domains_api.py +849 -0
  8. pingram/api/editor_api.py +320 -0
  9. pingram/api/environments_api.py +878 -0
  10. pingram/api/health_api.py +287 -0
  11. pingram/api/insights_api.py +321 -0
  12. pingram/api/keys_api.py +849 -0
  13. pingram/api/logs_api.py +1632 -0
  14. pingram/api/members_api.py +1780 -0
  15. pingram/api/sender_api.py +892 -0
  16. pingram/api/templates_api.py +1889 -0
  17. pingram/api/types_api.py +1411 -0
  18. pingram/api/user_api.py +2534 -0
  19. pingram/api/users_api.py +936 -0
  20. pingram/api_client.py +807 -0
  21. pingram/api_response.py +21 -0
  22. pingram/client_wrapper.py +357 -0
  23. pingram/configuration.py +623 -0
  24. pingram/exceptions.py +219 -0
  25. pingram/models/__init__.py +173 -0
  26. pingram/models/account_addresses_response.py +95 -0
  27. pingram/models/account_addresses_response_addresses_inner.py +104 -0
  28. pingram/models/account_get_response.py +143 -0
  29. pingram/models/account_get_response_pending_downgrade_usage_limit.py +99 -0
  30. pingram/models/address_response.py +91 -0
  31. pingram/models/auto_join_get_response.py +89 -0
  32. pingram/models/auto_join_post_response.py +89 -0
  33. pingram/models/auto_join_request_body.py +87 -0
  34. pingram/models/bee_token_v2.py +89 -0
  35. pingram/models/billing_post_request_body.py +91 -0
  36. pingram/models/billing_post_response_body.py +149 -0
  37. pingram/models/billing_post_response_body_pending_downgrade_usage_limit.py +99 -0
  38. pingram/models/channels_enum.py +42 -0
  39. pingram/models/create_account_request_body.py +87 -0
  40. pingram/models/create_account_response.py +89 -0
  41. pingram/models/create_address_request.py +91 -0
  42. pingram/models/create_key_request.py +98 -0
  43. pingram/models/create_key_response.py +104 -0
  44. pingram/models/delete_key_response.py +87 -0
  45. pingram/models/delete_user_response.py +87 -0
  46. pingram/models/email_auth_token_post_request.py +87 -0
  47. pingram/models/email_component_patch_request.py +93 -0
  48. pingram/models/email_component_post_request.py +95 -0
  49. pingram/models/email_component_response.py +120 -0
  50. pingram/models/email_component_response_referenced_by_inner.py +92 -0
  51. pingram/models/environment.py +96 -0
  52. pingram/models/environment_create_request.py +87 -0
  53. pingram/models/environment_patch_request.py +94 -0
  54. pingram/models/get_account_metadata_response.py +91 -0
  55. pingram/models/get_account_metadata_response_user_account_metadata.py +91 -0
  56. pingram/models/get_email_components_response_inner.py +120 -0
  57. pingram/models/get_environments_response_inner.py +96 -0
  58. pingram/models/get_inapp_notifications_response.py +95 -0
  59. pingram/models/get_inapp_notifications_response_notifications_inner.py +137 -0
  60. pingram/models/get_inapp_notifications_response_notifications_inner_delivery_options.py +106 -0
  61. pingram/models/get_inapp_notifications_response_notifications_inner_delivery_options_instant.py +93 -0
  62. pingram/models/get_inapp_notifications_response_notifications_inner_delivery_options_off.py +87 -0
  63. pingram/models/get_inapp_notifications_response_notifications_inner_replies_inner.py +89 -0
  64. pingram/models/get_inapp_notifications_response_notifications_inner_template.py +136 -0
  65. pingram/models/get_inapp_notifications_response_notifications_inner_template_any_of.py +98 -0
  66. pingram/models/get_keys_response.py +95 -0
  67. pingram/models/get_keys_response_keys_inner.py +110 -0
  68. pingram/models/get_logs_response.py +97 -0
  69. pingram/models/get_logs_response_messages_inner.py +141 -0
  70. pingram/models/get_logs_response_messages_inner_attachments_inner.py +93 -0
  71. pingram/models/get_members_response_inner.py +95 -0
  72. pingram/models/get_metrics_response_inner.py +116 -0
  73. pingram/models/get_metrics_response_inner_messages_inner.py +89 -0
  74. pingram/models/get_notifications_response_inner.py +126 -0
  75. pingram/models/get_notifications_response_inner_deduplication.py +87 -0
  76. pingram/models/get_notifications_response_inner_options.py +122 -0
  77. pingram/models/get_notifications_response_inner_options_email.py +128 -0
  78. pingram/models/get_notifications_response_inner_options_email_daily.py +89 -0
  79. pingram/models/get_notifications_response_inner_options_email_monthly.py +101 -0
  80. pingram/models/get_notifications_response_inner_options_email_weekly.py +91 -0
  81. pingram/models/get_notifications_response_inner_templates_inner.py +90 -0
  82. pingram/models/get_notifications_response_inner_throttling.py +111 -0
  83. pingram/models/get_senders_response_inner.py +128 -0
  84. pingram/models/get_templates_response.py +136 -0
  85. pingram/models/get_users_response.py +99 -0
  86. pingram/models/get_users_response_users_inner.py +133 -0
  87. pingram/models/get_users_response_users_inner_email_suppression_status.py +96 -0
  88. pingram/models/get_users_response_users_inner_push_tokens_inner.py +104 -0
  89. pingram/models/get_users_response_users_inner_push_tokens_inner_device.py +97 -0
  90. pingram/models/get_users_response_users_inner_slack_token.py +140 -0
  91. pingram/models/get_users_response_users_inner_slack_token_authed_user.py +97 -0
  92. pingram/models/get_users_response_users_inner_slack_token_enterprise.py +89 -0
  93. pingram/models/get_users_response_users_inner_slack_token_incoming_webhook.py +93 -0
  94. pingram/models/get_users_response_users_inner_slack_token_response_metadata.py +97 -0
  95. pingram/models/get_users_response_users_inner_web_push_tokens_inner.py +91 -0
  96. pingram/models/get_users_response_users_inner_web_push_tokens_inner_sub.py +93 -0
  97. pingram/models/get_users_response_users_inner_web_push_tokens_inner_sub_keys.py +89 -0
  98. pingram/models/in_app_notification_patch_request.py +112 -0
  99. pingram/models/in_app_notification_unread_clear_request.py +89 -0
  100. pingram/models/inapp_unread_count_response.py +87 -0
  101. pingram/models/inbound_request_body.py +138 -0
  102. pingram/models/inbound_response_body.py +104 -0
  103. pingram/models/inbound_response_body_results_inner.py +103 -0
  104. pingram/models/ingishts_post_request.py +121 -0
  105. pingram/models/ingishts_post_request_label_options.py +87 -0
  106. pingram/models/ingishts_post_request_metric_data_queries_inner.py +103 -0
  107. pingram/models/ingishts_post_request_metric_data_queries_inner_metric_stat.py +107 -0
  108. pingram/models/ingishts_post_request_metric_data_queries_inner_metric_stat_metric.py +99 -0
  109. pingram/models/ingishts_post_request_metric_data_queries_inner_metric_stat_metric_dimensions_inner.py +89 -0
  110. pingram/models/intercom_webhook.py +106 -0
  111. pingram/models/intercom_webhook_data.py +91 -0
  112. pingram/models/intercom_webhook_data_item.py +136 -0
  113. pingram/models/intercom_webhook_data_item_any_of.py +140 -0
  114. pingram/models/intercom_webhook_data_item_any_of_contacts.py +104 -0
  115. pingram/models/intercom_webhook_data_item_any_of_contacts_contacts_inner.py +91 -0
  116. pingram/models/intercom_webhook_data_item_any_of_source.py +101 -0
  117. pingram/models/intercom_webhook_data_item_any_of_source_author.py +93 -0
  118. pingram/models/invite_post_response.py +89 -0
  119. pingram/models/log_query_post_body.py +109 -0
  120. pingram/models/logs_bulk_request.py +87 -0
  121. pingram/models/logs_get_response.py +95 -0
  122. pingram/models/logs_get_response_logs_inner.py +627 -0
  123. pingram/models/logs_query_response.py +87 -0
  124. pingram/models/logs_query_result_response.py +101 -0
  125. pingram/models/logs_retention_response.py +87 -0
  126. pingram/models/logs_tail_response.py +95 -0
  127. pingram/models/member_invite_request.py +89 -0
  128. pingram/models/member_update_request.py +87 -0
  129. pingram/models/message_response.py +87 -0
  130. pingram/models/notification.py +126 -0
  131. pingram/models/notification_create_request.py +97 -0
  132. pingram/models/notification_patch_request.py +112 -0
  133. pingram/models/post_email_test_request.py +99 -0
  134. pingram/models/post_email_test_response.py +89 -0
  135. pingram/models/post_senders_request_body.py +87 -0
  136. pingram/models/post_user_request.py +121 -0
  137. pingram/models/sender_post_body.py +166 -0
  138. pingram/models/sender_post_body_email.py +95 -0
  139. pingram/models/sender_post_body_inapp.py +91 -0
  140. pingram/models/sender_post_body_mobile_push.py +89 -0
  141. pingram/models/sender_post_body_options.py +103 -0
  142. pingram/models/sender_post_body_options_apn.py +99 -0
  143. pingram/models/sender_post_body_options_email.py +107 -0
  144. pingram/models/sender_post_body_options_email_attachments_inner.py +134 -0
  145. pingram/models/sender_post_body_options_email_attachments_inner_any_of.py +89 -0
  146. pingram/models/sender_post_body_options_email_attachments_inner_any_of1.py +91 -0
  147. pingram/models/sender_post_body_options_fcm.py +91 -0
  148. pingram/models/sender_post_body_options_fcm_android.py +103 -0
  149. pingram/models/sender_post_body_slack.py +123 -0
  150. pingram/models/sender_post_body_slack_metadata.py +99 -0
  151. pingram/models/sender_post_body_slack_metadata_entities_inner.py +99 -0
  152. pingram/models/sender_post_body_slack_metadata_entities_inner_external_ref.py +89 -0
  153. pingram/models/sender_post_body_sms.py +93 -0
  154. pingram/models/sender_post_body_sms_auto_reply.py +87 -0
  155. pingram/models/sender_post_body_to.py +133 -0
  156. pingram/models/sender_post_body_user.py +133 -0
  157. pingram/models/sender_post_body_web_push.py +93 -0
  158. pingram/models/sender_post_response.py +89 -0
  159. pingram/models/set_default_template_request.py +97 -0
  160. pingram/models/slack_interactivity_response.py +87 -0
  161. pingram/models/slack_oauth_request.py +89 -0
  162. pingram/models/success_response.py +87 -0
  163. pingram/models/supabase_configure_request.py +93 -0
  164. pingram/models/supabase_configure_response.py +89 -0
  165. pingram/models/supabase_o_auth_request.py +91 -0
  166. pingram/models/supabase_o_auth_response.py +89 -0
  167. pingram/models/supabase_projects_response.py +95 -0
  168. pingram/models/supabase_projects_response_projects_inner.py +95 -0
  169. pingram/models/supabase_status_response.py +93 -0
  170. pingram/models/template.py +98 -0
  171. pingram/models/template_patch_request.py +134 -0
  172. pingram/models/template_patch_request_any_of.py +97 -0
  173. pingram/models/template_patch_request_any_of1.py +103 -0
  174. pingram/models/template_patch_request_any_of1_batch.py +91 -0
  175. pingram/models/template_patch_request_any_of1_instant.py +91 -0
  176. pingram/models/template_post_request.py +131 -0
  177. pingram/models/template_post_request_batch.py +91 -0
  178. pingram/models/template_post_request_instant.py +91 -0
  179. pingram/models/update_address_request.py +91 -0
  180. pingram/models/user.py +133 -0
  181. pingram/models/user_suppression_delete_response.py +91 -0
  182. pingram/models/webhook_response.py +104 -0
  183. pingram/py.typed +0 -0
  184. pingram/rest.py +199 -0
  185. pingram_python-0.1.0.dist-info/METADATA +69 -0
  186. pingram_python-0.1.0.dist-info/RECORD +189 -0
  187. pingram_python-0.1.0.dist-info/WHEEL +5 -0
  188. pingram_python-0.1.0.dist-info/licenses/LICENSE +21 -0
  189. pingram_python-0.1.0.dist-info/top_level.txt +1 -0
@@ -0,0 +1,87 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ NotificationAPI
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 LogsQueryResponse(BaseModel):
26
+ """
27
+ Response type for POST /logs/query
28
+ """ # noqa: E501
29
+ query_id: StrictStr = Field(alias="queryId")
30
+ __properties: ClassVar[List[str]] = ["queryId"]
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 LogsQueryResponse 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 LogsQueryResponse 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
+ "queryId": obj.get("queryId")
84
+ })
85
+ return _obj
86
+
87
+
@@ -0,0 +1,101 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ NotificationAPI
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, Optional
22
+ from pingram.models.logs_get_response_logs_inner import LogsGetResponseLogsInner
23
+ from typing import Optional, Set
24
+ from typing_extensions import Self
25
+
26
+ class LogsQueryResultResponse(BaseModel):
27
+ """
28
+ Response type for GET /logs/query/{queryId}
29
+ """ # noqa: E501
30
+ status: StrictStr
31
+ logs: Optional[List[LogsGetResponseLogsInner]] = None
32
+ message: Optional[StrictStr] = None
33
+ error: Optional[StrictStr] = None
34
+ __properties: ClassVar[List[str]] = ["status", "logs", "message", "error"]
35
+
36
+ model_config = ConfigDict(
37
+ populate_by_name=True,
38
+ validate_assignment=True,
39
+ protected_namespaces=(),
40
+ )
41
+
42
+
43
+ def to_str(self) -> str:
44
+ """Returns the string representation of the model using alias"""
45
+ return pprint.pformat(self.model_dump(by_alias=True))
46
+
47
+ def to_json(self) -> str:
48
+ """Returns the JSON representation of the model using alias"""
49
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
50
+ return json.dumps(self.to_dict())
51
+
52
+ @classmethod
53
+ def from_json(cls, json_str: str) -> Optional[Self]:
54
+ """Create an instance of LogsQueryResultResponse from a JSON string"""
55
+ return cls.from_dict(json.loads(json_str))
56
+
57
+ def to_dict(self) -> Dict[str, Any]:
58
+ """Return the dictionary representation of the model using alias.
59
+
60
+ This has the following differences from calling pydantic's
61
+ `self.model_dump(by_alias=True)`:
62
+
63
+ * `None` is only added to the output dict for nullable fields that
64
+ were set at model initialization. Other fields with value `None`
65
+ are ignored.
66
+ """
67
+ excluded_fields: Set[str] = set([
68
+ ])
69
+
70
+ _dict = self.model_dump(
71
+ by_alias=True,
72
+ exclude=excluded_fields,
73
+ exclude_none=True,
74
+ )
75
+ # override the default output from pydantic by calling `to_dict()` of each item in logs (list)
76
+ _items = []
77
+ if self.logs:
78
+ for _item_logs in self.logs:
79
+ if _item_logs:
80
+ _items.append(_item_logs.to_dict())
81
+ _dict['logs'] = _items
82
+ return _dict
83
+
84
+ @classmethod
85
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
86
+ """Create an instance of LogsQueryResultResponse from a dict"""
87
+ if obj is None:
88
+ return None
89
+
90
+ if not isinstance(obj, dict):
91
+ return cls.model_validate(obj)
92
+
93
+ _obj = cls.model_validate({
94
+ "status": obj.get("status"),
95
+ "logs": [LogsGetResponseLogsInner.from_dict(_item) for _item in obj["logs"]] if obj.get("logs") is not None else None,
96
+ "message": obj.get("message"),
97
+ "error": obj.get("error")
98
+ })
99
+ return _obj
100
+
101
+
@@ -0,0 +1,87 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ NotificationAPI
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, StrictFloat, StrictInt
21
+ from typing import Any, ClassVar, Dict, List, Union
22
+ from typing import Optional, Set
23
+ from typing_extensions import Self
24
+
25
+ class LogsRetentionResponse(BaseModel):
26
+ """
27
+ Response type for GET /logs/retention
28
+ """ # noqa: E501
29
+ retention_in_days: Union[StrictFloat, StrictInt] = Field(alias="retentionInDays")
30
+ __properties: ClassVar[List[str]] = ["retentionInDays"]
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 LogsRetentionResponse 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 LogsRetentionResponse 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
+ "retentionInDays": obj.get("retentionInDays")
84
+ })
85
+ return _obj
86
+
87
+
@@ -0,0 +1,95 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ NotificationAPI
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
21
+ from typing import Any, ClassVar, Dict, List
22
+ from pingram.models.logs_get_response_logs_inner import LogsGetResponseLogsInner
23
+ from typing import Optional, Set
24
+ from typing_extensions import Self
25
+
26
+ class LogsTailResponse(BaseModel):
27
+ """
28
+ Response type for GET /logs/tail
29
+ """ # noqa: E501
30
+ logs: List[LogsGetResponseLogsInner]
31
+ __properties: ClassVar[List[str]] = ["logs"]
32
+
33
+ model_config = ConfigDict(
34
+ populate_by_name=True,
35
+ validate_assignment=True,
36
+ protected_namespaces=(),
37
+ )
38
+
39
+
40
+ def to_str(self) -> str:
41
+ """Returns the string representation of the model using alias"""
42
+ return pprint.pformat(self.model_dump(by_alias=True))
43
+
44
+ def to_json(self) -> str:
45
+ """Returns the JSON representation of the model using alias"""
46
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
47
+ return json.dumps(self.to_dict())
48
+
49
+ @classmethod
50
+ def from_json(cls, json_str: str) -> Optional[Self]:
51
+ """Create an instance of LogsTailResponse from a JSON string"""
52
+ return cls.from_dict(json.loads(json_str))
53
+
54
+ def to_dict(self) -> Dict[str, Any]:
55
+ """Return the dictionary representation of the model using alias.
56
+
57
+ This has the following differences from calling pydantic's
58
+ `self.model_dump(by_alias=True)`:
59
+
60
+ * `None` is only added to the output dict for nullable fields that
61
+ were set at model initialization. Other fields with value `None`
62
+ are ignored.
63
+ """
64
+ excluded_fields: Set[str] = set([
65
+ ])
66
+
67
+ _dict = self.model_dump(
68
+ by_alias=True,
69
+ exclude=excluded_fields,
70
+ exclude_none=True,
71
+ )
72
+ # override the default output from pydantic by calling `to_dict()` of each item in logs (list)
73
+ _items = []
74
+ if self.logs:
75
+ for _item_logs in self.logs:
76
+ if _item_logs:
77
+ _items.append(_item_logs.to_dict())
78
+ _dict['logs'] = _items
79
+ return _dict
80
+
81
+ @classmethod
82
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
83
+ """Create an instance of LogsTailResponse from a dict"""
84
+ if obj is None:
85
+ return None
86
+
87
+ if not isinstance(obj, dict):
88
+ return cls.model_validate(obj)
89
+
90
+ _obj = cls.model_validate({
91
+ "logs": [LogsGetResponseLogsInner.from_dict(_item) for _item in obj["logs"]] if obj.get("logs") is not None else None
92
+ })
93
+ return _obj
94
+
95
+
@@ -0,0 +1,89 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ NotificationAPI
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, Optional
22
+ from typing import Optional, Set
23
+ from typing_extensions import Self
24
+
25
+ class MemberInviteRequest(BaseModel):
26
+ """
27
+ MemberInviteRequest
28
+ """ # noqa: E501
29
+ email: StrictStr
30
+ role: Optional[StrictStr] = None
31
+ __properties: ClassVar[List[str]] = ["email", "role"]
32
+
33
+ model_config = ConfigDict(
34
+ populate_by_name=True,
35
+ validate_assignment=True,
36
+ protected_namespaces=(),
37
+ )
38
+
39
+
40
+ def to_str(self) -> str:
41
+ """Returns the string representation of the model using alias"""
42
+ return pprint.pformat(self.model_dump(by_alias=True))
43
+
44
+ def to_json(self) -> str:
45
+ """Returns the JSON representation of the model using alias"""
46
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
47
+ return json.dumps(self.to_dict())
48
+
49
+ @classmethod
50
+ def from_json(cls, json_str: str) -> Optional[Self]:
51
+ """Create an instance of MemberInviteRequest from a JSON string"""
52
+ return cls.from_dict(json.loads(json_str))
53
+
54
+ def to_dict(self) -> Dict[str, Any]:
55
+ """Return the dictionary representation of the model using alias.
56
+
57
+ This has the following differences from calling pydantic's
58
+ `self.model_dump(by_alias=True)`:
59
+
60
+ * `None` is only added to the output dict for nullable fields that
61
+ were set at model initialization. Other fields with value `None`
62
+ are ignored.
63
+ """
64
+ excluded_fields: Set[str] = set([
65
+ ])
66
+
67
+ _dict = self.model_dump(
68
+ by_alias=True,
69
+ exclude=excluded_fields,
70
+ exclude_none=True,
71
+ )
72
+ return _dict
73
+
74
+ @classmethod
75
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
76
+ """Create an instance of MemberInviteRequest from a dict"""
77
+ if obj is None:
78
+ return None
79
+
80
+ if not isinstance(obj, dict):
81
+ return cls.model_validate(obj)
82
+
83
+ _obj = cls.model_validate({
84
+ "email": obj.get("email"),
85
+ "role": obj.get("role")
86
+ })
87
+ return _obj
88
+
89
+
@@ -0,0 +1,87 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ NotificationAPI
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 MemberUpdateRequest(BaseModel):
26
+ """
27
+ MemberUpdateRequest
28
+ """ # noqa: E501
29
+ role: StrictStr
30
+ __properties: ClassVar[List[str]] = ["role"]
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 MemberUpdateRequest 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 MemberUpdateRequest 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
+ "role": obj.get("role")
84
+ })
85
+ return _obj
86
+
87
+
@@ -0,0 +1,87 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ NotificationAPI
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 MessageResponse(BaseModel):
26
+ """
27
+ MessageResponse
28
+ """ # noqa: E501
29
+ message: StrictStr
30
+ __properties: ClassVar[List[str]] = ["message"]
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 MessageResponse 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 MessageResponse 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
+ "message": obj.get("message")
84
+ })
85
+ return _obj
86
+
87
+