airbyte-source-google-drive 0.2.0.dev202502052009__tar.gz → 0.2.0.dev202502061746__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of airbyte-source-google-drive might be problematic. Click here for more details.

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: airbyte-source-google-drive
3
- Version: 0.2.0.dev202502052009
3
+ Version: 0.2.0.dev202502061746
4
4
  Summary: Source implementation for Google Drive.
5
5
  License: ELv2
6
6
  Author: Airbyte
@@ -5,7 +5,7 @@ requires = [
5
5
  build-backend = "poetry.core.masonry.api"
6
6
 
7
7
  [tool.poetry]
8
- version = "0.2.0.dev202502052009"
8
+ version = "0.2.0.dev202502061746"
9
9
  name = "airbyte-source-google-drive"
10
10
  description = "Source implementation for Google Drive."
11
11
  authors = [
@@ -6,7 +6,7 @@
6
6
  from typing import Any, Mapping, Optional
7
7
 
8
8
  from airbyte_cdk import AdvancedAuth, ConfiguredAirbyteCatalog, ConnectorSpecification, OAuthConfigSpecification, TState
9
- from airbyte_cdk.models import AuthFlowType
9
+ from airbyte_cdk.models import AuthFlowType, OauthConnectorInputSpecification
10
10
  from airbyte_cdk.sources.file_based.file_based_source import FileBasedSource
11
11
  from airbyte_cdk.sources.file_based.stream.cursor.default_file_based_cursor import DefaultFileBasedCursor
12
12
  from source_google_drive.spec import SourceGoogleDriveSpec
@@ -28,6 +28,11 @@ class SourceGoogleDrive(FileBasedSource):
28
28
  """
29
29
  Returns the specification describing what fields can be configured by a user when setting up a file-based source.
30
30
  """
31
+ oauth_connector_input_specification = OauthConnectorInputSpecification(
32
+ consent_url="https://accounts.google.com/o/oauth2/v2/auth?{{client_id_param}}&{{redirect_uri_param}}&response_type=code&{{scope_param}}&access_type=offline&{{state_param}}&include_granted_scopes=true&prompt=consent",
33
+ access_token_url="https://oauth2.googleapis.com/token?{{client_id_param}}&{{client_secret_param}}&{{auth_code_param}}&{{redirect_uri_param}}&grant_type=authorization_code",
34
+ scope="https://www.googleapis.com/auth/drive.readonly https://www.googleapis.com/auth/admin.directory.group.readonly https://www.googleapis.com/auth/admin.directory.group.member.readonly https://www.googleapis.com/auth/admin.directory.user.readonly",
35
+ )
31
36
 
32
37
  return ConnectorSpecification(
33
38
  documentationUrl=self.spec_class.documentation_url(),
@@ -37,10 +42,17 @@ class SourceGoogleDrive(FileBasedSource):
37
42
  predicate_key=["credentials", "auth_type"],
38
43
  predicate_value="Client",
39
44
  oauth_config_specification=OAuthConfigSpecification(
45
+ oauth_connector_input_specification=oauth_connector_input_specification,
40
46
  complete_oauth_output_specification={
41
47
  "type": "object",
42
48
  "additionalProperties": False,
43
- "properties": {"refresh_token": {"type": "string", "path_in_connector_config": ["credentials", "refresh_token"]}},
49
+ "properties": {
50
+ "refresh_token": {
51
+ "type": "string",
52
+ "path_in_connector_config": ["credentials", "refresh_token"],
53
+ "path_in_oauth_response": ["refresh_token"],
54
+ }
55
+ },
44
56
  },
45
57
  complete_oauth_server_input_specification={
46
58
  "type": "object",