finch-api 0.1.0.pre.alpha.27 → 0.1.0.pre.alpha.29
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 +21 -0
- data/README.md +1 -1
- data/lib/finch_api/models/access_token_create_params.rb +21 -13
- data/lib/finch_api/models/create_access_token_response.rb +42 -42
- data/lib/finch_api/models/introspection.rb +205 -133
- data/lib/finch_api/resources/access_tokens.rb +9 -5
- data/lib/finch_api/version.rb +1 -1
- data/rbi/finch_api/models/access_token_create_params.rbi +17 -15
- data/rbi/finch_api/models/create_access_token_response.rbi +54 -51
- data/rbi/finch_api/models/introspection.rbi +343 -223
- data/rbi/finch_api/resources/access_tokens.rbi +7 -3
- data/sig/finch_api/models/access_token_create_params.rbs +7 -11
- data/sig/finch_api/models/create_access_token_response.rbs +25 -23
- data/sig/finch_api/models/introspection.rbs +160 -111
- data/sig/finch_api/resources/access_tokens.rbs +2 -2
- metadata +2 -2
@@ -8,19 +8,11 @@ module FinchAPI
|
|
8
8
|
T.any(FinchAPI::Introspection, FinchAPI::Internal::AnyHash)
|
9
9
|
end
|
10
10
|
|
11
|
-
# The Finch UUID of the token being introspected
|
11
|
+
# The Finch UUID of the token being introspected
|
12
12
|
sig { returns(String) }
|
13
13
|
attr_accessor :id
|
14
14
|
|
15
|
-
#
|
16
|
-
# instead of this account ID.
|
17
|
-
sig { returns(String) }
|
18
|
-
attr_accessor :account_id
|
19
|
-
|
20
|
-
sig { returns(T::Array[FinchAPI::Introspection::AuthenticationMethod]) }
|
21
|
-
attr_accessor :authentication_methods
|
22
|
-
|
23
|
-
# The client ID of the application associated with the `access_token`.
|
15
|
+
# The client ID of the application associated with the `access_token`
|
24
16
|
sig { returns(String) }
|
25
17
|
attr_accessor :client_id
|
26
18
|
|
@@ -28,12 +20,7 @@ module FinchAPI
|
|
28
20
|
sig { returns(FinchAPI::Introspection::ClientType::TaggedSymbol) }
|
29
21
|
attr_accessor :client_type
|
30
22
|
|
31
|
-
#
|
32
|
-
# instead of this company ID.
|
33
|
-
sig { returns(String) }
|
34
|
-
attr_accessor :company_id
|
35
|
-
|
36
|
-
# The Finch UUID of the connection associated with the `access_token`.
|
23
|
+
# The Finch UUID of the connection associated with the `access_token`
|
37
24
|
sig { returns(String) }
|
38
25
|
attr_accessor :connection_id
|
39
26
|
|
@@ -54,81 +41,131 @@ module FinchAPI
|
|
54
41
|
sig { returns(FinchAPI::Introspection::ConnectionType::TaggedSymbol) }
|
55
42
|
attr_accessor :connection_type
|
56
43
|
|
44
|
+
# An array of the authorized products associated with the `access_token`.
|
45
|
+
sig { returns(T::Array[String]) }
|
46
|
+
attr_accessor :products
|
47
|
+
|
48
|
+
# The ID of the provider associated with the `access_token`.
|
49
|
+
sig { returns(String) }
|
50
|
+
attr_accessor :provider_id
|
51
|
+
|
52
|
+
# [DEPRECATED] Use `connection_id` to associate tokens with a Finch connection
|
53
|
+
# instead of this account ID
|
54
|
+
sig { returns(T.nilable(String)) }
|
55
|
+
attr_reader :account_id
|
56
|
+
|
57
|
+
sig { params(account_id: String).void }
|
58
|
+
attr_writer :account_id
|
59
|
+
|
60
|
+
sig do
|
61
|
+
returns(
|
62
|
+
T.nilable(T::Array[FinchAPI::Introspection::AuthenticationMethod])
|
63
|
+
)
|
64
|
+
end
|
65
|
+
attr_reader :authentication_methods
|
66
|
+
|
67
|
+
sig do
|
68
|
+
params(
|
69
|
+
authentication_methods:
|
70
|
+
T::Array[FinchAPI::Introspection::AuthenticationMethod::OrHash]
|
71
|
+
).void
|
72
|
+
end
|
73
|
+
attr_writer :authentication_methods
|
74
|
+
|
75
|
+
# [DEPRECATED] Use `connection_id` to associate tokens with a Finch connection
|
76
|
+
# instead of this company ID
|
77
|
+
sig { returns(T.nilable(String)) }
|
78
|
+
attr_reader :company_id
|
79
|
+
|
80
|
+
sig { params(company_id: String).void }
|
81
|
+
attr_writer :company_id
|
82
|
+
|
57
83
|
# The email of your customer you provided to Finch when a connect session was
|
58
|
-
# created for this connection
|
84
|
+
# created for this connection
|
59
85
|
sig { returns(T.nilable(String)) }
|
60
86
|
attr_accessor :customer_email
|
61
87
|
|
62
88
|
# The ID of your customer you provided to Finch when a connect session was created
|
63
|
-
# for this connection
|
89
|
+
# for this connection
|
64
90
|
sig { returns(T.nilable(String)) }
|
65
91
|
attr_accessor :customer_id
|
66
92
|
|
67
93
|
# The name of your customer you provided to Finch when a connect session was
|
68
|
-
# created for this connection
|
94
|
+
# created for this connection
|
69
95
|
sig { returns(T.nilable(String)) }
|
70
96
|
attr_accessor :customer_name
|
71
97
|
|
98
|
+
# Array of entity IDs associated with this connection.
|
99
|
+
sig { returns(T.nilable(T::Array[String])) }
|
100
|
+
attr_reader :entity_ids
|
101
|
+
|
102
|
+
sig { params(entity_ids: T::Array[String]).void }
|
103
|
+
attr_writer :entity_ids
|
104
|
+
|
105
|
+
# Indicates whether this connection manages a single entity or multiple entities.
|
106
|
+
sig do
|
107
|
+
returns(T.nilable(FinchAPI::Introspection::EntityMode::TaggedSymbol))
|
108
|
+
end
|
109
|
+
attr_reader :entity_mode
|
110
|
+
|
111
|
+
sig do
|
112
|
+
params(entity_mode: FinchAPI::Introspection::EntityMode::OrSymbol).void
|
113
|
+
end
|
114
|
+
attr_writer :entity_mode
|
115
|
+
|
72
116
|
# Whether the connection associated with the `access_token` uses the Assisted
|
73
117
|
# Connect Flow. (`true` if using Assisted Connect, `false` if connection is
|
74
118
|
# automated)
|
75
|
-
sig { returns(T::Boolean) }
|
76
|
-
|
119
|
+
sig { returns(T.nilable(T::Boolean)) }
|
120
|
+
attr_reader :manual
|
121
|
+
|
122
|
+
sig { params(manual: T::Boolean).void }
|
123
|
+
attr_writer :manual
|
77
124
|
|
78
125
|
# [DEPRECATED] Use `provider_id` to identify the provider instead of this payroll
|
79
126
|
# provider ID.
|
80
|
-
sig { returns(String) }
|
81
|
-
|
82
|
-
|
83
|
-
# An array of the authorized products associated with the `access_token`.
|
84
|
-
sig { returns(T::Array[String]) }
|
85
|
-
attr_accessor :products
|
127
|
+
sig { returns(T.nilable(String)) }
|
128
|
+
attr_reader :payroll_provider_id
|
86
129
|
|
87
|
-
|
88
|
-
|
89
|
-
attr_accessor :provider_id
|
130
|
+
sig { params(payroll_provider_id: String).void }
|
131
|
+
attr_writer :payroll_provider_id
|
90
132
|
|
91
133
|
# The account username used for login associated with the `access_token`.
|
92
|
-
sig { returns(String) }
|
134
|
+
sig { returns(T.nilable(String)) }
|
93
135
|
attr_accessor :username
|
94
136
|
|
95
137
|
sig do
|
96
138
|
params(
|
97
139
|
id: String,
|
98
|
-
account_id: String,
|
99
|
-
authentication_methods:
|
100
|
-
T::Array[FinchAPI::Introspection::AuthenticationMethod::OrHash],
|
101
140
|
client_id: String,
|
102
141
|
client_type: FinchAPI::Introspection::ClientType::OrSymbol,
|
103
|
-
company_id: String,
|
104
142
|
connection_id: String,
|
105
143
|
connection_status: FinchAPI::Introspection::ConnectionStatus::OrHash,
|
106
144
|
connection_type: FinchAPI::Introspection::ConnectionType::OrSymbol,
|
145
|
+
products: T::Array[String],
|
146
|
+
provider_id: String,
|
147
|
+
account_id: String,
|
148
|
+
authentication_methods:
|
149
|
+
T::Array[FinchAPI::Introspection::AuthenticationMethod::OrHash],
|
150
|
+
company_id: String,
|
107
151
|
customer_email: T.nilable(String),
|
108
152
|
customer_id: T.nilable(String),
|
109
153
|
customer_name: T.nilable(String),
|
154
|
+
entity_ids: T::Array[String],
|
155
|
+
entity_mode: FinchAPI::Introspection::EntityMode::OrSymbol,
|
110
156
|
manual: T::Boolean,
|
111
157
|
payroll_provider_id: String,
|
112
|
-
|
113
|
-
provider_id: String,
|
114
|
-
username: String
|
158
|
+
username: T.nilable(String)
|
115
159
|
).returns(T.attached_class)
|
116
160
|
end
|
117
161
|
def self.new(
|
118
|
-
# The Finch UUID of the token being introspected
|
162
|
+
# The Finch UUID of the token being introspected
|
119
163
|
id:,
|
120
|
-
#
|
121
|
-
# instead of this account ID.
|
122
|
-
account_id:,
|
123
|
-
authentication_methods:,
|
124
|
-
# The client ID of the application associated with the `access_token`.
|
164
|
+
# The client ID of the application associated with the `access_token`
|
125
165
|
client_id:,
|
126
166
|
# The type of application associated with a token.
|
127
167
|
client_type:,
|
128
|
-
#
|
129
|
-
# instead of this company ID.
|
130
|
-
company_id:,
|
131
|
-
# The Finch UUID of the connection associated with the `access_token`.
|
168
|
+
# The Finch UUID of the connection associated with the `access_token`
|
132
169
|
connection_id:,
|
133
170
|
connection_status:,
|
134
171
|
# The type of the connection associated with the token.
|
@@ -136,28 +173,39 @@ module FinchAPI
|
|
136
173
|
# - `provider` - connection to an external provider
|
137
174
|
# - `finch` - finch-generated data.
|
138
175
|
connection_type:,
|
176
|
+
# An array of the authorized products associated with the `access_token`.
|
177
|
+
products:,
|
178
|
+
# The ID of the provider associated with the `access_token`.
|
179
|
+
provider_id:,
|
180
|
+
# [DEPRECATED] Use `connection_id` to associate tokens with a Finch connection
|
181
|
+
# instead of this account ID
|
182
|
+
account_id: nil,
|
183
|
+
authentication_methods: nil,
|
184
|
+
# [DEPRECATED] Use `connection_id` to associate tokens with a Finch connection
|
185
|
+
# instead of this company ID
|
186
|
+
company_id: nil,
|
139
187
|
# The email of your customer you provided to Finch when a connect session was
|
140
|
-
# created for this connection
|
141
|
-
customer_email
|
188
|
+
# created for this connection
|
189
|
+
customer_email: nil,
|
142
190
|
# The ID of your customer you provided to Finch when a connect session was created
|
143
|
-
# for this connection
|
144
|
-
customer_id
|
191
|
+
# for this connection
|
192
|
+
customer_id: nil,
|
145
193
|
# The name of your customer you provided to Finch when a connect session was
|
146
|
-
# created for this connection
|
147
|
-
customer_name
|
194
|
+
# created for this connection
|
195
|
+
customer_name: nil,
|
196
|
+
# Array of entity IDs associated with this connection.
|
197
|
+
entity_ids: nil,
|
198
|
+
# Indicates whether this connection manages a single entity or multiple entities.
|
199
|
+
entity_mode: nil,
|
148
200
|
# Whether the connection associated with the `access_token` uses the Assisted
|
149
201
|
# Connect Flow. (`true` if using Assisted Connect, `false` if connection is
|
150
202
|
# automated)
|
151
|
-
manual
|
203
|
+
manual: nil,
|
152
204
|
# [DEPRECATED] Use `provider_id` to identify the provider instead of this payroll
|
153
205
|
# provider ID.
|
154
|
-
payroll_provider_id
|
155
|
-
# An array of the authorized products associated with the `access_token`.
|
156
|
-
products:,
|
157
|
-
# The ID of the provider associated with the `access_token`.
|
158
|
-
provider_id:,
|
206
|
+
payroll_provider_id: nil,
|
159
207
|
# The account username used for login associated with the `access_token`.
|
160
|
-
username:
|
208
|
+
username: nil
|
161
209
|
)
|
162
210
|
end
|
163
211
|
|
@@ -165,156 +213,238 @@ module FinchAPI
|
|
165
213
|
override.returns(
|
166
214
|
{
|
167
215
|
id: String,
|
168
|
-
account_id: String,
|
169
|
-
authentication_methods:
|
170
|
-
T::Array[FinchAPI::Introspection::AuthenticationMethod],
|
171
216
|
client_id: String,
|
172
217
|
client_type: FinchAPI::Introspection::ClientType::TaggedSymbol,
|
173
|
-
company_id: String,
|
174
218
|
connection_id: String,
|
175
219
|
connection_status: FinchAPI::Introspection::ConnectionStatus,
|
176
220
|
connection_type:
|
177
221
|
FinchAPI::Introspection::ConnectionType::TaggedSymbol,
|
222
|
+
products: T::Array[String],
|
223
|
+
provider_id: String,
|
224
|
+
account_id: String,
|
225
|
+
authentication_methods:
|
226
|
+
T::Array[FinchAPI::Introspection::AuthenticationMethod],
|
227
|
+
company_id: String,
|
178
228
|
customer_email: T.nilable(String),
|
179
229
|
customer_id: T.nilable(String),
|
180
230
|
customer_name: T.nilable(String),
|
231
|
+
entity_ids: T::Array[String],
|
232
|
+
entity_mode: FinchAPI::Introspection::EntityMode::TaggedSymbol,
|
181
233
|
manual: T::Boolean,
|
182
234
|
payroll_provider_id: String,
|
183
|
-
|
184
|
-
provider_id: String,
|
185
|
-
username: String
|
235
|
+
username: T.nilable(String)
|
186
236
|
}
|
187
237
|
)
|
188
238
|
end
|
189
239
|
def to_hash
|
190
240
|
end
|
191
241
|
|
192
|
-
|
242
|
+
# The type of application associated with a token.
|
243
|
+
module ClientType
|
244
|
+
extend FinchAPI::Internal::Type::Enum
|
245
|
+
|
246
|
+
TaggedSymbol =
|
247
|
+
T.type_alias { T.all(Symbol, FinchAPI::Introspection::ClientType) }
|
248
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
249
|
+
|
250
|
+
DEVELOPMENT =
|
251
|
+
T.let(:development, FinchAPI::Introspection::ClientType::TaggedSymbol)
|
252
|
+
PRODUCTION =
|
253
|
+
T.let(:production, FinchAPI::Introspection::ClientType::TaggedSymbol)
|
254
|
+
SANDBOX =
|
255
|
+
T.let(:sandbox, FinchAPI::Introspection::ClientType::TaggedSymbol)
|
256
|
+
|
257
|
+
sig do
|
258
|
+
override.returns(
|
259
|
+
T::Array[FinchAPI::Introspection::ClientType::TaggedSymbol]
|
260
|
+
)
|
261
|
+
end
|
262
|
+
def self.values
|
263
|
+
end
|
264
|
+
end
|
265
|
+
|
266
|
+
class ConnectionStatus < FinchAPI::Internal::Type::BaseModel
|
193
267
|
OrHash =
|
194
268
|
T.type_alias do
|
195
269
|
T.any(
|
196
|
-
FinchAPI::Introspection::
|
270
|
+
FinchAPI::Introspection::ConnectionStatus,
|
197
271
|
FinchAPI::Internal::AnyHash
|
198
272
|
)
|
199
273
|
end
|
200
274
|
|
275
|
+
sig { returns(FinchAPI::ConnectionStatusType::TaggedSymbol) }
|
276
|
+
attr_accessor :status
|
277
|
+
|
278
|
+
# The datetime when the connection was last successfully synced
|
201
279
|
sig do
|
202
280
|
returns(
|
203
281
|
T.nilable(
|
204
|
-
FinchAPI::Introspection::
|
282
|
+
FinchAPI::Introspection::ConnectionStatus::LastSuccessfulSync::Variants
|
205
283
|
)
|
206
284
|
)
|
207
285
|
end
|
208
|
-
|
286
|
+
attr_accessor :last_successful_sync
|
287
|
+
|
288
|
+
sig { returns(T.nilable(String)) }
|
289
|
+
attr_reader :message
|
290
|
+
|
291
|
+
sig { params(message: String).void }
|
292
|
+
attr_writer :message
|
209
293
|
|
210
294
|
sig do
|
211
295
|
params(
|
212
|
-
|
213
|
-
|
214
|
-
|
296
|
+
status: FinchAPI::ConnectionStatusType::OrSymbol,
|
297
|
+
last_successful_sync:
|
298
|
+
T.nilable(
|
299
|
+
FinchAPI::Introspection::ConnectionStatus::LastSuccessfulSync::Variants
|
300
|
+
),
|
301
|
+
message: String
|
302
|
+
).returns(T.attached_class)
|
303
|
+
end
|
304
|
+
def self.new(
|
305
|
+
status:,
|
306
|
+
# The datetime when the connection was last successfully synced
|
307
|
+
last_successful_sync: nil,
|
308
|
+
message: nil
|
309
|
+
)
|
215
310
|
end
|
216
|
-
attr_writer :connection_status
|
217
311
|
|
218
|
-
|
219
|
-
|
220
|
-
|
312
|
+
sig do
|
313
|
+
override.returns(
|
314
|
+
{
|
315
|
+
status: FinchAPI::ConnectionStatusType::TaggedSymbol,
|
316
|
+
last_successful_sync:
|
317
|
+
T.nilable(
|
318
|
+
FinchAPI::Introspection::ConnectionStatus::LastSuccessfulSync::Variants
|
319
|
+
),
|
320
|
+
message: String
|
321
|
+
}
|
322
|
+
)
|
323
|
+
end
|
324
|
+
def to_hash
|
325
|
+
end
|
221
326
|
|
222
|
-
|
223
|
-
|
327
|
+
# The datetime when the connection was last successfully synced
|
328
|
+
module LastSuccessfulSync
|
329
|
+
extend FinchAPI::Internal::Type::Union
|
330
|
+
|
331
|
+
Variants = T.type_alias { T.any(Time, String) }
|
332
|
+
|
333
|
+
sig do
|
334
|
+
override.returns(
|
335
|
+
T::Array[
|
336
|
+
FinchAPI::Introspection::ConnectionStatus::LastSuccessfulSync::Variants
|
337
|
+
]
|
338
|
+
)
|
339
|
+
end
|
340
|
+
def self.variants
|
341
|
+
end
|
342
|
+
end
|
343
|
+
end
|
344
|
+
|
345
|
+
# The type of the connection associated with the token.
|
346
|
+
#
|
347
|
+
# - `provider` - connection to an external provider
|
348
|
+
# - `finch` - finch-generated data.
|
349
|
+
module ConnectionType
|
350
|
+
extend FinchAPI::Internal::Type::Enum
|
351
|
+
|
352
|
+
TaggedSymbol =
|
353
|
+
T.type_alias do
|
354
|
+
T.all(Symbol, FinchAPI::Introspection::ConnectionType)
|
355
|
+
end
|
356
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
357
|
+
|
358
|
+
FINCH =
|
359
|
+
T.let(:finch, FinchAPI::Introspection::ConnectionType::TaggedSymbol)
|
360
|
+
PROVIDER =
|
361
|
+
T.let(
|
362
|
+
:provider,
|
363
|
+
FinchAPI::Introspection::ConnectionType::TaggedSymbol
|
364
|
+
)
|
365
|
+
|
366
|
+
sig do
|
367
|
+
override.returns(
|
368
|
+
T::Array[FinchAPI::Introspection::ConnectionType::TaggedSymbol]
|
369
|
+
)
|
370
|
+
end
|
371
|
+
def self.values
|
372
|
+
end
|
373
|
+
end
|
374
|
+
|
375
|
+
class AuthenticationMethod < FinchAPI::Internal::Type::BaseModel
|
376
|
+
OrHash =
|
377
|
+
T.type_alias do
|
378
|
+
T.any(
|
379
|
+
FinchAPI::Introspection::AuthenticationMethod,
|
380
|
+
FinchAPI::Internal::AnyHash
|
381
|
+
)
|
382
|
+
end
|
383
|
+
|
384
|
+
# The type of authentication method
|
385
|
+
sig do
|
386
|
+
returns(
|
387
|
+
FinchAPI::Introspection::AuthenticationMethod::Type::TaggedSymbol
|
388
|
+
)
|
389
|
+
end
|
390
|
+
attr_accessor :type
|
224
391
|
|
225
|
-
# The type of authentication method.
|
226
392
|
sig do
|
227
393
|
returns(
|
228
394
|
T.nilable(
|
229
|
-
FinchAPI::Introspection::AuthenticationMethod::
|
395
|
+
FinchAPI::Introspection::AuthenticationMethod::ConnectionStatus
|
230
396
|
)
|
231
397
|
)
|
232
398
|
end
|
233
|
-
attr_reader :
|
399
|
+
attr_reader :connection_status
|
234
400
|
|
235
401
|
sig do
|
236
402
|
params(
|
237
|
-
|
403
|
+
connection_status:
|
404
|
+
FinchAPI::Introspection::AuthenticationMethod::ConnectionStatus::OrHash
|
238
405
|
).void
|
239
406
|
end
|
240
|
-
attr_writer :
|
407
|
+
attr_writer :connection_status
|
408
|
+
|
409
|
+
# An array of the authorized products associated with the `access_token`
|
410
|
+
sig { returns(T.nilable(T::Array[String])) }
|
411
|
+
attr_reader :products
|
412
|
+
|
413
|
+
sig { params(products: T::Array[String]).void }
|
414
|
+
attr_writer :products
|
241
415
|
|
242
416
|
sig do
|
243
417
|
params(
|
418
|
+
type: FinchAPI::Introspection::AuthenticationMethod::Type::OrSymbol,
|
244
419
|
connection_status:
|
245
420
|
FinchAPI::Introspection::AuthenticationMethod::ConnectionStatus::OrHash,
|
246
|
-
products: T::Array[String]
|
247
|
-
type: FinchAPI::Introspection::AuthenticationMethod::Type::OrSymbol
|
421
|
+
products: T::Array[String]
|
248
422
|
).returns(T.attached_class)
|
249
423
|
end
|
250
424
|
def self.new(
|
425
|
+
# The type of authentication method
|
426
|
+
type:,
|
251
427
|
connection_status: nil,
|
252
|
-
# An array of the authorized products associated with the `access_token
|
253
|
-
products: nil
|
254
|
-
# The type of authentication method.
|
255
|
-
type: nil
|
428
|
+
# An array of the authorized products associated with the `access_token`
|
429
|
+
products: nil
|
256
430
|
)
|
257
431
|
end
|
258
432
|
|
259
433
|
sig do
|
260
434
|
override.returns(
|
261
435
|
{
|
436
|
+
type:
|
437
|
+
FinchAPI::Introspection::AuthenticationMethod::Type::TaggedSymbol,
|
262
438
|
connection_status:
|
263
439
|
FinchAPI::Introspection::AuthenticationMethod::ConnectionStatus,
|
264
|
-
products: T::Array[String]
|
265
|
-
type:
|
266
|
-
FinchAPI::Introspection::AuthenticationMethod::Type::TaggedSymbol
|
440
|
+
products: T::Array[String]
|
267
441
|
}
|
268
442
|
)
|
269
443
|
end
|
270
444
|
def to_hash
|
271
445
|
end
|
272
446
|
|
273
|
-
|
274
|
-
OrHash =
|
275
|
-
T.type_alias do
|
276
|
-
T.any(
|
277
|
-
FinchAPI::Introspection::AuthenticationMethod::ConnectionStatus,
|
278
|
-
FinchAPI::Internal::AnyHash
|
279
|
-
)
|
280
|
-
end
|
281
|
-
|
282
|
-
sig { returns(T.nilable(String)) }
|
283
|
-
attr_reader :message
|
284
|
-
|
285
|
-
sig { params(message: String).void }
|
286
|
-
attr_writer :message
|
287
|
-
|
288
|
-
sig do
|
289
|
-
returns(T.nilable(FinchAPI::ConnectionStatusType::TaggedSymbol))
|
290
|
-
end
|
291
|
-
attr_reader :status
|
292
|
-
|
293
|
-
sig { params(status: FinchAPI::ConnectionStatusType::OrSymbol).void }
|
294
|
-
attr_writer :status
|
295
|
-
|
296
|
-
sig do
|
297
|
-
params(
|
298
|
-
message: String,
|
299
|
-
status: FinchAPI::ConnectionStatusType::OrSymbol
|
300
|
-
).returns(T.attached_class)
|
301
|
-
end
|
302
|
-
def self.new(message: nil, status: nil)
|
303
|
-
end
|
304
|
-
|
305
|
-
sig do
|
306
|
-
override.returns(
|
307
|
-
{
|
308
|
-
message: String,
|
309
|
-
status: FinchAPI::ConnectionStatusType::TaggedSymbol
|
310
|
-
}
|
311
|
-
)
|
312
|
-
end
|
313
|
-
def to_hash
|
314
|
-
end
|
315
|
-
end
|
316
|
-
|
317
|
-
# The type of authentication method.
|
447
|
+
# The type of authentication method
|
318
448
|
module Type
|
319
449
|
extend FinchAPI::Internal::Type::Enum
|
320
450
|
|
@@ -360,112 +490,102 @@ module FinchAPI
|
|
360
490
|
def self.values
|
361
491
|
end
|
362
492
|
end
|
363
|
-
end
|
364
|
-
|
365
|
-
# The type of application associated with a token.
|
366
|
-
module ClientType
|
367
|
-
extend FinchAPI::Internal::Type::Enum
|
368
493
|
|
369
|
-
|
370
|
-
|
371
|
-
|
372
|
-
|
373
|
-
|
374
|
-
|
375
|
-
|
376
|
-
|
377
|
-
SANDBOX =
|
378
|
-
T.let(:sandbox, FinchAPI::Introspection::ClientType::TaggedSymbol)
|
494
|
+
class ConnectionStatus < FinchAPI::Internal::Type::BaseModel
|
495
|
+
OrHash =
|
496
|
+
T.type_alias do
|
497
|
+
T.any(
|
498
|
+
FinchAPI::Introspection::AuthenticationMethod::ConnectionStatus,
|
499
|
+
FinchAPI::Internal::AnyHash
|
500
|
+
)
|
501
|
+
end
|
379
502
|
|
380
|
-
|
381
|
-
|
382
|
-
T::Array[FinchAPI::Introspection::ClientType::TaggedSymbol]
|
383
|
-
)
|
384
|
-
end
|
385
|
-
def self.values
|
386
|
-
end
|
387
|
-
end
|
503
|
+
sig { returns(FinchAPI::ConnectionStatusType::TaggedSymbol) }
|
504
|
+
attr_accessor :status
|
388
505
|
|
389
|
-
|
390
|
-
|
391
|
-
|
392
|
-
|
393
|
-
|
394
|
-
|
506
|
+
# The datetime when the connection was last successfully synced
|
507
|
+
sig do
|
508
|
+
returns(
|
509
|
+
T.nilable(
|
510
|
+
FinchAPI::Introspection::AuthenticationMethod::ConnectionStatus::LastSuccessfulSync::Variants
|
511
|
+
)
|
395
512
|
)
|
396
513
|
end
|
514
|
+
attr_accessor :last_successful_sync
|
397
515
|
|
398
|
-
|
399
|
-
|
400
|
-
attr_reader :last_successful_sync
|
401
|
-
|
402
|
-
sig { params(last_successful_sync: Time).void }
|
403
|
-
attr_writer :last_successful_sync
|
516
|
+
sig { returns(T.nilable(String)) }
|
517
|
+
attr_reader :message
|
404
518
|
|
405
|
-
|
406
|
-
|
519
|
+
sig { params(message: String).void }
|
520
|
+
attr_writer :message
|
407
521
|
|
408
|
-
|
409
|
-
|
522
|
+
sig do
|
523
|
+
params(
|
524
|
+
status: FinchAPI::ConnectionStatusType::OrSymbol,
|
525
|
+
last_successful_sync:
|
526
|
+
T.nilable(
|
527
|
+
FinchAPI::Introspection::AuthenticationMethod::ConnectionStatus::LastSuccessfulSync::Variants
|
528
|
+
),
|
529
|
+
message: String
|
530
|
+
).returns(T.attached_class)
|
531
|
+
end
|
532
|
+
def self.new(
|
533
|
+
status:,
|
534
|
+
# The datetime when the connection was last successfully synced
|
535
|
+
last_successful_sync: nil,
|
536
|
+
message: nil
|
537
|
+
)
|
538
|
+
end
|
410
539
|
|
411
|
-
|
412
|
-
|
540
|
+
sig do
|
541
|
+
override.returns(
|
542
|
+
{
|
543
|
+
status: FinchAPI::ConnectionStatusType::TaggedSymbol,
|
544
|
+
last_successful_sync:
|
545
|
+
T.nilable(
|
546
|
+
FinchAPI::Introspection::AuthenticationMethod::ConnectionStatus::LastSuccessfulSync::Variants
|
547
|
+
),
|
548
|
+
message: String
|
549
|
+
}
|
550
|
+
)
|
551
|
+
end
|
552
|
+
def to_hash
|
553
|
+
end
|
413
554
|
|
414
|
-
|
415
|
-
|
555
|
+
# The datetime when the connection was last successfully synced
|
556
|
+
module LastSuccessfulSync
|
557
|
+
extend FinchAPI::Internal::Type::Union
|
416
558
|
|
417
|
-
|
418
|
-
params(
|
419
|
-
last_successful_sync: Time,
|
420
|
-
message: String,
|
421
|
-
status: FinchAPI::ConnectionStatusType::OrSymbol
|
422
|
-
).returns(T.attached_class)
|
423
|
-
end
|
424
|
-
def self.new(
|
425
|
-
# The datetime when the connection was last successfully synced.
|
426
|
-
last_successful_sync: nil,
|
427
|
-
message: nil,
|
428
|
-
status: nil
|
429
|
-
)
|
430
|
-
end
|
559
|
+
Variants = T.type_alias { T.any(Time, String) }
|
431
560
|
|
432
|
-
|
433
|
-
|
434
|
-
|
435
|
-
|
436
|
-
|
437
|
-
|
438
|
-
|
439
|
-
|
440
|
-
|
441
|
-
|
561
|
+
sig do
|
562
|
+
override.returns(
|
563
|
+
T::Array[
|
564
|
+
FinchAPI::Introspection::AuthenticationMethod::ConnectionStatus::LastSuccessfulSync::Variants
|
565
|
+
]
|
566
|
+
)
|
567
|
+
end
|
568
|
+
def self.variants
|
569
|
+
end
|
570
|
+
end
|
442
571
|
end
|
443
572
|
end
|
444
573
|
|
445
|
-
#
|
446
|
-
|
447
|
-
# - `provider` - connection to an external provider
|
448
|
-
# - `finch` - finch-generated data.
|
449
|
-
module ConnectionType
|
574
|
+
# Indicates whether this connection manages a single entity or multiple entities.
|
575
|
+
module EntityMode
|
450
576
|
extend FinchAPI::Internal::Type::Enum
|
451
577
|
|
452
578
|
TaggedSymbol =
|
453
|
-
T.type_alias
|
454
|
-
T.all(Symbol, FinchAPI::Introspection::ConnectionType)
|
455
|
-
end
|
579
|
+
T.type_alias { T.all(Symbol, FinchAPI::Introspection::EntityMode) }
|
456
580
|
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
457
581
|
|
458
|
-
|
459
|
-
T.let(
|
460
|
-
|
461
|
-
FinchAPI::Introspection::ConnectionType::TaggedSymbol
|
462
|
-
)
|
463
|
-
FINCH =
|
464
|
-
T.let(:finch, FinchAPI::Introspection::ConnectionType::TaggedSymbol)
|
582
|
+
SINGLE =
|
583
|
+
T.let(:single, FinchAPI::Introspection::EntityMode::TaggedSymbol)
|
584
|
+
MULTI = T.let(:multi, FinchAPI::Introspection::EntityMode::TaggedSymbol)
|
465
585
|
|
466
586
|
sig do
|
467
587
|
override.returns(
|
468
|
-
T::Array[FinchAPI::Introspection::
|
588
|
+
T::Array[FinchAPI::Introspection::EntityMode::TaggedSymbol]
|
469
589
|
)
|
470
590
|
end
|
471
591
|
def self.values
|