@@ -928,28 +928,24 @@ class OAuthConfigSpecification(BaseModel):
928928 class Config :
929929 extra = Extra .allow
930930
931- oauth_user_input_from_connector_config_specification : Optional [Dict [str , Any ]] = (
932- Field (
933- None ,
934- 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 }" ,
935- examples = [
936- {"app_id" : {"type" : "string" , "path_in_connector_config" : ["app_id" ]}},
937- {
938- "app_id" : {
939- "type" : "string" ,
940- "path_in_connector_config" : ["info" , "app_id" ],
941- }
942- },
943- ],
944- title = "OAuth user input" ,
945- )
931+ oauth_user_input_from_connector_config_specification : Optional [Dict [str , Any ]] = Field (
932+ None ,
933+ 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 }" ,
934+ examples = [
935+ {"app_id" : {"type" : "string" , "path_in_connector_config" : ["app_id" ]}},
936+ {
937+ "app_id" : {
938+ "type" : "string" ,
939+ "path_in_connector_config" : ["info" , "app_id" ],
940+ }
941+ },
942+ ],
943+ title = "OAuth user input" ,
946944 )
947- oauth_connector_input_specification : Optional [OauthConnectorInputSpecification ] = (
948- Field (
949- None ,
950- 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 }' ,
951- title = "DeclarativeOAuth Connector Specification" ,
952- )
945+ oauth_connector_input_specification : Optional [OauthConnectorInputSpecification ] = Field (
946+ None ,
947+ 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 }' ,
948+ title = "DeclarativeOAuth Connector Specification" ,
953949 )
954950 complete_oauth_output_specification : Optional [Dict [str , Any ]] = Field (
955951 None ,
@@ -967,9 +963,7 @@ class Config:
967963 complete_oauth_server_input_specification : Optional [Dict [str , Any ]] = Field (
968964 None ,
969965 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 }" ,
970- examples = [
971- {"client_id" : {"type" : "string" }, "client_secret" : {"type" : "string" }}
972- ],
966+ examples = [{"client_id" : {"type" : "string" }, "client_secret" : {"type" : "string" }}],
973967 title = "OAuth input specification" ,
974968 )
975969 complete_oauth_server_output_specification : Optional [Dict [str , Any ]] = Field (
@@ -1473,9 +1467,7 @@ class CustomConfigTransformation(BaseModel):
14731467 class_name : str = Field (
14741468 ...,
14751469 description = "Fully-qualified name of the class that will be implementing the custom config transformation. The format is `source_<name>.<package>.<class_name>`." ,
1476- examples = [
1477- "source_declarative_manifest.components.MyCustomConfigTransformation"
1478- ],
1470+ examples = ["source_declarative_manifest.components.MyCustomConfigTransformation" ],
14791471 )
14801472 parameters : Optional [Dict [str , Any ]] = Field (
14811473 None ,
@@ -1893,9 +1885,7 @@ class OAuthAuthenticator(BaseModel):
18931885 scopes : Optional [List [str ]] = Field (
18941886 None ,
18951887 description = "List of scopes that should be granted to the access token." ,
1896- examples = [
1897- ["crm.list.read" , "crm.objects.contacts.read" , "crm.schema.contacts.read" ]
1898- ],
1888+ examples = [["crm.list.read" , "crm.objects.contacts.read" , "crm.schema.contacts.read" ]],
18991889 title = "Scopes" ,
19001890 )
19011891 token_expiry_date : Optional [str ] = Field (
@@ -2094,9 +2084,7 @@ class RecordSelector(BaseModel):
20942084 description = "Responsible for filtering records to be emitted by the Source." ,
20952085 title = "Record Filter" ,
20962086 )
2097- schema_normalization : Optional [
2098- Union [SchemaNormalization , CustomSchemaNormalization ]
2099- ] = Field (
2087+ schema_normalization : Optional [Union [SchemaNormalization , CustomSchemaNormalization ]] = Field (
21002088 None ,
21012089 description = "Responsible for normalization according to the schema." ,
21022090 title = "Schema Normalization" ,
@@ -2138,12 +2126,10 @@ class DpathValidator(BaseModel):
21382126 ],
21392127 title = "Field Path" ,
21402128 )
2141- validation_strategy : Union [ValidateAdheresToSchema , CustomValidationStrategy ] = (
2142- Field (
2143- ...,
2144- description = "The condition that the specified config value will be evaluated against" ,
2145- title = "Validation Strategy" ,
2146- )
2129+ validation_strategy : Union [ValidateAdheresToSchema , CustomValidationStrategy ] = Field (
2130+ ...,
2131+ description = "The condition that the specified config value will be evaluated against" ,
2132+ title = "Validation Strategy" ,
21472133 )
21482134
21492135
@@ -2160,12 +2146,10 @@ class PredicateValidator(BaseModel):
21602146 ],
21612147 title = "Value" ,
21622148 )
2163- validation_strategy : Union [ValidateAdheresToSchema , CustomValidationStrategy ] = (
2164- Field (
2165- ...,
2166- description = "The validation strategy to apply to the value." ,
2167- title = "Validation Strategy" ,
2168- )
2149+ validation_strategy : Union [ValidateAdheresToSchema , CustomValidationStrategy ] = Field (
2150+ ...,
2151+ description = "The validation strategy to apply to the value." ,
2152+ title = "Validation Strategy" ,
21692153 )
21702154
21712155
@@ -2190,12 +2174,12 @@ class ConfigAddFields(BaseModel):
21902174
21912175class CompositeErrorHandler (BaseModel ):
21922176 type : Literal ["CompositeErrorHandler" ]
2193- error_handlers : List [
2194- Union [ CompositeErrorHandler , DefaultErrorHandler , CustomErrorHandler ]
2195- ] = Field (
2196- ... ,
2197- description = "List of error handlers to iterate on to determine how to handle a failed response. " ,
2198- title = "Error Handlers" ,
2177+ error_handlers : List [Union [ CompositeErrorHandler , DefaultErrorHandler , CustomErrorHandler ]] = (
2178+ Field (
2179+ ...,
2180+ description = "List of error handlers to iterate on to determine how to handle a failed response." ,
2181+ title = "Error Handlers " ,
2182+ )
21992183 )
22002184 parameters : Optional [Dict [str , Any ]] = Field (None , alias = "$parameters" )
22012185
@@ -2357,9 +2341,9 @@ class Config:
23572341
23582342 type : Literal ["DeclarativeSource" ]
23592343 check : Union [CheckStream , CheckDynamicStream ]
2360- streams : Optional [
2361- List [ Union [ ConditionalStreams , DeclarativeStream , StateDelegatingStream ]]
2362- ] = None
2344+ streams : Optional [List [ Union [ ConditionalStreams , DeclarativeStream , StateDelegatingStream ]]] = (
2345+ None
2346+ )
23632347 dynamic_streams : List [DynamicDeclarativeStream ]
23642348 version : str = Field (
23652349 ...,
@@ -2484,20 +2468,16 @@ class Config:
24842468 extra = Extra .allow
24852469
24862470 type : Literal ["DeclarativeStream" ]
2487- name : Optional [str ] = Field (
2488- "" , description = "The stream name." , example = ["Users" ], title = "Name"
2489- )
2471+ name : Optional [str ] = Field ("" , description = "The stream name." , example = ["Users" ], title = "Name" )
24902472 retriever : Union [SimpleRetriever , AsyncRetriever , CustomRetriever ] = Field (
24912473 ...,
24922474 description = "Component used to coordinate how records are extracted across stream slices and request pages." ,
24932475 title = "Retriever" ,
24942476 )
2495- incremental_sync : Optional [Union [DatetimeBasedCursor , IncrementingCountCursor ]] = (
2496- Field (
2497- None ,
2498- description = "Component used to fetch data incrementally based on a time field in the data." ,
2499- title = "Incremental Sync" ,
2500- )
2477+ incremental_sync : Optional [Union [DatetimeBasedCursor , IncrementingCountCursor ]] = Field (
2478+ None ,
2479+ description = "Component used to fetch data incrementally based on a time field in the data." ,
2480+ title = "Incremental Sync" ,
25012481 )
25022482 primary_key : Optional [PrimaryKey ] = Field ("" , title = "Primary Key" )
25032483 schema_loader : Optional [
@@ -2671,20 +2651,18 @@ class HttpRequester(BaseModelWithDeprecations):
26712651 description = "For APIs that require explicit specification of the properties to query for, this component will take a static or dynamic set of properties (which can be optionally split into chunks) and allow them to be injected into an outbound request by accessing stream_partition.extra_fields." ,
26722652 title = "Query Properties" ,
26732653 )
2674- request_parameters : Optional [Union [Dict [str , Union [str , QueryProperties ]], str ]] = (
2675- Field (
2676- None ,
2677- description = "Specifies the query parameters that should be set on an outgoing HTTP request given the inputs." ,
2678- examples = [
2679- {"unit" : "day" },
2680- {
2681- "query" : 'last_event_time BETWEEN TIMESTAMP "{{ stream_interval.start_time }}" AND TIMESTAMP "{{ stream_interval.end_time }}"'
2682- },
2683- {"searchIn" : "{{ ','.join(config.get('search_in', [])) }}" },
2684- {"sort_by[asc]" : "updated_at" },
2685- ],
2686- title = "Query Parameters" ,
2687- )
2654+ request_parameters : Optional [Union [Dict [str , Union [str , QueryProperties ]], str ]] = Field (
2655+ None ,
2656+ description = "Specifies the query parameters that should be set on an outgoing HTTP request given the inputs." ,
2657+ examples = [
2658+ {"unit" : "day" },
2659+ {
2660+ "query" : 'last_event_time BETWEEN TIMESTAMP "{{ stream_interval.start_time }}" AND TIMESTAMP "{{ stream_interval.end_time }}"'
2661+ },
2662+ {"searchIn" : "{{ ','.join(config.get('search_in', [])) }}" },
2663+ {"sort_by[asc]" : "updated_at" },
2664+ ],
2665+ title = "Query Parameters" ,
26882666 )
26892667 request_headers : Optional [Union [Dict [str , str ], str ]] = Field (
26902668 None ,
@@ -2856,9 +2834,7 @@ class QueryProperties(BaseModel):
28562834
28572835class StateDelegatingStream (BaseModel ):
28582836 type : Literal ["StateDelegatingStream" ]
2859- name : str = Field (
2860- ..., description = "The stream name." , example = ["Users" ], title = "Name"
2861- )
2837+ name : str = Field (..., description = "The stream name." , example = ["Users" ], title = "Name" )
28622838 full_refresh_stream : DeclarativeStream = Field (
28632839 ...,
28642840 description = "Component used to coordinate how records are extracted across stream slices and request pages when the state is empty or not provided." ,
@@ -2945,17 +2921,13 @@ class AsyncRetriever(BaseModel):
29452921 status_extractor : Union [DpathExtractor , CustomRecordExtractor ] = Field (
29462922 ..., description = "Responsible for fetching the actual status of the async job."
29472923 )
2948- download_target_extractor : Optional [
2949- Union [DpathExtractor , CustomRecordExtractor ]
2950- ] = Field (
2924+ download_target_extractor : Optional [Union [DpathExtractor , CustomRecordExtractor ]] = Field (
29512925 None ,
29522926 description = "Responsible for fetching the final result `urls` provided by the completed / finished / ready async job." ,
29532927 )
29542928 download_extractor : Optional [
29552929 Union [DpathExtractor , CustomRecordExtractor , ResponseToFileExtractor ]
2956- ] = Field (
2957- None , description = "Responsible for fetching the records from provided urls."
2958- )
2930+ ] = Field (None , description = "Responsible for fetching the records from provided urls." )
29592931 creation_requester : Union [HttpRequester , CustomRequester ] = Field (
29602932 ...,
29612933 description = "Requester component that describes how to prepare HTTP requests to send to the source API to create the async server-side job." ,
0 commit comments