import * as stream from "stream"; import type { NamedNode } from "@rdfjs/types"; import * as n3 from "n3"; import type { Models, Routes } from "@triply/utils"; import AsyncIteratorHelper from "./utils/AsyncIteratorHelper.ts"; import type { Account } from "./Account.ts"; import type App from "./App.ts"; import Asset from "./Asset.ts"; import Graph from "./Graph.ts"; import Service from "./Service.ts"; type JobDefaultsConfig = Omit; interface ImportFromDatasetArgs { graphMap?: { [from: string]: string | Graph | NamedNode; }; graphNames?: Array; overwrite?: boolean; } export type Prefixes = { [label: string]: n3.PrefixedToIri | string | NamedNode; }; type DsResourceType = "assets" | "graphs" | "services"; export type NewService = NewServiceVirtuoso | NewServiceElasticsearch | NewServiceJena; type NewServiceVirtuoso = { type: "virtuoso"; config?: never; }; type NewServiceElasticsearch = { type: "elasticSearch"; config?: Models.ServiceConfigElastic; }; type NewServiceJena = { type: "jena"; config?: Models.ServiceConfigJena; }; type UploadAssetModes = "throw-if-exists" | "replace-if-exists" | "append-version"; export default class Dataset { app: App; private _info?; owner: Account; private _lastJob?; slug: string; private _allPrefixes; readonly type = "Dataset"; constructor(app: App, owner: Account, datasetInfo: Models.Dataset); getServices(): AsyncIteratorHelper; getService(this: T, serviceName: string): Promise; clear(resourceType: DsResourceType, ...rest: DsResourceType[]): Promise; get api(): { url: string; path: string; }; getGraph(graphNameOrIri: string | NamedNode): Promise; deleteGraph(graphNameOrIri: string | NamedNode): Promise; private _setInfo; private _getDatasetNameWithOwner; getInfo(refresh?: boolean): Promise; getAsset(assetName: string, versionNumber?: number): Promise; getAssets(): AsyncIteratorHelper; getGraphs(): AsyncIteratorHelper; private _getDownloadPath; graphsToFile(destinationPath: string, opts?: { compressed?: boolean; graph?: Graph; }): Promise; graphsToStream(type: "compressed" | "rdf-js", opts?: { graph?: Graph; extension?: string; }): Promise; graphsToStore(graph?: Graph): Promise; importFromDataset(fromDataset: Dataset, args?: ImportFromDatasetArgs): Promise; update(config: Models.UpdateDataset): Promise; copy(toAccountName: string, newDatasetName?: string): Promise; renameGraph(from: string, to: string): Promise; delete(): Promise; setAvatar(pathBufferOrFile: string | Buffer | File): Promise; private _throwIfJobRunning; importFromFiles(files: File[] | string[], defaultsConfig?: JobDefaultsConfig): Promise; importFromStore(store: n3.Store, opts?: JobDefaultsConfig): Promise; importFromUrls(urls: string[], defaultConfig?: JobDefaultsConfig): Promise; describe(iri: string | NamedNode): Promise; getStatements(payload: { subject?: string; predicate?: string; object?: string; graph?: string; }): AsyncIteratorHelper; uploadAsset(fileOrPath: string | File, opts?: { mode?: UploadAssetModes; name?: string; }): Promise; uploadAsset(fileOrPath: string | File, name?: string): Promise; addService(name: string, opts?: NewService): Promise; ensureService(this: T, name: string, args?: NewService): Promise; addPrefixes(newPrefixes: Prefixes): Promise<{ [prefixLabel: string]: string; }>; removePrefixes(prefixLabels: string[]): Promise<{ [prefixLabel: string]: string; }>; getPrefixes(refresh?: boolean): Promise<{ [prefixLabel: string]: string; }>; nde: { datasetregister: { submit: (rejectOnValidationError?: boolean) => Promise; validate: (rejectOnValidationError?: boolean) => Promise; }; }; } interface JobConfig extends JobDefaultsConfig { app: App; datasetPath: string; datasetNameWithOwner: string; } export declare class JobUpload { private _config; private _info?; private jobUrl?; private urlMapper; constructor(conf: JobConfig); getJobUrl(): string | undefined; create(): Promise; info(): Models.IndexJob | undefined; private uploadFile; uploadFiles(files: string[] | File[]): Promise; private refresh; exec(): Promise; } export {}; //# sourceMappingURL=Dataset.d.ts.map