///
export = Remote;
/**
* @typedef {import('../..').HttpOptions} HttpOptions
* @typedef {import('../../lib/core').ClientOptions} ClientOptions
* @typedef {import('ipfs-core-types/src/basic').AbortOptions} AbortOptions
* @typedef {import('ipfs-core-types/src/pin/remote').API} API
* @typedef {import('ipfs-core-types/src/pin/remote').Pin} Pin
* @typedef {import('ipfs-core-types/src/pin/remote').AddOptions} AddOptions
* @typedef {import('ipfs-core-types/src/pin/remote').Query} Query
* @typedef {import('ipfs-core-types/src/pin/remote').Status} Status
*
* @implements {API}
*/
declare class Remote implements API {
/**
* @param {Client} client
* @param {CID} cid
* @param {AddOptions & AbortOptions & HttpOptions} options
*/
static add(client: Client, cid: CID, { timeout, signal, headers, ...options }: AddOptions & AbortOptions & HttpOptions): Promise;
/**
* @param {Object} json
* @param {string} json.Name
* @param {string} json.Cid
* @param {Status} json.Status
* @returns {Pin}
*/
static decodePin({ Name: name, Status: status, Cid: cid }: {
Name: string;
Cid: string;
Status: Status;
}): Pin;
/**
*
* @param {Client} client
* @param {Query & AbortOptions & HttpOptions} options
* @returns {AsyncIterable}
*/
static ls(client: Client, { timeout, signal, headers, ...query }: Query & AbortOptions & HttpOptions): AsyncIterable;
/**
*
* @param {Client} client
* @param {{all: boolean} & Query & AbortOptions & HttpOptions} options
*/
static rm(client: Client, { timeout, signal, headers, ...query }: {
all: boolean;
} & Query & AbortOptions & HttpOptions): Promise;
/**
* @param {ClientOptions} options
*/
constructor(options: ClientOptions);
/** @private */
private client;
/** @readonly */
readonly service: Service;
/**
* Stores an IPFS object(s) from a given path to a remote pinning service.
*
* @param {CID} cid
* @param {AddOptions & AbortOptions & HttpOptions} options
* @returns {Promise}
*/
add(cid: CID, options: AddOptions & AbortOptions & HttpOptions): Promise;
/**
* Returns a list of matching pins on the remote pinning service.
*
* @param {Query & AbortOptions & HttpOptions} query
*/
ls(query: Query & AbortOptions & HttpOptions): AsyncIterable;
/**
* Removes a single pin object matching query allowing it to be garbage
* collected (if needed). Will error if multiple pins mtach provided
* query. To remove all matches use `rmAll` instead.
*
* @param {Query & AbortOptions & HttpOptions} query
*/
rm(query: Query & AbortOptions & HttpOptions): Promise;
/**
* Removes all pin object that match given query allowing them to be garbage
* collected if needed.
*
* @param {Query & AbortOptions & HttpOptions} query
*/
rmAll(query: Query & AbortOptions & HttpOptions): Promise;
}
declare namespace Remote {
export { HttpOptions, ClientOptions, AbortOptions, API, Pin, AddOptions, Query, Status };
}
import Service = require("./service");
import CID = require("cids");
type AddOptions = import("ipfs-core-types/src/pin/remote").AddOptions;
type AbortOptions = import("ipfs-core-types/src/basic").AbortOptions;
type HttpOptions = {
/**
* - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.
*/
headers?: Headers | Record | undefined;
/**
* - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.
*/
searchParams?: Record | URLSearchParams | undefined;
};
type Pin = import("ipfs-core-types/src/pin/remote").Pin;
type Query = import("ipfs-core-types/src/pin/remote").Query;
import Client = require("../../lib/core");
type Status = "queued" | "pinning" | "pinned" | "failed";
type ClientOptions = {
host?: string | undefined;
port?: number | undefined;
protocol?: string | undefined;
/**
* - Request headers.
*/
headers?: Headers | Record | undefined;
/**
* - Amount of time until request should timeout in ms or humand readable. https://www.npmjs.com/package/parse-duration for valid string values.
*/
timeout?: string | number | undefined;
/**
* - Path to the API.
*/
apiPath?: string | undefined;
/**
* - Full API URL.
*/
url?: string | URL | import("multiaddr") | undefined;
method?: "POST" | "GET" | undefined;
ipld?: {
/**
* - An array of additional [IPLD formats](https://github.com/ipld/interface-ipld-format) to support
*/
formats?: any[] | undefined;
/**
* - an async function that takes the name of an [IPLD format](https://github.com/ipld/interface-ipld-format) as a string and should return the implementation of that codec
*/
loadFormat?: ((format: string) => Promise) | undefined;
} | undefined;
/**
* - A [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) used to control connection persistence and reuse for HTTP clients (only supported in node.js)
*/
agent?: import("http").Agent | import("https").Agent | undefined;
};
type API = import("ipfs-core-types/src/pin/remote").API;
//# sourceMappingURL=index.d.ts.map