mailslurp_client 17.3.0 → 17.5.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.
- checksums.yaml +4 -4
- data/lib/mailslurp_client/api/attachment_controller_api.rb +5 -5
- data/lib/mailslurp_client/api/email_controller_api.rb +2 -2
- data/lib/mailslurp_client/api/email_verification_controller_api.rb +64 -0
- data/lib/mailslurp_client/api/inbox_controller_api.rb +229 -0
- data/lib/mailslurp_client/api/phone_controller_api.rb +334 -0
- data/lib/mailslurp_client/models/alias_projection.rb +29 -29
- data/lib/mailslurp_client/models/alias_thread_projection.rb +16 -16
- data/lib/mailslurp_client/models/attachment_projection.rb +15 -15
- data/lib/mailslurp_client/models/bounce_recipient_projection.rb +15 -15
- data/lib/mailslurp_client/models/connector_event_projection.rb +30 -30
- data/lib/mailslurp_client/models/connector_projection.rb +10 -10
- data/lib/mailslurp_client/models/contact_projection.rb +15 -15
- data/lib/mailslurp_client/models/create_inbox_forwarder_options.rb +58 -29
- data/lib/mailslurp_client/models/create_inbox_replier_options.rb +39 -33
- data/lib/mailslurp_client/models/create_phone_number_options.rb +39 -6
- data/lib/mailslurp_client/models/email_intelligence_list_result.rb +285 -0
- data/lib/mailslurp_client/models/email_intelligence_options.rb +308 -0
- data/lib/mailslurp_client/models/email_intelligence_result_dto.rb +256 -0
- data/lib/mailslurp_client/models/email_intelligence_score_breakdown_dto.rb +296 -0
- data/lib/mailslurp_client/models/email_intelligence_signals_dto.rb +352 -0
- data/lib/mailslurp_client/models/email_intelligence_tests_options.rb +253 -0
- data/lib/mailslurp_client/models/email_thread_projection.rb +16 -16
- data/lib/mailslurp_client/models/entity_favourite_item_projection.rb +13 -13
- data/lib/mailslurp_client/models/expired_inbox_record_projection.rb +15 -15
- data/lib/mailslurp_client/models/extract_attachment_text_options.rb +1 -1
- data/lib/mailslurp_client/models/extract_attachment_text_result.rb +1 -1
- data/lib/mailslurp_client/models/group_projection.rb +14 -14
- data/lib/mailslurp_client/models/guest_portal_user_projection.rb +24 -24
- data/lib/mailslurp_client/models/import_email_options.rb +269 -0
- data/lib/mailslurp_client/models/inbox_automation_match_option.rb +308 -0
- data/lib/mailslurp_client/models/inbox_automation_match_options.rb +273 -0
- data/lib/mailslurp_client/models/inbox_forwarder_dto.rb +65 -17
- data/lib/mailslurp_client/models/inbox_forwarder_event_projection.rb +16 -16
- data/lib/mailslurp_client/models/inbox_forwarder_test_options.rb +17 -9
- data/lib/mailslurp_client/models/inbox_replier_dto.rb +41 -16
- data/lib/mailslurp_client/models/inbox_replier_event_projection.rb +16 -16
- data/lib/mailslurp_client/models/inline_object.rb +12 -58
- data/lib/mailslurp_client/models/inline_object1.rb +58 -12
- data/lib/mailslurp_client/models/inline_object2.rb +211 -0
- data/lib/mailslurp_client/models/opt_in_identity_projection.rb +18 -18
- data/lib/mailslurp_client/models/page_ai_transform_mapping_projection.rb +15 -15
- data/lib/mailslurp_client/models/page_ai_transform_projection.rb +15 -15
- data/lib/mailslurp_client/models/page_ai_transform_result_projection.rb +15 -15
- data/lib/mailslurp_client/models/page_alias.rb +15 -15
- data/lib/mailslurp_client/models/page_alias_thread_projection.rb +15 -15
- data/lib/mailslurp_client/models/page_attachment_entity.rb +15 -15
- data/lib/mailslurp_client/models/page_bounced_email.rb +15 -15
- data/lib/mailslurp_client/models/page_bounced_recipients.rb +15 -15
- data/lib/mailslurp_client/models/page_complaint.rb +15 -15
- data/lib/mailslurp_client/models/page_connector.rb +15 -15
- data/lib/mailslurp_client/models/page_connector_events.rb +15 -15
- data/lib/mailslurp_client/models/page_contact_projection.rb +15 -15
- data/lib/mailslurp_client/models/page_delivery_status.rb +15 -15
- data/lib/mailslurp_client/models/page_device_preview_run_projection.rb +15 -15
- data/lib/mailslurp_client/models/page_email_preview.rb +15 -15
- data/lib/mailslurp_client/models/page_email_projection.rb +15 -15
- data/lib/mailslurp_client/models/page_email_thread_projection.rb +15 -15
- data/lib/mailslurp_client/models/page_email_validation_request.rb +15 -15
- data/lib/mailslurp_client/models/page_entity_automation_items.rb +15 -15
- data/lib/mailslurp_client/models/page_entity_event_items.rb +15 -15
- data/lib/mailslurp_client/models/page_entity_favourite_items.rb +15 -15
- data/lib/mailslurp_client/models/page_expired_inbox_record_projection.rb +15 -15
- data/lib/mailslurp_client/models/page_group_projection.rb +15 -15
- data/lib/mailslurp_client/models/page_guest_portal_users.rb +15 -15
- data/lib/mailslurp_client/models/page_inbox_forwarder_dto.rb +15 -15
- data/lib/mailslurp_client/models/page_inbox_forwarder_events.rb +15 -15
- data/lib/mailslurp_client/models/page_inbox_projection.rb +15 -15
- data/lib/mailslurp_client/models/page_inbox_replier_dto.rb +15 -15
- data/lib/mailslurp_client/models/page_inbox_replier_events.rb +15 -15
- data/lib/mailslurp_client/models/page_inbox_tags.rb +15 -15
- data/lib/mailslurp_client/models/page_list_unsubscribe_recipients.rb +15 -15
- data/lib/mailslurp_client/models/page_missed_email_projection.rb +15 -15
- data/lib/mailslurp_client/models/page_missed_sms_projection.rb +15 -15
- data/lib/mailslurp_client/models/page_opt_in_identity_projection.rb +15 -15
- data/lib/mailslurp_client/models/page_organization_inbox_projection.rb +15 -15
- data/lib/mailslurp_client/models/page_phone_message_thread_item_projection.rb +15 -15
- data/lib/mailslurp_client/models/page_phone_message_thread_projection.rb +15 -15
- data/lib/mailslurp_client/models/page_phone_number_projection.rb +15 -15
- data/lib/mailslurp_client/models/page_phone_number_release_projection.rb +15 -15
- data/lib/mailslurp_client/models/page_plus_address_projection.rb +15 -15
- data/lib/mailslurp_client/models/page_reputation_items.rb +15 -15
- data/lib/mailslurp_client/models/page_ruleset_dto.rb +15 -15
- data/lib/mailslurp_client/models/page_scheduled_jobs.rb +15 -15
- data/lib/mailslurp_client/models/page_sent_email_projection.rb +15 -15
- data/lib/mailslurp_client/models/page_sent_email_with_queue_projection.rb +15 -15
- data/lib/mailslurp_client/models/page_sent_sms_projection.rb +15 -15
- data/lib/mailslurp_client/models/page_sms_projection.rb +15 -15
- data/lib/mailslurp_client/models/page_template_projection.rb +15 -15
- data/lib/mailslurp_client/models/page_tracking_pixel_projection.rb +15 -15
- data/lib/mailslurp_client/models/page_unknown_missed_email_projection.rb +15 -15
- data/lib/mailslurp_client/models/page_webhook_endpoint_projection.rb +15 -15
- data/lib/mailslurp_client/models/page_webhook_projection.rb +15 -15
- data/lib/mailslurp_client/models/page_webhook_result.rb +15 -15
- data/lib/mailslurp_client/models/phone_message_thread_item_projection.rb +15 -15
- data/lib/mailslurp_client/models/phone_number_dto.rb +17 -1
- data/lib/mailslurp_client/models/phone_number_tags_options.rb +213 -0
- data/lib/mailslurp_client/models/plus_address_projection.rb +15 -15
- data/lib/mailslurp_client/models/reputation_item_projection.rb +13 -13
- data/lib/mailslurp_client/models/sort_object.rb +13 -13
- data/lib/mailslurp_client/models/template_projection.rb +15 -15
- data/lib/mailslurp_client/models/update_inbox_replier_options.rb +39 -33
- data/lib/mailslurp_client/models/webhook_projection.rb +15 -15
- data/lib/mailslurp_client/version.rb +1 -1
- data/lib/mailslurp_client.rb +11 -0
- metadata +13 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e9cca68a03c98f464c456e6bab679226c2d87d1ed04efa21c023422f10e9d825
|
|
4
|
+
data.tar.gz: 148d1bfca643531243d255b568f26022fe92291330ffe9e73cb798c9bdd3829a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 43a1215d6bc320b20ebfbf1730520837c38a6143962d583340e642a779df399b453ff07071052d564b20fbbc41b5dce04ea92869d53e6fb7b38354bfb2122f27
|
|
7
|
+
data.tar.gz: 45a032773c98df0c3d15f6bf752282c0e2f8fbd9028c613b30a1757530ba82f74e848a07aeba214508220d0511b0092e3dbb6564f1b03f7a9dcfc194bb8f3c13
|
|
@@ -258,7 +258,7 @@ module MailSlurpClient
|
|
|
258
258
|
end
|
|
259
259
|
|
|
260
260
|
# Extract text from an attachment
|
|
261
|
-
# Extract text content from an attachment using the requested method. `NATIVE` decoding
|
|
261
|
+
# Extract text content from an attachment using the requested method. `NATIVE` decoding supports text-like files, common Word and spreadsheet documents, and PDFs with embedded text.
|
|
262
262
|
# @param attachment_id [String] ID of attachment
|
|
263
263
|
# @param [Hash] opts the optional parameters
|
|
264
264
|
# @option opts [ExtractAttachmentTextOptions] :extract_attachment_text_options
|
|
@@ -269,7 +269,7 @@ module MailSlurpClient
|
|
|
269
269
|
end
|
|
270
270
|
|
|
271
271
|
# Extract text from an attachment
|
|
272
|
-
# Extract text content from an attachment using the requested method. `NATIVE` decoding
|
|
272
|
+
# Extract text content from an attachment using the requested method. `NATIVE` decoding supports text-like files, common Word and spreadsheet documents, and PDFs with embedded text.
|
|
273
273
|
# @param attachment_id [String] ID of attachment
|
|
274
274
|
# @param [Hash] opts the optional parameters
|
|
275
275
|
# @option opts [ExtractAttachmentTextOptions] :extract_attachment_text_options
|
|
@@ -678,7 +678,7 @@ module MailSlurpClient
|
|
|
678
678
|
# @option opts [String] :x_filename Optional filename header of attachment
|
|
679
679
|
# @option opts [String] :x_filename_raw Optional raw filename header of attachment that will be converted to punycode
|
|
680
680
|
# @option opts [Integer] :x_filesize Optional content size of attachment
|
|
681
|
-
# @option opts [
|
|
681
|
+
# @option opts [InlineObject2] :inline_object2
|
|
682
682
|
# @return [Array<String>]
|
|
683
683
|
def upload_multipart_form(opts = {})
|
|
684
684
|
data, _status_code, _headers = upload_multipart_form_with_http_info(opts)
|
|
@@ -694,7 +694,7 @@ module MailSlurpClient
|
|
|
694
694
|
# @option opts [String] :x_filename Optional filename header of attachment
|
|
695
695
|
# @option opts [String] :x_filename_raw Optional raw filename header of attachment that will be converted to punycode
|
|
696
696
|
# @option opts [Integer] :x_filesize Optional content size of attachment
|
|
697
|
-
# @option opts [
|
|
697
|
+
# @option opts [InlineObject2] :inline_object2
|
|
698
698
|
# @return [Array<(Array<String>, Integer, Hash)>] Array<String> data, response status code and response headers
|
|
699
699
|
def upload_multipart_form_with_http_info(opts = {})
|
|
700
700
|
if @api_client.config.debugging
|
|
@@ -724,7 +724,7 @@ module MailSlurpClient
|
|
|
724
724
|
form_params = opts[:form_params] || {}
|
|
725
725
|
|
|
726
726
|
# http body (model)
|
|
727
|
-
post_body = opts[:body] || @api_client.object_to_http_body(opts[:'
|
|
727
|
+
post_body = opts[:body] || @api_client.object_to_http_body(opts[:'inline_object2'])
|
|
728
728
|
|
|
729
729
|
# return_type
|
|
730
730
|
return_type = opts[:return_type] || 'Array<String>'
|
|
@@ -1112,7 +1112,7 @@ module MailSlurpClient
|
|
|
1112
1112
|
end
|
|
1113
1113
|
|
|
1114
1114
|
# Extract verification codes from an email
|
|
1115
|
-
# Extracts one-time passcodes and similar tokens from email content
|
|
1115
|
+
# Extracts one-time passcodes and similar tokens from email content using the selected extraction method and fallback options.
|
|
1116
1116
|
# @param email_id [String] ID of email to extract codes from
|
|
1117
1117
|
# @param [Hash] opts the optional parameters
|
|
1118
1118
|
# @option opts [ExtractCodesOptions] :extract_codes_options
|
|
@@ -1123,7 +1123,7 @@ module MailSlurpClient
|
|
|
1123
1123
|
end
|
|
1124
1124
|
|
|
1125
1125
|
# Extract verification codes from an email
|
|
1126
|
-
# Extracts one-time passcodes and similar tokens from email content
|
|
1126
|
+
# Extracts one-time passcodes and similar tokens from email content using the selected extraction method and fallback options.
|
|
1127
1127
|
# @param email_id [String] ID of email to extract codes from
|
|
1128
1128
|
# @param [Hash] opts the optional parameters
|
|
1129
1129
|
# @option opts [ExtractCodesOptions] :extract_codes_options
|
|
@@ -133,6 +133,70 @@ module MailSlurpClient
|
|
|
133
133
|
return data, status_code, headers
|
|
134
134
|
end
|
|
135
135
|
|
|
136
|
+
# Get intelligence score and breakdown for email/domain targets. Per unit billing for non-cached evaluations.
|
|
137
|
+
# Run email intelligence scoring for one or more email addresses or domains. Submitting a single target in the list supports one-off checks.
|
|
138
|
+
# @param email_intelligence_options [EmailIntelligenceOptions]
|
|
139
|
+
# @param [Hash] opts the optional parameters
|
|
140
|
+
# @return [EmailIntelligenceListResult]
|
|
141
|
+
def get_email_intelligence(email_intelligence_options, opts = {})
|
|
142
|
+
data, _status_code, _headers = get_email_intelligence_with_http_info(email_intelligence_options, opts)
|
|
143
|
+
data
|
|
144
|
+
end
|
|
145
|
+
|
|
146
|
+
# Get intelligence score and breakdown for email/domain targets. Per unit billing for non-cached evaluations.
|
|
147
|
+
# Run email intelligence scoring for one or more email addresses or domains. Submitting a single target in the list supports one-off checks.
|
|
148
|
+
# @param email_intelligence_options [EmailIntelligenceOptions]
|
|
149
|
+
# @param [Hash] opts the optional parameters
|
|
150
|
+
# @return [Array<(EmailIntelligenceListResult, Integer, Hash)>] EmailIntelligenceListResult data, response status code and response headers
|
|
151
|
+
def get_email_intelligence_with_http_info(email_intelligence_options, opts = {})
|
|
152
|
+
if @api_client.config.debugging
|
|
153
|
+
@api_client.config.logger.debug 'Calling API: EmailVerificationControllerApi.get_email_intelligence ...'
|
|
154
|
+
end
|
|
155
|
+
# verify the required parameter 'email_intelligence_options' is set
|
|
156
|
+
if @api_client.config.client_side_validation && email_intelligence_options.nil?
|
|
157
|
+
fail ArgumentError, "Missing the required parameter 'email_intelligence_options' when calling EmailVerificationControllerApi.get_email_intelligence"
|
|
158
|
+
end
|
|
159
|
+
# resource path
|
|
160
|
+
local_var_path = '/email-verification/intelligence'
|
|
161
|
+
|
|
162
|
+
# query parameters
|
|
163
|
+
query_params = opts[:query_params] || {}
|
|
164
|
+
|
|
165
|
+
# header parameters
|
|
166
|
+
header_params = opts[:header_params] || {}
|
|
167
|
+
# HTTP header 'Accept' (if needed)
|
|
168
|
+
header_params['Accept'] = @api_client.select_header_accept(['*/*'])
|
|
169
|
+
# HTTP header 'Content-Type'
|
|
170
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
171
|
+
|
|
172
|
+
# form parameters
|
|
173
|
+
form_params = opts[:form_params] || {}
|
|
174
|
+
|
|
175
|
+
# http body (model)
|
|
176
|
+
post_body = opts[:body] || @api_client.object_to_http_body(email_intelligence_options)
|
|
177
|
+
|
|
178
|
+
# return_type
|
|
179
|
+
return_type = opts[:return_type] || 'EmailIntelligenceListResult'
|
|
180
|
+
|
|
181
|
+
# auth_names
|
|
182
|
+
auth_names = opts[:auth_names] || ['API_KEY']
|
|
183
|
+
|
|
184
|
+
new_options = opts.merge(
|
|
185
|
+
:header_params => header_params,
|
|
186
|
+
:query_params => query_params,
|
|
187
|
+
:form_params => form_params,
|
|
188
|
+
:body => post_body,
|
|
189
|
+
:auth_names => auth_names,
|
|
190
|
+
:return_type => return_type
|
|
191
|
+
)
|
|
192
|
+
|
|
193
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
194
|
+
if @api_client.config.debugging
|
|
195
|
+
@api_client.config.logger.debug "API called: EmailVerificationControllerApi#get_email_intelligence\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
196
|
+
end
|
|
197
|
+
return data, status_code, headers
|
|
198
|
+
end
|
|
199
|
+
|
|
136
200
|
# Validate a list of email addresses. Per unit billing. See your plan for pricing.
|
|
137
201
|
# List email verification requests
|
|
138
202
|
# @param [Hash] opts the optional parameters
|
|
@@ -3530,6 +3530,235 @@ module MailSlurpClient
|
|
|
3530
3530
|
return data, status_code, headers
|
|
3531
3531
|
end
|
|
3532
3532
|
|
|
3533
|
+
# Import email into inbox from base64 MIME
|
|
3534
|
+
# Imports a raw RFC822/MIME email into the specified inbox regardless of the original `To` header. V1 accepts MIME-family formats such as `.eml`, `message/rfc822`, and raw MIME bytes only. Outlook `.msg`, `mbox`, and `maildir` are not supported in V1. By default MailSlurp rewrites the MIME `Message-ID` header to avoid imported message identity clashes. Set `runPipeline=true` to run the normal inbound receive pipeline after persistence.
|
|
3535
|
+
# @param inbox_id [String]
|
|
3536
|
+
# @param import_email_options [ImportEmailOptions]
|
|
3537
|
+
# @param [Hash] opts the optional parameters
|
|
3538
|
+
# @return [Email]
|
|
3539
|
+
def import_email_into_inbox(inbox_id, import_email_options, opts = {})
|
|
3540
|
+
data, _status_code, _headers = import_email_into_inbox_with_http_info(inbox_id, import_email_options, opts)
|
|
3541
|
+
data
|
|
3542
|
+
end
|
|
3543
|
+
|
|
3544
|
+
# Import email into inbox from base64 MIME
|
|
3545
|
+
# Imports a raw RFC822/MIME email into the specified inbox regardless of the original `To` header. V1 accepts MIME-family formats such as `.eml`, `message/rfc822`, and raw MIME bytes only. Outlook `.msg`, `mbox`, and `maildir` are not supported in V1. By default MailSlurp rewrites the MIME `Message-ID` header to avoid imported message identity clashes. Set `runPipeline=true` to run the normal inbound receive pipeline after persistence.
|
|
3546
|
+
# @param inbox_id [String]
|
|
3547
|
+
# @param import_email_options [ImportEmailOptions]
|
|
3548
|
+
# @param [Hash] opts the optional parameters
|
|
3549
|
+
# @return [Array<(Email, Integer, Hash)>] Email data, response status code and response headers
|
|
3550
|
+
def import_email_into_inbox_with_http_info(inbox_id, import_email_options, opts = {})
|
|
3551
|
+
if @api_client.config.debugging
|
|
3552
|
+
@api_client.config.logger.debug 'Calling API: InboxControllerApi.import_email_into_inbox ...'
|
|
3553
|
+
end
|
|
3554
|
+
# verify the required parameter 'inbox_id' is set
|
|
3555
|
+
if @api_client.config.client_side_validation && inbox_id.nil?
|
|
3556
|
+
fail ArgumentError, "Missing the required parameter 'inbox_id' when calling InboxControllerApi.import_email_into_inbox"
|
|
3557
|
+
end
|
|
3558
|
+
# verify the required parameter 'import_email_options' is set
|
|
3559
|
+
if @api_client.config.client_side_validation && import_email_options.nil?
|
|
3560
|
+
fail ArgumentError, "Missing the required parameter 'import_email_options' when calling InboxControllerApi.import_email_into_inbox"
|
|
3561
|
+
end
|
|
3562
|
+
# resource path
|
|
3563
|
+
local_var_path = '/inboxes/{inboxId}/emails/import'.sub('{' + 'inboxId' + '}', CGI.escape(inbox_id.to_s))
|
|
3564
|
+
|
|
3565
|
+
# query parameters
|
|
3566
|
+
query_params = opts[:query_params] || {}
|
|
3567
|
+
|
|
3568
|
+
# header parameters
|
|
3569
|
+
header_params = opts[:header_params] || {}
|
|
3570
|
+
# HTTP header 'Accept' (if needed)
|
|
3571
|
+
header_params['Accept'] = @api_client.select_header_accept(['*/*'])
|
|
3572
|
+
# HTTP header 'Content-Type'
|
|
3573
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
3574
|
+
|
|
3575
|
+
# form parameters
|
|
3576
|
+
form_params = opts[:form_params] || {}
|
|
3577
|
+
|
|
3578
|
+
# http body (model)
|
|
3579
|
+
post_body = opts[:body] || @api_client.object_to_http_body(import_email_options)
|
|
3580
|
+
|
|
3581
|
+
# return_type
|
|
3582
|
+
return_type = opts[:return_type] || 'Email'
|
|
3583
|
+
|
|
3584
|
+
# auth_names
|
|
3585
|
+
auth_names = opts[:auth_names] || ['API_KEY']
|
|
3586
|
+
|
|
3587
|
+
new_options = opts.merge(
|
|
3588
|
+
:header_params => header_params,
|
|
3589
|
+
:query_params => query_params,
|
|
3590
|
+
:form_params => form_params,
|
|
3591
|
+
:body => post_body,
|
|
3592
|
+
:auth_names => auth_names,
|
|
3593
|
+
:return_type => return_type
|
|
3594
|
+
)
|
|
3595
|
+
|
|
3596
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
3597
|
+
if @api_client.config.debugging
|
|
3598
|
+
@api_client.config.logger.debug "API called: InboxControllerApi#import_email_into_inbox\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
3599
|
+
end
|
|
3600
|
+
return data, status_code, headers
|
|
3601
|
+
end
|
|
3602
|
+
|
|
3603
|
+
# Import email into inbox from raw MIME bytes
|
|
3604
|
+
# Imports a raw RFC822/MIME email stream into the specified inbox regardless of the original `To` header. Supports `message/rfc822` and `application/octet-stream`. V1 does not support Outlook `.msg`, `mbox`, or `maildir`. By default MailSlurp rewrites the MIME `Message-ID` header to avoid imported message identity clashes.
|
|
3605
|
+
# @param inbox_id [String]
|
|
3606
|
+
# @param body [String]
|
|
3607
|
+
# @param [Hash] opts the optional parameters
|
|
3608
|
+
# @option opts [String] :external_id
|
|
3609
|
+
# @option opts [Boolean] :run_pipeline (default to false)
|
|
3610
|
+
# @option opts [Boolean] :override_message_id (default to true)
|
|
3611
|
+
# @return [Email]
|
|
3612
|
+
def import_email_into_inbox_bytes(inbox_id, body, opts = {})
|
|
3613
|
+
data, _status_code, _headers = import_email_into_inbox_bytes_with_http_info(inbox_id, body, opts)
|
|
3614
|
+
data
|
|
3615
|
+
end
|
|
3616
|
+
|
|
3617
|
+
# Import email into inbox from raw MIME bytes
|
|
3618
|
+
# Imports a raw RFC822/MIME email stream into the specified inbox regardless of the original `To` header. Supports `message/rfc822` and `application/octet-stream`. V1 does not support Outlook `.msg`, `mbox`, or `maildir`. By default MailSlurp rewrites the MIME `Message-ID` header to avoid imported message identity clashes.
|
|
3619
|
+
# @param inbox_id [String]
|
|
3620
|
+
# @param body [String]
|
|
3621
|
+
# @param [Hash] opts the optional parameters
|
|
3622
|
+
# @option opts [String] :external_id
|
|
3623
|
+
# @option opts [Boolean] :run_pipeline
|
|
3624
|
+
# @option opts [Boolean] :override_message_id
|
|
3625
|
+
# @return [Array<(Email, Integer, Hash)>] Email data, response status code and response headers
|
|
3626
|
+
def import_email_into_inbox_bytes_with_http_info(inbox_id, body, opts = {})
|
|
3627
|
+
if @api_client.config.debugging
|
|
3628
|
+
@api_client.config.logger.debug 'Calling API: InboxControllerApi.import_email_into_inbox_bytes ...'
|
|
3629
|
+
end
|
|
3630
|
+
# verify the required parameter 'inbox_id' is set
|
|
3631
|
+
if @api_client.config.client_side_validation && inbox_id.nil?
|
|
3632
|
+
fail ArgumentError, "Missing the required parameter 'inbox_id' when calling InboxControllerApi.import_email_into_inbox_bytes"
|
|
3633
|
+
end
|
|
3634
|
+
# verify the required parameter 'body' is set
|
|
3635
|
+
if @api_client.config.client_side_validation && body.nil?
|
|
3636
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling InboxControllerApi.import_email_into_inbox_bytes"
|
|
3637
|
+
end
|
|
3638
|
+
# resource path
|
|
3639
|
+
local_var_path = '/inboxes/{inboxId}/emails/import/raw'.sub('{' + 'inboxId' + '}', CGI.escape(inbox_id.to_s))
|
|
3640
|
+
|
|
3641
|
+
# query parameters
|
|
3642
|
+
query_params = opts[:query_params] || {}
|
|
3643
|
+
query_params[:'externalId'] = opts[:'external_id'] if !opts[:'external_id'].nil?
|
|
3644
|
+
query_params[:'runPipeline'] = opts[:'run_pipeline'] if !opts[:'run_pipeline'].nil?
|
|
3645
|
+
query_params[:'overrideMessageId'] = opts[:'override_message_id'] if !opts[:'override_message_id'].nil?
|
|
3646
|
+
|
|
3647
|
+
# header parameters
|
|
3648
|
+
header_params = opts[:header_params] || {}
|
|
3649
|
+
# HTTP header 'Accept' (if needed)
|
|
3650
|
+
header_params['Accept'] = @api_client.select_header_accept(['*/*'])
|
|
3651
|
+
# HTTP header 'Content-Type'
|
|
3652
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/octet-stream', 'message/rfc822'])
|
|
3653
|
+
|
|
3654
|
+
# form parameters
|
|
3655
|
+
form_params = opts[:form_params] || {}
|
|
3656
|
+
|
|
3657
|
+
# http body (model)
|
|
3658
|
+
post_body = opts[:body] || @api_client.object_to_http_body(body)
|
|
3659
|
+
|
|
3660
|
+
# return_type
|
|
3661
|
+
return_type = opts[:return_type] || 'Email'
|
|
3662
|
+
|
|
3663
|
+
# auth_names
|
|
3664
|
+
auth_names = opts[:auth_names] || ['API_KEY']
|
|
3665
|
+
|
|
3666
|
+
new_options = opts.merge(
|
|
3667
|
+
:header_params => header_params,
|
|
3668
|
+
:query_params => query_params,
|
|
3669
|
+
:form_params => form_params,
|
|
3670
|
+
:body => post_body,
|
|
3671
|
+
:auth_names => auth_names,
|
|
3672
|
+
:return_type => return_type
|
|
3673
|
+
)
|
|
3674
|
+
|
|
3675
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
3676
|
+
if @api_client.config.debugging
|
|
3677
|
+
@api_client.config.logger.debug "API called: InboxControllerApi#import_email_into_inbox_bytes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
3678
|
+
end
|
|
3679
|
+
return data, status_code, headers
|
|
3680
|
+
end
|
|
3681
|
+
|
|
3682
|
+
# Import email into inbox from multipart EML upload
|
|
3683
|
+
# Imports an uploaded RFC822/MIME file into the specified inbox regardless of the original `To` header. Intended for `.eml` uploads and other MIME-family raw email files. V1 does not support Outlook `.msg`, `mbox`, or `maildir`. By default MailSlurp rewrites the MIME `Message-ID` header to avoid imported message identity clashes.
|
|
3684
|
+
# @param inbox_id [String]
|
|
3685
|
+
# @param file [File]
|
|
3686
|
+
# @param [Hash] opts the optional parameters
|
|
3687
|
+
# @option opts [String] :external_id
|
|
3688
|
+
# @option opts [Boolean] :run_pipeline (default to false)
|
|
3689
|
+
# @option opts [Boolean] :override_message_id (default to true)
|
|
3690
|
+
# @return [Email]
|
|
3691
|
+
def import_email_into_inbox_multipart(inbox_id, file, opts = {})
|
|
3692
|
+
data, _status_code, _headers = import_email_into_inbox_multipart_with_http_info(inbox_id, file, opts)
|
|
3693
|
+
data
|
|
3694
|
+
end
|
|
3695
|
+
|
|
3696
|
+
# Import email into inbox from multipart EML upload
|
|
3697
|
+
# Imports an uploaded RFC822/MIME file into the specified inbox regardless of the original `To` header. Intended for `.eml` uploads and other MIME-family raw email files. V1 does not support Outlook `.msg`, `mbox`, or `maildir`. By default MailSlurp rewrites the MIME `Message-ID` header to avoid imported message identity clashes.
|
|
3698
|
+
# @param inbox_id [String]
|
|
3699
|
+
# @param file [File]
|
|
3700
|
+
# @param [Hash] opts the optional parameters
|
|
3701
|
+
# @option opts [String] :external_id
|
|
3702
|
+
# @option opts [Boolean] :run_pipeline
|
|
3703
|
+
# @option opts [Boolean] :override_message_id
|
|
3704
|
+
# @return [Array<(Email, Integer, Hash)>] Email data, response status code and response headers
|
|
3705
|
+
def import_email_into_inbox_multipart_with_http_info(inbox_id, file, opts = {})
|
|
3706
|
+
if @api_client.config.debugging
|
|
3707
|
+
@api_client.config.logger.debug 'Calling API: InboxControllerApi.import_email_into_inbox_multipart ...'
|
|
3708
|
+
end
|
|
3709
|
+
# verify the required parameter 'inbox_id' is set
|
|
3710
|
+
if @api_client.config.client_side_validation && inbox_id.nil?
|
|
3711
|
+
fail ArgumentError, "Missing the required parameter 'inbox_id' when calling InboxControllerApi.import_email_into_inbox_multipart"
|
|
3712
|
+
end
|
|
3713
|
+
# verify the required parameter 'file' is set
|
|
3714
|
+
if @api_client.config.client_side_validation && file.nil?
|
|
3715
|
+
fail ArgumentError, "Missing the required parameter 'file' when calling InboxControllerApi.import_email_into_inbox_multipart"
|
|
3716
|
+
end
|
|
3717
|
+
# resource path
|
|
3718
|
+
local_var_path = '/inboxes/{inboxId}/emails/import/multipart'.sub('{' + 'inboxId' + '}', CGI.escape(inbox_id.to_s))
|
|
3719
|
+
|
|
3720
|
+
# query parameters
|
|
3721
|
+
query_params = opts[:query_params] || {}
|
|
3722
|
+
query_params[:'externalId'] = opts[:'external_id'] if !opts[:'external_id'].nil?
|
|
3723
|
+
query_params[:'runPipeline'] = opts[:'run_pipeline'] if !opts[:'run_pipeline'].nil?
|
|
3724
|
+
query_params[:'overrideMessageId'] = opts[:'override_message_id'] if !opts[:'override_message_id'].nil?
|
|
3725
|
+
|
|
3726
|
+
# header parameters
|
|
3727
|
+
header_params = opts[:header_params] || {}
|
|
3728
|
+
# HTTP header 'Accept' (if needed)
|
|
3729
|
+
header_params['Accept'] = @api_client.select_header_accept(['*/*'])
|
|
3730
|
+
# HTTP header 'Content-Type'
|
|
3731
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
|
|
3732
|
+
|
|
3733
|
+
# form parameters
|
|
3734
|
+
form_params = opts[:form_params] || {}
|
|
3735
|
+
form_params['file'] = file
|
|
3736
|
+
|
|
3737
|
+
# http body (model)
|
|
3738
|
+
post_body = opts[:body]
|
|
3739
|
+
|
|
3740
|
+
# return_type
|
|
3741
|
+
return_type = opts[:return_type] || 'Email'
|
|
3742
|
+
|
|
3743
|
+
# auth_names
|
|
3744
|
+
auth_names = opts[:auth_names] || ['API_KEY']
|
|
3745
|
+
|
|
3746
|
+
new_options = opts.merge(
|
|
3747
|
+
:header_params => header_params,
|
|
3748
|
+
:query_params => query_params,
|
|
3749
|
+
:form_params => form_params,
|
|
3750
|
+
:body => post_body,
|
|
3751
|
+
:auth_names => auth_names,
|
|
3752
|
+
:return_type => return_type
|
|
3753
|
+
)
|
|
3754
|
+
|
|
3755
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
3756
|
+
if @api_client.config.debugging
|
|
3757
|
+
@api_client.config.logger.debug "API called: InboxControllerApi#import_email_into_inbox_multipart\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
3758
|
+
end
|
|
3759
|
+
return data, status_code, headers
|
|
3760
|
+
end
|
|
3761
|
+
|
|
3533
3762
|
# Is email address available
|
|
3534
3763
|
# Returns whether an email address is available
|
|
3535
3764
|
# @param email_address [String]
|