api-sdk-py 1.11.66__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 (294) hide show
  1. api_sdk_py/__init__.py +312 -0
  2. api_sdk_py/api/__init__.py +18 -0
  3. api_sdk_py/api/canvases_api.py +1605 -0
  4. api_sdk_py/api/compositions_api.py +11616 -0
  5. api_sdk_py/api/credits_api.py +628 -0
  6. api_sdk_py/api/entitlements_api.py +676 -0
  7. api_sdk_py/api/invoices_api.py +357 -0
  8. api_sdk_py/api/managed_users_api.py +5087 -0
  9. api_sdk_py/api/operations_api.py +305 -0
  10. api_sdk_py/api/partner_api.py +41365 -0
  11. api_sdk_py/api/partners_api.py +11156 -0
  12. api_sdk_py/api/public_embed_api.py +1938 -0
  13. api_sdk_py/api/tokens_api.py +283 -0
  14. api_sdk_py/api/uploads_api.py +1507 -0
  15. api_sdk_py/api/users_api.py +3649 -0
  16. api_sdk_py/api/widgets_api.py +1300 -0
  17. api_sdk_py/api_client.py +797 -0
  18. api_sdk_py/api_response.py +21 -0
  19. api_sdk_py/configuration.py +526 -0
  20. api_sdk_py/exceptions.py +199 -0
  21. api_sdk_py/models/__init__.py +282 -0
  22. api_sdk_py/models/account_credit_balance.py +96 -0
  23. api_sdk_py/models/account_credit_balance_response.py +99 -0
  24. api_sdk_py/models/account_credit_transaction.py +120 -0
  25. api_sdk_py/models/adapter_connection.py +112 -0
  26. api_sdk_py/models/adapter_connection_removal.py +87 -0
  27. api_sdk_py/models/add_ai_answers_knowledge_document201_response.py +99 -0
  28. api_sdk_py/models/add_ai_answers_knowledge_document_request.py +90 -0
  29. api_sdk_py/models/add_domain_request.py +87 -0
  30. api_sdk_py/models/ai_answers_knowledge.py +101 -0
  31. api_sdk_py/models/ai_answers_knowledge_document.py +113 -0
  32. api_sdk_py/models/ai_answers_knowledge_removal.py +87 -0
  33. api_sdk_py/models/ai_answers_knowledge_totals.py +93 -0
  34. api_sdk_py/models/api_key_scope.py +44 -0
  35. api_sdk_py/models/canvas.py +112 -0
  36. api_sdk_py/models/canvas_response.py +99 -0
  37. api_sdk_py/models/check_composition_access_response.py +99 -0
  38. api_sdk_py/models/check_composition_access_response_data.py +89 -0
  39. api_sdk_py/models/composition.py +133 -0
  40. api_sdk_py/models/composition_data_source.py +90 -0
  41. api_sdk_py/models/composition_data_source_response.py +99 -0
  42. api_sdk_py/models/composition_entries_description.py +99 -0
  43. api_sdk_py/models/composition_entries_description_response.py +99 -0
  44. api_sdk_py/models/composition_entries_reading.py +126 -0
  45. api_sdk_py/models/composition_entries_reading_response.py +99 -0
  46. api_sdk_py/models/composition_entry_aggregate_tally.py +122 -0
  47. api_sdk_py/models/composition_entry_aggregates_block.py +99 -0
  48. api_sdk_py/models/composition_entry_column.py +89 -0
  49. api_sdk_py/models/composition_entry_delete_success.py +93 -0
  50. api_sdk_py/models/composition_entry_delete_success_data.py +87 -0
  51. api_sdk_py/models/composition_entry_item.py +111 -0
  52. api_sdk_py/models/composition_entry_items_meta.py +106 -0
  53. api_sdk_py/models/composition_entry_items_page_success.py +103 -0
  54. api_sdk_py/models/composition_entry_table.py +105 -0
  55. api_sdk_py/models/composition_entry_tally.py +95 -0
  56. api_sdk_py/models/composition_response.py +99 -0
  57. api_sdk_py/models/composition_version.py +96 -0
  58. api_sdk_py/models/content_check_finding.py +93 -0
  59. api_sdk_py/models/content_item_write_result.py +101 -0
  60. api_sdk_py/models/content_item_write_result_validation_result.py +91 -0
  61. api_sdk_py/models/copy_partner_preset_request.py +88 -0
  62. api_sdk_py/models/create_canvas_request.py +118 -0
  63. api_sdk_py/models/create_composition_content_item201_response.py +99 -0
  64. api_sdk_py/models/create_composition_content_item_request.py +101 -0
  65. api_sdk_py/models/create_composition_database_record201_response.py +95 -0
  66. api_sdk_py/models/create_composition_from_preset_request.py +100 -0
  67. api_sdk_py/models/create_composition_from_widget201_response.py +99 -0
  68. api_sdk_py/models/create_composition_from_widget_request.py +102 -0
  69. api_sdk_py/models/create_user_api_key_request.py +106 -0
  70. api_sdk_py/models/create_widget201_response.py +99 -0
  71. api_sdk_py/models/create_widget201_response_data.py +207 -0
  72. api_sdk_py/models/created_user_api_key.py +117 -0
  73. api_sdk_py/models/created_user_api_key_response.py +99 -0
  74. api_sdk_py/models/delete_composition_content_item_response.py +99 -0
  75. api_sdk_py/models/delete_composition_content_item_response_data.py +89 -0
  76. api_sdk_py/models/delete_composition_data_source_response.py +99 -0
  77. api_sdk_py/models/delete_composition_data_source_response_data.py +87 -0
  78. api_sdk_py/models/delete_managed_user200_response.py +99 -0
  79. api_sdk_py/models/delete_personal_workspace_domain_response.py +99 -0
  80. api_sdk_py/models/delete_personal_workspace_domain_response_data.py +87 -0
  81. api_sdk_py/models/delete_user_api_key_response.py +99 -0
  82. api_sdk_py/models/delete_user_api_key_response_data.py +87 -0
  83. api_sdk_py/models/design_defaults.py +92 -0
  84. api_sdk_py/models/duplicate_composition202_response.py +99 -0
  85. api_sdk_py/models/duplicate_composition202_response_data.py +87 -0
  86. api_sdk_py/models/duplicate_composition_request.py +89 -0
  87. api_sdk_py/models/editor_session.py +122 -0
  88. api_sdk_py/models/editor_session_response.py +99 -0
  89. api_sdk_py/models/entitlement.py +118 -0
  90. api_sdk_py/models/error_detail.py +104 -0
  91. api_sdk_py/models/error_response.py +108 -0
  92. api_sdk_py/models/export_composition_entry_items200_response.py +103 -0
  93. api_sdk_py/models/export_composition_entry_items200_response_meta.py +89 -0
  94. api_sdk_py/models/get_ai_answers_knowledge200_response.py +99 -0
  95. api_sdk_py/models/get_all_canvases_response.py +99 -0
  96. api_sdk_py/models/get_all_canvases_response_data.py +101 -0
  97. api_sdk_py/models/get_all_compositions200_response.py +103 -0
  98. api_sdk_py/models/get_all_managed_users200_response.py +103 -0
  99. api_sdk_py/models/get_composition_content_response.py +95 -0
  100. api_sdk_py/models/get_composition_content_schema_response.py +99 -0
  101. api_sdk_py/models/get_composition_content_schema_response_data.py +97 -0
  102. api_sdk_py/models/get_composition_data_source_response.py +104 -0
  103. api_sdk_py/models/get_composition_database_records200_response.py +95 -0
  104. api_sdk_py/models/get_composition_design_response.py +95 -0
  105. api_sdk_py/models/get_composition_design_schema_response.py +99 -0
  106. api_sdk_py/models/get_composition_design_schema_response_data.py +97 -0
  107. api_sdk_py/models/get_composition_embed_schema_response.py +99 -0
  108. api_sdk_py/models/get_composition_embed_schema_response_data.py +107 -0
  109. api_sdk_py/models/get_composition_embed_settings_response.py +95 -0
  110. api_sdk_py/models/get_composition_preview_response.py +99 -0
  111. api_sdk_py/models/get_composition_preview_response_data.py +93 -0
  112. api_sdk_py/models/get_composition_versions200_response.py +103 -0
  113. api_sdk_py/models/get_compositions_batch_request.py +88 -0
  114. api_sdk_py/models/get_compositions_batch_response.py +99 -0
  115. api_sdk_py/models/get_compositions_batch_response_data.py +105 -0
  116. api_sdk_py/models/get_invoices_by_partner_id200_response.py +103 -0
  117. api_sdk_py/models/get_managed_user_entitlements_response.py +99 -0
  118. api_sdk_py/models/get_managed_user_entitlements_response_data.py +97 -0
  119. api_sdk_py/models/get_managed_user_limits200_response.py +99 -0
  120. api_sdk_py/models/get_managed_user_storage_usage200_response.py +99 -0
  121. api_sdk_py/models/get_managed_user_storage_usage200_response_data.py +95 -0
  122. api_sdk_py/models/get_managed_user_storage_usage200_response_data_by_purpose.py +106 -0
  123. api_sdk_py/models/get_managed_users_by_manager_id_response.py +99 -0
  124. api_sdk_py/models/get_managed_users_by_manager_id_response_data.py +101 -0
  125. api_sdk_py/models/get_partner_billing_overview200_response.py +99 -0
  126. api_sdk_py/models/get_partner_credit_transactions200_response.py +103 -0
  127. api_sdk_py/models/get_partner_design_defaults200_response.py +99 -0
  128. api_sdk_py/models/get_partner_entitlements_response.py +99 -0
  129. api_sdk_py/models/get_partner_entitlements_response_data.py +97 -0
  130. api_sdk_py/models/get_personal_workspace_domains200_response.py +103 -0
  131. api_sdk_py/models/get_public_composition_embed200_response.py +133 -0
  132. api_sdk_py/models/get_public_composition_embed200_response_data_source.py +89 -0
  133. api_sdk_py/models/get_public_composition_embed200_response_direct.py +96 -0
  134. api_sdk_py/models/get_user_adapter_connections200_response.py +103 -0
  135. api_sdk_py/models/get_user_api_key_usage_logs_response.py +99 -0
  136. api_sdk_py/models/get_user_api_key_usage_logs_response_data.py +95 -0
  137. api_sdk_py/models/get_user_api_keys200_response.py +103 -0
  138. api_sdk_py/models/get_widgets200_response.py +103 -0
  139. api_sdk_py/models/get_widgets_batch_request.py +87 -0
  140. api_sdk_py/models/get_widgets_batch_response.py +99 -0
  141. api_sdk_py/models/get_widgets_batch_response_data.py +105 -0
  142. api_sdk_py/models/get_widgets_batch_response_data_errors_inner.py +89 -0
  143. api_sdk_py/models/list_partner_presets200_response.py +103 -0
  144. api_sdk_py/models/managed_user.py +105 -0
  145. api_sdk_py/models/managed_user_entries_meta.py +100 -0
  146. api_sdk_py/models/managed_user_entries_page_success.py +103 -0
  147. api_sdk_py/models/managed_user_entry_item.py +115 -0
  148. api_sdk_py/models/managed_user_limits.py +104 -0
  149. api_sdk_py/models/managed_user_operation_usage.py +95 -0
  150. api_sdk_py/models/managed_user_removal.py +89 -0
  151. api_sdk_py/models/managed_user_response.py +99 -0
  152. api_sdk_py/models/managed_user_usage.py +110 -0
  153. api_sdk_py/models/managed_user_usage_response.py +99 -0
  154. api_sdk_py/models/managed_user_usage_totals.py +93 -0
  155. api_sdk_py/models/my_partner.py +136 -0
  156. api_sdk_py/models/my_partners.py +112 -0
  157. api_sdk_py/models/my_partners_response.py +99 -0
  158. api_sdk_py/models/new_composition.py +108 -0
  159. api_sdk_py/models/new_editor_session.py +107 -0
  160. api_sdk_py/models/new_managed_user.py +91 -0
  161. api_sdk_py/models/new_widget.py +118 -0
  162. api_sdk_py/models/operations_id_get_response.py +99 -0
  163. api_sdk_py/models/operations_id_get_response_data.py +113 -0
  164. api_sdk_py/models/partner_analytics_by_managed_user.py +109 -0
  165. api_sdk_py/models/partner_analytics_by_managed_user_response.py +99 -0
  166. api_sdk_py/models/partner_analytics_of_day.py +94 -0
  167. api_sdk_py/models/partner_analytics_of_managed_user.py +126 -0
  168. api_sdk_py/models/partner_analytics_of_widget.py +102 -0
  169. api_sdk_py/models/partner_analytics_summary.py +110 -0
  170. api_sdk_py/models/partner_analytics_summary_response.py +99 -0
  171. api_sdk_py/models/partner_analytics_timeline.py +110 -0
  172. api_sdk_py/models/partner_analytics_timeline_response.py +99 -0
  173. api_sdk_py/models/partner_analytics_top_widgets.py +110 -0
  174. api_sdk_py/models/partner_analytics_top_widgets_response.py +99 -0
  175. api_sdk_py/models/partner_billing_overview.py +114 -0
  176. api_sdk_py/models/partner_billing_overview_billing_integration.py +100 -0
  177. api_sdk_py/models/partner_billing_overview_operational_credits.py +101 -0
  178. api_sdk_py/models/partner_billing_overview_partner.py +100 -0
  179. api_sdk_py/models/partner_contract.py +158 -0
  180. api_sdk_py/models/partner_contract_response.py +99 -0
  181. api_sdk_py/models/partner_customization.py +140 -0
  182. api_sdk_py/models/partner_data_database.py +112 -0
  183. api_sdk_py/models/partner_data_database_removal.py +87 -0
  184. api_sdk_py/models/partner_data_database_removal_response.py +99 -0
  185. api_sdk_py/models/partner_data_database_response.py +99 -0
  186. api_sdk_py/models/partner_entry_context_secret.py +93 -0
  187. api_sdk_py/models/partner_entry_context_secret_response.py +99 -0
  188. api_sdk_py/models/partner_entry_context_signing.py +108 -0
  189. api_sdk_py/models/partner_entry_context_signing_response.py +99 -0
  190. api_sdk_py/models/partner_extra_credits_invoice.py +130 -0
  191. api_sdk_py/models/partner_extra_credits_invoice_response.py +99 -0
  192. api_sdk_py/models/partner_invoice.py +234 -0
  193. api_sdk_py/models/partner_notification.py +108 -0
  194. api_sdk_py/models/partner_notification_default_recipients.py +89 -0
  195. api_sdk_py/models/partner_notification_delivery.py +170 -0
  196. api_sdk_py/models/partner_notification_delivery_log.py +95 -0
  197. api_sdk_py/models/partner_notification_delivery_log_response.py +99 -0
  198. api_sdk_py/models/partner_notification_delivery_response.py +99 -0
  199. api_sdk_py/models/partner_notification_event.py +112 -0
  200. api_sdk_py/models/partner_notification_event_type.py +51 -0
  201. api_sdk_py/models/partner_notification_page.py +103 -0
  202. api_sdk_py/models/partner_notification_page_response.py +99 -0
  203. api_sdk_py/models/partner_notification_settings.py +139 -0
  204. api_sdk_py/models/partner_notification_settings_change.py +98 -0
  205. api_sdk_py/models/partner_notification_settings_change_response.py +99 -0
  206. api_sdk_py/models/partner_notification_settings_response.py +99 -0
  207. api_sdk_py/models/partner_notification_test_event_request.py +88 -0
  208. api_sdk_py/models/partner_notification_test_event_result.py +98 -0
  209. api_sdk_py/models/partner_notification_test_event_result_response.py +99 -0
  210. api_sdk_py/models/partner_preset.py +119 -0
  211. api_sdk_py/models/partner_preset_copy.py +97 -0
  212. api_sdk_py/models/partner_preset_copy_response.py +99 -0
  213. api_sdk_py/models/partner_preset_removal.py +87 -0
  214. api_sdk_py/models/partner_preset_removal_response.py +99 -0
  215. api_sdk_py/models/partner_preset_response.py +99 -0
  216. api_sdk_py/models/partner_report_page.py +91 -0
  217. api_sdk_py/models/partner_report_period.py +90 -0
  218. api_sdk_py/models/partner_storage_destination.py +120 -0
  219. api_sdk_py/models/partner_storage_destination_response.py +99 -0
  220. api_sdk_py/models/partner_storage_removal.py +87 -0
  221. api_sdk_py/models/partner_storage_removal_response.py +99 -0
  222. api_sdk_py/models/partner_storage_usage.py +109 -0
  223. api_sdk_py/models/partner_storage_usage_of_managed_user.py +129 -0
  224. api_sdk_py/models/partner_storage_usage_response.py +99 -0
  225. api_sdk_py/models/partner_storage_usage_totals.py +93 -0
  226. api_sdk_py/models/personal_workspace_domain.py +96 -0
  227. api_sdk_py/models/personal_workspace_domain_result.py +93 -0
  228. api_sdk_py/models/personal_workspace_domain_result_response.py +99 -0
  229. api_sdk_py/models/post_public_composition_embed_status200_response.py +99 -0
  230. api_sdk_py/models/post_public_composition_embed_status200_response_data.py +97 -0
  231. api_sdk_py/models/post_public_composition_embed_status_request.py +88 -0
  232. api_sdk_py/models/public_adapter_call_error.py +93 -0
  233. api_sdk_py/models/public_adapter_call_request.py +113 -0
  234. api_sdk_py/models/public_adapter_call_result.py +93 -0
  235. api_sdk_py/models/public_adapter_call_result_data.py +87 -0
  236. api_sdk_py/models/public_adapter_file_result.py +93 -0
  237. api_sdk_py/models/public_adapter_file_result_data.py +91 -0
  238. api_sdk_py/models/public_adapter_file_result_data_file.py +108 -0
  239. api_sdk_py/models/public_composition_entry_created.py +93 -0
  240. api_sdk_py/models/public_composition_entry_created_data.py +92 -0
  241. api_sdk_py/models/public_composition_entry_request.py +101 -0
  242. api_sdk_py/models/public_embed_failure.py +105 -0
  243. api_sdk_py/models/public_embed_failure_details.py +112 -0
  244. api_sdk_py/models/public_embed_failure_error.py +98 -0
  245. api_sdk_py/models/purpose_storage_bucket.py +89 -0
  246. api_sdk_py/models/remove_ai_answers_knowledge_document200_response.py +99 -0
  247. api_sdk_py/models/remove_user_adapter_connection200_response.py +99 -0
  248. api_sdk_py/models/request_extra_credits.py +88 -0
  249. api_sdk_py/models/response_meta.py +121 -0
  250. api_sdk_py/models/revoke_managed_user_editor_sessions_response.py +99 -0
  251. api_sdk_py/models/revoke_managed_user_editor_sessions_response_data.py +87 -0
  252. api_sdk_py/models/set_adapter_connection_request.py +88 -0
  253. api_sdk_py/models/set_composition_data_source_request.py +90 -0
  254. api_sdk_py/models/set_dynamic_content_request.py +95 -0
  255. api_sdk_py/models/set_dynamic_content_response.py +99 -0
  256. api_sdk_py/models/set_dynamic_content_response_data.py +99 -0
  257. api_sdk_py/models/set_dynamic_content_response_data_validation_result.py +91 -0
  258. api_sdk_py/models/set_managed_user_limits_request.py +93 -0
  259. api_sdk_py/models/set_partner_data_database_request.py +87 -0
  260. api_sdk_py/models/set_partner_design_defaults_request.py +92 -0
  261. api_sdk_py/models/set_partner_preset_request.py +104 -0
  262. api_sdk_py/models/set_partner_storage_destination_request.py +101 -0
  263. api_sdk_py/models/set_user_adapter_connection200_response.py +99 -0
  264. api_sdk_py/models/success_response.py +95 -0
  265. api_sdk_py/models/update_canvas_request.py +96 -0
  266. api_sdk_py/models/update_composition.py +101 -0
  267. api_sdk_py/models/update_composition_status_request.py +94 -0
  268. api_sdk_py/models/update_domain_request.py +87 -0
  269. api_sdk_py/models/update_managed_user.py +91 -0
  270. api_sdk_py/models/update_partner_entry_context_signing_request.py +87 -0
  271. api_sdk_py/models/update_partner_notification_settings_request.py +110 -0
  272. api_sdk_py/models/update_user_api_key_request.py +90 -0
  273. api_sdk_py/models/upload.py +167 -0
  274. api_sdk_py/models/upload_limits.py +97 -0
  275. api_sdk_py/models/upload_limits_response.py +99 -0
  276. api_sdk_py/models/upload_response.py +99 -0
  277. api_sdk_py/models/uploads_get200_response.py +103 -0
  278. api_sdk_py/models/uploads_id_delete200_response.py +99 -0
  279. api_sdk_py/models/uploads_id_delete200_response_data.py +87 -0
  280. api_sdk_py/models/user_api_key.py +122 -0
  281. api_sdk_py/models/user_api_key_response.py +99 -0
  282. api_sdk_py/models/user_api_key_usage_log.py +107 -0
  283. api_sdk_py/models/validate_composition_content_response.py +99 -0
  284. api_sdk_py/models/validate_composition_content_response_data.py +108 -0
  285. api_sdk_py/models/validate_token200_response.py +99 -0
  286. api_sdk_py/models/validate_token200_response_data.py +106 -0
  287. api_sdk_py/models/widget.py +205 -0
  288. api_sdk_py/py.typed +0 -0
  289. api_sdk_py/rest.py +257 -0
  290. api_sdk_py-1.11.66.dist-info/METADATA +28 -0
  291. api_sdk_py-1.11.66.dist-info/RECORD +294 -0
  292. api_sdk_py-1.11.66.dist-info/WHEEL +5 -0
  293. api_sdk_py-1.11.66.dist-info/licenses/LICENSE +122 -0
  294. api_sdk_py-1.11.66.dist-info/top_level.txt +1 -0
@@ -0,0 +1,110 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Widgetic API Gateway
5
+
6
+ API documentation for the Widgetic API Gateway
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 datetime import datetime
21
+ from pydantic import BaseModel, ConfigDict, Field, StrictStr
22
+ from typing import Any, ClassVar, Dict, List
23
+ from api_sdk_py.models.managed_user_operation_usage import ManagedUserOperationUsage
24
+ from api_sdk_py.models.managed_user_usage_totals import ManagedUserUsageTotals
25
+ from typing import Optional, Set
26
+ from typing_extensions import Self
27
+
28
+ class ManagedUserUsage(BaseModel):
29
+ """
30
+ What a managed user's editor sessions spent over a period. Only credits taken through editor sessions are counted, from the day usage was first recorded: what you spend with your API key is not, and neither is anything from before.
31
+ """ # noqa: E501
32
+ managed_user_id: StrictStr = Field(alias="managedUserId")
33
+ managed_user_external_id: StrictStr = Field(description="Your own identifier for the managed user", alias="managedUserExternalId")
34
+ var_from: datetime = Field(description="Start of the period, included", alias="from")
35
+ to: datetime = Field(description="End of the period, not included")
36
+ totals: ManagedUserUsageTotals
37
+ operations: List[ManagedUserOperationUsage] = Field(description="One entry for each operation that was paid for in the period, in alphabetical order")
38
+ __properties: ClassVar[List[str]] = ["managedUserId", "managedUserExternalId", "from", "to", "totals", "operations"]
39
+
40
+ model_config = ConfigDict(
41
+ populate_by_name=True,
42
+ validate_assignment=True,
43
+ protected_namespaces=(),
44
+ )
45
+
46
+
47
+ def to_str(self) -> str:
48
+ """Returns the string representation of the model using alias"""
49
+ return pprint.pformat(self.model_dump(by_alias=True))
50
+
51
+ def to_json(self) -> str:
52
+ """Returns the JSON representation of the model using alias"""
53
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
54
+ return json.dumps(self.to_dict())
55
+
56
+ @classmethod
57
+ def from_json(cls, json_str: str) -> Optional[Self]:
58
+ """Create an instance of ManagedUserUsage from a JSON string"""
59
+ return cls.from_dict(json.loads(json_str))
60
+
61
+ def to_dict(self) -> Dict[str, Any]:
62
+ """Return the dictionary representation of the model using alias.
63
+
64
+ This has the following differences from calling pydantic's
65
+ `self.model_dump(by_alias=True)`:
66
+
67
+ * `None` is only added to the output dict for nullable fields that
68
+ were set at model initialization. Other fields with value `None`
69
+ are ignored.
70
+ """
71
+ excluded_fields: Set[str] = set([
72
+ ])
73
+
74
+ _dict = self.model_dump(
75
+ by_alias=True,
76
+ exclude=excluded_fields,
77
+ exclude_none=True,
78
+ )
79
+ # override the default output from pydantic by calling `to_dict()` of totals
80
+ if self.totals:
81
+ _dict['totals'] = self.totals.to_dict()
82
+ # override the default output from pydantic by calling `to_dict()` of each item in operations (list)
83
+ _items = []
84
+ if self.operations:
85
+ for _item_operations in self.operations:
86
+ if _item_operations:
87
+ _items.append(_item_operations.to_dict())
88
+ _dict['operations'] = _items
89
+ return _dict
90
+
91
+ @classmethod
92
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
93
+ """Create an instance of ManagedUserUsage from a dict"""
94
+ if obj is None:
95
+ return None
96
+
97
+ if not isinstance(obj, dict):
98
+ return cls.model_validate(obj)
99
+
100
+ _obj = cls.model_validate({
101
+ "managedUserId": obj.get("managedUserId"),
102
+ "managedUserExternalId": obj.get("managedUserExternalId"),
103
+ "from": obj.get("from"),
104
+ "to": obj.get("to"),
105
+ "totals": ManagedUserUsageTotals.from_dict(obj["totals"]) if obj.get("totals") is not None else None,
106
+ "operations": [ManagedUserOperationUsage.from_dict(_item) for _item in obj["operations"]] if obj.get("operations") is not None else None
107
+ })
108
+ return _obj
109
+
110
+
@@ -0,0 +1,99 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Widgetic API Gateway
5
+
6
+ API documentation for the Widgetic API Gateway
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, StrictBool
21
+ from typing import Any, ClassVar, Dict, List, Optional
22
+ from api_sdk_py.models.managed_user_usage import ManagedUserUsage
23
+ from api_sdk_py.models.response_meta import ResponseMeta
24
+ from typing import Optional, Set
25
+ from typing_extensions import Self
26
+
27
+ class ManagedUserUsageResponse(BaseModel):
28
+ """
29
+ ManagedUserUsageResponse
30
+ """ # noqa: E501
31
+ success: StrictBool = Field(description="Always `true` on a success.")
32
+ data: ManagedUserUsage
33
+ meta: Optional[ResponseMeta] = None
34
+ __properties: ClassVar[List[str]] = ["success", "data", "meta"]
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 ManagedUserUsageResponse 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 data
76
+ if self.data:
77
+ _dict['data'] = self.data.to_dict()
78
+ # override the default output from pydantic by calling `to_dict()` of meta
79
+ if self.meta:
80
+ _dict['meta'] = self.meta.to_dict()
81
+ return _dict
82
+
83
+ @classmethod
84
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
85
+ """Create an instance of ManagedUserUsageResponse from a dict"""
86
+ if obj is None:
87
+ return None
88
+
89
+ if not isinstance(obj, dict):
90
+ return cls.model_validate(obj)
91
+
92
+ _obj = cls.model_validate({
93
+ "success": obj.get("success"),
94
+ "data": ManagedUserUsage.from_dict(obj["data"]) if obj.get("data") is not None else None,
95
+ "meta": ResponseMeta.from_dict(obj["meta"]) if obj.get("meta") is not None else None
96
+ })
97
+ return _obj
98
+
99
+
@@ -0,0 +1,93 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Widgetic API Gateway
5
+
6
+ API documentation for the Widgetic API Gateway
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, StrictInt
21
+ from typing import Any, ClassVar, Dict, List
22
+ from typing import Optional, Set
23
+ from typing_extensions import Self
24
+
25
+ class ManagedUserUsageTotals(BaseModel):
26
+ """
27
+ All operations together
28
+ """ # noqa: E501
29
+ calls: StrictInt
30
+ credits: StrictInt
31
+ refunded_calls: StrictInt = Field(alias="refundedCalls")
32
+ refunded_credits: StrictInt = Field(alias="refundedCredits")
33
+ __properties: ClassVar[List[str]] = ["calls", "credits", "refundedCalls", "refundedCredits"]
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 ManagedUserUsageTotals 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 ManagedUserUsageTotals 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
+ "calls": obj.get("calls"),
87
+ "credits": obj.get("credits"),
88
+ "refundedCalls": obj.get("refundedCalls"),
89
+ "refundedCredits": obj.get("refundedCredits")
90
+ })
91
+ return _obj
92
+
93
+
@@ -0,0 +1,136 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Widgetic API Gateway
5
+
6
+ API documentation for the Widgetic API Gateway
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 datetime import datetime
21
+ from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
22
+ from typing import Any, ClassVar, Dict, List, Optional
23
+ from typing import Optional, Set
24
+ from typing_extensions import Self
25
+
26
+ class MyPartner(BaseModel):
27
+ """
28
+ A partner as the person who administers it reads it: which partner it is, what standing it is in, and why it is paused when it is. The webhook address, its secret and the billing settings have their own routes and are not part of it.
29
+ """ # noqa: E501
30
+ id: StrictStr = Field(description="The id every other partner route asks for (`/partners/{partnerId}/...`)")
31
+ name: StrictStr
32
+ status: StrictStr = Field(description="`active` while the partner is in force. `inactive` until Widgetic activates it (and after a deactivation). `suspended` while it is paused, which is done by hand and comes back when Widgetic resumes it. ")
33
+ contact_email: Optional[StrictStr] = Field(default=None, alias="contactEmail")
34
+ allowed_domains: List[StrictStr] = Field(description="The domains Widgetic added to the embeds of this partner's customers. The domains the person added themselves are on the domains route of the account. ", alias="allowedDomains")
35
+ platform_domain: Optional[StrictStr] = Field(description="The website where the partner integrates Widgetic, as a bare name. It and every subdomain of it (`app.acme.com`, `learn.eu.acme.com`) can always show the partner's widgets, the ones its customers make through it included, and send entries to them, whatever `allowedDomains` and the account's own domain list say, so a list can never lock the partner's own website out. It is not an entry of `allowedDomains`, and it does not turn an empty list into a restriction: a partner that lists nothing stays unrestricted for every website. Widgetic sets it when the partner is set up; contact Widgetic to change it. `null` when none has been set. ", alias="platformDomain")
36
+ suspended_at: Optional[datetime] = Field(description="When the partner was paused; null unless it is paused now", alias="suspendedAt")
37
+ suspension_reason: Optional[StrictStr] = Field(description="The reason given when the partner was paused, as the partner is told it; null unless it is paused now", alias="suspensionReason")
38
+ created_at: Optional[datetime] = Field(default=None, alias="createdAt")
39
+ __properties: ClassVar[List[str]] = ["id", "name", "status", "contactEmail", "allowedDomains", "platformDomain", "suspendedAt", "suspensionReason", "createdAt"]
40
+
41
+ @field_validator('status')
42
+ def status_validate_enum(cls, value):
43
+ """Validates the enum"""
44
+ if value not in set(['active', 'inactive', 'suspended']):
45
+ raise ValueError("must be one of enum values ('active', 'inactive', 'suspended')")
46
+ return value
47
+
48
+ model_config = ConfigDict(
49
+ populate_by_name=True,
50
+ validate_assignment=True,
51
+ protected_namespaces=(),
52
+ )
53
+
54
+
55
+ def to_str(self) -> str:
56
+ """Returns the string representation of the model using alias"""
57
+ return pprint.pformat(self.model_dump(by_alias=True))
58
+
59
+ def to_json(self) -> str:
60
+ """Returns the JSON representation of the model using alias"""
61
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
62
+ return json.dumps(self.to_dict())
63
+
64
+ @classmethod
65
+ def from_json(cls, json_str: str) -> Optional[Self]:
66
+ """Create an instance of MyPartner from a JSON string"""
67
+ return cls.from_dict(json.loads(json_str))
68
+
69
+ def to_dict(self) -> Dict[str, Any]:
70
+ """Return the dictionary representation of the model using alias.
71
+
72
+ This has the following differences from calling pydantic's
73
+ `self.model_dump(by_alias=True)`:
74
+
75
+ * `None` is only added to the output dict for nullable fields that
76
+ were set at model initialization. Other fields with value `None`
77
+ are ignored.
78
+ """
79
+ excluded_fields: Set[str] = set([
80
+ ])
81
+
82
+ _dict = self.model_dump(
83
+ by_alias=True,
84
+ exclude=excluded_fields,
85
+ exclude_none=True,
86
+ )
87
+ # set to None if contact_email (nullable) is None
88
+ # and model_fields_set contains the field
89
+ if self.contact_email is None and "contact_email" in self.model_fields_set:
90
+ _dict['contactEmail'] = None
91
+
92
+ # set to None if platform_domain (nullable) is None
93
+ # and model_fields_set contains the field
94
+ if self.platform_domain is None and "platform_domain" in self.model_fields_set:
95
+ _dict['platformDomain'] = None
96
+
97
+ # set to None if suspended_at (nullable) is None
98
+ # and model_fields_set contains the field
99
+ if self.suspended_at is None and "suspended_at" in self.model_fields_set:
100
+ _dict['suspendedAt'] = None
101
+
102
+ # set to None if suspension_reason (nullable) is None
103
+ # and model_fields_set contains the field
104
+ if self.suspension_reason is None and "suspension_reason" in self.model_fields_set:
105
+ _dict['suspensionReason'] = None
106
+
107
+ # set to None if created_at (nullable) is None
108
+ # and model_fields_set contains the field
109
+ if self.created_at is None and "created_at" in self.model_fields_set:
110
+ _dict['createdAt'] = None
111
+
112
+ return _dict
113
+
114
+ @classmethod
115
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
116
+ """Create an instance of MyPartner from a dict"""
117
+ if obj is None:
118
+ return None
119
+
120
+ if not isinstance(obj, dict):
121
+ return cls.model_validate(obj)
122
+
123
+ _obj = cls.model_validate({
124
+ "id": obj.get("id"),
125
+ "name": obj.get("name"),
126
+ "status": obj.get("status"),
127
+ "contactEmail": obj.get("contactEmail"),
128
+ "allowedDomains": obj.get("allowedDomains"),
129
+ "platformDomain": obj.get("platformDomain"),
130
+ "suspendedAt": obj.get("suspendedAt"),
131
+ "suspensionReason": obj.get("suspensionReason"),
132
+ "createdAt": obj.get("createdAt")
133
+ })
134
+ return _obj
135
+
136
+
@@ -0,0 +1,112 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Widgetic API Gateway
5
+
6
+ API documentation for the Widgetic API Gateway
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 datetime import datetime
21
+ from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
22
+ from typing import Any, ClassVar, Dict, List, Optional
23
+ from api_sdk_py.models.my_partner import MyPartner
24
+ from typing import Optional, Set
25
+ from typing_extensions import Self
26
+
27
+ class MyPartners(BaseModel):
28
+ """
29
+ MyPartners
30
+ """ # noqa: E501
31
+ standing: StrictStr = Field(description="The standing of the account as a whole, the word every gate reads: `not_a_partner` when the account administers no partner; otherwise `active` when any of its partners is in force, else `payment_arrears` when the partners that are active each have a contract invoice that is past its due date and unpaid, else `suspended` when any is paused, else `inactive`. `payment_arrears` is not set by anybody: it stops the same things a pause stops (billing, invoices, credits and the other routes a partner needs to pay stay open) and ends by itself the moment the invoice is paid. ")
32
+ overdue_since: Optional[datetime] = Field(description="When the oldest overdue contract invoice was due; null unless `standing` is `payment_arrears`. Pay the invoices in the list of `GET /invoices/partner/{partnerId}` that are past their due date to end it. ", alias="overdueSince")
33
+ partners: List[MyPartner] = Field(description="The partners the account administers (nearly always one), the oldest first")
34
+ __properties: ClassVar[List[str]] = ["standing", "overdueSince", "partners"]
35
+
36
+ @field_validator('standing')
37
+ def standing_validate_enum(cls, value):
38
+ """Validates the enum"""
39
+ if value not in set(['not_a_partner', 'inactive', 'active', 'suspended', 'payment_arrears']):
40
+ raise ValueError("must be one of enum values ('not_a_partner', 'inactive', 'active', 'suspended', 'payment_arrears')")
41
+ return value
42
+
43
+ model_config = ConfigDict(
44
+ populate_by_name=True,
45
+ validate_assignment=True,
46
+ protected_namespaces=(),
47
+ )
48
+
49
+
50
+ def to_str(self) -> str:
51
+ """Returns the string representation of the model using alias"""
52
+ return pprint.pformat(self.model_dump(by_alias=True))
53
+
54
+ def to_json(self) -> str:
55
+ """Returns the JSON representation of the model using alias"""
56
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
57
+ return json.dumps(self.to_dict())
58
+
59
+ @classmethod
60
+ def from_json(cls, json_str: str) -> Optional[Self]:
61
+ """Create an instance of MyPartners from a JSON string"""
62
+ return cls.from_dict(json.loads(json_str))
63
+
64
+ def to_dict(self) -> Dict[str, Any]:
65
+ """Return the dictionary representation of the model using alias.
66
+
67
+ This has the following differences from calling pydantic's
68
+ `self.model_dump(by_alias=True)`:
69
+
70
+ * `None` is only added to the output dict for nullable fields that
71
+ were set at model initialization. Other fields with value `None`
72
+ are ignored.
73
+ """
74
+ excluded_fields: Set[str] = set([
75
+ ])
76
+
77
+ _dict = self.model_dump(
78
+ by_alias=True,
79
+ exclude=excluded_fields,
80
+ exclude_none=True,
81
+ )
82
+ # override the default output from pydantic by calling `to_dict()` of each item in partners (list)
83
+ _items = []
84
+ if self.partners:
85
+ for _item_partners in self.partners:
86
+ if _item_partners:
87
+ _items.append(_item_partners.to_dict())
88
+ _dict['partners'] = _items
89
+ # set to None if overdue_since (nullable) is None
90
+ # and model_fields_set contains the field
91
+ if self.overdue_since is None and "overdue_since" in self.model_fields_set:
92
+ _dict['overdueSince'] = None
93
+
94
+ return _dict
95
+
96
+ @classmethod
97
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
98
+ """Create an instance of MyPartners from a dict"""
99
+ if obj is None:
100
+ return None
101
+
102
+ if not isinstance(obj, dict):
103
+ return cls.model_validate(obj)
104
+
105
+ _obj = cls.model_validate({
106
+ "standing": obj.get("standing"),
107
+ "overdueSince": obj.get("overdueSince"),
108
+ "partners": [MyPartner.from_dict(_item) for _item in obj["partners"]] if obj.get("partners") is not None else None
109
+ })
110
+ return _obj
111
+
112
+
@@ -0,0 +1,99 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Widgetic API Gateway
5
+
6
+ API documentation for the Widgetic API Gateway
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, StrictBool
21
+ from typing import Any, ClassVar, Dict, List, Optional
22
+ from api_sdk_py.models.my_partners import MyPartners
23
+ from api_sdk_py.models.response_meta import ResponseMeta
24
+ from typing import Optional, Set
25
+ from typing_extensions import Self
26
+
27
+ class MyPartnersResponse(BaseModel):
28
+ """
29
+ MyPartnersResponse
30
+ """ # noqa: E501
31
+ success: StrictBool = Field(description="Always `true` on a success.")
32
+ data: MyPartners
33
+ meta: Optional[ResponseMeta] = None
34
+ __properties: ClassVar[List[str]] = ["success", "data", "meta"]
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 MyPartnersResponse 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 data
76
+ if self.data:
77
+ _dict['data'] = self.data.to_dict()
78
+ # override the default output from pydantic by calling `to_dict()` of meta
79
+ if self.meta:
80
+ _dict['meta'] = self.meta.to_dict()
81
+ return _dict
82
+
83
+ @classmethod
84
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
85
+ """Create an instance of MyPartnersResponse from a dict"""
86
+ if obj is None:
87
+ return None
88
+
89
+ if not isinstance(obj, dict):
90
+ return cls.model_validate(obj)
91
+
92
+ _obj = cls.model_validate({
93
+ "success": obj.get("success"),
94
+ "data": MyPartners.from_dict(obj["data"]) if obj.get("data") is not None else None,
95
+ "meta": ResponseMeta.from_dict(obj["meta"]) if obj.get("meta") is not None else None
96
+ })
97
+ return _obj
98
+
99
+