mailslurp_client 16.1.3 → 16.1.5

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 (83) hide show
  1. checksums.yaml +4 -4
  2. data/lib/mailslurp_client/api/ai_controller_api.rb +813 -6
  3. data/lib/mailslurp_client/models/ai_tranform_create_options.rb +237 -0
  4. data/lib/mailslurp_client/models/ai_transform_dto.rb +251 -0
  5. data/lib/mailslurp_client/models/ai_transform_mapping_dto.rb +310 -0
  6. data/lib/mailslurp_client/models/ai_transform_mapping_projection.rb +352 -0
  7. data/lib/mailslurp_client/models/ai_transform_projection.rb +251 -0
  8. data/lib/mailslurp_client/models/ai_transform_result_dto.rb +353 -0
  9. data/lib/mailslurp_client/models/ai_transform_result_projection.rb +324 -0
  10. data/lib/mailslurp_client/models/alias_projection.rb +15 -15
  11. data/lib/mailslurp_client/models/alias_thread_projection.rb +16 -16
  12. data/lib/mailslurp_client/models/attachment_projection.rb +10 -10
  13. data/lib/mailslurp_client/models/connector_projection.rb +15 -15
  14. data/lib/mailslurp_client/models/create_ai_transformer_mapping_options.rb +338 -0
  15. data/lib/mailslurp_client/models/create_webhook_options.rb +12 -1
  16. data/lib/mailslurp_client/models/email_projection.rb +10 -10
  17. data/lib/mailslurp_client/models/email_thread_projection.rb +36 -36
  18. data/lib/mailslurp_client/models/generate_structured_content_attachment_options.rb +27 -9
  19. data/lib/mailslurp_client/models/generate_structured_content_email_options.rb +19 -11
  20. data/lib/mailslurp_client/models/generate_structured_content_sms_options.rb +244 -0
  21. data/lib/mailslurp_client/models/guest_portal_user_projection.rb +10 -10
  22. data/lib/mailslurp_client/models/inbox_forwarder_event_projection.rb +11 -11
  23. data/lib/mailslurp_client/models/inbox_replier_event_projection.rb +11 -11
  24. data/lib/mailslurp_client/models/page_ai_transform_mapping_projection.rb +309 -0
  25. data/lib/mailslurp_client/models/page_ai_transform_projection.rb +309 -0
  26. data/lib/mailslurp_client/models/page_ai_transform_result_projection.rb +309 -0
  27. data/lib/mailslurp_client/models/page_alias.rb +15 -15
  28. data/lib/mailslurp_client/models/page_alias_thread_projection.rb +15 -15
  29. data/lib/mailslurp_client/models/page_attachment_entity.rb +15 -15
  30. data/lib/mailslurp_client/models/page_bounced_email.rb +15 -15
  31. data/lib/mailslurp_client/models/page_bounced_recipients.rb +15 -15
  32. data/lib/mailslurp_client/models/page_complaint.rb +15 -15
  33. data/lib/mailslurp_client/models/page_connector.rb +15 -15
  34. data/lib/mailslurp_client/models/page_connector_events.rb +15 -15
  35. data/lib/mailslurp_client/models/page_contact_projection.rb +15 -15
  36. data/lib/mailslurp_client/models/page_delivery_status.rb +15 -15
  37. data/lib/mailslurp_client/models/page_email_preview.rb +15 -15
  38. data/lib/mailslurp_client/models/page_email_projection.rb +15 -15
  39. data/lib/mailslurp_client/models/page_email_thread_projection.rb +15 -15
  40. data/lib/mailslurp_client/models/page_email_validation_request.rb +15 -15
  41. data/lib/mailslurp_client/models/page_entity_automation_items.rb +15 -15
  42. data/lib/mailslurp_client/models/page_entity_event_items.rb +15 -15
  43. data/lib/mailslurp_client/models/page_entity_favourite_items.rb +15 -15
  44. data/lib/mailslurp_client/models/page_expired_inbox_record_projection.rb +15 -15
  45. data/lib/mailslurp_client/models/page_group_projection.rb +15 -15
  46. data/lib/mailslurp_client/models/page_guest_portal_users.rb +15 -15
  47. data/lib/mailslurp_client/models/page_inbox_forwarder_dto.rb +15 -15
  48. data/lib/mailslurp_client/models/page_inbox_forwarder_events.rb +15 -15
  49. data/lib/mailslurp_client/models/page_inbox_projection.rb +15 -15
  50. data/lib/mailslurp_client/models/page_inbox_replier_dto.rb +15 -15
  51. data/lib/mailslurp_client/models/page_inbox_replier_events.rb +15 -15
  52. data/lib/mailslurp_client/models/page_inbox_ruleset_dto.rb +15 -15
  53. data/lib/mailslurp_client/models/page_inbox_tags.rb +15 -15
  54. data/lib/mailslurp_client/models/page_list_unsubscribe_recipients.rb +15 -15
  55. data/lib/mailslurp_client/models/page_missed_email_projection.rb +15 -15
  56. data/lib/mailslurp_client/models/page_opt_in_identity_projection.rb +15 -15
  57. data/lib/mailslurp_client/models/page_organization_inbox_projection.rb +15 -15
  58. data/lib/mailslurp_client/models/page_phone_message_thread_item_projection.rb +15 -15
  59. data/lib/mailslurp_client/models/page_phone_message_thread_projection.rb +15 -15
  60. data/lib/mailslurp_client/models/page_phone_number_projection.rb +15 -15
  61. data/lib/mailslurp_client/models/page_plus_address_projection.rb +15 -15
  62. data/lib/mailslurp_client/models/page_reputation_items.rb +15 -15
  63. data/lib/mailslurp_client/models/page_scheduled_jobs.rb +15 -15
  64. data/lib/mailslurp_client/models/page_sent_email_projection.rb +15 -15
  65. data/lib/mailslurp_client/models/page_sent_email_with_queue_projection.rb +15 -15
  66. data/lib/mailslurp_client/models/page_sent_sms_projection.rb +15 -15
  67. data/lib/mailslurp_client/models/page_sms_projection.rb +15 -15
  68. data/lib/mailslurp_client/models/page_template_projection.rb +15 -15
  69. data/lib/mailslurp_client/models/page_tracking_pixel_projection.rb +15 -15
  70. data/lib/mailslurp_client/models/page_unknown_missed_email_projection.rb +15 -15
  71. data/lib/mailslurp_client/models/page_webhook_endpoint_projection.rb +15 -15
  72. data/lib/mailslurp_client/models/page_webhook_projection.rb +15 -15
  73. data/lib/mailslurp_client/models/page_webhook_result.rb +15 -15
  74. data/lib/mailslurp_client/models/plus_address_projection.rb +15 -15
  75. data/lib/mailslurp_client/models/sent_email_projection.rb +15 -15
  76. data/lib/mailslurp_client/models/sort_object.rb +10 -10
  77. data/lib/mailslurp_client/models/{structured_content_result.rb → structured_content_result_dto.rb} +3 -3
  78. data/lib/mailslurp_client/models/tracking_pixel_projection.rb +10 -10
  79. data/lib/mailslurp_client/models/webhook_dto.rb +12 -1
  80. data/lib/mailslurp_client/models/webhook_projection.rb +19 -10
  81. data/lib/mailslurp_client/version.rb +1 -1
  82. data/lib/mailslurp_client.rb +13 -1
  83. metadata +15 -3
@@ -19,11 +19,393 @@ module MailSlurpClient
19
19
  def initialize(api_client = ApiClient.default)
20
20
  @api_client = api_client
21
21
  end
22
+ # List transformers
23
+ # List all AI transforms
24
+ # @param options [AITranformCreateOptions]
25
+ # @param [Hash] opts the optional parameters
26
+ # @option opts [Integer] :page (default to 0)
27
+ # @option opts [Integer] :size Optional page size in SMS list pagination. Maximum size is 100. Use page index and sort to page through larger results (default to 20)
28
+ # @option opts [String] :sort Optional createdAt sort direction ASC or DESC (default to 'ASC')
29
+ # @return [PageAITransformProjection]
30
+ def create_transformer(options, opts = {})
31
+ data, _status_code, _headers = create_transformer_with_http_info(options, opts)
32
+ data
33
+ end
34
+
35
+ # List transformers
36
+ # List all AI transforms
37
+ # @param options [AITranformCreateOptions]
38
+ # @param [Hash] opts the optional parameters
39
+ # @option opts [Integer] :page
40
+ # @option opts [Integer] :size Optional page size in SMS list pagination. Maximum size is 100. Use page index and sort to page through larger results
41
+ # @option opts [String] :sort Optional createdAt sort direction ASC or DESC
42
+ # @return [Array<(PageAITransformProjection, Integer, Hash)>] PageAITransformProjection data, response status code and response headers
43
+ def create_transformer_with_http_info(options, opts = {})
44
+ if @api_client.config.debugging
45
+ @api_client.config.logger.debug 'Calling API: AIControllerApi.create_transformer ...'
46
+ end
47
+ # verify the required parameter 'options' is set
48
+ if @api_client.config.client_side_validation && options.nil?
49
+ fail ArgumentError, "Missing the required parameter 'options' when calling AIControllerApi.create_transformer"
50
+ end
51
+ if @api_client.config.client_side_validation && !opts[:'size'].nil? && opts[:'size'] > 100
52
+ fail ArgumentError, 'invalid value for "opts[:"size"]" when calling AIControllerApi.create_transformer, must be smaller than or equal to 100.'
53
+ end
54
+
55
+ allowable_values = ["ASC", "DESC"]
56
+ if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
57
+ fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
58
+ end
59
+ # resource path
60
+ local_var_path = '/ai/transformer'
61
+
62
+ # query parameters
63
+ query_params = opts[:query_params] || {}
64
+ query_params[:'options'] = options
65
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
66
+ query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil?
67
+ query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
68
+
69
+ # header parameters
70
+ header_params = opts[:header_params] || {}
71
+ # HTTP header 'Accept' (if needed)
72
+ header_params['Accept'] = @api_client.select_header_accept(['*/*'])
73
+
74
+ # form parameters
75
+ form_params = opts[:form_params] || {}
76
+
77
+ # http body (model)
78
+ post_body = opts[:body]
79
+
80
+ # return_type
81
+ return_type = opts[:return_type] || 'PageAITransformProjection'
82
+
83
+ # auth_names
84
+ auth_names = opts[:auth_names] || ['API_KEY']
85
+
86
+ new_options = opts.merge(
87
+ :header_params => header_params,
88
+ :query_params => query_params,
89
+ :form_params => form_params,
90
+ :body => post_body,
91
+ :auth_names => auth_names,
92
+ :return_type => return_type
93
+ )
94
+
95
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
96
+ if @api_client.config.debugging
97
+ @api_client.config.logger.debug "API called: AIControllerApi#create_transformer\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
98
+ end
99
+ return data, status_code, headers
100
+ end
101
+
102
+ # Create a transformer for reuse in automations
103
+ # Save an AI transform instructions and schema for use with webhooks and automations
104
+ # @param ai_tranform_create_options [AITranformCreateOptions]
105
+ # @param [Hash] opts the optional parameters
106
+ # @return [AITransformDto]
107
+ def create_transformer1(ai_tranform_create_options, opts = {})
108
+ data, _status_code, _headers = create_transformer1_with_http_info(ai_tranform_create_options, opts)
109
+ data
110
+ end
111
+
112
+ # Create a transformer for reuse in automations
113
+ # Save an AI transform instructions and schema for use with webhooks and automations
114
+ # @param ai_tranform_create_options [AITranformCreateOptions]
115
+ # @param [Hash] opts the optional parameters
116
+ # @return [Array<(AITransformDto, Integer, Hash)>] AITransformDto data, response status code and response headers
117
+ def create_transformer1_with_http_info(ai_tranform_create_options, opts = {})
118
+ if @api_client.config.debugging
119
+ @api_client.config.logger.debug 'Calling API: AIControllerApi.create_transformer1 ...'
120
+ end
121
+ # verify the required parameter 'ai_tranform_create_options' is set
122
+ if @api_client.config.client_side_validation && ai_tranform_create_options.nil?
123
+ fail ArgumentError, "Missing the required parameter 'ai_tranform_create_options' when calling AIControllerApi.create_transformer1"
124
+ end
125
+ # resource path
126
+ local_var_path = '/ai/transformer'
127
+
128
+ # query parameters
129
+ query_params = opts[:query_params] || {}
130
+
131
+ # header parameters
132
+ header_params = opts[:header_params] || {}
133
+ # HTTP header 'Accept' (if needed)
134
+ header_params['Accept'] = @api_client.select_header_accept(['*/*'])
135
+ # HTTP header 'Content-Type'
136
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
137
+
138
+ # form parameters
139
+ form_params = opts[:form_params] || {}
140
+
141
+ # http body (model)
142
+ post_body = opts[:body] || @api_client.object_to_http_body(ai_tranform_create_options)
143
+
144
+ # return_type
145
+ return_type = opts[:return_type] || 'AITransformDto'
146
+
147
+ # auth_names
148
+ auth_names = opts[:auth_names] || ['API_KEY']
149
+
150
+ new_options = opts.merge(
151
+ :header_params => header_params,
152
+ :query_params => query_params,
153
+ :form_params => form_params,
154
+ :body => post_body,
155
+ :auth_names => auth_names,
156
+ :return_type => return_type
157
+ )
158
+
159
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
160
+ if @api_client.config.debugging
161
+ @api_client.config.logger.debug "API called: AIControllerApi#create_transformer1\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
162
+ end
163
+ return data, status_code, headers
164
+ end
165
+
166
+ # Create transformer mapping
167
+ # Create AI transformer mappings to other entities
168
+ # @param create_ai_transformer_mapping_options [CreateAITransformerMappingOptions]
169
+ # @param [Hash] opts the optional parameters
170
+ # @return [AITransformMappingDto]
171
+ def create_transformer_mappings(create_ai_transformer_mapping_options, opts = {})
172
+ data, _status_code, _headers = create_transformer_mappings_with_http_info(create_ai_transformer_mapping_options, opts)
173
+ data
174
+ end
175
+
176
+ # Create transformer mapping
177
+ # Create AI transformer mappings to other entities
178
+ # @param create_ai_transformer_mapping_options [CreateAITransformerMappingOptions]
179
+ # @param [Hash] opts the optional parameters
180
+ # @return [Array<(AITransformMappingDto, Integer, Hash)>] AITransformMappingDto data, response status code and response headers
181
+ def create_transformer_mappings_with_http_info(create_ai_transformer_mapping_options, opts = {})
182
+ if @api_client.config.debugging
183
+ @api_client.config.logger.debug 'Calling API: AIControllerApi.create_transformer_mappings ...'
184
+ end
185
+ # verify the required parameter 'create_ai_transformer_mapping_options' is set
186
+ if @api_client.config.client_side_validation && create_ai_transformer_mapping_options.nil?
187
+ fail ArgumentError, "Missing the required parameter 'create_ai_transformer_mapping_options' when calling AIControllerApi.create_transformer_mappings"
188
+ end
189
+ # resource path
190
+ local_var_path = '/ai/transformer/mappings'
191
+
192
+ # query parameters
193
+ query_params = opts[:query_params] || {}
194
+
195
+ # header parameters
196
+ header_params = opts[:header_params] || {}
197
+ # HTTP header 'Accept' (if needed)
198
+ header_params['Accept'] = @api_client.select_header_accept(['*/*'])
199
+ # HTTP header 'Content-Type'
200
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
201
+
202
+ # form parameters
203
+ form_params = opts[:form_params] || {}
204
+
205
+ # http body (model)
206
+ post_body = opts[:body] || @api_client.object_to_http_body(create_ai_transformer_mapping_options)
207
+
208
+ # return_type
209
+ return_type = opts[:return_type] || 'AITransformMappingDto'
210
+
211
+ # auth_names
212
+ auth_names = opts[:auth_names] || ['API_KEY']
213
+
214
+ new_options = opts.merge(
215
+ :header_params => header_params,
216
+ :query_params => query_params,
217
+ :form_params => form_params,
218
+ :body => post_body,
219
+ :auth_names => auth_names,
220
+ :return_type => return_type
221
+ )
222
+
223
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
224
+ if @api_client.config.debugging
225
+ @api_client.config.logger.debug "API called: AIControllerApi#create_transformer_mappings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
226
+ end
227
+ return data, status_code, headers
228
+ end
229
+
230
+ # Delete a transformer
231
+ # Delete an AI transformer and schemas by ID
232
+ # @param id [String]
233
+ # @param [Hash] opts the optional parameters
234
+ # @return [nil]
235
+ def delete_transformer(id, opts = {})
236
+ delete_transformer_with_http_info(id, opts)
237
+ nil
238
+ end
239
+
240
+ # Delete a transformer
241
+ # Delete an AI transformer and schemas by ID
242
+ # @param id [String]
243
+ # @param [Hash] opts the optional parameters
244
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
245
+ def delete_transformer_with_http_info(id, opts = {})
246
+ if @api_client.config.debugging
247
+ @api_client.config.logger.debug 'Calling API: AIControllerApi.delete_transformer ...'
248
+ end
249
+ # verify the required parameter 'id' is set
250
+ if @api_client.config.client_side_validation && id.nil?
251
+ fail ArgumentError, "Missing the required parameter 'id' when calling AIControllerApi.delete_transformer"
252
+ end
253
+ # resource path
254
+ local_var_path = '/ai/transformer/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
255
+
256
+ # query parameters
257
+ query_params = opts[:query_params] || {}
258
+
259
+ # header parameters
260
+ header_params = opts[:header_params] || {}
261
+
262
+ # form parameters
263
+ form_params = opts[:form_params] || {}
264
+
265
+ # http body (model)
266
+ post_body = opts[:body]
267
+
268
+ # return_type
269
+ return_type = opts[:return_type]
270
+
271
+ # auth_names
272
+ auth_names = opts[:auth_names] || ['API_KEY']
273
+
274
+ new_options = opts.merge(
275
+ :header_params => header_params,
276
+ :query_params => query_params,
277
+ :form_params => form_params,
278
+ :body => post_body,
279
+ :auth_names => auth_names,
280
+ :return_type => return_type
281
+ )
282
+
283
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
284
+ if @api_client.config.debugging
285
+ @api_client.config.logger.debug "API called: AIControllerApi#delete_transformer\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
286
+ end
287
+ return data, status_code, headers
288
+ end
289
+
290
+ # Delete transformer mapping
291
+ # Delete an AI transformer mapping
292
+ # @param id [String] ID of transform mapping
293
+ # @param [Hash] opts the optional parameters
294
+ # @return [nil]
295
+ def delete_transformer_mapping(id, opts = {})
296
+ delete_transformer_mapping_with_http_info(id, opts)
297
+ nil
298
+ end
299
+
300
+ # Delete transformer mapping
301
+ # Delete an AI transformer mapping
302
+ # @param id [String] ID of transform mapping
303
+ # @param [Hash] opts the optional parameters
304
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
305
+ def delete_transformer_mapping_with_http_info(id, opts = {})
306
+ if @api_client.config.debugging
307
+ @api_client.config.logger.debug 'Calling API: AIControllerApi.delete_transformer_mapping ...'
308
+ end
309
+ # verify the required parameter 'id' is set
310
+ if @api_client.config.client_side_validation && id.nil?
311
+ fail ArgumentError, "Missing the required parameter 'id' when calling AIControllerApi.delete_transformer_mapping"
312
+ end
313
+ # resource path
314
+ local_var_path = '/ai/transformer/mappings/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
315
+
316
+ # query parameters
317
+ query_params = opts[:query_params] || {}
318
+
319
+ # header parameters
320
+ header_params = opts[:header_params] || {}
321
+
322
+ # form parameters
323
+ form_params = opts[:form_params] || {}
324
+
325
+ # http body (model)
326
+ post_body = opts[:body]
327
+
328
+ # return_type
329
+ return_type = opts[:return_type]
330
+
331
+ # auth_names
332
+ auth_names = opts[:auth_names] || ['API_KEY']
333
+
334
+ new_options = opts.merge(
335
+ :header_params => header_params,
336
+ :query_params => query_params,
337
+ :form_params => form_params,
338
+ :body => post_body,
339
+ :auth_names => auth_names,
340
+ :return_type => return_type
341
+ )
342
+
343
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
344
+ if @api_client.config.debugging
345
+ @api_client.config.logger.debug "API called: AIControllerApi#delete_transformer_mapping\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
346
+ end
347
+ return data, status_code, headers
348
+ end
349
+
350
+ # Delete all transformers
351
+ # Delete all AI transformers and schemas
352
+ # @param [Hash] opts the optional parameters
353
+ # @return [nil]
354
+ def delete_transformers(opts = {})
355
+ delete_transformers_with_http_info(opts)
356
+ nil
357
+ end
358
+
359
+ # Delete all transformers
360
+ # Delete all AI transformers and schemas
361
+ # @param [Hash] opts the optional parameters
362
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
363
+ def delete_transformers_with_http_info(opts = {})
364
+ if @api_client.config.debugging
365
+ @api_client.config.logger.debug 'Calling API: AIControllerApi.delete_transformers ...'
366
+ end
367
+ # resource path
368
+ local_var_path = '/ai/transformer'
369
+
370
+ # query parameters
371
+ query_params = opts[:query_params] || {}
372
+
373
+ # header parameters
374
+ header_params = opts[:header_params] || {}
375
+
376
+ # form parameters
377
+ form_params = opts[:form_params] || {}
378
+
379
+ # http body (model)
380
+ post_body = opts[:body]
381
+
382
+ # return_type
383
+ return_type = opts[:return_type]
384
+
385
+ # auth_names
386
+ auth_names = opts[:auth_names] || ['API_KEY']
387
+
388
+ new_options = opts.merge(
389
+ :header_params => header_params,
390
+ :query_params => query_params,
391
+ :form_params => form_params,
392
+ :body => post_body,
393
+ :auth_names => auth_names,
394
+ :return_type => return_type
395
+ )
396
+
397
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
398
+ if @api_client.config.debugging
399
+ @api_client.config.logger.debug "API called: AIControllerApi#delete_transformers\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
400
+ end
401
+ return data, status_code, headers
402
+ end
403
+
22
404
  # Generate structured content for an attachment
23
405
  # Use output schemas to extract data from an attachment using AI
24
406
  # @param generate_structured_content_attachment_options [GenerateStructuredContentAttachmentOptions]
25
407
  # @param [Hash] opts the optional parameters
26
- # @return [StructuredContentResult]
408
+ # @return [StructuredContentResultDto]
27
409
  def generate_structured_content_from_attachment(generate_structured_content_attachment_options, opts = {})
28
410
  data, _status_code, _headers = generate_structured_content_from_attachment_with_http_info(generate_structured_content_attachment_options, opts)
29
411
  data
@@ -33,7 +415,7 @@ module MailSlurpClient
33
415
  # Use output schemas to extract data from an attachment using AI
34
416
  # @param generate_structured_content_attachment_options [GenerateStructuredContentAttachmentOptions]
35
417
  # @param [Hash] opts the optional parameters
36
- # @return [Array<(StructuredContentResult, Integer, Hash)>] StructuredContentResult data, response status code and response headers
418
+ # @return [Array<(StructuredContentResultDto, Integer, Hash)>] StructuredContentResultDto data, response status code and response headers
37
419
  def generate_structured_content_from_attachment_with_http_info(generate_structured_content_attachment_options, opts = {})
38
420
  if @api_client.config.debugging
39
421
  @api_client.config.logger.debug 'Calling API: AIControllerApi.generate_structured_content_from_attachment ...'
@@ -62,7 +444,7 @@ module MailSlurpClient
62
444
  post_body = opts[:body] || @api_client.object_to_http_body(generate_structured_content_attachment_options)
63
445
 
64
446
  # return_type
65
- return_type = opts[:return_type] || 'StructuredContentResult'
447
+ return_type = opts[:return_type] || 'StructuredContentResultDto'
66
448
 
67
449
  # auth_names
68
450
  auth_names = opts[:auth_names] || ['API_KEY']
@@ -87,7 +469,7 @@ module MailSlurpClient
87
469
  # Use output schemas to extract data from an email using AI
88
470
  # @param generate_structured_content_email_options [GenerateStructuredContentEmailOptions]
89
471
  # @param [Hash] opts the optional parameters
90
- # @return [StructuredContentResult]
472
+ # @return [StructuredContentResultDto]
91
473
  def generate_structured_content_from_email(generate_structured_content_email_options, opts = {})
92
474
  data, _status_code, _headers = generate_structured_content_from_email_with_http_info(generate_structured_content_email_options, opts)
93
475
  data
@@ -97,7 +479,7 @@ module MailSlurpClient
97
479
  # Use output schemas to extract data from an email using AI
98
480
  # @param generate_structured_content_email_options [GenerateStructuredContentEmailOptions]
99
481
  # @param [Hash] opts the optional parameters
100
- # @return [Array<(StructuredContentResult, Integer, Hash)>] StructuredContentResult data, response status code and response headers
482
+ # @return [Array<(StructuredContentResultDto, Integer, Hash)>] StructuredContentResultDto data, response status code and response headers
101
483
  def generate_structured_content_from_email_with_http_info(generate_structured_content_email_options, opts = {})
102
484
  if @api_client.config.debugging
103
485
  @api_client.config.logger.debug 'Calling API: AIControllerApi.generate_structured_content_from_email ...'
@@ -126,7 +508,7 @@ module MailSlurpClient
126
508
  post_body = opts[:body] || @api_client.object_to_http_body(generate_structured_content_email_options)
127
509
 
128
510
  # return_type
129
- return_type = opts[:return_type] || 'StructuredContentResult'
511
+ return_type = opts[:return_type] || 'StructuredContentResultDto'
130
512
 
131
513
  # auth_names
132
514
  auth_names = opts[:auth_names] || ['API_KEY']
@@ -147,6 +529,431 @@ module MailSlurpClient
147
529
  return data, status_code, headers
148
530
  end
149
531
 
532
+ # Generate structured content for a TXT message
533
+ # Use output schemas to extract data from an SMS using AI
534
+ # @param generate_structured_content_sms_options [GenerateStructuredContentSmsOptions]
535
+ # @param [Hash] opts the optional parameters
536
+ # @return [StructuredContentResultDto]
537
+ def generate_structured_content_from_sms(generate_structured_content_sms_options, opts = {})
538
+ data, _status_code, _headers = generate_structured_content_from_sms_with_http_info(generate_structured_content_sms_options, opts)
539
+ data
540
+ end
541
+
542
+ # Generate structured content for a TXT message
543
+ # Use output schemas to extract data from an SMS using AI
544
+ # @param generate_structured_content_sms_options [GenerateStructuredContentSmsOptions]
545
+ # @param [Hash] opts the optional parameters
546
+ # @return [Array<(StructuredContentResultDto, Integer, Hash)>] StructuredContentResultDto data, response status code and response headers
547
+ def generate_structured_content_from_sms_with_http_info(generate_structured_content_sms_options, opts = {})
548
+ if @api_client.config.debugging
549
+ @api_client.config.logger.debug 'Calling API: AIControllerApi.generate_structured_content_from_sms ...'
550
+ end
551
+ # verify the required parameter 'generate_structured_content_sms_options' is set
552
+ if @api_client.config.client_side_validation && generate_structured_content_sms_options.nil?
553
+ fail ArgumentError, "Missing the required parameter 'generate_structured_content_sms_options' when calling AIControllerApi.generate_structured_content_from_sms"
554
+ end
555
+ # resource path
556
+ local_var_path = '/ai/structured-content/sms'
557
+
558
+ # query parameters
559
+ query_params = opts[:query_params] || {}
560
+
561
+ # header parameters
562
+ header_params = opts[:header_params] || {}
563
+ # HTTP header 'Accept' (if needed)
564
+ header_params['Accept'] = @api_client.select_header_accept(['*/*'])
565
+ # HTTP header 'Content-Type'
566
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
567
+
568
+ # form parameters
569
+ form_params = opts[:form_params] || {}
570
+
571
+ # http body (model)
572
+ post_body = opts[:body] || @api_client.object_to_http_body(generate_structured_content_sms_options)
573
+
574
+ # return_type
575
+ return_type = opts[:return_type] || 'StructuredContentResultDto'
576
+
577
+ # auth_names
578
+ auth_names = opts[:auth_names] || ['API_KEY']
579
+
580
+ new_options = opts.merge(
581
+ :header_params => header_params,
582
+ :query_params => query_params,
583
+ :form_params => form_params,
584
+ :body => post_body,
585
+ :auth_names => auth_names,
586
+ :return_type => return_type
587
+ )
588
+
589
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
590
+ if @api_client.config.debugging
591
+ @api_client.config.logger.debug "API called: AIControllerApi#generate_structured_content_from_sms\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
592
+ end
593
+ return data, status_code, headers
594
+ end
595
+
596
+ # Get a transformer
597
+ # Get AI transformer and schemas by ID
598
+ # @param id [String]
599
+ # @param [Hash] opts the optional parameters
600
+ # @return [AITransformDto]
601
+ def get_transformer(id, opts = {})
602
+ data, _status_code, _headers = get_transformer_with_http_info(id, opts)
603
+ data
604
+ end
605
+
606
+ # Get a transformer
607
+ # Get AI transformer and schemas by ID
608
+ # @param id [String]
609
+ # @param [Hash] opts the optional parameters
610
+ # @return [Array<(AITransformDto, Integer, Hash)>] AITransformDto data, response status code and response headers
611
+ def get_transformer_with_http_info(id, opts = {})
612
+ if @api_client.config.debugging
613
+ @api_client.config.logger.debug 'Calling API: AIControllerApi.get_transformer ...'
614
+ end
615
+ # verify the required parameter 'id' is set
616
+ if @api_client.config.client_side_validation && id.nil?
617
+ fail ArgumentError, "Missing the required parameter 'id' when calling AIControllerApi.get_transformer"
618
+ end
619
+ # resource path
620
+ local_var_path = '/ai/transformer/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
621
+
622
+ # query parameters
623
+ query_params = opts[:query_params] || {}
624
+
625
+ # header parameters
626
+ header_params = opts[:header_params] || {}
627
+ # HTTP header 'Accept' (if needed)
628
+ header_params['Accept'] = @api_client.select_header_accept(['*/*'])
629
+
630
+ # form parameters
631
+ form_params = opts[:form_params] || {}
632
+
633
+ # http body (model)
634
+ post_body = opts[:body]
635
+
636
+ # return_type
637
+ return_type = opts[:return_type] || 'AITransformDto'
638
+
639
+ # auth_names
640
+ auth_names = opts[:auth_names] || ['API_KEY']
641
+
642
+ new_options = opts.merge(
643
+ :header_params => header_params,
644
+ :query_params => query_params,
645
+ :form_params => form_params,
646
+ :body => post_body,
647
+ :auth_names => auth_names,
648
+ :return_type => return_type
649
+ )
650
+
651
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
652
+ if @api_client.config.debugging
653
+ @api_client.config.logger.debug "API called: AIControllerApi#get_transformer\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
654
+ end
655
+ return data, status_code, headers
656
+ end
657
+
658
+ # Get transformer mapping
659
+ # Get an AI transformer mapping
660
+ # @param id [String] ID of transform mapping
661
+ # @param [Hash] opts the optional parameters
662
+ # @return [AITransformMappingDto]
663
+ def get_transformer_mapping(id, opts = {})
664
+ data, _status_code, _headers = get_transformer_mapping_with_http_info(id, opts)
665
+ data
666
+ end
667
+
668
+ # Get transformer mapping
669
+ # Get an AI transformer mapping
670
+ # @param id [String] ID of transform mapping
671
+ # @param [Hash] opts the optional parameters
672
+ # @return [Array<(AITransformMappingDto, Integer, Hash)>] AITransformMappingDto data, response status code and response headers
673
+ def get_transformer_mapping_with_http_info(id, opts = {})
674
+ if @api_client.config.debugging
675
+ @api_client.config.logger.debug 'Calling API: AIControllerApi.get_transformer_mapping ...'
676
+ end
677
+ # verify the required parameter 'id' is set
678
+ if @api_client.config.client_side_validation && id.nil?
679
+ fail ArgumentError, "Missing the required parameter 'id' when calling AIControllerApi.get_transformer_mapping"
680
+ end
681
+ # resource path
682
+ local_var_path = '/ai/transformer/mappings/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
683
+
684
+ # query parameters
685
+ query_params = opts[:query_params] || {}
686
+
687
+ # header parameters
688
+ header_params = opts[:header_params] || {}
689
+ # HTTP header 'Accept' (if needed)
690
+ header_params['Accept'] = @api_client.select_header_accept(['*/*'])
691
+
692
+ # form parameters
693
+ form_params = opts[:form_params] || {}
694
+
695
+ # http body (model)
696
+ post_body = opts[:body]
697
+
698
+ # return_type
699
+ return_type = opts[:return_type] || 'AITransformMappingDto'
700
+
701
+ # auth_names
702
+ auth_names = opts[:auth_names] || ['API_KEY']
703
+
704
+ new_options = opts.merge(
705
+ :header_params => header_params,
706
+ :query_params => query_params,
707
+ :form_params => form_params,
708
+ :body => post_body,
709
+ :auth_names => auth_names,
710
+ :return_type => return_type
711
+ )
712
+
713
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
714
+ if @api_client.config.debugging
715
+ @api_client.config.logger.debug "API called: AIControllerApi#get_transformer_mapping\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
716
+ end
717
+ return data, status_code, headers
718
+ end
719
+
720
+ # Get transformer mappings
721
+ # Get AI transformer mappings to other entities
722
+ # @param [Hash] opts the optional parameters
723
+ # @option opts [String] :ai_transform_id
724
+ # @option opts [String] :entity_id
725
+ # @option opts [String] :entity_type
726
+ # @option opts [Integer] :page (default to 0)
727
+ # @option opts [Integer] :size Optional page size. Maximum size is 100. Use page index and sort to page through larger results (default to 20)
728
+ # @option opts [String] :sort Optional createdAt sort direction ASC or DESC (default to 'ASC')
729
+ # @return [PageAITransformMappingProjection]
730
+ def get_transformer_mappings(opts = {})
731
+ data, _status_code, _headers = get_transformer_mappings_with_http_info(opts)
732
+ data
733
+ end
734
+
735
+ # Get transformer mappings
736
+ # Get AI transformer mappings to other entities
737
+ # @param [Hash] opts the optional parameters
738
+ # @option opts [String] :ai_transform_id
739
+ # @option opts [String] :entity_id
740
+ # @option opts [String] :entity_type
741
+ # @option opts [Integer] :page
742
+ # @option opts [Integer] :size Optional page size. Maximum size is 100. Use page index and sort to page through larger results
743
+ # @option opts [String] :sort Optional createdAt sort direction ASC or DESC
744
+ # @return [Array<(PageAITransformMappingProjection, Integer, Hash)>] PageAITransformMappingProjection data, response status code and response headers
745
+ def get_transformer_mappings_with_http_info(opts = {})
746
+ if @api_client.config.debugging
747
+ @api_client.config.logger.debug 'Calling API: AIControllerApi.get_transformer_mappings ...'
748
+ end
749
+ allowable_values = ["INBOX", "PHONE"]
750
+ if @api_client.config.client_side_validation && opts[:'entity_type'] && !allowable_values.include?(opts[:'entity_type'])
751
+ fail ArgumentError, "invalid value for \"entity_type\", must be one of #{allowable_values}"
752
+ end
753
+ if @api_client.config.client_side_validation && !opts[:'size'].nil? && opts[:'size'] > 100
754
+ fail ArgumentError, 'invalid value for "opts[:"size"]" when calling AIControllerApi.get_transformer_mappings, must be smaller than or equal to 100.'
755
+ end
756
+
757
+ allowable_values = ["ASC", "DESC"]
758
+ if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
759
+ fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
760
+ end
761
+ # resource path
762
+ local_var_path = '/ai/transformer/mappings'
763
+
764
+ # query parameters
765
+ query_params = opts[:query_params] || {}
766
+ query_params[:'aiTransformId'] = opts[:'ai_transform_id'] if !opts[:'ai_transform_id'].nil?
767
+ query_params[:'entityId'] = opts[:'entity_id'] if !opts[:'entity_id'].nil?
768
+ query_params[:'entityType'] = opts[:'entity_type'] if !opts[:'entity_type'].nil?
769
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
770
+ query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil?
771
+ query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
772
+
773
+ # header parameters
774
+ header_params = opts[:header_params] || {}
775
+ # HTTP header 'Accept' (if needed)
776
+ header_params['Accept'] = @api_client.select_header_accept(['*/*'])
777
+
778
+ # form parameters
779
+ form_params = opts[:form_params] || {}
780
+
781
+ # http body (model)
782
+ post_body = opts[:body]
783
+
784
+ # return_type
785
+ return_type = opts[:return_type] || 'PageAITransformMappingProjection'
786
+
787
+ # auth_names
788
+ auth_names = opts[:auth_names] || ['API_KEY']
789
+
790
+ new_options = opts.merge(
791
+ :header_params => header_params,
792
+ :query_params => query_params,
793
+ :form_params => form_params,
794
+ :body => post_body,
795
+ :auth_names => auth_names,
796
+ :return_type => return_type
797
+ )
798
+
799
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
800
+ if @api_client.config.debugging
801
+ @api_client.config.logger.debug "API called: AIControllerApi#get_transformer_mappings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
802
+ end
803
+ return data, status_code, headers
804
+ end
805
+
806
+ # Get transformer result
807
+ # Get AI transformer result
808
+ # @param id [String] ID of transform result
809
+ # @param [Hash] opts the optional parameters
810
+ # @return [AITransformResultDto]
811
+ def get_transformer_result(id, opts = {})
812
+ data, _status_code, _headers = get_transformer_result_with_http_info(id, opts)
813
+ data
814
+ end
815
+
816
+ # Get transformer result
817
+ # Get AI transformer result
818
+ # @param id [String] ID of transform result
819
+ # @param [Hash] opts the optional parameters
820
+ # @return [Array<(AITransformResultDto, Integer, Hash)>] AITransformResultDto data, response status code and response headers
821
+ def get_transformer_result_with_http_info(id, opts = {})
822
+ if @api_client.config.debugging
823
+ @api_client.config.logger.debug 'Calling API: AIControllerApi.get_transformer_result ...'
824
+ end
825
+ # verify the required parameter 'id' is set
826
+ if @api_client.config.client_side_validation && id.nil?
827
+ fail ArgumentError, "Missing the required parameter 'id' when calling AIControllerApi.get_transformer_result"
828
+ end
829
+ # resource path
830
+ local_var_path = '/ai/transformer/results/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
831
+
832
+ # query parameters
833
+ query_params = opts[:query_params] || {}
834
+
835
+ # header parameters
836
+ header_params = opts[:header_params] || {}
837
+ # HTTP header 'Accept' (if needed)
838
+ header_params['Accept'] = @api_client.select_header_accept(['*/*'])
839
+
840
+ # form parameters
841
+ form_params = opts[:form_params] || {}
842
+
843
+ # http body (model)
844
+ post_body = opts[:body]
845
+
846
+ # return_type
847
+ return_type = opts[:return_type] || 'AITransformResultDto'
848
+
849
+ # auth_names
850
+ auth_names = opts[:auth_names] || ['API_KEY']
851
+
852
+ new_options = opts.merge(
853
+ :header_params => header_params,
854
+ :query_params => query_params,
855
+ :form_params => form_params,
856
+ :body => post_body,
857
+ :auth_names => auth_names,
858
+ :return_type => return_type
859
+ )
860
+
861
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
862
+ if @api_client.config.debugging
863
+ @api_client.config.logger.debug "API called: AIControllerApi#get_transformer_result\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
864
+ end
865
+ return data, status_code, headers
866
+ end
867
+
868
+ # Get transformer results
869
+ # Get AI transformer results
870
+ # @param [Hash] opts the optional parameters
871
+ # @option opts [String] :ai_transform_id
872
+ # @option opts [String] :ai_transform_mapping_id
873
+ # @option opts [String] :entity_id
874
+ # @option opts [String] :entity_type
875
+ # @option opts [Integer] :page (default to 0)
876
+ # @option opts [Integer] :size Optional page size. Maximum size is 100. Use page index and sort to page through larger results (default to 20)
877
+ # @option opts [String] :sort Optional createdAt sort direction ASC or DESC (default to 'ASC')
878
+ # @return [PageAITransformResultProjection]
879
+ def get_transformer_results(opts = {})
880
+ data, _status_code, _headers = get_transformer_results_with_http_info(opts)
881
+ data
882
+ end
883
+
884
+ # Get transformer results
885
+ # Get AI transformer results
886
+ # @param [Hash] opts the optional parameters
887
+ # @option opts [String] :ai_transform_id
888
+ # @option opts [String] :ai_transform_mapping_id
889
+ # @option opts [String] :entity_id
890
+ # @option opts [String] :entity_type
891
+ # @option opts [Integer] :page
892
+ # @option opts [Integer] :size Optional page size. Maximum size is 100. Use page index and sort to page through larger results
893
+ # @option opts [String] :sort Optional createdAt sort direction ASC or DESC
894
+ # @return [Array<(PageAITransformResultProjection, Integer, Hash)>] PageAITransformResultProjection data, response status code and response headers
895
+ def get_transformer_results_with_http_info(opts = {})
896
+ if @api_client.config.debugging
897
+ @api_client.config.logger.debug 'Calling API: AIControllerApi.get_transformer_results ...'
898
+ end
899
+ allowable_values = ["INBOX", "PHONE"]
900
+ if @api_client.config.client_side_validation && opts[:'entity_type'] && !allowable_values.include?(opts[:'entity_type'])
901
+ fail ArgumentError, "invalid value for \"entity_type\", must be one of #{allowable_values}"
902
+ end
903
+ if @api_client.config.client_side_validation && !opts[:'size'].nil? && opts[:'size'] > 100
904
+ fail ArgumentError, 'invalid value for "opts[:"size"]" when calling AIControllerApi.get_transformer_results, must be smaller than or equal to 100.'
905
+ end
906
+
907
+ allowable_values = ["ASC", "DESC"]
908
+ if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
909
+ fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
910
+ end
911
+ # resource path
912
+ local_var_path = '/ai/transformer/results'
913
+
914
+ # query parameters
915
+ query_params = opts[:query_params] || {}
916
+ query_params[:'aiTransformId'] = opts[:'ai_transform_id'] if !opts[:'ai_transform_id'].nil?
917
+ query_params[:'aiTransformMappingId'] = opts[:'ai_transform_mapping_id'] if !opts[:'ai_transform_mapping_id'].nil?
918
+ query_params[:'entityId'] = opts[:'entity_id'] if !opts[:'entity_id'].nil?
919
+ query_params[:'entityType'] = opts[:'entity_type'] if !opts[:'entity_type'].nil?
920
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
921
+ query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil?
922
+ query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
923
+
924
+ # header parameters
925
+ header_params = opts[:header_params] || {}
926
+ # HTTP header 'Accept' (if needed)
927
+ header_params['Accept'] = @api_client.select_header_accept(['*/*'])
928
+
929
+ # form parameters
930
+ form_params = opts[:form_params] || {}
931
+
932
+ # http body (model)
933
+ post_body = opts[:body]
934
+
935
+ # return_type
936
+ return_type = opts[:return_type] || 'PageAITransformResultProjection'
937
+
938
+ # auth_names
939
+ auth_names = opts[:auth_names] || ['API_KEY']
940
+
941
+ new_options = opts.merge(
942
+ :header_params => header_params,
943
+ :query_params => query_params,
944
+ :form_params => form_params,
945
+ :body => post_body,
946
+ :auth_names => auth_names,
947
+ :return_type => return_type
948
+ )
949
+
950
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
951
+ if @api_client.config.debugging
952
+ @api_client.config.logger.debug "API called: AIControllerApi#get_transformer_results\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
953
+ end
954
+ return data, status_code, headers
955
+ end
956
+
150
957
  # Validate structured content schema
151
958
  # Check if a schema is valid and can be used to extract data using AI
152
959
  # @param structured_output_schema [StructuredOutputSchema]