@fedify/fedify
Version:
An ActivityPub server framework
39 lines • 1.39 kB
TypeScript
import { type TracerProvider } from "@opentelemetry/api";
import { type GetUserAgentOptions } from "../runtime/docloader.js";
import type { ResourceDescriptor } from "./jrd.js";
/**
* Options for {@link lookupWebFinger}.
* @since 1.3.0
*/
export interface LookupWebFingerOptions {
/**
* The options for making `User-Agent` header.
* If a string is given, it is used as the `User-Agent` header value.
* If an object is given, it is passed to {@link getUserAgent} to generate
* the `User-Agent` header value.
*/
userAgent?: GetUserAgentOptions | string;
/**
* Whether to allow private IP addresses in the URL.
*
* Mostly useful for testing purposes. *Do not use this in production.*
*
* Turned off by default.
* @since 1.4.0
*/
allowPrivateAddress?: boolean;
/**
* The OpenTelemetry tracer provider. If omitted, the global tracer provider
* is used.
*/
tracerProvider?: TracerProvider;
}
/**
* Looks up a WebFinger resource.
* @param resource The resource URL to look up.
* @param options Extra options for looking up the resource.
* @returns The resource descriptor, or `null` if not found.
* @since 0.2.0
*/
export declare function lookupWebFinger(resource: URL | string, options?: LookupWebFingerOptions): Promise<ResourceDescriptor | null>;
//# sourceMappingURL=lookup.d.ts.map