You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: airbyte_cdk/sources/declarative/declarative_component_schema.yaml
+167Lines changed: 167 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -1972,6 +1972,173 @@ definitions:
1972
1972
- app_id:
1973
1973
type: string
1974
1974
path_in_connector_config: ["info", "app_id"]
1975
+
oauth_connector_input_specification:
1976
+
title: DeclarativeOAuth Connector Specification
1977
+
description: |-
1978
+
The DeclarativeOAuth specific blob.
1979
+
Pertains to the fields defined by the connector relating to the OAuth flow.
1980
+
1981
+
Interpolation capabilities:
1982
+
- The variables placeholders are declared as `{my_var}`.
1983
+
- The nested resolution variables like `{{my_nested_var}}` is allowed as well.
1984
+
1985
+
- The allowed interpolation context is:
1986
+
+ base64Encoder - encode to `base64`, {base64Encoder:{my_var_a}:{my_var_b}}
1987
+
+ base64Decorer - decode from `base64` encoded string, {base64Decoder:{my_string_variable_or_string_value}}
1988
+
+ urlEncoder - encode the input string to URL-like format, {urlEncoder:https://test.host.com/endpoint}
1989
+
+ urlDecorer - decode the input url-encoded string into text format, {urlDecoder:https%3A%2F%2Fairbyte.io}
1990
+
+ codeChallengeS256 - get the `codeChallenge` encoded value to provide additional data-provider specific authorisation values, {codeChallengeS256:{state_value}}
The DeclarativeOAuth Specific optional override to provide the custom `code` key name to something like `auth_code` or `custom_auth_code`, if required by data-provider.
2133
+
examples:
2134
+
- auth_code_key: "my_custom_auth_code_key_name"
2135
+
redirect_uri_key:
2136
+
title: (Optional) DeclarativeOAuth Redirect URI Key Override
2137
+
type: string
2138
+
description: |-
2139
+
The DeclarativeOAuth Specific optional override to provide the custom `redirect_uri` key name to something like `callback_uri`, if required by data-provider.
Copy file name to clipboardExpand all lines: airbyte_cdk/sources/declarative/models/declarative_component_schema.py
+122Lines changed: 122 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -748,6 +748,123 @@ class NoPagination(BaseModel):
748
748
type: Literal["NoPagination"]
749
749
750
750
751
+
classState(BaseModel):
752
+
classConfig:
753
+
extra=Extra.allow
754
+
755
+
min: int
756
+
max: int
757
+
758
+
759
+
classOauthConnectorInputSpecification(BaseModel):
760
+
classConfig:
761
+
extra=Extra.allow
762
+
763
+
consent_url: str=Field(
764
+
...,
765
+
description="The DeclarativeOAuth Specific string URL string template to initiate the authentication.\nThe placeholders are replaced during the processing to provide neccessary values.",
description="The DeclarativeOAuth Specific URL templated string to obtain the `access_token`, `refresh_token` etc.\nThe placeholders are replaced during the processing to provide neccessary values.",
description="The DeclarativeOAuth Specific optional headers to inject while exchanging the `auth_code` to `access_token` during `completeOAuthFlow` step.",
description="The DeclarativeOAuth Specific optional query parameters to inject while exchanging the `auth_code` to `access_token` during `completeOAuthFlow` step.\nWhen this property is provided, the query params will be encoded as `Json` and included in the outgoing API request.",
description="The DeclarativeOAuth Specific object to provide the criteria of how the `state` query param should be constructed,\nincluding length and complexity. ",
827
+
examples=[{"state": {"min": 7, "max": 128}}],
828
+
title="(Optional) DeclarativeOAuth Configurable State Query Param",
829
+
)
830
+
client_id_key: Optional[str] =Field(
831
+
None,
832
+
description="The DeclarativeOAuth Specific optional override to provide the custom `client_id` key name, if required by data-provider.",
title="(Optional) DeclarativeOAuth State Key Override",
853
+
)
854
+
auth_code_key: Optional[str] =Field(
855
+
None,
856
+
description="The DeclarativeOAuth Specific optional override to provide the custom `code` key name to something like `auth_code` or `custom_auth_code`, if required by data-provider. ",
description="The DeclarativeOAuth Specific optional override to provide the custom `redirect_uri` key name to something like `callback_uri`, if required by data-provider.",
description='The DeclarativeOAuth specific blob.\nPertains to the fields defined by the connector relating to the OAuth flow.\n\nInterpolation 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`, {base64Encoder:{my_var_a}:{my_var_b}}\n + base64Decorer - decode from `base64` encoded string, {base64Decoder:{my_string_variable_or_string_value}}\n + urlEncoder - encode the input string to URL-like format, {urlEncoder:https://test.host.com/endpoint}\n + urlDecorer - decode the input url-encoded string into text format, {urlDecoder:https%3A%2F%2Fairbyte.io}\n + codeChallengeS256 - get the `codeChallenge` encoded value to provide additional data-provider specific authorisation values, {codeChallengeS256:{state_value}}\n\nExamples:\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_key}}&{redirect_uri_key}={urlEncoder:{{redirect_uri_key}}}&{state_key}={{state_key}}",\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_key}}",\n "{client_id_key}": "{{client_id_key}}",\n "{client_secret_key}": "{{client_secret_key}}"\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 }',
description="OAuth specific blob. This is a Json Schema used to validate Json configurations produced by the OAuth flows as they are\nreturned by the distant OAuth APIs.\nMust be a valid JSON describing the fields to merge back to `ConnectorSpecification.connectionSpecification`.\nFor each field, a special annotation `path_in_connector_config` can be specified to determine where to merge it,\nExamples:\n complete_oauth_output_specification={\n refresh_token: {\n type: string,\n path_in_connector_config: ['credentials', 'refresh_token']\n }\n }",
0 commit comments