import { ReadLeafResult } from "./requests/readResource.mjs"; import { UpdateResult } from "./requests/updateDataResource.mjs"; import { LeafCreateAndOverwriteResult, LeafCreateIfAbsentResult } from "./requests/createDataResource.mjs"; import { BatchedRequester } from "./BatchedRequester.mjs"; import { SolidLeaf } from "../resources/SolidLeaf.mjs"; import { SolidConnectedPlugin } from "../SolidConnectedPlugin.mjs"; import { ConnectedContext } from "@ldo/connected"; import { DatasetChanges } from "@ldo/rdf-utils"; import { Quad } from "@rdfjs/types"; //#region src/requester/LeafBatchedRequester.d.ts declare const UPDATE_KEY = "update"; declare const UPLOAD_KEY = "upload"; /** * @internal * * A singleton to handle batched requests for leafs */ declare class LeafBatchedRequester extends BatchedRequester { /** * The URI of the leaf */ readonly resource: SolidLeaf; /** * @param uri - the URI of the leaf * @param context - SolidLdoDatasetContext of the parent dataset */ constructor(resource: SolidLeaf, context: ConnectedContext); /** * Checks if the resource is currently executing an update request * @returns true if the resource is currently executing an update request */ isUpdating(): boolean; /** * Checks if the resource is currently executing an upload request * @returns true if the resource is currently executing an upload request */ isUploading(): boolean; /** * Reads the leaf * @returns A ReadLeafResult */ read(): Promise; /** * Creates the leaf as a data resource * @param overwrite - If true, this will orverwrite the resource if it already * exists */ createDataResource(overwrite: true): Promise; createDataResource(overwrite?: false): Promise; createDataResource(overwrite?: boolean): Promise; /** * Update the data on this resource * @param changes - DatasetChanges that should be applied to the Pod */ updateDataResource(changes: DatasetChanges): Promise>; /** * Upload a binary at this resource's URI * @param blob - A binary blob * @param mimeType - the mime type of the blob * @param overwrite: If true, will overwrite an existing file */ upload(blob: Blob, mimeType: string, overwrite: true): Promise; upload(blob: Blob, mimeType: string, overwrite?: false): Promise; upload(blob: Blob, mimeType: string, overwrite?: boolean): Promise; } //#endregion export { LeafBatchedRequester, UPDATE_KEY, UPLOAD_KEY }; //# sourceMappingURL=LeafBatchedRequester.d.mts.map