lockally 0.2.0 → 0.3.1

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 (253) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +148 -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/Annotations.md +22 -0
  14. data/docs/ApiKeysApi.md +59 -59
  15. data/docs/Attachment.md +26 -0
  16. data/docs/Classification.md +24 -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/{V1ApiKeysPostRequest.md → CreateApiKeyRequest.md} +2 -2
  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 +141 -141
  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/{V1AdminMeGet200Response.md → GetCurrentAdmin200Response.md} +2 -2
  35. data/docs/{V1UsageGet200Response.md → GetUsage200Response.md} +2 -2
  36. data/docs/HealthApi.md +11 -11
  37. data/docs/{HealthzGet200Response.md → HealthCheck200Response.md} +2 -2
  38. data/docs/Inbox.md +24 -0
  39. data/docs/InboxList.md +18 -0
  40. data/docs/InjectionRisk.md +20 -0
  41. data/docs/{V1AdminsPostRequest.md → InviteAdminRequest.md} +2 -2
  42. data/docs/{V1AdminsGet200Response.md → ListAdmins200Response.md} +2 -2
  43. data/docs/{V1AliasesGet200Response.md → ListAliases200Response.md} +2 -2
  44. data/docs/{V1ApiKeysGet200Response.md → ListApiKeys200Response.md} +2 -2
  45. data/docs/{V1DomainsGet200Response.md → ListDomains200Response.md} +2 -2
  46. data/docs/{V1MailboxesGet200Response.md → ListMailboxes200Response.md} +2 -2
  47. data/docs/{V1MessagesGet200Response.md → ListMessages200Response.md} +2 -2
  48. data/docs/{V1SuppressionsGet200Response.md → ListSuppressions200Response.md} +2 -2
  49. data/docs/{V1TemplatesGet200Response.md → ListTemplates200Response.md} +2 -2
  50. data/docs/{V1VacationGet200Response.md → ListVacationResponders200Response.md} +2 -2
  51. data/docs/{V1WebhooksGet200Response.md → ListWebhooks200Response.md} +2 -2
  52. data/docs/MailboxGrant.md +20 -0
  53. data/docs/MailboxGrantList.md +18 -0
  54. data/docs/MailboxesApi.md +203 -203
  55. data/docs/MarkReadResult.md +18 -0
  56. data/docs/PolicyFlags.md +28 -0
  57. data/docs/SendApi.md +121 -121
  58. data/docs/{V1SendPost200Response.md → SendEmail200Response.md} +2 -2
  59. data/docs/{V1SendPost202Response.md → SendEmail202Response.md} +2 -2
  60. data/docs/{V1SendBatchPost200Response.md → SendEmailBatch200Response.md} +2 -2
  61. data/docs/{V1SendBatchPostRequest.md → SendEmailBatchRequest.md} +2 -2
  62. data/docs/{V1SendPostRequest.md → SendEmailRequest.md} +3 -3
  63. data/docs/{V1SendPostRequestAttachmentsInner.md → SendEmailRequestAttachmentsInner.md} +2 -2
  64. data/docs/SendMessage.md +1 -1
  65. data/docs/{V1MailboxesEmailVacationPutRequest.md → SetVacationResponderRequest.md} +2 -2
  66. data/docs/SignupApi.md +4 -4
  67. data/docs/SimulatedInbound.md +22 -0
  68. data/docs/{V1InboxesMailboxMessagesPostRequest.md → StartConversationRequest.md} +2 -2
  69. data/docs/SuppressionsApi.md +75 -75
  70. data/docs/TemplatesApi.md +67 -67
  71. data/docs/TenantApi.md +20 -20
  72. data/docs/TestApi.md +11 -11
  73. data/docs/Thread.md +22 -0
  74. data/docs/ThreadClassification.md +22 -0
  75. data/docs/ThreadList.md +20 -0
  76. data/docs/ThreadMessage.md +40 -0
  77. data/docs/ThreadMessageBody.md +42 -0
  78. data/docs/ThreadMessageBodyAllOfBody.md +22 -0
  79. data/docs/ThreadSummary.md +28 -0
  80. data/docs/{V1AdminsIdPatchRequest.md → UpdateAdminRequest.md} +2 -2
  81. data/docs/{V1MailboxesEmailPatchRequest.md → UpdateMailboxRequest.md} +2 -2
  82. data/docs/{V1WebhooksIdPatchRequest.md → UpdateWebhookRequest.md} +2 -2
  83. data/docs/WebhooksApi.md +63 -63
  84. data/docs/Whoami.md +24 -0
  85. data/lib/lockally/api/admin_api.rb +30 -30
  86. data/lib/lockally/api/admins_api.rb +89 -89
  87. data/lib/lockally/api/agents_api.rb +309 -309
  88. data/lib/lockally/api/ai_api.rb +69 -69
  89. data/lib/lockally/api/aliases_api.rb +64 -64
  90. data/lib/lockally/api/api_keys_api.rb +66 -66
  91. data/lib/lockally/api/domains_api.rb +147 -147
  92. data/lib/lockally/api/drafts_api.rb +140 -140
  93. data/lib/lockally/api/health_api.rb +9 -9
  94. data/lib/lockally/api/mailboxes_api.rb +233 -233
  95. data/lib/lockally/api/send_api.rb +146 -146
  96. data/lib/lockally/api/signup_api.rb +3 -3
  97. data/lib/lockally/api/suppressions_api.rb +87 -87
  98. data/lib/lockally/api/templates_api.rb +69 -69
  99. data/lib/lockally/api/tenant_api.rb +15 -15
  100. data/lib/lockally/api/test_api.rb +9 -9
  101. data/lib/lockally/api/webhooks_api.rb +73 -73
  102. data/lib/lockally/models/{v1_admin_login_post200_response.rb → admin_login200_response.rb} +3 -3
  103. data/lib/lockally/models/{v1_admin_login_post_request.rb → admin_login_request.rb} +3 -3
  104. data/lib/lockally/models/agent_send_result.rb +184 -0
  105. data/lib/lockally/models/ai_config.rb +242 -0
  106. data/lib/lockally/models/ai_config_update.rb +214 -0
  107. data/lib/lockally/models/annotations.rb +168 -0
  108. data/lib/lockally/models/attachment.rb +185 -0
  109. data/lib/lockally/models/classification.rb +211 -0
  110. data/lib/lockally/models/contact_lookup.rb +235 -0
  111. data/lib/lockally/models/contact_lookup_contact.rb +192 -0
  112. data/lib/lockally/models/contact_lookup_history.rb +166 -0
  113. data/lib/lockally/models/create_ai_units_checkout200_response.rb +199 -0
  114. data/lib/lockally/models/{v1_aliases_post_request.rb → create_alias_request.rb} +3 -3
  115. data/lib/lockally/models/{v1_api_keys_post201_response.rb → create_api_key201_response.rb} +3 -3
  116. data/lib/lockally/models/{v1_api_keys_post_request.rb → create_api_key_request.rb} +3 -3
  117. data/lib/lockally/models/{v1_domains_post_request.rb → create_domain_request.rb} +3 -3
  118. data/lib/lockally/models/{v1_mailboxes_post_request.rb → create_mailbox_request.rb} +3 -3
  119. data/lib/lockally/models/{v1_suppressions_post_request.rb → create_suppression_request.rb} +3 -3
  120. data/lib/lockally/models/{v1_webhooks_post_request.rb → create_webhook_request.rb} +3 -3
  121. data/lib/lockally/models/draft.rb +411 -0
  122. data/lib/lockally/models/draft_list.rb +166 -0
  123. data/lib/lockally/models/draft_result.rb +258 -0
  124. data/lib/lockally/models/{v1_mailboxes_email_export_post201_response.rb → export_mailbox201_response.rb} +3 -3
  125. data/lib/lockally/models/{v1_admin_me_get200_response.rb → get_current_admin200_response.rb} +3 -3
  126. data/lib/lockally/models/{v1_usage_get200_response.rb → get_usage200_response.rb} +3 -3
  127. data/lib/lockally/models/{healthz_get200_response.rb → health_check200_response.rb} +3 -3
  128. data/lib/lockally/models/inbox.rb +225 -0
  129. data/lib/lockally/models/inbox_list.rb +166 -0
  130. data/lib/lockally/models/injection_risk.rb +159 -0
  131. data/lib/lockally/models/{v1_admins_post_request.rb → invite_admin_request.rb} +3 -3
  132. data/lib/lockally/models/list_admins200_response.rb +166 -0
  133. data/lib/lockally/models/{v1_aliases_get200_response.rb → list_aliases200_response.rb} +3 -3
  134. data/lib/lockally/models/{v1_admins_get200_response.rb → list_api_keys200_response.rb} +4 -4
  135. data/lib/lockally/models/{v1_domains_get200_response.rb → list_domains200_response.rb} +3 -3
  136. data/lib/lockally/models/{v1_mailboxes_get200_response.rb → list_mailboxes200_response.rb} +3 -3
  137. data/lib/lockally/models/{v1_messages_get200_response.rb → list_messages200_response.rb} +3 -3
  138. data/lib/lockally/models/{v1_suppressions_get200_response.rb → list_suppressions200_response.rb} +3 -3
  139. data/lib/lockally/models/{v1_send_batch_post200_response.rb → list_templates200_response.rb} +4 -4
  140. data/lib/lockally/models/{v1_vacation_get200_response.rb → list_vacation_responders200_response.rb} +3 -3
  141. data/lib/lockally/models/{v1_api_keys_get200_response.rb → list_webhooks200_response.rb} +4 -4
  142. data/lib/lockally/models/mailbox_grant.rb +156 -0
  143. data/lib/lockally/models/mailbox_grant_list.rb +166 -0
  144. data/lib/lockally/models/mark_read_result.rb +147 -0
  145. data/lib/lockally/models/policy_flags.rb +197 -0
  146. data/lib/lockally/models/{v1_send_post200_response.rb → send_email200_response.rb} +3 -3
  147. data/lib/lockally/models/{v1_send_post202_response.rb → send_email202_response.rb} +3 -3
  148. data/lib/lockally/models/{v1_templates_get200_response.rb → send_email_batch200_response.rb} +4 -4
  149. data/lib/lockally/models/{v1_send_batch_post_request.rb → send_email_batch_request.rb} +3 -3
  150. data/lib/lockally/models/{v1_send_post_request.rb → send_email_request.rb} +4 -4
  151. data/lib/lockally/models/{v1_send_post_request_attachments_inner.rb → send_email_request_attachments_inner.rb} +3 -3
  152. data/lib/lockally/models/send_message.rb +1 -1
  153. data/lib/lockally/models/{v1_mailboxes_email_vacation_put_request.rb → set_vacation_responder_request.rb} +3 -3
  154. data/lib/lockally/models/simulated_inbound.rb +165 -0
  155. data/lib/lockally/models/{v1_inboxes_mailbox_messages_post_request.rb → start_conversation_request.rb} +3 -3
  156. data/lib/lockally/models/thread.rb +219 -0
  157. data/lib/lockally/models/thread_classification.rb +183 -0
  158. data/lib/lockally/models/thread_list.rb +192 -0
  159. data/lib/lockally/models/thread_message.rb +394 -0
  160. data/lib/lockally/models/thread_message_body.rb +410 -0
  161. data/lib/lockally/models/thread_message_body_all_of_body.rb +165 -0
  162. data/lib/lockally/models/thread_summary.rb +280 -0
  163. data/lib/lockally/models/{v1_admins_id_patch_request.rb → update_admin_request.rb} +3 -3
  164. data/lib/lockally/models/{v1_mailboxes_email_patch_request.rb → update_mailbox_request.rb} +3 -3
  165. data/lib/lockally/models/{v1_webhooks_id_patch_request.rb → update_webhook_request.rb} +3 -3
  166. data/lib/lockally/models/whoami.rb +177 -0
  167. data/lib/lockally/version.rb +1 -1
  168. data/lib/lockally.rb +64 -35
  169. data/spec/api/admin_api_spec.rb +9 -9
  170. data/spec/api/admins_api_spec.rb +22 -22
  171. data/spec/api/agents_api_spec.rb +78 -78
  172. data/spec/api/ai_api_spec.rb +22 -22
  173. data/spec/api/aliases_api_spec.rb +16 -16
  174. data/spec/api/api_keys_api_spec.rb +17 -17
  175. data/spec/api/domains_api_spec.rb +42 -42
  176. data/spec/api/drafts_api_spec.rb +38 -38
  177. data/spec/api/health_api_spec.rb +3 -3
  178. data/spec/api/mailboxes_api_spec.rb +61 -61
  179. data/spec/api/send_api_spec.rb +35 -35
  180. data/spec/api/signup_api_spec.rb +1 -1
  181. data/spec/api/suppressions_api_spec.rb +18 -18
  182. data/spec/api/templates_api_spec.rb +17 -17
  183. data/spec/api/tenant_api_spec.rb +5 -5
  184. data/spec/api/test_api_spec.rb +3 -3
  185. data/spec/api/webhooks_api_spec.rb +19 -19
  186. data/spec/models/{v1_admin_login_post200_response_spec.rb → admin_login200_response_spec.rb} +6 -6
  187. data/spec/models/{v1_admin_login_post_request_spec.rb → admin_login_request_spec.rb} +6 -6
  188. data/spec/models/agent_send_result_spec.rb +48 -0
  189. data/spec/models/ai_config_spec.rb +64 -0
  190. data/spec/models/ai_config_update_spec.rb +46 -0
  191. data/spec/models/annotations_spec.rb +48 -0
  192. data/spec/models/attachment_spec.rb +60 -0
  193. data/spec/models/classification_spec.rb +58 -0
  194. data/spec/models/contact_lookup_contact_spec.rb +66 -0
  195. data/spec/models/contact_lookup_history_spec.rb +48 -0
  196. data/spec/models/contact_lookup_spec.rb +60 -0
  197. data/spec/models/create_ai_units_checkout200_response_spec.rb +48 -0
  198. data/spec/models/{v1_aliases_post_request_spec.rb → create_alias_request_spec.rb} +6 -6
  199. data/spec/models/{v1_api_keys_post201_response_spec.rb → create_api_key201_response_spec.rb} +6 -6
  200. data/spec/models/{v1_api_keys_post_request_spec.rb → create_api_key_request_spec.rb} +6 -6
  201. data/spec/models/{v1_domains_post_request_spec.rb → create_domain_request_spec.rb} +6 -6
  202. data/spec/models/{v1_mailboxes_post_request_spec.rb → create_mailbox_request_spec.rb} +6 -6
  203. data/spec/models/{v1_suppressions_post_request_spec.rb → create_suppression_request_spec.rb} +6 -6
  204. data/spec/models/{v1_webhooks_post_request_spec.rb → create_webhook_request_spec.rb} +6 -6
  205. data/spec/models/draft_list_spec.rb +36 -0
  206. data/spec/models/draft_result_spec.rb +64 -0
  207. data/spec/models/draft_spec.rb +118 -0
  208. data/spec/models/{v1_mailboxes_email_export_post201_response_spec.rb → export_mailbox201_response_spec.rb} +6 -6
  209. data/spec/models/{v1_admin_me_get200_response_spec.rb → get_current_admin200_response_spec.rb} +6 -6
  210. data/spec/models/{v1_usage_get200_response_spec.rb → get_usage200_response_spec.rb} +6 -6
  211. data/spec/models/{healthz_get200_response_spec.rb → health_check200_response_spec.rb} +6 -6
  212. data/spec/models/inbox_list_spec.rb +36 -0
  213. data/spec/models/inbox_spec.rb +54 -0
  214. data/spec/models/injection_risk_spec.rb +42 -0
  215. data/spec/models/{v1_admins_post_request_spec.rb → invite_admin_request_spec.rb} +6 -6
  216. data/spec/models/{v1_aliases_get200_response_spec.rb → list_admins200_response_spec.rb} +6 -6
  217. data/spec/models/{v1_admins_get200_response_spec.rb → list_aliases200_response_spec.rb} +6 -6
  218. data/spec/models/{v1_api_keys_get200_response_spec.rb → list_api_keys200_response_spec.rb} +6 -6
  219. data/spec/models/list_domains200_response_spec.rb +36 -0
  220. data/spec/models/{v1_mailboxes_get200_response_spec.rb → list_mailboxes200_response_spec.rb} +6 -6
  221. data/spec/models/{v1_messages_get200_response_spec.rb → list_messages200_response_spec.rb} +6 -6
  222. data/spec/models/{v1_suppressions_get200_response_spec.rb → list_suppressions200_response_spec.rb} +6 -6
  223. data/spec/models/{v1_vacation_get200_response_spec.rb → list_templates200_response_spec.rb} +6 -6
  224. data/spec/models/list_vacation_responders200_response_spec.rb +36 -0
  225. data/spec/models/{v1_domains_get200_response_spec.rb → list_webhooks200_response_spec.rb} +6 -6
  226. data/spec/models/mailbox_grant_list_spec.rb +36 -0
  227. data/spec/models/mailbox_grant_spec.rb +42 -0
  228. data/spec/models/mark_read_result_spec.rb +36 -0
  229. data/spec/models/policy_flags_spec.rb +66 -0
  230. data/spec/models/{v1_send_post200_response_spec.rb → send_email200_response_spec.rb} +6 -6
  231. data/spec/models/{v1_send_post202_response_spec.rb → send_email202_response_spec.rb} +6 -6
  232. data/spec/models/{v1_templates_get200_response_spec.rb → send_email_batch200_response_spec.rb} +6 -6
  233. data/spec/models/{v1_send_batch_post_request_spec.rb → send_email_batch_request_spec.rb} +6 -6
  234. data/spec/models/{v1_send_post_request_attachments_inner_spec.rb → send_email_request_attachments_inner_spec.rb} +6 -6
  235. data/spec/models/{v1_send_post_request_spec.rb → send_email_request_spec.rb} +6 -6
  236. data/spec/models/{v1_mailboxes_email_vacation_put_request_spec.rb → set_vacation_responder_request_spec.rb} +6 -6
  237. data/spec/models/simulated_inbound_spec.rb +48 -0
  238. data/spec/models/{v1_inboxes_mailbox_messages_post_request_spec.rb → start_conversation_request_spec.rb} +6 -6
  239. data/spec/models/thread_classification_spec.rb +48 -0
  240. data/spec/models/thread_list_spec.rb +42 -0
  241. data/spec/models/thread_message_body_all_of_body_spec.rb +48 -0
  242. data/spec/models/thread_message_body_spec.rb +112 -0
  243. data/spec/models/thread_message_spec.rb +106 -0
  244. data/spec/models/thread_spec.rb +48 -0
  245. data/spec/models/thread_summary_spec.rb +70 -0
  246. data/spec/models/{v1_admins_id_patch_request_spec.rb → update_admin_request_spec.rb} +6 -6
  247. data/spec/models/{v1_mailboxes_email_patch_request_spec.rb → update_mailbox_request_spec.rb} +6 -6
  248. data/spec/models/{v1_webhooks_id_patch_request_spec.rb → update_webhook_request_spec.rb} +6 -6
  249. data/spec/models/whoami_spec.rb +54 -0
  250. metadata +258 -142
  251. data/lib/lockally/models/v1_webhooks_get200_response.rb +0 -166
  252. data/spec/models/v1_send_batch_post200_response_spec.rb +0 -36
  253. data/spec/models/v1_webhooks_get200_response_spec.rb +0 -36
@@ -32,47 +32,47 @@ describe 'AiApi' do
32
32
  end
33
33
  end
34
34
 
35
- # unit tests for v1_ai_config_get
36
- # Read the tenant's AI configuration
37
- # Mode (off/byok/units), model, masked key hint, AI-unit balance, whether the units tier is available on this deployment.
35
+ # unit tests for classify_thread
36
+ # LLM-classify a thread
37
+ # Returns {intent, urgency, summary, suggested_action} via the tenant's AI tier (BYOK or prepaid units — see /v1/ai-config). Cached per thread state: unchanged threads return the cache free; ?refresh=true forces a re-run. A failed model call charges nothing. 402 when the AI tier is off.
38
+ # @param thread_id
38
39
  # @param [Hash] opts the optional parameters
39
- # @return [Object]
40
- describe 'v1_ai_config_get test' do
40
+ # @option opts [Boolean] :refresh
41
+ # @return [ThreadClassification]
42
+ describe 'classify_thread test' do
41
43
  it 'should work' do
42
44
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
43
45
  end
44
46
  end
45
47
 
46
- # unit tests for v1_ai_config_put
47
- # Configure the AI tier
48
- # Body: {\"mode\": \"off|byok|units\", \"model\": \"...\", \"anthropic_key\": \"sk-ant-...\"}. BYOK keys are stored AES-256-GCM encrypted; the cleartext is never returned. Omit anthropic_key to keep the stored one.
48
+ # unit tests for create_ai_units_checkout
49
+ # Buy prepaid AI units
50
+ # Body: {\"bundle\": \"100|500|2000\"}. One classification = one unit; bundles expire after 6 months. Admin session required. 503 until Paystack billing is configured.
49
51
  # @param [Hash] opts the optional parameters
50
- # @return [Object]
51
- describe 'v1_ai_config_put test' do
52
+ # @return [CreateAiUnitsCheckout200Response]
53
+ describe 'create_ai_units_checkout test' do
52
54
  it 'should work' do
53
55
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
54
56
  end
55
57
  end
56
58
 
57
- # unit tests for v1_billing_ai_units_checkout_post
58
- # Buy prepaid AI units
59
- # Body: {\"bundle\": \"100|500|2000\"}. One classification = one unit; bundles expire after 6 months. Admin session required. 503 until Paystack billing is configured.
59
+ # unit tests for get_ai_config
60
+ # Read the tenant's AI configuration
61
+ # Mode (off/byok/units), model, masked key hint, AI-unit balance, whether the units tier is available on this deployment.
60
62
  # @param [Hash] opts the optional parameters
61
- # @return [Object]
62
- describe 'v1_billing_ai_units_checkout_post test' do
63
+ # @return [AiConfig]
64
+ describe 'get_ai_config test' do
63
65
  it 'should work' do
64
66
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
65
67
  end
66
68
  end
67
69
 
68
- # unit tests for v1_threads_thread_id_classify_post
69
- # LLM-classify a thread
70
- # Returns {intent, urgency, summary, suggested_action} via the tenant's AI tier (BYOK or prepaid units — see /v1/ai-config). Cached per thread state: unchanged threads return the cache free; ?refresh=true forces a re-run. A failed model call charges nothing. 402 when the AI tier is off.
71
- # @param thread_id
70
+ # unit tests for update_ai_config
71
+ # Configure the AI tier
72
+ # Body: {\"mode\": \"off|byok|units\", \"model\": \"...\", \"anthropic_key\": \"sk-ant-...\"}. BYOK keys are stored AES-256-GCM encrypted; the cleartext is never returned. Omit anthropic_key to keep the stored one.
72
73
  # @param [Hash] opts the optional parameters
73
- # @option opts [Boolean] :refresh
74
- # @return [Object]
75
- describe 'v1_threads_thread_id_classify_post test' do
74
+ # @return [AiConfigUpdate]
75
+ describe 'update_ai_config test' do
76
76
  it 'should work' do
77
77
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
78
78
  end
@@ -32,35 +32,35 @@ describe 'AliasesApi' do
32
32
  end
33
33
  end
34
34
 
35
- # unit tests for v1_aliases_address_delete
36
- # Delete an alias
37
- # Hard-delete (no soft-delete window — aliases are cheap to recreate).
38
- # @param address
35
+ # unit tests for create_alias
36
+ # Create an alias
37
+ # Creates an email alias. `alias_address` must be on a verified tenant-owned domain and must not be the address of an existing mailbox (live, suspended or deleted). `alias_target` must be an active mailbox in the same workspace; forwarding to an address Lockally does not host is not supported. The alias delivers as soon as the call returns.
38
+ # @param create_alias_request
39
39
  # @param [Hash] opts the optional parameters
40
- # @return [nil]
41
- describe 'v1_aliases_address_delete test' do
40
+ # @return [ModelAlias]
41
+ describe 'create_alias test' do
42
42
  it 'should work' do
43
43
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
44
44
  end
45
45
  end
46
46
 
47
- # unit tests for v1_aliases_get
48
- # List aliases
47
+ # unit tests for delete_alias
48
+ # Delete an alias
49
+ # Hard-delete (no soft-delete window — aliases are cheap to recreate).
50
+ # @param address
49
51
  # @param [Hash] opts the optional parameters
50
- # @return [V1AliasesGet200Response]
51
- describe 'v1_aliases_get test' do
52
+ # @return [nil]
53
+ describe 'delete_alias test' do
52
54
  it 'should work' do
53
55
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
54
56
  end
55
57
  end
56
58
 
57
- # unit tests for v1_aliases_post
58
- # Create an alias
59
- # Creates an email alias. `alias_address` must be on a verified tenant-owned domain and must not be the address of an existing mailbox (live, suspended or deleted). `alias_target` must be an active mailbox in the same workspace; forwarding to an address Lockally does not host is not supported. The alias delivers as soon as the call returns.
60
- # @param v1_aliases_post_request
59
+ # unit tests for list_aliases
60
+ # List aliases
61
61
  # @param [Hash] opts the optional parameters
62
- # @return [ModelAlias]
63
- describe 'v1_aliases_post test' do
62
+ # @return [ListAliases200Response]
63
+ describe 'list_aliases test' do
64
64
  it 'should work' do
65
65
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
66
66
  end
@@ -32,36 +32,36 @@ describe 'ApiKeysApi' do
32
32
  end
33
33
  end
34
34
 
35
- # unit tests for v1_api_keys_get
36
- # List API keys
37
- # Returns all API keys (active and revoked) belonging to the calling tenant. The `secret` is **never** returned — only prefix + metadata.
35
+ # unit tests for create_api_key
36
+ # Create an API key
37
+ # Provisions a fresh API key for the calling tenant. **The full `secret` is included in this response ONLY** — store it immediately. The cleartext secret is not recoverable from the argon2id hash kept server-side; rotate by creating a new key and revoking the old one.
38
+ # @param create_api_key_request
38
39
  # @param [Hash] opts the optional parameters
39
- # @return [V1ApiKeysGet200Response]
40
- describe 'v1_api_keys_get test' do
40
+ # @return [CreateApiKey201Response]
41
+ describe 'create_api_key test' do
41
42
  it 'should work' do
42
43
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
43
44
  end
44
45
  end
45
46
 
46
- # unit tests for v1_api_keys_id_delete
47
- # Revoke an API key
48
- # Soft-deletes (sets `revoked_at`) on the named key. The row stays for audit purposes; the key no longer authenticates. You **cannot revoke the key currently being used** to make this call — that would lock you out. Use a different `tenant:admin` key.
49
- # @param id
47
+ # unit tests for list_api_keys
48
+ # List API keys
49
+ # Returns all API keys (active and revoked) belonging to the calling tenant. The `secret` is **never** returned — only prefix + metadata.
50
50
  # @param [Hash] opts the optional parameters
51
- # @return [nil]
52
- describe 'v1_api_keys_id_delete test' do
51
+ # @return [ListApiKeys200Response]
52
+ describe 'list_api_keys test' do
53
53
  it 'should work' do
54
54
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
55
55
  end
56
56
  end
57
57
 
58
- # unit tests for v1_api_keys_post
59
- # Create an API key
60
- # Provisions a fresh API key for the calling tenant. **The full `secret` is included in this response ONLY** — store it immediately. The cleartext secret is not recoverable from the argon2id hash kept server-side; rotate by creating a new key and revoking the old one.
61
- # @param v1_api_keys_post_request
58
+ # unit tests for revoke_api_key
59
+ # Revoke an API key
60
+ # Soft-deletes (sets `revoked_at`) on the named key. The row stays for audit purposes; the key no longer authenticates. You **cannot revoke the key currently being used** to make this call — that would lock you out. Use a different `tenant:admin` key.
61
+ # @param id
62
62
  # @param [Hash] opts the optional parameters
63
- # @return [V1ApiKeysPost201Response]
64
- describe 'v1_api_keys_post test' do
63
+ # @return [nil]
64
+ describe 'revoke_api_key test' do
65
65
  it 'should work' do
66
66
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
67
67
  end
@@ -32,107 +32,107 @@ describe 'DomainsApi' do
32
32
  end
33
33
  end
34
34
 
35
- # unit tests for v1_domains_domain_delete
36
- # Delete a domain
37
- # Removes the domain registration. Refuses with 409 if any mailbox is still attached — delete the mailboxes first.
38
- # @param domain
35
+ # unit tests for create_domain
36
+ # Register a domain
37
+ # Registers a new domain for the calling tenant. Generates a DKIM keypair and verification token. Returns DNS instructions the tenant must publish under their own DNS (verification TXT, SPF include, DKIM TXT, MX records to `mx1`/`mx2.lockally.com`, DMARC seed). **Idempotent** — re-posting the same domain returns the existing record with the same DKIM keys and token (regenerating would break the tenant's published DNS). Returns 200 on idempotent hit, 201 on first create. Returns 409 if the domain is already claimed by a different tenant.
38
+ # @param create_domain_request
39
39
  # @param [Hash] opts the optional parameters
40
- # @return [nil]
41
- describe 'v1_domains_domain_delete test' do
40
+ # @return [Domain]
41
+ describe 'create_domain test' do
42
42
  it 'should work' do
43
43
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
44
44
  end
45
45
  end
46
46
 
47
- # unit tests for v1_domains_domain_get
48
- # Get a domain
47
+ # unit tests for delete_domain
48
+ # Delete a domain
49
+ # Removes the domain registration. Refuses with 409 if any mailbox is still attached — delete the mailboxes first.
49
50
  # @param domain
50
51
  # @param [Hash] opts the optional parameters
51
- # @return [Domain]
52
- describe 'v1_domains_domain_get test' do
52
+ # @return [nil]
53
+ describe 'delete_domain test' do
53
54
  it 'should work' do
54
55
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
55
56
  end
56
57
  end
57
58
 
58
- # unit tests for v1_domains_domain_return_path_delete
59
+ # unit tests for disable_return_path
59
60
  # Turn off the custom Return-Path
60
61
  # API mail uses the sender's own address as the envelope sender again, from the next message.
61
62
  # @param domain
62
63
  # @param [Hash] opts the optional parameters
63
64
  # @return [nil]
64
- describe 'v1_domains_domain_return_path_delete test' do
65
+ describe 'disable_return_path test' do
65
66
  it 'should work' do
66
67
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
67
68
  end
68
69
  end
69
70
 
70
- # unit tests for v1_domains_domain_return_path_get
71
- # Get the custom Return-Path
72
- # A custom Return-Path moves the envelope sender of mail sent through the API from this domain onto `bounces.<domain>`. Bounce reports then come back to Lockally instead of the sending mailbox, and a bounce that arrives after delivery marks the message bounced, suppresses the address and fires `delivery.bounced`. Mail sent from webmail or mail apps is not affected. DKIM stays signed by the domain itself. `status` is `off`, `pending` (records not confirmed yet) or `active`.
71
+ # unit tests for enable_return_path
72
+ # Turn on the custom Return-Path
73
+ # Moves it to `pending` and returns the two records to publish on `bounces.<domain>`. Nothing changes for mail until they are confirmed with the verify call. The domain must be verified. Available on every plan except Free.
73
74
  # @param domain
74
75
  # @param [Hash] opts the optional parameters
75
76
  # @return [ReturnPath]
76
- describe 'v1_domains_domain_return_path_get test' do
77
+ describe 'enable_return_path test' do
77
78
  it 'should work' do
78
79
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
79
80
  end
80
81
  end
81
82
 
82
- # unit tests for v1_domains_domain_return_path_post
83
- # Turn on the custom Return-Path
84
- # Moves it to `pending` and returns the two records to publish on `bounces.<domain>`. Nothing changes for mail until they are confirmed with the verify call. The domain must be verified. Available on every plan except Free.
83
+ # unit tests for get_domain
84
+ # Get a domain
85
85
  # @param domain
86
86
  # @param [Hash] opts the optional parameters
87
- # @return [ReturnPath]
88
- describe 'v1_domains_domain_return_path_post test' do
87
+ # @return [Domain]
88
+ describe 'get_domain test' do
89
89
  it 'should work' do
90
90
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
91
91
  end
92
92
  end
93
93
 
94
- # unit tests for v1_domains_domain_return_path_verify_post
95
- # Check the custom Return-Path records
96
- # Looks up the MX and SPF records on `bounces.<domain>`. Returns 200 either way: while a record is missing the status stays `pending` and `check` says which one. Once both are found the Return-Path becomes `active` and the send path starts using it.
94
+ # unit tests for get_return_path
95
+ # Get the custom Return-Path
96
+ # A custom Return-Path moves the envelope sender of mail sent through the API from this domain onto `bounces.<domain>`. Bounce reports then come back to Lockally instead of the sending mailbox, and a bounce that arrives after delivery marks the message bounced, suppresses the address and fires `delivery.bounced`. Mail sent from webmail or mail apps is not affected. DKIM stays signed by the domain itself. `status` is `off`, `pending` (records not confirmed yet) or `active`.
97
97
  # @param domain
98
98
  # @param [Hash] opts the optional parameters
99
99
  # @return [ReturnPath]
100
- describe 'v1_domains_domain_return_path_verify_post test' do
100
+ describe 'get_return_path test' do
101
101
  it 'should work' do
102
102
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
103
103
  end
104
104
  end
105
105
 
106
- # unit tests for v1_domains_domain_verify_post
107
- # Force-poll DNS verification
108
- # Synchronously checks the `_lockally-verify.<domain>` TXT record against the stored verification token. Returns 200 either way: the returned `verified` boolean tells you whether DNS now confirms. Caller polls until `verified: true`. In v2 a background worker auto-polls and fires a `domain.verified` webhook.
109
- # @param domain
106
+ # unit tests for list_domains
107
+ # List domains
108
+ # Returns every domain registered under the calling tenant.
110
109
  # @param [Hash] opts the optional parameters
111
- # @return [Domain]
112
- describe 'v1_domains_domain_verify_post test' do
110
+ # @return [ListDomains200Response]
111
+ describe 'list_domains test' do
113
112
  it 'should work' do
114
113
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
115
114
  end
116
115
  end
117
116
 
118
- # unit tests for v1_domains_get
119
- # List domains
120
- # Returns every domain registered under the calling tenant.
117
+ # unit tests for verify_domain
118
+ # Force-poll DNS verification
119
+ # Synchronously checks the `_lockally-verify.<domain>` TXT record against the stored verification token. Returns 200 either way: the returned `verified` boolean tells you whether DNS now confirms. Caller polls until `verified: true`. In v2 a background worker auto-polls and fires a `domain.verified` webhook.
120
+ # @param domain
121
121
  # @param [Hash] opts the optional parameters
122
- # @return [V1DomainsGet200Response]
123
- describe 'v1_domains_get test' do
122
+ # @return [Domain]
123
+ describe 'verify_domain test' do
124
124
  it 'should work' do
125
125
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
126
126
  end
127
127
  end
128
128
 
129
- # unit tests for v1_domains_post
130
- # Register a domain
131
- # Registers a new domain for the calling tenant. Generates a DKIM keypair and verification token. Returns DNS instructions the tenant must publish under their own DNS (verification TXT, SPF include, DKIM TXT, MX records to `mx1`/`mx2.lockally.com`, DMARC seed). **Idempotent** — re-posting the same domain returns the existing record with the same DKIM keys and token (regenerating would break the tenant's published DNS). Returns 200 on idempotent hit, 201 on first create. Returns 409 if the domain is already claimed by a different tenant.
132
- # @param v1_domains_post_request
129
+ # unit tests for verify_return_path
130
+ # Check the custom Return-Path records
131
+ # Looks up the MX and SPF records on `bounces.<domain>`. Returns 200 either way: while a record is missing the status stays `pending` and `check` says which one. Once both are found the Return-Path becomes `active` and the send path starts using it.
132
+ # @param domain
133
133
  # @param [Hash] opts the optional parameters
134
- # @return [Domain]
135
- describe 'v1_domains_post test' do
134
+ # @return [ReturnPath]
135
+ describe 'verify_return_path test' do
136
136
  it 'should work' do
137
137
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
138
138
  end
@@ -32,87 +32,87 @@ describe 'DraftsApi' do
32
32
  end
33
33
  end
34
34
 
35
- # unit tests for v1_drafts_draft_id_approve_post
35
+ # unit tests for approve_draft
36
36
  # Approve a pending draft (human)
37
37
  # Sends the draft exactly as reviewed, through the agent stream (loop detector included). Fires draft.approved.
38
38
  # @param draft_id
39
39
  # @param [Hash] opts the optional parameters
40
- # @return [Object]
41
- describe 'v1_drafts_draft_id_approve_post test' do
40
+ # @return [DraftResult]
41
+ describe 'approve_draft test' do
42
42
  it 'should work' do
43
43
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
44
44
  end
45
45
  end
46
46
 
47
- # unit tests for v1_drafts_draft_id_cancel_post
47
+ # unit tests for cancel_draft
48
48
  # Withdraw a pending draft
49
49
  # Only the API key that created the draft may cancel it.
50
50
  # @param draft_id
51
51
  # @param [Hash] opts the optional parameters
52
- # @return [Object]
53
- describe 'v1_drafts_draft_id_cancel_post test' do
52
+ # @return [Draft]
53
+ describe 'cancel_draft test' do
54
54
  it 'should work' do
55
55
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
56
56
  end
57
57
  end
58
58
 
59
- # unit tests for v1_drafts_draft_id_get
60
- # Get a draft
61
- # @param draft_id
59
+ # unit tests for create_conversation_draft
60
+ # Propose a new conversation as a draft
61
+ # New-conversation drafts ALWAYS require human approval (policy flag new_thread). Idempotency-Key required.
62
+ # @param mailbox
63
+ # @param idempotency_key
62
64
  # @param [Hash] opts the optional parameters
63
- # @return [Object]
64
- describe 'v1_drafts_draft_id_get test' do
65
+ # @return [DraftResult]
66
+ describe 'create_conversation_draft test' do
65
67
  it 'should work' do
66
68
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
67
69
  end
68
70
  end
69
71
 
70
- # unit tests for v1_drafts_draft_id_reject_post
71
- # Reject a pending draft (human)
72
- # Body: {\"reason\": \"...\"} (optional). Fires draft.rejected.
73
- # @param draft_id
72
+ # unit tests for create_reply_draft
73
+ # Propose a reply as a draft
74
+ # The safe default over /reply: the deterministic policy engine auto-sends clean in-thread replies and holds anything risky (PII, new recipients, injection-flagged threads, always-approve mailboxes) for human approval. Fires draft.pending_approval when held. Idempotency-Key required.
75
+ # @param thread_id
76
+ # @param idempotency_key
74
77
  # @param [Hash] opts the optional parameters
75
- # @return [Object]
76
- describe 'v1_drafts_draft_id_reject_post test' do
78
+ # @return [DraftResult]
79
+ describe 'create_reply_draft test' do
77
80
  it 'should work' do
78
81
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
79
82
  end
80
83
  end
81
84
 
82
- # unit tests for v1_drafts_get
83
- # List drafts
84
- # Filter with ?status=pending_approval|sent|rejected|cancelled. Keys see drafts of granted mailboxes; admin sessions see all.
85
+ # unit tests for get_draft
86
+ # Get a draft
87
+ # @param draft_id
85
88
  # @param [Hash] opts the optional parameters
86
- # @option opts [String] :status
87
- # @option opts [Integer] :limit
88
- # @return [Object]
89
- describe 'v1_drafts_get test' do
89
+ # @return [Draft]
90
+ describe 'get_draft test' do
90
91
  it 'should work' do
91
92
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
92
93
  end
93
94
  end
94
95
 
95
- # unit tests for v1_inboxes_mailbox_drafts_post
96
- # Propose a new conversation as a draft
97
- # New-conversation drafts ALWAYS require human approval (policy flag new_thread). Idempotency-Key required.
98
- # @param mailbox
99
- # @param idempotency_key
96
+ # unit tests for list_drafts
97
+ # List drafts
98
+ # Filter with ?status=pending_approval|sent|rejected|cancelled. Keys see drafts of granted mailboxes; admin sessions see all.
100
99
  # @param [Hash] opts the optional parameters
101
- # @return [Object]
102
- describe 'v1_inboxes_mailbox_drafts_post test' do
100
+ # @option opts [String] :status
101
+ # @option opts [Integer] :limit
102
+ # @return [DraftList]
103
+ describe 'list_drafts test' do
103
104
  it 'should work' do
104
105
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
105
106
  end
106
107
  end
107
108
 
108
- # unit tests for v1_threads_thread_id_drafts_post
109
- # Propose a reply as a draft
110
- # The safe default over /reply: the deterministic policy engine auto-sends clean in-thread replies and holds anything risky (PII, new recipients, injection-flagged threads, always-approve mailboxes) for human approval. Fires draft.pending_approval when held. Idempotency-Key required.
111
- # @param thread_id
112
- # @param idempotency_key
109
+ # unit tests for reject_draft
110
+ # Reject a pending draft (human)
111
+ # Body: {\"reason\": \"...\"} (optional). Fires draft.rejected.
112
+ # @param draft_id
113
113
  # @param [Hash] opts the optional parameters
114
- # @return [Object]
115
- describe 'v1_threads_thread_id_drafts_post test' do
114
+ # @return [Draft]
115
+ describe 'reject_draft test' do
116
116
  it 'should work' do
117
117
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
118
118
  end
@@ -32,12 +32,12 @@ describe 'HealthApi' do
32
32
  end
33
33
  end
34
34
 
35
- # unit tests for healthz_get
35
+ # unit tests for health_check
36
36
  # Liveness check
37
37
  # Returns 200 if the process is up and the database pings cleanly. No authentication required.
38
38
  # @param [Hash] opts the optional parameters
39
- # @return [HealthzGet200Response]
40
- describe 'healthz_get test' do
39
+ # @return [HealthCheck200Response]
40
+ describe 'health_check test' do
41
41
  it 'should work' do
42
42
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
43
43
  end