pidgeon 1.0.0__tar.gz

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 (387) hide show
  1. pidgeon-1.0.0/PKG-INFO +141 -0
  2. pidgeon-1.0.0/README.md +122 -0
  3. pidgeon-1.0.0/pidgeon/__init__.py +8 -0
  4. pidgeon-1.0.0/pidgeon/api/__init__.py +1 -0
  5. pidgeon-1.0.0/pidgeon/api/agent/__init__.py +1 -0
  6. pidgeon-1.0.0/pidgeon/api/agent/agent_attach_human.py +184 -0
  7. pidgeon-1.0.0/pidgeon/api/agent/agent_sign_up.py +196 -0
  8. pidgeon-1.0.0/pidgeon/api/agent/agent_verify.py +192 -0
  9. pidgeon-1.0.0/pidgeon/api/app_passwords/__init__.py +1 -0
  10. pidgeon-1.0.0/pidgeon/api/app_passwords/app_passwords_create.py +192 -0
  11. pidgeon-1.0.0/pidgeon/api/app_passwords/app_passwords_list.py +178 -0
  12. pidgeon-1.0.0/pidgeon/api/app_passwords/app_passwords_revoke.py +171 -0
  13. pidgeon-1.0.0/pidgeon/api/attachments/__init__.py +1 -0
  14. pidgeon-1.0.0/pidgeon/api/attachments/attachments_download_url.py +183 -0
  15. pidgeon-1.0.0/pidgeon/api/attachments/attachments_upload.py +192 -0
  16. pidgeon-1.0.0/pidgeon/api/calendar/__init__.py +1 -0
  17. pidgeon-1.0.0/pidgeon/api/calendar/calendar_create_event.py +212 -0
  18. pidgeon-1.0.0/pidgeon/api/calendar/calendar_delete_event.py +244 -0
  19. pidgeon-1.0.0/pidgeon/api/calendar/calendar_get.py +183 -0
  20. pidgeon-1.0.0/pidgeon/api/calendar/calendar_get_agenda.py +269 -0
  21. pidgeon-1.0.0/pidgeon/api/calendar/calendar_get_event.py +185 -0
  22. pidgeon-1.0.0/pidgeon/api/calendar/calendar_list_event_instances.py +263 -0
  23. pidgeon-1.0.0/pidgeon/api/calendar/calendar_list_events.py +223 -0
  24. pidgeon-1.0.0/pidgeon/api/calendar/calendar_respond_to_event.py +249 -0
  25. pidgeon-1.0.0/pidgeon/api/calendar/calendar_update.py +219 -0
  26. pidgeon-1.0.0/pidgeon/api/calendar/calendar_update_event.py +262 -0
  27. pidgeon-1.0.0/pidgeon/api/domains/__init__.py +1 -0
  28. pidgeon-1.0.0/pidgeon/api/domains/domains_create.py +200 -0
  29. pidgeon-1.0.0/pidgeon/api/domains/domains_delete.py +179 -0
  30. pidgeon-1.0.0/pidgeon/api/domains/domains_get.py +187 -0
  31. pidgeon-1.0.0/pidgeon/api/domains/domains_get_setup_link.py +249 -0
  32. pidgeon-1.0.0/pidgeon/api/domains/domains_list.py +195 -0
  33. pidgeon-1.0.0/pidgeon/api/domains/domains_update.py +208 -0
  34. pidgeon-1.0.0/pidgeon/api/domains/domains_verify.py +191 -0
  35. pidgeon-1.0.0/pidgeon/api/domains/domains_zone_file.py +181 -0
  36. pidgeon-1.0.0/pidgeon/api/drafts/__init__.py +1 -0
  37. pidgeon-1.0.0/pidgeon/api/drafts/drafts_cancel_schedule.py +171 -0
  38. pidgeon-1.0.0/pidgeon/api/drafts/drafts_create.py +192 -0
  39. pidgeon-1.0.0/pidgeon/api/drafts/drafts_delete.py +171 -0
  40. pidgeon-1.0.0/pidgeon/api/drafts/drafts_get.py +171 -0
  41. pidgeon-1.0.0/pidgeon/api/drafts/drafts_list.py +209 -0
  42. pidgeon-1.0.0/pidgeon/api/drafts/drafts_remove_attachment.py +201 -0
  43. pidgeon-1.0.0/pidgeon/api/drafts/drafts_schedule.py +208 -0
  44. pidgeon-1.0.0/pidgeon/api/drafts/drafts_send.py +191 -0
  45. pidgeon-1.0.0/pidgeon/api/drafts/drafts_update.py +204 -0
  46. pidgeon-1.0.0/pidgeon/api/events/__init__.py +1 -0
  47. pidgeon-1.0.0/pidgeon/api/events/events_get.py +171 -0
  48. pidgeon-1.0.0/pidgeon/api/events/events_list.py +291 -0
  49. pidgeon-1.0.0/pidgeon/api/identities/__init__.py +1 -0
  50. pidgeon-1.0.0/pidgeon/api/identities/identities_access_create.py +212 -0
  51. pidgeon-1.0.0/pidgeon/api/identities/identities_access_delete.py +202 -0
  52. pidgeon-1.0.0/pidgeon/api/identities/identities_access_get.py +183 -0
  53. pidgeon-1.0.0/pidgeon/api/identities/identities_create.py +188 -0
  54. pidgeon-1.0.0/pidgeon/api/identities/identities_delete.py +179 -0
  55. pidgeon-1.0.0/pidgeon/api/identities/identities_get.py +171 -0
  56. pidgeon-1.0.0/pidgeon/api/identities/identities_list.py +222 -0
  57. pidgeon-1.0.0/pidgeon/api/identities/identities_send_rules_create.py +216 -0
  58. pidgeon-1.0.0/pidgeon/api/identities/identities_send_rules_delete.py +202 -0
  59. pidgeon-1.0.0/pidgeon/api/identities/identities_send_rules_get.py +187 -0
  60. pidgeon-1.0.0/pidgeon/api/identities/identities_suspend_tenant.py +191 -0
  61. pidgeon-1.0.0/pidgeon/api/identities/identities_update.py +192 -0
  62. pidgeon-1.0.0/pidgeon/api/keys/__init__.py +1 -0
  63. pidgeon-1.0.0/pidgeon/api/keys/keys_create.py +188 -0
  64. pidgeon-1.0.0/pidgeon/api/keys/keys_get.py +183 -0
  65. pidgeon-1.0.0/pidgeon/api/keys/keys_list.py +156 -0
  66. pidgeon-1.0.0/pidgeon/api/keys/keys_revoke.py +183 -0
  67. pidgeon-1.0.0/pidgeon/api/keys/keys_update.py +208 -0
  68. pidgeon-1.0.0/pidgeon/api/labels/__init__.py +1 -0
  69. pidgeon-1.0.0/pidgeon/api/labels/labels_create.py +176 -0
  70. pidgeon-1.0.0/pidgeon/api/labels/labels_delete.py +179 -0
  71. pidgeon-1.0.0/pidgeon/api/labels/labels_list.py +186 -0
  72. pidgeon-1.0.0/pidgeon/api/labels/labels_update.py +200 -0
  73. pidgeon-1.0.0/pidgeon/api/mailboxes/__init__.py +1 -0
  74. pidgeon-1.0.0/pidgeon/api/mailboxes/mailboxes_changes.py +236 -0
  75. pidgeon-1.0.0/pidgeon/api/mailboxes/mailboxes_empty_trash.py +214 -0
  76. pidgeon-1.0.0/pidgeon/api/mailboxes/mailboxes_list.py +188 -0
  77. pidgeon-1.0.0/pidgeon/api/mailboxes/mailboxes_list_folder.py +258 -0
  78. pidgeon-1.0.0/pidgeon/api/messages/__init__.py +1 -0
  79. pidgeon-1.0.0/pidgeon/api/messages/messages_act.py +188 -0
  80. pidgeon-1.0.0/pidgeon/api/messages/messages_forward.py +200 -0
  81. pidgeon-1.0.0/pidgeon/api/messages/messages_get.py +171 -0
  82. pidgeon-1.0.0/pidgeon/api/messages/messages_list_in_thread.py +212 -0
  83. pidgeon-1.0.0/pidgeon/api/messages/messages_raw.py +173 -0
  84. pidgeon-1.0.0/pidgeon/api/messages/messages_reply.py +204 -0
  85. pidgeon-1.0.0/pidgeon/api/messages/messages_reply_all.py +204 -0
  86. pidgeon-1.0.0/pidgeon/api/messages/messages_respond_to_invitation.py +222 -0
  87. pidgeon-1.0.0/pidgeon/api/messages/messages_search.py +333 -0
  88. pidgeon-1.0.0/pidgeon/api/messages/messages_send.py +184 -0
  89. pidgeon-1.0.0/pidgeon/api/messages/messages_undo.py +188 -0
  90. pidgeon-1.0.0/pidgeon/api/messages/messages_update.py +204 -0
  91. pidgeon-1.0.0/pidgeon/api/metrics/__init__.py +1 -0
  92. pidgeon-1.0.0/pidgeon/api/metrics/metrics_query.py +215 -0
  93. pidgeon-1.0.0/pidgeon/api/routing/__init__.py +1 -0
  94. pidgeon-1.0.0/pidgeon/api/routing/routing_create.py +199 -0
  95. pidgeon-1.0.0/pidgeon/api/routing/routing_delete.py +171 -0
  96. pidgeon-1.0.0/pidgeon/api/routing/routing_list.py +188 -0
  97. pidgeon-1.0.0/pidgeon/api/routing/routing_update.py +208 -0
  98. pidgeon-1.0.0/pidgeon/api/threads/__init__.py +1 -0
  99. pidgeon-1.0.0/pidgeon/api/threads/threads_get.py +183 -0
  100. pidgeon-1.0.0/pidgeon/api/threads/threads_labels_create.py +200 -0
  101. pidgeon-1.0.0/pidgeon/api/threads/threads_labels_delete.py +202 -0
  102. pidgeon-1.0.0/pidgeon/api/threads/threads_labels_get.py +171 -0
  103. pidgeon-1.0.0/pidgeon/api/threads/threads_list.py +211 -0
  104. pidgeon-1.0.0/pidgeon/api/threads/threads_update.py +200 -0
  105. pidgeon-1.0.0/pidgeon/api/webhooks/__init__.py +1 -0
  106. pidgeon-1.0.0/pidgeon/api/webhooks/webhooks_create.py +188 -0
  107. pidgeon-1.0.0/pidgeon/api/webhooks/webhooks_delete.py +171 -0
  108. pidgeon-1.0.0/pidgeon/api/webhooks/webhooks_deliveries.py +205 -0
  109. pidgeon-1.0.0/pidgeon/api/webhooks/webhooks_get.py +171 -0
  110. pidgeon-1.0.0/pidgeon/api/webhooks/webhooks_get_headers.py +183 -0
  111. pidgeon-1.0.0/pidgeon/api/webhooks/webhooks_list.py +195 -0
  112. pidgeon-1.0.0/pidgeon/api/webhooks/webhooks_replay.py +183 -0
  113. pidgeon-1.0.0/pidgeon/api/webhooks/webhooks_update.py +208 -0
  114. pidgeon-1.0.0/pidgeon/api/webhooks/webhooks_update_headers.py +212 -0
  115. pidgeon-1.0.0/pidgeon/api/workspace/__init__.py +1 -0
  116. pidgeon-1.0.0/pidgeon/api/workspace/workspace_get.py +160 -0
  117. pidgeon-1.0.0/pidgeon/api/workspace/workspace_members.py +164 -0
  118. pidgeon-1.0.0/pidgeon/client.py +268 -0
  119. pidgeon-1.0.0/pidgeon/errors.py +16 -0
  120. pidgeon-1.0.0/pidgeon/models/__init__.py +531 -0
  121. pidgeon-1.0.0/pidgeon/models/address.py +65 -0
  122. pidgeon-1.0.0/pidgeon/models/agent_attach_human_body.py +70 -0
  123. pidgeon-1.0.0/pidgeon/models/agent_attach_human_response_200.py +67 -0
  124. pidgeon-1.0.0/pidgeon/models/agent_sign_up_body.py +91 -0
  125. pidgeon-1.0.0/pidgeon/models/agent_sign_up_response_201.py +67 -0
  126. pidgeon-1.0.0/pidgeon/models/agent_signup.py +80 -0
  127. pidgeon-1.0.0/pidgeon/models/agent_verified.py +58 -0
  128. pidgeon-1.0.0/pidgeon/models/agent_verify_body.py +70 -0
  129. pidgeon-1.0.0/pidgeon/models/agent_verify_response_200.py +67 -0
  130. pidgeon-1.0.0/pidgeon/models/api_key.py +126 -0
  131. pidgeon-1.0.0/pidgeon/models/api_key_access.py +10 -0
  132. pidgeon-1.0.0/pidgeon/models/app_password.py +94 -0
  133. pidgeon-1.0.0/pidgeon/models/app_passwords_create_body.py +51 -0
  134. pidgeon-1.0.0/pidgeon/models/app_passwords_create_response_201.py +67 -0
  135. pidgeon-1.0.0/pidgeon/models/app_passwords_list_response_200.py +97 -0
  136. pidgeon-1.0.0/pidgeon/models/app_passwords_revoke_response_200.py +67 -0
  137. pidgeon-1.0.0/pidgeon/models/attachment.py +74 -0
  138. pidgeon-1.0.0/pidgeon/models/attachment_url.py +50 -0
  139. pidgeon-1.0.0/pidgeon/models/attachments_download_url_response_200.py +67 -0
  140. pidgeon-1.0.0/pidgeon/models/attachments_upload_body.py +85 -0
  141. pidgeon-1.0.0/pidgeon/models/attachments_upload_response_201.py +67 -0
  142. pidgeon-1.0.0/pidgeon/models/calendar.py +90 -0
  143. pidgeon-1.0.0/pidgeon/models/calendar_create_event_body.py +244 -0
  144. pidgeon-1.0.0/pidgeon/models/calendar_create_event_body_attendees_item.py +110 -0
  145. pidgeon-1.0.0/pidgeon/models/calendar_create_event_body_attendees_item_status.py +11 -0
  146. pidgeon-1.0.0/pidgeon/models/calendar_create_event_body_recurrence_type_0.py +85 -0
  147. pidgeon-1.0.0/pidgeon/models/calendar_create_event_body_status.py +10 -0
  148. pidgeon-1.0.0/pidgeon/models/calendar_create_event_response_201.py +67 -0
  149. pidgeon-1.0.0/pidgeon/models/calendar_delete_event_mode.py +9 -0
  150. pidgeon-1.0.0/pidgeon/models/calendar_delete_event_response_200.py +67 -0
  151. pidgeon-1.0.0/pidgeon/models/calendar_event.py +342 -0
  152. pidgeon-1.0.0/pidgeon/models/calendar_event_attendees_item.py +72 -0
  153. pidgeon-1.0.0/pidgeon/models/calendar_event_duration_mode.py +9 -0
  154. pidgeon-1.0.0/pidgeon/models/calendar_event_kind.py +10 -0
  155. pidgeon-1.0.0/pidgeon/models/calendar_event_recurrence_type_0.py +72 -0
  156. pidgeon-1.0.0/pidgeon/models/calendar_event_source.py +9 -0
  157. pidgeon-1.0.0/pidgeon/models/calendar_event_status.py +10 -0
  158. pidgeon-1.0.0/pidgeon/models/calendar_get_agenda_include_overlapping.py +9 -0
  159. pidgeon-1.0.0/pidgeon/models/calendar_get_agenda_response_200.py +97 -0
  160. pidgeon-1.0.0/pidgeon/models/calendar_get_event_response_200.py +67 -0
  161. pidgeon-1.0.0/pidgeon/models/calendar_get_response_200.py +67 -0
  162. pidgeon-1.0.0/pidgeon/models/calendar_list_event_instances_response_200.py +97 -0
  163. pidgeon-1.0.0/pidgeon/models/calendar_list_events_response_200.py +97 -0
  164. pidgeon-1.0.0/pidgeon/models/calendar_respond_to_event_body.py +82 -0
  165. pidgeon-1.0.0/pidgeon/models/calendar_respond_to_event_body_status.py +10 -0
  166. pidgeon-1.0.0/pidgeon/models/calendar_respond_to_event_response_200.py +67 -0
  167. pidgeon-1.0.0/pidgeon/models/calendar_update_body.py +61 -0
  168. pidgeon-1.0.0/pidgeon/models/calendar_update_event_body.py +233 -0
  169. pidgeon-1.0.0/pidgeon/models/calendar_update_event_body_attendees_item.py +110 -0
  170. pidgeon-1.0.0/pidgeon/models/calendar_update_event_body_attendees_item_status.py +11 -0
  171. pidgeon-1.0.0/pidgeon/models/calendar_update_event_body_recurrence_type_0.py +85 -0
  172. pidgeon-1.0.0/pidgeon/models/calendar_update_event_body_status.py +10 -0
  173. pidgeon-1.0.0/pidgeon/models/calendar_update_event_mode.py +9 -0
  174. pidgeon-1.0.0/pidgeon/models/calendar_update_event_response_200.py +67 -0
  175. pidgeon-1.0.0/pidgeon/models/calendar_update_response_200.py +67 -0
  176. pidgeon-1.0.0/pidgeon/models/deleted.py +50 -0
  177. pidgeon-1.0.0/pidgeon/models/delivery.py +152 -0
  178. pidgeon-1.0.0/pidgeon/models/dns_record.py +126 -0
  179. pidgeon-1.0.0/pidgeon/models/dns_record_status.py +11 -0
  180. pidgeon-1.0.0/pidgeon/models/domain.py +96 -0
  181. pidgeon-1.0.0/pidgeon/models/domain_detail.py +126 -0
  182. pidgeon-1.0.0/pidgeon/models/domain_detail_dns_records_item.py +126 -0
  183. pidgeon-1.0.0/pidgeon/models/domain_detail_dns_records_item_status.py +11 -0
  184. pidgeon-1.0.0/pidgeon/models/domains_create_body.py +42 -0
  185. pidgeon-1.0.0/pidgeon/models/domains_create_response_201.py +67 -0
  186. pidgeon-1.0.0/pidgeon/models/domains_delete_response_200.py +67 -0
  187. pidgeon-1.0.0/pidgeon/models/domains_get_response_200.py +67 -0
  188. pidgeon-1.0.0/pidgeon/models/domains_get_setup_link_response_200.py +67 -0
  189. pidgeon-1.0.0/pidgeon/models/domains_get_setup_link_template.py +9 -0
  190. pidgeon-1.0.0/pidgeon/models/domains_list_response_200.py +97 -0
  191. pidgeon-1.0.0/pidgeon/models/domains_update_body.py +42 -0
  192. pidgeon-1.0.0/pidgeon/models/domains_update_response_200.py +67 -0
  193. pidgeon-1.0.0/pidgeon/models/domains_verify_response_200.py +67 -0
  194. pidgeon-1.0.0/pidgeon/models/draft.py +210 -0
  195. pidgeon-1.0.0/pidgeon/models/draft_attachments_item.py +74 -0
  196. pidgeon-1.0.0/pidgeon/models/drafts_cancel_schedule_response_200.py +67 -0
  197. pidgeon-1.0.0/pidgeon/models/drafts_create_body.py +197 -0
  198. pidgeon-1.0.0/pidgeon/models/drafts_create_response_201.py +67 -0
  199. pidgeon-1.0.0/pidgeon/models/drafts_delete_response_200.py +67 -0
  200. pidgeon-1.0.0/pidgeon/models/drafts_get_response_200.py +67 -0
  201. pidgeon-1.0.0/pidgeon/models/drafts_list_response_200.py +97 -0
  202. pidgeon-1.0.0/pidgeon/models/drafts_remove_attachment_response_200.py +67 -0
  203. pidgeon-1.0.0/pidgeon/models/drafts_schedule_body.py +62 -0
  204. pidgeon-1.0.0/pidgeon/models/drafts_schedule_response_200.py +67 -0
  205. pidgeon-1.0.0/pidgeon/models/drafts_send_response_202.py +67 -0
  206. pidgeon-1.0.0/pidgeon/models/drafts_update_body.py +156 -0
  207. pidgeon-1.0.0/pidgeon/models/drafts_update_response_200.py +67 -0
  208. pidgeon-1.0.0/pidgeon/models/emptied.py +50 -0
  209. pidgeon-1.0.0/pidgeon/models/error.py +48 -0
  210. pidgeon-1.0.0/pidgeon/models/error_error.py +61 -0
  211. pidgeon-1.0.0/pidgeon/models/event.py +114 -0
  212. pidgeon-1.0.0/pidgeon/models/event_data.py +45 -0
  213. pidgeon-1.0.0/pidgeon/models/event_response.py +73 -0
  214. pidgeon-1.0.0/pidgeon/models/event_response_event.py +342 -0
  215. pidgeon-1.0.0/pidgeon/models/event_response_event_attendees_item.py +72 -0
  216. pidgeon-1.0.0/pidgeon/models/event_response_event_duration_mode.py +9 -0
  217. pidgeon-1.0.0/pidgeon/models/event_response_event_kind.py +10 -0
  218. pidgeon-1.0.0/pidgeon/models/event_response_event_recurrence_type_0.py +72 -0
  219. pidgeon-1.0.0/pidgeon/models/event_response_event_source.py +9 -0
  220. pidgeon-1.0.0/pidgeon/models/event_response_event_status.py +10 -0
  221. pidgeon-1.0.0/pidgeon/models/events_get_response_200.py +67 -0
  222. pidgeon-1.0.0/pidgeon/models/events_list_response_200.py +97 -0
  223. pidgeon-1.0.0/pidgeon/models/identities_access_create_body.py +87 -0
  224. pidgeon-1.0.0/pidgeon/models/identities_access_create_body_access.py +10 -0
  225. pidgeon-1.0.0/pidgeon/models/identities_access_create_response_200.py +67 -0
  226. pidgeon-1.0.0/pidgeon/models/identities_access_delete_response_200.py +67 -0
  227. pidgeon-1.0.0/pidgeon/models/identities_access_get_response_200.py +67 -0
  228. pidgeon-1.0.0/pidgeon/models/identities_create_body.py +175 -0
  229. pidgeon-1.0.0/pidgeon/models/identities_create_body_mode.py +10 -0
  230. pidgeon-1.0.0/pidgeon/models/identities_create_body_send_policy.py +10 -0
  231. pidgeon-1.0.0/pidgeon/models/identities_create_body_type.py +12 -0
  232. pidgeon-1.0.0/pidgeon/models/identities_create_response_201.py +67 -0
  233. pidgeon-1.0.0/pidgeon/models/identities_delete_response_200.py +67 -0
  234. pidgeon-1.0.0/pidgeon/models/identities_get_response_200.py +67 -0
  235. pidgeon-1.0.0/pidgeon/models/identities_list_response_200.py +97 -0
  236. pidgeon-1.0.0/pidgeon/models/identities_send_rules_create_body.py +52 -0
  237. pidgeon-1.0.0/pidgeon/models/identities_send_rules_create_body_effect.py +9 -0
  238. pidgeon-1.0.0/pidgeon/models/identities_send_rules_create_response_200.py +67 -0
  239. pidgeon-1.0.0/pidgeon/models/identities_send_rules_delete_response_200.py +67 -0
  240. pidgeon-1.0.0/pidgeon/models/identities_send_rules_get_response_200.py +67 -0
  241. pidgeon-1.0.0/pidgeon/models/identities_suspend_tenant_response_200.py +67 -0
  242. pidgeon-1.0.0/pidgeon/models/identities_update_body.py +178 -0
  243. pidgeon-1.0.0/pidgeon/models/identities_update_body_capabilities.py +45 -0
  244. pidgeon-1.0.0/pidgeon/models/identities_update_body_mode.py +10 -0
  245. pidgeon-1.0.0/pidgeon/models/identities_update_body_send_policy.py +10 -0
  246. pidgeon-1.0.0/pidgeon/models/identities_update_body_status.py +10 -0
  247. pidgeon-1.0.0/pidgeon/models/identities_update_response_200.py +67 -0
  248. pidgeon-1.0.0/pidgeon/models/identity.py +178 -0
  249. pidgeon-1.0.0/pidgeon/models/identity_capabilities.py +45 -0
  250. pidgeon-1.0.0/pidgeon/models/invitation.py +271 -0
  251. pidgeon-1.0.0/pidgeon/models/invitation_attendees_item.py +80 -0
  252. pidgeon-1.0.0/pidgeon/models/invitation_response.py +86 -0
  253. pidgeon-1.0.0/pidgeon/models/keys_create_body.py +109 -0
  254. pidgeon-1.0.0/pidgeon/models/keys_create_body_access.py +10 -0
  255. pidgeon-1.0.0/pidgeon/models/keys_create_response_201.py +67 -0
  256. pidgeon-1.0.0/pidgeon/models/keys_get_response_200.py +67 -0
  257. pidgeon-1.0.0/pidgeon/models/keys_list_response_200.py +97 -0
  258. pidgeon-1.0.0/pidgeon/models/keys_revoke_response_200.py +67 -0
  259. pidgeon-1.0.0/pidgeon/models/keys_update_body.py +61 -0
  260. pidgeon-1.0.0/pidgeon/models/keys_update_response_200.py +67 -0
  261. pidgeon-1.0.0/pidgeon/models/label.py +74 -0
  262. pidgeon-1.0.0/pidgeon/models/label_removed.py +58 -0
  263. pidgeon-1.0.0/pidgeon/models/labels_create_body.py +62 -0
  264. pidgeon-1.0.0/pidgeon/models/labels_create_response_201.py +67 -0
  265. pidgeon-1.0.0/pidgeon/models/labels_delete_response_200.py +67 -0
  266. pidgeon-1.0.0/pidgeon/models/labels_list_response_200.py +97 -0
  267. pidgeon-1.0.0/pidgeon/models/labels_update_body.py +51 -0
  268. pidgeon-1.0.0/pidgeon/models/labels_update_response_200.py +67 -0
  269. pidgeon-1.0.0/pidgeon/models/mailbox.py +72 -0
  270. pidgeon-1.0.0/pidgeon/models/mailbox_access.py +101 -0
  271. pidgeon-1.0.0/pidgeon/models/mailbox_access_entries_item.py +83 -0
  272. pidgeon-1.0.0/pidgeon/models/mailbox_access_entries_item_access.py +10 -0
  273. pidgeon-1.0.0/pidgeon/models/mailbox_access_entries_item_kind.py +10 -0
  274. pidgeon-1.0.0/pidgeon/models/mailbox_access_owner_type_0.py +50 -0
  275. pidgeon-1.0.0/pidgeon/models/mailbox_change.py +80 -0
  276. pidgeon-1.0.0/pidgeon/models/mailbox_folder.py +16 -0
  277. pidgeon-1.0.0/pidgeon/models/mailboxes_changes_response_200.py +97 -0
  278. pidgeon-1.0.0/pidgeon/models/mailboxes_empty_trash_response_200.py +67 -0
  279. pidgeon-1.0.0/pidgeon/models/mailboxes_list_folder_response_200.py +97 -0
  280. pidgeon-1.0.0/pidgeon/models/mailboxes_list_response_200.py +97 -0
  281. pidgeon-1.0.0/pidgeon/models/member.py +82 -0
  282. pidgeon-1.0.0/pidgeon/models/member_role.py +9 -0
  283. pidgeon-1.0.0/pidgeon/models/message.py +290 -0
  284. pidgeon-1.0.0/pidgeon/models/message_attachments_item.py +74 -0
  285. pidgeon-1.0.0/pidgeon/models/message_cc_item.py +65 -0
  286. pidgeon-1.0.0/pidgeon/models/message_from.py +65 -0
  287. pidgeon-1.0.0/pidgeon/models/message_invitation_type_0.py +271 -0
  288. pidgeon-1.0.0/pidgeon/models/message_invitation_type_0_attendees_item.py +80 -0
  289. pidgeon-1.0.0/pidgeon/models/message_list_item.py +180 -0
  290. pidgeon-1.0.0/pidgeon/models/message_to_item.py +65 -0
  291. pidgeon-1.0.0/pidgeon/models/messages_act_body.py +61 -0
  292. pidgeon-1.0.0/pidgeon/models/messages_act_body_action.py +18 -0
  293. pidgeon-1.0.0/pidgeon/models/messages_act_response_200.py +67 -0
  294. pidgeon-1.0.0/pidgeon/models/messages_forward_body.py +125 -0
  295. pidgeon-1.0.0/pidgeon/models/messages_forward_response_202.py +67 -0
  296. pidgeon-1.0.0/pidgeon/models/messages_get_response_200.py +67 -0
  297. pidgeon-1.0.0/pidgeon/models/messages_list_in_thread_response_200.py +97 -0
  298. pidgeon-1.0.0/pidgeon/models/messages_reply_all_body.py +125 -0
  299. pidgeon-1.0.0/pidgeon/models/messages_reply_all_response_202.py +67 -0
  300. pidgeon-1.0.0/pidgeon/models/messages_reply_body.py +125 -0
  301. pidgeon-1.0.0/pidgeon/models/messages_reply_response_202.py +67 -0
  302. pidgeon-1.0.0/pidgeon/models/messages_respond_to_invitation_body.py +73 -0
  303. pidgeon-1.0.0/pidgeon/models/messages_respond_to_invitation_body_status.py +10 -0
  304. pidgeon-1.0.0/pidgeon/models/messages_respond_to_invitation_response_200.py +67 -0
  305. pidgeon-1.0.0/pidgeon/models/messages_respond_to_invitation_response_202.py +67 -0
  306. pidgeon-1.0.0/pidgeon/models/messages_search_in.py +16 -0
  307. pidgeon-1.0.0/pidgeon/models/messages_search_response_200.py +97 -0
  308. pidgeon-1.0.0/pidgeon/models/messages_send_body.py +205 -0
  309. pidgeon-1.0.0/pidgeon/models/messages_send_response_201.py +67 -0
  310. pidgeon-1.0.0/pidgeon/models/messages_undo_body.py +42 -0
  311. pidgeon-1.0.0/pidgeon/models/messages_undo_response_200.py +67 -0
  312. pidgeon-1.0.0/pidgeon/models/messages_update_body.py +68 -0
  313. pidgeon-1.0.0/pidgeon/models/messages_update_body_folder.py +11 -0
  314. pidgeon-1.0.0/pidgeon/models/messages_update_response_200.py +67 -0
  315. pidgeon-1.0.0/pidgeon/models/metrics.py +96 -0
  316. pidgeon-1.0.0/pidgeon/models/metrics_inbound.py +50 -0
  317. pidgeon-1.0.0/pidgeon/models/metrics_outbound.py +88 -0
  318. pidgeon-1.0.0/pidgeon/models/metrics_query_response_200.py +67 -0
  319. pidgeon-1.0.0/pidgeon/models/replayed.py +52 -0
  320. pidgeon-1.0.0/pidgeon/models/restored.py +42 -0
  321. pidgeon-1.0.0/pidgeon/models/revoked.py +58 -0
  322. pidgeon-1.0.0/pidgeon/models/routing_create_body_type_0.py +103 -0
  323. pidgeon-1.0.0/pidgeon/models/routing_create_body_type_1.py +103 -0
  324. pidgeon-1.0.0/pidgeon/models/routing_create_body_type_2.py +87 -0
  325. pidgeon-1.0.0/pidgeon/models/routing_create_response_201.py +67 -0
  326. pidgeon-1.0.0/pidgeon/models/routing_delete_response_200.py +67 -0
  327. pidgeon-1.0.0/pidgeon/models/routing_list_response_200.py +97 -0
  328. pidgeon-1.0.0/pidgeon/models/routing_rule.py +124 -0
  329. pidgeon-1.0.0/pidgeon/models/routing_rule_destination_type.py +9 -0
  330. pidgeon-1.0.0/pidgeon/models/routing_rule_match_type.py +10 -0
  331. pidgeon-1.0.0/pidgeon/models/routing_rule_status.py +9 -0
  332. pidgeon-1.0.0/pidgeon/models/routing_update_body.py +44 -0
  333. pidgeon-1.0.0/pidgeon/models/routing_update_body_status.py +9 -0
  334. pidgeon-1.0.0/pidgeon/models/routing_update_response_200.py +67 -0
  335. pidgeon-1.0.0/pidgeon/models/send_rule_removed.py +58 -0
  336. pidgeon-1.0.0/pidgeon/models/send_rules.py +72 -0
  337. pidgeon-1.0.0/pidgeon/models/send_rules_rules_item.py +76 -0
  338. pidgeon-1.0.0/pidgeon/models/send_rules_rules_item_match_type.py +9 -0
  339. pidgeon-1.0.0/pidgeon/models/sent.py +72 -0
  340. pidgeon-1.0.0/pidgeon/models/sent_rejected_item.py +50 -0
  341. pidgeon-1.0.0/pidgeon/models/setup_link.py +128 -0
  342. pidgeon-1.0.0/pidgeon/models/setup_link_reason_type_0.py +9 -0
  343. pidgeon-1.0.0/pidgeon/models/tenant_suspended.py +50 -0
  344. pidgeon-1.0.0/pidgeon/models/thread.py +153 -0
  345. pidgeon-1.0.0/pidgeon/models/thread_owner_type.py +10 -0
  346. pidgeon-1.0.0/pidgeon/models/thread_status.py +11 -0
  347. pidgeon-1.0.0/pidgeon/models/threads_get_response_200.py +67 -0
  348. pidgeon-1.0.0/pidgeon/models/threads_labels_create_body.py +43 -0
  349. pidgeon-1.0.0/pidgeon/models/threads_labels_create_response_200.py +97 -0
  350. pidgeon-1.0.0/pidgeon/models/threads_labels_delete_response_200.py +67 -0
  351. pidgeon-1.0.0/pidgeon/models/threads_labels_get_response_200.py +97 -0
  352. pidgeon-1.0.0/pidgeon/models/threads_list_response_200.py +97 -0
  353. pidgeon-1.0.0/pidgeon/models/threads_update_body.py +98 -0
  354. pidgeon-1.0.0/pidgeon/models/threads_update_body_owner_type.py +10 -0
  355. pidgeon-1.0.0/pidgeon/models/threads_update_body_status.py +11 -0
  356. pidgeon-1.0.0/pidgeon/models/threads_update_response_200.py +67 -0
  357. pidgeon-1.0.0/pidgeon/models/undo.py +62 -0
  358. pidgeon-1.0.0/pidgeon/models/uploaded_attachment.py +66 -0
  359. pidgeon-1.0.0/pidgeon/models/verification.py +88 -0
  360. pidgeon-1.0.0/pidgeon/models/verification_dns_records_item.py +126 -0
  361. pidgeon-1.0.0/pidgeon/models/verification_dns_records_item_status.py +11 -0
  362. pidgeon-1.0.0/pidgeon/models/webhook.py +124 -0
  363. pidgeon-1.0.0/pidgeon/models/webhook_created.py +132 -0
  364. pidgeon-1.0.0/pidgeon/models/webhook_headers.py +48 -0
  365. pidgeon-1.0.0/pidgeon/models/webhook_headers_headers.py +45 -0
  366. pidgeon-1.0.0/pidgeon/models/webhooks_create_body.py +97 -0
  367. pidgeon-1.0.0/pidgeon/models/webhooks_create_body_event_types_item.py +32 -0
  368. pidgeon-1.0.0/pidgeon/models/webhooks_create_response_201.py +67 -0
  369. pidgeon-1.0.0/pidgeon/models/webhooks_delete_response_200.py +67 -0
  370. pidgeon-1.0.0/pidgeon/models/webhooks_deliveries_response_200.py +97 -0
  371. pidgeon-1.0.0/pidgeon/models/webhooks_get_headers_response_200.py +67 -0
  372. pidgeon-1.0.0/pidgeon/models/webhooks_get_response_200.py +67 -0
  373. pidgeon-1.0.0/pidgeon/models/webhooks_list_response_200.py +97 -0
  374. pidgeon-1.0.0/pidgeon/models/webhooks_replay_response_200.py +67 -0
  375. pidgeon-1.0.0/pidgeon/models/webhooks_update_body.py +44 -0
  376. pidgeon-1.0.0/pidgeon/models/webhooks_update_body_status.py +9 -0
  377. pidgeon-1.0.0/pidgeon/models/webhooks_update_headers_body.py +74 -0
  378. pidgeon-1.0.0/pidgeon/models/webhooks_update_headers_body_headers.py +45 -0
  379. pidgeon-1.0.0/pidgeon/models/webhooks_update_headers_response_200.py +67 -0
  380. pidgeon-1.0.0/pidgeon/models/webhooks_update_response_200.py +67 -0
  381. pidgeon-1.0.0/pidgeon/models/workspace.py +66 -0
  382. pidgeon-1.0.0/pidgeon/models/workspace_get_response_200.py +67 -0
  383. pidgeon-1.0.0/pidgeon/models/workspace_members_response_200.py +97 -0
  384. pidgeon-1.0.0/pidgeon/py.typed +1 -0
  385. pidgeon-1.0.0/pidgeon/types.py +54 -0
  386. pidgeon-1.0.0/pyproject.toml +50 -0
  387. pidgeon-1.0.0/pyproject.toml.orig +49 -0
pidgeon-1.0.0/PKG-INFO ADDED
@@ -0,0 +1,141 @@
1
+ Metadata-Version: 2.4
2
+ Name: pidgeon
3
+ Version: 1.0.0
4
+ Summary: A client library for accessing Pidgeon API
5
+ Keywords: pidgeon,email,webhooks,api-client,agents
6
+ Author: Pidgeon
7
+ License-Expression: MIT
8
+ Classifier: Intended Audience :: Developers
9
+ Classifier: Programming Language :: Python :: 3
10
+ Classifier: Topic :: Communications :: Email
11
+ Classifier: Typing :: Typed
12
+ Requires-Dist: httpx>=0.23.1,<0.29.0
13
+ Requires-Dist: attrs>=22.2.0
14
+ Requires-Python: >=3.11
15
+ Project-URL: Homepage, https://pidgeon.ai
16
+ Project-URL: Documentation, https://pidgeon.ai/docs
17
+ Project-URL: Repository, https://github.com/patrickcneuhaus/pidgeon
18
+ Description-Content-Type: text/markdown
19
+
20
+ # pidgeon
21
+ A client library for accessing Pidgeon API
22
+
23
+ ## Usage
24
+ First, create a client:
25
+
26
+ ```python
27
+ from pidgeon import Client
28
+
29
+ client = Client(base_url="https://api.example.com")
30
+ ```
31
+
32
+ If the endpoints you're going to hit require authentication, use `AuthenticatedClient` instead:
33
+
34
+ ```python
35
+ from pidgeon import AuthenticatedClient
36
+
37
+ client = AuthenticatedClient(base_url="https://api.example.com", token="SuperSecretToken")
38
+ ```
39
+
40
+ Now call your endpoint and use your models:
41
+
42
+ ```python
43
+ from pidgeon.models import MyDataModel
44
+ from pidgeon.api.my_tag import get_my_data_model
45
+ from pidgeon.types import Response
46
+
47
+ with client as client:
48
+ my_data: MyDataModel = get_my_data_model.sync(client=client)
49
+ # or if you need more info (e.g. status_code)
50
+ response: Response[MyDataModel] = get_my_data_model.sync_detailed(client=client)
51
+ ```
52
+
53
+ Or do the same thing with an async version:
54
+
55
+ ```python
56
+ from pidgeon.models import MyDataModel
57
+ from pidgeon.api.my_tag import get_my_data_model
58
+ from pidgeon.types import Response
59
+
60
+ async with client as client:
61
+ my_data: MyDataModel = await get_my_data_model.asyncio(client=client)
62
+ response: Response[MyDataModel] = await get_my_data_model.asyncio_detailed(client=client)
63
+ ```
64
+
65
+ By default, when you're calling an HTTPS API it will attempt to verify that SSL is working correctly. Using certificate verification is highly recommended most of the time, but sometimes you may need to authenticate to a server (especially an internal server) using a custom certificate bundle.
66
+
67
+ ```python
68
+ client = AuthenticatedClient(
69
+ base_url="https://internal_api.example.com",
70
+ token="SuperSecretToken",
71
+ verify_ssl="/path/to/certificate_bundle.pem",
72
+ )
73
+ ```
74
+
75
+ You can also disable certificate validation altogether, but beware that **this is a security risk**.
76
+
77
+ ```python
78
+ client = AuthenticatedClient(base_url="https://internal_api.example.com", token="SuperSecretToken", verify_ssl=False)
79
+ ```
80
+
81
+ Things to know:
82
+ 1. Every path/method combo becomes a Python module with four functions:
83
+ 1. `sync`: Blocking request that returns parsed data (if successful) or `None`
84
+ 1. `sync_detailed`: Blocking request that always returns a `Request`, optionally with `parsed` set if the request was successful.
85
+ 1. `asyncio`: Like `sync` but async instead of blocking
86
+ 1. `asyncio_detailed`: Like `sync_detailed` but async instead of blocking
87
+
88
+ 1. All path/query params, and bodies become method arguments.
89
+ 1. If your endpoint had any tags on it, the first tag will be used as a module name for the function (my_tag above)
90
+ 1. Any endpoint which did not have a tag will be in `pidgeon.api.default`
91
+
92
+ ## Advanced customizations
93
+
94
+ There are more settings on the generated `Client` class which let you control more runtime behavior, check out the docstring on that class for more info. You can also customize the underlying `httpx.Client` or `httpx.AsyncClient` (depending on your use-case):
95
+
96
+ ```python
97
+ from pidgeon import Client
98
+
99
+
100
+ def log_request(request):
101
+ print(f"Request event hook: {request.method} {request.url} - Waiting for response")
102
+
103
+
104
+ def log_response(response):
105
+ request = response.request
106
+ print(f"Response event hook: {request.method} {request.url} - Status {response.status_code}")
107
+
108
+
109
+ client = Client(
110
+ base_url="https://api.example.com",
111
+ httpx_args={"event_hooks": {"request": [log_request], "response": [log_response]}},
112
+ )
113
+
114
+ # Or get the underlying httpx client to modify directly with client.get_httpx_client() or client.get_async_httpx_client()
115
+ ```
116
+
117
+ You can even set the httpx client directly, but beware that this will override any existing settings (e.g., base_url):
118
+
119
+ ```python
120
+ import httpx
121
+ from pidgeon import Client
122
+
123
+ client = Client(
124
+ base_url="https://api.example.com",
125
+ )
126
+ # Note that base_url needs to be re-set, as would any shared cookies, headers, etc.
127
+ client.set_httpx_client(httpx.Client(base_url="https://api.example.com", proxies="http://localhost:8030"))
128
+ ```
129
+
130
+ ## Building / publishing this package
131
+ This project uses [uv](https://github.com/astral-sh/uv) to manage dependencies and packaging. Here are the basics:
132
+ 1. Update the metadata in `pyproject.toml` (e.g. authors, version).
133
+ 2. If you're using a private repository: https://docs.astral.sh/uv/guides/integration/alternative-indexes/
134
+ 3. Build a distribution with `uv build`, builds `sdist` and `wheel` by default.
135
+ 1. Publish the client with `uv publish`, see documentation for publishing to private indexes.
136
+
137
+ If you want to install this client into another project without publishing it (e.g. for development) then:
138
+ 1. If that project **is using uv**, you can simply do `uv add <path-to-this-client>` from that project
139
+ 1. If that project is not using uv:
140
+ 1. Build a wheel with `uv build --wheel`.
141
+ 1. Install that wheel from the other project `pip install <path-to-wheel>`.
@@ -0,0 +1,122 @@
1
+ # pidgeon
2
+ A client library for accessing Pidgeon API
3
+
4
+ ## Usage
5
+ First, create a client:
6
+
7
+ ```python
8
+ from pidgeon import Client
9
+
10
+ client = Client(base_url="https://api.example.com")
11
+ ```
12
+
13
+ If the endpoints you're going to hit require authentication, use `AuthenticatedClient` instead:
14
+
15
+ ```python
16
+ from pidgeon import AuthenticatedClient
17
+
18
+ client = AuthenticatedClient(base_url="https://api.example.com", token="SuperSecretToken")
19
+ ```
20
+
21
+ Now call your endpoint and use your models:
22
+
23
+ ```python
24
+ from pidgeon.models import MyDataModel
25
+ from pidgeon.api.my_tag import get_my_data_model
26
+ from pidgeon.types import Response
27
+
28
+ with client as client:
29
+ my_data: MyDataModel = get_my_data_model.sync(client=client)
30
+ # or if you need more info (e.g. status_code)
31
+ response: Response[MyDataModel] = get_my_data_model.sync_detailed(client=client)
32
+ ```
33
+
34
+ Or do the same thing with an async version:
35
+
36
+ ```python
37
+ from pidgeon.models import MyDataModel
38
+ from pidgeon.api.my_tag import get_my_data_model
39
+ from pidgeon.types import Response
40
+
41
+ async with client as client:
42
+ my_data: MyDataModel = await get_my_data_model.asyncio(client=client)
43
+ response: Response[MyDataModel] = await get_my_data_model.asyncio_detailed(client=client)
44
+ ```
45
+
46
+ By default, when you're calling an HTTPS API it will attempt to verify that SSL is working correctly. Using certificate verification is highly recommended most of the time, but sometimes you may need to authenticate to a server (especially an internal server) using a custom certificate bundle.
47
+
48
+ ```python
49
+ client = AuthenticatedClient(
50
+ base_url="https://internal_api.example.com",
51
+ token="SuperSecretToken",
52
+ verify_ssl="/path/to/certificate_bundle.pem",
53
+ )
54
+ ```
55
+
56
+ You can also disable certificate validation altogether, but beware that **this is a security risk**.
57
+
58
+ ```python
59
+ client = AuthenticatedClient(base_url="https://internal_api.example.com", token="SuperSecretToken", verify_ssl=False)
60
+ ```
61
+
62
+ Things to know:
63
+ 1. Every path/method combo becomes a Python module with four functions:
64
+ 1. `sync`: Blocking request that returns parsed data (if successful) or `None`
65
+ 1. `sync_detailed`: Blocking request that always returns a `Request`, optionally with `parsed` set if the request was successful.
66
+ 1. `asyncio`: Like `sync` but async instead of blocking
67
+ 1. `asyncio_detailed`: Like `sync_detailed` but async instead of blocking
68
+
69
+ 1. All path/query params, and bodies become method arguments.
70
+ 1. If your endpoint had any tags on it, the first tag will be used as a module name for the function (my_tag above)
71
+ 1. Any endpoint which did not have a tag will be in `pidgeon.api.default`
72
+
73
+ ## Advanced customizations
74
+
75
+ There are more settings on the generated `Client` class which let you control more runtime behavior, check out the docstring on that class for more info. You can also customize the underlying `httpx.Client` or `httpx.AsyncClient` (depending on your use-case):
76
+
77
+ ```python
78
+ from pidgeon import Client
79
+
80
+
81
+ def log_request(request):
82
+ print(f"Request event hook: {request.method} {request.url} - Waiting for response")
83
+
84
+
85
+ def log_response(response):
86
+ request = response.request
87
+ print(f"Response event hook: {request.method} {request.url} - Status {response.status_code}")
88
+
89
+
90
+ client = Client(
91
+ base_url="https://api.example.com",
92
+ httpx_args={"event_hooks": {"request": [log_request], "response": [log_response]}},
93
+ )
94
+
95
+ # Or get the underlying httpx client to modify directly with client.get_httpx_client() or client.get_async_httpx_client()
96
+ ```
97
+
98
+ You can even set the httpx client directly, but beware that this will override any existing settings (e.g., base_url):
99
+
100
+ ```python
101
+ import httpx
102
+ from pidgeon import Client
103
+
104
+ client = Client(
105
+ base_url="https://api.example.com",
106
+ )
107
+ # Note that base_url needs to be re-set, as would any shared cookies, headers, etc.
108
+ client.set_httpx_client(httpx.Client(base_url="https://api.example.com", proxies="http://localhost:8030"))
109
+ ```
110
+
111
+ ## Building / publishing this package
112
+ This project uses [uv](https://github.com/astral-sh/uv) to manage dependencies and packaging. Here are the basics:
113
+ 1. Update the metadata in `pyproject.toml` (e.g. authors, version).
114
+ 2. If you're using a private repository: https://docs.astral.sh/uv/guides/integration/alternative-indexes/
115
+ 3. Build a distribution with `uv build`, builds `sdist` and `wheel` by default.
116
+ 1. Publish the client with `uv publish`, see documentation for publishing to private indexes.
117
+
118
+ If you want to install this client into another project without publishing it (e.g. for development) then:
119
+ 1. If that project **is using uv**, you can simply do `uv add <path-to-this-client>` from that project
120
+ 1. If that project is not using uv:
121
+ 1. Build a wheel with `uv build --wheel`.
122
+ 1. Install that wheel from the other project `pip install <path-to-wheel>`.
@@ -0,0 +1,8 @@
1
+ """A client library for accessing Pidgeon API"""
2
+
3
+ from .client import AuthenticatedClient, Client
4
+
5
+ __all__ = (
6
+ "AuthenticatedClient",
7
+ "Client",
8
+ )
@@ -0,0 +1 @@
1
+ """Contains methods for accessing the API"""
@@ -0,0 +1 @@
1
+ """Contains endpoint functions for accessing the API"""
@@ -0,0 +1,184 @@
1
+ from http import HTTPStatus
2
+ from typing import Any
3
+
4
+ import httpx
5
+
6
+ from ... import errors
7
+ from ...client import AuthenticatedClient, Client
8
+ from ...models.agent_attach_human_body import AgentAttachHumanBody
9
+ from ...models.agent_attach_human_response_200 import AgentAttachHumanResponse200
10
+ from ...models.error import Error
11
+ from ...types import Response
12
+
13
+
14
+ def _get_kwargs(
15
+ *,
16
+ body: AgentAttachHumanBody,
17
+ ) -> dict[str, Any]:
18
+ headers: dict[str, Any] = {}
19
+
20
+ _kwargs: dict[str, Any] = {
21
+ "method": "post",
22
+ "url": "/agent/human",
23
+ }
24
+
25
+ _kwargs["json"] = body.to_dict()
26
+
27
+ headers["Content-Type"] = "application/json"
28
+
29
+ _kwargs["headers"] = headers
30
+ return _kwargs
31
+
32
+
33
+ def _parse_response(
34
+ *, client: AuthenticatedClient | Client, response: httpx.Response
35
+ ) -> AgentAttachHumanResponse200 | Error | None:
36
+ if response.status_code == 200:
37
+ response_200 = AgentAttachHumanResponse200.from_dict(response.json())
38
+
39
+ return response_200
40
+
41
+ if response.status_code == 401:
42
+ response_401 = Error.from_dict(response.json())
43
+
44
+ return response_401
45
+
46
+ if response.status_code == 404:
47
+ response_404 = Error.from_dict(response.json())
48
+
49
+ return response_404
50
+
51
+ if response.status_code == 429:
52
+ response_429 = Error.from_dict(response.json())
53
+
54
+ return response_429
55
+
56
+ if client.raise_on_unexpected_status:
57
+ raise errors.UnexpectedStatus(response.status_code, response.content)
58
+ else:
59
+ return None
60
+
61
+
62
+ def _build_response(
63
+ *, client: AuthenticatedClient | Client, response: httpx.Response
64
+ ) -> Response[AgentAttachHumanResponse200 | Error]:
65
+ return Response(
66
+ status_code=HTTPStatus(response.status_code),
67
+ content=response.content,
68
+ headers=response.headers,
69
+ parsed=_parse_response(client=client, response=response),
70
+ )
71
+
72
+
73
+ def sync_detailed(
74
+ *,
75
+ client: AuthenticatedClient | Client,
76
+ body: AgentAttachHumanBody,
77
+ ) -> Response[AgentAttachHumanResponse200 | Error]:
78
+ """Name the human for a signup
79
+
80
+ For a signup that named none. Sends a fresh code and restarts the clock.
81
+
82
+ Args:
83
+ body (AgentAttachHumanBody):
84
+
85
+ Raises:
86
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
87
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
88
+
89
+ Returns:
90
+ Response[AgentAttachHumanResponse200 | Error]
91
+ """
92
+
93
+ kwargs = _get_kwargs(
94
+ body=body,
95
+ )
96
+
97
+ response = client.get_httpx_client().request(
98
+ **kwargs,
99
+ )
100
+
101
+ return _build_response(client=client, response=response)
102
+
103
+
104
+ def sync(
105
+ *,
106
+ client: AuthenticatedClient | Client,
107
+ body: AgentAttachHumanBody,
108
+ ) -> AgentAttachHumanResponse200 | Error | None:
109
+ """Name the human for a signup
110
+
111
+ For a signup that named none. Sends a fresh code and restarts the clock.
112
+
113
+ Args:
114
+ body (AgentAttachHumanBody):
115
+
116
+ Raises:
117
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
118
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
119
+
120
+ Returns:
121
+ AgentAttachHumanResponse200 | Error
122
+ """
123
+
124
+ return sync_detailed(
125
+ client=client,
126
+ body=body,
127
+ ).parsed
128
+
129
+
130
+ async def asyncio_detailed(
131
+ *,
132
+ client: AuthenticatedClient | Client,
133
+ body: AgentAttachHumanBody,
134
+ ) -> Response[AgentAttachHumanResponse200 | Error]:
135
+ """Name the human for a signup
136
+
137
+ For a signup that named none. Sends a fresh code and restarts the clock.
138
+
139
+ Args:
140
+ body (AgentAttachHumanBody):
141
+
142
+ Raises:
143
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
144
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
145
+
146
+ Returns:
147
+ Response[AgentAttachHumanResponse200 | Error]
148
+ """
149
+
150
+ kwargs = _get_kwargs(
151
+ body=body,
152
+ )
153
+
154
+ response = await client.get_async_httpx_client().request(**kwargs)
155
+
156
+ return _build_response(client=client, response=response)
157
+
158
+
159
+ async def asyncio(
160
+ *,
161
+ client: AuthenticatedClient | Client,
162
+ body: AgentAttachHumanBody,
163
+ ) -> AgentAttachHumanResponse200 | Error | None:
164
+ """Name the human for a signup
165
+
166
+ For a signup that named none. Sends a fresh code and restarts the clock.
167
+
168
+ Args:
169
+ body (AgentAttachHumanBody):
170
+
171
+ Raises:
172
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
173
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
174
+
175
+ Returns:
176
+ AgentAttachHumanResponse200 | Error
177
+ """
178
+
179
+ return (
180
+ await asyncio_detailed(
181
+ client=client,
182
+ body=body,
183
+ )
184
+ ).parsed
@@ -0,0 +1,196 @@
1
+ from http import HTTPStatus
2
+ from typing import Any
3
+
4
+ import httpx
5
+
6
+ from ... import errors
7
+ from ...client import AuthenticatedClient, Client
8
+ from ...models.agent_sign_up_body import AgentSignUpBody
9
+ from ...models.agent_sign_up_response_201 import AgentSignUpResponse201
10
+ from ...models.error import Error
11
+ from ...types import Response
12
+
13
+
14
+ def _get_kwargs(
15
+ *,
16
+ body: AgentSignUpBody,
17
+ ) -> dict[str, Any]:
18
+ headers: dict[str, Any] = {}
19
+
20
+ _kwargs: dict[str, Any] = {
21
+ "method": "post",
22
+ "url": "/agent/signup",
23
+ }
24
+
25
+ _kwargs["json"] = body.to_dict()
26
+
27
+ headers["Content-Type"] = "application/json"
28
+
29
+ _kwargs["headers"] = headers
30
+ return _kwargs
31
+
32
+
33
+ def _parse_response(
34
+ *, client: AuthenticatedClient | Client, response: httpx.Response
35
+ ) -> AgentSignUpResponse201 | Error | None:
36
+ if response.status_code == 201:
37
+ response_201 = AgentSignUpResponse201.from_dict(response.json())
38
+
39
+ return response_201
40
+
41
+ if response.status_code == 401:
42
+ response_401 = Error.from_dict(response.json())
43
+
44
+ return response_401
45
+
46
+ if response.status_code == 404:
47
+ response_404 = Error.from_dict(response.json())
48
+
49
+ return response_404
50
+
51
+ if response.status_code == 429:
52
+ response_429 = Error.from_dict(response.json())
53
+
54
+ return response_429
55
+
56
+ if client.raise_on_unexpected_status:
57
+ raise errors.UnexpectedStatus(response.status_code, response.content)
58
+ else:
59
+ return None
60
+
61
+
62
+ def _build_response(
63
+ *, client: AuthenticatedClient | Client, response: httpx.Response
64
+ ) -> Response[AgentSignUpResponse201 | Error]:
65
+ return Response(
66
+ status_code=HTTPStatus(response.status_code),
67
+ content=response.content,
68
+ headers=response.headers,
69
+ parsed=_parse_response(client=client, response=response),
70
+ )
71
+
72
+
73
+ def sync_detailed(
74
+ *,
75
+ client: AuthenticatedClient | Client,
76
+ body: AgentSignUpBody,
77
+ ) -> Response[AgentSignUpResponse201 | Error]:
78
+ """Sign an agent up
79
+
80
+ The one call in this API that needs no key. An agent names a username and, optionally, the human who
81
+ will own the mailbox; a six-digit code goes to that human and **nothing is created until it comes
82
+ back**. Without a `human_email` the name is reserved and dormant — attach one with `POST
83
+ /agent/human`.
84
+
85
+ Args:
86
+ body (AgentSignUpBody):
87
+
88
+ Raises:
89
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
90
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
91
+
92
+ Returns:
93
+ Response[AgentSignUpResponse201 | Error]
94
+ """
95
+
96
+ kwargs = _get_kwargs(
97
+ body=body,
98
+ )
99
+
100
+ response = client.get_httpx_client().request(
101
+ **kwargs,
102
+ )
103
+
104
+ return _build_response(client=client, response=response)
105
+
106
+
107
+ def sync(
108
+ *,
109
+ client: AuthenticatedClient | Client,
110
+ body: AgentSignUpBody,
111
+ ) -> AgentSignUpResponse201 | Error | None:
112
+ """Sign an agent up
113
+
114
+ The one call in this API that needs no key. An agent names a username and, optionally, the human who
115
+ will own the mailbox; a six-digit code goes to that human and **nothing is created until it comes
116
+ back**. Without a `human_email` the name is reserved and dormant — attach one with `POST
117
+ /agent/human`.
118
+
119
+ Args:
120
+ body (AgentSignUpBody):
121
+
122
+ Raises:
123
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
124
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
125
+
126
+ Returns:
127
+ AgentSignUpResponse201 | Error
128
+ """
129
+
130
+ return sync_detailed(
131
+ client=client,
132
+ body=body,
133
+ ).parsed
134
+
135
+
136
+ async def asyncio_detailed(
137
+ *,
138
+ client: AuthenticatedClient | Client,
139
+ body: AgentSignUpBody,
140
+ ) -> Response[AgentSignUpResponse201 | Error]:
141
+ """Sign an agent up
142
+
143
+ The one call in this API that needs no key. An agent names a username and, optionally, the human who
144
+ will own the mailbox; a six-digit code goes to that human and **nothing is created until it comes
145
+ back**. Without a `human_email` the name is reserved and dormant — attach one with `POST
146
+ /agent/human`.
147
+
148
+ Args:
149
+ body (AgentSignUpBody):
150
+
151
+ Raises:
152
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
153
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
154
+
155
+ Returns:
156
+ Response[AgentSignUpResponse201 | Error]
157
+ """
158
+
159
+ kwargs = _get_kwargs(
160
+ body=body,
161
+ )
162
+
163
+ response = await client.get_async_httpx_client().request(**kwargs)
164
+
165
+ return _build_response(client=client, response=response)
166
+
167
+
168
+ async def asyncio(
169
+ *,
170
+ client: AuthenticatedClient | Client,
171
+ body: AgentSignUpBody,
172
+ ) -> AgentSignUpResponse201 | Error | None:
173
+ """Sign an agent up
174
+
175
+ The one call in this API that needs no key. An agent names a username and, optionally, the human who
176
+ will own the mailbox; a six-digit code goes to that human and **nothing is created until it comes
177
+ back**. Without a `human_email` the name is reserved and dormant — attach one with `POST
178
+ /agent/human`.
179
+
180
+ Args:
181
+ body (AgentSignUpBody):
182
+
183
+ Raises:
184
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
185
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
186
+
187
+ Returns:
188
+ AgentSignUpResponse201 | Error
189
+ """
190
+
191
+ return (
192
+ await asyncio_detailed(
193
+ client=client,
194
+ body=body,
195
+ )
196
+ ).parsed