lockally 0.1.0 → 0.3.0

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 (571) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +166 -117
  3. data/docs/AdminApi.md +33 -33
  4. data/docs/{V1AdminLoginPost200Response.md → AdminLogin200Response.md} +2 -2
  5. data/docs/{V1AdminLoginPostRequest.md → AdminLoginRequest.md} +2 -2
  6. data/docs/AdminsApi.md +76 -76
  7. data/docs/AgentSendResult.md +22 -0
  8. data/docs/AgentsApi.md +247 -247
  9. data/docs/AiApi.md +69 -69
  10. data/docs/AiConfig.md +26 -0
  11. data/docs/AiConfigUpdate.md +20 -0
  12. data/docs/AliasesApi.md +59 -59
  13. data/docs/ApiKeysApi.md +59 -59
  14. data/docs/BatchResult.md +1 -1
  15. data/docs/Calendar.md +8 -0
  16. data/docs/CalendarsApi.md +73 -0
  17. data/docs/ContactLookup.md +26 -0
  18. data/docs/ContactLookupContact.md +28 -0
  19. data/docs/ContactLookupHistory.md +22 -0
  20. data/docs/CreateAiUnitsCheckout200Response.md +22 -0
  21. data/docs/{V1AliasesPostRequest.md → CreateAliasRequest.md} +2 -2
  22. data/docs/{V1ApiKeysPost201Response.md → CreateApiKey201Response.md} +2 -2
  23. data/docs/CreateApiKeyRequest.md +22 -0
  24. data/docs/{V1DomainsPostRequest.md → CreateDomainRequest.md} +2 -2
  25. data/docs/{V1MailboxesPostRequest.md → CreateMailboxRequest.md} +2 -2
  26. data/docs/{V1SuppressionsPostRequest.md → CreateSuppressionRequest.md} +2 -2
  27. data/docs/{V1WebhooksPostRequest.md → CreateWebhookRequest.md} +2 -2
  28. data/docs/DomainsApi.md +339 -60
  29. data/docs/Draft.md +44 -0
  30. data/docs/DraftList.md +18 -0
  31. data/docs/DraftResult.md +26 -0
  32. data/docs/DraftsApi.md +115 -115
  33. data/docs/{V1MailboxesEmailExportPost201Response.md → ExportMailbox201Response.md} +2 -2
  34. data/docs/GetCalendarOverview200Response.md +34 -0
  35. data/docs/GetCalendarOverview200ResponseActivityInner.md +24 -0
  36. data/docs/{V1AdminMeGet200Response.md → GetCurrentAdmin200Response.md} +2 -2
  37. data/docs/{V1UsageGet200Response.md → GetUsage200Response.md} +2 -2
  38. data/docs/GetUserInsights200Response.md +2 -0
  39. data/docs/HealthApi.md +11 -11
  40. data/docs/{HealthzGet200Response.md → HealthCheck200Response.md} +2 -2
  41. data/docs/Inbox.md +24 -0
  42. data/docs/InboxList.md +18 -0
  43. data/docs/{V1AdminsPostRequest.md → InviteAdminRequest.md} +2 -2
  44. data/docs/{V1AdminsGet200Response.md → ListAdmins200Response.md} +2 -2
  45. data/docs/{V1AliasesGet200Response.md → ListAliases200Response.md} +2 -2
  46. data/docs/{V1ApiKeysGet200Response.md → ListApiKeys200Response.md} +2 -2
  47. data/docs/{V1DomainsGet200Response.md → ListDomains200Response.md} +2 -2
  48. data/docs/{V1MailboxesGet200Response.md → ListMailboxes200Response.md} +2 -2
  49. data/docs/{V1MessagesGet200Response.md → ListMessages200Response.md} +2 -2
  50. data/docs/{V1SuppressionsGet200Response.md → ListSuppressions200Response.md} +2 -2
  51. data/docs/{V1TemplatesGet200Response.md → ListTemplates200Response.md} +2 -2
  52. data/docs/{V1VacationGet200Response.md → ListVacationResponders200Response.md} +2 -2
  53. data/docs/{V1WebhooksGet200Response.md → ListWebhooks200Response.md} +2 -2
  54. data/docs/MailboxGrant.md +20 -0
  55. data/docs/MailboxGrantList.md +18 -0
  56. data/docs/MailboxesApi.md +204 -204
  57. data/docs/MarkReadResult.md +18 -0
  58. data/docs/MessageDetail.md +52 -0
  59. data/docs/ReturnPath.md +28 -0
  60. data/docs/ReturnPathCheck.md +20 -0
  61. data/docs/SendApi.md +121 -121
  62. data/docs/SendEmail200Response.md +24 -0
  63. data/docs/{V1SendPost202Response.md → SendEmail202Response.md} +2 -2
  64. data/docs/{V1SendBatchPost200Response.md → SendEmailBatch200Response.md} +2 -2
  65. data/docs/{V1SendBatchPostRequest.md → SendEmailBatchRequest.md} +2 -2
  66. data/docs/{V1SendPostRequest.md → SendEmailRequest.md} +7 -3
  67. data/docs/{V1SendPostRequestAttachmentsInner.md → SendEmailRequestAttachmentsInner.md} +2 -2
  68. data/docs/SendMessage.md +5 -1
  69. data/docs/{V1MailboxesEmailVacationPutRequest.md → SetVacationResponderRequest.md} +2 -2
  70. data/docs/SignupApi.md +4 -4
  71. data/docs/SimulatedInbound.md +22 -0
  72. data/docs/{V1InboxesMailboxMessagesPostRequest.md → StartConversationRequest.md} +2 -2
  73. data/docs/SuppressionsApi.md +75 -75
  74. data/docs/TemplatesApi.md +67 -67
  75. data/docs/TenantApi.md +20 -20
  76. data/docs/TestApi.md +11 -11
  77. data/docs/Thread.md +22 -0
  78. data/docs/ThreadClassification.md +22 -0
  79. data/docs/ThreadList.md +20 -0
  80. data/docs/ThreadMessage.md +40 -0
  81. data/docs/ThreadMessageBody.md +42 -0
  82. data/docs/ThreadMessageBodyAllOfBody.md +22 -0
  83. data/docs/ThreadSummary.md +28 -0
  84. data/docs/{V1AdminsIdPatchRequest.md → UpdateAdminRequest.md} +2 -2
  85. data/docs/{V1MailboxesEmailPatchRequest.md → UpdateMailboxRequest.md} +2 -2
  86. data/docs/{V1WebhooksIdPatchRequest.md → UpdateWebhookRequest.md} +2 -2
  87. data/docs/WebhooksApi.md +63 -63
  88. data/docs/Whoami.md +24 -0
  89. data/lib/lockally/api/add_ons_api.rb +1 -1
  90. data/lib/lockally/api/admin_api.rb +31 -31
  91. data/lib/lockally/api/admins_api.rb +90 -90
  92. data/lib/lockally/api/agents_api.rb +310 -310
  93. data/lib/lockally/api/ai_api.rb +70 -70
  94. data/lib/lockally/api/aliases_api.rb +65 -65
  95. data/lib/lockally/api/api_keys_api.rb +67 -67
  96. data/lib/lockally/api/billing_api.rb +1 -1
  97. data/lib/lockally/api/calendars_api.rb +64 -1
  98. data/lib/lockally/api/contact_lists_api.rb +1 -1
  99. data/lib/lockally/api/contacts_api.rb +1 -1
  100. data/lib/lockally/api/dashboard_api.rb +1 -1
  101. data/lib/lockally/api/directory_api.rb +1 -1
  102. data/lib/lockally/api/distribution_lists_api.rb +1 -1
  103. data/lib/lockally/api/domains_api.rb +314 -62
  104. data/lib/lockally/api/drafts_api.rb +141 -141
  105. data/lib/lockally/api/encryption_api.rb +1 -1
  106. data/lib/lockally/api/health_api.rb +10 -10
  107. data/lib/lockally/api/ip_pools_api.rb +1 -1
  108. data/lib/lockally/api/mailboxes_api.rb +236 -236
  109. data/lib/lockally/api/migrations_api.rb +1 -1
  110. data/lib/lockally/api/resources_api.rb +1 -1
  111. data/lib/lockally/api/send_api.rb +147 -147
  112. data/lib/lockally/api/signup_api.rb +4 -4
  113. data/lib/lockally/api/suppressions_api.rb +88 -88
  114. data/lib/lockally/api/templates_api.rb +70 -70
  115. data/lib/lockally/api/tenant_api.rb +16 -16
  116. data/lib/lockally/api/test_api.rb +10 -10
  117. data/lib/lockally/api/users_api.rb +1 -1
  118. data/lib/lockally/api/webhooks_api.rb +74 -74
  119. data/lib/lockally/api_client.rb +1 -1
  120. data/lib/lockally/api_error.rb +1 -1
  121. data/lib/lockally/api_model_base.rb +1 -1
  122. data/lib/lockally/configuration.rb +1 -1
  123. data/lib/lockally/models/activate_add_on200_response.rb +1 -1
  124. data/lib/lockally/models/add_calendar_member_request.rb +1 -1
  125. data/lib/lockally/models/add_contact_list_member_request.rb +1 -1
  126. data/lib/lockally/models/add_on.rb +1 -1
  127. data/lib/lockally/models/add_shared_member_request.rb +1 -1
  128. data/lib/lockally/models/admin.rb +1 -1
  129. data/lib/lockally/models/admin_full.rb +1 -1
  130. data/lib/lockally/models/{v1_admin_login_post200_response.rb → admin_login200_response.rb} +4 -4
  131. data/lib/lockally/models/{v1_admin_login_post_request.rb → admin_login_request.rb} +4 -4
  132. data/lib/lockally/models/agent_send_result.rb +184 -0
  133. data/lib/lockally/models/ai_config.rb +242 -0
  134. data/lib/lockally/models/ai_config_update.rb +214 -0
  135. data/lib/lockally/models/api_key.rb +1 -1
  136. data/lib/lockally/models/audit_event.rb +1 -1
  137. data/lib/lockally/models/batch_lookup_public_keys200_response.rb +1 -1
  138. data/lib/lockally/models/batch_lookup_public_keys200_response_data_inner.rb +1 -1
  139. data/lib/lockally/models/batch_result.rb +4 -3
  140. data/lib/lockally/models/billing_status.rb +1 -1
  141. data/lib/lockally/models/calendar.rb +68 -4
  142. data/lib/lockally/models/calendar_event.rb +1 -1
  143. data/lib/lockally/models/calendar_integration.rb +1 -1
  144. data/lib/lockally/models/calendar_member.rb +1 -1
  145. data/lib/lockally/models/calendar_policies.rb +1 -1
  146. data/lib/lockally/models/contact.rb +1 -1
  147. data/lib/lockally/models/contact_list.rb +1 -1
  148. data/lib/lockally/models/contact_lookup.rb +235 -0
  149. data/lib/lockally/models/contact_lookup_contact.rb +192 -0
  150. data/lib/lockally/models/contact_lookup_history.rb +166 -0
  151. data/lib/lockally/models/create_ai_units_checkout200_response.rb +199 -0
  152. data/lib/lockally/models/{v1_aliases_post_request.rb → create_alias_request.rb} +4 -4
  153. data/lib/lockally/models/{v1_api_keys_post201_response.rb → create_api_key201_response.rb} +4 -4
  154. data/lib/lockally/models/{v1_api_keys_post_request.rb → create_api_key_request.rb} +20 -8
  155. data/lib/lockally/models/create_billing_checkout200_response.rb +1 -1
  156. data/lib/lockally/models/create_billing_checkout_request.rb +1 -1
  157. data/lib/lockally/models/create_calendar_event_request.rb +1 -1
  158. data/lib/lockally/models/create_calendar_integration_request.rb +1 -1
  159. data/lib/lockally/models/create_calendar_request.rb +1 -1
  160. data/lib/lockally/models/create_contact_list_request.rb +1 -1
  161. data/lib/lockally/models/create_contact_request.rb +1 -1
  162. data/lib/lockally/models/create_dedicated_ip_request_request.rb +1 -1
  163. data/lib/lockally/models/create_distribution_list_request.rb +1 -1
  164. data/lib/lockally/models/{v1_domains_post_request.rb → create_domain_request.rb} +4 -4
  165. data/lib/lockally/models/create_encryption_key201_response.rb +1 -1
  166. data/lib/lockally/models/create_encryption_key_request.rb +1 -1
  167. data/lib/lockally/models/create_encryption_recovery_request.rb +1 -1
  168. data/lib/lockally/models/{v1_mailboxes_post_request.rb → create_mailbox_request.rb} +4 -4
  169. data/lib/lockally/models/create_migration_credential_request.rb +1 -1
  170. data/lib/lockally/models/create_migration_credential_request_credentials.rb +1 -1
  171. data/lib/lockally/models/create_migration_request.rb +1 -1
  172. data/lib/lockally/models/create_resource_request.rb +1 -1
  173. data/lib/lockally/models/{v1_suppressions_post_request.rb → create_suppression_request.rb} +4 -4
  174. data/lib/lockally/models/create_units_checkout200_response.rb +1 -1
  175. data/lib/lockally/models/create_units_checkout_request.rb +1 -1
  176. data/lib/lockally/models/create_user_request.rb +1 -1
  177. data/lib/lockally/models/{v1_webhooks_post_request.rb → create_webhook_request.rb} +4 -4
  178. data/lib/lockally/models/dedicated_ip_request.rb +1 -1
  179. data/lib/lockally/models/directory_permissions.rb +1 -1
  180. data/lib/lockally/models/discover_migration202_response.rb +1 -1
  181. data/lib/lockally/models/distribution_list_detail.rb +1 -1
  182. data/lib/lockally/models/distribution_list_summary.rb +1 -1
  183. data/lib/lockally/models/dns_record.rb +1 -1
  184. data/lib/lockally/models/domain.rb +1 -1
  185. data/lib/lockally/models/draft.rb +413 -0
  186. data/lib/lockally/models/draft_list.rb +166 -0
  187. data/lib/lockally/models/draft_result.rb +260 -0
  188. data/lib/lockally/models/{v1_mailboxes_email_export_post201_response.rb → export_mailbox201_response.rb} +4 -4
  189. data/lib/lockally/models/gal_settings.rb +1 -1
  190. data/lib/lockally/models/get_add_on_status200_response.rb +1 -1
  191. data/lib/lockally/models/get_audit_summary200_response.rb +1 -1
  192. data/lib/lockally/models/get_calendar_overview200_response.rb +228 -0
  193. data/lib/lockally/models/get_calendar_overview200_response_activity_inner.rb +174 -0
  194. data/lib/lockally/models/get_calendar_security200_response.rb +1 -1
  195. data/lib/lockally/models/get_calendar_security200_response_alerts_inner.rb +1 -1
  196. data/lib/lockally/models/get_calendar_security200_response_delegated_access_inner.rb +1 -1
  197. data/lib/lockally/models/get_calendar_security200_response_external_sharing.rb +1 -1
  198. data/lib/lockally/models/get_calendar_security200_response_public_calendar_list_inner.rb +1 -1
  199. data/lib/lockally/models/get_contact_list200_response.rb +1 -1
  200. data/lib/lockally/models/get_contact_list200_response_members_inner.rb +1 -1
  201. data/lib/lockally/models/get_contact_lists200_response.rb +1 -1
  202. data/lib/lockally/models/get_contact_lists200_response_data_inner.rb +1 -1
  203. data/lib/lockally/models/{v1_admin_me_get200_response.rb → get_current_admin200_response.rb} +4 -4
  204. data/lib/lockally/models/get_directory_activity200_response.rb +1 -1
  205. data/lib/lockally/models/get_directory_activity200_response_data_inner.rb +1 -1
  206. data/lib/lockally/models/get_directory_stats200_response.rb +1 -1
  207. data/lib/lockally/models/get_domains_status200_response.rb +1 -1
  208. data/lib/lockally/models/get_domains_status200_response_domains_inner.rb +1 -1
  209. data/lib/lockally/models/get_domains_status200_response_domains_inner_checks_inner.rb +1 -1
  210. data/lib/lockally/models/get_encryption_key200_response.rb +1 -1
  211. data/lib/lockally/models/get_integrations_summary200_response.rb +1 -1
  212. data/lib/lockally/models/get_integrations_summary200_response_api_keys_inner.rb +1 -1
  213. data/lib/lockally/models/get_integrations_summary200_response_webhooks_inner.rb +1 -1
  214. data/lib/lockally/models/get_ip_assignment200_response.rb +1 -1
  215. data/lib/lockally/models/get_security200_response.rb +1 -1
  216. data/lib/lockally/models/get_security200_response_alerts_inner.rb +1 -1
  217. data/lib/lockally/models/get_security200_response_stats_inner.rb +1 -1
  218. data/lib/lockally/models/get_storage200_response.rb +1 -1
  219. data/lib/lockally/models/get_storage200_response_top_mailboxes_inner.rb +1 -1
  220. data/lib/lockally/models/get_storage200_response_top_messages_inner.rb +1 -1
  221. data/lib/lockally/models/{v1_usage_get200_response.rb → get_usage200_response.rb} +4 -4
  222. data/lib/lockally/models/get_user_insights200_response.rb +12 -2
  223. data/lib/lockally/models/{healthz_get200_response.rb → health_check200_response.rb} +4 -4
  224. data/lib/lockally/models/inbox.rb +225 -0
  225. data/lib/lockally/models/inbox_list.rb +166 -0
  226. data/lib/lockally/models/{v1_admins_post_request.rb → invite_admin_request.rb} +4 -4
  227. data/lib/lockally/models/list_add_ons200_response.rb +1 -1
  228. data/lib/lockally/models/{v1_api_keys_get200_response.rb → list_admins200_response.rb} +5 -5
  229. data/lib/lockally/models/list_aliases200_response.rb +166 -0
  230. data/lib/lockally/models/{v1_admins_get200_response.rb → list_api_keys200_response.rb} +5 -5
  231. data/lib/lockally/models/list_calendar_events200_response.rb +1 -1
  232. data/lib/lockally/models/list_calendar_integrations200_response.rb +1 -1
  233. data/lib/lockally/models/list_calendar_members200_response.rb +1 -1
  234. data/lib/lockally/models/list_calendars200_response.rb +1 -1
  235. data/lib/lockally/models/list_contact_lists200_response.rb +1 -1
  236. data/lib/lockally/models/list_contacts200_response.rb +1 -1
  237. data/lib/lockally/models/list_dedicated_ip_requests200_response.rb +1 -1
  238. data/lib/lockally/models/list_distribution_lists200_response.rb +1 -1
  239. data/lib/lockally/models/{v1_domains_get200_response.rb → list_domains200_response.rb} +4 -4
  240. data/lib/lockally/models/{v1_mailboxes_get200_response.rb → list_mailboxes200_response.rb} +4 -4
  241. data/lib/lockally/models/{v1_messages_get200_response.rb → list_messages200_response.rb} +4 -4
  242. data/lib/lockally/models/list_migration_credentials200_response.rb +1 -1
  243. data/lib/lockally/models/list_migration_events200_response.rb +1 -1
  244. data/lib/lockally/models/list_migration_mailboxes200_response.rb +1 -1
  245. data/lib/lockally/models/list_migrations200_response.rb +1 -1
  246. data/lib/lockally/models/list_resources200_response.rb +1 -1
  247. data/lib/lockally/models/list_shared_members200_response.rb +1 -1
  248. data/lib/lockally/models/{v1_suppressions_get200_response.rb → list_suppressions200_response.rb} +4 -4
  249. data/lib/lockally/models/{v1_send_batch_post200_response.rb → list_templates200_response.rb} +5 -5
  250. data/lib/lockally/models/list_users200_response.rb +1 -1
  251. data/lib/lockally/models/{v1_vacation_get200_response.rb → list_vacation_responders200_response.rb} +4 -4
  252. data/lib/lockally/models/{v1_aliases_get200_response.rb → list_webhooks200_response.rb} +5 -5
  253. data/lib/lockally/models/mailbox.rb +1 -1
  254. data/lib/lockally/models/mailbox_grant.rb +156 -0
  255. data/lib/lockally/models/mailbox_grant_list.rb +166 -0
  256. data/lib/lockally/models/map_migration_request.rb +1 -1
  257. data/lib/lockally/models/map_migration_request_mappings_inner.rb +1 -1
  258. data/lib/lockally/models/mark_read_result.rb +147 -0
  259. data/lib/lockally/models/message.rb +1 -1
  260. data/lib/lockally/models/message_detail.rb +479 -0
  261. data/lib/lockally/models/message_stats.rb +1 -1
  262. data/lib/lockally/models/message_stats_counts.rb +1 -1
  263. data/lib/lockally/models/message_stats_rates.rb +1 -1
  264. data/lib/lockally/models/message_stats_window.rb +1 -1
  265. data/lib/lockally/models/migration.rb +1 -1
  266. data/lib/lockally/models/migration_credential.rb +1 -1
  267. data/lib/lockally/models/migration_event.rb +1 -1
  268. data/lib/lockally/models/migration_mailbox.rb +1 -1
  269. data/lib/lockally/models/migration_progress.rb +1 -1
  270. data/lib/lockally/models/migration_progress_mailboxes_inner.rb +1 -1
  271. data/lib/lockally/models/migration_settings.rb +1 -1
  272. data/lib/lockally/models/model_alias.rb +1 -1
  273. data/lib/lockally/models/plan_catalog_entry.rb +1 -1
  274. data/lib/lockally/models/problem.rb +1 -1
  275. data/lib/lockally/models/replace_distribution_list_members200_response.rb +1 -1
  276. data/lib/lockally/models/replace_distribution_list_members_request.rb +1 -1
  277. data/lib/lockally/models/resource.rb +1 -1
  278. data/lib/lockally/models/return_path.rb +269 -0
  279. data/lib/lockally/models/return_path_check.rb +157 -0
  280. data/lib/lockally/models/rotate_encryption_key_request.rb +1 -1
  281. data/lib/lockally/models/send_email200_response.rb +218 -0
  282. data/lib/lockally/models/{v1_send_post202_response.rb → send_email202_response.rb} +4 -4
  283. data/lib/lockally/models/{v1_templates_get200_response.rb → send_email_batch200_response.rb} +5 -5
  284. data/lib/lockally/models/{v1_send_batch_post_request.rb → send_email_batch_request.rb} +4 -4
  285. data/lib/lockally/models/{v1_send_post_request.rb → send_email_request.rb} +26 -6
  286. data/lib/lockally/models/{v1_send_post_request_attachments_inner.rb → send_email_request_attachments_inner.rb} +4 -4
  287. data/lib/lockally/models/send_message.rb +23 -3
  288. data/lib/lockally/models/{v1_mailboxes_email_vacation_put_request.rb → set_vacation_responder_request.rb} +4 -4
  289. data/lib/lockally/models/shared_member.rb +1 -1
  290. data/lib/lockally/models/signup_request.rb +1 -1
  291. data/lib/lockally/models/simulated_inbound.rb +167 -0
  292. data/lib/lockally/models/{v1_inboxes_mailbox_messages_post_request.rb → start_conversation_request.rb} +4 -4
  293. data/lib/lockally/models/start_migration202_response.rb +1 -1
  294. data/lib/lockally/models/suppression.rb +1 -1
  295. data/lib/lockally/models/template.rb +1 -1
  296. data/lib/lockally/models/template_input.rb +1 -1
  297. data/lib/lockally/models/tenant.rb +1 -1
  298. data/lib/lockally/models/thread.rb +219 -0
  299. data/lib/lockally/models/thread_classification.rb +186 -0
  300. data/lib/lockally/models/thread_list.rb +192 -0
  301. data/lib/lockally/models/thread_message.rb +397 -0
  302. data/lib/lockally/models/thread_message_body.rb +413 -0
  303. data/lib/lockally/models/thread_message_body_all_of_body.rb +165 -0
  304. data/lib/lockally/models/thread_summary.rb +280 -0
  305. data/lib/lockally/models/unit_bundle.rb +1 -1
  306. data/lib/lockally/models/{v1_admins_id_patch_request.rb → update_admin_request.rb} +4 -4
  307. data/lib/lockally/models/update_calendar_event_request.rb +1 -1
  308. data/lib/lockally/models/update_calendar_integration_request.rb +1 -1
  309. data/lib/lockally/models/update_calendar_member_request.rb +1 -1
  310. data/lib/lockally/models/update_calendar_policies_request.rb +1 -1
  311. data/lib/lockally/models/update_calendar_request.rb +1 -1
  312. data/lib/lockally/models/update_contact_list_request.rb +1 -1
  313. data/lib/lockally/models/update_contact_request.rb +1 -1
  314. data/lib/lockally/models/update_directory_permissions_request.rb +1 -1
  315. data/lib/lockally/models/update_gal_settings_request.rb +1 -1
  316. data/lib/lockally/models/{v1_mailboxes_email_patch_request.rb → update_mailbox_request.rb} +4 -4
  317. data/lib/lockally/models/update_migration_mailbox_request.rb +1 -1
  318. data/lib/lockally/models/update_migration_request.rb +1 -1
  319. data/lib/lockally/models/update_resource_request.rb +1 -1
  320. data/lib/lockally/models/update_user_request.rb +1 -1
  321. data/lib/lockally/models/{v1_webhooks_id_patch_request.rb → update_webhook_request.rb} +4 -4
  322. data/lib/lockally/models/user.rb +1 -1
  323. data/lib/lockally/models/user_event.rb +1 -1
  324. data/lib/lockally/models/vacation_params.rb +1 -1
  325. data/lib/lockally/models/vacation_responder.rb +1 -1
  326. data/lib/lockally/models/webhook.rb +1 -1
  327. data/lib/lockally/models/whoami.rb +177 -0
  328. data/lib/lockally/version.rb +2 -2
  329. data/lib/lockally.rb +65 -35
  330. data/lockally.gemspec +2 -2
  331. data/spec/api/add_ons_api_spec.rb +1 -1
  332. data/spec/api/admin_api_spec.rb +10 -10
  333. data/spec/api/admins_api_spec.rb +23 -23
  334. data/spec/api/agents_api_spec.rb +79 -79
  335. data/spec/api/ai_api_spec.rb +23 -23
  336. data/spec/api/aliases_api_spec.rb +17 -17
  337. data/spec/api/api_keys_api_spec.rb +18 -18
  338. data/spec/api/billing_api_spec.rb +1 -1
  339. data/spec/api/calendars_api_spec.rb +15 -1
  340. data/spec/api/contact_lists_api_spec.rb +1 -1
  341. data/spec/api/contacts_api_spec.rb +1 -1
  342. data/spec/api/dashboard_api_spec.rb +1 -1
  343. data/spec/api/directory_api_spec.rb +1 -1
  344. data/spec/api/distribution_lists_api_spec.rb +1 -1
  345. data/spec/api/domains_api_spec.rb +66 -18
  346. data/spec/api/drafts_api_spec.rb +39 -39
  347. data/spec/api/encryption_api_spec.rb +1 -1
  348. data/spec/api/health_api_spec.rb +4 -4
  349. data/spec/api/ip_pools_api_spec.rb +1 -1
  350. data/spec/api/mailboxes_api_spec.rb +63 -63
  351. data/spec/api/migrations_api_spec.rb +1 -1
  352. data/spec/api/resources_api_spec.rb +1 -1
  353. data/spec/api/send_api_spec.rb +37 -37
  354. data/spec/api/signup_api_spec.rb +2 -2
  355. data/spec/api/suppressions_api_spec.rb +19 -19
  356. data/spec/api/templates_api_spec.rb +18 -18
  357. data/spec/api/tenant_api_spec.rb +6 -6
  358. data/spec/api/test_api_spec.rb +4 -4
  359. data/spec/api/users_api_spec.rb +1 -1
  360. data/spec/api/webhooks_api_spec.rb +20 -20
  361. data/spec/models/activate_add_on200_response_spec.rb +1 -1
  362. data/spec/models/add_calendar_member_request_spec.rb +1 -1
  363. data/spec/models/add_contact_list_member_request_spec.rb +1 -1
  364. data/spec/models/add_on_spec.rb +1 -1
  365. data/spec/models/add_shared_member_request_spec.rb +1 -1
  366. data/spec/models/admin_full_spec.rb +1 -1
  367. data/spec/models/{v1_admin_login_post200_response_spec.rb → admin_login200_response_spec.rb} +7 -7
  368. data/spec/models/{v1_admin_login_post_request_spec.rb → admin_login_request_spec.rb} +7 -7
  369. data/spec/models/admin_spec.rb +1 -1
  370. data/spec/models/agent_send_result_spec.rb +48 -0
  371. data/spec/models/ai_config_spec.rb +64 -0
  372. data/spec/models/{v1_api_keys_post_request_spec.rb → ai_config_update_spec.rb} +13 -13
  373. data/spec/models/api_key_spec.rb +1 -1
  374. data/spec/models/audit_event_spec.rb +1 -1
  375. data/spec/models/batch_lookup_public_keys200_response_data_inner_spec.rb +1 -1
  376. data/spec/models/batch_lookup_public_keys200_response_spec.rb +1 -1
  377. data/spec/models/batch_result_spec.rb +2 -2
  378. data/spec/models/billing_status_spec.rb +1 -1
  379. data/spec/models/calendar_event_spec.rb +1 -1
  380. data/spec/models/calendar_integration_spec.rb +1 -1
  381. data/spec/models/calendar_member_spec.rb +1 -1
  382. data/spec/models/calendar_policies_spec.rb +1 -1
  383. data/spec/models/calendar_spec.rb +34 -2
  384. data/spec/models/contact_list_spec.rb +1 -1
  385. data/spec/models/contact_lookup_contact_spec.rb +66 -0
  386. data/spec/models/contact_lookup_history_spec.rb +48 -0
  387. data/spec/models/contact_lookup_spec.rb +60 -0
  388. data/spec/models/contact_spec.rb +1 -1
  389. data/spec/models/create_ai_units_checkout200_response_spec.rb +48 -0
  390. data/spec/models/{v1_aliases_post_request_spec.rb → create_alias_request_spec.rb} +7 -7
  391. data/spec/models/{v1_api_keys_post201_response_spec.rb → create_api_key201_response_spec.rb} +7 -7
  392. data/spec/models/create_api_key_request_spec.rb +52 -0
  393. data/spec/models/create_billing_checkout200_response_spec.rb +1 -1
  394. data/spec/models/create_billing_checkout_request_spec.rb +1 -1
  395. data/spec/models/create_calendar_event_request_spec.rb +1 -1
  396. data/spec/models/create_calendar_integration_request_spec.rb +1 -1
  397. data/spec/models/create_calendar_request_spec.rb +1 -1
  398. data/spec/models/create_contact_list_request_spec.rb +1 -1
  399. data/spec/models/create_contact_request_spec.rb +1 -1
  400. data/spec/models/create_dedicated_ip_request_request_spec.rb +1 -1
  401. data/spec/models/create_distribution_list_request_spec.rb +1 -1
  402. data/spec/models/{v1_domains_post_request_spec.rb → create_domain_request_spec.rb} +7 -7
  403. data/spec/models/create_encryption_key201_response_spec.rb +1 -1
  404. data/spec/models/create_encryption_key_request_spec.rb +1 -1
  405. data/spec/models/create_encryption_recovery_request_spec.rb +1 -1
  406. data/spec/models/{v1_mailboxes_post_request_spec.rb → create_mailbox_request_spec.rb} +7 -7
  407. data/spec/models/create_migration_credential_request_credentials_spec.rb +1 -1
  408. data/spec/models/create_migration_credential_request_spec.rb +1 -1
  409. data/spec/models/create_migration_request_spec.rb +1 -1
  410. data/spec/models/create_resource_request_spec.rb +1 -1
  411. data/spec/models/{v1_suppressions_post_request_spec.rb → create_suppression_request_spec.rb} +7 -7
  412. data/spec/models/create_units_checkout200_response_spec.rb +1 -1
  413. data/spec/models/create_units_checkout_request_spec.rb +1 -1
  414. data/spec/models/create_user_request_spec.rb +1 -1
  415. data/spec/models/{v1_webhooks_post_request_spec.rb → create_webhook_request_spec.rb} +7 -7
  416. data/spec/models/dedicated_ip_request_spec.rb +1 -1
  417. data/spec/models/directory_permissions_spec.rb +1 -1
  418. data/spec/models/discover_migration202_response_spec.rb +1 -1
  419. data/spec/models/distribution_list_detail_spec.rb +1 -1
  420. data/spec/models/distribution_list_summary_spec.rb +1 -1
  421. data/spec/models/dns_record_spec.rb +1 -1
  422. data/spec/models/domain_spec.rb +1 -1
  423. data/spec/models/{v1_aliases_get200_response_spec.rb → draft_list_spec.rb} +8 -8
  424. data/spec/models/draft_result_spec.rb +64 -0
  425. data/spec/models/draft_spec.rb +118 -0
  426. data/spec/models/{v1_mailboxes_email_export_post201_response_spec.rb → export_mailbox201_response_spec.rb} +7 -7
  427. data/spec/models/gal_settings_spec.rb +1 -1
  428. data/spec/models/get_add_on_status200_response_spec.rb +1 -1
  429. data/spec/models/get_audit_summary200_response_spec.rb +1 -1
  430. data/spec/models/get_calendar_overview200_response_activity_inner_spec.rb +54 -0
  431. data/spec/models/get_calendar_overview200_response_spec.rb +84 -0
  432. data/spec/models/get_calendar_security200_response_alerts_inner_spec.rb +1 -1
  433. data/spec/models/get_calendar_security200_response_delegated_access_inner_spec.rb +1 -1
  434. data/spec/models/get_calendar_security200_response_external_sharing_spec.rb +1 -1
  435. data/spec/models/get_calendar_security200_response_public_calendar_list_inner_spec.rb +1 -1
  436. data/spec/models/get_calendar_security200_response_spec.rb +1 -1
  437. data/spec/models/get_contact_list200_response_members_inner_spec.rb +1 -1
  438. data/spec/models/get_contact_list200_response_spec.rb +1 -1
  439. data/spec/models/get_contact_lists200_response_data_inner_spec.rb +1 -1
  440. data/spec/models/get_contact_lists200_response_spec.rb +1 -1
  441. data/spec/models/{v1_admin_me_get200_response_spec.rb → get_current_admin200_response_spec.rb} +7 -7
  442. data/spec/models/get_directory_activity200_response_data_inner_spec.rb +1 -1
  443. data/spec/models/get_directory_activity200_response_spec.rb +1 -1
  444. data/spec/models/get_directory_stats200_response_spec.rb +1 -1
  445. data/spec/models/get_domains_status200_response_domains_inner_checks_inner_spec.rb +1 -1
  446. data/spec/models/get_domains_status200_response_domains_inner_spec.rb +1 -1
  447. data/spec/models/get_domains_status200_response_spec.rb +1 -1
  448. data/spec/models/get_encryption_key200_response_spec.rb +1 -1
  449. data/spec/models/get_integrations_summary200_response_api_keys_inner_spec.rb +1 -1
  450. data/spec/models/get_integrations_summary200_response_spec.rb +1 -1
  451. data/spec/models/get_integrations_summary200_response_webhooks_inner_spec.rb +1 -1
  452. data/spec/models/get_ip_assignment200_response_spec.rb +1 -1
  453. data/spec/models/get_security200_response_alerts_inner_spec.rb +1 -1
  454. data/spec/models/get_security200_response_spec.rb +1 -1
  455. data/spec/models/get_security200_response_stats_inner_spec.rb +1 -1
  456. data/spec/models/get_storage200_response_spec.rb +1 -1
  457. data/spec/models/get_storage200_response_top_mailboxes_inner_spec.rb +1 -1
  458. data/spec/models/get_storage200_response_top_messages_inner_spec.rb +1 -1
  459. data/spec/models/{v1_usage_get200_response_spec.rb → get_usage200_response_spec.rb} +7 -7
  460. data/spec/models/get_user_insights200_response_spec.rb +7 -1
  461. data/spec/models/{healthz_get200_response_spec.rb → health_check200_response_spec.rb} +7 -7
  462. data/spec/models/inbox_list_spec.rb +36 -0
  463. data/spec/models/inbox_spec.rb +54 -0
  464. data/spec/models/{v1_admins_post_request_spec.rb → invite_admin_request_spec.rb} +7 -7
  465. data/spec/models/list_add_ons200_response_spec.rb +1 -1
  466. data/spec/models/list_admins200_response_spec.rb +36 -0
  467. data/spec/models/{v1_admins_get200_response_spec.rb → list_aliases200_response_spec.rb} +7 -7
  468. data/spec/models/{v1_api_keys_get200_response_spec.rb → list_api_keys200_response_spec.rb} +7 -7
  469. data/spec/models/list_calendar_events200_response_spec.rb +1 -1
  470. data/spec/models/list_calendar_integrations200_response_spec.rb +1 -1
  471. data/spec/models/list_calendar_members200_response_spec.rb +1 -1
  472. data/spec/models/list_calendars200_response_spec.rb +1 -1
  473. data/spec/models/list_contact_lists200_response_spec.rb +1 -1
  474. data/spec/models/list_contacts200_response_spec.rb +1 -1
  475. data/spec/models/list_dedicated_ip_requests200_response_spec.rb +1 -1
  476. data/spec/models/list_distribution_lists200_response_spec.rb +1 -1
  477. data/spec/models/list_domains200_response_spec.rb +36 -0
  478. data/spec/models/{v1_mailboxes_get200_response_spec.rb → list_mailboxes200_response_spec.rb} +7 -7
  479. data/spec/models/{v1_suppressions_get200_response_spec.rb → list_messages200_response_spec.rb} +7 -7
  480. data/spec/models/list_migration_credentials200_response_spec.rb +1 -1
  481. data/spec/models/list_migration_events200_response_spec.rb +1 -1
  482. data/spec/models/list_migration_mailboxes200_response_spec.rb +1 -1
  483. data/spec/models/list_migrations200_response_spec.rb +1 -1
  484. data/spec/models/list_resources200_response_spec.rb +1 -1
  485. data/spec/models/list_shared_members200_response_spec.rb +1 -1
  486. data/spec/models/{v1_messages_get200_response_spec.rb → list_suppressions200_response_spec.rb} +7 -7
  487. data/spec/models/{v1_vacation_get200_response_spec.rb → list_templates200_response_spec.rb} +7 -7
  488. data/spec/models/list_users200_response_spec.rb +1 -1
  489. data/spec/models/list_vacation_responders200_response_spec.rb +36 -0
  490. data/spec/models/{v1_domains_get200_response_spec.rb → list_webhooks200_response_spec.rb} +7 -7
  491. data/spec/models/mailbox_grant_list_spec.rb +36 -0
  492. data/spec/models/mailbox_grant_spec.rb +42 -0
  493. data/spec/models/mailbox_spec.rb +1 -1
  494. data/spec/models/map_migration_request_mappings_inner_spec.rb +1 -1
  495. data/spec/models/map_migration_request_spec.rb +1 -1
  496. data/spec/models/mark_read_result_spec.rb +36 -0
  497. data/spec/models/message_detail_spec.rb +142 -0
  498. data/spec/models/message_spec.rb +1 -1
  499. data/spec/models/message_stats_counts_spec.rb +1 -1
  500. data/spec/models/message_stats_rates_spec.rb +1 -1
  501. data/spec/models/message_stats_spec.rb +1 -1
  502. data/spec/models/message_stats_window_spec.rb +1 -1
  503. data/spec/models/migration_credential_spec.rb +1 -1
  504. data/spec/models/migration_event_spec.rb +1 -1
  505. data/spec/models/migration_mailbox_spec.rb +1 -1
  506. data/spec/models/migration_progress_mailboxes_inner_spec.rb +1 -1
  507. data/spec/models/migration_progress_spec.rb +1 -1
  508. data/spec/models/migration_settings_spec.rb +1 -1
  509. data/spec/models/migration_spec.rb +1 -1
  510. data/spec/models/model_alias_spec.rb +1 -1
  511. data/spec/models/plan_catalog_entry_spec.rb +1 -1
  512. data/spec/models/problem_spec.rb +1 -1
  513. data/spec/models/replace_distribution_list_members200_response_spec.rb +1 -1
  514. data/spec/models/replace_distribution_list_members_request_spec.rb +1 -1
  515. data/spec/models/resource_spec.rb +1 -1
  516. data/spec/models/return_path_check_spec.rb +42 -0
  517. data/spec/models/return_path_spec.rb +70 -0
  518. data/spec/models/rotate_encryption_key_request_spec.rb +1 -1
  519. data/spec/models/send_email200_response_spec.rb +58 -0
  520. data/spec/models/{v1_send_post202_response_spec.rb → send_email202_response_spec.rb} +7 -7
  521. data/spec/models/{v1_templates_get200_response_spec.rb → send_email_batch200_response_spec.rb} +7 -7
  522. data/spec/models/{v1_send_batch_post_request_spec.rb → send_email_batch_request_spec.rb} +7 -7
  523. data/spec/models/{v1_send_post_request_attachments_inner_spec.rb → send_email_request_attachments_inner_spec.rb} +7 -7
  524. data/spec/models/{v1_send_post_request_spec.rb → send_email_request_spec.rb} +19 -7
  525. data/spec/models/send_message_spec.rb +13 -1
  526. data/spec/models/{v1_mailboxes_email_vacation_put_request_spec.rb → set_vacation_responder_request_spec.rb} +7 -7
  527. data/spec/models/shared_member_spec.rb +1 -1
  528. data/spec/models/signup_request_spec.rb +1 -1
  529. data/spec/models/simulated_inbound_spec.rb +48 -0
  530. data/spec/models/{v1_inboxes_mailbox_messages_post_request_spec.rb → start_conversation_request_spec.rb} +7 -7
  531. data/spec/models/start_migration202_response_spec.rb +1 -1
  532. data/spec/models/suppression_spec.rb +1 -1
  533. data/spec/models/template_input_spec.rb +1 -1
  534. data/spec/models/template_spec.rb +1 -1
  535. data/spec/models/tenant_spec.rb +1 -1
  536. data/spec/models/thread_classification_spec.rb +48 -0
  537. data/spec/models/thread_list_spec.rb +42 -0
  538. data/spec/models/thread_message_body_all_of_body_spec.rb +48 -0
  539. data/spec/models/thread_message_body_spec.rb +112 -0
  540. data/spec/models/thread_message_spec.rb +106 -0
  541. data/spec/models/thread_spec.rb +48 -0
  542. data/spec/models/thread_summary_spec.rb +70 -0
  543. data/spec/models/unit_bundle_spec.rb +1 -1
  544. data/spec/models/{v1_admins_id_patch_request_spec.rb → update_admin_request_spec.rb} +7 -7
  545. data/spec/models/update_calendar_event_request_spec.rb +1 -1
  546. data/spec/models/update_calendar_integration_request_spec.rb +1 -1
  547. data/spec/models/update_calendar_member_request_spec.rb +1 -1
  548. data/spec/models/update_calendar_policies_request_spec.rb +1 -1
  549. data/spec/models/update_calendar_request_spec.rb +1 -1
  550. data/spec/models/update_contact_list_request_spec.rb +1 -1
  551. data/spec/models/update_contact_request_spec.rb +1 -1
  552. data/spec/models/update_directory_permissions_request_spec.rb +1 -1
  553. data/spec/models/update_gal_settings_request_spec.rb +1 -1
  554. data/spec/models/{v1_mailboxes_email_patch_request_spec.rb → update_mailbox_request_spec.rb} +7 -7
  555. data/spec/models/update_migration_mailbox_request_spec.rb +1 -1
  556. data/spec/models/update_migration_request_spec.rb +1 -1
  557. data/spec/models/update_resource_request_spec.rb +1 -1
  558. data/spec/models/update_user_request_spec.rb +1 -1
  559. data/spec/models/{v1_webhooks_id_patch_request_spec.rb → update_webhook_request_spec.rb} +7 -7
  560. data/spec/models/user_event_spec.rb +1 -1
  561. data/spec/models/user_spec.rb +1 -1
  562. data/spec/models/vacation_params_spec.rb +1 -1
  563. data/spec/models/vacation_responder_spec.rb +1 -1
  564. data/spec/models/webhook_spec.rb +1 -1
  565. data/spec/models/whoami_spec.rb +54 -0
  566. data/spec/spec_helper.rb +1 -1
  567. metadata +408 -285
  568. data/docs/V1ApiKeysPostRequest.md +0 -20
  569. data/lib/lockally/models/v1_webhooks_get200_response.rb +0 -166
  570. data/spec/models/v1_send_batch_post200_response_spec.rb +0 -36
  571. data/spec/models/v1_webhooks_get200_response_spec.rb +0 -36
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #lockally control plane
3
3
 
4
- #The lockally control plane lets integrators and direct customers manage everything except actual mail data flow (which uses standard JMAP / IMAP / SMTP-submission against the data plane endpoints). **Authentication.** All `/v1/*` endpoints require a Bearer API key in the `Authorization` header. Keys are formatted `lk_live_<8-char-prefix>_<32-char-secret>`. Generate the first key for a tenant via `cmd/seed`; subsequent keys via `POST /v1/api-keys`. **Errors.** Failures return [RFC 9457](https://www.rfc-editor.org/rfc/rfc9457) `application/problem+json` documents. **Scopes.** Each endpoint requires a specific scope on the presented key. Insufficient scope returns `403` with the required scope name in `detail`.
4
+ #The lockally control plane lets integrators and direct customers manage everything except actual mail data flow (which uses standard JMAP / IMAP / SMTP-submission against the data plane endpoints). **Authentication.** All `/v1/*` endpoints require a Bearer API key in the `Authorization` header. Keys are formatted `lk_live_<8-char-prefix>_<32-char-secret>`, or `lk_test_<...>` for a test key. Create keys in the dashboard, or with `POST /v1/api-keys` using a key that holds `tenant:admin`. The key's plan is checked on every request, so a key stops working if the account moves to a plan without API access, and works again if it moves back. **Errors.** Failures return [RFC 9457](https://www.rfc-editor.org/rfc/rfc9457) `application/problem+json` documents. **Scopes.** Each endpoint requires a specific scope on the presented key. Insufficient scope returns `403` with the required scope name in `detail`.
5
5
 
6
6
  The version of the OpenAPI document: 0.1.0
7
7
  Contact: support@lockally.com
@@ -19,37 +19,51 @@ module Lockally
19
19
  def initialize(api_client = ApiClient.default)
20
20
  @api_client = api_client
21
21
  end
22
- # List a key's mailbox grants
23
- # @param key_id [String]
22
+ # Download an attachment
23
+ # @param thread_id [String]
24
+ # @param message_id [String]
25
+ # @param idx [Integer]
24
26
  # @param [Hash] opts the optional parameters
25
- # @return [Object]
26
- def v1_api_keys_key_id_mailboxes_get(key_id, opts = {})
27
- data, _status_code, _headers = v1_api_keys_key_id_mailboxes_get_with_http_info(key_id, opts)
28
- data
27
+ # @return [nil]
28
+ def download_thread_attachment(thread_id, message_id, idx, opts = {})
29
+ download_thread_attachment_with_http_info(thread_id, message_id, idx, opts)
30
+ nil
29
31
  end
30
32
 
31
- # List a key&#39;s mailbox grants
32
- # @param key_id [String]
33
+ # Download an attachment
34
+ # @param thread_id [String]
35
+ # @param message_id [String]
36
+ # @param idx [Integer]
33
37
  # @param [Hash] opts the optional parameters
34
- # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
35
- def v1_api_keys_key_id_mailboxes_get_with_http_info(key_id, opts = {})
38
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
39
+ def download_thread_attachment_with_http_info(thread_id, message_id, idx, opts = {})
36
40
  if @api_client.config.debugging
37
- @api_client.config.logger.debug 'Calling API: AgentsApi.v1_api_keys_key_id_mailboxes_get ...'
41
+ @api_client.config.logger.debug 'Calling API: AgentsApi.download_thread_attachment ...'
38
42
  end
39
- # verify the required parameter 'key_id' is set
40
- if @api_client.config.client_side_validation && key_id.nil?
41
- fail ArgumentError, "Missing the required parameter 'key_id' when calling AgentsApi.v1_api_keys_key_id_mailboxes_get"
43
+ # verify the required parameter 'thread_id' is set
44
+ if @api_client.config.client_side_validation && thread_id.nil?
45
+ fail ArgumentError, "Missing the required parameter 'thread_id' when calling AgentsApi.download_thread_attachment"
42
46
  end
47
+ # verify the required parameter 'message_id' is set
48
+ if @api_client.config.client_side_validation && message_id.nil?
49
+ fail ArgumentError, "Missing the required parameter 'message_id' when calling AgentsApi.download_thread_attachment"
50
+ end
51
+ # verify the required parameter 'idx' is set
52
+ if @api_client.config.client_side_validation && idx.nil?
53
+ fail ArgumentError, "Missing the required parameter 'idx' when calling AgentsApi.download_thread_attachment"
54
+ end
55
+ if @api_client.config.client_side_validation && idx < 0
56
+ fail ArgumentError, 'invalid value for "idx" when calling AgentsApi.download_thread_attachment, must be greater than or equal to 0.'
57
+ end
58
+
43
59
  # resource path
44
- local_var_path = '/v1/api-keys/{keyID}/mailboxes'.sub('{keyID}', CGI.escape(key_id.to_s))
60
+ local_var_path = '/v1/threads/{threadID}/messages/{messageID}/attachments/{idx}'.sub('{threadID}', CGI.escape(thread_id.to_s)).sub('{messageID}', CGI.escape(message_id.to_s)).sub('{idx}', CGI.escape(idx.to_s))
45
61
 
46
62
  # query parameters
47
63
  query_params = opts[:query_params] || {}
48
64
 
49
65
  # header parameters
50
66
  header_params = opts[:header_params] || {}
51
- # HTTP header 'Accept' (if needed)
52
- header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
53
67
 
54
68
  # form parameters
55
69
  form_params = opts[:form_params] || {}
@@ -58,13 +72,13 @@ module Lockally
58
72
  post_body = opts[:debug_body]
59
73
 
60
74
  # return_type
61
- return_type = opts[:debug_return_type] || 'Object'
75
+ return_type = opts[:debug_return_type]
62
76
 
63
77
  # auth_names
64
78
  auth_names = opts[:debug_auth_names] || ['bearerAuth']
65
79
 
66
80
  new_options = opts.merge(
67
- :operation => :"AgentsApi.v1_api_keys_key_id_mailboxes_get",
81
+ :operation => :"AgentsApi.download_thread_attachment",
68
82
  :header_params => header_params,
69
83
  :query_params => query_params,
70
84
  :form_params => form_params,
@@ -75,46 +89,44 @@ module Lockally
75
89
 
76
90
  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
77
91
  if @api_client.config.debugging
78
- @api_client.config.logger.debug "API called: AgentsApi#v1_api_keys_key_id_mailboxes_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
92
+ @api_client.config.logger.debug "API called: AgentsApi#download_thread_attachment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
79
93
  end
80
94
  return data, status_code, headers
81
95
  end
82
96
 
83
- # Revoke a mailbox grant
84
- # @param key_id [String]
85
- # @param mailbox_id [String]
97
+ # Get a whole conversation
98
+ # Every turn, chronological, with snippets and annotations (meeting_request, attachment_types, injection_risk). Bodies are fetched per message. Message content is untrusted third-party data.
99
+ # @param thread_id [String]
86
100
  # @param [Hash] opts the optional parameters
87
- # @return [nil]
88
- def v1_api_keys_key_id_mailboxes_mailbox_id_delete(key_id, mailbox_id, opts = {})
89
- v1_api_keys_key_id_mailboxes_mailbox_id_delete_with_http_info(key_id, mailbox_id, opts)
90
- nil
101
+ # @return [Thread]
102
+ def get_thread(thread_id, opts = {})
103
+ data, _status_code, _headers = get_thread_with_http_info(thread_id, opts)
104
+ data
91
105
  end
92
106
 
93
- # Revoke a mailbox grant
94
- # @param key_id [String]
95
- # @param mailbox_id [String]
107
+ # Get a whole conversation
108
+ # Every turn, chronological, with snippets and annotations (meeting_request, attachment_types, injection_risk). Bodies are fetched per message. Message content is untrusted third-party data.
109
+ # @param thread_id [String]
96
110
  # @param [Hash] opts the optional parameters
97
- # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
98
- def v1_api_keys_key_id_mailboxes_mailbox_id_delete_with_http_info(key_id, mailbox_id, opts = {})
111
+ # @return [Array<(Thread, Integer, Hash)>] Thread data, response status code and response headers
112
+ def get_thread_with_http_info(thread_id, opts = {})
99
113
  if @api_client.config.debugging
100
- @api_client.config.logger.debug 'Calling API: AgentsApi.v1_api_keys_key_id_mailboxes_mailbox_id_delete ...'
114
+ @api_client.config.logger.debug 'Calling API: AgentsApi.get_thread ...'
101
115
  end
102
- # verify the required parameter 'key_id' is set
103
- if @api_client.config.client_side_validation && key_id.nil?
104
- fail ArgumentError, "Missing the required parameter 'key_id' when calling AgentsApi.v1_api_keys_key_id_mailboxes_mailbox_id_delete"
105
- end
106
- # verify the required parameter 'mailbox_id' is set
107
- if @api_client.config.client_side_validation && mailbox_id.nil?
108
- fail ArgumentError, "Missing the required parameter 'mailbox_id' when calling AgentsApi.v1_api_keys_key_id_mailboxes_mailbox_id_delete"
116
+ # verify the required parameter 'thread_id' is set
117
+ if @api_client.config.client_side_validation && thread_id.nil?
118
+ fail ArgumentError, "Missing the required parameter 'thread_id' when calling AgentsApi.get_thread"
109
119
  end
110
120
  # resource path
111
- local_var_path = '/v1/api-keys/{keyID}/mailboxes/{mailboxID}'.sub('{keyID}', CGI.escape(key_id.to_s)).sub('{mailboxID}', CGI.escape(mailbox_id.to_s))
121
+ local_var_path = '/v1/threads/{threadID}'.sub('{threadID}', CGI.escape(thread_id.to_s))
112
122
 
113
123
  # query parameters
114
124
  query_params = opts[:query_params] || {}
115
125
 
116
126
  # header parameters
117
127
  header_params = opts[:header_params] || {}
128
+ # HTTP header 'Accept' (if needed)
129
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
118
130
 
119
131
  # form parameters
120
132
  form_params = opts[:form_params] || {}
@@ -123,13 +135,13 @@ module Lockally
123
135
  post_body = opts[:debug_body]
124
136
 
125
137
  # return_type
126
- return_type = opts[:debug_return_type]
138
+ return_type = opts[:debug_return_type] || 'Thread'
127
139
 
128
140
  # auth_names
129
141
  auth_names = opts[:debug_auth_names] || ['bearerAuth']
130
142
 
131
143
  new_options = opts.merge(
132
- :operation => :"AgentsApi.v1_api_keys_key_id_mailboxes_mailbox_id_delete",
144
+ :operation => :"AgentsApi.get_thread",
133
145
  :header_params => header_params,
134
146
  :query_params => query_params,
135
147
  :form_params => form_params,
@@ -138,38 +150,44 @@ module Lockally
138
150
  :return_type => return_type
139
151
  )
140
152
 
141
- data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
153
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
142
154
  if @api_client.config.debugging
143
- @api_client.config.logger.debug "API called: AgentsApi#v1_api_keys_key_id_mailboxes_mailbox_id_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
155
+ @api_client.config.logger.debug "API called: AgentsApi#get_thread\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
144
156
  end
145
157
  return data, status_code, headers
146
158
  end
147
159
 
148
- # Grant a mailbox to a key
149
- # Body: {\"mailbox\": \"email or id\"}. Refused (422) for mailboxes with agent access disabled or an active E2E encryption key — the server cannot read E2E mailboxes.
150
- # @param key_id [String]
160
+ # Get one message with body
161
+ # Full text/html body fetched on demand from mail storage. Never marks the message read.
162
+ # @param thread_id [String]
163
+ # @param message_id [String]
151
164
  # @param [Hash] opts the optional parameters
152
- # @return [Object]
153
- def v1_api_keys_key_id_mailboxes_post(key_id, opts = {})
154
- data, _status_code, _headers = v1_api_keys_key_id_mailboxes_post_with_http_info(key_id, opts)
165
+ # @return [ThreadMessageBody]
166
+ def get_thread_message(thread_id, message_id, opts = {})
167
+ data, _status_code, _headers = get_thread_message_with_http_info(thread_id, message_id, opts)
155
168
  data
156
169
  end
157
170
 
158
- # Grant a mailbox to a key
159
- # Body: {\&quot;mailbox\&quot;: \&quot;email or id\&quot;}. Refused (422) for mailboxes with agent access disabled or an active E2E encryption key — the server cannot read E2E mailboxes.
160
- # @param key_id [String]
171
+ # Get one message with body
172
+ # Full text/html body fetched on demand from mail storage. Never marks the message read.
173
+ # @param thread_id [String]
174
+ # @param message_id [String]
161
175
  # @param [Hash] opts the optional parameters
162
- # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
163
- def v1_api_keys_key_id_mailboxes_post_with_http_info(key_id, opts = {})
176
+ # @return [Array<(ThreadMessageBody, Integer, Hash)>] ThreadMessageBody data, response status code and response headers
177
+ def get_thread_message_with_http_info(thread_id, message_id, opts = {})
164
178
  if @api_client.config.debugging
165
- @api_client.config.logger.debug 'Calling API: AgentsApi.v1_api_keys_key_id_mailboxes_post ...'
179
+ @api_client.config.logger.debug 'Calling API: AgentsApi.get_thread_message ...'
166
180
  end
167
- # verify the required parameter 'key_id' is set
168
- if @api_client.config.client_side_validation && key_id.nil?
169
- fail ArgumentError, "Missing the required parameter 'key_id' when calling AgentsApi.v1_api_keys_key_id_mailboxes_post"
181
+ # verify the required parameter 'thread_id' is set
182
+ if @api_client.config.client_side_validation && thread_id.nil?
183
+ fail ArgumentError, "Missing the required parameter 'thread_id' when calling AgentsApi.get_thread_message"
184
+ end
185
+ # verify the required parameter 'message_id' is set
186
+ if @api_client.config.client_side_validation && message_id.nil?
187
+ fail ArgumentError, "Missing the required parameter 'message_id' when calling AgentsApi.get_thread_message"
170
188
  end
171
189
  # resource path
172
- local_var_path = '/v1/api-keys/{keyID}/mailboxes'.sub('{keyID}', CGI.escape(key_id.to_s))
190
+ local_var_path = '/v1/threads/{threadID}/messages/{messageID}'.sub('{threadID}', CGI.escape(thread_id.to_s)).sub('{messageID}', CGI.escape(message_id.to_s))
173
191
 
174
192
  # query parameters
175
193
  query_params = opts[:query_params] || {}
@@ -186,13 +204,13 @@ module Lockally
186
204
  post_body = opts[:debug_body]
187
205
 
188
206
  # return_type
189
- return_type = opts[:debug_return_type] || 'Object'
207
+ return_type = opts[:debug_return_type] || 'ThreadMessageBody'
190
208
 
191
209
  # auth_names
192
210
  auth_names = opts[:debug_auth_names] || ['bearerAuth']
193
211
 
194
212
  new_options = opts.merge(
195
- :operation => :"AgentsApi.v1_api_keys_key_id_mailboxes_post",
213
+ :operation => :"AgentsApi.get_thread_message",
196
214
  :header_params => header_params,
197
215
  :query_params => query_params,
198
216
  :form_params => form_params,
@@ -201,32 +219,38 @@ module Lockally
201
219
  :return_type => return_type
202
220
  )
203
221
 
204
- data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
222
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
205
223
  if @api_client.config.debugging
206
- @api_client.config.logger.debug "API called: AgentsApi#v1_api_keys_key_id_mailboxes_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
224
+ @api_client.config.logger.debug "API called: AgentsApi#get_thread_message\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
207
225
  end
208
226
  return data, status_code, headers
209
227
  end
210
228
 
211
- # Introspect the calling credentials
212
- # Returns the tenant, auth kind (api_key/session), key label, and granted scopes. The MCP server uses this to scope-filter tool discovery.
229
+ # Grant a mailbox to a key
230
+ # Body: {\"mailbox\": \"email or id\"}. Refused (422) for mailboxes with agent access disabled or an active E2E encryption key — the server cannot read E2E mailboxes.
231
+ # @param key_id [String]
213
232
  # @param [Hash] opts the optional parameters
214
- # @return [Object]
215
- def v1_auth_whoami_get(opts = {})
216
- data, _status_code, _headers = v1_auth_whoami_get_with_http_info(opts)
233
+ # @return [MailboxGrant]
234
+ def grant_api_key_mailbox(key_id, opts = {})
235
+ data, _status_code, _headers = grant_api_key_mailbox_with_http_info(key_id, opts)
217
236
  data
218
237
  end
219
238
 
220
- # Introspect the calling credentials
221
- # Returns the tenant, auth kind (api_key/session), key label, and granted scopes. The MCP server uses this to scope-filter tool discovery.
239
+ # Grant a mailbox to a key
240
+ # Body: {\&quot;mailbox\&quot;: \&quot;email or id\&quot;}. Refused (422) for mailboxes with agent access disabled or an active E2E encryption key — the server cannot read E2E mailboxes.
241
+ # @param key_id [String]
222
242
  # @param [Hash] opts the optional parameters
223
- # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
224
- def v1_auth_whoami_get_with_http_info(opts = {})
243
+ # @return [Array<(MailboxGrant, Integer, Hash)>] MailboxGrant data, response status code and response headers
244
+ def grant_api_key_mailbox_with_http_info(key_id, opts = {})
225
245
  if @api_client.config.debugging
226
- @api_client.config.logger.debug 'Calling API: AgentsApi.v1_auth_whoami_get ...'
246
+ @api_client.config.logger.debug 'Calling API: AgentsApi.grant_api_key_mailbox ...'
247
+ end
248
+ # verify the required parameter 'key_id' is set
249
+ if @api_client.config.client_side_validation && key_id.nil?
250
+ fail ArgumentError, "Missing the required parameter 'key_id' when calling AgentsApi.grant_api_key_mailbox"
227
251
  end
228
252
  # resource path
229
- local_var_path = '/v1/auth/whoami'
253
+ local_var_path = '/v1/api-keys/{keyID}/mailboxes'.sub('{keyID}', CGI.escape(key_id.to_s))
230
254
 
231
255
  # query parameters
232
256
  query_params = opts[:query_params] || {}
@@ -243,13 +267,13 @@ module Lockally
243
267
  post_body = opts[:debug_body]
244
268
 
245
269
  # return_type
246
- return_type = opts[:debug_return_type] || 'Object'
270
+ return_type = opts[:debug_return_type] || 'MailboxGrant'
247
271
 
248
272
  # auth_names
249
273
  auth_names = opts[:debug_auth_names] || ['bearerAuth']
250
274
 
251
275
  new_options = opts.merge(
252
- :operation => :"AgentsApi.v1_auth_whoami_get",
276
+ :operation => :"AgentsApi.grant_api_key_mailbox",
253
277
  :header_params => header_params,
254
278
  :query_params => query_params,
255
279
  :form_params => form_params,
@@ -258,42 +282,39 @@ module Lockally
258
282
  :return_type => return_type
259
283
  )
260
284
 
261
- data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
285
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
262
286
  if @api_client.config.debugging
263
- @api_client.config.logger.debug "API called: AgentsApi#v1_auth_whoami_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
287
+ @api_client.config.logger.debug "API called: AgentsApi#grant_api_key_mailbox\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
264
288
  end
265
289
  return data, status_code, headers
266
290
  end
267
291
 
268
- # Who is this sender?
269
- # Directory record (name, company, role, notes), whether the address is one of the tenant's own mailboxes, and grant-aware correspondence history (thread count, first/last seen across granted mailboxes only).
270
- # @param email [String]
292
+ # List a key's mailbox grants
293
+ # @param key_id [String]
271
294
  # @param [Hash] opts the optional parameters
272
- # @return [Object]
273
- def v1_contacts_lookup_get(email, opts = {})
274
- data, _status_code, _headers = v1_contacts_lookup_get_with_http_info(email, opts)
295
+ # @return [MailboxGrantList]
296
+ def list_api_key_mailboxes(key_id, opts = {})
297
+ data, _status_code, _headers = list_api_key_mailboxes_with_http_info(key_id, opts)
275
298
  data
276
299
  end
277
300
 
278
- # Who is this sender?
279
- # Directory record (name, company, role, notes), whether the address is one of the tenant&#39;s own mailboxes, and grant-aware correspondence history (thread count, first/last seen across granted mailboxes only).
280
- # @param email [String]
301
+ # List a key&#39;s mailbox grants
302
+ # @param key_id [String]
281
303
  # @param [Hash] opts the optional parameters
282
- # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
283
- def v1_contacts_lookup_get_with_http_info(email, opts = {})
304
+ # @return [Array<(MailboxGrantList, Integer, Hash)>] MailboxGrantList data, response status code and response headers
305
+ def list_api_key_mailboxes_with_http_info(key_id, opts = {})
284
306
  if @api_client.config.debugging
285
- @api_client.config.logger.debug 'Calling API: AgentsApi.v1_contacts_lookup_get ...'
307
+ @api_client.config.logger.debug 'Calling API: AgentsApi.list_api_key_mailboxes ...'
286
308
  end
287
- # verify the required parameter 'email' is set
288
- if @api_client.config.client_side_validation && email.nil?
289
- fail ArgumentError, "Missing the required parameter 'email' when calling AgentsApi.v1_contacts_lookup_get"
309
+ # verify the required parameter 'key_id' is set
310
+ if @api_client.config.client_side_validation && key_id.nil?
311
+ fail ArgumentError, "Missing the required parameter 'key_id' when calling AgentsApi.list_api_key_mailboxes"
290
312
  end
291
313
  # resource path
292
- local_var_path = '/v1/contacts/lookup'
314
+ local_var_path = '/v1/api-keys/{keyID}/mailboxes'.sub('{keyID}', CGI.escape(key_id.to_s))
293
315
 
294
316
  # query parameters
295
317
  query_params = opts[:query_params] || {}
296
- query_params[:'email'] = email
297
318
 
298
319
  # header parameters
299
320
  header_params = opts[:header_params] || {}
@@ -307,13 +328,13 @@ module Lockally
307
328
  post_body = opts[:debug_body]
308
329
 
309
330
  # return_type
310
- return_type = opts[:debug_return_type] || 'Object'
331
+ return_type = opts[:debug_return_type] || 'MailboxGrantList'
311
332
 
312
333
  # auth_names
313
334
  auth_names = opts[:debug_auth_names] || ['bearerAuth']
314
335
 
315
336
  new_options = opts.merge(
316
- :operation => :"AgentsApi.v1_contacts_lookup_get",
337
+ :operation => :"AgentsApi.list_api_key_mailboxes",
317
338
  :header_params => header_params,
318
339
  :query_params => query_params,
319
340
  :form_params => form_params,
@@ -324,7 +345,7 @@ module Lockally
324
345
 
325
346
  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
326
347
  if @api_client.config.debugging
327
- @api_client.config.logger.debug "API called: AgentsApi#v1_contacts_lookup_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
348
+ @api_client.config.logger.debug "API called: AgentsApi#list_api_key_mailboxes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
328
349
  end
329
350
  return data, status_code, headers
330
351
  end
@@ -332,19 +353,19 @@ module Lockally
332
353
  # List granted inboxes
333
354
  # The mailboxes this key is granted, with thread counts and last activity. Admin sessions see every agent-enabled, non-E2E mailbox.
334
355
  # @param [Hash] opts the optional parameters
335
- # @return [Object]
336
- def v1_inboxes_get(opts = {})
337
- data, _status_code, _headers = v1_inboxes_get_with_http_info(opts)
356
+ # @return [InboxList]
357
+ def list_inboxes(opts = {})
358
+ data, _status_code, _headers = list_inboxes_with_http_info(opts)
338
359
  data
339
360
  end
340
361
 
341
362
  # List granted inboxes
342
363
  # The mailboxes this key is granted, with thread counts and last activity. Admin sessions see every agent-enabled, non-E2E mailbox.
343
364
  # @param [Hash] opts the optional parameters
344
- # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
345
- def v1_inboxes_get_with_http_info(opts = {})
365
+ # @return [Array<(InboxList, Integer, Hash)>] InboxList data, response status code and response headers
366
+ def list_inboxes_with_http_info(opts = {})
346
367
  if @api_client.config.debugging
347
- @api_client.config.logger.debug 'Calling API: AgentsApi.v1_inboxes_get ...'
368
+ @api_client.config.logger.debug 'Calling API: AgentsApi.list_inboxes ...'
348
369
  end
349
370
  # resource path
350
371
  local_var_path = '/v1/inboxes'
@@ -364,13 +385,13 @@ module Lockally
364
385
  post_body = opts[:debug_body]
365
386
 
366
387
  # return_type
367
- return_type = opts[:debug_return_type] || 'Object'
388
+ return_type = opts[:debug_return_type] || 'InboxList'
368
389
 
369
390
  # auth_names
370
391
  auth_names = opts[:debug_auth_names] || ['bearerAuth']
371
392
 
372
393
  new_options = opts.merge(
373
- :operation => :"AgentsApi.v1_inboxes_get",
394
+ :operation => :"AgentsApi.list_inboxes",
374
395
  :header_params => header_params,
375
396
  :query_params => query_params,
376
397
  :form_params => form_params,
@@ -381,81 +402,72 @@ module Lockally
381
402
 
382
403
  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
383
404
  if @api_client.config.debugging
384
- @api_client.config.logger.debug "API called: AgentsApi#v1_inboxes_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
405
+ @api_client.config.logger.debug "API called: AgentsApi#list_inboxes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
385
406
  end
386
407
  return data, status_code, headers
387
408
  end
388
409
 
389
- # Start a new conversation (agent stream)
390
- # Sends a new email from a granted mailbox. Classified stream=agent (isolated reputation, per-key rate caps). The first inbound reply adopts the created thread via the References chain. Idempotency-Key required. Mailboxes with agent_draft_policy=always_approve divert this into a pending draft.
391
- # @param mailbox [String]
392
- # @param idempotency_key [String]
393
- # @param v1_inboxes_mailbox_messages_post_request [V1InboxesMailboxMessagesPostRequest]
410
+ # List conversation threads
411
+ # Newest-active first. Cursors: `?before=<RFC3339>` pages backwards; `?since=<RFC3339>` delta-syncs forward (oldest first) so an agent can catch up in order.
412
+ # @param mailbox [String] mailbox email or id
394
413
  # @param [Hash] opts the optional parameters
395
- # @return [Object]
396
- def v1_inboxes_mailbox_messages_post(mailbox, idempotency_key, v1_inboxes_mailbox_messages_post_request, opts = {})
397
- data, _status_code, _headers = v1_inboxes_mailbox_messages_post_with_http_info(mailbox, idempotency_key, v1_inboxes_mailbox_messages_post_request, opts)
414
+ # @option opts [Time] :since
415
+ # @option opts [Time] :before
416
+ # @option opts [Integer] :limit (default to 50)
417
+ # @return [ThreadList]
418
+ def list_threads(mailbox, opts = {})
419
+ data, _status_code, _headers = list_threads_with_http_info(mailbox, opts)
398
420
  data
399
421
  end
400
422
 
401
- # Start a new conversation (agent stream)
402
- # Sends a new email from a granted mailbox. Classified stream&#x3D;agent (isolated reputation, per-key rate caps). The first inbound reply adopts the created thread via the References chain. Idempotency-Key required. Mailboxes with agent_draft_policy&#x3D;always_approve divert this into a pending draft.
403
- # @param mailbox [String]
404
- # @param idempotency_key [String]
405
- # @param v1_inboxes_mailbox_messages_post_request [V1InboxesMailboxMessagesPostRequest]
423
+ # List conversation threads
424
+ # Newest-active first. Cursors: &#x60;?before&#x3D;&lt;RFC3339&gt;&#x60; pages backwards; &#x60;?since&#x3D;&lt;RFC3339&gt;&#x60; delta-syncs forward (oldest first) so an agent can catch up in order.
425
+ # @param mailbox [String] mailbox email or id
406
426
  # @param [Hash] opts the optional parameters
407
- # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
408
- def v1_inboxes_mailbox_messages_post_with_http_info(mailbox, idempotency_key, v1_inboxes_mailbox_messages_post_request, opts = {})
427
+ # @option opts [Time] :since
428
+ # @option opts [Time] :before
429
+ # @option opts [Integer] :limit (default to 50)
430
+ # @return [Array<(ThreadList, Integer, Hash)>] ThreadList data, response status code and response headers
431
+ def list_threads_with_http_info(mailbox, opts = {})
409
432
  if @api_client.config.debugging
410
- @api_client.config.logger.debug 'Calling API: AgentsApi.v1_inboxes_mailbox_messages_post ...'
433
+ @api_client.config.logger.debug 'Calling API: AgentsApi.list_threads ...'
411
434
  end
412
435
  # verify the required parameter 'mailbox' is set
413
436
  if @api_client.config.client_side_validation && mailbox.nil?
414
- fail ArgumentError, "Missing the required parameter 'mailbox' when calling AgentsApi.v1_inboxes_mailbox_messages_post"
415
- end
416
- # verify the required parameter 'idempotency_key' is set
417
- if @api_client.config.client_side_validation && idempotency_key.nil?
418
- fail ArgumentError, "Missing the required parameter 'idempotency_key' when calling AgentsApi.v1_inboxes_mailbox_messages_post"
437
+ fail ArgumentError, "Missing the required parameter 'mailbox' when calling AgentsApi.list_threads"
419
438
  end
420
- if @api_client.config.client_side_validation && idempotency_key.to_s.length > 255
421
- fail ArgumentError, 'invalid value for "idempotency_key" when calling AgentsApi.v1_inboxes_mailbox_messages_post, the character length must be smaller than or equal to 255.'
439
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 200
440
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling AgentsApi.list_threads, must be smaller than or equal to 200.'
422
441
  end
423
442
 
424
- # verify the required parameter 'v1_inboxes_mailbox_messages_post_request' is set
425
- if @api_client.config.client_side_validation && v1_inboxes_mailbox_messages_post_request.nil?
426
- fail ArgumentError, "Missing the required parameter 'v1_inboxes_mailbox_messages_post_request' when calling AgentsApi.v1_inboxes_mailbox_messages_post"
427
- end
428
443
  # resource path
429
- local_var_path = '/v1/inboxes/{mailbox}/messages'.sub('{mailbox}', CGI.escape(mailbox.to_s))
444
+ local_var_path = '/v1/inboxes/{mailbox}/threads'.sub('{mailbox}', CGI.escape(mailbox.to_s))
430
445
 
431
446
  # query parameters
432
447
  query_params = opts[:query_params] || {}
448
+ query_params[:'since'] = opts[:'since'] if !opts[:'since'].nil?
449
+ query_params[:'before'] = opts[:'before'] if !opts[:'before'].nil?
450
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
433
451
 
434
452
  # header parameters
435
453
  header_params = opts[:header_params] || {}
436
454
  # HTTP header 'Accept' (if needed)
437
455
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
438
- # HTTP header 'Content-Type'
439
- content_type = @api_client.select_header_content_type(['application/json'])
440
- if !content_type.nil?
441
- header_params['Content-Type'] = content_type
442
- end
443
- header_params[:'Idempotency-Key'] = idempotency_key
444
456
 
445
457
  # form parameters
446
458
  form_params = opts[:form_params] || {}
447
459
 
448
460
  # http body (model)
449
- post_body = opts[:debug_body] || @api_client.object_to_http_body(v1_inboxes_mailbox_messages_post_request)
461
+ post_body = opts[:debug_body]
450
462
 
451
463
  # return_type
452
- return_type = opts[:debug_return_type] || 'Object'
464
+ return_type = opts[:debug_return_type] || 'ThreadList'
453
465
 
454
466
  # auth_names
455
467
  auth_names = opts[:debug_auth_names] || ['bearerAuth']
456
468
 
457
469
  new_options = opts.merge(
458
- :operation => :"AgentsApi.v1_inboxes_mailbox_messages_post",
470
+ :operation => :"AgentsApi.list_threads",
459
471
  :header_params => header_params,
460
472
  :query_params => query_params,
461
473
  :form_params => form_params,
@@ -464,54 +476,42 @@ module Lockally
464
476
  :return_type => return_type
465
477
  )
466
478
 
467
- data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
479
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
468
480
  if @api_client.config.debugging
469
- @api_client.config.logger.debug "API called: AgentsApi#v1_inboxes_mailbox_messages_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
481
+ @api_client.config.logger.debug "API called: AgentsApi#list_threads\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
470
482
  end
471
483
  return data, status_code, headers
472
484
  end
473
485
 
474
- # List conversation threads
475
- # Newest-active first. Cursors: `?before=<RFC3339>` pages backwards; `?since=<RFC3339>` delta-syncs forward (oldest first) so an agent can catch up in order.
476
- # @param mailbox [String] mailbox email or id
486
+ # Who is this sender?
487
+ # Directory record (name, company, role, notes), whether the address is one of the tenant's own mailboxes, and grant-aware correspondence history (thread count, first/last seen across granted mailboxes only).
488
+ # @param email [String]
477
489
  # @param [Hash] opts the optional parameters
478
- # @option opts [Time] :since
479
- # @option opts [Time] :before
480
- # @option opts [Integer] :limit (default to 50)
481
- # @return [Object]
482
- def v1_inboxes_mailbox_threads_get(mailbox, opts = {})
483
- data, _status_code, _headers = v1_inboxes_mailbox_threads_get_with_http_info(mailbox, opts)
490
+ # @return [ContactLookup]
491
+ def lookup_contact(email, opts = {})
492
+ data, _status_code, _headers = lookup_contact_with_http_info(email, opts)
484
493
  data
485
494
  end
486
495
 
487
- # List conversation threads
488
- # Newest-active first. Cursors: &#x60;?before&#x3D;&lt;RFC3339&gt;&#x60; pages backwards; &#x60;?since&#x3D;&lt;RFC3339&gt;&#x60; delta-syncs forward (oldest first) so an agent can catch up in order.
489
- # @param mailbox [String] mailbox email or id
496
+ # Who is this sender?
497
+ # Directory record (name, company, role, notes), whether the address is one of the tenant&#39;s own mailboxes, and grant-aware correspondence history (thread count, first/last seen across granted mailboxes only).
498
+ # @param email [String]
490
499
  # @param [Hash] opts the optional parameters
491
- # @option opts [Time] :since
492
- # @option opts [Time] :before
493
- # @option opts [Integer] :limit (default to 50)
494
- # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
495
- def v1_inboxes_mailbox_threads_get_with_http_info(mailbox, opts = {})
500
+ # @return [Array<(ContactLookup, Integer, Hash)>] ContactLookup data, response status code and response headers
501
+ def lookup_contact_with_http_info(email, opts = {})
496
502
  if @api_client.config.debugging
497
- @api_client.config.logger.debug 'Calling API: AgentsApi.v1_inboxes_mailbox_threads_get ...'
503
+ @api_client.config.logger.debug 'Calling API: AgentsApi.lookup_contact ...'
498
504
  end
499
- # verify the required parameter 'mailbox' is set
500
- if @api_client.config.client_side_validation && mailbox.nil?
501
- fail ArgumentError, "Missing the required parameter 'mailbox' when calling AgentsApi.v1_inboxes_mailbox_threads_get"
502
- end
503
- if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 200
504
- fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling AgentsApi.v1_inboxes_mailbox_threads_get, must be smaller than or equal to 200.'
505
+ # verify the required parameter 'email' is set
506
+ if @api_client.config.client_side_validation && email.nil?
507
+ fail ArgumentError, "Missing the required parameter 'email' when calling AgentsApi.lookup_contact"
505
508
  end
506
-
507
509
  # resource path
508
- local_var_path = '/v1/inboxes/{mailbox}/threads'.sub('{mailbox}', CGI.escape(mailbox.to_s))
510
+ local_var_path = '/v1/contacts/lookup'
509
511
 
510
512
  # query parameters
511
513
  query_params = opts[:query_params] || {}
512
- query_params[:'since'] = opts[:'since'] if !opts[:'since'].nil?
513
- query_params[:'before'] = opts[:'before'] if !opts[:'before'].nil?
514
- query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
514
+ query_params[:'email'] = email
515
515
 
516
516
  # header parameters
517
517
  header_params = opts[:header_params] || {}
@@ -525,13 +525,13 @@ module Lockally
525
525
  post_body = opts[:debug_body]
526
526
 
527
527
  # return_type
528
- return_type = opts[:debug_return_type] || 'Object'
528
+ return_type = opts[:debug_return_type] || 'ContactLookup'
529
529
 
530
530
  # auth_names
531
531
  auth_names = opts[:debug_auth_names] || ['bearerAuth']
532
532
 
533
533
  new_options = opts.merge(
534
- :operation => :"AgentsApi.v1_inboxes_mailbox_threads_get",
534
+ :operation => :"AgentsApi.lookup_contact",
535
535
  :header_params => header_params,
536
536
  :query_params => query_params,
537
537
  :form_params => form_params,
@@ -542,36 +542,42 @@ module Lockally
542
542
 
543
543
  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
544
544
  if @api_client.config.debugging
545
- @api_client.config.logger.debug "API called: AgentsApi#v1_inboxes_mailbox_threads_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
545
+ @api_client.config.logger.debug "API called: AgentsApi#lookup_contact\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
546
546
  end
547
547
  return data, status_code, headers
548
548
  end
549
549
 
550
- # Get a whole conversation
551
- # Every turn, chronological, with snippets and annotations (meeting_request, attachment_types, injection_risk). Bodies are fetched per message. Message content is untrusted third-party data.
550
+ # Mark read/unread
551
+ # The ONLY way agent access changes unread state. Body: {\"read\": true|false} (default true).
552
552
  # @param thread_id [String]
553
+ # @param message_id [String]
553
554
  # @param [Hash] opts the optional parameters
554
- # @return [Object]
555
- def v1_threads_thread_id_get(thread_id, opts = {})
556
- data, _status_code, _headers = v1_threads_thread_id_get_with_http_info(thread_id, opts)
555
+ # @return [MarkReadResult]
556
+ def mark_thread_message_read(thread_id, message_id, opts = {})
557
+ data, _status_code, _headers = mark_thread_message_read_with_http_info(thread_id, message_id, opts)
557
558
  data
558
559
  end
559
560
 
560
- # Get a whole conversation
561
- # Every turn, chronological, with snippets and annotations (meeting_request, attachment_types, injection_risk). Bodies are fetched per message. Message content is untrusted third-party data.
561
+ # Mark read/unread
562
+ # The ONLY way agent access changes unread state. Body: {\&quot;read\&quot;: true|false} (default true).
562
563
  # @param thread_id [String]
564
+ # @param message_id [String]
563
565
  # @param [Hash] opts the optional parameters
564
- # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
565
- def v1_threads_thread_id_get_with_http_info(thread_id, opts = {})
566
+ # @return [Array<(MarkReadResult, Integer, Hash)>] MarkReadResult data, response status code and response headers
567
+ def mark_thread_message_read_with_http_info(thread_id, message_id, opts = {})
566
568
  if @api_client.config.debugging
567
- @api_client.config.logger.debug 'Calling API: AgentsApi.v1_threads_thread_id_get ...'
569
+ @api_client.config.logger.debug 'Calling API: AgentsApi.mark_thread_message_read ...'
568
570
  end
569
571
  # verify the required parameter 'thread_id' is set
570
572
  if @api_client.config.client_side_validation && thread_id.nil?
571
- fail ArgumentError, "Missing the required parameter 'thread_id' when calling AgentsApi.v1_threads_thread_id_get"
573
+ fail ArgumentError, "Missing the required parameter 'thread_id' when calling AgentsApi.mark_thread_message_read"
574
+ end
575
+ # verify the required parameter 'message_id' is set
576
+ if @api_client.config.client_side_validation && message_id.nil?
577
+ fail ArgumentError, "Missing the required parameter 'message_id' when calling AgentsApi.mark_thread_message_read"
572
578
  end
573
579
  # resource path
574
- local_var_path = '/v1/threads/{threadID}'.sub('{threadID}', CGI.escape(thread_id.to_s))
580
+ local_var_path = '/v1/threads/{threadID}/messages/{messageID}/read'.sub('{threadID}', CGI.escape(thread_id.to_s)).sub('{messageID}', CGI.escape(message_id.to_s))
575
581
 
576
582
  # query parameters
577
583
  query_params = opts[:query_params] || {}
@@ -588,13 +594,13 @@ module Lockally
588
594
  post_body = opts[:debug_body]
589
595
 
590
596
  # return_type
591
- return_type = opts[:debug_return_type] || 'Object'
597
+ return_type = opts[:debug_return_type] || 'MarkReadResult'
592
598
 
593
599
  # auth_names
594
600
  auth_names = opts[:debug_auth_names] || ['bearerAuth']
595
601
 
596
602
  new_options = opts.merge(
597
- :operation => :"AgentsApi.v1_threads_thread_id_get",
603
+ :operation => :"AgentsApi.mark_thread_message_read",
598
604
  :header_params => header_params,
599
605
  :query_params => query_params,
600
606
  :form_params => form_params,
@@ -603,58 +609,57 @@ module Lockally
603
609
  :return_type => return_type
604
610
  )
605
611
 
606
- data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
612
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
607
613
  if @api_client.config.debugging
608
- @api_client.config.logger.debug "API called: AgentsApi#v1_threads_thread_id_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
614
+ @api_client.config.logger.debug "API called: AgentsApi#mark_thread_message_read\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
609
615
  end
610
616
  return data, status_code, headers
611
617
  end
612
618
 
613
- # Download an attachment
619
+ # Reply in-thread (agent stream)
620
+ # The server builds In-Reply-To/References and defaults recipients + subject from the conversation — a minimal call is {\"text\": \"...\"}. Guarded by the reply-loop detector (≥5 outbound/10min → 429 + agent.loop_detected). Idempotency-Key required.
614
621
  # @param thread_id [String]
615
- # @param message_id [String]
616
- # @param idx [Integer]
622
+ # @param idempotency_key [String]
617
623
  # @param [Hash] opts the optional parameters
618
- # @return [nil]
619
- def v1_threads_thread_id_messages_message_id_attachments_idx_get(thread_id, message_id, idx, opts = {})
620
- v1_threads_thread_id_messages_message_id_attachments_idx_get_with_http_info(thread_id, message_id, idx, opts)
621
- nil
624
+ # @return [AgentSendResult]
625
+ def reply_to_thread(thread_id, idempotency_key, opts = {})
626
+ data, _status_code, _headers = reply_to_thread_with_http_info(thread_id, idempotency_key, opts)
627
+ data
622
628
  end
623
629
 
624
- # Download an attachment
630
+ # Reply in-thread (agent stream)
631
+ # The server builds In-Reply-To/References and defaults recipients + subject from the conversation — a minimal call is {\&quot;text\&quot;: \&quot;...\&quot;}. Guarded by the reply-loop detector (≥5 outbound/10min → 429 + agent.loop_detected). Idempotency-Key required.
625
632
  # @param thread_id [String]
626
- # @param message_id [String]
627
- # @param idx [Integer]
633
+ # @param idempotency_key [String]
628
634
  # @param [Hash] opts the optional parameters
629
- # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
630
- def v1_threads_thread_id_messages_message_id_attachments_idx_get_with_http_info(thread_id, message_id, idx, opts = {})
635
+ # @return [Array<(AgentSendResult, Integer, Hash)>] AgentSendResult data, response status code and response headers
636
+ def reply_to_thread_with_http_info(thread_id, idempotency_key, opts = {})
631
637
  if @api_client.config.debugging
632
- @api_client.config.logger.debug 'Calling API: AgentsApi.v1_threads_thread_id_messages_message_id_attachments_idx_get ...'
638
+ @api_client.config.logger.debug 'Calling API: AgentsApi.reply_to_thread ...'
633
639
  end
634
640
  # verify the required parameter 'thread_id' is set
635
641
  if @api_client.config.client_side_validation && thread_id.nil?
636
- fail ArgumentError, "Missing the required parameter 'thread_id' when calling AgentsApi.v1_threads_thread_id_messages_message_id_attachments_idx_get"
637
- end
638
- # verify the required parameter 'message_id' is set
639
- if @api_client.config.client_side_validation && message_id.nil?
640
- fail ArgumentError, "Missing the required parameter 'message_id' when calling AgentsApi.v1_threads_thread_id_messages_message_id_attachments_idx_get"
642
+ fail ArgumentError, "Missing the required parameter 'thread_id' when calling AgentsApi.reply_to_thread"
641
643
  end
642
- # verify the required parameter 'idx' is set
643
- if @api_client.config.client_side_validation && idx.nil?
644
- fail ArgumentError, "Missing the required parameter 'idx' when calling AgentsApi.v1_threads_thread_id_messages_message_id_attachments_idx_get"
644
+ # verify the required parameter 'idempotency_key' is set
645
+ if @api_client.config.client_side_validation && idempotency_key.nil?
646
+ fail ArgumentError, "Missing the required parameter 'idempotency_key' when calling AgentsApi.reply_to_thread"
645
647
  end
646
- if @api_client.config.client_side_validation && idx < 0
647
- fail ArgumentError, 'invalid value for "idx" when calling AgentsApi.v1_threads_thread_id_messages_message_id_attachments_idx_get, must be greater than or equal to 0.'
648
+ if @api_client.config.client_side_validation && idempotency_key.to_s.length > 255
649
+ fail ArgumentError, 'invalid value for "idempotency_key" when calling AgentsApi.reply_to_thread, the character length must be smaller than or equal to 255.'
648
650
  end
649
651
 
650
652
  # resource path
651
- local_var_path = '/v1/threads/{threadID}/messages/{messageID}/attachments/{idx}'.sub('{threadID}', CGI.escape(thread_id.to_s)).sub('{messageID}', CGI.escape(message_id.to_s)).sub('{idx}', CGI.escape(idx.to_s))
653
+ local_var_path = '/v1/threads/{threadID}/reply'.sub('{threadID}', CGI.escape(thread_id.to_s))
652
654
 
653
655
  # query parameters
654
656
  query_params = opts[:query_params] || {}
655
657
 
656
658
  # header parameters
657
659
  header_params = opts[:header_params] || {}
660
+ # HTTP header 'Accept' (if needed)
661
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
662
+ header_params[:'Idempotency-Key'] = idempotency_key
658
663
 
659
664
  # form parameters
660
665
  form_params = opts[:form_params] || {}
@@ -663,13 +668,13 @@ module Lockally
663
668
  post_body = opts[:debug_body]
664
669
 
665
670
  # return_type
666
- return_type = opts[:debug_return_type]
671
+ return_type = opts[:debug_return_type] || 'AgentSendResult'
667
672
 
668
673
  # auth_names
669
674
  auth_names = opts[:debug_auth_names] || ['bearerAuth']
670
675
 
671
676
  new_options = opts.merge(
672
- :operation => :"AgentsApi.v1_threads_thread_id_messages_message_id_attachments_idx_get",
677
+ :operation => :"AgentsApi.reply_to_thread",
673
678
  :header_params => header_params,
674
679
  :query_params => query_params,
675
680
  :form_params => form_params,
@@ -678,52 +683,48 @@ module Lockally
678
683
  :return_type => return_type
679
684
  )
680
685
 
681
- data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
686
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
682
687
  if @api_client.config.debugging
683
- @api_client.config.logger.debug "API called: AgentsApi#v1_threads_thread_id_messages_message_id_attachments_idx_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
688
+ @api_client.config.logger.debug "API called: AgentsApi#reply_to_thread\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
684
689
  end
685
690
  return data, status_code, headers
686
691
  end
687
692
 
688
- # Get one message with body
689
- # Full text/html body fetched on demand from mail storage. Never marks the message read.
690
- # @param thread_id [String]
691
- # @param message_id [String]
693
+ # Revoke a mailbox grant
694
+ # @param key_id [String]
695
+ # @param mailbox_id [String]
692
696
  # @param [Hash] opts the optional parameters
693
- # @return [Object]
694
- def v1_threads_thread_id_messages_message_id_get(thread_id, message_id, opts = {})
695
- data, _status_code, _headers = v1_threads_thread_id_messages_message_id_get_with_http_info(thread_id, message_id, opts)
696
- data
697
+ # @return [nil]
698
+ def revoke_api_key_mailbox(key_id, mailbox_id, opts = {})
699
+ revoke_api_key_mailbox_with_http_info(key_id, mailbox_id, opts)
700
+ nil
697
701
  end
698
702
 
699
- # Get one message with body
700
- # Full text/html body fetched on demand from mail storage. Never marks the message read.
701
- # @param thread_id [String]
702
- # @param message_id [String]
703
+ # Revoke a mailbox grant
704
+ # @param key_id [String]
705
+ # @param mailbox_id [String]
703
706
  # @param [Hash] opts the optional parameters
704
- # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
705
- def v1_threads_thread_id_messages_message_id_get_with_http_info(thread_id, message_id, opts = {})
707
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
708
+ def revoke_api_key_mailbox_with_http_info(key_id, mailbox_id, opts = {})
706
709
  if @api_client.config.debugging
707
- @api_client.config.logger.debug 'Calling API: AgentsApi.v1_threads_thread_id_messages_message_id_get ...'
710
+ @api_client.config.logger.debug 'Calling API: AgentsApi.revoke_api_key_mailbox ...'
708
711
  end
709
- # verify the required parameter 'thread_id' is set
710
- if @api_client.config.client_side_validation && thread_id.nil?
711
- fail ArgumentError, "Missing the required parameter 'thread_id' when calling AgentsApi.v1_threads_thread_id_messages_message_id_get"
712
+ # verify the required parameter 'key_id' is set
713
+ if @api_client.config.client_side_validation && key_id.nil?
714
+ fail ArgumentError, "Missing the required parameter 'key_id' when calling AgentsApi.revoke_api_key_mailbox"
712
715
  end
713
- # verify the required parameter 'message_id' is set
714
- if @api_client.config.client_side_validation && message_id.nil?
715
- fail ArgumentError, "Missing the required parameter 'message_id' when calling AgentsApi.v1_threads_thread_id_messages_message_id_get"
716
+ # verify the required parameter 'mailbox_id' is set
717
+ if @api_client.config.client_side_validation && mailbox_id.nil?
718
+ fail ArgumentError, "Missing the required parameter 'mailbox_id' when calling AgentsApi.revoke_api_key_mailbox"
716
719
  end
717
720
  # resource path
718
- local_var_path = '/v1/threads/{threadID}/messages/{messageID}'.sub('{threadID}', CGI.escape(thread_id.to_s)).sub('{messageID}', CGI.escape(message_id.to_s))
721
+ local_var_path = '/v1/api-keys/{keyID}/mailboxes/{mailboxID}'.sub('{keyID}', CGI.escape(key_id.to_s)).sub('{mailboxID}', CGI.escape(mailbox_id.to_s))
719
722
 
720
723
  # query parameters
721
724
  query_params = opts[:query_params] || {}
722
725
 
723
726
  # header parameters
724
727
  header_params = opts[:header_params] || {}
725
- # HTTP header 'Accept' (if needed)
726
- header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
727
728
 
728
729
  # form parameters
729
730
  form_params = opts[:form_params] || {}
@@ -732,13 +733,13 @@ module Lockally
732
733
  post_body = opts[:debug_body]
733
734
 
734
735
  # return_type
735
- return_type = opts[:debug_return_type] || 'Object'
736
+ return_type = opts[:debug_return_type]
736
737
 
737
738
  # auth_names
738
739
  auth_names = opts[:debug_auth_names] || ['bearerAuth']
739
740
 
740
741
  new_options = opts.merge(
741
- :operation => :"AgentsApi.v1_threads_thread_id_messages_message_id_get",
742
+ :operation => :"AgentsApi.revoke_api_key_mailbox",
742
743
  :header_params => header_params,
743
744
  :query_params => query_params,
744
745
  :form_params => form_params,
@@ -747,44 +748,54 @@ module Lockally
747
748
  :return_type => return_type
748
749
  )
749
750
 
750
- data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
751
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
751
752
  if @api_client.config.debugging
752
- @api_client.config.logger.debug "API called: AgentsApi#v1_threads_thread_id_messages_message_id_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
753
+ @api_client.config.logger.debug "API called: AgentsApi#revoke_api_key_mailbox\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
753
754
  end
754
755
  return data, status_code, headers
755
756
  end
756
757
 
757
- # Mark read/unread
758
- # The ONLY way agent access changes unread state. Body: {\"read\": true|false} (default true).
759
- # @param thread_id [String]
760
- # @param message_id [String]
758
+ # Start a new conversation (agent stream)
759
+ # Sends a new email from a granted mailbox. Classified stream=agent (isolated reputation, per-key rate caps). The first inbound reply adopts the created thread via the References chain. Idempotency-Key required. Mailboxes with agent_draft_policy=always_approve divert this into a pending draft.
760
+ # @param mailbox [String]
761
+ # @param idempotency_key [String]
762
+ # @param start_conversation_request [StartConversationRequest]
761
763
  # @param [Hash] opts the optional parameters
762
- # @return [Object]
763
- def v1_threads_thread_id_messages_message_id_read_post(thread_id, message_id, opts = {})
764
- data, _status_code, _headers = v1_threads_thread_id_messages_message_id_read_post_with_http_info(thread_id, message_id, opts)
764
+ # @return [AgentSendResult]
765
+ def start_conversation(mailbox, idempotency_key, start_conversation_request, opts = {})
766
+ data, _status_code, _headers = start_conversation_with_http_info(mailbox, idempotency_key, start_conversation_request, opts)
765
767
  data
766
768
  end
767
769
 
768
- # Mark read/unread
769
- # The ONLY way agent access changes unread state. Body: {\&quot;read\&quot;: true|false} (default true).
770
- # @param thread_id [String]
771
- # @param message_id [String]
770
+ # Start a new conversation (agent stream)
771
+ # Sends a new email from a granted mailbox. Classified stream&#x3D;agent (isolated reputation, per-key rate caps). The first inbound reply adopts the created thread via the References chain. Idempotency-Key required. Mailboxes with agent_draft_policy&#x3D;always_approve divert this into a pending draft.
772
+ # @param mailbox [String]
773
+ # @param idempotency_key [String]
774
+ # @param start_conversation_request [StartConversationRequest]
772
775
  # @param [Hash] opts the optional parameters
773
- # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
774
- def v1_threads_thread_id_messages_message_id_read_post_with_http_info(thread_id, message_id, opts = {})
776
+ # @return [Array<(AgentSendResult, Integer, Hash)>] AgentSendResult data, response status code and response headers
777
+ def start_conversation_with_http_info(mailbox, idempotency_key, start_conversation_request, opts = {})
775
778
  if @api_client.config.debugging
776
- @api_client.config.logger.debug 'Calling API: AgentsApi.v1_threads_thread_id_messages_message_id_read_post ...'
779
+ @api_client.config.logger.debug 'Calling API: AgentsApi.start_conversation ...'
777
780
  end
778
- # verify the required parameter 'thread_id' is set
779
- if @api_client.config.client_side_validation && thread_id.nil?
780
- fail ArgumentError, "Missing the required parameter 'thread_id' when calling AgentsApi.v1_threads_thread_id_messages_message_id_read_post"
781
+ # verify the required parameter 'mailbox' is set
782
+ if @api_client.config.client_side_validation && mailbox.nil?
783
+ fail ArgumentError, "Missing the required parameter 'mailbox' when calling AgentsApi.start_conversation"
781
784
  end
782
- # verify the required parameter 'message_id' is set
783
- if @api_client.config.client_side_validation && message_id.nil?
784
- fail ArgumentError, "Missing the required parameter 'message_id' when calling AgentsApi.v1_threads_thread_id_messages_message_id_read_post"
785
+ # verify the required parameter 'idempotency_key' is set
786
+ if @api_client.config.client_side_validation && idempotency_key.nil?
787
+ fail ArgumentError, "Missing the required parameter 'idempotency_key' when calling AgentsApi.start_conversation"
788
+ end
789
+ if @api_client.config.client_side_validation && idempotency_key.to_s.length > 255
790
+ fail ArgumentError, 'invalid value for "idempotency_key" when calling AgentsApi.start_conversation, the character length must be smaller than or equal to 255.'
791
+ end
792
+
793
+ # verify the required parameter 'start_conversation_request' is set
794
+ if @api_client.config.client_side_validation && start_conversation_request.nil?
795
+ fail ArgumentError, "Missing the required parameter 'start_conversation_request' when calling AgentsApi.start_conversation"
785
796
  end
786
797
  # resource path
787
- local_var_path = '/v1/threads/{threadID}/messages/{messageID}/read'.sub('{threadID}', CGI.escape(thread_id.to_s)).sub('{messageID}', CGI.escape(message_id.to_s))
798
+ local_var_path = '/v1/inboxes/{mailbox}/messages'.sub('{mailbox}', CGI.escape(mailbox.to_s))
788
799
 
789
800
  # query parameters
790
801
  query_params = opts[:query_params] || {}
@@ -793,21 +804,27 @@ module Lockally
793
804
  header_params = opts[:header_params] || {}
794
805
  # HTTP header 'Accept' (if needed)
795
806
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
807
+ # HTTP header 'Content-Type'
808
+ content_type = @api_client.select_header_content_type(['application/json'])
809
+ if !content_type.nil?
810
+ header_params['Content-Type'] = content_type
811
+ end
812
+ header_params[:'Idempotency-Key'] = idempotency_key
796
813
 
797
814
  # form parameters
798
815
  form_params = opts[:form_params] || {}
799
816
 
800
817
  # http body (model)
801
- post_body = opts[:debug_body]
818
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(start_conversation_request)
802
819
 
803
820
  # return_type
804
- return_type = opts[:debug_return_type] || 'Object'
821
+ return_type = opts[:debug_return_type] || 'AgentSendResult'
805
822
 
806
823
  # auth_names
807
824
  auth_names = opts[:debug_auth_names] || ['bearerAuth']
808
825
 
809
826
  new_options = opts.merge(
810
- :operation => :"AgentsApi.v1_threads_thread_id_messages_message_id_read_post",
827
+ :operation => :"AgentsApi.start_conversation",
811
828
  :header_params => header_params,
812
829
  :query_params => query_params,
813
830
  :form_params => form_params,
@@ -818,46 +835,30 @@ module Lockally
818
835
 
819
836
  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
820
837
  if @api_client.config.debugging
821
- @api_client.config.logger.debug "API called: AgentsApi#v1_threads_thread_id_messages_message_id_read_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
838
+ @api_client.config.logger.debug "API called: AgentsApi#start_conversation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
822
839
  end
823
840
  return data, status_code, headers
824
841
  end
825
842
 
826
- # Reply in-thread (agent stream)
827
- # The server builds In-Reply-To/References and defaults recipients + subject from the conversation — a minimal call is {\"text\": \"...\"}. Guarded by the reply-loop detector (≥5 outbound/10min → 429 + agent.loop_detected). Idempotency-Key required.
828
- # @param thread_id [String]
829
- # @param idempotency_key [String]
843
+ # Introspect the calling credentials
844
+ # Returns the tenant, auth kind (api_key/session), key label, and granted scopes. The MCP server uses this to scope-filter tool discovery.
830
845
  # @param [Hash] opts the optional parameters
831
- # @return [Object]
832
- def v1_threads_thread_id_reply_post(thread_id, idempotency_key, opts = {})
833
- data, _status_code, _headers = v1_threads_thread_id_reply_post_with_http_info(thread_id, idempotency_key, opts)
846
+ # @return [Whoami]
847
+ def whoami(opts = {})
848
+ data, _status_code, _headers = whoami_with_http_info(opts)
834
849
  data
835
850
  end
836
851
 
837
- # Reply in-thread (agent stream)
838
- # The server builds In-Reply-To/References and defaults recipients + subject from the conversation — a minimal call is {\&quot;text\&quot;: \&quot;...\&quot;}. Guarded by the reply-loop detector (≥5 outbound/10min → 429 + agent.loop_detected). Idempotency-Key required.
839
- # @param thread_id [String]
840
- # @param idempotency_key [String]
852
+ # Introspect the calling credentials
853
+ # Returns the tenant, auth kind (api_key/session), key label, and granted scopes. The MCP server uses this to scope-filter tool discovery.
841
854
  # @param [Hash] opts the optional parameters
842
- # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
843
- def v1_threads_thread_id_reply_post_with_http_info(thread_id, idempotency_key, opts = {})
855
+ # @return [Array<(Whoami, Integer, Hash)>] Whoami data, response status code and response headers
856
+ def whoami_with_http_info(opts = {})
844
857
  if @api_client.config.debugging
845
- @api_client.config.logger.debug 'Calling API: AgentsApi.v1_threads_thread_id_reply_post ...'
858
+ @api_client.config.logger.debug 'Calling API: AgentsApi.whoami ...'
846
859
  end
847
- # verify the required parameter 'thread_id' is set
848
- if @api_client.config.client_side_validation && thread_id.nil?
849
- fail ArgumentError, "Missing the required parameter 'thread_id' when calling AgentsApi.v1_threads_thread_id_reply_post"
850
- end
851
- # verify the required parameter 'idempotency_key' is set
852
- if @api_client.config.client_side_validation && idempotency_key.nil?
853
- fail ArgumentError, "Missing the required parameter 'idempotency_key' when calling AgentsApi.v1_threads_thread_id_reply_post"
854
- end
855
- if @api_client.config.client_side_validation && idempotency_key.to_s.length > 255
856
- fail ArgumentError, 'invalid value for "idempotency_key" when calling AgentsApi.v1_threads_thread_id_reply_post, the character length must be smaller than or equal to 255.'
857
- end
858
-
859
860
  # resource path
860
- local_var_path = '/v1/threads/{threadID}/reply'.sub('{threadID}', CGI.escape(thread_id.to_s))
861
+ local_var_path = '/v1/auth/whoami'
861
862
 
862
863
  # query parameters
863
864
  query_params = opts[:query_params] || {}
@@ -866,7 +867,6 @@ module Lockally
866
867
  header_params = opts[:header_params] || {}
867
868
  # HTTP header 'Accept' (if needed)
868
869
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
869
- header_params[:'Idempotency-Key'] = idempotency_key
870
870
 
871
871
  # form parameters
872
872
  form_params = opts[:form_params] || {}
@@ -875,13 +875,13 @@ module Lockally
875
875
  post_body = opts[:debug_body]
876
876
 
877
877
  # return_type
878
- return_type = opts[:debug_return_type] || 'Object'
878
+ return_type = opts[:debug_return_type] || 'Whoami'
879
879
 
880
880
  # auth_names
881
881
  auth_names = opts[:debug_auth_names] || ['bearerAuth']
882
882
 
883
883
  new_options = opts.merge(
884
- :operation => :"AgentsApi.v1_threads_thread_id_reply_post",
884
+ :operation => :"AgentsApi.whoami",
885
885
  :header_params => header_params,
886
886
  :query_params => query_params,
887
887
  :form_params => form_params,
@@ -890,9 +890,9 @@ module Lockally
890
890
  :return_type => return_type
891
891
  )
892
892
 
893
- data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
893
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
894
894
  if @api_client.config.debugging
895
- @api_client.config.logger.debug "API called: AgentsApi#v1_threads_thread_id_reply_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
895
+ @api_client.config.logger.debug "API called: AgentsApi#whoami\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
896
896
  end
897
897
  return data, status_code, headers
898
898
  end