( config: GoogleDriveIntegrationConfig, fileId: string, tokenStore?: GoogleDriveTokenStore, )
| 1146 | }; |
| 1147 | |
| 1148 | export const getGoogleDriveObjectText = ( |
| 1149 | config: GoogleDriveIntegrationConfig, |
| 1150 | fileId: string, |
| 1151 | tokenStore?: GoogleDriveTokenStore, |
| 1152 | ) => |
| 1153 | driveFetch( |
| 1154 | config, |
| 1155 | appendSharedDriveCreateParams( |
| 1156 | `${DRIVE_API_BASE}/files/${encodeURIComponent(fileId)}?alt=media`, |
| 1157 | ), |
| 1158 | undefined, |
| 1159 | tokenStore, |
| 1160 | ).pipe( |
| 1161 | Effect.flatMap((response) => |
| 1162 | Effect.tryPromise({ |
| 1163 | try: () => response.text(), |
| 1164 | catch: (cause) => new Storage.StorageError({ cause }), |
| 1165 | }), |
| 1166 | ), |
| 1167 | ); |
| 1168 | |
| 1169 | export const getGoogleDriveObjectResponse = ( |
| 1170 | config: GoogleDriveIntegrationConfig, |
no test coverage detected