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.
- checksums.yaml +4 -4
- data/README.md +148 -119
- data/docs/AdminApi.md +33 -33
- data/docs/{V1AdminLoginPost200Response.md → AdminLogin200Response.md} +2 -2
- data/docs/{V1AdminLoginPostRequest.md → AdminLoginRequest.md} +2 -2
- data/docs/AdminsApi.md +76 -76
- data/docs/AgentSendResult.md +22 -0
- data/docs/AgentsApi.md +247 -247
- data/docs/AiApi.md +69 -69
- data/docs/AiConfig.md +26 -0
- data/docs/AiConfigUpdate.md +20 -0
- data/docs/AliasesApi.md +59 -59
- data/docs/Annotations.md +22 -0
- data/docs/ApiKeysApi.md +59 -59
- data/docs/Attachment.md +26 -0
- data/docs/Classification.md +24 -0
- data/docs/ContactLookup.md +26 -0
- data/docs/ContactLookupContact.md +28 -0
- data/docs/ContactLookupHistory.md +22 -0
- data/docs/CreateAiUnitsCheckout200Response.md +22 -0
- data/docs/{V1AliasesPostRequest.md → CreateAliasRequest.md} +2 -2
- data/docs/{V1ApiKeysPost201Response.md → CreateApiKey201Response.md} +2 -2
- data/docs/{V1ApiKeysPostRequest.md → CreateApiKeyRequest.md} +2 -2
- data/docs/{V1DomainsPostRequest.md → CreateDomainRequest.md} +2 -2
- data/docs/{V1MailboxesPostRequest.md → CreateMailboxRequest.md} +2 -2
- data/docs/{V1SuppressionsPostRequest.md → CreateSuppressionRequest.md} +2 -2
- data/docs/{V1WebhooksPostRequest.md → CreateWebhookRequest.md} +2 -2
- data/docs/DomainsApi.md +141 -141
- data/docs/Draft.md +44 -0
- data/docs/DraftList.md +18 -0
- data/docs/DraftResult.md +26 -0
- data/docs/DraftsApi.md +115 -115
- data/docs/{V1MailboxesEmailExportPost201Response.md → ExportMailbox201Response.md} +2 -2
- data/docs/{V1AdminMeGet200Response.md → GetCurrentAdmin200Response.md} +2 -2
- data/docs/{V1UsageGet200Response.md → GetUsage200Response.md} +2 -2
- data/docs/HealthApi.md +11 -11
- data/docs/{HealthzGet200Response.md → HealthCheck200Response.md} +2 -2
- data/docs/Inbox.md +24 -0
- data/docs/InboxList.md +18 -0
- data/docs/InjectionRisk.md +20 -0
- data/docs/{V1AdminsPostRequest.md → InviteAdminRequest.md} +2 -2
- data/docs/{V1AdminsGet200Response.md → ListAdmins200Response.md} +2 -2
- data/docs/{V1AliasesGet200Response.md → ListAliases200Response.md} +2 -2
- data/docs/{V1ApiKeysGet200Response.md → ListApiKeys200Response.md} +2 -2
- data/docs/{V1DomainsGet200Response.md → ListDomains200Response.md} +2 -2
- data/docs/{V1MailboxesGet200Response.md → ListMailboxes200Response.md} +2 -2
- data/docs/{V1MessagesGet200Response.md → ListMessages200Response.md} +2 -2
- data/docs/{V1SuppressionsGet200Response.md → ListSuppressions200Response.md} +2 -2
- data/docs/{V1TemplatesGet200Response.md → ListTemplates200Response.md} +2 -2
- data/docs/{V1VacationGet200Response.md → ListVacationResponders200Response.md} +2 -2
- data/docs/{V1WebhooksGet200Response.md → ListWebhooks200Response.md} +2 -2
- data/docs/MailboxGrant.md +20 -0
- data/docs/MailboxGrantList.md +18 -0
- data/docs/MailboxesApi.md +203 -203
- data/docs/MarkReadResult.md +18 -0
- data/docs/PolicyFlags.md +28 -0
- data/docs/SendApi.md +121 -121
- data/docs/{V1SendPost200Response.md → SendEmail200Response.md} +2 -2
- data/docs/{V1SendPost202Response.md → SendEmail202Response.md} +2 -2
- data/docs/{V1SendBatchPost200Response.md → SendEmailBatch200Response.md} +2 -2
- data/docs/{V1SendBatchPostRequest.md → SendEmailBatchRequest.md} +2 -2
- data/docs/{V1SendPostRequest.md → SendEmailRequest.md} +3 -3
- data/docs/{V1SendPostRequestAttachmentsInner.md → SendEmailRequestAttachmentsInner.md} +2 -2
- data/docs/SendMessage.md +1 -1
- data/docs/{V1MailboxesEmailVacationPutRequest.md → SetVacationResponderRequest.md} +2 -2
- data/docs/SignupApi.md +4 -4
- data/docs/SimulatedInbound.md +22 -0
- data/docs/{V1InboxesMailboxMessagesPostRequest.md → StartConversationRequest.md} +2 -2
- data/docs/SuppressionsApi.md +75 -75
- data/docs/TemplatesApi.md +67 -67
- data/docs/TenantApi.md +20 -20
- data/docs/TestApi.md +11 -11
- data/docs/Thread.md +22 -0
- data/docs/ThreadClassification.md +22 -0
- data/docs/ThreadList.md +20 -0
- data/docs/ThreadMessage.md +40 -0
- data/docs/ThreadMessageBody.md +42 -0
- data/docs/ThreadMessageBodyAllOfBody.md +22 -0
- data/docs/ThreadSummary.md +28 -0
- data/docs/{V1AdminsIdPatchRequest.md → UpdateAdminRequest.md} +2 -2
- data/docs/{V1MailboxesEmailPatchRequest.md → UpdateMailboxRequest.md} +2 -2
- data/docs/{V1WebhooksIdPatchRequest.md → UpdateWebhookRequest.md} +2 -2
- data/docs/WebhooksApi.md +63 -63
- data/docs/Whoami.md +24 -0
- data/lib/lockally/api/admin_api.rb +30 -30
- data/lib/lockally/api/admins_api.rb +89 -89
- data/lib/lockally/api/agents_api.rb +309 -309
- data/lib/lockally/api/ai_api.rb +69 -69
- data/lib/lockally/api/aliases_api.rb +64 -64
- data/lib/lockally/api/api_keys_api.rb +66 -66
- data/lib/lockally/api/domains_api.rb +147 -147
- data/lib/lockally/api/drafts_api.rb +140 -140
- data/lib/lockally/api/health_api.rb +9 -9
- data/lib/lockally/api/mailboxes_api.rb +233 -233
- data/lib/lockally/api/send_api.rb +146 -146
- data/lib/lockally/api/signup_api.rb +3 -3
- data/lib/lockally/api/suppressions_api.rb +87 -87
- data/lib/lockally/api/templates_api.rb +69 -69
- data/lib/lockally/api/tenant_api.rb +15 -15
- data/lib/lockally/api/test_api.rb +9 -9
- data/lib/lockally/api/webhooks_api.rb +73 -73
- data/lib/lockally/models/{v1_admin_login_post200_response.rb → admin_login200_response.rb} +3 -3
- data/lib/lockally/models/{v1_admin_login_post_request.rb → admin_login_request.rb} +3 -3
- data/lib/lockally/models/agent_send_result.rb +184 -0
- data/lib/lockally/models/ai_config.rb +242 -0
- data/lib/lockally/models/ai_config_update.rb +214 -0
- data/lib/lockally/models/annotations.rb +168 -0
- data/lib/lockally/models/attachment.rb +185 -0
- data/lib/lockally/models/classification.rb +211 -0
- data/lib/lockally/models/contact_lookup.rb +235 -0
- data/lib/lockally/models/contact_lookup_contact.rb +192 -0
- data/lib/lockally/models/contact_lookup_history.rb +166 -0
- data/lib/lockally/models/create_ai_units_checkout200_response.rb +199 -0
- data/lib/lockally/models/{v1_aliases_post_request.rb → create_alias_request.rb} +3 -3
- data/lib/lockally/models/{v1_api_keys_post201_response.rb → create_api_key201_response.rb} +3 -3
- data/lib/lockally/models/{v1_api_keys_post_request.rb → create_api_key_request.rb} +3 -3
- data/lib/lockally/models/{v1_domains_post_request.rb → create_domain_request.rb} +3 -3
- data/lib/lockally/models/{v1_mailboxes_post_request.rb → create_mailbox_request.rb} +3 -3
- data/lib/lockally/models/{v1_suppressions_post_request.rb → create_suppression_request.rb} +3 -3
- data/lib/lockally/models/{v1_webhooks_post_request.rb → create_webhook_request.rb} +3 -3
- data/lib/lockally/models/draft.rb +411 -0
- data/lib/lockally/models/draft_list.rb +166 -0
- data/lib/lockally/models/draft_result.rb +258 -0
- data/lib/lockally/models/{v1_mailboxes_email_export_post201_response.rb → export_mailbox201_response.rb} +3 -3
- data/lib/lockally/models/{v1_admin_me_get200_response.rb → get_current_admin200_response.rb} +3 -3
- data/lib/lockally/models/{v1_usage_get200_response.rb → get_usage200_response.rb} +3 -3
- data/lib/lockally/models/{healthz_get200_response.rb → health_check200_response.rb} +3 -3
- data/lib/lockally/models/inbox.rb +225 -0
- data/lib/lockally/models/inbox_list.rb +166 -0
- data/lib/lockally/models/injection_risk.rb +159 -0
- data/lib/lockally/models/{v1_admins_post_request.rb → invite_admin_request.rb} +3 -3
- data/lib/lockally/models/list_admins200_response.rb +166 -0
- data/lib/lockally/models/{v1_aliases_get200_response.rb → list_aliases200_response.rb} +3 -3
- data/lib/lockally/models/{v1_admins_get200_response.rb → list_api_keys200_response.rb} +4 -4
- data/lib/lockally/models/{v1_domains_get200_response.rb → list_domains200_response.rb} +3 -3
- data/lib/lockally/models/{v1_mailboxes_get200_response.rb → list_mailboxes200_response.rb} +3 -3
- data/lib/lockally/models/{v1_messages_get200_response.rb → list_messages200_response.rb} +3 -3
- data/lib/lockally/models/{v1_suppressions_get200_response.rb → list_suppressions200_response.rb} +3 -3
- data/lib/lockally/models/{v1_send_batch_post200_response.rb → list_templates200_response.rb} +4 -4
- data/lib/lockally/models/{v1_vacation_get200_response.rb → list_vacation_responders200_response.rb} +3 -3
- data/lib/lockally/models/{v1_api_keys_get200_response.rb → list_webhooks200_response.rb} +4 -4
- data/lib/lockally/models/mailbox_grant.rb +156 -0
- data/lib/lockally/models/mailbox_grant_list.rb +166 -0
- data/lib/lockally/models/mark_read_result.rb +147 -0
- data/lib/lockally/models/policy_flags.rb +197 -0
- data/lib/lockally/models/{v1_send_post200_response.rb → send_email200_response.rb} +3 -3
- data/lib/lockally/models/{v1_send_post202_response.rb → send_email202_response.rb} +3 -3
- data/lib/lockally/models/{v1_templates_get200_response.rb → send_email_batch200_response.rb} +4 -4
- data/lib/lockally/models/{v1_send_batch_post_request.rb → send_email_batch_request.rb} +3 -3
- data/lib/lockally/models/{v1_send_post_request.rb → send_email_request.rb} +4 -4
- data/lib/lockally/models/{v1_send_post_request_attachments_inner.rb → send_email_request_attachments_inner.rb} +3 -3
- data/lib/lockally/models/send_message.rb +1 -1
- data/lib/lockally/models/{v1_mailboxes_email_vacation_put_request.rb → set_vacation_responder_request.rb} +3 -3
- data/lib/lockally/models/simulated_inbound.rb +165 -0
- data/lib/lockally/models/{v1_inboxes_mailbox_messages_post_request.rb → start_conversation_request.rb} +3 -3
- data/lib/lockally/models/thread.rb +219 -0
- data/lib/lockally/models/thread_classification.rb +183 -0
- data/lib/lockally/models/thread_list.rb +192 -0
- data/lib/lockally/models/thread_message.rb +394 -0
- data/lib/lockally/models/thread_message_body.rb +410 -0
- data/lib/lockally/models/thread_message_body_all_of_body.rb +165 -0
- data/lib/lockally/models/thread_summary.rb +280 -0
- data/lib/lockally/models/{v1_admins_id_patch_request.rb → update_admin_request.rb} +3 -3
- data/lib/lockally/models/{v1_mailboxes_email_patch_request.rb → update_mailbox_request.rb} +3 -3
- data/lib/lockally/models/{v1_webhooks_id_patch_request.rb → update_webhook_request.rb} +3 -3
- data/lib/lockally/models/whoami.rb +177 -0
- data/lib/lockally/version.rb +1 -1
- data/lib/lockally.rb +64 -35
- data/spec/api/admin_api_spec.rb +9 -9
- data/spec/api/admins_api_spec.rb +22 -22
- data/spec/api/agents_api_spec.rb +78 -78
- data/spec/api/ai_api_spec.rb +22 -22
- data/spec/api/aliases_api_spec.rb +16 -16
- data/spec/api/api_keys_api_spec.rb +17 -17
- data/spec/api/domains_api_spec.rb +42 -42
- data/spec/api/drafts_api_spec.rb +38 -38
- data/spec/api/health_api_spec.rb +3 -3
- data/spec/api/mailboxes_api_spec.rb +61 -61
- data/spec/api/send_api_spec.rb +35 -35
- data/spec/api/signup_api_spec.rb +1 -1
- data/spec/api/suppressions_api_spec.rb +18 -18
- data/spec/api/templates_api_spec.rb +17 -17
- data/spec/api/tenant_api_spec.rb +5 -5
- data/spec/api/test_api_spec.rb +3 -3
- data/spec/api/webhooks_api_spec.rb +19 -19
- data/spec/models/{v1_admin_login_post200_response_spec.rb → admin_login200_response_spec.rb} +6 -6
- data/spec/models/{v1_admin_login_post_request_spec.rb → admin_login_request_spec.rb} +6 -6
- data/spec/models/agent_send_result_spec.rb +48 -0
- data/spec/models/ai_config_spec.rb +64 -0
- data/spec/models/ai_config_update_spec.rb +46 -0
- data/spec/models/annotations_spec.rb +48 -0
- data/spec/models/attachment_spec.rb +60 -0
- data/spec/models/classification_spec.rb +58 -0
- data/spec/models/contact_lookup_contact_spec.rb +66 -0
- data/spec/models/contact_lookup_history_spec.rb +48 -0
- data/spec/models/contact_lookup_spec.rb +60 -0
- data/spec/models/create_ai_units_checkout200_response_spec.rb +48 -0
- data/spec/models/{v1_aliases_post_request_spec.rb → create_alias_request_spec.rb} +6 -6
- data/spec/models/{v1_api_keys_post201_response_spec.rb → create_api_key201_response_spec.rb} +6 -6
- data/spec/models/{v1_api_keys_post_request_spec.rb → create_api_key_request_spec.rb} +6 -6
- data/spec/models/{v1_domains_post_request_spec.rb → create_domain_request_spec.rb} +6 -6
- data/spec/models/{v1_mailboxes_post_request_spec.rb → create_mailbox_request_spec.rb} +6 -6
- data/spec/models/{v1_suppressions_post_request_spec.rb → create_suppression_request_spec.rb} +6 -6
- data/spec/models/{v1_webhooks_post_request_spec.rb → create_webhook_request_spec.rb} +6 -6
- data/spec/models/draft_list_spec.rb +36 -0
- data/spec/models/draft_result_spec.rb +64 -0
- data/spec/models/draft_spec.rb +118 -0
- data/spec/models/{v1_mailboxes_email_export_post201_response_spec.rb → export_mailbox201_response_spec.rb} +6 -6
- data/spec/models/{v1_admin_me_get200_response_spec.rb → get_current_admin200_response_spec.rb} +6 -6
- data/spec/models/{v1_usage_get200_response_spec.rb → get_usage200_response_spec.rb} +6 -6
- data/spec/models/{healthz_get200_response_spec.rb → health_check200_response_spec.rb} +6 -6
- data/spec/models/inbox_list_spec.rb +36 -0
- data/spec/models/inbox_spec.rb +54 -0
- data/spec/models/injection_risk_spec.rb +42 -0
- data/spec/models/{v1_admins_post_request_spec.rb → invite_admin_request_spec.rb} +6 -6
- data/spec/models/{v1_aliases_get200_response_spec.rb → list_admins200_response_spec.rb} +6 -6
- data/spec/models/{v1_admins_get200_response_spec.rb → list_aliases200_response_spec.rb} +6 -6
- data/spec/models/{v1_api_keys_get200_response_spec.rb → list_api_keys200_response_spec.rb} +6 -6
- data/spec/models/list_domains200_response_spec.rb +36 -0
- data/spec/models/{v1_mailboxes_get200_response_spec.rb → list_mailboxes200_response_spec.rb} +6 -6
- data/spec/models/{v1_messages_get200_response_spec.rb → list_messages200_response_spec.rb} +6 -6
- data/spec/models/{v1_suppressions_get200_response_spec.rb → list_suppressions200_response_spec.rb} +6 -6
- data/spec/models/{v1_vacation_get200_response_spec.rb → list_templates200_response_spec.rb} +6 -6
- data/spec/models/list_vacation_responders200_response_spec.rb +36 -0
- data/spec/models/{v1_domains_get200_response_spec.rb → list_webhooks200_response_spec.rb} +6 -6
- data/spec/models/mailbox_grant_list_spec.rb +36 -0
- data/spec/models/mailbox_grant_spec.rb +42 -0
- data/spec/models/mark_read_result_spec.rb +36 -0
- data/spec/models/policy_flags_spec.rb +66 -0
- data/spec/models/{v1_send_post200_response_spec.rb → send_email200_response_spec.rb} +6 -6
- data/spec/models/{v1_send_post202_response_spec.rb → send_email202_response_spec.rb} +6 -6
- data/spec/models/{v1_templates_get200_response_spec.rb → send_email_batch200_response_spec.rb} +6 -6
- data/spec/models/{v1_send_batch_post_request_spec.rb → send_email_batch_request_spec.rb} +6 -6
- data/spec/models/{v1_send_post_request_attachments_inner_spec.rb → send_email_request_attachments_inner_spec.rb} +6 -6
- data/spec/models/{v1_send_post_request_spec.rb → send_email_request_spec.rb} +6 -6
- data/spec/models/{v1_mailboxes_email_vacation_put_request_spec.rb → set_vacation_responder_request_spec.rb} +6 -6
- data/spec/models/simulated_inbound_spec.rb +48 -0
- data/spec/models/{v1_inboxes_mailbox_messages_post_request_spec.rb → start_conversation_request_spec.rb} +6 -6
- data/spec/models/thread_classification_spec.rb +48 -0
- data/spec/models/thread_list_spec.rb +42 -0
- data/spec/models/thread_message_body_all_of_body_spec.rb +48 -0
- data/spec/models/thread_message_body_spec.rb +112 -0
- data/spec/models/thread_message_spec.rb +106 -0
- data/spec/models/thread_spec.rb +48 -0
- data/spec/models/thread_summary_spec.rb +70 -0
- data/spec/models/{v1_admins_id_patch_request_spec.rb → update_admin_request_spec.rb} +6 -6
- data/spec/models/{v1_mailboxes_email_patch_request_spec.rb → update_mailbox_request_spec.rb} +6 -6
- data/spec/models/{v1_webhooks_id_patch_request_spec.rb → update_webhook_request_spec.rb} +6 -6
- data/spec/models/whoami_spec.rb +54 -0
- metadata +258 -142
- data/lib/lockally/models/v1_webhooks_get200_response.rb +0 -166
- data/spec/models/v1_send_batch_post200_response_spec.rb +0 -36
- data/spec/models/v1_webhooks_get200_response_spec.rb +0 -36
data/spec/api/ai_api_spec.rb
CHANGED
|
@@ -32,47 +32,47 @@ describe 'AiApi' do
|
|
|
32
32
|
end
|
|
33
33
|
end
|
|
34
34
|
|
|
35
|
-
# unit tests for
|
|
36
|
-
#
|
|
37
|
-
#
|
|
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
|
-
# @
|
|
40
|
-
|
|
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
|
|
47
|
-
#
|
|
48
|
-
# Body: {\"
|
|
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 [
|
|
51
|
-
describe '
|
|
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
|
|
58
|
-
#
|
|
59
|
-
#
|
|
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 [
|
|
62
|
-
describe '
|
|
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
|
|
69
|
-
#
|
|
70
|
-
#
|
|
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
|
-
# @
|
|
74
|
-
|
|
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
|
|
36
|
-
#
|
|
37
|
-
#
|
|
38
|
-
# @param
|
|
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 [
|
|
41
|
-
describe '
|
|
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
|
|
48
|
-
#
|
|
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 [
|
|
51
|
-
describe '
|
|
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
|
|
58
|
-
#
|
|
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 [
|
|
63
|
-
describe '
|
|
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
|
|
36
|
-
#
|
|
37
|
-
#
|
|
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 [
|
|
40
|
-
describe '
|
|
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
|
|
47
|
-
#
|
|
48
|
-
#
|
|
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 [
|
|
52
|
-
describe '
|
|
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
|
|
59
|
-
#
|
|
60
|
-
#
|
|
61
|
-
# @param
|
|
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 [
|
|
64
|
-
describe '
|
|
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
|
|
36
|
-
#
|
|
37
|
-
#
|
|
38
|
-
# @param
|
|
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 [
|
|
41
|
-
describe '
|
|
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
|
|
48
|
-
#
|
|
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 [
|
|
52
|
-
describe '
|
|
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
|
|
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 '
|
|
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
|
|
71
|
-
#
|
|
72
|
-
#
|
|
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 '
|
|
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
|
|
83
|
-
#
|
|
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 [
|
|
88
|
-
describe '
|
|
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
|
|
95
|
-
#
|
|
96
|
-
#
|
|
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 '
|
|
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
|
|
107
|
-
#
|
|
108
|
-
#
|
|
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 [
|
|
112
|
-
describe '
|
|
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
|
|
119
|
-
#
|
|
120
|
-
#
|
|
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 [
|
|
123
|
-
describe '
|
|
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
|
|
130
|
-
#
|
|
131
|
-
#
|
|
132
|
-
# @param
|
|
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 [
|
|
135
|
-
describe '
|
|
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
|
data/spec/api/drafts_api_spec.rb
CHANGED
|
@@ -32,87 +32,87 @@ describe 'DraftsApi' do
|
|
|
32
32
|
end
|
|
33
33
|
end
|
|
34
34
|
|
|
35
|
-
# unit tests for
|
|
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 [
|
|
41
|
-
describe '
|
|
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
|
|
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 [
|
|
53
|
-
describe '
|
|
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
|
|
60
|
-
#
|
|
61
|
-
#
|
|
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 [
|
|
64
|
-
describe '
|
|
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
|
|
71
|
-
#
|
|
72
|
-
#
|
|
73
|
-
# @param
|
|
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 [
|
|
76
|
-
describe '
|
|
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
|
|
83
|
-
#
|
|
84
|
-
#
|
|
85
|
+
# unit tests for get_draft
|
|
86
|
+
# Get a draft
|
|
87
|
+
# @param draft_id
|
|
85
88
|
# @param [Hash] opts the optional parameters
|
|
86
|
-
# @
|
|
87
|
-
|
|
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
|
|
96
|
-
#
|
|
97
|
-
#
|
|
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
|
-
# @
|
|
102
|
-
|
|
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
|
|
109
|
-
#
|
|
110
|
-
#
|
|
111
|
-
# @param
|
|
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 [
|
|
115
|
-
describe '
|
|
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
|
data/spec/api/health_api_spec.rb
CHANGED
|
@@ -32,12 +32,12 @@ describe 'HealthApi' do
|
|
|
32
32
|
end
|
|
33
33
|
end
|
|
34
34
|
|
|
35
|
-
# unit tests for
|
|
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 [
|
|
40
|
-
describe '
|
|
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
|