airbyte-source-microsoft-sharepoint 0.2.2__tar.gz → 0.2.3__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.
- {airbyte_source_microsoft_sharepoint-0.2.2 → airbyte_source_microsoft_sharepoint-0.2.3}/PKG-INFO +1 -1
- {airbyte_source_microsoft_sharepoint-0.2.2 → airbyte_source_microsoft_sharepoint-0.2.3}/pyproject.toml +1 -1
- {airbyte_source_microsoft_sharepoint-0.2.2 → airbyte_source_microsoft_sharepoint-0.2.3}/source_microsoft_sharepoint/spec.py +1 -1
- {airbyte_source_microsoft_sharepoint-0.2.2 → airbyte_source_microsoft_sharepoint-0.2.3}/source_microsoft_sharepoint/stream_reader.py +19 -11
- {airbyte_source_microsoft_sharepoint-0.2.2 → airbyte_source_microsoft_sharepoint-0.2.3}/README.md +0 -0
- {airbyte_source_microsoft_sharepoint-0.2.2 → airbyte_source_microsoft_sharepoint-0.2.3}/source_microsoft_sharepoint/__init__.py +0 -0
- {airbyte_source_microsoft_sharepoint-0.2.2 → airbyte_source_microsoft_sharepoint-0.2.3}/source_microsoft_sharepoint/run.py +0 -0
- {airbyte_source_microsoft_sharepoint-0.2.2 → airbyte_source_microsoft_sharepoint-0.2.3}/source_microsoft_sharepoint/source.py +0 -0
- {airbyte_source_microsoft_sharepoint-0.2.2 → airbyte_source_microsoft_sharepoint-0.2.3}/source_microsoft_sharepoint/utils.py +0 -0
|
@@ -32,7 +32,7 @@ class OAuthCredentials(BaseModel):
|
|
|
32
32
|
description="Client Secret of your Microsoft developer application",
|
|
33
33
|
airbyte_secret=True,
|
|
34
34
|
)
|
|
35
|
-
refresh_token: str = Field(
|
|
35
|
+
refresh_token: Optional[str] = Field(
|
|
36
36
|
title="Refresh Token",
|
|
37
37
|
description="Refresh Token of your Microsoft developer application",
|
|
38
38
|
airbyte_secret=True,
|
|
@@ -199,14 +199,18 @@ class SourceMicrosoftSharePointStreamReader(AbstractFileBasedStreamReader):
|
|
|
199
199
|
"""
|
|
200
200
|
drives = execute_query_with_retry(self.one_drive_client.drives.get())
|
|
201
201
|
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
202
|
+
# skip this step for application authentication flow
|
|
203
|
+
if self.config.credentials.auth_type != "Client" or (
|
|
204
|
+
hasattr(self.config.credentials, "refresh_token") and self.config.credentials.refresh_token
|
|
205
|
+
):
|
|
206
|
+
if self.config.credentials.auth_type == "Client":
|
|
207
|
+
my_drive = execute_query_with_retry(self.one_drive_client.me.drive.get())
|
|
208
|
+
else:
|
|
209
|
+
my_drive = execute_query_with_retry(
|
|
210
|
+
self.one_drive_client.users.get_by_principal_name(self.config.credentials.user_principal_name).drive.get()
|
|
211
|
+
)
|
|
208
212
|
|
|
209
|
-
|
|
213
|
+
drives.add_child(my_drive)
|
|
210
214
|
|
|
211
215
|
return drives
|
|
212
216
|
|
|
@@ -226,11 +230,15 @@ class SourceMicrosoftSharePointStreamReader(AbstractFileBasedStreamReader):
|
|
|
226
230
|
# Get files from accessible drives
|
|
227
231
|
yield from self._get_files_by_drive_name(self.drives, self.config.folder_path)
|
|
228
232
|
|
|
229
|
-
|
|
230
|
-
|
|
233
|
+
# skip this step for application authentication flow
|
|
234
|
+
if self.config.credentials.auth_type != "Client" or (
|
|
235
|
+
hasattr(self.config.credentials, "refresh_token") and self.config.credentials.refresh_token
|
|
236
|
+
):
|
|
237
|
+
if self.config.search_scope in ("SHARED_ITEMS", "ALL"):
|
|
238
|
+
parsed_drives = [] if self.config.search_scope == "SHARED_ITEMS" else self.drives
|
|
231
239
|
|
|
232
|
-
|
|
233
|
-
|
|
240
|
+
# Get files from shared items
|
|
241
|
+
yield from self._get_shared_files_from_all_drives(parsed_drives)
|
|
234
242
|
|
|
235
243
|
def get_matching_files(self, globs: List[str], prefix: Optional[str], logger: logging.Logger) -> Iterable[RemoteFile]:
|
|
236
244
|
"""
|
{airbyte_source_microsoft_sharepoint-0.2.2 → airbyte_source_microsoft_sharepoint-0.2.3}/README.md
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|