@remcostoeten/fync
Version:
Unified TypeScript library for 9 popular APIs with consistent functional architecture
213 lines • 5.62 kB
TypeScript
import { type TModule } from "../core";
declare const resources: {
files: import("../core").TResourceConfig<{
listFiles: {
path: string;
};
getFile: {
path: string;
};
createFile: {
path: string;
method: "POST";
};
updateFile: {
path: string;
method: "PATCH";
};
deleteFile: {
path: string;
method: "DELETE";
};
copyFile: {
path: string;
method: "POST";
};
moveFile: {
path: string;
method: "PATCH";
};
exportFile: {
path: string;
};
downloadFile: {
path: string;
};
generateIds: {
path: string;
};
watchFile: {
path: string;
method: "POST";
};
emptyTrash: {
path: string;
method: "DELETE";
};
getFileMetadata: {
path: string;
};
updateFileMetadata: {
path: string;
method: "PATCH";
};
}>;
permissions: import("../core").TResourceConfig<{
listPermissions: {
path: string;
};
getPermission: {
path: string;
};
createPermission: {
path: string;
method: "POST";
};
updatePermission: {
path: string;
method: "PATCH";
};
deletePermission: {
path: string;
method: "DELETE";
};
}>;
comments: import("../core").TResourceConfig<{
listComments: {
path: string;
};
getComment: {
path: string;
};
createComment: {
path: string;
method: "POST";
};
updateComment: {
path: string;
method: "PATCH";
};
deleteComment: {
path: string;
method: "DELETE";
};
}>;
replies: import("../core").TResourceConfig<{
listReplies: {
path: string;
};
getReply: {
path: string;
};
createReply: {
path: string;
method: "POST";
};
updateReply: {
path: string;
method: "PATCH";
};
deleteReply: {
path: string;
method: "DELETE";
};
}>;
revisions: import("../core").TResourceConfig<{
listRevisions: {
path: string;
};
getRevision: {
path: string;
};
updateRevision: {
path: string;
method: "PATCH";
};
deleteRevision: {
path: string;
method: "DELETE";
};
}>;
drives: import("../core").TResourceConfig<{
listDrives: {
path: string;
};
getDrive: {
path: string;
};
createDrive: {
path: string;
method: "POST";
};
updateDrive: {
path: string;
method: "PATCH";
};
deleteDrive: {
path: string;
method: "DELETE";
};
hideDrive: {
path: string;
method: "POST";
};
unhideDrive: {
path: string;
method: "POST";
};
}>;
changes: import("../core").TResourceConfig<{
listChanges: {
path: string;
};
getStartPageToken: {
path: string;
};
watchChanges: {
path: string;
method: "POST";
};
}>;
channels: import("../core").TResourceConfig<{
stopChannel: {
path: string;
method: "POST";
};
}>;
about: import("../core").TResourceConfig<{
getAbout: {
path: string;
};
}>;
};
type TGoogleDriveModule = TModule<typeof resources> & {
listFiles: (options?: any) => Promise<any>;
getFile: (fileId: string) => Promise<any>;
createFile: (metadata: any, content?: any) => Promise<any>;
updateFile: (fileId: string, metadata?: any, content?: any) => Promise<any>;
deleteFile: (fileId: string) => Promise<any>;
copyFile: (fileId: string, name?: string) => Promise<any>;
moveFile: (fileId: string, parentId: string) => Promise<any>;
downloadFile: (fileId: string) => Promise<any>;
exportFile: (fileId: string, mimeType: string) => Promise<any>;
createFolder: (name: string, parentId?: string) => Promise<any>;
listFolders: () => Promise<any>;
getFolderContents: (folderId: string) => Promise<any>;
searchFiles: (query: string) => Promise<any>;
getFilesByName: (name: string) => Promise<any>;
getFilesByType: (mimeType: string) => Promise<any>;
getSharedFiles: () => Promise<any>;
getRecentFiles: (days?: number) => Promise<any>;
getStorageQuota: () => Promise<any>;
shareFile: (fileId: string, email: string, role?: string) => Promise<any>;
unshareFile: (fileId: string, permissionId: string) => Promise<any>;
getFilePermissions: (fileId: string) => Promise<any>;
emptyTrash: () => Promise<any>;
restoreFile: (fileId: string) => Promise<any>;
permanentlyDeleteFile: (fileId: string) => Promise<any>;
};
export declare function GoogleDrive(config: {
token: string;
}): TGoogleDriveModule;
export * from "./types";
//# sourceMappingURL=index.d.ts.map