|
1 | 1 | # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. |
2 | 2 |
|
3 | | -from typing import List, Optional |
| 3 | +from typing import List, Union, Optional |
4 | 4 | from datetime import datetime |
5 | 5 | from typing_extensions import Literal |
6 | 6 |
|
7 | 7 | from .._models import BaseModel |
8 | 8 | from .shared.connection_status_type import ConnectionStatusType |
9 | 9 |
|
10 | | -__all__ = ["Introspection", "AuthenticationMethod", "AuthenticationMethodConnectionStatus", "ConnectionStatus"] |
| 10 | +__all__ = ["Introspection", "ConnectionStatus", "AuthenticationMethod", "AuthenticationMethodConnectionStatus"] |
11 | 11 |
|
12 | 12 |
|
13 | | -class AuthenticationMethodConnectionStatus(BaseModel): |
14 | | - message: Optional[str] = None |
| 13 | +class ConnectionStatus(BaseModel): |
| 14 | + status: ConnectionStatusType |
15 | 15 |
|
16 | | - status: Optional[ConnectionStatusType] = None |
| 16 | + last_successful_sync: Union[datetime, str, None] = None |
| 17 | + """The datetime when the connection was last successfully synced""" |
17 | 18 |
|
| 19 | + message: Optional[str] = None |
18 | 20 |
|
19 | | -class AuthenticationMethod(BaseModel): |
20 | | - connection_status: Optional[AuthenticationMethodConnectionStatus] = None |
21 | 21 |
|
22 | | - products: Optional[List[str]] = None |
23 | | - """An array of the authorized products associated with the `access_token`.""" |
| 22 | +class AuthenticationMethodConnectionStatus(BaseModel): |
| 23 | + status: ConnectionStatusType |
24 | 24 |
|
25 | | - type: Optional[Literal["assisted", "credential", "api_token", "api_credential", "oauth"]] = None |
26 | | - """The type of authentication method.""" |
| 25 | + last_successful_sync: Union[datetime, str, None] = None |
| 26 | + """The datetime when the connection was last successfully synced""" |
27 | 27 |
|
| 28 | + message: Optional[str] = None |
28 | 29 |
|
29 | | -class ConnectionStatus(BaseModel): |
30 | | - last_successful_sync: Optional[datetime] = None |
31 | | - """The datetime when the connection was last successfully synced.""" |
32 | 30 |
|
33 | | - message: Optional[str] = None |
| 31 | +class AuthenticationMethod(BaseModel): |
| 32 | + type: Literal["assisted", "credential", "api_token", "api_credential", "oauth"] |
| 33 | + """The type of authentication method""" |
| 34 | + |
| 35 | + connection_status: Optional[AuthenticationMethodConnectionStatus] = None |
34 | 36 |
|
35 | | - status: Optional[ConnectionStatusType] = None |
| 37 | + products: Optional[List[str]] = None |
| 38 | + """An array of the authorized products associated with the `access_token`""" |
36 | 39 |
|
37 | 40 |
|
38 | 41 | class Introspection(BaseModel): |
39 | 42 | id: str |
40 | | - """The Finch UUID of the token being introspected.""" |
41 | | - |
42 | | - account_id: str |
43 | | - """ |
44 | | - [DEPRECATED] Use `connection_id` to associate tokens with a Finch connection |
45 | | - instead of this account ID. |
46 | | - """ |
47 | | - |
48 | | - authentication_methods: List[AuthenticationMethod] |
| 43 | + """The Finch UUID of the token being introspected""" |
49 | 44 |
|
50 | 45 | client_id: str |
51 | | - """The client ID of the application associated with the `access_token`.""" |
| 46 | + """The client ID of the application associated with the `access_token`""" |
52 | 47 |
|
53 | | - client_type: Literal["production", "development", "sandbox"] |
| 48 | + client_type: Literal["development", "production", "sandbox"] |
54 | 49 | """The type of application associated with a token.""" |
55 | 50 |
|
56 | | - company_id: str |
57 | | - """ |
58 | | - [DEPRECATED] Use `connection_id` to associate tokens with a Finch connection |
59 | | - instead of this company ID. |
60 | | - """ |
61 | | - |
62 | 51 | connection_id: str |
63 | | - """The Finch UUID of the connection associated with the `access_token`.""" |
| 52 | + """The Finch UUID of the connection associated with the `access_token`""" |
64 | 53 |
|
65 | 54 | connection_status: ConnectionStatus |
66 | 55 |
|
67 | | - connection_type: Literal["provider", "finch"] |
| 56 | + connection_type: Literal["finch", "provider"] |
68 | 57 | """The type of the connection associated with the token. |
69 | 58 |
|
70 | 59 | - `provider` - connection to an external provider |
71 | 60 | - `finch` - finch-generated data. |
72 | 61 | """ |
73 | 62 |
|
| 63 | + products: List[str] |
| 64 | + """An array of the authorized products associated with the `access_token`.""" |
| 65 | + |
| 66 | + provider_id: str |
| 67 | + """The ID of the provider associated with the `access_token`.""" |
| 68 | + |
| 69 | + account_id: Optional[str] = None |
| 70 | + """ |
| 71 | + [DEPRECATED] Use `connection_id` to associate tokens with a Finch connection |
| 72 | + instead of this account ID |
| 73 | + """ |
| 74 | + |
| 75 | + authentication_methods: Optional[List[AuthenticationMethod]] = None |
| 76 | + |
| 77 | + company_id: Optional[str] = None |
| 78 | + """ |
| 79 | + [DEPRECATED] Use `connection_id` to associate tokens with a Finch connection |
| 80 | + instead of this company ID |
| 81 | + """ |
| 82 | + |
74 | 83 | customer_email: Optional[str] = None |
75 | 84 | """ |
76 | 85 | The email of your customer you provided to Finch when a connect session was |
77 | | - created for this connection. |
| 86 | + created for this connection |
78 | 87 | """ |
79 | 88 |
|
80 | 89 | customer_id: Optional[str] = None |
81 | 90 | """ |
82 | 91 | The ID of your customer you provided to Finch when a connect session was created |
83 | | - for this connection. |
| 92 | + for this connection |
84 | 93 | """ |
85 | 94 |
|
86 | 95 | customer_name: Optional[str] = None |
87 | 96 | """ |
88 | 97 | The name of your customer you provided to Finch when a connect session was |
89 | | - created for this connection. |
| 98 | + created for this connection |
90 | 99 | """ |
91 | 100 |
|
92 | | - manual: bool |
| 101 | + manual: Optional[bool] = None |
93 | 102 | """ |
94 | 103 | Whether the connection associated with the `access_token` uses the Assisted |
95 | 104 | Connect Flow. (`true` if using Assisted Connect, `false` if connection is |
96 | 105 | automated) |
97 | 106 | """ |
98 | 107 |
|
99 | | - payroll_provider_id: str |
| 108 | + payroll_provider_id: Optional[str] = None |
100 | 109 | """ |
101 | 110 | [DEPRECATED] Use `provider_id` to identify the provider instead of this payroll |
102 | 111 | provider ID. |
103 | 112 | """ |
104 | 113 |
|
105 | | - products: List[str] |
106 | | - """An array of the authorized products associated with the `access_token`.""" |
107 | | - |
108 | | - provider_id: str |
109 | | - """The ID of the provider associated with the `access_token`.""" |
110 | | - |
111 | | - username: str |
| 114 | + username: Optional[str] = None |
112 | 115 | """The account username used for login associated with the `access_token`.""" |
0 commit comments