lockally 0.2.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 (238) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +143 -119
  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/ContactLookup.md +26 -0
  15. data/docs/ContactLookupContact.md +28 -0
  16. data/docs/ContactLookupHistory.md +22 -0
  17. data/docs/CreateAiUnitsCheckout200Response.md +22 -0
  18. data/docs/{V1AliasesPostRequest.md → CreateAliasRequest.md} +2 -2
  19. data/docs/{V1ApiKeysPost201Response.md → CreateApiKey201Response.md} +2 -2
  20. data/docs/{V1ApiKeysPostRequest.md → CreateApiKeyRequest.md} +2 -2
  21. data/docs/{V1DomainsPostRequest.md → CreateDomainRequest.md} +2 -2
  22. data/docs/{V1MailboxesPostRequest.md → CreateMailboxRequest.md} +2 -2
  23. data/docs/{V1SuppressionsPostRequest.md → CreateSuppressionRequest.md} +2 -2
  24. data/docs/{V1WebhooksPostRequest.md → CreateWebhookRequest.md} +2 -2
  25. data/docs/DomainsApi.md +141 -141
  26. data/docs/Draft.md +44 -0
  27. data/docs/DraftList.md +18 -0
  28. data/docs/DraftResult.md +26 -0
  29. data/docs/DraftsApi.md +115 -115
  30. data/docs/{V1MailboxesEmailExportPost201Response.md → ExportMailbox201Response.md} +2 -2
  31. data/docs/{V1AdminMeGet200Response.md → GetCurrentAdmin200Response.md} +2 -2
  32. data/docs/{V1UsageGet200Response.md → GetUsage200Response.md} +2 -2
  33. data/docs/HealthApi.md +11 -11
  34. data/docs/{HealthzGet200Response.md → HealthCheck200Response.md} +2 -2
  35. data/docs/Inbox.md +24 -0
  36. data/docs/InboxList.md +18 -0
  37. data/docs/{V1AdminsPostRequest.md → InviteAdminRequest.md} +2 -2
  38. data/docs/{V1AdminsGet200Response.md → ListAdmins200Response.md} +2 -2
  39. data/docs/{V1AliasesGet200Response.md → ListAliases200Response.md} +2 -2
  40. data/docs/{V1ApiKeysGet200Response.md → ListApiKeys200Response.md} +2 -2
  41. data/docs/{V1DomainsGet200Response.md → ListDomains200Response.md} +2 -2
  42. data/docs/{V1MailboxesGet200Response.md → ListMailboxes200Response.md} +2 -2
  43. data/docs/{V1MessagesGet200Response.md → ListMessages200Response.md} +2 -2
  44. data/docs/{V1SuppressionsGet200Response.md → ListSuppressions200Response.md} +2 -2
  45. data/docs/{V1TemplatesGet200Response.md → ListTemplates200Response.md} +2 -2
  46. data/docs/{V1VacationGet200Response.md → ListVacationResponders200Response.md} +2 -2
  47. data/docs/{V1WebhooksGet200Response.md → ListWebhooks200Response.md} +2 -2
  48. data/docs/MailboxGrant.md +20 -0
  49. data/docs/MailboxGrantList.md +18 -0
  50. data/docs/MailboxesApi.md +203 -203
  51. data/docs/MarkReadResult.md +18 -0
  52. data/docs/SendApi.md +121 -121
  53. data/docs/{V1SendPost200Response.md → SendEmail200Response.md} +2 -2
  54. data/docs/{V1SendPost202Response.md → SendEmail202Response.md} +2 -2
  55. data/docs/{V1SendBatchPost200Response.md → SendEmailBatch200Response.md} +2 -2
  56. data/docs/{V1SendBatchPostRequest.md → SendEmailBatchRequest.md} +2 -2
  57. data/docs/{V1SendPostRequest.md → SendEmailRequest.md} +3 -3
  58. data/docs/{V1SendPostRequestAttachmentsInner.md → SendEmailRequestAttachmentsInner.md} +2 -2
  59. data/docs/SendMessage.md +1 -1
  60. data/docs/{V1MailboxesEmailVacationPutRequest.md → SetVacationResponderRequest.md} +2 -2
  61. data/docs/SignupApi.md +4 -4
  62. data/docs/SimulatedInbound.md +22 -0
  63. data/docs/{V1InboxesMailboxMessagesPostRequest.md → StartConversationRequest.md} +2 -2
  64. data/docs/SuppressionsApi.md +75 -75
  65. data/docs/TemplatesApi.md +67 -67
  66. data/docs/TenantApi.md +20 -20
  67. data/docs/TestApi.md +11 -11
  68. data/docs/Thread.md +22 -0
  69. data/docs/ThreadClassification.md +22 -0
  70. data/docs/ThreadList.md +20 -0
  71. data/docs/ThreadMessage.md +40 -0
  72. data/docs/ThreadMessageBody.md +42 -0
  73. data/docs/ThreadMessageBodyAllOfBody.md +22 -0
  74. data/docs/ThreadSummary.md +28 -0
  75. data/docs/{V1AdminsIdPatchRequest.md → UpdateAdminRequest.md} +2 -2
  76. data/docs/{V1MailboxesEmailPatchRequest.md → UpdateMailboxRequest.md} +2 -2
  77. data/docs/{V1WebhooksIdPatchRequest.md → UpdateWebhookRequest.md} +2 -2
  78. data/docs/WebhooksApi.md +63 -63
  79. data/docs/Whoami.md +24 -0
  80. data/lib/lockally/api/admin_api.rb +30 -30
  81. data/lib/lockally/api/admins_api.rb +89 -89
  82. data/lib/lockally/api/agents_api.rb +309 -309
  83. data/lib/lockally/api/ai_api.rb +69 -69
  84. data/lib/lockally/api/aliases_api.rb +64 -64
  85. data/lib/lockally/api/api_keys_api.rb +66 -66
  86. data/lib/lockally/api/domains_api.rb +147 -147
  87. data/lib/lockally/api/drafts_api.rb +140 -140
  88. data/lib/lockally/api/health_api.rb +9 -9
  89. data/lib/lockally/api/mailboxes_api.rb +233 -233
  90. data/lib/lockally/api/send_api.rb +146 -146
  91. data/lib/lockally/api/signup_api.rb +3 -3
  92. data/lib/lockally/api/suppressions_api.rb +87 -87
  93. data/lib/lockally/api/templates_api.rb +69 -69
  94. data/lib/lockally/api/tenant_api.rb +15 -15
  95. data/lib/lockally/api/test_api.rb +9 -9
  96. data/lib/lockally/api/webhooks_api.rb +73 -73
  97. data/lib/lockally/models/{v1_admin_login_post200_response.rb → admin_login200_response.rb} +3 -3
  98. data/lib/lockally/models/{v1_admin_login_post_request.rb → admin_login_request.rb} +3 -3
  99. data/lib/lockally/models/agent_send_result.rb +184 -0
  100. data/lib/lockally/models/ai_config.rb +242 -0
  101. data/lib/lockally/models/ai_config_update.rb +214 -0
  102. data/lib/lockally/models/contact_lookup.rb +235 -0
  103. data/lib/lockally/models/contact_lookup_contact.rb +192 -0
  104. data/lib/lockally/models/contact_lookup_history.rb +166 -0
  105. data/lib/lockally/models/create_ai_units_checkout200_response.rb +199 -0
  106. data/lib/lockally/models/{v1_aliases_post_request.rb → create_alias_request.rb} +3 -3
  107. data/lib/lockally/models/{v1_api_keys_post201_response.rb → create_api_key201_response.rb} +3 -3
  108. data/lib/lockally/models/{v1_api_keys_post_request.rb → create_api_key_request.rb} +3 -3
  109. data/lib/lockally/models/{v1_domains_post_request.rb → create_domain_request.rb} +3 -3
  110. data/lib/lockally/models/{v1_mailboxes_post_request.rb → create_mailbox_request.rb} +3 -3
  111. data/lib/lockally/models/{v1_suppressions_post_request.rb → create_suppression_request.rb} +3 -3
  112. data/lib/lockally/models/{v1_webhooks_post_request.rb → create_webhook_request.rb} +3 -3
  113. data/lib/lockally/models/draft.rb +413 -0
  114. data/lib/lockally/models/draft_list.rb +166 -0
  115. data/lib/lockally/models/draft_result.rb +260 -0
  116. data/lib/lockally/models/{v1_mailboxes_email_export_post201_response.rb → export_mailbox201_response.rb} +3 -3
  117. data/lib/lockally/models/{v1_admin_me_get200_response.rb → get_current_admin200_response.rb} +3 -3
  118. data/lib/lockally/models/{v1_usage_get200_response.rb → get_usage200_response.rb} +3 -3
  119. data/lib/lockally/models/{healthz_get200_response.rb → health_check200_response.rb} +3 -3
  120. data/lib/lockally/models/inbox.rb +225 -0
  121. data/lib/lockally/models/inbox_list.rb +166 -0
  122. data/lib/lockally/models/{v1_admins_post_request.rb → invite_admin_request.rb} +3 -3
  123. data/lib/lockally/models/list_admins200_response.rb +166 -0
  124. data/lib/lockally/models/{v1_aliases_get200_response.rb → list_aliases200_response.rb} +3 -3
  125. data/lib/lockally/models/{v1_admins_get200_response.rb → list_api_keys200_response.rb} +4 -4
  126. data/lib/lockally/models/{v1_domains_get200_response.rb → list_domains200_response.rb} +3 -3
  127. data/lib/lockally/models/{v1_mailboxes_get200_response.rb → list_mailboxes200_response.rb} +3 -3
  128. data/lib/lockally/models/{v1_messages_get200_response.rb → list_messages200_response.rb} +3 -3
  129. data/lib/lockally/models/{v1_suppressions_get200_response.rb → list_suppressions200_response.rb} +3 -3
  130. data/lib/lockally/models/{v1_send_batch_post200_response.rb → list_templates200_response.rb} +4 -4
  131. data/lib/lockally/models/{v1_vacation_get200_response.rb → list_vacation_responders200_response.rb} +3 -3
  132. data/lib/lockally/models/{v1_api_keys_get200_response.rb → list_webhooks200_response.rb} +4 -4
  133. data/lib/lockally/models/mailbox_grant.rb +156 -0
  134. data/lib/lockally/models/mailbox_grant_list.rb +166 -0
  135. data/lib/lockally/models/mark_read_result.rb +147 -0
  136. data/lib/lockally/models/{v1_send_post200_response.rb → send_email200_response.rb} +3 -3
  137. data/lib/lockally/models/{v1_send_post202_response.rb → send_email202_response.rb} +3 -3
  138. data/lib/lockally/models/{v1_templates_get200_response.rb → send_email_batch200_response.rb} +4 -4
  139. data/lib/lockally/models/{v1_send_batch_post_request.rb → send_email_batch_request.rb} +3 -3
  140. data/lib/lockally/models/{v1_send_post_request.rb → send_email_request.rb} +4 -4
  141. data/lib/lockally/models/{v1_send_post_request_attachments_inner.rb → send_email_request_attachments_inner.rb} +3 -3
  142. data/lib/lockally/models/send_message.rb +1 -1
  143. data/lib/lockally/models/{v1_mailboxes_email_vacation_put_request.rb → set_vacation_responder_request.rb} +3 -3
  144. data/lib/lockally/models/simulated_inbound.rb +167 -0
  145. data/lib/lockally/models/{v1_inboxes_mailbox_messages_post_request.rb → start_conversation_request.rb} +3 -3
  146. data/lib/lockally/models/thread.rb +219 -0
  147. data/lib/lockally/models/thread_classification.rb +186 -0
  148. data/lib/lockally/models/thread_list.rb +192 -0
  149. data/lib/lockally/models/thread_message.rb +397 -0
  150. data/lib/lockally/models/thread_message_body.rb +413 -0
  151. data/lib/lockally/models/thread_message_body_all_of_body.rb +165 -0
  152. data/lib/lockally/models/thread_summary.rb +280 -0
  153. data/lib/lockally/models/{v1_admins_id_patch_request.rb → update_admin_request.rb} +3 -3
  154. data/lib/lockally/models/{v1_mailboxes_email_patch_request.rb → update_mailbox_request.rb} +3 -3
  155. data/lib/lockally/models/{v1_webhooks_id_patch_request.rb → update_webhook_request.rb} +3 -3
  156. data/lib/lockally/models/whoami.rb +177 -0
  157. data/lib/lockally/version.rb +1 -1
  158. data/lib/lockally.rb +59 -35
  159. data/spec/api/admin_api_spec.rb +9 -9
  160. data/spec/api/admins_api_spec.rb +22 -22
  161. data/spec/api/agents_api_spec.rb +78 -78
  162. data/spec/api/ai_api_spec.rb +22 -22
  163. data/spec/api/aliases_api_spec.rb +16 -16
  164. data/spec/api/api_keys_api_spec.rb +17 -17
  165. data/spec/api/domains_api_spec.rb +42 -42
  166. data/spec/api/drafts_api_spec.rb +38 -38
  167. data/spec/api/health_api_spec.rb +3 -3
  168. data/spec/api/mailboxes_api_spec.rb +61 -61
  169. data/spec/api/send_api_spec.rb +35 -35
  170. data/spec/api/signup_api_spec.rb +1 -1
  171. data/spec/api/suppressions_api_spec.rb +18 -18
  172. data/spec/api/templates_api_spec.rb +17 -17
  173. data/spec/api/tenant_api_spec.rb +5 -5
  174. data/spec/api/test_api_spec.rb +3 -3
  175. data/spec/api/webhooks_api_spec.rb +19 -19
  176. data/spec/models/{v1_admin_login_post200_response_spec.rb → admin_login200_response_spec.rb} +6 -6
  177. data/spec/models/{v1_admin_login_post_request_spec.rb → admin_login_request_spec.rb} +6 -6
  178. data/spec/models/agent_send_result_spec.rb +48 -0
  179. data/spec/models/ai_config_spec.rb +64 -0
  180. data/spec/models/ai_config_update_spec.rb +46 -0
  181. data/spec/models/contact_lookup_contact_spec.rb +66 -0
  182. data/spec/models/contact_lookup_history_spec.rb +48 -0
  183. data/spec/models/contact_lookup_spec.rb +60 -0
  184. data/spec/models/create_ai_units_checkout200_response_spec.rb +48 -0
  185. data/spec/models/{v1_aliases_post_request_spec.rb → create_alias_request_spec.rb} +6 -6
  186. data/spec/models/{v1_api_keys_post201_response_spec.rb → create_api_key201_response_spec.rb} +6 -6
  187. data/spec/models/{v1_api_keys_post_request_spec.rb → create_api_key_request_spec.rb} +6 -6
  188. data/spec/models/{v1_domains_post_request_spec.rb → create_domain_request_spec.rb} +6 -6
  189. data/spec/models/{v1_mailboxes_post_request_spec.rb → create_mailbox_request_spec.rb} +6 -6
  190. data/spec/models/{v1_suppressions_post_request_spec.rb → create_suppression_request_spec.rb} +6 -6
  191. data/spec/models/{v1_webhooks_post_request_spec.rb → create_webhook_request_spec.rb} +6 -6
  192. data/spec/models/draft_list_spec.rb +36 -0
  193. data/spec/models/draft_result_spec.rb +64 -0
  194. data/spec/models/draft_spec.rb +118 -0
  195. data/spec/models/{v1_mailboxes_email_export_post201_response_spec.rb → export_mailbox201_response_spec.rb} +6 -6
  196. data/spec/models/{v1_admin_me_get200_response_spec.rb → get_current_admin200_response_spec.rb} +6 -6
  197. data/spec/models/{v1_usage_get200_response_spec.rb → get_usage200_response_spec.rb} +6 -6
  198. data/spec/models/{healthz_get200_response_spec.rb → health_check200_response_spec.rb} +6 -6
  199. data/spec/models/inbox_list_spec.rb +36 -0
  200. data/spec/models/inbox_spec.rb +54 -0
  201. data/spec/models/{v1_admins_post_request_spec.rb → invite_admin_request_spec.rb} +6 -6
  202. data/spec/models/{v1_aliases_get200_response_spec.rb → list_admins200_response_spec.rb} +6 -6
  203. data/spec/models/{v1_admins_get200_response_spec.rb → list_aliases200_response_spec.rb} +6 -6
  204. data/spec/models/{v1_api_keys_get200_response_spec.rb → list_api_keys200_response_spec.rb} +6 -6
  205. data/spec/models/list_domains200_response_spec.rb +36 -0
  206. data/spec/models/{v1_mailboxes_get200_response_spec.rb → list_mailboxes200_response_spec.rb} +6 -6
  207. data/spec/models/{v1_messages_get200_response_spec.rb → list_messages200_response_spec.rb} +6 -6
  208. data/spec/models/{v1_suppressions_get200_response_spec.rb → list_suppressions200_response_spec.rb} +6 -6
  209. data/spec/models/{v1_vacation_get200_response_spec.rb → list_templates200_response_spec.rb} +6 -6
  210. data/spec/models/list_vacation_responders200_response_spec.rb +36 -0
  211. data/spec/models/{v1_domains_get200_response_spec.rb → list_webhooks200_response_spec.rb} +6 -6
  212. data/spec/models/mailbox_grant_list_spec.rb +36 -0
  213. data/spec/models/mailbox_grant_spec.rb +42 -0
  214. data/spec/models/mark_read_result_spec.rb +36 -0
  215. data/spec/models/{v1_send_post200_response_spec.rb → send_email200_response_spec.rb} +6 -6
  216. data/spec/models/{v1_send_post202_response_spec.rb → send_email202_response_spec.rb} +6 -6
  217. data/spec/models/{v1_templates_get200_response_spec.rb → send_email_batch200_response_spec.rb} +6 -6
  218. data/spec/models/{v1_send_batch_post_request_spec.rb → send_email_batch_request_spec.rb} +6 -6
  219. data/spec/models/{v1_send_post_request_attachments_inner_spec.rb → send_email_request_attachments_inner_spec.rb} +6 -6
  220. data/spec/models/{v1_send_post_request_spec.rb → send_email_request_spec.rb} +6 -6
  221. data/spec/models/{v1_mailboxes_email_vacation_put_request_spec.rb → set_vacation_responder_request_spec.rb} +6 -6
  222. data/spec/models/simulated_inbound_spec.rb +48 -0
  223. data/spec/models/{v1_inboxes_mailbox_messages_post_request_spec.rb → start_conversation_request_spec.rb} +6 -6
  224. data/spec/models/thread_classification_spec.rb +48 -0
  225. data/spec/models/thread_list_spec.rb +42 -0
  226. data/spec/models/thread_message_body_all_of_body_spec.rb +48 -0
  227. data/spec/models/thread_message_body_spec.rb +112 -0
  228. data/spec/models/thread_message_spec.rb +106 -0
  229. data/spec/models/thread_spec.rb +48 -0
  230. data/spec/models/thread_summary_spec.rb +70 -0
  231. data/spec/models/{v1_admins_id_patch_request_spec.rb → update_admin_request_spec.rb} +6 -6
  232. data/spec/models/{v1_mailboxes_email_patch_request_spec.rb → update_mailbox_request_spec.rb} +6 -6
  233. data/spec/models/{v1_webhooks_id_patch_request_spec.rb → update_webhook_request_spec.rb} +6 -6
  234. data/spec/models/whoami_spec.rb +54 -0
  235. metadata +238 -142
  236. data/lib/lockally/models/v1_webhooks_get200_response.rb +0 -166
  237. data/spec/models/v1_send_batch_post200_response_spec.rb +0 -36
  238. data/spec/models/v1_webhooks_get200_response_spec.rb +0 -36
data/docs/AgentsApi.md CHANGED
@@ -4,26 +4,26 @@ All URIs are relative to *https://api.lockally.com*
4
4
 
5
5
  | Method | HTTP request | Description |
6
6
  | ------ | ------------ | ----------- |
7
- | [**v1_api_keys_key_id_mailboxes_get**](AgentsApi.md#v1_api_keys_key_id_mailboxes_get) | **GET** /v1/api-keys/{keyID}/mailboxes | List a key's mailbox grants |
8
- | [**v1_api_keys_key_id_mailboxes_mailbox_id_delete**](AgentsApi.md#v1_api_keys_key_id_mailboxes_mailbox_id_delete) | **DELETE** /v1/api-keys/{keyID}/mailboxes/{mailboxID} | Revoke a mailbox grant |
9
- | [**v1_api_keys_key_id_mailboxes_post**](AgentsApi.md#v1_api_keys_key_id_mailboxes_post) | **POST** /v1/api-keys/{keyID}/mailboxes | Grant a mailbox to a key |
10
- | [**v1_auth_whoami_get**](AgentsApi.md#v1_auth_whoami_get) | **GET** /v1/auth/whoami | Introspect the calling credentials |
11
- | [**v1_contacts_lookup_get**](AgentsApi.md#v1_contacts_lookup_get) | **GET** /v1/contacts/lookup | Who is this sender? |
12
- | [**v1_inboxes_get**](AgentsApi.md#v1_inboxes_get) | **GET** /v1/inboxes | List granted inboxes |
13
- | [**v1_inboxes_mailbox_messages_post**](AgentsApi.md#v1_inboxes_mailbox_messages_post) | **POST** /v1/inboxes/{mailbox}/messages | Start a new conversation (agent stream) |
14
- | [**v1_inboxes_mailbox_threads_get**](AgentsApi.md#v1_inboxes_mailbox_threads_get) | **GET** /v1/inboxes/{mailbox}/threads | List conversation threads |
15
- | [**v1_threads_thread_id_get**](AgentsApi.md#v1_threads_thread_id_get) | **GET** /v1/threads/{threadID} | Get a whole conversation |
16
- | [**v1_threads_thread_id_messages_message_id_attachments_idx_get**](AgentsApi.md#v1_threads_thread_id_messages_message_id_attachments_idx_get) | **GET** /v1/threads/{threadID}/messages/{messageID}/attachments/{idx} | Download an attachment |
17
- | [**v1_threads_thread_id_messages_message_id_get**](AgentsApi.md#v1_threads_thread_id_messages_message_id_get) | **GET** /v1/threads/{threadID}/messages/{messageID} | Get one message with body |
18
- | [**v1_threads_thread_id_messages_message_id_read_post**](AgentsApi.md#v1_threads_thread_id_messages_message_id_read_post) | **POST** /v1/threads/{threadID}/messages/{messageID}/read | Mark read/unread |
19
- | [**v1_threads_thread_id_reply_post**](AgentsApi.md#v1_threads_thread_id_reply_post) | **POST** /v1/threads/{threadID}/reply | Reply in-thread (agent stream) |
7
+ | [**download_thread_attachment**](AgentsApi.md#download_thread_attachment) | **GET** /v1/threads/{threadID}/messages/{messageID}/attachments/{idx} | Download an attachment |
8
+ | [**get_thread**](AgentsApi.md#get_thread) | **GET** /v1/threads/{threadID} | Get a whole conversation |
9
+ | [**get_thread_message**](AgentsApi.md#get_thread_message) | **GET** /v1/threads/{threadID}/messages/{messageID} | Get one message with body |
10
+ | [**grant_api_key_mailbox**](AgentsApi.md#grant_api_key_mailbox) | **POST** /v1/api-keys/{keyID}/mailboxes | Grant a mailbox to a key |
11
+ | [**list_api_key_mailboxes**](AgentsApi.md#list_api_key_mailboxes) | **GET** /v1/api-keys/{keyID}/mailboxes | List a key's mailbox grants |
12
+ | [**list_inboxes**](AgentsApi.md#list_inboxes) | **GET** /v1/inboxes | List granted inboxes |
13
+ | [**list_threads**](AgentsApi.md#list_threads) | **GET** /v1/inboxes/{mailbox}/threads | List conversation threads |
14
+ | [**lookup_contact**](AgentsApi.md#lookup_contact) | **GET** /v1/contacts/lookup | Who is this sender? |
15
+ | [**mark_thread_message_read**](AgentsApi.md#mark_thread_message_read) | **POST** /v1/threads/{threadID}/messages/{messageID}/read | Mark read/unread |
16
+ | [**reply_to_thread**](AgentsApi.md#reply_to_thread) | **POST** /v1/threads/{threadID}/reply | Reply in-thread (agent stream) |
17
+ | [**revoke_api_key_mailbox**](AgentsApi.md#revoke_api_key_mailbox) | **DELETE** /v1/api-keys/{keyID}/mailboxes/{mailboxID} | Revoke a mailbox grant |
18
+ | [**start_conversation**](AgentsApi.md#start_conversation) | **POST** /v1/inboxes/{mailbox}/messages | Start a new conversation (agent stream) |
19
+ | [**whoami**](AgentsApi.md#whoami) | **GET** /v1/auth/whoami | Introspect the calling credentials |
20
20
 
21
21
 
22
- ## v1_api_keys_key_id_mailboxes_get
22
+ ## download_thread_attachment
23
23
 
24
- > Object v1_api_keys_key_id_mailboxes_get(key_id)
24
+ > download_thread_attachment(thread_id, message_id, idx)
25
25
 
26
- List a key's mailbox grants
26
+ Download an attachment
27
27
 
28
28
  ### Examples
29
29
 
@@ -37,32 +37,33 @@ Lockally.configure do |config|
37
37
  end
38
38
 
39
39
  api_instance = Lockally::AgentsApi.new
40
- key_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String |
40
+ thread_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String |
41
+ message_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String |
42
+ idx = 56 # Integer |
41
43
 
42
44
  begin
43
- # List a key's mailbox grants
44
- result = api_instance.v1_api_keys_key_id_mailboxes_get(key_id)
45
- p result
45
+ # Download an attachment
46
+ api_instance.download_thread_attachment(thread_id, message_id, idx)
46
47
  rescue Lockally::ApiError => e
47
- puts "Error when calling AgentsApi->v1_api_keys_key_id_mailboxes_get: #{e}"
48
+ puts "Error when calling AgentsApi->download_thread_attachment: #{e}"
48
49
  end
49
50
  ```
50
51
 
51
- #### Using the v1_api_keys_key_id_mailboxes_get_with_http_info variant
52
+ #### Using the download_thread_attachment_with_http_info variant
52
53
 
53
- This returns an Array which contains the response data, status code and headers.
54
+ This returns an Array which contains the response data (`nil` in this case), status code and headers.
54
55
 
55
- > <Array(Object, Integer, Hash)> v1_api_keys_key_id_mailboxes_get_with_http_info(key_id)
56
+ > <Array(nil, Integer, Hash)> download_thread_attachment_with_http_info(thread_id, message_id, idx)
56
57
 
57
58
  ```ruby
58
59
  begin
59
- # List a key's mailbox grants
60
- data, status_code, headers = api_instance.v1_api_keys_key_id_mailboxes_get_with_http_info(key_id)
60
+ # Download an attachment
61
+ data, status_code, headers = api_instance.download_thread_attachment_with_http_info(thread_id, message_id, idx)
61
62
  p status_code # => 2xx
62
63
  p headers # => { ... }
63
- p data # => Object
64
+ p data # => nil
64
65
  rescue Lockally::ApiError => e
65
- puts "Error when calling AgentsApi->v1_api_keys_key_id_mailboxes_get_with_http_info: #{e}"
66
+ puts "Error when calling AgentsApi->download_thread_attachment_with_http_info: #{e}"
66
67
  end
67
68
  ```
68
69
 
@@ -70,11 +71,13 @@ end
70
71
 
71
72
  | Name | Type | Description | Notes |
72
73
  | ---- | ---- | ----------- | ----- |
73
- | **key_id** | **String** | | |
74
+ | **thread_id** | **String** | | |
75
+ | **message_id** | **String** | | |
76
+ | **idx** | **Integer** | | |
74
77
 
75
78
  ### Return type
76
79
 
77
- **Object**
80
+ nil (empty response body)
78
81
 
79
82
  ### Authorization
80
83
 
@@ -83,14 +86,16 @@ end
83
86
  ### HTTP request headers
84
87
 
85
88
  - **Content-Type**: Not defined
86
- - **Accept**: application/json
89
+ - **Accept**: Not defined
87
90
 
88
91
 
89
- ## v1_api_keys_key_id_mailboxes_mailbox_id_delete
92
+ ## get_thread
90
93
 
91
- > v1_api_keys_key_id_mailboxes_mailbox_id_delete(key_id, mailbox_id)
94
+ > <Thread> get_thread(thread_id)
92
95
 
93
- Revoke a mailbox grant
96
+ Get a whole conversation
97
+
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.
94
99
 
95
100
  ### Examples
96
101
 
@@ -104,32 +109,32 @@ Lockally.configure do |config|
104
109
  end
105
110
 
106
111
  api_instance = Lockally::AgentsApi.new
107
- key_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String |
108
- mailbox_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String |
112
+ thread_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String |
109
113
 
110
114
  begin
111
- # Revoke a mailbox grant
112
- api_instance.v1_api_keys_key_id_mailboxes_mailbox_id_delete(key_id, mailbox_id)
115
+ # Get a whole conversation
116
+ result = api_instance.get_thread(thread_id)
117
+ p result
113
118
  rescue Lockally::ApiError => e
114
- puts "Error when calling AgentsApi->v1_api_keys_key_id_mailboxes_mailbox_id_delete: #{e}"
119
+ puts "Error when calling AgentsApi->get_thread: #{e}"
115
120
  end
116
121
  ```
117
122
 
118
- #### Using the v1_api_keys_key_id_mailboxes_mailbox_id_delete_with_http_info variant
123
+ #### Using the get_thread_with_http_info variant
119
124
 
120
- This returns an Array which contains the response data (`nil` in this case), status code and headers.
125
+ This returns an Array which contains the response data, status code and headers.
121
126
 
122
- > <Array(nil, Integer, Hash)> v1_api_keys_key_id_mailboxes_mailbox_id_delete_with_http_info(key_id, mailbox_id)
127
+ > <Array(<Thread>, Integer, Hash)> get_thread_with_http_info(thread_id)
123
128
 
124
129
  ```ruby
125
130
  begin
126
- # Revoke a mailbox grant
127
- data, status_code, headers = api_instance.v1_api_keys_key_id_mailboxes_mailbox_id_delete_with_http_info(key_id, mailbox_id)
131
+ # Get a whole conversation
132
+ data, status_code, headers = api_instance.get_thread_with_http_info(thread_id)
128
133
  p status_code # => 2xx
129
134
  p headers # => { ... }
130
- p data # => nil
135
+ p data # => <Thread>
131
136
  rescue Lockally::ApiError => e
132
- puts "Error when calling AgentsApi->v1_api_keys_key_id_mailboxes_mailbox_id_delete_with_http_info: #{e}"
137
+ puts "Error when calling AgentsApi->get_thread_with_http_info: #{e}"
133
138
  end
134
139
  ```
135
140
 
@@ -137,12 +142,11 @@ end
137
142
 
138
143
  | Name | Type | Description | Notes |
139
144
  | ---- | ---- | ----------- | ----- |
140
- | **key_id** | **String** | | |
141
- | **mailbox_id** | **String** | | |
145
+ | **thread_id** | **String** | | |
142
146
 
143
147
  ### Return type
144
148
 
145
- nil (empty response body)
149
+ [**Thread**](Thread.md)
146
150
 
147
151
  ### Authorization
148
152
 
@@ -151,16 +155,16 @@ nil (empty response body)
151
155
  ### HTTP request headers
152
156
 
153
157
  - **Content-Type**: Not defined
154
- - **Accept**: Not defined
158
+ - **Accept**: application/json
155
159
 
156
160
 
157
- ## v1_api_keys_key_id_mailboxes_post
161
+ ## get_thread_message
158
162
 
159
- > Object v1_api_keys_key_id_mailboxes_post(key_id)
163
+ > <ThreadMessageBody> get_thread_message(thread_id, message_id)
160
164
 
161
- Grant a mailbox to a key
165
+ Get one message with body
162
166
 
163
- 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.
167
+ Full text/html body fetched on demand from mail storage. Never marks the message read.
164
168
 
165
169
  ### Examples
166
170
 
@@ -174,32 +178,33 @@ Lockally.configure do |config|
174
178
  end
175
179
 
176
180
  api_instance = Lockally::AgentsApi.new
177
- key_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String |
181
+ thread_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String |
182
+ message_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String |
178
183
 
179
184
  begin
180
- # Grant a mailbox to a key
181
- result = api_instance.v1_api_keys_key_id_mailboxes_post(key_id)
185
+ # Get one message with body
186
+ result = api_instance.get_thread_message(thread_id, message_id)
182
187
  p result
183
188
  rescue Lockally::ApiError => e
184
- puts "Error when calling AgentsApi->v1_api_keys_key_id_mailboxes_post: #{e}"
189
+ puts "Error when calling AgentsApi->get_thread_message: #{e}"
185
190
  end
186
191
  ```
187
192
 
188
- #### Using the v1_api_keys_key_id_mailboxes_post_with_http_info variant
193
+ #### Using the get_thread_message_with_http_info variant
189
194
 
190
195
  This returns an Array which contains the response data, status code and headers.
191
196
 
192
- > <Array(Object, Integer, Hash)> v1_api_keys_key_id_mailboxes_post_with_http_info(key_id)
197
+ > <Array(<ThreadMessageBody>, Integer, Hash)> get_thread_message_with_http_info(thread_id, message_id)
193
198
 
194
199
  ```ruby
195
200
  begin
196
- # Grant a mailbox to a key
197
- data, status_code, headers = api_instance.v1_api_keys_key_id_mailboxes_post_with_http_info(key_id)
201
+ # Get one message with body
202
+ data, status_code, headers = api_instance.get_thread_message_with_http_info(thread_id, message_id)
198
203
  p status_code # => 2xx
199
204
  p headers # => { ... }
200
- p data # => Object
205
+ p data # => <ThreadMessageBody>
201
206
  rescue Lockally::ApiError => e
202
- puts "Error when calling AgentsApi->v1_api_keys_key_id_mailboxes_post_with_http_info: #{e}"
207
+ puts "Error when calling AgentsApi->get_thread_message_with_http_info: #{e}"
203
208
  end
204
209
  ```
205
210
 
@@ -207,11 +212,12 @@ end
207
212
 
208
213
  | Name | Type | Description | Notes |
209
214
  | ---- | ---- | ----------- | ----- |
210
- | **key_id** | **String** | | |
215
+ | **thread_id** | **String** | | |
216
+ | **message_id** | **String** | | |
211
217
 
212
218
  ### Return type
213
219
 
214
- **Object**
220
+ [**ThreadMessageBody**](ThreadMessageBody.md)
215
221
 
216
222
  ### Authorization
217
223
 
@@ -223,13 +229,13 @@ end
223
229
  - **Accept**: application/json
224
230
 
225
231
 
226
- ## v1_auth_whoami_get
232
+ ## grant_api_key_mailbox
227
233
 
228
- > Object v1_auth_whoami_get
234
+ > <MailboxGrant> grant_api_key_mailbox(key_id)
229
235
 
230
- Introspect the calling credentials
236
+ Grant a mailbox to a key
231
237
 
232
- Returns the tenant, auth kind (api_key/session), key label, and granted scopes. The MCP server uses this to scope-filter tool discovery.
238
+ 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.
233
239
 
234
240
  ### Examples
235
241
 
@@ -243,41 +249,44 @@ Lockally.configure do |config|
243
249
  end
244
250
 
245
251
  api_instance = Lockally::AgentsApi.new
252
+ key_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String |
246
253
 
247
254
  begin
248
- # Introspect the calling credentials
249
- result = api_instance.v1_auth_whoami_get
255
+ # Grant a mailbox to a key
256
+ result = api_instance.grant_api_key_mailbox(key_id)
250
257
  p result
251
258
  rescue Lockally::ApiError => e
252
- puts "Error when calling AgentsApi->v1_auth_whoami_get: #{e}"
259
+ puts "Error when calling AgentsApi->grant_api_key_mailbox: #{e}"
253
260
  end
254
261
  ```
255
262
 
256
- #### Using the v1_auth_whoami_get_with_http_info variant
263
+ #### Using the grant_api_key_mailbox_with_http_info variant
257
264
 
258
265
  This returns an Array which contains the response data, status code and headers.
259
266
 
260
- > <Array(Object, Integer, Hash)> v1_auth_whoami_get_with_http_info
267
+ > <Array(<MailboxGrant>, Integer, Hash)> grant_api_key_mailbox_with_http_info(key_id)
261
268
 
262
269
  ```ruby
263
270
  begin
264
- # Introspect the calling credentials
265
- data, status_code, headers = api_instance.v1_auth_whoami_get_with_http_info
271
+ # Grant a mailbox to a key
272
+ data, status_code, headers = api_instance.grant_api_key_mailbox_with_http_info(key_id)
266
273
  p status_code # => 2xx
267
274
  p headers # => { ... }
268
- p data # => Object
275
+ p data # => <MailboxGrant>
269
276
  rescue Lockally::ApiError => e
270
- puts "Error when calling AgentsApi->v1_auth_whoami_get_with_http_info: #{e}"
277
+ puts "Error when calling AgentsApi->grant_api_key_mailbox_with_http_info: #{e}"
271
278
  end
272
279
  ```
273
280
 
274
281
  ### Parameters
275
282
 
276
- This endpoint does not need any parameter.
283
+ | Name | Type | Description | Notes |
284
+ | ---- | ---- | ----------- | ----- |
285
+ | **key_id** | **String** | | |
277
286
 
278
287
  ### Return type
279
288
 
280
- **Object**
289
+ [**MailboxGrant**](MailboxGrant.md)
281
290
 
282
291
  ### Authorization
283
292
 
@@ -289,13 +298,11 @@ This endpoint does not need any parameter.
289
298
  - **Accept**: application/json
290
299
 
291
300
 
292
- ## v1_contacts_lookup_get
301
+ ## list_api_key_mailboxes
293
302
 
294
- > Object v1_contacts_lookup_get(email)
295
-
296
- Who is this sender?
303
+ > <MailboxGrantList> list_api_key_mailboxes(key_id)
297
304
 
298
- 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).
305
+ List a key's mailbox grants
299
306
 
300
307
  ### Examples
301
308
 
@@ -309,32 +316,32 @@ Lockally.configure do |config|
309
316
  end
310
317
 
311
318
  api_instance = Lockally::AgentsApi.new
312
- email = 'email_example' # String |
319
+ key_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String |
313
320
 
314
321
  begin
315
- # Who is this sender?
316
- result = api_instance.v1_contacts_lookup_get(email)
322
+ # List a key's mailbox grants
323
+ result = api_instance.list_api_key_mailboxes(key_id)
317
324
  p result
318
325
  rescue Lockally::ApiError => e
319
- puts "Error when calling AgentsApi->v1_contacts_lookup_get: #{e}"
326
+ puts "Error when calling AgentsApi->list_api_key_mailboxes: #{e}"
320
327
  end
321
328
  ```
322
329
 
323
- #### Using the v1_contacts_lookup_get_with_http_info variant
330
+ #### Using the list_api_key_mailboxes_with_http_info variant
324
331
 
325
332
  This returns an Array which contains the response data, status code and headers.
326
333
 
327
- > <Array(Object, Integer, Hash)> v1_contacts_lookup_get_with_http_info(email)
334
+ > <Array(<MailboxGrantList>, Integer, Hash)> list_api_key_mailboxes_with_http_info(key_id)
328
335
 
329
336
  ```ruby
330
337
  begin
331
- # Who is this sender?
332
- data, status_code, headers = api_instance.v1_contacts_lookup_get_with_http_info(email)
338
+ # List a key's mailbox grants
339
+ data, status_code, headers = api_instance.list_api_key_mailboxes_with_http_info(key_id)
333
340
  p status_code # => 2xx
334
341
  p headers # => { ... }
335
- p data # => Object
342
+ p data # => <MailboxGrantList>
336
343
  rescue Lockally::ApiError => e
337
- puts "Error when calling AgentsApi->v1_contacts_lookup_get_with_http_info: #{e}"
344
+ puts "Error when calling AgentsApi->list_api_key_mailboxes_with_http_info: #{e}"
338
345
  end
339
346
  ```
340
347
 
@@ -342,11 +349,11 @@ end
342
349
 
343
350
  | Name | Type | Description | Notes |
344
351
  | ---- | ---- | ----------- | ----- |
345
- | **email** | **String** | | |
352
+ | **key_id** | **String** | | |
346
353
 
347
354
  ### Return type
348
355
 
349
- **Object**
356
+ [**MailboxGrantList**](MailboxGrantList.md)
350
357
 
351
358
  ### Authorization
352
359
 
@@ -358,9 +365,9 @@ end
358
365
  - **Accept**: application/json
359
366
 
360
367
 
361
- ## v1_inboxes_get
368
+ ## list_inboxes
362
369
 
363
- > Object v1_inboxes_get
370
+ > <InboxList> list_inboxes
364
371
 
365
372
  List granted inboxes
366
373
 
@@ -381,28 +388,28 @@ api_instance = Lockally::AgentsApi.new
381
388
 
382
389
  begin
383
390
  # List granted inboxes
384
- result = api_instance.v1_inboxes_get
391
+ result = api_instance.list_inboxes
385
392
  p result
386
393
  rescue Lockally::ApiError => e
387
- puts "Error when calling AgentsApi->v1_inboxes_get: #{e}"
394
+ puts "Error when calling AgentsApi->list_inboxes: #{e}"
388
395
  end
389
396
  ```
390
397
 
391
- #### Using the v1_inboxes_get_with_http_info variant
398
+ #### Using the list_inboxes_with_http_info variant
392
399
 
393
400
  This returns an Array which contains the response data, status code and headers.
394
401
 
395
- > <Array(Object, Integer, Hash)> v1_inboxes_get_with_http_info
402
+ > <Array(<InboxList>, Integer, Hash)> list_inboxes_with_http_info
396
403
 
397
404
  ```ruby
398
405
  begin
399
406
  # List granted inboxes
400
- data, status_code, headers = api_instance.v1_inboxes_get_with_http_info
407
+ data, status_code, headers = api_instance.list_inboxes_with_http_info
401
408
  p status_code # => 2xx
402
409
  p headers # => { ... }
403
- p data # => Object
410
+ p data # => <InboxList>
404
411
  rescue Lockally::ApiError => e
405
- puts "Error when calling AgentsApi->v1_inboxes_get_with_http_info: #{e}"
412
+ puts "Error when calling AgentsApi->list_inboxes_with_http_info: #{e}"
406
413
  end
407
414
  ```
408
415
 
@@ -412,7 +419,7 @@ This endpoint does not need any parameter.
412
419
 
413
420
  ### Return type
414
421
 
415
- **Object**
422
+ [**InboxList**](InboxList.md)
416
423
 
417
424
  ### Authorization
418
425
 
@@ -424,13 +431,13 @@ This endpoint does not need any parameter.
424
431
  - **Accept**: application/json
425
432
 
426
433
 
427
- ## v1_inboxes_mailbox_messages_post
434
+ ## list_threads
428
435
 
429
- > Object v1_inboxes_mailbox_messages_post(mailbox, idempotency_key, v1_inboxes_mailbox_messages_post_request)
436
+ > <ThreadList> list_threads(mailbox, opts)
430
437
 
431
- Start a new conversation (agent stream)
438
+ List conversation threads
432
439
 
433
- 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.
440
+ Newest-active first. Cursors: `?before=<RFC3339>` pages backwards; `?since=<RFC3339>` delta-syncs forward (oldest first) so an agent can catch up in order.
434
441
 
435
442
  ### Examples
436
443
 
@@ -444,34 +451,37 @@ Lockally.configure do |config|
444
451
  end
445
452
 
446
453
  api_instance = Lockally::AgentsApi.new
447
- mailbox = 'mailbox_example' # String |
448
- idempotency_key = 'idempotency_key_example' # String |
449
- v1_inboxes_mailbox_messages_post_request = Lockally::V1InboxesMailboxMessagesPostRequest.new({to: ['to_example'], text: 'text_example'}) # V1InboxesMailboxMessagesPostRequest |
454
+ mailbox = 'mailbox_example' # String | mailbox email or id
455
+ opts = {
456
+ since: Time.parse('2013-10-20T19:20:30+01:00'), # Time |
457
+ before: Time.parse('2013-10-20T19:20:30+01:00'), # Time |
458
+ limit: 56 # Integer |
459
+ }
450
460
 
451
461
  begin
452
- # Start a new conversation (agent stream)
453
- result = api_instance.v1_inboxes_mailbox_messages_post(mailbox, idempotency_key, v1_inboxes_mailbox_messages_post_request)
462
+ # List conversation threads
463
+ result = api_instance.list_threads(mailbox, opts)
454
464
  p result
455
465
  rescue Lockally::ApiError => e
456
- puts "Error when calling AgentsApi->v1_inboxes_mailbox_messages_post: #{e}"
466
+ puts "Error when calling AgentsApi->list_threads: #{e}"
457
467
  end
458
468
  ```
459
469
 
460
- #### Using the v1_inboxes_mailbox_messages_post_with_http_info variant
470
+ #### Using the list_threads_with_http_info variant
461
471
 
462
472
  This returns an Array which contains the response data, status code and headers.
463
473
 
464
- > <Array(Object, Integer, Hash)> v1_inboxes_mailbox_messages_post_with_http_info(mailbox, idempotency_key, v1_inboxes_mailbox_messages_post_request)
474
+ > <Array(<ThreadList>, Integer, Hash)> list_threads_with_http_info(mailbox, opts)
465
475
 
466
476
  ```ruby
467
477
  begin
468
- # Start a new conversation (agent stream)
469
- data, status_code, headers = api_instance.v1_inboxes_mailbox_messages_post_with_http_info(mailbox, idempotency_key, v1_inboxes_mailbox_messages_post_request)
478
+ # List conversation threads
479
+ data, status_code, headers = api_instance.list_threads_with_http_info(mailbox, opts)
470
480
  p status_code # => 2xx
471
481
  p headers # => { ... }
472
- p data # => Object
482
+ p data # => <ThreadList>
473
483
  rescue Lockally::ApiError => e
474
- puts "Error when calling AgentsApi->v1_inboxes_mailbox_messages_post_with_http_info: #{e}"
484
+ puts "Error when calling AgentsApi->list_threads_with_http_info: #{e}"
475
485
  end
476
486
  ```
477
487
 
@@ -479,13 +489,14 @@ end
479
489
 
480
490
  | Name | Type | Description | Notes |
481
491
  | ---- | ---- | ----------- | ----- |
482
- | **mailbox** | **String** | | |
483
- | **idempotency_key** | **String** | | |
484
- | **v1_inboxes_mailbox_messages_post_request** | [**V1InboxesMailboxMessagesPostRequest**](V1InboxesMailboxMessagesPostRequest.md) | | |
492
+ | **mailbox** | **String** | mailbox email or id | |
493
+ | **since** | **Time** | | [optional] |
494
+ | **before** | **Time** | | [optional] |
495
+ | **limit** | **Integer** | | [optional][default to 50] |
485
496
 
486
497
  ### Return type
487
498
 
488
- **Object**
499
+ [**ThreadList**](ThreadList.md)
489
500
 
490
501
  ### Authorization
491
502
 
@@ -493,17 +504,17 @@ end
493
504
 
494
505
  ### HTTP request headers
495
506
 
496
- - **Content-Type**: application/json
507
+ - **Content-Type**: Not defined
497
508
  - **Accept**: application/json
498
509
 
499
510
 
500
- ## v1_inboxes_mailbox_threads_get
511
+ ## lookup_contact
501
512
 
502
- > Object v1_inboxes_mailbox_threads_get(mailbox, opts)
513
+ > <ContactLookup> lookup_contact(email)
503
514
 
504
- List conversation threads
515
+ Who is this sender?
505
516
 
506
- Newest-active first. Cursors: `?before=<RFC3339>` pages backwards; `?since=<RFC3339>` delta-syncs forward (oldest first) so an agent can catch up in order.
517
+ 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).
507
518
 
508
519
  ### Examples
509
520
 
@@ -517,37 +528,32 @@ Lockally.configure do |config|
517
528
  end
518
529
 
519
530
  api_instance = Lockally::AgentsApi.new
520
- mailbox = 'mailbox_example' # String | mailbox email or id
521
- opts = {
522
- since: Time.parse('2013-10-20T19:20:30+01:00'), # Time |
523
- before: Time.parse('2013-10-20T19:20:30+01:00'), # Time |
524
- limit: 56 # Integer |
525
- }
531
+ email = 'email_example' # String |
526
532
 
527
533
  begin
528
- # List conversation threads
529
- result = api_instance.v1_inboxes_mailbox_threads_get(mailbox, opts)
534
+ # Who is this sender?
535
+ result = api_instance.lookup_contact(email)
530
536
  p result
531
537
  rescue Lockally::ApiError => e
532
- puts "Error when calling AgentsApi->v1_inboxes_mailbox_threads_get: #{e}"
538
+ puts "Error when calling AgentsApi->lookup_contact: #{e}"
533
539
  end
534
540
  ```
535
541
 
536
- #### Using the v1_inboxes_mailbox_threads_get_with_http_info variant
542
+ #### Using the lookup_contact_with_http_info variant
537
543
 
538
544
  This returns an Array which contains the response data, status code and headers.
539
545
 
540
- > <Array(Object, Integer, Hash)> v1_inboxes_mailbox_threads_get_with_http_info(mailbox, opts)
546
+ > <Array(<ContactLookup>, Integer, Hash)> lookup_contact_with_http_info(email)
541
547
 
542
548
  ```ruby
543
549
  begin
544
- # List conversation threads
545
- data, status_code, headers = api_instance.v1_inboxes_mailbox_threads_get_with_http_info(mailbox, opts)
550
+ # Who is this sender?
551
+ data, status_code, headers = api_instance.lookup_contact_with_http_info(email)
546
552
  p status_code # => 2xx
547
553
  p headers # => { ... }
548
- p data # => Object
554
+ p data # => <ContactLookup>
549
555
  rescue Lockally::ApiError => e
550
- puts "Error when calling AgentsApi->v1_inboxes_mailbox_threads_get_with_http_info: #{e}"
556
+ puts "Error when calling AgentsApi->lookup_contact_with_http_info: #{e}"
551
557
  end
552
558
  ```
553
559
 
@@ -555,14 +561,11 @@ end
555
561
 
556
562
  | Name | Type | Description | Notes |
557
563
  | ---- | ---- | ----------- | ----- |
558
- | **mailbox** | **String** | mailbox email or id | |
559
- | **since** | **Time** | | [optional] |
560
- | **before** | **Time** | | [optional] |
561
- | **limit** | **Integer** | | [optional][default to 50] |
564
+ | **email** | **String** | | |
562
565
 
563
566
  ### Return type
564
567
 
565
- **Object**
568
+ [**ContactLookup**](ContactLookup.md)
566
569
 
567
570
  ### Authorization
568
571
 
@@ -574,13 +577,13 @@ end
574
577
  - **Accept**: application/json
575
578
 
576
579
 
577
- ## v1_threads_thread_id_get
580
+ ## mark_thread_message_read
578
581
 
579
- > Object v1_threads_thread_id_get(thread_id)
582
+ > <MarkReadResult> mark_thread_message_read(thread_id, message_id)
580
583
 
581
- Get a whole conversation
584
+ Mark read/unread
582
585
 
583
- 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.
586
+ The ONLY way agent access changes unread state. Body: {\"read\": true|false} (default true).
584
587
 
585
588
  ### Examples
586
589
 
@@ -595,31 +598,32 @@ end
595
598
 
596
599
  api_instance = Lockally::AgentsApi.new
597
600
  thread_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String |
601
+ message_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String |
598
602
 
599
603
  begin
600
- # Get a whole conversation
601
- result = api_instance.v1_threads_thread_id_get(thread_id)
604
+ # Mark read/unread
605
+ result = api_instance.mark_thread_message_read(thread_id, message_id)
602
606
  p result
603
607
  rescue Lockally::ApiError => e
604
- puts "Error when calling AgentsApi->v1_threads_thread_id_get: #{e}"
608
+ puts "Error when calling AgentsApi->mark_thread_message_read: #{e}"
605
609
  end
606
610
  ```
607
611
 
608
- #### Using the v1_threads_thread_id_get_with_http_info variant
612
+ #### Using the mark_thread_message_read_with_http_info variant
609
613
 
610
614
  This returns an Array which contains the response data, status code and headers.
611
615
 
612
- > <Array(Object, Integer, Hash)> v1_threads_thread_id_get_with_http_info(thread_id)
616
+ > <Array(<MarkReadResult>, Integer, Hash)> mark_thread_message_read_with_http_info(thread_id, message_id)
613
617
 
614
618
  ```ruby
615
619
  begin
616
- # Get a whole conversation
617
- data, status_code, headers = api_instance.v1_threads_thread_id_get_with_http_info(thread_id)
620
+ # Mark read/unread
621
+ data, status_code, headers = api_instance.mark_thread_message_read_with_http_info(thread_id, message_id)
618
622
  p status_code # => 2xx
619
623
  p headers # => { ... }
620
- p data # => Object
624
+ p data # => <MarkReadResult>
621
625
  rescue Lockally::ApiError => e
622
- puts "Error when calling AgentsApi->v1_threads_thread_id_get_with_http_info: #{e}"
626
+ puts "Error when calling AgentsApi->mark_thread_message_read_with_http_info: #{e}"
623
627
  end
624
628
  ```
625
629
 
@@ -628,10 +632,11 @@ end
628
632
  | Name | Type | Description | Notes |
629
633
  | ---- | ---- | ----------- | ----- |
630
634
  | **thread_id** | **String** | | |
635
+ | **message_id** | **String** | | |
631
636
 
632
637
  ### Return type
633
638
 
634
- **Object**
639
+ [**MarkReadResult**](MarkReadResult.md)
635
640
 
636
641
  ### Authorization
637
642
 
@@ -643,11 +648,13 @@ end
643
648
  - **Accept**: application/json
644
649
 
645
650
 
646
- ## v1_threads_thread_id_messages_message_id_attachments_idx_get
651
+ ## reply_to_thread
647
652
 
648
- > v1_threads_thread_id_messages_message_id_attachments_idx_get(thread_id, message_id, idx)
653
+ > <AgentSendResult> reply_to_thread(thread_id, idempotency_key)
649
654
 
650
- Download an attachment
655
+ Reply in-thread (agent stream)
656
+
657
+ 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.
651
658
 
652
659
  ### Examples
653
660
 
@@ -662,32 +669,32 @@ end
662
669
 
663
670
  api_instance = Lockally::AgentsApi.new
664
671
  thread_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String |
665
- message_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String |
666
- idx = 56 # Integer |
672
+ idempotency_key = 'idempotency_key_example' # String |
667
673
 
668
674
  begin
669
- # Download an attachment
670
- api_instance.v1_threads_thread_id_messages_message_id_attachments_idx_get(thread_id, message_id, idx)
675
+ # Reply in-thread (agent stream)
676
+ result = api_instance.reply_to_thread(thread_id, idempotency_key)
677
+ p result
671
678
  rescue Lockally::ApiError => e
672
- puts "Error when calling AgentsApi->v1_threads_thread_id_messages_message_id_attachments_idx_get: #{e}"
679
+ puts "Error when calling AgentsApi->reply_to_thread: #{e}"
673
680
  end
674
681
  ```
675
682
 
676
- #### Using the v1_threads_thread_id_messages_message_id_attachments_idx_get_with_http_info variant
683
+ #### Using the reply_to_thread_with_http_info variant
677
684
 
678
- This returns an Array which contains the response data (`nil` in this case), status code and headers.
685
+ This returns an Array which contains the response data, status code and headers.
679
686
 
680
- > <Array(nil, Integer, Hash)> v1_threads_thread_id_messages_message_id_attachments_idx_get_with_http_info(thread_id, message_id, idx)
687
+ > <Array(<AgentSendResult>, Integer, Hash)> reply_to_thread_with_http_info(thread_id, idempotency_key)
681
688
 
682
689
  ```ruby
683
690
  begin
684
- # Download an attachment
685
- data, status_code, headers = api_instance.v1_threads_thread_id_messages_message_id_attachments_idx_get_with_http_info(thread_id, message_id, idx)
691
+ # Reply in-thread (agent stream)
692
+ data, status_code, headers = api_instance.reply_to_thread_with_http_info(thread_id, idempotency_key)
686
693
  p status_code # => 2xx
687
694
  p headers # => { ... }
688
- p data # => nil
695
+ p data # => <AgentSendResult>
689
696
  rescue Lockally::ApiError => e
690
- puts "Error when calling AgentsApi->v1_threads_thread_id_messages_message_id_attachments_idx_get_with_http_info: #{e}"
697
+ puts "Error when calling AgentsApi->reply_to_thread_with_http_info: #{e}"
691
698
  end
692
699
  ```
693
700
 
@@ -696,12 +703,11 @@ end
696
703
  | Name | Type | Description | Notes |
697
704
  | ---- | ---- | ----------- | ----- |
698
705
  | **thread_id** | **String** | | |
699
- | **message_id** | **String** | | |
700
- | **idx** | **Integer** | | |
706
+ | **idempotency_key** | **String** | | |
701
707
 
702
708
  ### Return type
703
709
 
704
- nil (empty response body)
710
+ [**AgentSendResult**](AgentSendResult.md)
705
711
 
706
712
  ### Authorization
707
713
 
@@ -710,16 +716,14 @@ nil (empty response body)
710
716
  ### HTTP request headers
711
717
 
712
718
  - **Content-Type**: Not defined
713
- - **Accept**: Not defined
714
-
719
+ - **Accept**: application/json
715
720
 
716
- ## v1_threads_thread_id_messages_message_id_get
717
721
 
718
- > Object v1_threads_thread_id_messages_message_id_get(thread_id, message_id)
722
+ ## revoke_api_key_mailbox
719
723
 
720
- Get one message with body
724
+ > revoke_api_key_mailbox(key_id, mailbox_id)
721
725
 
722
- Full text/html body fetched on demand from mail storage. Never marks the message read.
726
+ Revoke a mailbox grant
723
727
 
724
728
  ### Examples
725
729
 
@@ -733,33 +737,32 @@ Lockally.configure do |config|
733
737
  end
734
738
 
735
739
  api_instance = Lockally::AgentsApi.new
736
- thread_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String |
737
- message_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String |
740
+ key_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String |
741
+ mailbox_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String |
738
742
 
739
743
  begin
740
- # Get one message with body
741
- result = api_instance.v1_threads_thread_id_messages_message_id_get(thread_id, message_id)
742
- p result
744
+ # Revoke a mailbox grant
745
+ api_instance.revoke_api_key_mailbox(key_id, mailbox_id)
743
746
  rescue Lockally::ApiError => e
744
- puts "Error when calling AgentsApi->v1_threads_thread_id_messages_message_id_get: #{e}"
747
+ puts "Error when calling AgentsApi->revoke_api_key_mailbox: #{e}"
745
748
  end
746
749
  ```
747
750
 
748
- #### Using the v1_threads_thread_id_messages_message_id_get_with_http_info variant
751
+ #### Using the revoke_api_key_mailbox_with_http_info variant
749
752
 
750
- This returns an Array which contains the response data, status code and headers.
753
+ This returns an Array which contains the response data (`nil` in this case), status code and headers.
751
754
 
752
- > <Array(Object, Integer, Hash)> v1_threads_thread_id_messages_message_id_get_with_http_info(thread_id, message_id)
755
+ > <Array(nil, Integer, Hash)> revoke_api_key_mailbox_with_http_info(key_id, mailbox_id)
753
756
 
754
757
  ```ruby
755
758
  begin
756
- # Get one message with body
757
- data, status_code, headers = api_instance.v1_threads_thread_id_messages_message_id_get_with_http_info(thread_id, message_id)
759
+ # Revoke a mailbox grant
760
+ data, status_code, headers = api_instance.revoke_api_key_mailbox_with_http_info(key_id, mailbox_id)
758
761
  p status_code # => 2xx
759
762
  p headers # => { ... }
760
- p data # => Object
763
+ p data # => nil
761
764
  rescue Lockally::ApiError => e
762
- puts "Error when calling AgentsApi->v1_threads_thread_id_messages_message_id_get_with_http_info: #{e}"
765
+ puts "Error when calling AgentsApi->revoke_api_key_mailbox_with_http_info: #{e}"
763
766
  end
764
767
  ```
765
768
 
@@ -767,12 +770,12 @@ end
767
770
 
768
771
  | Name | Type | Description | Notes |
769
772
  | ---- | ---- | ----------- | ----- |
770
- | **thread_id** | **String** | | |
771
- | **message_id** | **String** | | |
773
+ | **key_id** | **String** | | |
774
+ | **mailbox_id** | **String** | | |
772
775
 
773
776
  ### Return type
774
777
 
775
- **Object**
778
+ nil (empty response body)
776
779
 
777
780
  ### Authorization
778
781
 
@@ -781,16 +784,16 @@ end
781
784
  ### HTTP request headers
782
785
 
783
786
  - **Content-Type**: Not defined
784
- - **Accept**: application/json
787
+ - **Accept**: Not defined
785
788
 
786
789
 
787
- ## v1_threads_thread_id_messages_message_id_read_post
790
+ ## start_conversation
788
791
 
789
- > Object v1_threads_thread_id_messages_message_id_read_post(thread_id, message_id)
792
+ > <AgentSendResult> start_conversation(mailbox, idempotency_key, start_conversation_request)
790
793
 
791
- Mark read/unread
794
+ Start a new conversation (agent stream)
792
795
 
793
- The ONLY way agent access changes unread state. Body: {\"read\": true|false} (default true).
796
+ 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.
794
797
 
795
798
  ### Examples
796
799
 
@@ -804,33 +807,34 @@ Lockally.configure do |config|
804
807
  end
805
808
 
806
809
  api_instance = Lockally::AgentsApi.new
807
- thread_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String |
808
- message_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String |
810
+ mailbox = 'mailbox_example' # String |
811
+ idempotency_key = 'idempotency_key_example' # String |
812
+ start_conversation_request = Lockally::StartConversationRequest.new({to: ['to_example'], text: 'text_example'}) # StartConversationRequest |
809
813
 
810
814
  begin
811
- # Mark read/unread
812
- result = api_instance.v1_threads_thread_id_messages_message_id_read_post(thread_id, message_id)
815
+ # Start a new conversation (agent stream)
816
+ result = api_instance.start_conversation(mailbox, idempotency_key, start_conversation_request)
813
817
  p result
814
818
  rescue Lockally::ApiError => e
815
- puts "Error when calling AgentsApi->v1_threads_thread_id_messages_message_id_read_post: #{e}"
819
+ puts "Error when calling AgentsApi->start_conversation: #{e}"
816
820
  end
817
821
  ```
818
822
 
819
- #### Using the v1_threads_thread_id_messages_message_id_read_post_with_http_info variant
823
+ #### Using the start_conversation_with_http_info variant
820
824
 
821
825
  This returns an Array which contains the response data, status code and headers.
822
826
 
823
- > <Array(Object, Integer, Hash)> v1_threads_thread_id_messages_message_id_read_post_with_http_info(thread_id, message_id)
827
+ > <Array(<AgentSendResult>, Integer, Hash)> start_conversation_with_http_info(mailbox, idempotency_key, start_conversation_request)
824
828
 
825
829
  ```ruby
826
830
  begin
827
- # Mark read/unread
828
- data, status_code, headers = api_instance.v1_threads_thread_id_messages_message_id_read_post_with_http_info(thread_id, message_id)
831
+ # Start a new conversation (agent stream)
832
+ data, status_code, headers = api_instance.start_conversation_with_http_info(mailbox, idempotency_key, start_conversation_request)
829
833
  p status_code # => 2xx
830
834
  p headers # => { ... }
831
- p data # => Object
835
+ p data # => <AgentSendResult>
832
836
  rescue Lockally::ApiError => e
833
- puts "Error when calling AgentsApi->v1_threads_thread_id_messages_message_id_read_post_with_http_info: #{e}"
837
+ puts "Error when calling AgentsApi->start_conversation_with_http_info: #{e}"
834
838
  end
835
839
  ```
836
840
 
@@ -838,12 +842,13 @@ end
838
842
 
839
843
  | Name | Type | Description | Notes |
840
844
  | ---- | ---- | ----------- | ----- |
841
- | **thread_id** | **String** | | |
842
- | **message_id** | **String** | | |
845
+ | **mailbox** | **String** | | |
846
+ | **idempotency_key** | **String** | | |
847
+ | **start_conversation_request** | [**StartConversationRequest**](StartConversationRequest.md) | | |
843
848
 
844
849
  ### Return type
845
850
 
846
- **Object**
851
+ [**AgentSendResult**](AgentSendResult.md)
847
852
 
848
853
  ### Authorization
849
854
 
@@ -851,17 +856,17 @@ end
851
856
 
852
857
  ### HTTP request headers
853
858
 
854
- - **Content-Type**: Not defined
859
+ - **Content-Type**: application/json
855
860
  - **Accept**: application/json
856
861
 
857
862
 
858
- ## v1_threads_thread_id_reply_post
863
+ ## whoami
859
864
 
860
- > Object v1_threads_thread_id_reply_post(thread_id, idempotency_key)
865
+ > <Whoami> whoami
861
866
 
862
- Reply in-thread (agent stream)
867
+ Introspect the calling credentials
863
868
 
864
- 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.
869
+ Returns the tenant, auth kind (api_key/session), key label, and granted scopes. The MCP server uses this to scope-filter tool discovery.
865
870
 
866
871
  ### Examples
867
872
 
@@ -875,46 +880,41 @@ Lockally.configure do |config|
875
880
  end
876
881
 
877
882
  api_instance = Lockally::AgentsApi.new
878
- thread_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String |
879
- idempotency_key = 'idempotency_key_example' # String |
880
883
 
881
884
  begin
882
- # Reply in-thread (agent stream)
883
- result = api_instance.v1_threads_thread_id_reply_post(thread_id, idempotency_key)
885
+ # Introspect the calling credentials
886
+ result = api_instance.whoami
884
887
  p result
885
888
  rescue Lockally::ApiError => e
886
- puts "Error when calling AgentsApi->v1_threads_thread_id_reply_post: #{e}"
889
+ puts "Error when calling AgentsApi->whoami: #{e}"
887
890
  end
888
891
  ```
889
892
 
890
- #### Using the v1_threads_thread_id_reply_post_with_http_info variant
893
+ #### Using the whoami_with_http_info variant
891
894
 
892
895
  This returns an Array which contains the response data, status code and headers.
893
896
 
894
- > <Array(Object, Integer, Hash)> v1_threads_thread_id_reply_post_with_http_info(thread_id, idempotency_key)
897
+ > <Array(<Whoami>, Integer, Hash)> whoami_with_http_info
895
898
 
896
899
  ```ruby
897
900
  begin
898
- # Reply in-thread (agent stream)
899
- data, status_code, headers = api_instance.v1_threads_thread_id_reply_post_with_http_info(thread_id, idempotency_key)
901
+ # Introspect the calling credentials
902
+ data, status_code, headers = api_instance.whoami_with_http_info
900
903
  p status_code # => 2xx
901
904
  p headers # => { ... }
902
- p data # => Object
905
+ p data # => <Whoami>
903
906
  rescue Lockally::ApiError => e
904
- puts "Error when calling AgentsApi->v1_threads_thread_id_reply_post_with_http_info: #{e}"
907
+ puts "Error when calling AgentsApi->whoami_with_http_info: #{e}"
905
908
  end
906
909
  ```
907
910
 
908
911
  ### Parameters
909
912
 
910
- | Name | Type | Description | Notes |
911
- | ---- | ---- | ----------- | ----- |
912
- | **thread_id** | **String** | | |
913
- | **idempotency_key** | **String** | | |
913
+ This endpoint does not need any parameter.
914
914
 
915
915
  ### Return type
916
916
 
917
- **Object**
917
+ [**Whoami**](Whoami.md)
918
918
 
919
919
  ### Authorization
920
920