deeprails 0.12.0 → 0.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +16 -0
- data/README.md +9 -9
- data/lib/deeprails/models/defend_response.rb +95 -70
- data/lib/deeprails/models/monitor_detail_response.rb +59 -59
- data/lib/deeprails/models/monitor_event_detail_response.rb +1 -0
- data/lib/deeprails/models/monitor_retrieve_event_params.rb +20 -0
- data/lib/deeprails/models/workflow_event_detail_response.rb +116 -116
- data/lib/deeprails/models.rb +2 -0
- data/lib/deeprails/resources/monitor.rb +27 -0
- data/lib/deeprails/version.rb +1 -1
- data/lib/deeprails.rb +1 -0
- data/rbi/deeprails/models/defend_response.rbi +163 -165
- data/rbi/deeprails/models/monitor_detail_response.rbi +82 -121
- data/rbi/deeprails/models/monitor_event_detail_response.rbi +7 -4
- data/rbi/deeprails/models/monitor_retrieve_event_params.rbi +38 -0
- data/rbi/deeprails/models/workflow_event_detail_response.rbi +250 -278
- data/rbi/deeprails/models.rbi +2 -0
- data/rbi/deeprails/resources/monitor.rbi +17 -0
- data/sig/deeprails/models/defend_response.rbs +72 -85
- data/sig/deeprails/models/monitor_detail_response.rbs +39 -59
- data/sig/deeprails/models/monitor_retrieve_event_params.rbs +23 -0
- data/sig/deeprails/models/workflow_event_detail_response.rbs +98 -110
- data/sig/deeprails/models.rbs +2 -0
- data/sig/deeprails/resources/monitor.rbs +6 -0
- metadata +5 -2
|
@@ -8,83 +8,35 @@ module Deeprails
|
|
|
8
8
|
T.any(Deeprails::MonitorDetailResponse, Deeprails::Internal::AnyHash)
|
|
9
9
|
end
|
|
10
10
|
|
|
11
|
-
# A unique monitor ID.
|
|
12
|
-
sig { returns(String) }
|
|
13
|
-
attr_accessor :monitor_id
|
|
14
|
-
|
|
15
|
-
# Name of this monitor.
|
|
16
|
-
sig { returns(String) }
|
|
17
|
-
attr_accessor :name
|
|
18
|
-
|
|
19
|
-
# Status of the monitor. Can be `active` or `inactive`. Inactive monitors no
|
|
20
|
-
# longer record and evaluate events.
|
|
21
|
-
sig { returns(Deeprails::MonitorDetailResponse::Status::TaggedSymbol) }
|
|
22
|
-
attr_accessor :status
|
|
23
|
-
|
|
24
11
|
# An array of capabilities associated with this monitor.
|
|
25
|
-
sig
|
|
26
|
-
|
|
27
|
-
T.nilable(T::Array[Deeprails::MonitorDetailResponse::Capability])
|
|
28
|
-
)
|
|
29
|
-
end
|
|
30
|
-
attr_reader :capabilities
|
|
31
|
-
|
|
32
|
-
sig do
|
|
33
|
-
params(
|
|
34
|
-
capabilities:
|
|
35
|
-
T::Array[Deeprails::MonitorDetailResponse::Capability::OrHash]
|
|
36
|
-
).void
|
|
37
|
-
end
|
|
38
|
-
attr_writer :capabilities
|
|
12
|
+
sig { returns(T::Array[Deeprails::MonitorDetailResponse::Capability]) }
|
|
13
|
+
attr_accessor :capabilities
|
|
39
14
|
|
|
40
15
|
# The time the monitor was created in UTC.
|
|
41
|
-
sig { returns(
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
sig { params(created_at: Time).void }
|
|
45
|
-
attr_writer :created_at
|
|
46
|
-
|
|
47
|
-
# Description of this monitor.
|
|
48
|
-
sig { returns(T.nilable(String)) }
|
|
49
|
-
attr_reader :description
|
|
50
|
-
|
|
51
|
-
sig { params(description: String).void }
|
|
52
|
-
attr_writer :description
|
|
16
|
+
sig { returns(Time) }
|
|
17
|
+
attr_accessor :created_at
|
|
53
18
|
|
|
54
19
|
# An array of all evaluations performed by this monitor. Each one corresponds to a
|
|
55
20
|
# separate monitor event.
|
|
56
|
-
sig
|
|
57
|
-
|
|
58
|
-
T.nilable(T::Array[Deeprails::MonitorDetailResponse::Evaluation])
|
|
59
|
-
)
|
|
60
|
-
end
|
|
61
|
-
attr_reader :evaluations
|
|
62
|
-
|
|
63
|
-
sig do
|
|
64
|
-
params(
|
|
65
|
-
evaluations:
|
|
66
|
-
T::Array[Deeprails::MonitorDetailResponse::Evaluation::OrHash]
|
|
67
|
-
).void
|
|
68
|
-
end
|
|
69
|
-
attr_writer :evaluations
|
|
21
|
+
sig { returns(T::Array[Deeprails::MonitorDetailResponse::Evaluation]) }
|
|
22
|
+
attr_accessor :evaluations
|
|
70
23
|
|
|
71
24
|
# An array of files associated with this monitor.
|
|
72
|
-
sig
|
|
73
|
-
|
|
74
|
-
end
|
|
75
|
-
attr_reader :files
|
|
25
|
+
sig { returns(T::Array[Deeprails::MonitorDetailResponse::File]) }
|
|
26
|
+
attr_accessor :files
|
|
76
27
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
28
|
+
# A unique monitor ID.
|
|
29
|
+
sig { returns(String) }
|
|
30
|
+
attr_accessor :monitor_id
|
|
31
|
+
|
|
32
|
+
# Name of this monitor.
|
|
33
|
+
sig { returns(String) }
|
|
34
|
+
attr_accessor :name
|
|
83
35
|
|
|
84
36
|
# Contains five fields used for stats of this monitor: total evaluations,
|
|
85
37
|
# completed evaluations, failed evaluations, queued evaluations, and in progress
|
|
86
38
|
# evaluations.
|
|
87
|
-
sig { returns(
|
|
39
|
+
sig { returns(Deeprails::MonitorDetailResponse::Stats) }
|
|
88
40
|
attr_reader :stats
|
|
89
41
|
|
|
90
42
|
sig do
|
|
@@ -92,105 +44,86 @@ module Deeprails
|
|
|
92
44
|
end
|
|
93
45
|
attr_writer :stats
|
|
94
46
|
|
|
47
|
+
# Status of the monitor. Can be `active` or `inactive`. Inactive monitors no
|
|
48
|
+
# longer record and evaluate events.
|
|
49
|
+
sig { returns(Deeprails::MonitorDetailResponse::Status::TaggedSymbol) }
|
|
50
|
+
attr_accessor :status
|
|
51
|
+
|
|
95
52
|
# The most recent time the monitor was modified in UTC.
|
|
96
|
-
sig { returns(
|
|
97
|
-
|
|
53
|
+
sig { returns(Time) }
|
|
54
|
+
attr_accessor :updated_at
|
|
98
55
|
|
|
99
|
-
|
|
100
|
-
|
|
56
|
+
# Description of this monitor.
|
|
57
|
+
sig { returns(T.nilable(String)) }
|
|
58
|
+
attr_reader :description
|
|
59
|
+
|
|
60
|
+
sig { params(description: String).void }
|
|
61
|
+
attr_writer :description
|
|
101
62
|
|
|
102
63
|
sig do
|
|
103
64
|
params(
|
|
104
|
-
monitor_id: String,
|
|
105
|
-
name: String,
|
|
106
|
-
status: Deeprails::MonitorDetailResponse::Status::OrSymbol,
|
|
107
65
|
capabilities:
|
|
108
66
|
T::Array[Deeprails::MonitorDetailResponse::Capability::OrHash],
|
|
109
67
|
created_at: Time,
|
|
110
|
-
description: String,
|
|
111
68
|
evaluations:
|
|
112
69
|
T::Array[Deeprails::MonitorDetailResponse::Evaluation::OrHash],
|
|
113
70
|
files: T::Array[Deeprails::MonitorDetailResponse::File::OrHash],
|
|
71
|
+
monitor_id: String,
|
|
72
|
+
name: String,
|
|
114
73
|
stats: Deeprails::MonitorDetailResponse::Stats::OrHash,
|
|
115
|
-
|
|
74
|
+
status: Deeprails::MonitorDetailResponse::Status::OrSymbol,
|
|
75
|
+
updated_at: Time,
|
|
76
|
+
description: String
|
|
116
77
|
).returns(T.attached_class)
|
|
117
78
|
end
|
|
118
79
|
def self.new(
|
|
119
|
-
# A unique monitor ID.
|
|
120
|
-
monitor_id:,
|
|
121
|
-
# Name of this monitor.
|
|
122
|
-
name:,
|
|
123
|
-
# Status of the monitor. Can be `active` or `inactive`. Inactive monitors no
|
|
124
|
-
# longer record and evaluate events.
|
|
125
|
-
status:,
|
|
126
80
|
# An array of capabilities associated with this monitor.
|
|
127
|
-
capabilities
|
|
81
|
+
capabilities:,
|
|
128
82
|
# The time the monitor was created in UTC.
|
|
129
|
-
created_at
|
|
130
|
-
# Description of this monitor.
|
|
131
|
-
description: nil,
|
|
83
|
+
created_at:,
|
|
132
84
|
# An array of all evaluations performed by this monitor. Each one corresponds to a
|
|
133
85
|
# separate monitor event.
|
|
134
|
-
evaluations
|
|
86
|
+
evaluations:,
|
|
135
87
|
# An array of files associated with this monitor.
|
|
136
|
-
files
|
|
88
|
+
files:,
|
|
89
|
+
# A unique monitor ID.
|
|
90
|
+
monitor_id:,
|
|
91
|
+
# Name of this monitor.
|
|
92
|
+
name:,
|
|
137
93
|
# Contains five fields used for stats of this monitor: total evaluations,
|
|
138
94
|
# completed evaluations, failed evaluations, queued evaluations, and in progress
|
|
139
95
|
# evaluations.
|
|
140
|
-
stats
|
|
96
|
+
stats:,
|
|
97
|
+
# Status of the monitor. Can be `active` or `inactive`. Inactive monitors no
|
|
98
|
+
# longer record and evaluate events.
|
|
99
|
+
status:,
|
|
141
100
|
# The most recent time the monitor was modified in UTC.
|
|
142
|
-
updated_at
|
|
101
|
+
updated_at:,
|
|
102
|
+
# Description of this monitor.
|
|
103
|
+
description: nil
|
|
143
104
|
)
|
|
144
105
|
end
|
|
145
106
|
|
|
146
107
|
sig do
|
|
147
108
|
override.returns(
|
|
148
109
|
{
|
|
149
|
-
monitor_id: String,
|
|
150
|
-
name: String,
|
|
151
|
-
status: Deeprails::MonitorDetailResponse::Status::TaggedSymbol,
|
|
152
110
|
capabilities:
|
|
153
111
|
T::Array[Deeprails::MonitorDetailResponse::Capability],
|
|
154
112
|
created_at: Time,
|
|
155
|
-
description: String,
|
|
156
113
|
evaluations: T::Array[Deeprails::MonitorDetailResponse::Evaluation],
|
|
157
114
|
files: T::Array[Deeprails::MonitorDetailResponse::File],
|
|
115
|
+
monitor_id: String,
|
|
116
|
+
name: String,
|
|
158
117
|
stats: Deeprails::MonitorDetailResponse::Stats,
|
|
159
|
-
|
|
118
|
+
status: Deeprails::MonitorDetailResponse::Status::TaggedSymbol,
|
|
119
|
+
updated_at: Time,
|
|
120
|
+
description: String
|
|
160
121
|
}
|
|
161
122
|
)
|
|
162
123
|
end
|
|
163
124
|
def to_hash
|
|
164
125
|
end
|
|
165
126
|
|
|
166
|
-
# Status of the monitor. Can be `active` or `inactive`. Inactive monitors no
|
|
167
|
-
# longer record and evaluate events.
|
|
168
|
-
module Status
|
|
169
|
-
extend Deeprails::Internal::Type::Enum
|
|
170
|
-
|
|
171
|
-
TaggedSymbol =
|
|
172
|
-
T.type_alias do
|
|
173
|
-
T.all(Symbol, Deeprails::MonitorDetailResponse::Status)
|
|
174
|
-
end
|
|
175
|
-
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
176
|
-
|
|
177
|
-
ACTIVE =
|
|
178
|
-
T.let(:active, Deeprails::MonitorDetailResponse::Status::TaggedSymbol)
|
|
179
|
-
INACTIVE =
|
|
180
|
-
T.let(
|
|
181
|
-
:inactive,
|
|
182
|
-
Deeprails::MonitorDetailResponse::Status::TaggedSymbol
|
|
183
|
-
)
|
|
184
|
-
|
|
185
|
-
sig do
|
|
186
|
-
override.returns(
|
|
187
|
-
T::Array[Deeprails::MonitorDetailResponse::Status::TaggedSymbol]
|
|
188
|
-
)
|
|
189
|
-
end
|
|
190
|
-
def self.values
|
|
191
|
-
end
|
|
192
|
-
end
|
|
193
|
-
|
|
194
127
|
class Capability < Deeprails::Internal::Type::BaseModel
|
|
195
128
|
OrHash =
|
|
196
129
|
T.type_alias do
|
|
@@ -765,6 +698,34 @@ module Deeprails
|
|
|
765
698
|
def to_hash
|
|
766
699
|
end
|
|
767
700
|
end
|
|
701
|
+
|
|
702
|
+
# Status of the monitor. Can be `active` or `inactive`. Inactive monitors no
|
|
703
|
+
# longer record and evaluate events.
|
|
704
|
+
module Status
|
|
705
|
+
extend Deeprails::Internal::Type::Enum
|
|
706
|
+
|
|
707
|
+
TaggedSymbol =
|
|
708
|
+
T.type_alias do
|
|
709
|
+
T.all(Symbol, Deeprails::MonitorDetailResponse::Status)
|
|
710
|
+
end
|
|
711
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
712
|
+
|
|
713
|
+
ACTIVE =
|
|
714
|
+
T.let(:active, Deeprails::MonitorDetailResponse::Status::TaggedSymbol)
|
|
715
|
+
INACTIVE =
|
|
716
|
+
T.let(
|
|
717
|
+
:inactive,
|
|
718
|
+
Deeprails::MonitorDetailResponse::Status::TaggedSymbol
|
|
719
|
+
)
|
|
720
|
+
|
|
721
|
+
sig do
|
|
722
|
+
override.returns(
|
|
723
|
+
T::Array[Deeprails::MonitorDetailResponse::Status::TaggedSymbol]
|
|
724
|
+
)
|
|
725
|
+
end
|
|
726
|
+
def self.values
|
|
727
|
+
end
|
|
728
|
+
end
|
|
768
729
|
end
|
|
769
730
|
end
|
|
770
731
|
end
|
|
@@ -101,7 +101,9 @@ module Deeprails
|
|
|
101
101
|
# The run mode used to evaluate the monitor event.
|
|
102
102
|
sig do
|
|
103
103
|
returns(
|
|
104
|
-
T.nilable(
|
|
104
|
+
T.nilable(
|
|
105
|
+
Deeprails::MonitorEventDetailResponse::RunMode::TaggedSymbol
|
|
106
|
+
)
|
|
105
107
|
)
|
|
106
108
|
end
|
|
107
109
|
attr_reader :run_mode
|
|
@@ -116,7 +118,7 @@ module Deeprails
|
|
|
116
118
|
# Status of the monitor event's evaluation.
|
|
117
119
|
sig do
|
|
118
120
|
returns(
|
|
119
|
-
T.nilable(Deeprails::MonitorEventDetailResponse::Status::
|
|
121
|
+
T.nilable(Deeprails::MonitorEventDetailResponse::Status::TaggedSymbol)
|
|
120
122
|
)
|
|
121
123
|
end
|
|
122
124
|
attr_reader :status
|
|
@@ -197,8 +199,9 @@ module Deeprails
|
|
|
197
199
|
model_output: String,
|
|
198
200
|
monitor_id: String,
|
|
199
201
|
nametag: String,
|
|
200
|
-
run_mode:
|
|
201
|
-
|
|
202
|
+
run_mode:
|
|
203
|
+
Deeprails::MonitorEventDetailResponse::RunMode::TaggedSymbol,
|
|
204
|
+
status: Deeprails::MonitorEventDetailResponse::Status::TaggedSymbol,
|
|
202
205
|
timestamp: Time
|
|
203
206
|
}
|
|
204
207
|
)
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Deeprails
|
|
4
|
+
module Models
|
|
5
|
+
class MonitorRetrieveEventParams < Deeprails::Internal::Type::BaseModel
|
|
6
|
+
extend Deeprails::Internal::Type::RequestParameters::Converter
|
|
7
|
+
include Deeprails::Internal::Type::RequestParameters
|
|
8
|
+
|
|
9
|
+
OrHash =
|
|
10
|
+
T.type_alias do
|
|
11
|
+
T.any(
|
|
12
|
+
Deeprails::MonitorRetrieveEventParams,
|
|
13
|
+
Deeprails::Internal::AnyHash
|
|
14
|
+
)
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
sig { returns(String) }
|
|
18
|
+
attr_accessor :monitor_id
|
|
19
|
+
|
|
20
|
+
sig do
|
|
21
|
+
params(
|
|
22
|
+
monitor_id: String,
|
|
23
|
+
request_options: Deeprails::RequestOptions::OrHash
|
|
24
|
+
).returns(T.attached_class)
|
|
25
|
+
end
|
|
26
|
+
def self.new(monitor_id:, request_options: {})
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
sig do
|
|
30
|
+
override.returns(
|
|
31
|
+
{ monitor_id: String, request_options: Deeprails::RequestOptions }
|
|
32
|
+
)
|
|
33
|
+
end
|
|
34
|
+
def to_hash
|
|
35
|
+
end
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
end
|