deeprails 0.11.0 → 0.13.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.
Files changed (80) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +26 -0
  3. data/README.md +26 -40
  4. data/lib/deeprails/internal/transport/base_client.rb +7 -1
  5. data/lib/deeprails/internal/transport/pooled_net_requester.rb +6 -2
  6. data/lib/deeprails/internal/type/base_model.rb +5 -5
  7. data/lib/deeprails/models/defend_create_response.rb +51 -0
  8. data/lib/deeprails/models/defend_create_workflow_params.rb +19 -19
  9. data/lib/deeprails/models/defend_response.rb +294 -54
  10. data/lib/deeprails/models/defend_retrieve_workflow_params.rb +13 -1
  11. data/lib/deeprails/models/defend_update_response.rb +51 -0
  12. data/lib/deeprails/models/file_response.rb +6 -22
  13. data/lib/deeprails/models/file_upload_params.rb +3 -3
  14. data/lib/deeprails/models/monitor_create_response.rb +51 -0
  15. data/lib/deeprails/models/monitor_detail_response.rb +103 -104
  16. data/lib/deeprails/models/monitor_event_detail_response.rb +183 -0
  17. data/lib/deeprails/models/monitor_event_response.rb +1 -9
  18. data/lib/deeprails/models/monitor_retrieve_event_params.rb +20 -0
  19. data/lib/deeprails/models/monitor_retrieve_params.rb +6 -2
  20. data/lib/deeprails/models/monitor_update_params.rb +11 -11
  21. data/lib/deeprails/models/monitor_update_response.rb +51 -0
  22. data/lib/deeprails/models/workflow_event_detail_response.rb +314 -0
  23. data/lib/deeprails/models/workflow_event_response.rb +29 -30
  24. data/lib/deeprails/models.rb +13 -1
  25. data/lib/deeprails/resources/defend.rb +20 -13
  26. data/lib/deeprails/resources/files.rb +1 -1
  27. data/lib/deeprails/resources/monitor.rb +38 -8
  28. data/lib/deeprails/version.rb +1 -1
  29. data/lib/deeprails.rb +8 -1
  30. data/manifest.yaml +1 -0
  31. data/rbi/deeprails/internal/transport/base_client.rbi +5 -0
  32. data/rbi/deeprails/internal/transport/pooled_net_requester.rbi +6 -2
  33. data/rbi/deeprails/internal/type/base_model.rbi +8 -4
  34. data/rbi/deeprails/models/defend_create_response.rbi +83 -0
  35. data/rbi/deeprails/models/defend_create_workflow_params.rbi +33 -27
  36. data/rbi/deeprails/models/defend_response.rbi +528 -109
  37. data/rbi/deeprails/models/defend_retrieve_workflow_params.rbi +23 -5
  38. data/rbi/deeprails/models/defend_update_response.rbi +83 -0
  39. data/rbi/deeprails/models/file_response.rbi +11 -39
  40. data/rbi/deeprails/models/file_upload_params.rbi +3 -6
  41. data/rbi/deeprails/models/monitor_create_response.rbi +83 -0
  42. data/rbi/deeprails/models/monitor_detail_response.rbi +168 -167
  43. data/rbi/deeprails/models/monitor_event_detail_response.rbi +386 -0
  44. data/rbi/deeprails/models/monitor_event_response.rbi +4 -18
  45. data/rbi/deeprails/models/monitor_retrieve_event_params.rbi +38 -0
  46. data/rbi/deeprails/models/monitor_retrieve_params.rbi +4 -2
  47. data/rbi/deeprails/models/monitor_update_params.rbi +21 -38
  48. data/rbi/deeprails/models/monitor_update_response.rbi +83 -0
  49. data/rbi/deeprails/models/workflow_event_detail_response.rbi +657 -0
  50. data/rbi/deeprails/models/workflow_event_response.rbi +49 -42
  51. data/rbi/deeprails/models.rbi +13 -1
  52. data/rbi/deeprails/resources/defend.rbi +17 -12
  53. data/rbi/deeprails/resources/files.rbi +1 -1
  54. data/rbi/deeprails/resources/monitor.rbi +25 -8
  55. data/sig/deeprails/internal/transport/base_client.rbs +2 -0
  56. data/sig/deeprails/internal/transport/pooled_net_requester.rbs +4 -1
  57. data/sig/deeprails/models/defend_create_response.rbs +41 -0
  58. data/sig/deeprails/models/defend_create_workflow_params.rbs +7 -7
  59. data/sig/deeprails/models/defend_response.rbs +282 -47
  60. data/sig/deeprails/models/defend_retrieve_workflow_params.rbs +13 -3
  61. data/sig/deeprails/models/defend_update_response.rbs +41 -0
  62. data/sig/deeprails/models/file_response.rbs +5 -27
  63. data/sig/deeprails/models/file_upload_params.rbs +4 -5
  64. data/sig/deeprails/models/monitor_create_response.rbs +41 -0
  65. data/sig/deeprails/models/monitor_detail_response.rbs +80 -89
  66. data/sig/deeprails/models/monitor_event_detail_response.rbs +181 -0
  67. data/sig/deeprails/models/monitor_event_response.rbs +2 -15
  68. data/sig/deeprails/models/monitor_retrieve_event_params.rbs +23 -0
  69. data/sig/deeprails/models/monitor_update_params.rbs +13 -13
  70. data/sig/deeprails/models/monitor_update_response.rbs +41 -0
  71. data/sig/deeprails/models/workflow_event_detail_response.rbs +303 -0
  72. data/sig/deeprails/models/workflow_event_response.rbs +24 -24
  73. data/sig/deeprails/models.rbs +13 -1
  74. data/sig/deeprails/resources/defend.rbs +5 -4
  75. data/sig/deeprails/resources/files.rbs +1 -1
  76. data/sig/deeprails/resources/monitor.rbs +9 -3
  77. metadata +23 -5
  78. data/lib/deeprails/models/monitor_response.rb +0 -83
  79. data/rbi/deeprails/models/monitor_response.rbi +0 -142
  80. data/sig/deeprails/models/monitor_response.rbs +0 -73
@@ -2,108 +2,307 @@
2
2
 
3
3
  module Deeprails
4
4
  module Models
5
- # @see Deeprails::Resources::Defend#create_workflow
5
+ # @see Deeprails::Resources::Defend#retrieve_workflow
6
6
  class DefendResponse < Deeprails::Internal::Type::BaseModel
7
- # @!attribute name
8
- # Name of the workflow.
7
+ # @!attribute automatic_hallucination_tolerance_levels
8
+ # Mapping of guardrail metric names to tolerance values. Values can be strings
9
+ # (`low`, `medium`, `high`) for automatic tolerance levels.
9
10
  #
10
- # @return [String]
11
- required :name, String
11
+ # @return [Hash{Symbol=>Symbol, Deeprails::Models::DefendResponse::AutomaticHallucinationToleranceLevel}]
12
+ required :automatic_hallucination_tolerance_levels,
13
+ -> { Deeprails::Internal::Type::HashOf[enum: Deeprails::DefendResponse::AutomaticHallucinationToleranceLevel] }
12
14
 
13
- # @!attribute workflow_id
14
- # A unique workflow ID.
15
+ # @!attribute capabilities
16
+ # Extended AI capabilities available to the event, if any. Can be `web_search`
17
+ # and/or `file_search`.
15
18
  #
16
- # @return [String]
17
- required :workflow_id, String
19
+ # @return [Array<Deeprails::Models::DefendResponse::Capability>]
20
+ required :capabilities, -> { Deeprails::Internal::Type::ArrayOf[Deeprails::DefendResponse::Capability] }
18
21
 
19
22
  # @!attribute created_at
20
23
  # The time the workflow was created in UTC.
21
24
  #
22
- # @return [Time, nil]
23
- optional :created_at, Time
25
+ # @return [Time]
26
+ required :created_at, Time
27
+
28
+ # @!attribute custom_hallucination_threshold_values
29
+ # Mapping of guardrail metric names to threshold values. Values can be floating
30
+ # point numbers (0.0-1.0) for custom thresholds.
31
+ #
32
+ # @return [Hash{Symbol=>Float}]
33
+ required :custom_hallucination_threshold_values, Deeprails::Internal::Type::HashOf[Float]
24
34
 
25
35
  # @!attribute description
26
36
  # Description for the workflow.
27
37
  #
28
- # @return [String, nil]
29
- optional :description, String
38
+ # @return [String]
39
+ required :description, String
30
40
 
31
- # @!attribute improvement_action
32
- # The action used to improve outputs that fail one or more guardrail metrics for
33
- # the workflow events. May be `regen`, `fixit`, or `do_nothing`. ReGen runs the
34
- # user's input prompt with minor induced variance. FixIt attempts to directly
35
- # address the shortcomings of the output using the guardrail failure rationale. Do
36
- # Nothing does not attempt any improvement.
41
+ # @!attribute events
42
+ # An array of events associated with this workflow.
37
43
  #
38
- # @return [Symbol, Deeprails::Models::DefendResponse::ImprovementAction, nil]
39
- optional :improvement_action, enum: -> { Deeprails::DefendResponse::ImprovementAction }
44
+ # @return [Array<Deeprails::Models::DefendResponse::Event>]
45
+ required :events, -> { Deeprails::Internal::Type::ArrayOf[Deeprails::DefendResponse::Event] }
40
46
 
41
- # @!attribute max_improvement_attempts
42
- # Max. number of improvement action retries until a given event passes the
43
- # guardrails.
47
+ # @!attribute files
48
+ # List of files associated with the workflow. If this is not empty, models can
49
+ # search these files when performing evaluations or remediations
44
50
  #
45
- # @return [Integer, nil]
46
- optional :max_improvement_attempts, Integer
51
+ # @return [Array<Deeprails::Models::DefendResponse::File>]
52
+ required :files, -> { Deeprails::Internal::Type::ArrayOf[Deeprails::DefendResponse::File] }
47
53
 
48
- # @!attribute modified_at
49
- # The most recent time the workflow was modified in UTC.
54
+ # @!attribute name
55
+ # Name of the workflow.
50
56
  #
51
- # @return [Time, nil]
52
- optional :modified_at, Time
57
+ # @return [String]
58
+ required :name, String
53
59
 
54
60
  # @!attribute status
55
61
  # Status of the selected workflow. May be `inactive` or `active`. Inactive
56
62
  # workflows will not accept events.
57
63
  #
58
- # @return [Symbol, Deeprails::Models::DefendResponse::Status, nil]
59
- optional :status, enum: -> { Deeprails::DefendResponse::Status }
64
+ # @return [Symbol, Deeprails::Models::DefendResponse::Status]
65
+ required :status, enum: -> { Deeprails::DefendResponse::Status }
66
+
67
+ # @!attribute threshold_type
68
+ # Type of thresholds used to evaluate the event.
69
+ #
70
+ # @return [Symbol, Deeprails::Models::DefendResponse::ThresholdType]
71
+ required :threshold_type, enum: -> { Deeprails::DefendResponse::ThresholdType }
72
+
73
+ # @!attribute updated_at
74
+ # The most recent time the workflow was updated in UTC.
75
+ #
76
+ # @return [Time]
77
+ required :updated_at, Time
60
78
 
61
- # @!attribute success_rate
62
- # Rate of events associated with this workflow that passed evaluation.
79
+ # @!attribute workflow_id
80
+ # A unique workflow ID.
81
+ #
82
+ # @return [String]
83
+ required :workflow_id, String
84
+
85
+ # @!attribute stats
63
86
  #
64
- # @return [Float, nil]
65
- optional :success_rate, Float
87
+ # @return [Deeprails::Models::DefendResponse::Stats, nil]
88
+ optional :stats, -> { Deeprails::DefendResponse::Stats }
66
89
 
67
- # @!method initialize(name:, workflow_id:, created_at: nil, description: nil, improvement_action: nil, max_improvement_attempts: nil, modified_at: nil, status: nil, success_rate: nil)
90
+ # @!method initialize(automatic_hallucination_tolerance_levels:, capabilities:, created_at:, custom_hallucination_threshold_values:, description:, events:, files:, name:, status:, threshold_type:, updated_at:, workflow_id:, stats: nil)
68
91
  # Some parameter documentations has been truncated, see
69
92
  # {Deeprails::Models::DefendResponse} for more details.
70
93
  #
71
- # @param name [String] Name of the workflow.
94
+ # @param automatic_hallucination_tolerance_levels [Hash{Symbol=>Symbol, Deeprails::Models::DefendResponse::AutomaticHallucinationToleranceLevel}] Mapping of guardrail metric names to tolerance values. Values can be strings (`l
72
95
  #
73
- # @param workflow_id [String] A unique workflow ID.
96
+ # @param capabilities [Array<Deeprails::Models::DefendResponse::Capability>] Extended AI capabilities available to the event, if any. Can be `web_search` and
74
97
  #
75
98
  # @param created_at [Time] The time the workflow was created in UTC.
76
99
  #
100
+ # @param custom_hallucination_threshold_values [Hash{Symbol=>Float}] Mapping of guardrail metric names to threshold values. Values can be floating po
101
+ #
77
102
  # @param description [String] Description for the workflow.
78
103
  #
79
- # @param improvement_action [Symbol, Deeprails::Models::DefendResponse::ImprovementAction] The action used to improve outputs that fail one or more guardrail metrics for t
104
+ # @param events [Array<Deeprails::Models::DefendResponse::Event>] An array of events associated with this workflow.
80
105
  #
81
- # @param max_improvement_attempts [Integer] Max. number of improvement action retries until a given event passes the guardra
106
+ # @param files [Array<Deeprails::Models::DefendResponse::File>] List of files associated with the workflow. If this is not empty, models can sea
82
107
  #
83
- # @param modified_at [Time] The most recent time the workflow was modified in UTC.
108
+ # @param name [String] Name of the workflow.
84
109
  #
85
110
  # @param status [Symbol, Deeprails::Models::DefendResponse::Status] Status of the selected workflow. May be `inactive` or `active`. Inactive workf
86
111
  #
87
- # @param success_rate [Float] Rate of events associated with this workflow that passed evaluation.
88
-
89
- # The action used to improve outputs that fail one or more guardrail metrics for
90
- # the workflow events. May be `regen`, `fixit`, or `do_nothing`. ReGen runs the
91
- # user's input prompt with minor induced variance. FixIt attempts to directly
92
- # address the shortcomings of the output using the guardrail failure rationale. Do
93
- # Nothing does not attempt any improvement.
112
+ # @param threshold_type [Symbol, Deeprails::Models::DefendResponse::ThresholdType] Type of thresholds used to evaluate the event.
113
+ #
114
+ # @param updated_at [Time] The most recent time the workflow was updated in UTC.
94
115
  #
95
- # @see Deeprails::Models::DefendResponse#improvement_action
96
- module ImprovementAction
116
+ # @param workflow_id [String] A unique workflow ID.
117
+ #
118
+ # @param stats [Deeprails::Models::DefendResponse::Stats]
119
+
120
+ module AutomaticHallucinationToleranceLevel
97
121
  extend Deeprails::Internal::Type::Enum
98
122
 
99
- REGEN = :regen
100
- FIXIT = :fixit
101
- DO_NOTHING = :do_nothing
123
+ LOW = :low
124
+ MEDIUM = :medium
125
+ HIGH = :high
102
126
 
103
127
  # @!method self.values
104
128
  # @return [Array<Symbol>]
105
129
  end
106
130
 
131
+ class Capability < Deeprails::Internal::Type::BaseModel
132
+ # @!attribute capability
133
+ #
134
+ # @return [String, nil]
135
+ optional :capability, String
136
+
137
+ # @!method initialize(capability: nil)
138
+ # @param capability [String]
139
+ end
140
+
141
+ class Event < Deeprails::Internal::Type::BaseModel
142
+ # @!attribute evaluations
143
+ # An array of evaluations for this event.
144
+ #
145
+ # @return [Array<Deeprails::Models::DefendResponse::Event::Evaluation>, nil]
146
+ optional :evaluations,
147
+ -> { Deeprails::Internal::Type::ArrayOf[Deeprails::DefendResponse::Event::Evaluation] }
148
+
149
+ # @!attribute event_id
150
+ # A unique workflow event ID.
151
+ #
152
+ # @return [String, nil]
153
+ optional :event_id, String
154
+
155
+ # @!attribute improved_model_output
156
+ # Improved model output after improvement tool was applied.
157
+ #
158
+ # @return [String, nil]
159
+ optional :improved_model_output, String
160
+
161
+ # @!attribute improvement_tool_status
162
+ # Status of the improvement tool used to improve the event.
163
+ #
164
+ # @return [String, nil]
165
+ optional :improvement_tool_status, String
166
+
167
+ # @!method initialize(evaluations: nil, event_id: nil, improved_model_output: nil, improvement_tool_status: nil)
168
+ # @param evaluations [Array<Deeprails::Models::DefendResponse::Event::Evaluation>] An array of evaluations for this event.
169
+ #
170
+ # @param event_id [String] A unique workflow event ID.
171
+ #
172
+ # @param improved_model_output [String] Improved model output after improvement tool was applied.
173
+ #
174
+ # @param improvement_tool_status [String] Status of the improvement tool used to improve the event.
175
+
176
+ class Evaluation < Deeprails::Internal::Type::BaseModel
177
+ # @!attribute attempt
178
+ # The attempt number or identifier for this evaluation.
179
+ #
180
+ # @return [String, nil]
181
+ optional :attempt, String
182
+
183
+ # @!attribute created_at
184
+ # The time the evaluation was created in UTC.
185
+ #
186
+ # @return [Time, nil]
187
+ optional :created_at, Time
188
+
189
+ # @!attribute error_message
190
+ # Error message if the evaluation failed.
191
+ #
192
+ # @return [String, nil]
193
+ optional :error_message, String
194
+
195
+ # @!attribute evaluation_result
196
+ # The result of the evaluation.
197
+ #
198
+ # @return [Hash{Symbol=>Object}, nil]
199
+ optional :evaluation_result, Deeprails::Internal::Type::HashOf[Deeprails::Internal::Type::Unknown]
200
+
201
+ # @!attribute evaluation_status
202
+ # Status of the evaluation.
203
+ #
204
+ # @return [String, nil]
205
+ optional :evaluation_status, String
206
+
207
+ # @!attribute evaluation_total_cost
208
+ # Total cost of the evaluation.
209
+ #
210
+ # @return [Float, nil]
211
+ optional :evaluation_total_cost, Float
212
+
213
+ # @!attribute guardrail_metrics
214
+ # An array of guardrail metrics evaluated.
215
+ #
216
+ # @return [Array<String>, nil]
217
+ optional :guardrail_metrics, Deeprails::Internal::Type::ArrayOf[String]
218
+
219
+ # @!attribute model_input
220
+ # The model input used for the evaluation.
221
+ #
222
+ # @return [Hash{Symbol=>Object}, nil]
223
+ optional :model_input, Deeprails::Internal::Type::HashOf[Deeprails::Internal::Type::Unknown]
224
+
225
+ # @!attribute model_output
226
+ # The model output that was evaluated.
227
+ #
228
+ # @return [String, nil]
229
+ optional :model_output, String
230
+
231
+ # @!attribute modified_at
232
+ # The time the evaluation was last modified in UTC.
233
+ #
234
+ # @return [Time, nil]
235
+ optional :modified_at, Time
236
+
237
+ # @!attribute nametag
238
+ # An optional tag for the evaluation.
239
+ #
240
+ # @return [String, nil]
241
+ optional :nametag, String
242
+
243
+ # @!attribute progress
244
+ # Evaluation progress (0-100).
245
+ #
246
+ # @return [Integer, nil]
247
+ optional :progress, Integer
248
+
249
+ # @!attribute run_mode
250
+ # Run mode used for the evaluation.
251
+ #
252
+ # @return [String, nil]
253
+ optional :run_mode, String
254
+
255
+ # @!method initialize(attempt: nil, created_at: nil, error_message: nil, evaluation_result: nil, evaluation_status: nil, evaluation_total_cost: nil, guardrail_metrics: nil, model_input: nil, model_output: nil, modified_at: nil, nametag: nil, progress: nil, run_mode: nil)
256
+ # @param attempt [String] The attempt number or identifier for this evaluation.
257
+ #
258
+ # @param created_at [Time] The time the evaluation was created in UTC.
259
+ #
260
+ # @param error_message [String] Error message if the evaluation failed.
261
+ #
262
+ # @param evaluation_result [Hash{Symbol=>Object}] The result of the evaluation.
263
+ #
264
+ # @param evaluation_status [String] Status of the evaluation.
265
+ #
266
+ # @param evaluation_total_cost [Float] Total cost of the evaluation.
267
+ #
268
+ # @param guardrail_metrics [Array<String>] An array of guardrail metrics evaluated.
269
+ #
270
+ # @param model_input [Hash{Symbol=>Object}] The model input used for the evaluation.
271
+ #
272
+ # @param model_output [String] The model output that was evaluated.
273
+ #
274
+ # @param modified_at [Time] The time the evaluation was last modified in UTC.
275
+ #
276
+ # @param nametag [String] An optional tag for the evaluation.
277
+ #
278
+ # @param progress [Integer] Evaluation progress (0-100).
279
+ #
280
+ # @param run_mode [String] Run mode used for the evaluation.
281
+ end
282
+ end
283
+
284
+ class File < Deeprails::Internal::Type::BaseModel
285
+ # @!attribute file_id
286
+ #
287
+ # @return [String, nil]
288
+ optional :file_id, String
289
+
290
+ # @!attribute file_name
291
+ #
292
+ # @return [String, nil]
293
+ optional :file_name, String
294
+
295
+ # @!attribute file_size
296
+ #
297
+ # @return [Integer, nil]
298
+ optional :file_size, Integer
299
+
300
+ # @!method initialize(file_id: nil, file_name: nil, file_size: nil)
301
+ # @param file_id [String]
302
+ # @param file_name [String]
303
+ # @param file_size [Integer]
304
+ end
305
+
107
306
  # Status of the selected workflow. May be `inactive` or `active`. Inactive
108
307
  # workflows will not accept events.
109
308
  #
@@ -117,6 +316,47 @@ module Deeprails
117
316
  # @!method self.values
118
317
  # @return [Array<Symbol>]
119
318
  end
319
+
320
+ # Type of thresholds used to evaluate the event.
321
+ #
322
+ # @see Deeprails::Models::DefendResponse#threshold_type
323
+ module ThresholdType
324
+ extend Deeprails::Internal::Type::Enum
325
+
326
+ CUSTOM = :custom
327
+ AUTOMATIC = :automatic
328
+
329
+ # @!method self.values
330
+ # @return [Array<Symbol>]
331
+ end
332
+
333
+ # @see Deeprails::Models::DefendResponse#stats
334
+ class Stats < Deeprails::Internal::Type::BaseModel
335
+ # @!attribute outputs_below_threshold
336
+ # Number of AI outputs that failed the guardrails.
337
+ #
338
+ # @return [Integer, nil]
339
+ optional :outputs_below_threshold, Integer
340
+
341
+ # @!attribute outputs_improved
342
+ # Number of AI outputs that were improved.
343
+ #
344
+ # @return [Integer, nil]
345
+ optional :outputs_improved, Integer
346
+
347
+ # @!attribute outputs_processed
348
+ # Total number of AI outputs processed by the workflow.
349
+ #
350
+ # @return [Integer, nil]
351
+ optional :outputs_processed, Integer
352
+
353
+ # @!method initialize(outputs_below_threshold: nil, outputs_improved: nil, outputs_processed: nil)
354
+ # @param outputs_below_threshold [Integer] Number of AI outputs that failed the guardrails.
355
+ #
356
+ # @param outputs_improved [Integer] Number of AI outputs that were improved.
357
+ #
358
+ # @param outputs_processed [Integer] Total number of AI outputs processed by the workflow.
359
+ end
120
360
  end
121
361
  end
122
362
  end
@@ -7,7 +7,19 @@ module Deeprails
7
7
  extend Deeprails::Internal::Type::RequestParameters::Converter
8
8
  include Deeprails::Internal::Type::RequestParameters
9
9
 
10
- # @!method initialize(request_options: {})
10
+ # @!attribute limit
11
+ # Limit the number of returned events associated with this workflow. Defaults
12
+ # to 10.
13
+ #
14
+ # @return [Integer, nil]
15
+ optional :limit, Integer
16
+
17
+ # @!method initialize(limit: nil, request_options: {})
18
+ # Some parameter documentations has been truncated, see
19
+ # {Deeprails::Models::DefendRetrieveWorkflowParams} for more details.
20
+ #
21
+ # @param limit [Integer] Limit the number of returned events associated with this workflow. Defaults to
22
+ #
11
23
  # @param request_options [Deeprails::RequestOptions, Hash{Symbol=>Object}]
12
24
  end
13
25
  end
@@ -0,0 +1,51 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Deeprails
4
+ module Models
5
+ # @see Deeprails::Resources::Defend#update_workflow
6
+ class DefendUpdateResponse < Deeprails::Internal::Type::BaseModel
7
+ # @!attribute modified_at
8
+ # The time the workflow was last modified in UTC.
9
+ #
10
+ # @return [Time]
11
+ required :modified_at, Time
12
+
13
+ # @!attribute status
14
+ # Status of the selected workflow. May be `inactive` or `active`. Inactive
15
+ # workflows will not accept events.
16
+ #
17
+ # @return [Symbol, Deeprails::Models::DefendUpdateResponse::Status]
18
+ required :status, enum: -> { Deeprails::DefendUpdateResponse::Status }
19
+
20
+ # @!attribute workflow_id
21
+ # A unique workflow ID.
22
+ #
23
+ # @return [String]
24
+ required :workflow_id, String
25
+
26
+ # @!method initialize(modified_at:, status:, workflow_id:)
27
+ # Some parameter documentations has been truncated, see
28
+ # {Deeprails::Models::DefendUpdateResponse} for more details.
29
+ #
30
+ # @param modified_at [Time] The time the workflow was last modified in UTC.
31
+ #
32
+ # @param status [Symbol, Deeprails::Models::DefendUpdateResponse::Status] Status of the selected workflow. May be `inactive` or `active`. Inactive workf
33
+ #
34
+ # @param workflow_id [String] A unique workflow ID.
35
+
36
+ # Status of the selected workflow. May be `inactive` or `active`. Inactive
37
+ # workflows will not accept events.
38
+ #
39
+ # @see Deeprails::Models::DefendUpdateResponse#status
40
+ module Status
41
+ extend Deeprails::Internal::Type::Enum
42
+
43
+ INACTIVE = :inactive
44
+ ACTIVE = :active
45
+
46
+ # @!method self.values
47
+ # @return [Array<Symbol>]
48
+ end
49
+ end
50
+ end
51
+ end
@@ -4,12 +4,6 @@ module Deeprails
4
4
  module Models
5
5
  # @see Deeprails::Resources::Files#upload
6
6
  class FileResponse < Deeprails::Internal::Type::BaseModel
7
- # @!attribute created_at
8
- # The time the file was created in UTC.
9
- #
10
- # @return [Time, nil]
11
- optional :created_at, Time
12
-
13
7
  # @!attribute file_id
14
8
  # A unique file ID.
15
9
  #
@@ -22,28 +16,18 @@ module Deeprails
22
16
  # @return [String, nil]
23
17
  optional :file_name, String
24
18
 
25
- # @!attribute file_path
26
- # Path to the s3 bucket where the file is stored.
19
+ # @!attribute file_size
20
+ # The size of the file in bytes.
27
21
  #
28
- # @return [String, nil]
29
- optional :file_path, String
22
+ # @return [Integer, nil]
23
+ optional :file_size, Integer
30
24
 
31
- # @!attribute updated_at
32
- # The most recent time the file was modified in UTC.
33
- #
34
- # @return [Time, nil]
35
- optional :updated_at, Time
36
-
37
- # @!method initialize(created_at: nil, file_id: nil, file_name: nil, file_path: nil, updated_at: nil)
38
- # @param created_at [Time] The time the file was created in UTC.
39
- #
25
+ # @!method initialize(file_id: nil, file_name: nil, file_size: nil)
40
26
  # @param file_id [String] A unique file ID.
41
27
  #
42
28
  # @param file_name [String] Name of the file.
43
29
  #
44
- # @param file_path [String] Path to the s3 bucket where the file is stored.
45
- #
46
- # @param updated_at [Time] The most recent time the file was modified in UTC.
30
+ # @param file_size [Integer] The size of the file in bytes.
47
31
  end
48
32
  end
49
33
  end
@@ -10,11 +10,11 @@ module Deeprails
10
10
  # @!attribute file
11
11
  # The contents of the file to upload.
12
12
  #
13
- # @return [Pathname, StringIO, IO, String, Deeprails::FilePart]
14
- required :file, Deeprails::Internal::Type::FileInput
13
+ # @return [Array<String>]
14
+ required :file, Deeprails::Internal::Type::ArrayOf[String]
15
15
 
16
16
  # @!method initialize(file:, request_options: {})
17
- # @param file [Pathname, StringIO, IO, String, Deeprails::FilePart] The contents of the file to upload.
17
+ # @param file [Array<String>] The contents of the file to upload.
18
18
  #
19
19
  # @param request_options [Deeprails::RequestOptions, Hash{Symbol=>Object}]
20
20
  end
@@ -0,0 +1,51 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Deeprails
4
+ module Models
5
+ # @see Deeprails::Resources::Monitor#create
6
+ class MonitorCreateResponse < Deeprails::Internal::Type::BaseModel
7
+ # @!attribute created_at
8
+ # The time the monitor was created in UTC.
9
+ #
10
+ # @return [Time]
11
+ required :created_at, Time
12
+
13
+ # @!attribute monitor_id
14
+ # A unique monitor ID.
15
+ #
16
+ # @return [String]
17
+ required :monitor_id, String
18
+
19
+ # @!attribute status
20
+ # Status of the monitor. Can be `active` or `inactive`. Inactive monitors no
21
+ # longer record and evaluate events.
22
+ #
23
+ # @return [Symbol, Deeprails::Models::MonitorCreateResponse::Status]
24
+ required :status, enum: -> { Deeprails::MonitorCreateResponse::Status }
25
+
26
+ # @!method initialize(created_at:, monitor_id:, status:)
27
+ # Some parameter documentations has been truncated, see
28
+ # {Deeprails::Models::MonitorCreateResponse} for more details.
29
+ #
30
+ # @param created_at [Time] The time the monitor was created in UTC.
31
+ #
32
+ # @param monitor_id [String] A unique monitor ID.
33
+ #
34
+ # @param status [Symbol, Deeprails::Models::MonitorCreateResponse::Status] Status of the monitor. Can be `active` or `inactive`. Inactive monitors no lon
35
+
36
+ # Status of the monitor. Can be `active` or `inactive`. Inactive monitors no
37
+ # longer record and evaluate events.
38
+ #
39
+ # @see Deeprails::Models::MonitorCreateResponse#status
40
+ module Status
41
+ extend Deeprails::Internal::Type::Enum
42
+
43
+ ACTIVE = :active
44
+ INACTIVE = :inactive
45
+
46
+ # @!method self.values
47
+ # @return [Array<Symbol>]
48
+ end
49
+ end
50
+ end
51
+ end