import { Temporal } from "@js-temporal/polyfill";
import { URLPattern } from "urlpattern-polyfill";
import { s as GetUserAgentOptions } from "./docloader-D7k5A9JP.js";
import { TracerProvider } from "@opentelemetry/api";

//#region src/webfinger/jrd.d.ts
/**
 * Describes a resource.  See also
 * [RFC 7033 section 4.4](https://datatracker.ietf.org/doc/html/rfc7033#section-4.4).
 */
interface ResourceDescriptor {
  /**
   * A URI that identifies the entity that this descriptor describes.
   */
  subject?: string;
  /**
   * URIs that identify the same entity as the `subject`.
   */
  aliases?: string[];
  /**
   * Conveys additional information about the `subject` of this descriptor.
   */
  properties?: Record<string, string>;
  /**
   * Links to other resources.
   */
  links?: Link[];
}
/**
 * Represents a link.  See also
 * [RFC 7033 section 4.4.4](https://datatracker.ietf.org/doc/html/rfc7033#section-4.4.4).
 */
interface Link {
  /**
   * The link's relation type, which is either a URI or a registered relation
   * type (see [RFC 5988](https://datatracker.ietf.org/doc/html/rfc5988)).
   */
  rel: string;
  /**
   * The media type of the target resource (see
   * [RFC 6838](https://datatracker.ietf.org/doc/html/rfc6838)).
   */
  type?: string;
  /**
   * A URI pointing to the target resource.
   */
  href?: string;
  /**
   * Human-readable titles describing the link relation.  If the language is
   * unknown or unspecified, the key is `"und"`.
   */
  titles?: Record<string, string>;
  /**
   * Conveys additional information about the link relation.
   */
  properties?: Record<string, string>;
  /**
   * A URI Template (RFC 6570) that can be used to construct URIs by
   * substituting variables. Used primarily for subscription endpoints
   * where parameters like account URIs need to be dynamically inserted.
   * @since 1.9.0
   */
  template?: string;
}
//#endregion
//#region src/webfinger/lookup.d.ts
/**
 * Options for {@link lookupWebFinger}.
 * @since 1.3.0
 */
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 maximum number of redirections to follow.
   * @default `5`
   * @since 1.8.0
   */
  maxRedirection?: number;
  /**
   * The OpenTelemetry tracer provider.  If omitted, the global tracer provider
   * is used.
   */
  tracerProvider?: TracerProvider;
  /**
   * AbortSignal for cancelling the request.
   * @since 1.8.0
   * @
   */
  signal?: AbortSignal;
}
/**
 * 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
 */
declare function lookupWebFinger(resource: URL | string, options?: LookupWebFingerOptions): Promise<ResourceDescriptor | null>;
//#endregion
export { ResourceDescriptor as i, lookupWebFinger as n, Link as r, LookupWebFingerOptions as t };