///
export = Service;
/**
* @typedef {import('../../lib/core').ClientOptions} ClientOptions
* @typedef {import('../..').HttpOptions} HttpOptions
* @typedef {import('ipfs-core-types/src/basic').AbortOptions} AbortOptions
* @typedef {import('ipfs-core-types/src/pin/remote/service').API} API
* @typedef {import('ipfs-core-types/src/pin/remote/service').Credentials} Credentials
* @typedef {import('ipfs-core-types/src/pin/remote/service').RemotePinService} RemotePinService
* @typedef {import('ipfs-core-types/src/pin/remote/service').RemotePinServiceWithStat} RemotePinServiceWithStat
* @implements {API}
*/
declare class Service implements API {
/**
* @param {Client} client
* @param {string} name
* @param {Credentials & AbortOptions & HttpOptions} options
*/
static add(client: Client, name: string, options: Credentials & AbortOptions & HttpOptions): Promise;
/**
* @param {URL} url
*/
static encodeEndpoint(url: URL): string;
/**
* @param {Client} client
* @param {string} name
* @param {AbortOptions & HttpOptions} [options]
*/
static rm(client: Client, name: string, { timeout, signal, headers }?: (import("ipfs-core-types/src/basic").AbortOptions & import("../..").HttpOptions) | undefined): Promise;
/**
* @template {true} Stat
* @param {Client} client
* @param {{ stat?: Stat } & AbortOptions & HttpOptions} [options]
*/
static ls(client: Client, { stat, timeout, signal, headers }?: ({
stat?: Stat | undefined;
} & import("ipfs-core-types/src/basic").AbortOptions & import("../..").HttpOptions) | undefined): Promise;
/**
* @param {Object} json
* @returns {RemotePinServiceWithStat}
*/
static decodeRemoteService(json: any): RemotePinServiceWithStat;
/**
* @param {Object} json
* @returns {import('ipfs-core-types/src/pin/remote/service').Stat}
*/
static decodeStat(json: any): import('ipfs-core-types/src/pin/remote/service').Stat;
/**
* @param {ClientOptions} options
*/
constructor(options: ClientOptions);
/** @private */
private client;
/**
* Registers remote pinning service with a given name. Errors if service
* with the given name is already registered.
*
* @param {string} name
* @param {Credentials & AbortOptions & HttpOptions} options
*/
add(name: string, options: Credentials & AbortOptions & HttpOptions): Promise;
/**
* Unregisteres remote pinning service with a given name. If service with such
* name isn't registerede this is a noop.
*
* @param {string} name
* @param {AbortOptions & HttpOptions} [options]
*/
rm(name: string, options?: (import("ipfs-core-types/src/basic").AbortOptions & import("../..").HttpOptions) | undefined): Promise;
/**
* List registered remote pinning services.
*
* @param {{ stat?: true } & AbortOptions & HttpOptions} [options]
*/
ls(options?: ({
stat?: true | undefined;
} & import("ipfs-core-types/src/basic").AbortOptions & import("../..").HttpOptions) | undefined): Promise;
}
declare namespace Service {
export { ClientOptions, HttpOptions, AbortOptions, API, Credentials, RemotePinService, RemotePinServiceWithStat };
}
type Credentials = import("ipfs-core-types/src/pin/remote/service").Credentials;
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;
};
import Client = require("../../lib/core");
type RemotePinServiceWithStat = import("ipfs-core-types/src/pin/remote/service").RemotePinServiceWithStat;
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/service").API;
type RemotePinService = import("ipfs-core-types/src/pin/remote/service").RemotePinService;
//# sourceMappingURL=service.d.ts.map