diff --git a/airbyte-cdk/python/CHANGELOG.md b/airbyte-cdk/python/CHANGELOG.md index b4bb9ef19b361..44cbfcc739d3b 100644 --- a/airbyte-cdk/python/CHANGELOG.md +++ b/airbyte-cdk/python/CHANGELOG.md @@ -1,5 +1,8 @@ # Changelog +## 0.1.16 +Update generated AirbyteProtocol models to contain [Oauth changes](https://github.com/airbytehq/airbyte/pull/5776). + ## 0.1.15 Add \_limit and \_page_size as internal config parameters for SAT diff --git a/airbyte-cdk/python/airbyte_cdk/models/airbyte_protocol.py b/airbyte-cdk/python/airbyte_cdk/models/airbyte_protocol.py index da45f5cebd143..f76be5651fbcc 100644 --- a/airbyte-cdk/python/airbyte_cdk/models/airbyte_protocol.py +++ b/airbyte-cdk/python/airbyte_cdk/models/airbyte_protocol.py @@ -103,6 +103,25 @@ class DestinationSyncMode(Enum): append_dedup = "append_dedup" +class OAuth2Specification(BaseModel): + oauthFlowInitParameters: Optional[List[List[str]]] = Field( + None, + description="Pointers to the fields in the ConnectorSpecification which are needed to obtain the initial refresh/access tokens for the OAuth flow. Each inner array represents the path in the ConnectorSpecification of the referenced field.\nFor example.\nAssume the ConnectorSpecification contains params 'app_secret', 'app_id' which are needed to get the initial refresh token. If they are not nested in the config, then the array would look like this [['app_secret'], ['app_id']] If they are nested inside, say, an object called 'auth_params' then this array would be [['auth_params', 'app_secret'], ['auth_params', 'app_id']]", + ) + + +class AuthType(Enum): + oauth2_0 = "oauth2.0" + + +class AuthSpecification(BaseModel): + auth_type: Optional[AuthType] = None + oauth2Specification: Optional[OAuth2Specification] = Field( + None, + description="If the connector supports OAuth, this field should be non-null.", + ) + + class ConnectorSpecification(BaseModel): class Config: extra = Extra.allow @@ -119,6 +138,7 @@ class Config: supported_destination_sync_modes: Optional[List[DestinationSyncMode]] = Field( None, description="List of destination sync modes supported by the connector" ) + authSpecification: Optional[AuthSpecification] = None class AirbyteStream(BaseModel): diff --git a/airbyte-cdk/python/setup.py b/airbyte-cdk/python/setup.py index f4369c6cb5161..91a52544282c1 100644 --- a/airbyte-cdk/python/setup.py +++ b/airbyte-cdk/python/setup.py @@ -35,7 +35,7 @@ setup( name="airbyte-cdk", - version="0.1.15", + version="0.1.16", description="A framework for writing Airbyte Connectors.", long_description=README, long_description_content_type="text/markdown",