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/AiApi.md CHANGED
@@ -4,19 +4,19 @@ All URIs are relative to *https://api.lockally.com*
4
4
 
5
5
  | Method | HTTP request | Description |
6
6
  | ------ | ------------ | ----------- |
7
- | [**v1_ai_config_get**](AiApi.md#v1_ai_config_get) | **GET** /v1/ai-config | Read the tenant's AI configuration |
8
- | [**v1_ai_config_put**](AiApi.md#v1_ai_config_put) | **PUT** /v1/ai-config | Configure the AI tier |
9
- | [**v1_billing_ai_units_checkout_post**](AiApi.md#v1_billing_ai_units_checkout_post) | **POST** /v1/billing/ai-units/checkout | Buy prepaid AI units |
10
- | [**v1_threads_thread_id_classify_post**](AiApi.md#v1_threads_thread_id_classify_post) | **POST** /v1/threads/{threadID}/classify | LLM-classify a thread |
7
+ | [**classify_thread**](AiApi.md#classify_thread) | **POST** /v1/threads/{threadID}/classify | LLM-classify a thread |
8
+ | [**create_ai_units_checkout**](AiApi.md#create_ai_units_checkout) | **POST** /v1/billing/ai-units/checkout | Buy prepaid AI units |
9
+ | [**get_ai_config**](AiApi.md#get_ai_config) | **GET** /v1/ai-config | Read the tenant's AI configuration |
10
+ | [**update_ai_config**](AiApi.md#update_ai_config) | **PUT** /v1/ai-config | Configure the AI tier |
11
11
 
12
12
 
13
- ## v1_ai_config_get
13
+ ## classify_thread
14
14
 
15
- > Object v1_ai_config_get
15
+ > <ThreadClassification> classify_thread(thread_id, opts)
16
16
 
17
- Read the tenant's AI configuration
17
+ LLM-classify a thread
18
18
 
19
- Mode (off/byok/units), model, masked key hint, AI-unit balance, whether the units tier is available on this deployment.
19
+ 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.
20
20
 
21
21
  ### Examples
22
22
 
@@ -30,41 +30,48 @@ Lockally.configure do |config|
30
30
  end
31
31
 
32
32
  api_instance = Lockally::AiApi.new
33
+ thread_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String |
34
+ opts = {
35
+ refresh: true # Boolean |
36
+ }
33
37
 
34
38
  begin
35
- # Read the tenant's AI configuration
36
- result = api_instance.v1_ai_config_get
39
+ # LLM-classify a thread
40
+ result = api_instance.classify_thread(thread_id, opts)
37
41
  p result
38
42
  rescue Lockally::ApiError => e
39
- puts "Error when calling AiApi->v1_ai_config_get: #{e}"
43
+ puts "Error when calling AiApi->classify_thread: #{e}"
40
44
  end
41
45
  ```
42
46
 
43
- #### Using the v1_ai_config_get_with_http_info variant
47
+ #### Using the classify_thread_with_http_info variant
44
48
 
45
49
  This returns an Array which contains the response data, status code and headers.
46
50
 
47
- > <Array(Object, Integer, Hash)> v1_ai_config_get_with_http_info
51
+ > <Array(<ThreadClassification>, Integer, Hash)> classify_thread_with_http_info(thread_id, opts)
48
52
 
49
53
  ```ruby
50
54
  begin
51
- # Read the tenant's AI configuration
52
- data, status_code, headers = api_instance.v1_ai_config_get_with_http_info
55
+ # LLM-classify a thread
56
+ data, status_code, headers = api_instance.classify_thread_with_http_info(thread_id, opts)
53
57
  p status_code # => 2xx
54
58
  p headers # => { ... }
55
- p data # => Object
59
+ p data # => <ThreadClassification>
56
60
  rescue Lockally::ApiError => e
57
- puts "Error when calling AiApi->v1_ai_config_get_with_http_info: #{e}"
61
+ puts "Error when calling AiApi->classify_thread_with_http_info: #{e}"
58
62
  end
59
63
  ```
60
64
 
61
65
  ### Parameters
62
66
 
63
- This endpoint does not need any parameter.
67
+ | Name | Type | Description | Notes |
68
+ | ---- | ---- | ----------- | ----- |
69
+ | **thread_id** | **String** | | |
70
+ | **refresh** | **Boolean** | | [optional] |
64
71
 
65
72
  ### Return type
66
73
 
67
- **Object**
74
+ [**ThreadClassification**](ThreadClassification.md)
68
75
 
69
76
  ### Authorization
70
77
 
@@ -76,13 +83,13 @@ This endpoint does not need any parameter.
76
83
  - **Accept**: application/json
77
84
 
78
85
 
79
- ## v1_ai_config_put
86
+ ## create_ai_units_checkout
80
87
 
81
- > Object v1_ai_config_put
88
+ > <CreateAiUnitsCheckout200Response> create_ai_units_checkout
82
89
 
83
- Configure the AI tier
90
+ Buy prepaid AI units
84
91
 
85
- 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.
92
+ Body: {\"bundle\": \"100|500|2000\"}. One classification = one unit; bundles expire after 6 months. Admin session required. 503 until Paystack billing is configured.
86
93
 
87
94
  ### Examples
88
95
 
@@ -98,29 +105,29 @@ end
98
105
  api_instance = Lockally::AiApi.new
99
106
 
100
107
  begin
101
- # Configure the AI tier
102
- result = api_instance.v1_ai_config_put
108
+ # Buy prepaid AI units
109
+ result = api_instance.create_ai_units_checkout
103
110
  p result
104
111
  rescue Lockally::ApiError => e
105
- puts "Error when calling AiApi->v1_ai_config_put: #{e}"
112
+ puts "Error when calling AiApi->create_ai_units_checkout: #{e}"
106
113
  end
107
114
  ```
108
115
 
109
- #### Using the v1_ai_config_put_with_http_info variant
116
+ #### Using the create_ai_units_checkout_with_http_info variant
110
117
 
111
118
  This returns an Array which contains the response data, status code and headers.
112
119
 
113
- > <Array(Object, Integer, Hash)> v1_ai_config_put_with_http_info
120
+ > <Array(<CreateAiUnitsCheckout200Response>, Integer, Hash)> create_ai_units_checkout_with_http_info
114
121
 
115
122
  ```ruby
116
123
  begin
117
- # Configure the AI tier
118
- data, status_code, headers = api_instance.v1_ai_config_put_with_http_info
124
+ # Buy prepaid AI units
125
+ data, status_code, headers = api_instance.create_ai_units_checkout_with_http_info
119
126
  p status_code # => 2xx
120
127
  p headers # => { ... }
121
- p data # => Object
128
+ p data # => <CreateAiUnitsCheckout200Response>
122
129
  rescue Lockally::ApiError => e
123
- puts "Error when calling AiApi->v1_ai_config_put_with_http_info: #{e}"
130
+ puts "Error when calling AiApi->create_ai_units_checkout_with_http_info: #{e}"
124
131
  end
125
132
  ```
126
133
 
@@ -130,7 +137,7 @@ This endpoint does not need any parameter.
130
137
 
131
138
  ### Return type
132
139
 
133
- **Object**
140
+ [**CreateAiUnitsCheckout200Response**](CreateAiUnitsCheckout200Response.md)
134
141
 
135
142
  ### Authorization
136
143
 
@@ -142,13 +149,13 @@ This endpoint does not need any parameter.
142
149
  - **Accept**: application/json
143
150
 
144
151
 
145
- ## v1_billing_ai_units_checkout_post
152
+ ## get_ai_config
146
153
 
147
- > Object v1_billing_ai_units_checkout_post
154
+ > <AiConfig> get_ai_config
148
155
 
149
- Buy prepaid AI units
156
+ Read the tenant's AI configuration
150
157
 
151
- Body: {\"bundle\": \"100|500|2000\"}. One classification = one unit; bundles expire after 6 months. Admin session required. 503 until Paystack billing is configured.
158
+ Mode (off/byok/units), model, masked key hint, AI-unit balance, whether the units tier is available on this deployment.
152
159
 
153
160
  ### Examples
154
161
 
@@ -164,29 +171,29 @@ end
164
171
  api_instance = Lockally::AiApi.new
165
172
 
166
173
  begin
167
- # Buy prepaid AI units
168
- result = api_instance.v1_billing_ai_units_checkout_post
174
+ # Read the tenant's AI configuration
175
+ result = api_instance.get_ai_config
169
176
  p result
170
177
  rescue Lockally::ApiError => e
171
- puts "Error when calling AiApi->v1_billing_ai_units_checkout_post: #{e}"
178
+ puts "Error when calling AiApi->get_ai_config: #{e}"
172
179
  end
173
180
  ```
174
181
 
175
- #### Using the v1_billing_ai_units_checkout_post_with_http_info variant
182
+ #### Using the get_ai_config_with_http_info variant
176
183
 
177
184
  This returns an Array which contains the response data, status code and headers.
178
185
 
179
- > <Array(Object, Integer, Hash)> v1_billing_ai_units_checkout_post_with_http_info
186
+ > <Array(<AiConfig>, Integer, Hash)> get_ai_config_with_http_info
180
187
 
181
188
  ```ruby
182
189
  begin
183
- # Buy prepaid AI units
184
- data, status_code, headers = api_instance.v1_billing_ai_units_checkout_post_with_http_info
190
+ # Read the tenant's AI configuration
191
+ data, status_code, headers = api_instance.get_ai_config_with_http_info
185
192
  p status_code # => 2xx
186
193
  p headers # => { ... }
187
- p data # => Object
194
+ p data # => <AiConfig>
188
195
  rescue Lockally::ApiError => e
189
- puts "Error when calling AiApi->v1_billing_ai_units_checkout_post_with_http_info: #{e}"
196
+ puts "Error when calling AiApi->get_ai_config_with_http_info: #{e}"
190
197
  end
191
198
  ```
192
199
 
@@ -196,7 +203,7 @@ This endpoint does not need any parameter.
196
203
 
197
204
  ### Return type
198
205
 
199
- **Object**
206
+ [**AiConfig**](AiConfig.md)
200
207
 
201
208
  ### Authorization
202
209
 
@@ -208,13 +215,13 @@ This endpoint does not need any parameter.
208
215
  - **Accept**: application/json
209
216
 
210
217
 
211
- ## v1_threads_thread_id_classify_post
218
+ ## update_ai_config
212
219
 
213
- > Object v1_threads_thread_id_classify_post(thread_id, opts)
220
+ > <AiConfigUpdate> update_ai_config
214
221
 
215
- LLM-classify a thread
222
+ Configure the AI tier
216
223
 
217
- 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.
224
+ 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.
218
225
 
219
226
  ### Examples
220
227
 
@@ -228,48 +235,41 @@ Lockally.configure do |config|
228
235
  end
229
236
 
230
237
  api_instance = Lockally::AiApi.new
231
- thread_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String |
232
- opts = {
233
- refresh: true # Boolean |
234
- }
235
238
 
236
239
  begin
237
- # LLM-classify a thread
238
- result = api_instance.v1_threads_thread_id_classify_post(thread_id, opts)
240
+ # Configure the AI tier
241
+ result = api_instance.update_ai_config
239
242
  p result
240
243
  rescue Lockally::ApiError => e
241
- puts "Error when calling AiApi->v1_threads_thread_id_classify_post: #{e}"
244
+ puts "Error when calling AiApi->update_ai_config: #{e}"
242
245
  end
243
246
  ```
244
247
 
245
- #### Using the v1_threads_thread_id_classify_post_with_http_info variant
248
+ #### Using the update_ai_config_with_http_info variant
246
249
 
247
250
  This returns an Array which contains the response data, status code and headers.
248
251
 
249
- > <Array(Object, Integer, Hash)> v1_threads_thread_id_classify_post_with_http_info(thread_id, opts)
252
+ > <Array(<AiConfigUpdate>, Integer, Hash)> update_ai_config_with_http_info
250
253
 
251
254
  ```ruby
252
255
  begin
253
- # LLM-classify a thread
254
- data, status_code, headers = api_instance.v1_threads_thread_id_classify_post_with_http_info(thread_id, opts)
256
+ # Configure the AI tier
257
+ data, status_code, headers = api_instance.update_ai_config_with_http_info
255
258
  p status_code # => 2xx
256
259
  p headers # => { ... }
257
- p data # => Object
260
+ p data # => <AiConfigUpdate>
258
261
  rescue Lockally::ApiError => e
259
- puts "Error when calling AiApi->v1_threads_thread_id_classify_post_with_http_info: #{e}"
262
+ puts "Error when calling AiApi->update_ai_config_with_http_info: #{e}"
260
263
  end
261
264
  ```
262
265
 
263
266
  ### Parameters
264
267
 
265
- | Name | Type | Description | Notes |
266
- | ---- | ---- | ----------- | ----- |
267
- | **thread_id** | **String** | | |
268
- | **refresh** | **Boolean** | | [optional] |
268
+ This endpoint does not need any parameter.
269
269
 
270
270
  ### Return type
271
271
 
272
- **Object**
272
+ [**AiConfigUpdate**](AiConfigUpdate.md)
273
273
 
274
274
  ### Authorization
275
275
 
data/docs/AiConfig.md ADDED
@@ -0,0 +1,26 @@
1
+ # Lockally::AiConfig
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **mode** | **String** | | |
8
+ | **model** | **String** | | |
9
+ | **byok_key_hint** | **String** | | [optional] |
10
+ | **units_balance** | **Integer** | | [optional] |
11
+ | **units_available** | **Boolean** | True when a platform model key is configured. | [optional] |
12
+
13
+ ## Example
14
+
15
+ ```ruby
16
+ require 'lockally'
17
+
18
+ instance = Lockally::AiConfig.new(
19
+ mode: null,
20
+ model: null,
21
+ byok_key_hint: null,
22
+ units_balance: null,
23
+ units_available: null
24
+ )
25
+ ```
26
+
@@ -0,0 +1,20 @@
1
+ # Lockally::AiConfigUpdate
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **mode** | **String** | | |
8
+ | **model** | **String** | | |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'lockally'
14
+
15
+ instance = Lockally::AiConfigUpdate.new(
16
+ mode: null,
17
+ model: null
18
+ )
19
+ ```
20
+
data/docs/AliasesApi.md CHANGED
@@ -4,18 +4,18 @@ All URIs are relative to *https://api.lockally.com*
4
4
 
5
5
  | Method | HTTP request | Description |
6
6
  | ------ | ------------ | ----------- |
7
- | [**v1_aliases_address_delete**](AliasesApi.md#v1_aliases_address_delete) | **DELETE** /v1/aliases/{address} | Delete an alias |
8
- | [**v1_aliases_get**](AliasesApi.md#v1_aliases_get) | **GET** /v1/aliases | List aliases |
9
- | [**v1_aliases_post**](AliasesApi.md#v1_aliases_post) | **POST** /v1/aliases | Create an alias |
7
+ | [**create_alias**](AliasesApi.md#create_alias) | **POST** /v1/aliases | Create an alias |
8
+ | [**delete_alias**](AliasesApi.md#delete_alias) | **DELETE** /v1/aliases/{address} | Delete an alias |
9
+ | [**list_aliases**](AliasesApi.md#list_aliases) | **GET** /v1/aliases | List aliases |
10
10
 
11
11
 
12
- ## v1_aliases_address_delete
12
+ ## create_alias
13
13
 
14
- > v1_aliases_address_delete(address)
14
+ > <ModelAlias> create_alias(create_alias_request)
15
15
 
16
- Delete an alias
16
+ Create an alias
17
17
 
18
- Hard-delete (no soft-delete window — aliases are cheap to recreate).
18
+ 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.
19
19
 
20
20
  ### Examples
21
21
 
@@ -29,31 +29,32 @@ Lockally.configure do |config|
29
29
  end
30
30
 
31
31
  api_instance = Lockally::AliasesApi.new
32
- address = 'address_example' # String |
32
+ create_alias_request = Lockally::CreateAliasRequest.new({alias_address: 'support@acme.com', alias_target: 'alice@acme.com'}) # CreateAliasRequest |
33
33
 
34
34
  begin
35
- # Delete an alias
36
- api_instance.v1_aliases_address_delete(address)
35
+ # Create an alias
36
+ result = api_instance.create_alias(create_alias_request)
37
+ p result
37
38
  rescue Lockally::ApiError => e
38
- puts "Error when calling AliasesApi->v1_aliases_address_delete: #{e}"
39
+ puts "Error when calling AliasesApi->create_alias: #{e}"
39
40
  end
40
41
  ```
41
42
 
42
- #### Using the v1_aliases_address_delete_with_http_info variant
43
+ #### Using the create_alias_with_http_info variant
43
44
 
44
- This returns an Array which contains the response data (`nil` in this case), status code and headers.
45
+ This returns an Array which contains the response data, status code and headers.
45
46
 
46
- > <Array(nil, Integer, Hash)> v1_aliases_address_delete_with_http_info(address)
47
+ > <Array(<ModelAlias>, Integer, Hash)> create_alias_with_http_info(create_alias_request)
47
48
 
48
49
  ```ruby
49
50
  begin
50
- # Delete an alias
51
- data, status_code, headers = api_instance.v1_aliases_address_delete_with_http_info(address)
51
+ # Create an alias
52
+ data, status_code, headers = api_instance.create_alias_with_http_info(create_alias_request)
52
53
  p status_code # => 2xx
53
54
  p headers # => { ... }
54
- p data # => nil
55
+ p data # => <ModelAlias>
55
56
  rescue Lockally::ApiError => e
56
- puts "Error when calling AliasesApi->v1_aliases_address_delete_with_http_info: #{e}"
57
+ puts "Error when calling AliasesApi->create_alias_with_http_info: #{e}"
57
58
  end
58
59
  ```
59
60
 
@@ -61,11 +62,11 @@ end
61
62
 
62
63
  | Name | Type | Description | Notes |
63
64
  | ---- | ---- | ----------- | ----- |
64
- | **address** | **String** | | |
65
+ | **create_alias_request** | [**CreateAliasRequest**](CreateAliasRequest.md) | | |
65
66
 
66
67
  ### Return type
67
68
 
68
- nil (empty response body)
69
+ [**ModelAlias**](ModelAlias.md)
69
70
 
70
71
  ### Authorization
71
72
 
@@ -73,15 +74,17 @@ nil (empty response body)
73
74
 
74
75
  ### HTTP request headers
75
76
 
76
- - **Content-Type**: Not defined
77
- - **Accept**: application/problem+json
77
+ - **Content-Type**: application/json
78
+ - **Accept**: application/json, application/problem+json
78
79
 
79
80
 
80
- ## v1_aliases_get
81
+ ## delete_alias
81
82
 
82
- > <V1AliasesGet200Response> v1_aliases_get
83
+ > delete_alias(address)
83
84
 
84
- List aliases
85
+ Delete an alias
86
+
87
+ Hard-delete (no soft-delete window — aliases are cheap to recreate).
85
88
 
86
89
  ### Examples
87
90
 
@@ -95,41 +98,43 @@ Lockally.configure do |config|
95
98
  end
96
99
 
97
100
  api_instance = Lockally::AliasesApi.new
101
+ address = 'address_example' # String |
98
102
 
99
103
  begin
100
- # List aliases
101
- result = api_instance.v1_aliases_get
102
- p result
104
+ # Delete an alias
105
+ api_instance.delete_alias(address)
103
106
  rescue Lockally::ApiError => e
104
- puts "Error when calling AliasesApi->v1_aliases_get: #{e}"
107
+ puts "Error when calling AliasesApi->delete_alias: #{e}"
105
108
  end
106
109
  ```
107
110
 
108
- #### Using the v1_aliases_get_with_http_info variant
111
+ #### Using the delete_alias_with_http_info variant
109
112
 
110
- This returns an Array which contains the response data, status code and headers.
113
+ This returns an Array which contains the response data (`nil` in this case), status code and headers.
111
114
 
112
- > <Array(<V1AliasesGet200Response>, Integer, Hash)> v1_aliases_get_with_http_info
115
+ > <Array(nil, Integer, Hash)> delete_alias_with_http_info(address)
113
116
 
114
117
  ```ruby
115
118
  begin
116
- # List aliases
117
- data, status_code, headers = api_instance.v1_aliases_get_with_http_info
119
+ # Delete an alias
120
+ data, status_code, headers = api_instance.delete_alias_with_http_info(address)
118
121
  p status_code # => 2xx
119
122
  p headers # => { ... }
120
- p data # => <V1AliasesGet200Response>
123
+ p data # => nil
121
124
  rescue Lockally::ApiError => e
122
- puts "Error when calling AliasesApi->v1_aliases_get_with_http_info: #{e}"
125
+ puts "Error when calling AliasesApi->delete_alias_with_http_info: #{e}"
123
126
  end
124
127
  ```
125
128
 
126
129
  ### Parameters
127
130
 
128
- This endpoint does not need any parameter.
131
+ | Name | Type | Description | Notes |
132
+ | ---- | ---- | ----------- | ----- |
133
+ | **address** | **String** | | |
129
134
 
130
135
  ### Return type
131
136
 
132
- [**V1AliasesGet200Response**](V1AliasesGet200Response.md)
137
+ nil (empty response body)
133
138
 
134
139
  ### Authorization
135
140
 
@@ -138,16 +143,14 @@ This endpoint does not need any parameter.
138
143
  ### HTTP request headers
139
144
 
140
145
  - **Content-Type**: Not defined
141
- - **Accept**: application/json, application/problem+json
142
-
146
+ - **Accept**: application/problem+json
143
147
 
144
- ## v1_aliases_post
145
148
 
146
- > <ModelAlias> v1_aliases_post(v1_aliases_post_request)
149
+ ## list_aliases
147
150
 
148
- Create an alias
151
+ > <ListAliases200Response> list_aliases
149
152
 
150
- 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.
153
+ List aliases
151
154
 
152
155
  ### Examples
153
156
 
@@ -161,44 +164,41 @@ Lockally.configure do |config|
161
164
  end
162
165
 
163
166
  api_instance = Lockally::AliasesApi.new
164
- v1_aliases_post_request = Lockally::V1AliasesPostRequest.new({alias_address: 'support@acme.com', alias_target: 'alice@acme.com'}) # V1AliasesPostRequest |
165
167
 
166
168
  begin
167
- # Create an alias
168
- result = api_instance.v1_aliases_post(v1_aliases_post_request)
169
+ # List aliases
170
+ result = api_instance.list_aliases
169
171
  p result
170
172
  rescue Lockally::ApiError => e
171
- puts "Error when calling AliasesApi->v1_aliases_post: #{e}"
173
+ puts "Error when calling AliasesApi->list_aliases: #{e}"
172
174
  end
173
175
  ```
174
176
 
175
- #### Using the v1_aliases_post_with_http_info variant
177
+ #### Using the list_aliases_with_http_info variant
176
178
 
177
179
  This returns an Array which contains the response data, status code and headers.
178
180
 
179
- > <Array(<ModelAlias>, Integer, Hash)> v1_aliases_post_with_http_info(v1_aliases_post_request)
181
+ > <Array(<ListAliases200Response>, Integer, Hash)> list_aliases_with_http_info
180
182
 
181
183
  ```ruby
182
184
  begin
183
- # Create an alias
184
- data, status_code, headers = api_instance.v1_aliases_post_with_http_info(v1_aliases_post_request)
185
+ # List aliases
186
+ data, status_code, headers = api_instance.list_aliases_with_http_info
185
187
  p status_code # => 2xx
186
188
  p headers # => { ... }
187
- p data # => <ModelAlias>
189
+ p data # => <ListAliases200Response>
188
190
  rescue Lockally::ApiError => e
189
- puts "Error when calling AliasesApi->v1_aliases_post_with_http_info: #{e}"
191
+ puts "Error when calling AliasesApi->list_aliases_with_http_info: #{e}"
190
192
  end
191
193
  ```
192
194
 
193
195
  ### Parameters
194
196
 
195
- | Name | Type | Description | Notes |
196
- | ---- | ---- | ----------- | ----- |
197
- | **v1_aliases_post_request** | [**V1AliasesPostRequest**](V1AliasesPostRequest.md) | | |
197
+ This endpoint does not need any parameter.
198
198
 
199
199
  ### Return type
200
200
 
201
- [**ModelAlias**](ModelAlias.md)
201
+ [**ListAliases200Response**](ListAliases200Response.md)
202
202
 
203
203
  ### Authorization
204
204
 
@@ -206,6 +206,6 @@ end
206
206
 
207
207
  ### HTTP request headers
208
208
 
209
- - **Content-Type**: application/json
209
+ - **Content-Type**: Not defined
210
210
  - **Accept**: application/json, application/problem+json
211
211