@@ -609,9 +609,7 @@ class OAuthAuthenticator(BaseModel):
609
609
scopes : Optional [List [str ]] = Field (
610
610
None ,
611
611
description = "List of scopes that should be granted to the access token." ,
612
- examples = [
613
- ["crm.list.read" , "crm.objects.contacts.read" , "crm.schema.contacts.read" ]
614
- ],
612
+ examples = [["crm.list.read" , "crm.objects.contacts.read" , "crm.schema.contacts.read" ]],
615
613
title = "Scopes" ,
616
614
)
617
615
token_expiry_date : Optional [str ] = Field (
@@ -1047,28 +1045,24 @@ class OAuthConfigSpecification(BaseModel):
1047
1045
class Config :
1048
1046
extra = Extra .allow
1049
1047
1050
- oauth_user_input_from_connector_config_specification : Optional [Dict [str , Any ]] = (
1051
- Field (
1052
- None ,
1053
- description = "OAuth specific blob. This is a Json Schema used to validate Json configurations used as input to OAuth.\n Must be a valid non-nested JSON that refers to properties from ConnectorSpecification.connectionSpecification\n using special annotation 'path_in_connector_config'.\n These are input values the user is entering through the UI to authenticate to the connector, that might also shared\n as inputs for syncing data via the connector.\n Examples:\n if no connector values is shared during oauth flow, oauth_user_input_from_connector_config_specification=[]\n if connector values such as 'app_id' inside the top level are used to generate the API url for the oauth flow,\n oauth_user_input_from_connector_config_specification={\n app_id: {\n type: string\n path_in_connector_config: ['app_id']\n }\n }\n if connector values such as 'info.app_id' nested inside another object are used to generate the API url for the oauth flow,\n oauth_user_input_from_connector_config_specification={\n app_id: {\n type: string\n path_in_connector_config: ['info', 'app_id']\n }\n }" ,
1054
- examples = [
1055
- {"app_id" : {"type" : "string" , "path_in_connector_config" : ["app_id" ]}},
1056
- {
1057
- "app_id" : {
1058
- "type" : "string" ,
1059
- "path_in_connector_config" : ["info" , "app_id" ],
1060
- }
1061
- },
1062
- ],
1063
- title = "OAuth user input" ,
1064
- )
1048
+ oauth_user_input_from_connector_config_specification : Optional [Dict [str , Any ]] = Field (
1049
+ None ,
1050
+ description = "OAuth specific blob. This is a Json Schema used to validate Json configurations used as input to OAuth.\n Must be a valid non-nested JSON that refers to properties from ConnectorSpecification.connectionSpecification\n using special annotation 'path_in_connector_config'.\n These are input values the user is entering through the UI to authenticate to the connector, that might also shared\n as inputs for syncing data via the connector.\n Examples:\n if no connector values is shared during oauth flow, oauth_user_input_from_connector_config_specification=[]\n if connector values such as 'app_id' inside the top level are used to generate the API url for the oauth flow,\n oauth_user_input_from_connector_config_specification={\n app_id: {\n type: string\n path_in_connector_config: ['app_id']\n }\n }\n if connector values such as 'info.app_id' nested inside another object are used to generate the API url for the oauth flow,\n oauth_user_input_from_connector_config_specification={\n app_id: {\n type: string\n path_in_connector_config: ['info', 'app_id']\n }\n }" ,
1051
+ examples = [
1052
+ {"app_id" : {"type" : "string" , "path_in_connector_config" : ["app_id" ]}},
1053
+ {
1054
+ "app_id" : {
1055
+ "type" : "string" ,
1056
+ "path_in_connector_config" : ["info" , "app_id" ],
1057
+ }
1058
+ },
1059
+ ],
1060
+ title = "OAuth user input" ,
1065
1061
)
1066
- oauth_connector_input_specification : Optional [OauthConnectorInputSpecification ] = (
1067
- Field (
1068
- None ,
1069
- description = 'The DeclarativeOAuth specific blob.\n Pertains to the fields defined by the connector relating to the OAuth flow.\n \n Interpolation capabilities:\n - The variables placeholders are declared as `{{my_var}}`.\n - The nested resolution variables like `{{ {{my_nested_var}} }}` is allowed as well.\n \n - The allowed interpolation context is:\n + base64Encoder - encode to `base64`, {{ {{my_var_a}}:{{my_var_b}} | base64Encoder }}\n + base64Decorer - decode from `base64` encoded string, {{ {{my_string_variable_or_string_value}} | base64Decoder }}\n + urlEncoder - encode the input string to URL-like format, {{ https://test.host.com/endpoint | urlEncoder}}\n + urlDecorer - decode the input url-encoded string into text format, {{ urlDecoder:https%3A%2F%2Fairbyte.io | urlDecoder}}\n + codeChallengeS256 - get the `codeChallenge` encoded value to provide additional data-provider specific authorisation values, {{ {{state_value}} | codeChallengeS256 }}\n \n Examples:\n - The TikTok Marketing DeclarativeOAuth spec:\n {\n "oauth_connector_input_specification": {\n "type": "object",\n "additionalProperties": false,\n "properties": {\n "consent_url": "https://ads.tiktok.com/marketing_api/auth?{{client_id_key}}={{client_id_value}}&{{redirect_uri_key}}={{ {{redirect_uri_value}} | urlEncoder}}&{{state_key}}={{state_value}}",\n "access_token_url": "https://business-api.tiktok.com/open_api/v1.3/oauth2/access_token/",\n "access_token_params": {\n "{{ auth_code_key }}": "{{ auth_code_value }}",\n "{{ client_id_key }}": "{{ client_id_value }}",\n "{{ client_secret_key }}": "{{ client_secret_value }}"\n },\n "access_token_headers": {\n "Content-Type": "application/json",\n "Accept": "application/json"\n },\n "extract_output": ["data.access_token"],\n "client_id_key": "app_id",\n "client_secret_key": "secret",\n "auth_code_key": "auth_code"\n }\n }\n }' ,
1070
- title = "DeclarativeOAuth Connector Specification" ,
1071
- )
1062
+ oauth_connector_input_specification : Optional [OauthConnectorInputSpecification ] = Field (
1063
+ None ,
1064
+ description = 'The DeclarativeOAuth specific blob.\n Pertains to the fields defined by the connector relating to the OAuth flow.\n \n Interpolation capabilities:\n - The variables placeholders are declared as `{{my_var}}`.\n - The nested resolution variables like `{{ {{my_nested_var}} }}` is allowed as well.\n \n - The allowed interpolation context is:\n + base64Encoder - encode to `base64`, {{ {{my_var_a}}:{{my_var_b}} | base64Encoder }}\n + base64Decorer - decode from `base64` encoded string, {{ {{my_string_variable_or_string_value}} | base64Decoder }}\n + urlEncoder - encode the input string to URL-like format, {{ https://test.host.com/endpoint | urlEncoder}}\n + urlDecorer - decode the input url-encoded string into text format, {{ urlDecoder:https%3A%2F%2Fairbyte.io | urlDecoder}}\n + codeChallengeS256 - get the `codeChallenge` encoded value to provide additional data-provider specific authorisation values, {{ {{state_value}} | codeChallengeS256 }}\n \n Examples:\n - The TikTok Marketing DeclarativeOAuth spec:\n {\n "oauth_connector_input_specification": {\n "type": "object",\n "additionalProperties": false,\n "properties": {\n "consent_url": "https://ads.tiktok.com/marketing_api/auth?{{client_id_key}}={{client_id_value}}&{{redirect_uri_key}}={{ {{redirect_uri_value}} | urlEncoder}}&{{state_key}}={{state_value}}",\n "access_token_url": "https://business-api.tiktok.com/open_api/v1.3/oauth2/access_token/",\n "access_token_params": {\n "{{ auth_code_key }}": "{{ auth_code_value }}",\n "{{ client_id_key }}": "{{ client_id_value }}",\n "{{ client_secret_key }}": "{{ client_secret_value }}"\n },\n "access_token_headers": {\n "Content-Type": "application/json",\n "Accept": "application/json"\n },\n "extract_output": ["data.access_token"],\n "client_id_key": "app_id",\n "client_secret_key": "secret",\n "auth_code_key": "auth_code"\n }\n }\n }' ,
1065
+ title = "DeclarativeOAuth Connector Specification" ,
1072
1066
)
1073
1067
complete_oauth_output_specification : Optional [Dict [str , Any ]] = Field (
1074
1068
None ,
@@ -1086,9 +1080,7 @@ class Config:
1086
1080
complete_oauth_server_input_specification : Optional [Dict [str , Any ]] = Field (
1087
1081
None ,
1088
1082
description = "OAuth specific blob. This is a Json Schema used to validate Json configurations persisted as Airbyte Server configurations.\n Must be a valid non-nested JSON describing additional fields configured by the Airbyte Instance or Workspace Admins to be used by the\n server when completing an OAuth flow (typically exchanging an auth code for refresh token).\n Examples:\n complete_oauth_server_input_specification={\n client_id: {\n type: string\n },\n client_secret: {\n type: string\n }\n }" ,
1089
- examples = [
1090
- {"client_id" : {"type" : "string" }, "client_secret" : {"type" : "string" }}
1091
- ],
1083
+ examples = [{"client_id" : {"type" : "string" }, "client_secret" : {"type" : "string" }}],
1092
1084
title = "OAuth input specification" ,
1093
1085
)
1094
1086
complete_oauth_server_output_specification : Optional [Dict [str , Any ]] = Field (
@@ -1674,9 +1666,7 @@ class RecordSelector(BaseModel):
1674
1666
description = "Responsible for filtering records to be emitted by the Source." ,
1675
1667
title = "Record Filter" ,
1676
1668
)
1677
- schema_normalization : Optional [
1678
- Union [SchemaNormalization , CustomSchemaNormalization ]
1679
- ] = Field (
1669
+ schema_normalization : Optional [Union [SchemaNormalization , CustomSchemaNormalization ]] = Field (
1680
1670
SchemaNormalization .None_ ,
1681
1671
description = "Responsible for normalization according to the schema." ,
1682
1672
title = "Schema Normalization" ,
@@ -1850,16 +1840,12 @@ class Config:
1850
1840
description = "Component used to coordinate how records are extracted across stream slices and request pages." ,
1851
1841
title = "Retriever" ,
1852
1842
)
1853
- incremental_sync : Optional [Union [CustomIncrementalSync , DatetimeBasedCursor ]] = (
1854
- Field (
1855
- None ,
1856
- description = "Component used to fetch data incrementally based on a time field in the data." ,
1857
- title = "Incremental Sync" ,
1858
- )
1859
- )
1860
- name : Optional [str ] = Field (
1861
- "" , description = "The stream name." , example = ["Users" ], title = "Name"
1843
+ incremental_sync : Optional [Union [CustomIncrementalSync , DatetimeBasedCursor ]] = Field (
1844
+ None ,
1845
+ description = "Component used to fetch data incrementally based on a time field in the data." ,
1846
+ title = "Incremental Sync" ,
1862
1847
)
1848
+ name : Optional [str ] = Field ("" , description = "The stream name." , example = ["Users" ], title = "Name" )
1863
1849
primary_key : Optional [PrimaryKey ] = Field (
1864
1850
"" , description = "The primary key of the stream." , title = "Primary Key"
1865
1851
)
@@ -2131,11 +2117,7 @@ class SimpleRetriever(BaseModel):
2131
2117
CustomPartitionRouter ,
2132
2118
ListPartitionRouter ,
2133
2119
SubstreamPartitionRouter ,
2134
- List [
2135
- Union [
2136
- CustomPartitionRouter , ListPartitionRouter , SubstreamPartitionRouter
2137
- ]
2138
- ],
2120
+ List [Union [CustomPartitionRouter , ListPartitionRouter , SubstreamPartitionRouter ]],
2139
2121
]
2140
2122
] = Field (
2141
2123
[],
@@ -2179,9 +2161,7 @@ class AsyncRetriever(BaseModel):
2179
2161
)
2180
2162
download_extractor : Optional [
2181
2163
Union [CustomRecordExtractor , DpathExtractor , ResponseToFileExtractor ]
2182
- ] = Field (
2183
- None , description = "Responsible for fetching the records from provided urls."
2184
- )
2164
+ ] = Field (None , description = "Responsible for fetching the records from provided urls." )
2185
2165
creation_requester : Union [CustomRequester , HttpRequester ] = Field (
2186
2166
...,
2187
2167
description = "Requester component that describes how to prepare HTTP requests to send to the source API to create the async server-side job." ,
@@ -2215,11 +2195,7 @@ class AsyncRetriever(BaseModel):
2215
2195
CustomPartitionRouter ,
2216
2196
ListPartitionRouter ,
2217
2197
SubstreamPartitionRouter ,
2218
- List [
2219
- Union [
2220
- CustomPartitionRouter , ListPartitionRouter , SubstreamPartitionRouter
2221
- ]
2222
- ],
2198
+ List [Union [CustomPartitionRouter , ListPartitionRouter , SubstreamPartitionRouter ]],
2223
2199
]
2224
2200
] = Field (
2225
2201
[],
@@ -2287,12 +2263,10 @@ class DynamicDeclarativeStream(BaseModel):
2287
2263
stream_template : DeclarativeStream = Field (
2288
2264
..., description = "Reference to the stream template." , title = "Stream Template"
2289
2265
)
2290
- components_resolver : Union [HttpComponentsResolver , ConfigComponentsResolver ] = (
2291
- Field (
2292
- ...,
2293
- description = "Component resolve and populates stream templates with components values." ,
2294
- title = "Components Resolver" ,
2295
- )
2266
+ components_resolver : Union [HttpComponentsResolver , ConfigComponentsResolver ] = Field (
2267
+ ...,
2268
+ description = "Component resolve and populates stream templates with components values." ,
2269
+ title = "Components Resolver" ,
2296
2270
)
2297
2271
2298
2272
0 commit comments