Skip to content

Commit 382667d

Browse files
feat(api): api update (#79)
1 parent c8fe96f commit 382667d

File tree

4 files changed

+44
-7
lines changed

4 files changed

+44
-7
lines changed

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 41
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch%2Ffinch-63d6857158c2634529b468b53df0b9c02f42d6f9783399939a38986e3137a86f.yml
3-
openapi_spec_hash: 2c3aea6ae3e0a3dd7ac65c25b8fdc24d
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch%2Ffinch-3224f142ed1542ed2535c155e8eb23b7ea10470c12448d60c3ce584126073a93.yml
3+
openapi_spec_hash: 6c4b213ed5e4f7d1b369e04e4bfb5164
44
config_hash: 8303e755d3e16cf28542d5f0aec83851

lib/finch-api/models/introspection.rb

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,16 @@ module ClientType
253253
end
254254

255255
class ConnectionStatus < FinchAPI::BaseModel
256+
# @!attribute [r] last_successful_sync
257+
# The datetime when the connection was last successfully synced.
258+
#
259+
# @return [Time, nil]
260+
optional :last_successful_sync, Time
261+
262+
# @!parse
263+
# # @return [Time]
264+
# attr_writer :last_successful_sync
265+
256266
# @!attribute [r] message
257267
#
258268
# @return [String, nil]
@@ -272,10 +282,11 @@ class ConnectionStatus < FinchAPI::BaseModel
272282
# attr_writer :status
273283

274284
# @!parse
285+
# # @param last_successful_sync [Time]
275286
# # @param message [String]
276287
# # @param status [Symbol, FinchAPI::Models::ConnectionStatusType]
277288
# #
278-
# def initialize(message: nil, status: nil, **) = super
289+
# def initialize(last_successful_sync: nil, message: nil, status: nil, **) = super
279290

280291
# def initialize: (Hash | FinchAPI::BaseModel) -> void
281292
end

rbi/lib/finch-api/models/introspection.rbi

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,13 @@ module FinchAPI
265265
end
266266

267267
class ConnectionStatus < FinchAPI::BaseModel
268+
# The datetime when the connection was last successfully synced.
269+
sig { returns(T.nilable(Time)) }
270+
attr_reader :last_successful_sync
271+
272+
sig { params(last_successful_sync: Time).void }
273+
attr_writer :last_successful_sync
274+
268275
sig { returns(T.nilable(String)) }
269276
attr_reader :message
270277

@@ -278,12 +285,22 @@ module FinchAPI
278285
attr_writer :status
279286

280287
sig do
281-
params(message: String, status: FinchAPI::Models::ConnectionStatusType::OrSymbol).returns(T.attached_class)
288+
params(
289+
last_successful_sync: Time,
290+
message: String,
291+
status: FinchAPI::Models::ConnectionStatusType::OrSymbol
292+
)
293+
.returns(T.attached_class)
282294
end
283-
def self.new(message: nil, status: nil)
295+
def self.new(last_successful_sync: nil, message: nil, status: nil)
284296
end
285297

286-
sig { override.returns({message: String, status: FinchAPI::Models::ConnectionStatusType::TaggedSymbol}) }
298+
sig do
299+
override
300+
.returns(
301+
{last_successful_sync: Time, message: String, status: FinchAPI::Models::ConnectionStatusType::TaggedSymbol}
302+
)
303+
end
287304
def to_hash
288305
end
289306
end

sig/finch-api/models/introspection.rbs

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,9 +157,17 @@ module FinchAPI
157157
end
158158

159159
type connection_status =
160-
{ message: String, status: FinchAPI::Models::connection_status_type }
160+
{
161+
last_successful_sync: Time,
162+
message: String,
163+
status: FinchAPI::Models::connection_status_type
164+
}
161165

162166
class ConnectionStatus < FinchAPI::BaseModel
167+
attr_reader last_successful_sync: Time?
168+
169+
def last_successful_sync=: (Time) -> Time
170+
163171
attr_reader message: String?
164172

165173
def message=: (String) -> String
@@ -171,6 +179,7 @@ module FinchAPI
171179
) -> FinchAPI::Models::connection_status_type
172180

173181
def initialize: (
182+
?last_successful_sync: Time,
174183
?message: String,
175184
?status: FinchAPI::Models::connection_status_type
176185
) -> void

0 commit comments

Comments
 (0)