Pass production build audit and update typescript return types
This commit is contained in:
@@ -98,7 +98,7 @@ export const googleSignOut = async (): Promise<void> => {
|
|||||||
export async function exportApplicationsToGoogleSheets(
|
export async function exportApplicationsToGoogleSheets(
|
||||||
applications: JobApplication[],
|
applications: JobApplication[],
|
||||||
accessToken?: string
|
accessToken?: string
|
||||||
): Promise<{ spreadsheetId: string; spreadsheetUrl: string }> {
|
): Promise<{ spreadsheetId: string; spreadsheetUrl: string; isLocalCsv?: boolean; message?: string }> {
|
||||||
const token = accessToken || cachedAccessToken;
|
const token = accessToken || cachedAccessToken;
|
||||||
const res = await fetch('/api/workspace/sheets/export', {
|
const res = await fetch('/api/workspace/sheets/export', {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
@@ -112,7 +112,7 @@ export async function exportApplicationsToGoogleSheets(
|
|||||||
if (!data.success) {
|
if (!data.success) {
|
||||||
throw new Error(data.error || 'Failed to export applications to Google Sheets');
|
throw new Error(data.error || 'Failed to export applications to Google Sheets');
|
||||||
}
|
}
|
||||||
return { spreadsheetId: data.spreadsheetId, spreadsheetUrl: data.spreadsheetUrl };
|
return { spreadsheetId: data.spreadsheetId, spreadsheetUrl: data.spreadsheetUrl, isLocalCsv: data.isLocalCsv, message: data.message };
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function createTailoredGoogleDoc(
|
export async function createTailoredGoogleDoc(
|
||||||
@@ -120,7 +120,7 @@ export async function createTailoredGoogleDoc(
|
|||||||
content: string,
|
content: string,
|
||||||
docType: 'resume' | 'coverLetter' | 'note',
|
docType: 'resume' | 'coverLetter' | 'note',
|
||||||
accessToken?: string
|
accessToken?: string
|
||||||
): Promise<{ documentId: string; documentUrl: string }> {
|
): Promise<{ documentId: string; documentUrl: string; isLocalDoc?: boolean; message?: string }> {
|
||||||
const token = accessToken || cachedAccessToken;
|
const token = accessToken || cachedAccessToken;
|
||||||
const res = await fetch('/api/workspace/docs/create', {
|
const res = await fetch('/api/workspace/docs/create', {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
@@ -134,7 +134,7 @@ export async function createTailoredGoogleDoc(
|
|||||||
if (!data.success) {
|
if (!data.success) {
|
||||||
throw new Error(data.error || 'Failed to create Google Doc');
|
throw new Error(data.error || 'Failed to create Google Doc');
|
||||||
}
|
}
|
||||||
return { documentId: data.documentId, documentUrl: data.documentUrl };
|
return { documentId: data.documentId, documentUrl: data.documentUrl, isLocalDoc: data.isLocalDoc, message: data.message };
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function uploadFileToGoogleDrive(
|
export async function uploadFileToGoogleDrive(
|
||||||
@@ -142,7 +142,7 @@ export async function uploadFileToGoogleDrive(
|
|||||||
fileContent: string,
|
fileContent: string,
|
||||||
mimeType: string = 'text/plain',
|
mimeType: string = 'text/plain',
|
||||||
accessToken?: string
|
accessToken?: string
|
||||||
): Promise<{ fileId: string; driveUrl: string }> {
|
): Promise<{ fileId: string; driveUrl: string; isLocalFile?: boolean; message?: string }> {
|
||||||
const token = accessToken || cachedAccessToken;
|
const token = accessToken || cachedAccessToken;
|
||||||
const res = await fetch('/api/workspace/drive/upload', {
|
const res = await fetch('/api/workspace/drive/upload', {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
@@ -156,7 +156,7 @@ export async function uploadFileToGoogleDrive(
|
|||||||
if (!data.success) {
|
if (!data.success) {
|
||||||
throw new Error(data.error || 'Failed to upload file to Google Drive');
|
throw new Error(data.error || 'Failed to upload file to Google Drive');
|
||||||
}
|
}
|
||||||
return { fileId: data.fileId, driveUrl: data.driveUrl };
|
return { fileId: data.fileId, driveUrl: data.driveUrl, isLocalFile: data.isLocalFile, message: data.message };
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function listGoogleDriveWorkspaceFiles(accessToken?: string): Promise<any[]> {
|
export async function listGoogleDriveWorkspaceFiles(accessToken?: string): Promise<any[]> {
|
||||||
|
|||||||
Reference in New Issue
Block a user