files.com 1.1.583 → 1.1.585

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.
@@ -0,0 +1,199 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Files
4
+ class ExpectationIncident
5
+ attr_reader :options, :attributes
6
+
7
+ def initialize(attributes = {}, options = {})
8
+ @attributes = attributes || {}
9
+ @options = options || {}
10
+ end
11
+
12
+ # int64 - Expectation Incident ID
13
+ def id
14
+ @attributes[:id]
15
+ end
16
+
17
+ # int64 - Workspace ID. `0` means the default workspace.
18
+ def workspace_id
19
+ @attributes[:workspace_id]
20
+ end
21
+
22
+ # int64 - Expectation ID.
23
+ def expectation_id
24
+ @attributes[:expectation_id]
25
+ end
26
+
27
+ # string - Incident status.
28
+ def status
29
+ @attributes[:status]
30
+ end
31
+
32
+ # date-time - When the incident was opened.
33
+ def opened_at
34
+ @attributes[:opened_at]
35
+ end
36
+
37
+ # date-time - When the most recent failing evaluation contributing to the incident occurred.
38
+ def last_failed_at
39
+ @attributes[:last_failed_at]
40
+ end
41
+
42
+ # date-time - When the incident was acknowledged.
43
+ def acknowledged_at
44
+ @attributes[:acknowledged_at]
45
+ end
46
+
47
+ # date-time - When the current snooze expires.
48
+ def snoozed_until
49
+ @attributes[:snoozed_until]
50
+ end
51
+
52
+ # date-time - When the incident was resolved.
53
+ def resolved_at
54
+ @attributes[:resolved_at]
55
+ end
56
+
57
+ # int64 - Evaluation that first opened the incident.
58
+ def opened_by_evaluation_id
59
+ @attributes[:opened_by_evaluation_id]
60
+ end
61
+
62
+ # int64 - Most recent evaluation linked to the incident.
63
+ def last_evaluation_id
64
+ @attributes[:last_evaluation_id]
65
+ end
66
+
67
+ # int64 - Evaluation that resolved the incident.
68
+ def resolved_by_evaluation_id
69
+ @attributes[:resolved_by_evaluation_id]
70
+ end
71
+
72
+ # object - Compact incident summary payload.
73
+ def summary
74
+ @attributes[:summary]
75
+ end
76
+
77
+ # date-time - Creation time.
78
+ def created_at
79
+ @attributes[:created_at]
80
+ end
81
+
82
+ # date-time - Last update time.
83
+ def updated_at
84
+ @attributes[:updated_at]
85
+ end
86
+
87
+ # Resolve an expectation incident
88
+ def resolve(params = {})
89
+ params ||= {}
90
+ params[:id] = @attributes[:id]
91
+ raise MissingParameterError.new("Current object doesn't have a id") unless @attributes[:id]
92
+ raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
93
+ raise MissingParameterError.new("Parameter missing: id") unless params[:id]
94
+
95
+ Api.send_request("/expectation_incidents/#{@attributes[:id]}/resolve", :post, params, @options)
96
+ end
97
+
98
+ # Snooze an expectation incident until a specified time
99
+ #
100
+ # Parameters:
101
+ # snoozed_until (required) - string - Time until which the incident should remain snoozed.
102
+ def snooze(params = {})
103
+ params ||= {}
104
+ params[:id] = @attributes[:id]
105
+ raise MissingParameterError.new("Current object doesn't have a id") unless @attributes[:id]
106
+ raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
107
+ raise InvalidParameterError.new("Bad parameter: snoozed_until must be an String") if params[:snoozed_until] and !params[:snoozed_until].is_a?(String)
108
+ raise MissingParameterError.new("Parameter missing: id") unless params[:id]
109
+ raise MissingParameterError.new("Parameter missing: snoozed_until") unless params[:snoozed_until]
110
+
111
+ Api.send_request("/expectation_incidents/#{@attributes[:id]}/snooze", :post, params, @options)
112
+ end
113
+
114
+ # Acknowledge an expectation incident
115
+ def acknowledge(params = {})
116
+ params ||= {}
117
+ params[:id] = @attributes[:id]
118
+ raise MissingParameterError.new("Current object doesn't have a id") unless @attributes[:id]
119
+ raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
120
+ raise MissingParameterError.new("Parameter missing: id") unless params[:id]
121
+
122
+ Api.send_request("/expectation_incidents/#{@attributes[:id]}/acknowledge", :post, params, @options)
123
+ end
124
+
125
+ # Parameters:
126
+ # cursor - string - Used for pagination. When a list request has more records available, cursors are provided in the response headers `X-Files-Cursor-Next` and `X-Files-Cursor-Prev`. Send one of those cursor value here to resume an existing list from the next available record. Note: many of our SDKs have iterator methods that will automatically handle cursor-based pagination.
127
+ # per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
128
+ # sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `workspace_id`, `created_at` or `expectation_id`.
129
+ # filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `expectation_id` and `workspace_id`. Valid field combinations are `[ workspace_id, expectation_id ]`.
130
+ def self.list(params = {}, options = {})
131
+ raise InvalidParameterError.new("Bad parameter: cursor must be an String") if params[:cursor] and !params[:cursor].is_a?(String)
132
+ raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if params[:per_page] and !params[:per_page].is_a?(Integer)
133
+ raise InvalidParameterError.new("Bad parameter: sort_by must be an Hash") if params[:sort_by] and !params[:sort_by].is_a?(Hash)
134
+ raise InvalidParameterError.new("Bad parameter: filter must be an Hash") if params[:filter] and !params[:filter].is_a?(Hash)
135
+
136
+ List.new(ExpectationIncident, params) do
137
+ Api.send_request("/expectation_incidents", :get, params, options)
138
+ end
139
+ end
140
+
141
+ def self.all(params = {}, options = {})
142
+ list(params, options)
143
+ end
144
+
145
+ # Parameters:
146
+ # id (required) - int64 - Expectation Incident ID.
147
+ def self.find(id, params = {}, options = {})
148
+ params ||= {}
149
+ params[:id] = id
150
+ raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
151
+ raise MissingParameterError.new("Parameter missing: id") unless params[:id]
152
+
153
+ response, options = Api.send_request("/expectation_incidents/#{params[:id]}", :get, params, options)
154
+ ExpectationIncident.new(response.data, options)
155
+ end
156
+
157
+ def self.get(id, params = {}, options = {})
158
+ find(id, params, options)
159
+ end
160
+
161
+ # Resolve an expectation incident
162
+ def self.resolve(id, params = {}, options = {})
163
+ params ||= {}
164
+ params[:id] = id
165
+ raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
166
+ raise MissingParameterError.new("Parameter missing: id") unless params[:id]
167
+
168
+ response, options = Api.send_request("/expectation_incidents/#{params[:id]}/resolve", :post, params, options)
169
+ ExpectationIncident.new(response.data, options)
170
+ end
171
+
172
+ # Snooze an expectation incident until a specified time
173
+ #
174
+ # Parameters:
175
+ # snoozed_until (required) - string - Time until which the incident should remain snoozed.
176
+ def self.snooze(id, params = {}, options = {})
177
+ params ||= {}
178
+ params[:id] = id
179
+ raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
180
+ raise InvalidParameterError.new("Bad parameter: snoozed_until must be an String") if params[:snoozed_until] and !params[:snoozed_until].is_a?(String)
181
+ raise MissingParameterError.new("Parameter missing: id") unless params[:id]
182
+ raise MissingParameterError.new("Parameter missing: snoozed_until") unless params[:snoozed_until]
183
+
184
+ response, options = Api.send_request("/expectation_incidents/#{params[:id]}/snooze", :post, params, options)
185
+ ExpectationIncident.new(response.data, options)
186
+ end
187
+
188
+ # Acknowledge an expectation incident
189
+ def self.acknowledge(id, params = {}, options = {})
190
+ params ||= {}
191
+ params[:id] = id
192
+ raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
193
+ raise MissingParameterError.new("Parameter missing: id") unless params[:id]
194
+
195
+ response, options = Api.send_request("/expectation_incidents/#{params[:id]}/acknowledge", :post, params, options)
196
+ ExpectationIncident.new(response.data, options)
197
+ end
198
+ end
199
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Files
4
- VERSION = "1.1.583"
4
+ VERSION = "1.1.585"
5
5
  end
data/lib/files.com.rb CHANGED
@@ -66,6 +66,9 @@ require "files.com/models/email_incoming_message"
66
66
  require "files.com/models/email_log"
67
67
  require "files.com/models/errors"
68
68
  require "files.com/models/exavault_api_request_log"
69
+ require "files.com/models/expectation"
70
+ require "files.com/models/expectation_evaluation"
71
+ require "files.com/models/expectation_incident"
69
72
  require "files.com/models/external_event"
70
73
  require "files.com/models/file"
71
74
  require "files.com/models/file_action"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: files.com
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.583
4
+ version: 1.1.585
5
5
  platform: ruby
6
6
  authors:
7
7
  - files.com
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-03-23 00:00:00.000000000 Z
11
+ date: 2026-03-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: addressable
@@ -204,6 +204,9 @@ files:
204
204
  - docs/email_log.md
205
205
  - docs/errors.md
206
206
  - docs/exavault_api_request_log.md
207
+ - docs/expectation.md
208
+ - docs/expectation_evaluation.md
209
+ - docs/expectation_incident.md
207
210
  - docs/external_event.md
208
211
  - docs/file.md
209
212
  - docs/file_action.md
@@ -328,6 +331,9 @@ files:
328
331
  - lib/files.com/models/email_log.rb
329
332
  - lib/files.com/models/errors.rb
330
333
  - lib/files.com/models/exavault_api_request_log.rb
334
+ - lib/files.com/models/expectation.rb
335
+ - lib/files.com/models/expectation_evaluation.rb
336
+ - lib/files.com/models/expectation_incident.rb
331
337
  - lib/files.com/models/external_event.rb
332
338
  - lib/files.com/models/file.rb
333
339
  - lib/files.com/models/file_action.rb