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
|
@@ -19,59 +19,39 @@ module Lockally
|
|
|
19
19
|
def initialize(api_client = ApiClient.default)
|
|
20
20
|
@api_client = api_client
|
|
21
21
|
end
|
|
22
|
-
#
|
|
23
|
-
#
|
|
22
|
+
# Cancel a scheduled send
|
|
23
|
+
# Cancels a still-scheduled message (future queued_at). Already sending/sent → 409.
|
|
24
|
+
# @param id [String]
|
|
24
25
|
# @param [Hash] opts the optional parameters
|
|
25
|
-
# @
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
# @option opts [String] :cursor queued_at of the prior page boundary. Pass back the `next_cursor` returned by the previous call.
|
|
30
|
-
# @option opts [Integer] :limit (default to 50)
|
|
31
|
-
# @return [V1MessagesGet200Response]
|
|
32
|
-
def v1_messages_get(opts = {})
|
|
33
|
-
data, _status_code, _headers = v1_messages_get_with_http_info(opts)
|
|
34
|
-
data
|
|
26
|
+
# @return [nil]
|
|
27
|
+
def cancel_message(id, opts = {})
|
|
28
|
+
cancel_message_with_http_info(id, opts)
|
|
29
|
+
nil
|
|
35
30
|
end
|
|
36
31
|
|
|
37
|
-
#
|
|
38
|
-
#
|
|
32
|
+
# Cancel a scheduled send
|
|
33
|
+
# Cancels a still-scheduled message (future queued_at). Already sending/sent → 409.
|
|
34
|
+
# @param id [String]
|
|
39
35
|
# @param [Hash] opts the optional parameters
|
|
40
|
-
# @
|
|
41
|
-
|
|
42
|
-
# @option opts [String] :q Free-text search across subject + sender.
|
|
43
|
-
# @option opts [Time] :since Only messages queued at or after this RFC 3339 instant.
|
|
44
|
-
# @option opts [String] :cursor queued_at of the prior page boundary. Pass back the `next_cursor` returned by the previous call.
|
|
45
|
-
# @option opts [Integer] :limit (default to 50)
|
|
46
|
-
# @return [Array<(V1MessagesGet200Response, Integer, Hash)>] V1MessagesGet200Response data, response status code and response headers
|
|
47
|
-
def v1_messages_get_with_http_info(opts = {})
|
|
36
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
37
|
+
def cancel_message_with_http_info(id, opts = {})
|
|
48
38
|
if @api_client.config.debugging
|
|
49
|
-
@api_client.config.logger.debug 'Calling API: SendApi.
|
|
50
|
-
end
|
|
51
|
-
allowable_values = ["queued", "sending", "delivered", "bounced", "deferred", "complaint"]
|
|
52
|
-
if @api_client.config.client_side_validation && opts[:'status'] && !allowable_values.include?(opts[:'status'])
|
|
53
|
-
fail ArgumentError, "invalid value for \"status\", must be one of #{allowable_values}"
|
|
39
|
+
@api_client.config.logger.debug 'Calling API: SendApi.cancel_message ...'
|
|
54
40
|
end
|
|
55
|
-
|
|
56
|
-
|
|
41
|
+
# verify the required parameter 'id' is set
|
|
42
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
43
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling SendApi.cancel_message"
|
|
57
44
|
end
|
|
58
|
-
|
|
59
45
|
# resource path
|
|
60
|
-
local_var_path = '/v1/messages'
|
|
46
|
+
local_var_path = '/v1/messages/{id}'.sub('{id}', CGI.escape(id.to_s))
|
|
61
47
|
|
|
62
48
|
# query parameters
|
|
63
49
|
query_params = opts[:query_params] || {}
|
|
64
|
-
query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil?
|
|
65
|
-
query_params[:'sender'] = opts[:'sender'] if !opts[:'sender'].nil?
|
|
66
|
-
query_params[:'q'] = opts[:'q'] if !opts[:'q'].nil?
|
|
67
|
-
query_params[:'since'] = opts[:'since'] if !opts[:'since'].nil?
|
|
68
|
-
query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
|
|
69
|
-
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
70
50
|
|
|
71
51
|
# header parameters
|
|
72
52
|
header_params = opts[:header_params] || {}
|
|
73
53
|
# HTTP header 'Accept' (if needed)
|
|
74
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/
|
|
54
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/problem+json']) unless header_params['Accept']
|
|
75
55
|
|
|
76
56
|
# form parameters
|
|
77
57
|
form_params = opts[:form_params] || {}
|
|
@@ -80,13 +60,13 @@ module Lockally
|
|
|
80
60
|
post_body = opts[:debug_body]
|
|
81
61
|
|
|
82
62
|
# return_type
|
|
83
|
-
return_type = opts[:debug_return_type]
|
|
63
|
+
return_type = opts[:debug_return_type]
|
|
84
64
|
|
|
85
65
|
# auth_names
|
|
86
66
|
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
87
67
|
|
|
88
68
|
new_options = opts.merge(
|
|
89
|
-
:operation => :"SendApi.
|
|
69
|
+
:operation => :"SendApi.cancel_message",
|
|
90
70
|
:header_params => header_params,
|
|
91
71
|
:query_params => query_params,
|
|
92
72
|
:form_params => form_params,
|
|
@@ -95,35 +75,33 @@ module Lockally
|
|
|
95
75
|
:return_type => return_type
|
|
96
76
|
)
|
|
97
77
|
|
|
98
|
-
data, status_code, headers = @api_client.call_api(:
|
|
78
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
99
79
|
if @api_client.config.debugging
|
|
100
|
-
@api_client.config.logger.debug "API called: SendApi#
|
|
80
|
+
@api_client.config.logger.debug "API called: SendApi#cancel_message\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
101
81
|
end
|
|
102
82
|
return data, status_code, headers
|
|
103
83
|
end
|
|
104
84
|
|
|
105
|
-
#
|
|
106
|
-
# Cancels a still-scheduled message (future queued_at). Already sending/sent → 409.
|
|
85
|
+
# Get message status
|
|
107
86
|
# @param id [String]
|
|
108
87
|
# @param [Hash] opts the optional parameters
|
|
109
|
-
# @return [
|
|
110
|
-
def
|
|
111
|
-
|
|
112
|
-
|
|
88
|
+
# @return [MessageDetail]
|
|
89
|
+
def get_message(id, opts = {})
|
|
90
|
+
data, _status_code, _headers = get_message_with_http_info(id, opts)
|
|
91
|
+
data
|
|
113
92
|
end
|
|
114
93
|
|
|
115
|
-
#
|
|
116
|
-
# Cancels a still-scheduled message (future queued_at). Already sending/sent → 409.
|
|
94
|
+
# Get message status
|
|
117
95
|
# @param id [String]
|
|
118
96
|
# @param [Hash] opts the optional parameters
|
|
119
|
-
# @return [Array<(
|
|
120
|
-
def
|
|
97
|
+
# @return [Array<(MessageDetail, Integer, Hash)>] MessageDetail data, response status code and response headers
|
|
98
|
+
def get_message_with_http_info(id, opts = {})
|
|
121
99
|
if @api_client.config.debugging
|
|
122
|
-
@api_client.config.logger.debug 'Calling API: SendApi.
|
|
100
|
+
@api_client.config.logger.debug 'Calling API: SendApi.get_message ...'
|
|
123
101
|
end
|
|
124
102
|
# verify the required parameter 'id' is set
|
|
125
103
|
if @api_client.config.client_side_validation && id.nil?
|
|
126
|
-
fail ArgumentError, "Missing the required parameter 'id' when calling SendApi.
|
|
104
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling SendApi.get_message"
|
|
127
105
|
end
|
|
128
106
|
# resource path
|
|
129
107
|
local_var_path = '/v1/messages/{id}'.sub('{id}', CGI.escape(id.to_s))
|
|
@@ -134,7 +112,7 @@ module Lockally
|
|
|
134
112
|
# header parameters
|
|
135
113
|
header_params = opts[:header_params] || {}
|
|
136
114
|
# HTTP header 'Accept' (if needed)
|
|
137
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/problem+json']) unless header_params['Accept']
|
|
115
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json']) unless header_params['Accept']
|
|
138
116
|
|
|
139
117
|
# form parameters
|
|
140
118
|
form_params = opts[:form_params] || {}
|
|
@@ -143,13 +121,13 @@ module Lockally
|
|
|
143
121
|
post_body = opts[:debug_body]
|
|
144
122
|
|
|
145
123
|
# return_type
|
|
146
|
-
return_type = opts[:debug_return_type]
|
|
124
|
+
return_type = opts[:debug_return_type] || 'MessageDetail'
|
|
147
125
|
|
|
148
126
|
# auth_names
|
|
149
127
|
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
150
128
|
|
|
151
129
|
new_options = opts.merge(
|
|
152
|
-
:operation => :"SendApi.
|
|
130
|
+
:operation => :"SendApi.get_message",
|
|
153
131
|
:header_params => header_params,
|
|
154
132
|
:query_params => query_params,
|
|
155
133
|
:form_params => form_params,
|
|
@@ -158,39 +136,44 @@ module Lockally
|
|
|
158
136
|
:return_type => return_type
|
|
159
137
|
)
|
|
160
138
|
|
|
161
|
-
data, status_code, headers = @api_client.call_api(:
|
|
139
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
162
140
|
if @api_client.config.debugging
|
|
163
|
-
@api_client.config.logger.debug "API called: SendApi#
|
|
141
|
+
@api_client.config.logger.debug "API called: SendApi#get_message\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
164
142
|
end
|
|
165
143
|
return data, status_code, headers
|
|
166
144
|
end
|
|
167
145
|
|
|
168
|
-
#
|
|
169
|
-
#
|
|
146
|
+
# Aggregate delivery stats
|
|
147
|
+
# Counts by delivery outcome (delivered/bounced/deferred/complaint) plus rates over a window, from the delivery-event store. Privacy-first: this reflects what receiving servers reported, NOT whether a human opened the mail — Lockally does no open/click tracking.
|
|
170
148
|
# @param [Hash] opts the optional parameters
|
|
171
|
-
# @
|
|
172
|
-
|
|
173
|
-
|
|
149
|
+
# @option opts [Time] :from Window start (default 7 days ago).
|
|
150
|
+
# @option opts [Time] :to Window end (default now).
|
|
151
|
+
# @option opts [String] :domain Filter by sender domain.
|
|
152
|
+
# @return [MessageStats]
|
|
153
|
+
def get_message_stats(opts = {})
|
|
154
|
+
data, _status_code, _headers = get_message_stats_with_http_info(opts)
|
|
174
155
|
data
|
|
175
156
|
end
|
|
176
157
|
|
|
177
|
-
#
|
|
178
|
-
#
|
|
158
|
+
# Aggregate delivery stats
|
|
159
|
+
# Counts by delivery outcome (delivered/bounced/deferred/complaint) plus rates over a window, from the delivery-event store. Privacy-first: this reflects what receiving servers reported, NOT whether a human opened the mail — Lockally does no open/click tracking.
|
|
179
160
|
# @param [Hash] opts the optional parameters
|
|
180
|
-
# @
|
|
181
|
-
|
|
161
|
+
# @option opts [Time] :from Window start (default 7 days ago).
|
|
162
|
+
# @option opts [Time] :to Window end (default now).
|
|
163
|
+
# @option opts [String] :domain Filter by sender domain.
|
|
164
|
+
# @return [Array<(MessageStats, Integer, Hash)>] MessageStats data, response status code and response headers
|
|
165
|
+
def get_message_stats_with_http_info(opts = {})
|
|
182
166
|
if @api_client.config.debugging
|
|
183
|
-
@api_client.config.logger.debug 'Calling API: SendApi.
|
|
184
|
-
end
|
|
185
|
-
# verify the required parameter 'id' is set
|
|
186
|
-
if @api_client.config.client_side_validation && id.nil?
|
|
187
|
-
fail ArgumentError, "Missing the required parameter 'id' when calling SendApi.v1_messages_id_get"
|
|
167
|
+
@api_client.config.logger.debug 'Calling API: SendApi.get_message_stats ...'
|
|
188
168
|
end
|
|
189
169
|
# resource path
|
|
190
|
-
local_var_path = '/v1/messages/
|
|
170
|
+
local_var_path = '/v1/messages/stats'
|
|
191
171
|
|
|
192
172
|
# query parameters
|
|
193
173
|
query_params = opts[:query_params] || {}
|
|
174
|
+
query_params[:'from'] = opts[:'from'] if !opts[:'from'].nil?
|
|
175
|
+
query_params[:'to'] = opts[:'to'] if !opts[:'to'].nil?
|
|
176
|
+
query_params[:'domain'] = opts[:'domain'] if !opts[:'domain'].nil?
|
|
194
177
|
|
|
195
178
|
# header parameters
|
|
196
179
|
header_params = opts[:header_params] || {}
|
|
@@ -204,13 +187,13 @@ module Lockally
|
|
|
204
187
|
post_body = opts[:debug_body]
|
|
205
188
|
|
|
206
189
|
# return_type
|
|
207
|
-
return_type = opts[:debug_return_type] || '
|
|
190
|
+
return_type = opts[:debug_return_type] || 'MessageStats'
|
|
208
191
|
|
|
209
192
|
# auth_names
|
|
210
193
|
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
211
194
|
|
|
212
195
|
new_options = opts.merge(
|
|
213
|
-
:operation => :"SendApi.
|
|
196
|
+
:operation => :"SendApi.get_message_stats",
|
|
214
197
|
:header_params => header_params,
|
|
215
198
|
:query_params => query_params,
|
|
216
199
|
:form_params => form_params,
|
|
@@ -221,42 +204,59 @@ module Lockally
|
|
|
221
204
|
|
|
222
205
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
223
206
|
if @api_client.config.debugging
|
|
224
|
-
@api_client.config.logger.debug "API called: SendApi#
|
|
207
|
+
@api_client.config.logger.debug "API called: SendApi#get_message_stats\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
225
208
|
end
|
|
226
209
|
return data, status_code, headers
|
|
227
210
|
end
|
|
228
211
|
|
|
229
|
-
#
|
|
230
|
-
#
|
|
212
|
+
# List outbound messages
|
|
213
|
+
# Returns recent outbound messages for the calling tenant, sorted newest first. Backs the send-status pill in the SvelteKit /sends view and the outbound search box.
|
|
231
214
|
# @param [Hash] opts the optional parameters
|
|
232
|
-
# @option opts [
|
|
233
|
-
# @option opts [
|
|
234
|
-
# @option opts [String] :
|
|
235
|
-
# @
|
|
236
|
-
|
|
237
|
-
|
|
215
|
+
# @option opts [String] :status
|
|
216
|
+
# @option opts [String] :sender Exact match against the `from` mailbox.
|
|
217
|
+
# @option opts [String] :q Free-text search across subject + sender.
|
|
218
|
+
# @option opts [Time] :since Only messages queued at or after this RFC 3339 instant.
|
|
219
|
+
# @option opts [String] :cursor queued_at of the prior page boundary. Pass back the `next_cursor` returned by the previous call.
|
|
220
|
+
# @option opts [Integer] :limit (default to 50)
|
|
221
|
+
# @return [ListMessages200Response]
|
|
222
|
+
def list_messages(opts = {})
|
|
223
|
+
data, _status_code, _headers = list_messages_with_http_info(opts)
|
|
238
224
|
data
|
|
239
225
|
end
|
|
240
226
|
|
|
241
|
-
#
|
|
242
|
-
#
|
|
227
|
+
# List outbound messages
|
|
228
|
+
# Returns recent outbound messages for the calling tenant, sorted newest first. Backs the send-status pill in the SvelteKit /sends view and the outbound search box.
|
|
243
229
|
# @param [Hash] opts the optional parameters
|
|
244
|
-
# @option opts [
|
|
245
|
-
# @option opts [
|
|
246
|
-
# @option opts [String] :
|
|
247
|
-
# @
|
|
248
|
-
|
|
230
|
+
# @option opts [String] :status
|
|
231
|
+
# @option opts [String] :sender Exact match against the `from` mailbox.
|
|
232
|
+
# @option opts [String] :q Free-text search across subject + sender.
|
|
233
|
+
# @option opts [Time] :since Only messages queued at or after this RFC 3339 instant.
|
|
234
|
+
# @option opts [String] :cursor queued_at of the prior page boundary. Pass back the `next_cursor` returned by the previous call.
|
|
235
|
+
# @option opts [Integer] :limit (default to 50)
|
|
236
|
+
# @return [Array<(ListMessages200Response, Integer, Hash)>] ListMessages200Response data, response status code and response headers
|
|
237
|
+
def list_messages_with_http_info(opts = {})
|
|
249
238
|
if @api_client.config.debugging
|
|
250
|
-
@api_client.config.logger.debug 'Calling API: SendApi.
|
|
239
|
+
@api_client.config.logger.debug 'Calling API: SendApi.list_messages ...'
|
|
240
|
+
end
|
|
241
|
+
allowable_values = ["queued", "sending", "delivered", "bounced", "deferred", "complaint"]
|
|
242
|
+
if @api_client.config.client_side_validation && opts[:'status'] && !allowable_values.include?(opts[:'status'])
|
|
243
|
+
fail ArgumentError, "invalid value for \"status\", must be one of #{allowable_values}"
|
|
251
244
|
end
|
|
245
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 200
|
|
246
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling SendApi.list_messages, must be smaller than or equal to 200.'
|
|
247
|
+
end
|
|
248
|
+
|
|
252
249
|
# resource path
|
|
253
|
-
local_var_path = '/v1/messages
|
|
250
|
+
local_var_path = '/v1/messages'
|
|
254
251
|
|
|
255
252
|
# query parameters
|
|
256
253
|
query_params = opts[:query_params] || {}
|
|
257
|
-
query_params[:'
|
|
258
|
-
query_params[:'
|
|
259
|
-
query_params[:'
|
|
254
|
+
query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil?
|
|
255
|
+
query_params[:'sender'] = opts[:'sender'] if !opts[:'sender'].nil?
|
|
256
|
+
query_params[:'q'] = opts[:'q'] if !opts[:'q'].nil?
|
|
257
|
+
query_params[:'since'] = opts[:'since'] if !opts[:'since'].nil?
|
|
258
|
+
query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
|
|
259
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
260
260
|
|
|
261
261
|
# header parameters
|
|
262
262
|
header_params = opts[:header_params] || {}
|
|
@@ -270,13 +270,13 @@ module Lockally
|
|
|
270
270
|
post_body = opts[:debug_body]
|
|
271
271
|
|
|
272
272
|
# return_type
|
|
273
|
-
return_type = opts[:debug_return_type] || '
|
|
273
|
+
return_type = opts[:debug_return_type] || 'ListMessages200Response'
|
|
274
274
|
|
|
275
275
|
# auth_names
|
|
276
276
|
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
277
277
|
|
|
278
278
|
new_options = opts.merge(
|
|
279
|
-
:operation => :"SendApi.
|
|
279
|
+
:operation => :"SendApi.list_messages",
|
|
280
280
|
:header_params => header_params,
|
|
281
281
|
:query_params => query_params,
|
|
282
282
|
:form_params => form_params,
|
|
@@ -287,46 +287,46 @@ module Lockally
|
|
|
287
287
|
|
|
288
288
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
289
289
|
if @api_client.config.debugging
|
|
290
|
-
@api_client.config.logger.debug "API called: SendApi#
|
|
290
|
+
@api_client.config.logger.debug "API called: SendApi#list_messages\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
291
291
|
end
|
|
292
292
|
return data, status_code, headers
|
|
293
293
|
end
|
|
294
294
|
|
|
295
|
-
# Send
|
|
296
|
-
#
|
|
295
|
+
# Send an email
|
|
296
|
+
# Submits an email for delivery via lockally. Returns 202 immediately once the message is accepted into lockally's queue; the actual SMTP submission to the recipient is async. Track delivery via `GET /v1/messages/{id}` or webhook subscriptions for `delivery.delivered` / `delivery.bounced` / `delivery.complaint`. **Idempotency-Key required.** Per design L7 — any unique string per send, 24-hour dedupe window. Repeated calls with the same key return byte-exact the original response and do NOT create a duplicate message. **Sender authorisation.** `from` must be an address the calling tenant owns on a verified domain. A mailbox always qualifies. On business and combined accounts an **alias** qualifies too, so a send-only address such as `no-reply@` need not be a billed seat. An alias on an unverified domain, or one belonging to another account, is refused with `403`. A catch-all creates no aliases and so grants no sending rights. **Rate cap.** Per-tenant `rate_cap_per_min` (returned on `/v1/tenant`) is enforced — 429 with `Retry-After: 60` once tripped. **Recipient warning.** Over 25 total recipients (To+Cc+Bcc) sets a `warning` field in the response — large fan-outs queue noticeably at scale. Hard cap is 100/send. **Not every success is a 202.** Check the status code, not just the body. A `200` means nothing was queued: either every recipient was already suppressed, or the call used a test key and the send was simulated. Both are successes, and neither produces a real delivery. See the `200` response below. **Warm-up headers.** While the platform is in its outbound warm-up ramp, accepted sends carry `X-Warmup-Day`, `X-Warmup-Daily-Cap` and `X-Warmup-Used-Today`. They describe a platform-wide cap shared by every tenant, not your own allowance, and they disappear once the ramp finishes. Hitting the cap returns 429.
|
|
297
297
|
# @param idempotency_key [String]
|
|
298
|
-
# @param
|
|
298
|
+
# @param send_email_request [SendEmailRequest]
|
|
299
299
|
# @param [Hash] opts the optional parameters
|
|
300
|
-
# @return [
|
|
301
|
-
def
|
|
302
|
-
data, _status_code, _headers =
|
|
300
|
+
# @return [SendEmail200Response]
|
|
301
|
+
def send_email(idempotency_key, send_email_request, opts = {})
|
|
302
|
+
data, _status_code, _headers = send_email_with_http_info(idempotency_key, send_email_request, opts)
|
|
303
303
|
data
|
|
304
304
|
end
|
|
305
305
|
|
|
306
|
-
# Send
|
|
307
|
-
#
|
|
306
|
+
# Send an email
|
|
307
|
+
# Submits an email for delivery via lockally. Returns 202 immediately once the message is accepted into lockally's queue; the actual SMTP submission to the recipient is async. Track delivery via `GET /v1/messages/{id}` or webhook subscriptions for `delivery.delivered` / `delivery.bounced` / `delivery.complaint`. **Idempotency-Key required.** Per design L7 — any unique string per send, 24-hour dedupe window. Repeated calls with the same key return byte-exact the original response and do NOT create a duplicate message. **Sender authorisation.** `from` must be an address the calling tenant owns on a verified domain. A mailbox always qualifies. On business and combined accounts an **alias** qualifies too, so a send-only address such as `no-reply@` need not be a billed seat. An alias on an unverified domain, or one belonging to another account, is refused with `403`. A catch-all creates no aliases and so grants no sending rights. **Rate cap.** Per-tenant `rate_cap_per_min` (returned on `/v1/tenant`) is enforced — 429 with `Retry-After: 60` once tripped. **Recipient warning.** Over 25 total recipients (To+Cc+Bcc) sets a `warning` field in the response — large fan-outs queue noticeably at scale. Hard cap is 100/send. **Not every success is a 202.** Check the status code, not just the body. A `200` means nothing was queued: either every recipient was already suppressed, or the call used a test key and the send was simulated. Both are successes, and neither produces a real delivery. See the `200` response below. **Warm-up headers.** While the platform is in its outbound warm-up ramp, accepted sends carry `X-Warmup-Day`, `X-Warmup-Daily-Cap` and `X-Warmup-Used-Today`. They describe a platform-wide cap shared by every tenant, not your own allowance, and they disappear once the ramp finishes. Hitting the cap returns 429.
|
|
308
308
|
# @param idempotency_key [String]
|
|
309
|
-
# @param
|
|
309
|
+
# @param send_email_request [SendEmailRequest]
|
|
310
310
|
# @param [Hash] opts the optional parameters
|
|
311
|
-
# @return [Array<(
|
|
312
|
-
def
|
|
311
|
+
# @return [Array<(SendEmail200Response, Integer, Hash)>] SendEmail200Response data, response status code and response headers
|
|
312
|
+
def send_email_with_http_info(idempotency_key, send_email_request, opts = {})
|
|
313
313
|
if @api_client.config.debugging
|
|
314
|
-
@api_client.config.logger.debug 'Calling API: SendApi.
|
|
314
|
+
@api_client.config.logger.debug 'Calling API: SendApi.send_email ...'
|
|
315
315
|
end
|
|
316
316
|
# verify the required parameter 'idempotency_key' is set
|
|
317
317
|
if @api_client.config.client_side_validation && idempotency_key.nil?
|
|
318
|
-
fail ArgumentError, "Missing the required parameter 'idempotency_key' when calling SendApi.
|
|
318
|
+
fail ArgumentError, "Missing the required parameter 'idempotency_key' when calling SendApi.send_email"
|
|
319
319
|
end
|
|
320
|
-
if @api_client.config.client_side_validation && idempotency_key.to_s.length >
|
|
321
|
-
fail ArgumentError, 'invalid value for "idempotency_key" when calling SendApi.
|
|
320
|
+
if @api_client.config.client_side_validation && idempotency_key.to_s.length > 255
|
|
321
|
+
fail ArgumentError, 'invalid value for "idempotency_key" when calling SendApi.send_email, the character length must be smaller than or equal to 255.'
|
|
322
322
|
end
|
|
323
323
|
|
|
324
|
-
# verify the required parameter '
|
|
325
|
-
if @api_client.config.client_side_validation &&
|
|
326
|
-
fail ArgumentError, "Missing the required parameter '
|
|
324
|
+
# verify the required parameter 'send_email_request' is set
|
|
325
|
+
if @api_client.config.client_side_validation && send_email_request.nil?
|
|
326
|
+
fail ArgumentError, "Missing the required parameter 'send_email_request' when calling SendApi.send_email"
|
|
327
327
|
end
|
|
328
328
|
# resource path
|
|
329
|
-
local_var_path = '/v1/send
|
|
329
|
+
local_var_path = '/v1/send'
|
|
330
330
|
|
|
331
331
|
# query parameters
|
|
332
332
|
query_params = opts[:query_params] || {}
|
|
@@ -346,16 +346,16 @@ module Lockally
|
|
|
346
346
|
form_params = opts[:form_params] || {}
|
|
347
347
|
|
|
348
348
|
# http body (model)
|
|
349
|
-
post_body = opts[:debug_body] || @api_client.object_to_http_body(
|
|
349
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(send_email_request)
|
|
350
350
|
|
|
351
351
|
# return_type
|
|
352
|
-
return_type = opts[:debug_return_type] || '
|
|
352
|
+
return_type = opts[:debug_return_type] || 'SendEmail200Response'
|
|
353
353
|
|
|
354
354
|
# auth_names
|
|
355
355
|
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
356
356
|
|
|
357
357
|
new_options = opts.merge(
|
|
358
|
-
:operation => :"SendApi.
|
|
358
|
+
:operation => :"SendApi.send_email",
|
|
359
359
|
:header_params => header_params,
|
|
360
360
|
:query_params => query_params,
|
|
361
361
|
:form_params => form_params,
|
|
@@ -366,46 +366,46 @@ module Lockally
|
|
|
366
366
|
|
|
367
367
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
368
368
|
if @api_client.config.debugging
|
|
369
|
-
@api_client.config.logger.debug "API called: SendApi#
|
|
369
|
+
@api_client.config.logger.debug "API called: SendApi#send_email\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
370
370
|
end
|
|
371
371
|
return data, status_code, headers
|
|
372
372
|
end
|
|
373
373
|
|
|
374
|
-
# Send
|
|
375
|
-
#
|
|
374
|
+
# Send a batch of emails
|
|
375
|
+
# Sends up to 500 messages in one call. Each is validated and enqueued independently — a bad message fails only its own slot (partial success, HTTP 200). One `Idempotency-Key` header covers the batch; per-message keys are derived as `<key>:<index>`.
|
|
376
376
|
# @param idempotency_key [String]
|
|
377
|
-
# @param
|
|
377
|
+
# @param send_email_batch_request [SendEmailBatchRequest]
|
|
378
378
|
# @param [Hash] opts the optional parameters
|
|
379
|
-
# @return [
|
|
380
|
-
def
|
|
381
|
-
data, _status_code, _headers =
|
|
379
|
+
# @return [SendEmailBatch200Response]
|
|
380
|
+
def send_email_batch(idempotency_key, send_email_batch_request, opts = {})
|
|
381
|
+
data, _status_code, _headers = send_email_batch_with_http_info(idempotency_key, send_email_batch_request, opts)
|
|
382
382
|
data
|
|
383
383
|
end
|
|
384
384
|
|
|
385
|
-
# Send
|
|
386
|
-
#
|
|
385
|
+
# Send a batch of emails
|
|
386
|
+
# Sends up to 500 messages in one call. Each is validated and enqueued independently — a bad message fails only its own slot (partial success, HTTP 200). One `Idempotency-Key` header covers the batch; per-message keys are derived as `<key>:<index>`.
|
|
387
387
|
# @param idempotency_key [String]
|
|
388
|
-
# @param
|
|
388
|
+
# @param send_email_batch_request [SendEmailBatchRequest]
|
|
389
389
|
# @param [Hash] opts the optional parameters
|
|
390
|
-
# @return [Array<(
|
|
391
|
-
def
|
|
390
|
+
# @return [Array<(SendEmailBatch200Response, Integer, Hash)>] SendEmailBatch200Response data, response status code and response headers
|
|
391
|
+
def send_email_batch_with_http_info(idempotency_key, send_email_batch_request, opts = {})
|
|
392
392
|
if @api_client.config.debugging
|
|
393
|
-
@api_client.config.logger.debug 'Calling API: SendApi.
|
|
393
|
+
@api_client.config.logger.debug 'Calling API: SendApi.send_email_batch ...'
|
|
394
394
|
end
|
|
395
395
|
# verify the required parameter 'idempotency_key' is set
|
|
396
396
|
if @api_client.config.client_side_validation && idempotency_key.nil?
|
|
397
|
-
fail ArgumentError, "Missing the required parameter 'idempotency_key' when calling SendApi.
|
|
397
|
+
fail ArgumentError, "Missing the required parameter 'idempotency_key' when calling SendApi.send_email_batch"
|
|
398
398
|
end
|
|
399
|
-
if @api_client.config.client_side_validation && idempotency_key.to_s.length >
|
|
400
|
-
fail ArgumentError, 'invalid value for "idempotency_key" when calling SendApi.
|
|
399
|
+
if @api_client.config.client_side_validation && idempotency_key.to_s.length > 200
|
|
400
|
+
fail ArgumentError, 'invalid value for "idempotency_key" when calling SendApi.send_email_batch, the character length must be smaller than or equal to 200.'
|
|
401
401
|
end
|
|
402
402
|
|
|
403
|
-
# verify the required parameter '
|
|
404
|
-
if @api_client.config.client_side_validation &&
|
|
405
|
-
fail ArgumentError, "Missing the required parameter '
|
|
403
|
+
# verify the required parameter 'send_email_batch_request' is set
|
|
404
|
+
if @api_client.config.client_side_validation && send_email_batch_request.nil?
|
|
405
|
+
fail ArgumentError, "Missing the required parameter 'send_email_batch_request' when calling SendApi.send_email_batch"
|
|
406
406
|
end
|
|
407
407
|
# resource path
|
|
408
|
-
local_var_path = '/v1/send'
|
|
408
|
+
local_var_path = '/v1/send/batch'
|
|
409
409
|
|
|
410
410
|
# query parameters
|
|
411
411
|
query_params = opts[:query_params] || {}
|
|
@@ -425,16 +425,16 @@ module Lockally
|
|
|
425
425
|
form_params = opts[:form_params] || {}
|
|
426
426
|
|
|
427
427
|
# http body (model)
|
|
428
|
-
post_body = opts[:debug_body] || @api_client.object_to_http_body(
|
|
428
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(send_email_batch_request)
|
|
429
429
|
|
|
430
430
|
# return_type
|
|
431
|
-
return_type = opts[:debug_return_type] || '
|
|
431
|
+
return_type = opts[:debug_return_type] || 'SendEmailBatch200Response'
|
|
432
432
|
|
|
433
433
|
# auth_names
|
|
434
434
|
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
435
435
|
|
|
436
436
|
new_options = opts.merge(
|
|
437
|
-
:operation => :"SendApi.
|
|
437
|
+
:operation => :"SendApi.send_email_batch",
|
|
438
438
|
:header_params => header_params,
|
|
439
439
|
:query_params => query_params,
|
|
440
440
|
:form_params => form_params,
|
|
@@ -445,7 +445,7 @@ module Lockally
|
|
|
445
445
|
|
|
446
446
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
447
447
|
if @api_client.config.debugging
|
|
448
|
-
@api_client.config.logger.debug "API called: SendApi#
|
|
448
|
+
@api_client.config.logger.debug "API called: SendApi#send_email_batch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
449
449
|
end
|
|
450
450
|
return data, status_code, headers
|
|
451
451
|
end
|
|
@@ -22,7 +22,7 @@ module Lockally
|
|
|
22
22
|
# Sign up a new tenant
|
|
23
23
|
# @param signup_request [SignupRequest]
|
|
24
24
|
# @param [Hash] opts the optional parameters
|
|
25
|
-
# @return [
|
|
25
|
+
# @return [AdminLogin200Response]
|
|
26
26
|
def signup(signup_request, opts = {})
|
|
27
27
|
data, _status_code, _headers = signup_with_http_info(signup_request, opts)
|
|
28
28
|
data
|
|
@@ -31,7 +31,7 @@ module Lockally
|
|
|
31
31
|
# Sign up a new tenant
|
|
32
32
|
# @param signup_request [SignupRequest]
|
|
33
33
|
# @param [Hash] opts the optional parameters
|
|
34
|
-
# @return [Array<(
|
|
34
|
+
# @return [Array<(AdminLogin200Response, Integer, Hash)>] AdminLogin200Response data, response status code and response headers
|
|
35
35
|
def signup_with_http_info(signup_request, opts = {})
|
|
36
36
|
if @api_client.config.debugging
|
|
37
37
|
@api_client.config.logger.debug 'Calling API: SignupApi.signup ...'
|
|
@@ -63,7 +63,7 @@ module Lockally
|
|
|
63
63
|
post_body = opts[:debug_body] || @api_client.object_to_http_body(signup_request)
|
|
64
64
|
|
|
65
65
|
# return_type
|
|
66
|
-
return_type = opts[:debug_return_type] || '
|
|
66
|
+
return_type = opts[:debug_return_type] || 'AdminLogin200Response'
|
|
67
67
|
|
|
68
68
|
# auth_names
|
|
69
69
|
auth_names = opts[:debug_auth_names] || []
|