mailslurp_client 16.2.1 → 16.2.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (69) hide show
  1. checksums.yaml +4 -4
  2. data/lib/mailslurp_client/api/ai_controller_api.rb +193 -79
  3. data/lib/mailslurp_client/api/attachment_controller_api.rb +6 -3
  4. data/lib/mailslurp_client/api/email_controller_api.rb +3 -0
  5. data/lib/mailslurp_client/api/form_controller_api.rb +8 -9
  6. data/lib/mailslurp_client/api/inbox_controller_api.rb +28 -2
  7. data/lib/mailslurp_client/api/mfa_controller_api.rb +73 -9
  8. data/lib/mailslurp_client/api/sms_controller_api.rb +3 -0
  9. data/lib/mailslurp_client/api/webhook_controller_api.rb +63 -9
  10. data/lib/mailslurp_client/models/abstract_webhook_payload.rb +2 -2
  11. data/lib/mailslurp_client/models/{ai_tranform_create_options.rb → ai_transform_create_options.rb} +31 -7
  12. data/lib/mailslurp_client/models/ai_transform_dto.rb +1 -0
  13. data/lib/mailslurp_client/models/ai_transform_mapping_dto.rb +18 -9
  14. data/lib/mailslurp_client/models/ai_transform_mapping_projection.rb +15 -6
  15. data/lib/mailslurp_client/models/ai_transform_projection.rb +16 -1
  16. data/lib/mailslurp_client/models/ai_transform_result_dto.rb +5 -1
  17. data/lib/mailslurp_client/models/{ai_transform_result_projection.rb → ai_transform_result_projection_dto.rb} +56 -53
  18. data/lib/mailslurp_client/models/conditional_structured_content_result.rb +221 -0
  19. data/lib/mailslurp_client/models/create_ai_transformer_mapping_options.rb +5 -10
  20. data/lib/mailslurp_client/models/create_domain_options.rb +19 -0
  21. data/lib/mailslurp_client/models/create_inbox_forwarder_options.rb +19 -0
  22. data/lib/mailslurp_client/models/create_inbox_replier_options.rb +19 -0
  23. data/lib/mailslurp_client/models/create_inbox_ruleset_options.rb +2 -2
  24. data/lib/mailslurp_client/models/create_totp_device_base32_secret_key_options.rb +306 -0
  25. data/lib/mailslurp_client/models/create_totp_device_custom_options.rb +306 -0
  26. data/lib/mailslurp_client/models/create_totp_device_otp_auth_url_options.rb +35 -0
  27. data/lib/mailslurp_client/models/create_webhook_options.rb +2 -2
  28. data/lib/mailslurp_client/models/describe_domain_options.rb +19 -0
  29. data/lib/mailslurp_client/models/dns_lookup_options.rb +19 -0
  30. data/lib/mailslurp_client/models/email_projection.rb +11 -11
  31. data/lib/mailslurp_client/models/email_thread_projection.rb +10 -10
  32. data/lib/mailslurp_client/models/entity_automation_item_projection.rb +10 -10
  33. data/lib/mailslurp_client/models/expiration_defaults.rb +1 -0
  34. data/lib/mailslurp_client/models/fake_email_dto.rb +1 -0
  35. data/lib/mailslurp_client/models/generate_structured_content_attachment_options.rb +1 -0
  36. data/lib/mailslurp_client/models/generate_structured_content_email_options.rb +1 -0
  37. data/lib/mailslurp_client/models/generate_structured_content_sms_options.rb +1 -0
  38. data/lib/mailslurp_client/models/inbox_exists_dto.rb +26 -4
  39. data/lib/mailslurp_client/models/inbox_ruleset_dto.rb +2 -2
  40. data/lib/mailslurp_client/models/inline_object.rb +58 -12
  41. data/lib/mailslurp_client/models/inline_object1.rb +211 -0
  42. data/lib/mailslurp_client/models/invoke_transformer_options.rb +329 -0
  43. data/lib/mailslurp_client/models/match_option.rb +19 -0
  44. data/lib/mailslurp_client/models/missed_email_dto.rb +1 -0
  45. data/lib/mailslurp_client/models/page_ai_transform_result_projection.rb +1 -1
  46. data/lib/mailslurp_client/models/phone_message_thread_item_projection.rb +19 -19
  47. data/lib/mailslurp_client/models/phone_message_thread_projection.rb +0 -10
  48. data/lib/mailslurp_client/models/sent_email_projection.rb +15 -30
  49. data/lib/mailslurp_client/models/sms_match_option.rb +19 -0
  50. data/lib/mailslurp_client/models/sms_preview.rb +4 -0
  51. data/lib/mailslurp_client/models/structured_output_schema.rb +12 -9
  52. data/lib/mailslurp_client/models/update_inbox_replier_options.rb +19 -0
  53. data/lib/mailslurp_client/models/upload_attachment_options.rb +19 -0
  54. data/lib/mailslurp_client/models/webhook_bounce_payload.rb +2 -2
  55. data/lib/mailslurp_client/models/webhook_bounce_recipient_payload.rb +2 -2
  56. data/lib/mailslurp_client/models/webhook_delivery_status_payload.rb +2 -2
  57. data/lib/mailslurp_client/models/webhook_dto.rb +2 -2
  58. data/lib/mailslurp_client/models/webhook_email_opened_payload.rb +2 -2
  59. data/lib/mailslurp_client/models/webhook_email_read_payload.rb +2 -2
  60. data/lib/mailslurp_client/models/webhook_new_ai_transform_result_payload.rb +389 -0
  61. data/lib/mailslurp_client/models/webhook_new_attachment_payload.rb +2 -2
  62. data/lib/mailslurp_client/models/webhook_new_contact_payload.rb +2 -2
  63. data/lib/mailslurp_client/models/webhook_new_email_payload.rb +2 -2
  64. data/lib/mailslurp_client/models/webhook_new_sms_payload.rb +2 -2
  65. data/lib/mailslurp_client/models/webhook_projection.rb +2 -2
  66. data/lib/mailslurp_client/models/webhook_result_dto.rb +2 -2
  67. data/lib/mailslurp_client/version.rb +1 -1
  68. data/lib/mailslurp_client.rb +8 -2
  69. metadata +10 -4
@@ -19,28 +19,92 @@ module MailSlurpClient
19
19
  def initialize(api_client = ApiClient.default)
20
20
  @api_client = api_client
21
21
  end
22
+ # Create a TOTP device from an base32 secret key
23
+ # Create a virtual TOTP device for a given secret key. This is usually present as an alternative login option when pairing OTP devices.
24
+ # @param create_totp_device_base32_secret_key_options [CreateTotpDeviceBase32SecretKeyOptions]
25
+ # @param [Hash] opts the optional parameters
26
+ # @return [TotpDeviceDto]
27
+ def create_totp_device_for_base32_secret_key(create_totp_device_base32_secret_key_options, opts = {})
28
+ data, _status_code, _headers = create_totp_device_for_base32_secret_key_with_http_info(create_totp_device_base32_secret_key_options, opts)
29
+ data
30
+ end
31
+
32
+ # Create a TOTP device from an base32 secret key
33
+ # Create a virtual TOTP device for a given secret key. This is usually present as an alternative login option when pairing OTP devices.
34
+ # @param create_totp_device_base32_secret_key_options [CreateTotpDeviceBase32SecretKeyOptions]
35
+ # @param [Hash] opts the optional parameters
36
+ # @return [Array<(TotpDeviceDto, Integer, Hash)>] TotpDeviceDto data, response status code and response headers
37
+ def create_totp_device_for_base32_secret_key_with_http_info(create_totp_device_base32_secret_key_options, opts = {})
38
+ if @api_client.config.debugging
39
+ @api_client.config.logger.debug 'Calling API: MFAControllerApi.create_totp_device_for_base32_secret_key ...'
40
+ end
41
+ # verify the required parameter 'create_totp_device_base32_secret_key_options' is set
42
+ if @api_client.config.client_side_validation && create_totp_device_base32_secret_key_options.nil?
43
+ fail ArgumentError, "Missing the required parameter 'create_totp_device_base32_secret_key_options' when calling MFAControllerApi.create_totp_device_for_base32_secret_key"
44
+ end
45
+ # resource path
46
+ local_var_path = '/mfa/totp/device/base32SecretKey'
47
+
48
+ # query parameters
49
+ query_params = opts[:query_params] || {}
50
+
51
+ # header parameters
52
+ header_params = opts[:header_params] || {}
53
+ # HTTP header 'Accept' (if needed)
54
+ header_params['Accept'] = @api_client.select_header_accept(['*/*'])
55
+ # HTTP header 'Content-Type'
56
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
57
+
58
+ # form parameters
59
+ form_params = opts[:form_params] || {}
60
+
61
+ # http body (model)
62
+ post_body = opts[:body] || @api_client.object_to_http_body(create_totp_device_base32_secret_key_options)
63
+
64
+ # return_type
65
+ return_type = opts[:return_type] || 'TotpDeviceDto'
66
+
67
+ # auth_names
68
+ auth_names = opts[:auth_names] || ['API_KEY']
69
+
70
+ new_options = opts.merge(
71
+ :header_params => header_params,
72
+ :query_params => query_params,
73
+ :form_params => form_params,
74
+ :body => post_body,
75
+ :auth_names => auth_names,
76
+ :return_type => return_type
77
+ )
78
+
79
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
80
+ if @api_client.config.debugging
81
+ @api_client.config.logger.debug "API called: MFAControllerApi#create_totp_device_for_base32_secret_key\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
82
+ end
83
+ return data, status_code, headers
84
+ end
85
+
22
86
  # Create a TOTP device from custom options
23
87
  # Create a virtual TOTP device for custom options specifying all parameters of the TOTP device.
24
- # @param create_totp_device_otp_auth_url_options [CreateTotpDeviceOtpAuthUrlOptions]
88
+ # @param create_totp_device_custom_options [CreateTotpDeviceCustomOptions]
25
89
  # @param [Hash] opts the optional parameters
26
90
  # @return [TotpDeviceDto]
27
- def create_totp_device_for_custom(create_totp_device_otp_auth_url_options, opts = {})
28
- data, _status_code, _headers = create_totp_device_for_custom_with_http_info(create_totp_device_otp_auth_url_options, opts)
91
+ def create_totp_device_for_custom(create_totp_device_custom_options, opts = {})
92
+ data, _status_code, _headers = create_totp_device_for_custom_with_http_info(create_totp_device_custom_options, opts)
29
93
  data
30
94
  end
31
95
 
32
96
  # Create a TOTP device from custom options
33
97
  # Create a virtual TOTP device for custom options specifying all parameters of the TOTP device.
34
- # @param create_totp_device_otp_auth_url_options [CreateTotpDeviceOtpAuthUrlOptions]
98
+ # @param create_totp_device_custom_options [CreateTotpDeviceCustomOptions]
35
99
  # @param [Hash] opts the optional parameters
36
100
  # @return [Array<(TotpDeviceDto, Integer, Hash)>] TotpDeviceDto data, response status code and response headers
37
- def create_totp_device_for_custom_with_http_info(create_totp_device_otp_auth_url_options, opts = {})
101
+ def create_totp_device_for_custom_with_http_info(create_totp_device_custom_options, opts = {})
38
102
  if @api_client.config.debugging
39
103
  @api_client.config.logger.debug 'Calling API: MFAControllerApi.create_totp_device_for_custom ...'
40
104
  end
41
- # verify the required parameter 'create_totp_device_otp_auth_url_options' is set
42
- if @api_client.config.client_side_validation && create_totp_device_otp_auth_url_options.nil?
43
- fail ArgumentError, "Missing the required parameter 'create_totp_device_otp_auth_url_options' when calling MFAControllerApi.create_totp_device_for_custom"
105
+ # verify the required parameter 'create_totp_device_custom_options' is set
106
+ if @api_client.config.client_side_validation && create_totp_device_custom_options.nil?
107
+ fail ArgumentError, "Missing the required parameter 'create_totp_device_custom_options' when calling MFAControllerApi.create_totp_device_for_custom"
44
108
  end
45
109
  # resource path
46
110
  local_var_path = '/mfa/totp/device/custom'
@@ -59,7 +123,7 @@ module MailSlurpClient
59
123
  form_params = opts[:form_params] || {}
60
124
 
61
125
  # http body (model)
62
- post_body = opts[:body] || @api_client.object_to_http_body(create_totp_device_otp_auth_url_options)
126
+ post_body = opts[:body] || @api_client.object_to_http_body(create_totp_device_custom_options)
63
127
 
64
128
  # return_type
65
129
  return_type = opts[:return_type] || 'TotpDeviceDto'
@@ -262,6 +262,7 @@ module MailSlurpClient
262
262
  # @option opts [DateTime] :before Optional filter SMSs received before given date time
263
263
  # @option opts [String] :search Optional search filter
264
264
  # @option opts [Boolean] :favourite Optionally filter results for favourites only (default to false)
265
+ # @option opts [Array<String>] :include Optional list of IDs to include in result
265
266
  # @return [PageSmsProjection]
266
267
  def get_all_sms_messages(opts = {})
267
268
  data, _status_code, _headers = get_all_sms_messages_with_http_info(opts)
@@ -277,6 +278,7 @@ module MailSlurpClient
277
278
  # @option opts [DateTime] :before Optional filter SMSs received before given date time
278
279
  # @option opts [String] :search Optional search filter
279
280
  # @option opts [Boolean] :favourite Optionally filter results for favourites only
281
+ # @option opts [Array<String>] :include Optional list of IDs to include in result
280
282
  # @return [Array<(PageSmsProjection, Integer, Hash)>] PageSmsProjection data, response status code and response headers
281
283
  def get_all_sms_messages_with_http_info(opts = {})
282
284
  if @api_client.config.debugging
@@ -303,6 +305,7 @@ module MailSlurpClient
303
305
  query_params[:'before'] = opts[:'before'] if !opts[:'before'].nil?
304
306
  query_params[:'search'] = opts[:'search'] if !opts[:'search'].nil?
305
307
  query_params[:'favourite'] = opts[:'favourite'] if !opts[:'favourite'].nil?
308
+ query_params[:'include'] = @api_client.build_collection_param(opts[:'include'], :multi) if !opts[:'include'].nil?
306
309
 
307
310
  # header parameters
308
311
  header_params = opts[:header_params] || {}
@@ -453,7 +453,7 @@ module MailSlurpClient
453
453
  if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
454
454
  fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
455
455
  end
456
- allowable_values = ["EMAIL_RECEIVED", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED", "EMAIL_READ", "DELIVERY_STATUS", "BOUNCE", "BOUNCE_RECIPIENT", "NEW_SMS", "NEW_GUEST_USER"]
456
+ allowable_values = ["EMAIL_RECEIVED", "NEW_AI_TRANSFORM_RESULT", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED", "EMAIL_READ", "DELIVERY_STATUS", "BOUNCE", "BOUNCE_RECIPIENT", "NEW_SMS", "NEW_GUEST_USER"]
457
457
  if @api_client.config.client_side_validation && opts[:'event_type'] && !allowable_values.include?(opts[:'event_type'])
458
458
  fail ArgumentError, "invalid value for \"event_type\", must be one of #{allowable_values}"
459
459
  end
@@ -569,7 +569,7 @@ module MailSlurpClient
569
569
  if @api_client.config.client_side_validation && opts[:'health'] && !allowable_values.include?(opts[:'health'])
570
570
  fail ArgumentError, "invalid value for \"health\", must be one of #{allowable_values}"
571
571
  end
572
- allowable_values = ["EMAIL_RECEIVED", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED", "EMAIL_READ", "DELIVERY_STATUS", "BOUNCE", "BOUNCE_RECIPIENT", "NEW_SMS", "NEW_GUEST_USER"]
572
+ allowable_values = ["EMAIL_RECEIVED", "NEW_AI_TRANSFORM_RESULT", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED", "EMAIL_READ", "DELIVERY_STATUS", "BOUNCE", "BOUNCE_RECIPIENT", "NEW_SMS", "NEW_GUEST_USER"]
573
573
  if @api_client.config.client_side_validation && opts[:'event_type'] && !allowable_values.include?(opts[:'event_type'])
574
574
  fail ArgumentError, "invalid value for \"event_type\", must be one of #{allowable_values}"
575
575
  end
@@ -677,7 +677,7 @@ module MailSlurpClient
677
677
  if @api_client.config.client_side_validation && opts[:'result_type'] && !allowable_values.include?(opts[:'result_type'])
678
678
  fail ArgumentError, "invalid value for \"result_type\", must be one of #{allowable_values}"
679
679
  end
680
- allowable_values = ["EMAIL_RECEIVED", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED", "EMAIL_READ", "DELIVERY_STATUS", "BOUNCE", "BOUNCE_RECIPIENT", "NEW_SMS", "NEW_GUEST_USER"]
680
+ allowable_values = ["EMAIL_RECEIVED", "NEW_AI_TRANSFORM_RESULT", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED", "EMAIL_READ", "DELIVERY_STATUS", "BOUNCE", "BOUNCE_RECIPIENT", "NEW_SMS", "NEW_GUEST_USER"]
681
681
  if @api_client.config.client_side_validation && opts[:'event_name'] && !allowable_values.include?(opts[:'event_name'])
682
682
  fail ArgumentError, "invalid value for \"event_name\", must be one of #{allowable_values}"
683
683
  end
@@ -799,7 +799,7 @@ module MailSlurpClient
799
799
  if @api_client.config.client_side_validation && opts[:'health'] && !allowable_values.include?(opts[:'health'])
800
800
  fail ArgumentError, "invalid value for \"health\", must be one of #{allowable_values}"
801
801
  end
802
- allowable_values = ["EMAIL_RECEIVED", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED", "EMAIL_READ", "DELIVERY_STATUS", "BOUNCE", "BOUNCE_RECIPIENT", "NEW_SMS", "NEW_GUEST_USER"]
802
+ allowable_values = ["EMAIL_RECEIVED", "NEW_AI_TRANSFORM_RESULT", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED", "EMAIL_READ", "DELIVERY_STATUS", "BOUNCE", "BOUNCE_RECIPIENT", "NEW_SMS", "NEW_GUEST_USER"]
803
803
  if @api_client.config.client_side_validation && opts[:'event_type'] && !allowable_values.include?(opts[:'event_type'])
804
804
  fail ArgumentError, "invalid value for \"event_type\", must be one of #{allowable_values}"
805
805
  end
@@ -898,7 +898,7 @@ module MailSlurpClient
898
898
  if @api_client.config.client_side_validation && opts[:'health'] && !allowable_values.include?(opts[:'health'])
899
899
  fail ArgumentError, "invalid value for \"health\", must be one of #{allowable_values}"
900
900
  end
901
- allowable_values = ["EMAIL_RECEIVED", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED", "EMAIL_READ", "DELIVERY_STATUS", "BOUNCE", "BOUNCE_RECIPIENT", "NEW_SMS", "NEW_GUEST_USER"]
901
+ allowable_values = ["EMAIL_RECEIVED", "NEW_AI_TRANSFORM_RESULT", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED", "EMAIL_READ", "DELIVERY_STATUS", "BOUNCE", "BOUNCE_RECIPIENT", "NEW_SMS", "NEW_GUEST_USER"]
902
902
  if @api_client.config.client_side_validation && opts[:'event_type'] && !allowable_values.include?(opts[:'event_type'])
903
903
  fail ArgumentError, "invalid value for \"event_type\", must be one of #{allowable_values}"
904
904
  end
@@ -971,7 +971,7 @@ module MailSlurpClient
971
971
  fail ArgumentError, "Missing the required parameter 'event' when calling WebhookControllerApi.get_json_schema_for_webhook_event"
972
972
  end
973
973
  # verify enum value
974
- allowable_values = ["EMAIL_RECEIVED", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED", "EMAIL_READ", "DELIVERY_STATUS", "BOUNCE", "BOUNCE_RECIPIENT", "NEW_SMS", "NEW_GUEST_USER"]
974
+ allowable_values = ["EMAIL_RECEIVED", "NEW_AI_TRANSFORM_RESULT", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED", "EMAIL_READ", "DELIVERY_STATUS", "BOUNCE", "BOUNCE_RECIPIENT", "NEW_SMS", "NEW_GUEST_USER"]
975
975
  if @api_client.config.client_side_validation && !allowable_values.include?(event)
976
976
  fail ArgumentError, "invalid value for \"event\", must be one of #{allowable_values}"
977
977
  end
@@ -1116,7 +1116,7 @@ module MailSlurpClient
1116
1116
  if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
1117
1117
  fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
1118
1118
  end
1119
- allowable_values = ["EMAIL_RECEIVED", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED", "EMAIL_READ", "DELIVERY_STATUS", "BOUNCE", "BOUNCE_RECIPIENT", "NEW_SMS", "NEW_GUEST_USER"]
1119
+ allowable_values = ["EMAIL_RECEIVED", "NEW_AI_TRANSFORM_RESULT", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED", "EMAIL_READ", "DELIVERY_STATUS", "BOUNCE", "BOUNCE_RECIPIENT", "NEW_SMS", "NEW_GUEST_USER"]
1120
1120
  if @api_client.config.client_side_validation && opts[:'event_type'] && !allowable_values.include?(opts[:'event_type'])
1121
1121
  fail ArgumentError, "invalid value for \"event_type\", must be one of #{allowable_values}"
1122
1122
  end
@@ -1188,7 +1188,7 @@ module MailSlurpClient
1188
1188
  if @api_client.config.debugging
1189
1189
  @api_client.config.logger.debug 'Calling API: WebhookControllerApi.get_test_webhook_payload ...'
1190
1190
  end
1191
- allowable_values = ["EMAIL_RECEIVED", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED", "EMAIL_READ", "DELIVERY_STATUS", "BOUNCE", "BOUNCE_RECIPIENT", "NEW_SMS", "NEW_GUEST_USER"]
1191
+ allowable_values = ["EMAIL_RECEIVED", "NEW_AI_TRANSFORM_RESULT", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED", "EMAIL_READ", "DELIVERY_STATUS", "BOUNCE", "BOUNCE_RECIPIENT", "NEW_SMS", "NEW_GUEST_USER"]
1192
1192
  if @api_client.config.client_side_validation && opts[:'event_name'] && !allowable_values.include?(opts[:'event_name'])
1193
1193
  fail ArgumentError, "invalid value for \"event_name\", must be one of #{allowable_values}"
1194
1194
  end
@@ -1562,6 +1562,60 @@ module MailSlurpClient
1562
1562
  return data, status_code, headers
1563
1563
  end
1564
1564
 
1565
+ # Get webhook test payload for new ai transform result event
1566
+ # @param [Hash] opts the optional parameters
1567
+ # @return [WebhookNewAITransformResultPayload]
1568
+ def get_test_webhook_payload_new_ai_transform_result(opts = {})
1569
+ data, _status_code, _headers = get_test_webhook_payload_new_ai_transform_result_with_http_info(opts)
1570
+ data
1571
+ end
1572
+
1573
+ # Get webhook test payload for new ai transform result event
1574
+ # @param [Hash] opts the optional parameters
1575
+ # @return [Array<(WebhookNewAITransformResultPayload, Integer, Hash)>] WebhookNewAITransformResultPayload data, response status code and response headers
1576
+ def get_test_webhook_payload_new_ai_transform_result_with_http_info(opts = {})
1577
+ if @api_client.config.debugging
1578
+ @api_client.config.logger.debug 'Calling API: WebhookControllerApi.get_test_webhook_payload_new_ai_transform_result ...'
1579
+ end
1580
+ # resource path
1581
+ local_var_path = '/webhooks/test/new-ai-transform-result-payload'
1582
+
1583
+ # query parameters
1584
+ query_params = opts[:query_params] || {}
1585
+
1586
+ # header parameters
1587
+ header_params = opts[:header_params] || {}
1588
+ # HTTP header 'Accept' (if needed)
1589
+ header_params['Accept'] = @api_client.select_header_accept(['*/*'])
1590
+
1591
+ # form parameters
1592
+ form_params = opts[:form_params] || {}
1593
+
1594
+ # http body (model)
1595
+ post_body = opts[:body]
1596
+
1597
+ # return_type
1598
+ return_type = opts[:return_type] || 'WebhookNewAITransformResultPayload'
1599
+
1600
+ # auth_names
1601
+ auth_names = opts[:auth_names] || ['API_KEY']
1602
+
1603
+ new_options = opts.merge(
1604
+ :header_params => header_params,
1605
+ :query_params => query_params,
1606
+ :form_params => form_params,
1607
+ :body => post_body,
1608
+ :auth_names => auth_names,
1609
+ :return_type => return_type
1610
+ )
1611
+
1612
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1613
+ if @api_client.config.debugging
1614
+ @api_client.config.logger.debug "API called: WebhookControllerApi#get_test_webhook_payload_new_ai_transform_result\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1615
+ end
1616
+ return data, status_code, headers
1617
+ end
1618
+
1565
1619
  # Get webhook test payload for new attachment event
1566
1620
  # @param [Hash] opts the optional parameters
1567
1621
  # @return [WebhookNewAttachmentPayload]
@@ -1959,7 +2013,7 @@ module MailSlurpClient
1959
2013
  if @api_client.config.client_side_validation && opts[:'result_type'] && !allowable_values.include?(opts[:'result_type'])
1960
2014
  fail ArgumentError, "invalid value for \"result_type\", must be one of #{allowable_values}"
1961
2015
  end
1962
- allowable_values = ["EMAIL_RECEIVED", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED", "EMAIL_READ", "DELIVERY_STATUS", "BOUNCE", "BOUNCE_RECIPIENT", "NEW_SMS", "NEW_GUEST_USER"]
2016
+ allowable_values = ["EMAIL_RECEIVED", "NEW_AI_TRANSFORM_RESULT", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED", "EMAIL_READ", "DELIVERY_STATUS", "BOUNCE", "BOUNCE_RECIPIENT", "NEW_SMS", "NEW_GUEST_USER"]
1963
2017
  if @api_client.config.client_side_validation && opts[:'event_name'] && !allowable_values.include?(opts[:'event_name'])
1964
2018
  fail ArgumentError, "invalid value for \"event_name\", must be one of #{allowable_values}"
1965
2019
  end
@@ -126,7 +126,7 @@ module MailSlurpClient
126
126
  # @return true if the model is valid
127
127
  def valid?
128
128
  return false if @event_name.nil?
129
- event_name_validator = EnumAttributeValidator.new('String', ["EMAIL_RECEIVED", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED", "EMAIL_READ", "DELIVERY_STATUS", "BOUNCE", "BOUNCE_RECIPIENT", "NEW_SMS", "NEW_GUEST_USER"])
129
+ event_name_validator = EnumAttributeValidator.new('String', ["EMAIL_RECEIVED", "NEW_AI_TRANSFORM_RESULT", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED", "EMAIL_READ", "DELIVERY_STATUS", "BOUNCE", "BOUNCE_RECIPIENT", "NEW_SMS", "NEW_GUEST_USER"])
130
130
  return false unless event_name_validator.valid?(@event_name)
131
131
  return false if @message_id.nil?
132
132
  return false if @webhook_id.nil?
@@ -136,7 +136,7 @@ module MailSlurpClient
136
136
  # Custom attribute writer method checking allowed values (enum).
137
137
  # @param [Object] event_name Object to be assigned
138
138
  def event_name=(event_name)
139
- validator = EnumAttributeValidator.new('String', ["EMAIL_RECEIVED", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED", "EMAIL_READ", "DELIVERY_STATUS", "BOUNCE", "BOUNCE_RECIPIENT", "NEW_SMS", "NEW_GUEST_USER"])
139
+ validator = EnumAttributeValidator.new('String', ["EMAIL_RECEIVED", "NEW_AI_TRANSFORM_RESULT", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED", "EMAIL_READ", "DELIVERY_STATUS", "BOUNCE", "BOUNCE_RECIPIENT", "NEW_SMS", "NEW_GUEST_USER"])
140
140
  unless validator.valid?(event_name)
141
141
  fail ArgumentError, "invalid value for \"event_name\", must be one of #{validator.allowable_values}."
142
142
  end
@@ -13,7 +13,7 @@ OpenAPI Generator version: 4.3.1
13
13
  require 'date'
14
14
 
15
15
  module MailSlurpClient
16
- class AITranformCreateOptions
16
+ class AITransformCreateOptions
17
17
  attr_accessor :name
18
18
 
19
19
  attr_accessor :conditions
@@ -22,13 +22,19 @@ module MailSlurpClient
22
22
 
23
23
  attr_accessor :output_schema
24
24
 
25
+ attr_accessor :output_schema_id
26
+
27
+ attr_accessor :extract_prompt
28
+
25
29
  # Attribute mapping from ruby-style variable name to JSON key.
26
30
  def self.attribute_map
27
31
  {
28
32
  :'name' => :'name',
29
33
  :'conditions' => :'conditions',
30
34
  :'instructions' => :'instructions',
31
- :'output_schema' => :'outputSchema'
35
+ :'output_schema' => :'outputSchema',
36
+ :'output_schema_id' => :'outputSchemaId',
37
+ :'extract_prompt' => :'extractPrompt'
32
38
  }
33
39
  end
34
40
 
@@ -38,13 +44,21 @@ module MailSlurpClient
38
44
  :'name' => :'String',
39
45
  :'conditions' => :'Array<String>',
40
46
  :'instructions' => :'Array<String>',
41
- :'output_schema' => :'StructuredOutputSchema'
47
+ :'output_schema' => :'StructuredOutputSchema',
48
+ :'output_schema_id' => :'String',
49
+ :'extract_prompt' => :'String'
42
50
  }
43
51
  end
44
52
 
45
53
  # List of attributes with nullable: true
46
54
  def self.openapi_nullable
47
55
  Set.new([
56
+ :'name',
57
+ :'conditions',
58
+ :'instructions',
59
+ :'output_schema',
60
+ :'output_schema_id',
61
+ :'extract_prompt'
48
62
  ])
49
63
  end
50
64
 
@@ -52,13 +66,13 @@ module MailSlurpClient
52
66
  # @param [Hash] attributes Model attributes in the form of hash
53
67
  def initialize(attributes = {})
54
68
  if (!attributes.is_a?(Hash))
55
- fail ArgumentError, "The input argument (attributes) must be a hash in `MailSlurpClient::AITranformCreateOptions` initialize method"
69
+ fail ArgumentError, "The input argument (attributes) must be a hash in `MailSlurpClient::AITransformCreateOptions` initialize method"
56
70
  end
57
71
 
58
72
  # check to see if the attribute exists and convert string to symbol for hash key
59
73
  attributes = attributes.each_with_object({}) { |(k, v), h|
60
74
  if (!self.class.attribute_map.key?(k.to_sym))
61
- fail ArgumentError, "`#{k}` is not a valid attribute in `MailSlurpClient::AITranformCreateOptions`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
75
+ fail ArgumentError, "`#{k}` is not a valid attribute in `MailSlurpClient::AITransformCreateOptions`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
62
76
  end
63
77
  h[k.to_sym] = v
64
78
  }
@@ -82,6 +96,14 @@ module MailSlurpClient
82
96
  if attributes.key?(:'output_schema')
83
97
  self.output_schema = attributes[:'output_schema']
84
98
  end
99
+
100
+ if attributes.key?(:'output_schema_id')
101
+ self.output_schema_id = attributes[:'output_schema_id']
102
+ end
103
+
104
+ if attributes.key?(:'extract_prompt')
105
+ self.extract_prompt = attributes[:'extract_prompt']
106
+ end
85
107
  end
86
108
 
87
109
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -105,7 +127,9 @@ module MailSlurpClient
105
127
  name == o.name &&
106
128
  conditions == o.conditions &&
107
129
  instructions == o.instructions &&
108
- output_schema == o.output_schema
130
+ output_schema == o.output_schema &&
131
+ output_schema_id == o.output_schema_id &&
132
+ extract_prompt == o.extract_prompt
109
133
  end
110
134
 
111
135
  # @see the `==` method
@@ -117,7 +141,7 @@ module MailSlurpClient
117
141
  # Calculates hash code according to all attributes.
118
142
  # @return [Integer] Hash code
119
143
  def hash
120
- [name, conditions, instructions, output_schema].hash
144
+ [name, conditions, instructions, output_schema, output_schema_id, extract_prompt].hash
121
145
  end
122
146
 
123
147
  # Builds the object from hash
@@ -49,6 +49,7 @@ module MailSlurpClient
49
49
  # List of attributes with nullable: true
50
50
  def self.openapi_nullable
51
51
  Set.new([
52
+ :'output_schema'
52
53
  ])
53
54
  end
54
55
 
@@ -26,6 +26,8 @@ module MailSlurpClient
26
26
 
27
27
  attr_accessor :entity_type
28
28
 
29
+ attr_accessor :created_at
30
+
29
31
  class EnumAttributeValidator
30
32
  attr_reader :datatype
31
33
  attr_reader :allowable_values
@@ -56,7 +58,8 @@ module MailSlurpClient
56
58
  :'user_id' => :'userId',
57
59
  :'name' => :'name',
58
60
  :'entity_id' => :'entityId',
59
- :'entity_type' => :'entityType'
61
+ :'entity_type' => :'entityType',
62
+ :'created_at' => :'createdAt'
60
63
  }
61
64
  end
62
65
 
@@ -68,7 +71,8 @@ module MailSlurpClient
68
71
  :'user_id' => :'String',
69
72
  :'name' => :'String',
70
73
  :'entity_id' => :'String',
71
- :'entity_type' => :'String'
74
+ :'entity_type' => :'String',
75
+ :'created_at' => :'DateTime'
72
76
  }
73
77
  end
74
78
 
@@ -116,6 +120,10 @@ module MailSlurpClient
116
120
  if attributes.key?(:'entity_type')
117
121
  self.entity_type = attributes[:'entity_type']
118
122
  end
123
+
124
+ if attributes.key?(:'created_at')
125
+ self.created_at = attributes[:'created_at']
126
+ end
119
127
  end
120
128
 
121
129
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -134,14 +142,14 @@ module MailSlurpClient
134
142
  invalid_properties.push('invalid value for "user_id", user_id cannot be nil.')
135
143
  end
136
144
 
137
- if @entity_id.nil?
138
- invalid_properties.push('invalid value for "entity_id", entity_id cannot be nil.')
139
- end
140
-
141
145
  if @entity_type.nil?
142
146
  invalid_properties.push('invalid value for "entity_type", entity_type cannot be nil.')
143
147
  end
144
148
 
149
+ if @created_at.nil?
150
+ invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
151
+ end
152
+
145
153
  invalid_properties
146
154
  end
147
155
 
@@ -151,10 +159,10 @@ module MailSlurpClient
151
159
  return false if @id.nil?
152
160
  return false if @ai_transform_id.nil?
153
161
  return false if @user_id.nil?
154
- return false if @entity_id.nil?
155
162
  return false if @entity_type.nil?
156
163
  entity_type_validator = EnumAttributeValidator.new('String', ["INBOX", "PHONE"])
157
164
  return false unless entity_type_validator.valid?(@entity_type)
165
+ return false if @created_at.nil?
158
166
  true
159
167
  end
160
168
 
@@ -178,7 +186,8 @@ module MailSlurpClient
178
186
  user_id == o.user_id &&
179
187
  name == o.name &&
180
188
  entity_id == o.entity_id &&
181
- entity_type == o.entity_type
189
+ entity_type == o.entity_type &&
190
+ created_at == o.created_at
182
191
  end
183
192
 
184
193
  # @see the `==` method
@@ -190,7 +199,7 @@ module MailSlurpClient
190
199
  # Calculates hash code according to all attributes.
191
200
  # @return [Integer] Hash code
192
201
  def hash
193
- [id, ai_transform_id, user_id, name, entity_id, entity_type].hash
202
+ [id, ai_transform_id, user_id, name, entity_id, entity_type, created_at].hash
194
203
  end
195
204
 
196
205
  # Builds the object from hash
@@ -16,6 +16,8 @@ module MailSlurpClient
16
16
  class AITransformMappingProjection
17
17
  attr_accessor :user_id
18
18
 
19
+ attr_accessor :created_at
20
+
19
21
  attr_accessor :ai_transform_id
20
22
 
21
23
  attr_accessor :entity_id
@@ -56,6 +58,7 @@ module MailSlurpClient
56
58
  def self.attribute_map
57
59
  {
58
60
  :'user_id' => :'userId',
61
+ :'created_at' => :'createdAt',
59
62
  :'ai_transform_id' => :'aiTransformId',
60
63
  :'entity_id' => :'entityId',
61
64
  :'entity_type' => :'entityType',
@@ -70,6 +73,7 @@ module MailSlurpClient
70
73
  def self.openapi_types
71
74
  {
72
75
  :'user_id' => :'String',
76
+ :'created_at' => :'DateTime',
73
77
  :'ai_transform_id' => :'String',
74
78
  :'entity_id' => :'String',
75
79
  :'entity_type' => :'String',
@@ -105,6 +109,10 @@ module MailSlurpClient
105
109
  self.user_id = attributes[:'user_id']
106
110
  end
107
111
 
112
+ if attributes.key?(:'created_at')
113
+ self.created_at = attributes[:'created_at']
114
+ end
115
+
108
116
  if attributes.key?(:'ai_transform_id')
109
117
  self.ai_transform_id = attributes[:'ai_transform_id']
110
118
  end
@@ -142,12 +150,12 @@ module MailSlurpClient
142
150
  invalid_properties.push('invalid value for "user_id", user_id cannot be nil.')
143
151
  end
144
152
 
145
- if @ai_transform_id.nil?
146
- invalid_properties.push('invalid value for "ai_transform_id", ai_transform_id cannot be nil.')
153
+ if @created_at.nil?
154
+ invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
147
155
  end
148
156
 
149
- if @entity_id.nil?
150
- invalid_properties.push('invalid value for "entity_id", entity_id cannot be nil.')
157
+ if @ai_transform_id.nil?
158
+ invalid_properties.push('invalid value for "ai_transform_id", ai_transform_id cannot be nil.')
151
159
  end
152
160
 
153
161
  if @entity_type.nil?
@@ -165,8 +173,8 @@ module MailSlurpClient
165
173
  # @return true if the model is valid
166
174
  def valid?
167
175
  return false if @user_id.nil?
176
+ return false if @created_at.nil?
168
177
  return false if @ai_transform_id.nil?
169
- return false if @entity_id.nil?
170
178
  return false if @entity_type.nil?
171
179
  entity_type_validator = EnumAttributeValidator.new('String', ["INBOX", "PHONE"])
172
180
  return false unless entity_type_validator.valid?(@entity_type)
@@ -214,6 +222,7 @@ module MailSlurpClient
214
222
  return true if self.equal?(o)
215
223
  self.class == o.class &&
216
224
  user_id == o.user_id &&
225
+ created_at == o.created_at &&
217
226
  ai_transform_id == o.ai_transform_id &&
218
227
  entity_id == o.entity_id &&
219
228
  entity_type == o.entity_type &&
@@ -232,7 +241,7 @@ module MailSlurpClient
232
241
  # Calculates hash code according to all attributes.
233
242
  # @return [Integer] Hash code
234
243
  def hash
235
- [user_id, ai_transform_id, entity_id, entity_type, content_selector, trigger_selector, name, id].hash
244
+ [user_id, created_at, ai_transform_id, entity_id, entity_type, content_selector, trigger_selector, name, id].hash
236
245
  end
237
246
 
238
247
  # Builds the object from hash
@@ -14,6 +14,8 @@ require 'date'
14
14
 
15
15
  module MailSlurpClient
16
16
  class AITransformProjection
17
+ attr_accessor :created_at
18
+
17
19
  attr_accessor :conditions
18
20
 
19
21
  attr_accessor :instructions
@@ -27,6 +29,7 @@ module MailSlurpClient
27
29
  # Attribute mapping from ruby-style variable name to JSON key.
28
30
  def self.attribute_map
29
31
  {
32
+ :'created_at' => :'createdAt',
30
33
  :'conditions' => :'conditions',
31
34
  :'instructions' => :'instructions',
32
35
  :'output_schema' => :'outputSchema',
@@ -38,6 +41,7 @@ module MailSlurpClient
38
41
  # Attribute type mapping.
39
42
  def self.openapi_types
40
43
  {
44
+ :'created_at' => :'DateTime',
41
45
  :'conditions' => :'Array<String>',
42
46
  :'instructions' => :'Array<String>',
43
47
  :'output_schema' => :'StructuredOutputSchema',
@@ -49,6 +53,7 @@ module MailSlurpClient
49
53
  # List of attributes with nullable: true
50
54
  def self.openapi_nullable
51
55
  Set.new([
56
+ :'output_schema',
52
57
  ])
53
58
  end
54
59
 
@@ -67,6 +72,10 @@ module MailSlurpClient
67
72
  h[k.to_sym] = v
68
73
  }
69
74
 
75
+ if attributes.key?(:'created_at')
76
+ self.created_at = attributes[:'created_at']
77
+ end
78
+
70
79
  if attributes.key?(:'conditions')
71
80
  if (value = attributes[:'conditions']).is_a?(Array)
72
81
  self.conditions = value
@@ -96,6 +105,10 @@ module MailSlurpClient
96
105
  # @return Array for valid properties with the reasons
97
106
  def list_invalid_properties
98
107
  invalid_properties = Array.new
108
+ if @created_at.nil?
109
+ invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
110
+ end
111
+
99
112
  if @id.nil?
100
113
  invalid_properties.push('invalid value for "id", id cannot be nil.')
101
114
  end
@@ -106,6 +119,7 @@ module MailSlurpClient
106
119
  # Check to see if the all the properties in the model are valid
107
120
  # @return true if the model is valid
108
121
  def valid?
122
+ return false if @created_at.nil?
109
123
  return false if @id.nil?
110
124
  true
111
125
  end
@@ -115,6 +129,7 @@ module MailSlurpClient
115
129
  def ==(o)
116
130
  return true if self.equal?(o)
117
131
  self.class == o.class &&
132
+ created_at == o.created_at &&
118
133
  conditions == o.conditions &&
119
134
  instructions == o.instructions &&
120
135
  output_schema == o.output_schema &&
@@ -131,7 +146,7 @@ module MailSlurpClient
131
146
  # Calculates hash code according to all attributes.
132
147
  # @return [Integer] Hash code
133
148
  def hash
134
- [conditions, instructions, output_schema, name, id].hash
149
+ [created_at, conditions, instructions, output_schema, name, id].hash
135
150
  end
136
151
 
137
152
  # Builds the object from hash