Unverified Commit 00812d7f authored by Hong Minhee's avatar Hong Minhee
Browse files

Add since tags to API docs

[ci skip]
parent 5500c2a2
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -20,6 +20,7 @@ export interface Context<TContextData> {
   * Builds the URI of the NodeInfo document.
   * @returns The NodeInfo URI.
   * @throws {RouterError} If no NodeInfo dispatcher is available.
   * @since 0.2.0
   */
  getNodeInfoUri(): URL;

@@ -93,6 +94,7 @@ export interface Context<TContextData> {
   * @returns The authenticated document loader.
   * @throws {Error} If the identity is not valid.
   * @throws {TypeError} If the key is invalid or unsupported.
   * @since 0.4.0
   */
  getDocumentLoader(identity: { handle: string }): Promise<DocumentLoader>;

@@ -104,6 +106,7 @@ export interface Context<TContextData> {
   *                 The actor's key pair.
   * @returns The authenticated document loader.
   * @throws {TypeError} If the key is invalid or unsupported.
   * @since 0.4.0
   */
  getDocumentLoader(
    identity: { keyId: URL; privateKey: CryptoKey },
+3 −0
Original line number Diff line number Diff line
@@ -345,6 +345,7 @@ export async function handleInbox<TContextData>(
/**
 * Options for the {@link respondWithObject} and
 * {@link respondWithObjectIfAcceptable} functions.
 * @since 0.3.0
 */
export interface RespondWithObjectOptions {
  /**
@@ -358,6 +359,7 @@ export interface RespondWithObjectOptions {
 *
 * @param object The object to respond with.
 * @param options Options.
 * @since 0.3.0
 */
export async function respondWithObject(
  object: Object,
@@ -378,6 +380,7 @@ export async function respondWithObject(
 * @param object The object to respond with.
 * @param request The request to check for JSON-LD acceptability.
 * @param options Options.
 * @since 0.3.0
 */
export async function respondWithObjectIfAcceptable(
  object: Object,
+8 −0
Original line number Diff line number Diff line
@@ -2,11 +2,15 @@ import { Temporal } from "@js-temporal/polyfill";

/**
 * A key for a key-value store.  An array of one or more strings.
 *
 * @since 0.5.0
 */
export type KvKey = readonly [string] | readonly [string, ...string[]];

/**
 * Additional options for setting a value in a key-value store.
 *
 * @since 0.5.0
 */
export interface KvStoreSetOptions {
  /**
@@ -17,6 +21,8 @@ export interface KvStoreSetOptions {

/**
 * An abstract interface for a key-value store.
 *
 * @since 0.5.0
 */
export interface KvStore {
  /**
@@ -45,6 +51,8 @@ export interface KvStore {
/**
 * A key-value store that stores values in memory.
 * Do not use this in production as it does not persist values.
 *
 * @since 0.5.0
 */
export class MemoryKvStore implements KvStore {
  #values: Record<string, [unknown, null | Temporal.Instant]> = {};
+3 −0
Original line number Diff line number Diff line
@@ -70,6 +70,8 @@ export interface FederationParameters {
   * A factory function that creates an authenticated document loader for a
   * given identity.  This is used for fetching documents that require
   * authentication.
   *
   * @since 0.4.0
   */
  authenticatedDocumentLoaderFactory?: AuthenticatedDocumentLoaderFactory;

@@ -388,6 +390,7 @@ export class Federation<TContextData> {
   *             must have no variables.
   * @param dispatcher A NodeInfo dispatcher callback to register.
   * @throws {RouterError} Thrown if the path pattern is invalid.
   * @since 0.2.0
   */
  setNodeInfoDispatcher(
    path: string,
+6 −0
Original line number Diff line number Diff line
@@ -3,6 +3,8 @@ import type { Temporal } from "@js-temporal/polyfill";

/**
 * Additional options for enqueuing a message in a queue.
 *
 * @since 0.5.0
 */
export interface MessageQueueEnqueueOptions {
  /**
@@ -13,6 +15,8 @@ export interface MessageQueueEnqueueOptions {

/**
 * An abstract interface for a message queue.
 *
 * @since 0.5.0
 */
export interface MessageQueue {
  /**
@@ -32,6 +36,8 @@ export interface MessageQueue {
/**
 * A message queue that processes messages in the same process.
 * Do not use this in production as it does not persist messages.
 *
 * @since 0.5.0
 */
export class InProcessMessageQueue implements MessageQueue {
  #handlers: ((message: any) => Promise<void> | void)[] = [];
Loading