Loading packages/fedify/src/federation/builder.ts +246 −24 Original line number Diff line number Diff line Loading @@ -1211,17 +1211,130 @@ export class FederationBuilderImpl<TContextData> TParam extends string, >( name: string | symbol, ...args: [ // deno-lint-ignore no-explicit-any (new (...args: any[]) => TObject) & { typeId: URL }, `${string}${Rfc6570Expression<TParam>}${string}`, CustomCollectionDispatcher< itemType: (new (...args: any[]) => TObject) & { typeId: URL }, path: `${string}${Rfc6570Expression<TParam>}${string}${Rfc6570Expression< TParam >}${string}${Rfc6570Expression<TParam>}${string}${Rfc6570Expression< TParam >}${string}`, dispatcher: CustomCollectionDispatcher< TObject, TParam, RequestContext<TContextData>, TContextData >, ): CustomCollectionCallbackSetters< TParam, RequestContext<TContextData>, TContextData >; setCollectionDispatcher< TObject extends Object, TParam extends string, >( name: string | symbol, // deno-lint-ignore no-explicit-any itemType: (new (...args: any[]) => TObject) & { typeId: URL }, path: `${string}${Rfc6570Expression< TParam >}${string}${Rfc6570Expression< TParam >}${string}${Rfc6570Expression< TParam >}${string}${Rfc6570Expression< TParam >}${string}`, dispatcher: CustomCollectionDispatcher< TObject, TParam, RequestContext<TContextData>, TContextData >, ): CustomCollectionCallbackSetters< TParam, RequestContext<TContextData>, TContextData >; setCollectionDispatcher< TObject extends Object, TParam extends string, >( name: string | symbol, // deno-lint-ignore no-explicit-any itemType: (new (...args: any[]) => TObject) & { typeId: URL }, path: `${string}${Rfc6570Expression< TParam >}${string}${Rfc6570Expression< TParam >}${string}${Rfc6570Expression< TParam >}${string}`, dispatcher: CustomCollectionDispatcher< TObject, TParam, RequestContext<TContextData>, TContextData >, ): CustomCollectionCallbackSetters< TParam, RequestContext<TContextData>, TContextData >; setCollectionDispatcher< TObject extends Object, TParam extends string, >( name: string | symbol, // deno-lint-ignore no-explicit-any itemType: (new (...args: any[]) => TObject) & { typeId: URL }, path: `${string}${Rfc6570Expression<TParam>}${string}${Rfc6570Expression< TParam >}${string}`, dispatcher: CustomCollectionDispatcher< TObject, TParam, RequestContext<TContextData>, TContextData >, ): CustomCollectionCallbackSetters< TParam, RequestContext<TContextData>, TContextData >; setCollectionDispatcher< TObject extends Object, TParam extends string, >( name: string | symbol, // deno-lint-ignore no-explicit-any itemType: (new (...args: any[]) => TObject) & { typeId: URL }, path: `${string}${Rfc6570Expression<TParam>}${string}`, dispatcher: CustomCollectionDispatcher< TObject, TParam, RequestContext<TContextData>, TContextData >, ): CustomCollectionCallbackSetters< TParam, RequestContext<TContextData>, TContextData >; setCollectionDispatcher< TObject extends Object, TParam extends string, >( name: string | symbol, // deno-lint-ignore no-explicit-any itemType: (new (...args: any[]) => TObject) & { typeId: URL }, path: string, dispatcher: CustomCollectionDispatcher< TObject, TParam, RequestContext<TContextData>, TContextData >, ] ): CustomCollectionCallbackSetters< TParam, RequestContext<TContextData>, Loading @@ -1230,7 +1343,9 @@ export class FederationBuilderImpl<TContextData> return this.#setCustomCollectionDispatcher( name, "collection", ...args, itemType, path as `${string}${Rfc6570Expression<TParam>}${string}`, dispatcher, ); } Loading @@ -1239,17 +1354,122 @@ export class FederationBuilderImpl<TContextData> TParam extends string, >( name: string | symbol, ...args: [ // deno-lint-ignore no-explicit-any (new (...args: any[]) => TObject) & { typeId: URL }, `${string}${Rfc6570Expression<TParam>}${string}`, CustomCollectionDispatcher< itemType: (new (...args: any[]) => TObject) & { typeId: URL }, path: `${string}${Rfc6570Expression<TParam>}${string}${Rfc6570Expression< TParam >}${string}${Rfc6570Expression<TParam>}${string}${Rfc6570Expression< TParam >}${string}${Rfc6570Expression<TParam>}${string}`, dispatcher: CustomCollectionDispatcher< TObject, TParam, RequestContext<TContextData>, TContextData >, ): CustomCollectionCallbackSetters< TParam, RequestContext<TContextData>, TContextData >; setOrderedCollectionDispatcher< TObject extends Object, TParam extends string, >( name: string | symbol, // deno-lint-ignore no-explicit-any itemType: (new (...args: any[]) => TObject) & { typeId: URL }, path: `${string}${Rfc6570Expression<TParam>}${string}${Rfc6570Expression< TParam >}${string}${Rfc6570Expression<TParam>}${string}${Rfc6570Expression< TParam >}${string}`, dispatcher: CustomCollectionDispatcher< TObject, TParam, RequestContext<TContextData>, TContextData >, ): CustomCollectionCallbackSetters< TParam, RequestContext<TContextData>, TContextData >; setOrderedCollectionDispatcher< TObject extends Object, TParam extends string, >( name: string | symbol, // deno-lint-ignore no-explicit-any itemType: (new (...args: any[]) => TObject) & { typeId: URL }, path: `${string}${Rfc6570Expression<TParam>}${string}${Rfc6570Expression< TParam >}${string}${Rfc6570Expression<TParam>}${string}`, dispatcher: CustomCollectionDispatcher< TObject, TParam, RequestContext<TContextData>, TContextData >, ): CustomCollectionCallbackSetters< TParam, RequestContext<TContextData>, TContextData >; setOrderedCollectionDispatcher< TObject extends Object, TParam extends string, >( name: string | symbol, // deno-lint-ignore no-explicit-any itemType: (new (...args: any[]) => TObject) & { typeId: URL }, path: `${string}${Rfc6570Expression<TParam>}${string}${Rfc6570Expression< TParam >}${string}`, dispatcher: CustomCollectionDispatcher< TObject, TParam, RequestContext<TContextData>, TContextData >, ): CustomCollectionCallbackSetters< TParam, RequestContext<TContextData>, TContextData >; setOrderedCollectionDispatcher< TObject extends Object, TParam extends string, >( name: string | symbol, // deno-lint-ignore no-explicit-any itemType: (new (...args: any[]) => TObject) & { typeId: URL }, path: `${string}${Rfc6570Expression<TParam>}${string}`, dispatcher: CustomCollectionDispatcher< TObject, TParam, RequestContext<TContextData>, TContextData >, ): CustomCollectionCallbackSetters< TParam, RequestContext<TContextData>, TContextData >; setOrderedCollectionDispatcher< TObject extends Object, TParam extends string, >( name: string | symbol, // deno-lint-ignore no-explicit-any itemType: (new (...args: any[]) => TObject) & { typeId: URL }, path: string, dispatcher: CustomCollectionDispatcher< TObject, TParam, RequestContext<TContextData>, TContextData >, ] ): CustomCollectionCallbackSetters< TParam, RequestContext<TContextData>, Loading @@ -1258,7 +1478,9 @@ export class FederationBuilderImpl<TContextData> return this.#setCustomCollectionDispatcher( name, "orderedCollection", ...args, itemType, path as `${string}${Rfc6570Expression<TParam>}${string}`, dispatcher, ); } Loading packages/fedify/src/federation/federation.ts +294 −1 Original line number Diff line number Diff line Loading @@ -457,7 +457,152 @@ export interface Federatable<TContextData> { inboxPath: `${string}{identifier}${string}` | `${string}{handle}${string}`, sharedInboxPath?: string, ): InboxListenerSetters<TContextData>; /** ß /** * Registers a collection of objects dispatcher. * * @template TContextData The context data to pass to the {@link Context}. * @template TObject The type of objects to dispatch. * @template TParam The parameter names of the requested URL. * @param name A unique name for the collection dispatcher. * @param itemType The Activity Vocabulary class of the object to dispatch. * @param path The URI path pattern for the collection dispatcher. * The syntax is based on URI Template * ([RFC 6570](https://tools.ietf.org/html/rfc6570)). * The path must have one or more variables. * @param dispatcher A collection dispatcher callback to register. */ setCollectionDispatcher<TObject extends Object, TParam extends string>( name: string | symbol, // deno-lint-ignore no-explicit-any itemType: (new (...args: any[]) => TObject) & { typeId: URL }, path: `${string}${Rfc6570Expression<TParam>}${string}${Rfc6570Expression< TParam >}${string}${Rfc6570Expression<TParam>}${string}${Rfc6570Expression< TParam >}${string}`, dispatcher: CustomCollectionDispatcher< TObject, TParam, RequestContext<TContextData>, TContextData >, ): CustomCollectionCallbackSetters< TParam, RequestContext<TContextData>, TContextData >; /** * Registers a collection of objects dispatcher. * * @template TContextData The context data to pass to the {@link Context}. * @template TObject The type of objects to dispatch. * @template TParam The parameter names of the requested URL. * @param name A unique name for the collection dispatcher. * @param itemType The Activity Vocabulary class of the object to dispatch. * @param path The URI path pattern for the collection dispatcher. * The syntax is based on URI Template * ([RFC 6570](https://tools.ietf.org/html/rfc6570)). * The path must have one or more variables. * @param dispatcher A collection dispatcher callback to register. */ setCollectionDispatcher<TObject extends Object, TParam extends string>( name: string | symbol, // deno-lint-ignore no-explicit-any itemType: (new (...args: any[]) => TObject) & { typeId: URL }, path: `${string}${Rfc6570Expression< TParam >}${string}${Rfc6570Expression< TParam >}${string}${Rfc6570Expression< TParam >}${string}${Rfc6570Expression< TParam >}${string}`, dispatcher: CustomCollectionDispatcher< TObject, TParam, RequestContext<TContextData>, TContextData >, ): CustomCollectionCallbackSetters< TParam, RequestContext<TContextData>, TContextData >; /** * Registers a collection of objects dispatcher. * * @template TContextData The context data to pass to the {@link Context}. * @template TObject The type of objects to dispatch. * @template TParam The parameter names of the requested URL. * @param name A unique name for the collection dispatcher. * @param itemType The Activity Vocabulary class of the object to dispatch. * @param path The URI path pattern for the collection dispatcher. * The syntax is based on URI Template * ([RFC 6570](https://tools.ietf.org/html/rfc6570)). * The path must have one or more variables. * @param dispatcher A collection dispatcher callback to register. */ setCollectionDispatcher<TObject extends Object, TParam extends string>( name: string | symbol, // deno-lint-ignore no-explicit-any itemType: (new (...args: any[]) => TObject) & { typeId: URL }, path: `${string}${Rfc6570Expression< TParam >}${string}${Rfc6570Expression< TParam >}${string}${Rfc6570Expression< TParam >}${string}`, dispatcher: CustomCollectionDispatcher< TObject, TParam, RequestContext<TContextData>, TContextData >, ): CustomCollectionCallbackSetters< TParam, RequestContext<TContextData>, TContextData >; /** * Registers a collection of objects dispatcher. * * @template TContextData The context data to pass to the {@link Context}. * @template TObject The type of objects to dispatch. * @template TParam The parameter names of the requested URL. * @param name A unique name for the collection dispatcher. * @param itemType The Activity Vocabulary class of the object to dispatch. * @param path The URI path pattern for the collection dispatcher. * The syntax is based on URI Template * ([RFC 6570](https://tools.ietf.org/html/rfc6570)). * The path must have one or more variables. * @param dispatcher A collection dispatcher callback to register. */ setCollectionDispatcher<TObject extends Object, TParam extends string>( name: string | symbol, // deno-lint-ignore no-explicit-any itemType: (new (...args: any[]) => TObject) & { typeId: URL }, path: `${string}${Rfc6570Expression<TParam>}${string}${Rfc6570Expression< TParam >}${string}`, dispatcher: CustomCollectionDispatcher< TObject, TParam, RequestContext<TContextData>, TContextData >, ): CustomCollectionCallbackSetters< TParam, RequestContext<TContextData>, TContextData >; /** * Registers a collection of objects dispatcher. * * @template TContextData The context data to pass to the {@link Context}. Loading Loading @@ -488,6 +633,154 @@ export interface Federatable<TContextData> { TContextData >; /** * Registers an ordered collection of objects dispatcher. * * @template TContextData The context data to pass to the {@link Context}. * @template TObject The type of objects to dispatch. * @template TParam The parameter names of the requested URL. * @param name A unique name for the collection dispatcher. * @param itemType The Activity Vocabulary class of the object to dispatch. * @param path The URI path pattern for the collection dispatcher. * The syntax is based on URI Template * ([RFC 6570](https://tools.ietf.org/html/rfc6570)). * The path must have one or more variables. * @param dispatcher A collection dispatcher callback to register. */ setOrderedCollectionDispatcher< TObject extends Object, TParam extends string, >( name: string | symbol, // deno-lint-ignore no-explicit-any itemType: (new (...args: any[]) => TObject) & { typeId: URL }, path: `${string}${Rfc6570Expression<TParam>}${string}${Rfc6570Expression< TParam >}${string}${Rfc6570Expression<TParam>}${string}${Rfc6570Expression< TParam >}${string}${Rfc6570Expression<TParam>}${string}`, dispatcher: CustomCollectionDispatcher< TObject, TParam, RequestContext<TContextData>, TContextData >, ): CustomCollectionCallbackSetters< TParam, RequestContext<TContextData>, TContextData >; /** * Registers an ordered collection of objects dispatcher. * * @template TContextData The context data to pass to the {@link Context}. * @template TObject The type of objects to dispatch. * @template TParam The parameter names of the requested URL. * @param name A unique name for the collection dispatcher. * @param itemType The Activity Vocabulary class of the object to dispatch. * @param path The URI path pattern for the collection dispatcher. * The syntax is based on URI Template * ([RFC 6570](https://tools.ietf.org/html/rfc6570)). * The path must have one or more variables. * @param dispatcher A collection dispatcher callback to register. */ setOrderedCollectionDispatcher< TObject extends Object, TParam extends string, >( name: string | symbol, // deno-lint-ignore no-explicit-any itemType: (new (...args: any[]) => TObject) & { typeId: URL }, path: `${string}${Rfc6570Expression<TParam>}${string}${Rfc6570Expression< TParam >}${string}${Rfc6570Expression<TParam>}${string}${Rfc6570Expression< TParam >}${string}`, dispatcher: CustomCollectionDispatcher< TObject, TParam, RequestContext<TContextData>, TContextData >, ): CustomCollectionCallbackSetters< TParam, RequestContext<TContextData>, TContextData >; /** * Registers an ordered collection of objects dispatcher. * * @template TContextData The context data to pass to the {@link Context}. * @template TObject The type of objects to dispatch. * @template TParam The parameter names of the requested URL. * @param name A unique name for the collection dispatcher. * @param itemType The Activity Vocabulary class of the object to dispatch. * @param path The URI path pattern for the collection dispatcher. * The syntax is based on URI Template * ([RFC 6570](https://tools.ietf.org/html/rfc6570)). * The path must have one or more variables. * @param dispatcher A collection dispatcher callback to register. */ setOrderedCollectionDispatcher< TObject extends Object, TParam extends string, >( name: string | symbol, // deno-lint-ignore no-explicit-any itemType: (new (...args: any[]) => TObject) & { typeId: URL }, path: `${string}${Rfc6570Expression<TParam>}${string}${Rfc6570Expression< TParam >}${string}${Rfc6570Expression<TParam>}${string}`, dispatcher: CustomCollectionDispatcher< TObject, TParam, RequestContext<TContextData>, TContextData >, ): CustomCollectionCallbackSetters< TParam, RequestContext<TContextData>, TContextData >; /** * Registers an ordered collection of objects dispatcher. * * @template TContextData The context data to pass to the {@link Context}. * @template TObject The type of objects to dispatch. * @template TParam The parameter names of the requested URL. * @param name A unique name for the collection dispatcher. * @param itemType The Activity Vocabulary class of the object to dispatch. * @param path The URI path pattern for the collection dispatcher. * The syntax is based on URI Template * ([RFC 6570](https://tools.ietf.org/html/rfc6570)). * The path must have one or more variables. * @param dispatcher A collection dispatcher callback to register. */ setOrderedCollectionDispatcher< TObject extends Object, TParam extends string, >( name: string | symbol, // deno-lint-ignore no-explicit-any itemType: (new (...args: any[]) => TObject) & { typeId: URL }, path: `${string}${Rfc6570Expression<TParam>}${string}${Rfc6570Expression< TParam >}${string}`, dispatcher: CustomCollectionDispatcher< TObject, TParam, RequestContext<TContextData>, TContextData >, ): CustomCollectionCallbackSetters< TParam, RequestContext<TContextData>, TContextData >; /** * Registers an ordered collection of objects dispatcher. * Loading Loading
packages/fedify/src/federation/builder.ts +246 −24 Original line number Diff line number Diff line Loading @@ -1211,17 +1211,130 @@ export class FederationBuilderImpl<TContextData> TParam extends string, >( name: string | symbol, ...args: [ // deno-lint-ignore no-explicit-any (new (...args: any[]) => TObject) & { typeId: URL }, `${string}${Rfc6570Expression<TParam>}${string}`, CustomCollectionDispatcher< itemType: (new (...args: any[]) => TObject) & { typeId: URL }, path: `${string}${Rfc6570Expression<TParam>}${string}${Rfc6570Expression< TParam >}${string}${Rfc6570Expression<TParam>}${string}${Rfc6570Expression< TParam >}${string}`, dispatcher: CustomCollectionDispatcher< TObject, TParam, RequestContext<TContextData>, TContextData >, ): CustomCollectionCallbackSetters< TParam, RequestContext<TContextData>, TContextData >; setCollectionDispatcher< TObject extends Object, TParam extends string, >( name: string | symbol, // deno-lint-ignore no-explicit-any itemType: (new (...args: any[]) => TObject) & { typeId: URL }, path: `${string}${Rfc6570Expression< TParam >}${string}${Rfc6570Expression< TParam >}${string}${Rfc6570Expression< TParam >}${string}${Rfc6570Expression< TParam >}${string}`, dispatcher: CustomCollectionDispatcher< TObject, TParam, RequestContext<TContextData>, TContextData >, ): CustomCollectionCallbackSetters< TParam, RequestContext<TContextData>, TContextData >; setCollectionDispatcher< TObject extends Object, TParam extends string, >( name: string | symbol, // deno-lint-ignore no-explicit-any itemType: (new (...args: any[]) => TObject) & { typeId: URL }, path: `${string}${Rfc6570Expression< TParam >}${string}${Rfc6570Expression< TParam >}${string}${Rfc6570Expression< TParam >}${string}`, dispatcher: CustomCollectionDispatcher< TObject, TParam, RequestContext<TContextData>, TContextData >, ): CustomCollectionCallbackSetters< TParam, RequestContext<TContextData>, TContextData >; setCollectionDispatcher< TObject extends Object, TParam extends string, >( name: string | symbol, // deno-lint-ignore no-explicit-any itemType: (new (...args: any[]) => TObject) & { typeId: URL }, path: `${string}${Rfc6570Expression<TParam>}${string}${Rfc6570Expression< TParam >}${string}`, dispatcher: CustomCollectionDispatcher< TObject, TParam, RequestContext<TContextData>, TContextData >, ): CustomCollectionCallbackSetters< TParam, RequestContext<TContextData>, TContextData >; setCollectionDispatcher< TObject extends Object, TParam extends string, >( name: string | symbol, // deno-lint-ignore no-explicit-any itemType: (new (...args: any[]) => TObject) & { typeId: URL }, path: `${string}${Rfc6570Expression<TParam>}${string}`, dispatcher: CustomCollectionDispatcher< TObject, TParam, RequestContext<TContextData>, TContextData >, ): CustomCollectionCallbackSetters< TParam, RequestContext<TContextData>, TContextData >; setCollectionDispatcher< TObject extends Object, TParam extends string, >( name: string | symbol, // deno-lint-ignore no-explicit-any itemType: (new (...args: any[]) => TObject) & { typeId: URL }, path: string, dispatcher: CustomCollectionDispatcher< TObject, TParam, RequestContext<TContextData>, TContextData >, ] ): CustomCollectionCallbackSetters< TParam, RequestContext<TContextData>, Loading @@ -1230,7 +1343,9 @@ export class FederationBuilderImpl<TContextData> return this.#setCustomCollectionDispatcher( name, "collection", ...args, itemType, path as `${string}${Rfc6570Expression<TParam>}${string}`, dispatcher, ); } Loading @@ -1239,17 +1354,122 @@ export class FederationBuilderImpl<TContextData> TParam extends string, >( name: string | symbol, ...args: [ // deno-lint-ignore no-explicit-any (new (...args: any[]) => TObject) & { typeId: URL }, `${string}${Rfc6570Expression<TParam>}${string}`, CustomCollectionDispatcher< itemType: (new (...args: any[]) => TObject) & { typeId: URL }, path: `${string}${Rfc6570Expression<TParam>}${string}${Rfc6570Expression< TParam >}${string}${Rfc6570Expression<TParam>}${string}${Rfc6570Expression< TParam >}${string}${Rfc6570Expression<TParam>}${string}`, dispatcher: CustomCollectionDispatcher< TObject, TParam, RequestContext<TContextData>, TContextData >, ): CustomCollectionCallbackSetters< TParam, RequestContext<TContextData>, TContextData >; setOrderedCollectionDispatcher< TObject extends Object, TParam extends string, >( name: string | symbol, // deno-lint-ignore no-explicit-any itemType: (new (...args: any[]) => TObject) & { typeId: URL }, path: `${string}${Rfc6570Expression<TParam>}${string}${Rfc6570Expression< TParam >}${string}${Rfc6570Expression<TParam>}${string}${Rfc6570Expression< TParam >}${string}`, dispatcher: CustomCollectionDispatcher< TObject, TParam, RequestContext<TContextData>, TContextData >, ): CustomCollectionCallbackSetters< TParam, RequestContext<TContextData>, TContextData >; setOrderedCollectionDispatcher< TObject extends Object, TParam extends string, >( name: string | symbol, // deno-lint-ignore no-explicit-any itemType: (new (...args: any[]) => TObject) & { typeId: URL }, path: `${string}${Rfc6570Expression<TParam>}${string}${Rfc6570Expression< TParam >}${string}${Rfc6570Expression<TParam>}${string}`, dispatcher: CustomCollectionDispatcher< TObject, TParam, RequestContext<TContextData>, TContextData >, ): CustomCollectionCallbackSetters< TParam, RequestContext<TContextData>, TContextData >; setOrderedCollectionDispatcher< TObject extends Object, TParam extends string, >( name: string | symbol, // deno-lint-ignore no-explicit-any itemType: (new (...args: any[]) => TObject) & { typeId: URL }, path: `${string}${Rfc6570Expression<TParam>}${string}${Rfc6570Expression< TParam >}${string}`, dispatcher: CustomCollectionDispatcher< TObject, TParam, RequestContext<TContextData>, TContextData >, ): CustomCollectionCallbackSetters< TParam, RequestContext<TContextData>, TContextData >; setOrderedCollectionDispatcher< TObject extends Object, TParam extends string, >( name: string | symbol, // deno-lint-ignore no-explicit-any itemType: (new (...args: any[]) => TObject) & { typeId: URL }, path: `${string}${Rfc6570Expression<TParam>}${string}`, dispatcher: CustomCollectionDispatcher< TObject, TParam, RequestContext<TContextData>, TContextData >, ): CustomCollectionCallbackSetters< TParam, RequestContext<TContextData>, TContextData >; setOrderedCollectionDispatcher< TObject extends Object, TParam extends string, >( name: string | symbol, // deno-lint-ignore no-explicit-any itemType: (new (...args: any[]) => TObject) & { typeId: URL }, path: string, dispatcher: CustomCollectionDispatcher< TObject, TParam, RequestContext<TContextData>, TContextData >, ] ): CustomCollectionCallbackSetters< TParam, RequestContext<TContextData>, Loading @@ -1258,7 +1478,9 @@ export class FederationBuilderImpl<TContextData> return this.#setCustomCollectionDispatcher( name, "orderedCollection", ...args, itemType, path as `${string}${Rfc6570Expression<TParam>}${string}`, dispatcher, ); } Loading
packages/fedify/src/federation/federation.ts +294 −1 Original line number Diff line number Diff line Loading @@ -457,7 +457,152 @@ export interface Federatable<TContextData> { inboxPath: `${string}{identifier}${string}` | `${string}{handle}${string}`, sharedInboxPath?: string, ): InboxListenerSetters<TContextData>; /** ß /** * Registers a collection of objects dispatcher. * * @template TContextData The context data to pass to the {@link Context}. * @template TObject The type of objects to dispatch. * @template TParam The parameter names of the requested URL. * @param name A unique name for the collection dispatcher. * @param itemType The Activity Vocabulary class of the object to dispatch. * @param path The URI path pattern for the collection dispatcher. * The syntax is based on URI Template * ([RFC 6570](https://tools.ietf.org/html/rfc6570)). * The path must have one or more variables. * @param dispatcher A collection dispatcher callback to register. */ setCollectionDispatcher<TObject extends Object, TParam extends string>( name: string | symbol, // deno-lint-ignore no-explicit-any itemType: (new (...args: any[]) => TObject) & { typeId: URL }, path: `${string}${Rfc6570Expression<TParam>}${string}${Rfc6570Expression< TParam >}${string}${Rfc6570Expression<TParam>}${string}${Rfc6570Expression< TParam >}${string}`, dispatcher: CustomCollectionDispatcher< TObject, TParam, RequestContext<TContextData>, TContextData >, ): CustomCollectionCallbackSetters< TParam, RequestContext<TContextData>, TContextData >; /** * Registers a collection of objects dispatcher. * * @template TContextData The context data to pass to the {@link Context}. * @template TObject The type of objects to dispatch. * @template TParam The parameter names of the requested URL. * @param name A unique name for the collection dispatcher. * @param itemType The Activity Vocabulary class of the object to dispatch. * @param path The URI path pattern for the collection dispatcher. * The syntax is based on URI Template * ([RFC 6570](https://tools.ietf.org/html/rfc6570)). * The path must have one or more variables. * @param dispatcher A collection dispatcher callback to register. */ setCollectionDispatcher<TObject extends Object, TParam extends string>( name: string | symbol, // deno-lint-ignore no-explicit-any itemType: (new (...args: any[]) => TObject) & { typeId: URL }, path: `${string}${Rfc6570Expression< TParam >}${string}${Rfc6570Expression< TParam >}${string}${Rfc6570Expression< TParam >}${string}${Rfc6570Expression< TParam >}${string}`, dispatcher: CustomCollectionDispatcher< TObject, TParam, RequestContext<TContextData>, TContextData >, ): CustomCollectionCallbackSetters< TParam, RequestContext<TContextData>, TContextData >; /** * Registers a collection of objects dispatcher. * * @template TContextData The context data to pass to the {@link Context}. * @template TObject The type of objects to dispatch. * @template TParam The parameter names of the requested URL. * @param name A unique name for the collection dispatcher. * @param itemType The Activity Vocabulary class of the object to dispatch. * @param path The URI path pattern for the collection dispatcher. * The syntax is based on URI Template * ([RFC 6570](https://tools.ietf.org/html/rfc6570)). * The path must have one or more variables. * @param dispatcher A collection dispatcher callback to register. */ setCollectionDispatcher<TObject extends Object, TParam extends string>( name: string | symbol, // deno-lint-ignore no-explicit-any itemType: (new (...args: any[]) => TObject) & { typeId: URL }, path: `${string}${Rfc6570Expression< TParam >}${string}${Rfc6570Expression< TParam >}${string}${Rfc6570Expression< TParam >}${string}`, dispatcher: CustomCollectionDispatcher< TObject, TParam, RequestContext<TContextData>, TContextData >, ): CustomCollectionCallbackSetters< TParam, RequestContext<TContextData>, TContextData >; /** * Registers a collection of objects dispatcher. * * @template TContextData The context data to pass to the {@link Context}. * @template TObject The type of objects to dispatch. * @template TParam The parameter names of the requested URL. * @param name A unique name for the collection dispatcher. * @param itemType The Activity Vocabulary class of the object to dispatch. * @param path The URI path pattern for the collection dispatcher. * The syntax is based on URI Template * ([RFC 6570](https://tools.ietf.org/html/rfc6570)). * The path must have one or more variables. * @param dispatcher A collection dispatcher callback to register. */ setCollectionDispatcher<TObject extends Object, TParam extends string>( name: string | symbol, // deno-lint-ignore no-explicit-any itemType: (new (...args: any[]) => TObject) & { typeId: URL }, path: `${string}${Rfc6570Expression<TParam>}${string}${Rfc6570Expression< TParam >}${string}`, dispatcher: CustomCollectionDispatcher< TObject, TParam, RequestContext<TContextData>, TContextData >, ): CustomCollectionCallbackSetters< TParam, RequestContext<TContextData>, TContextData >; /** * Registers a collection of objects dispatcher. * * @template TContextData The context data to pass to the {@link Context}. Loading Loading @@ -488,6 +633,154 @@ export interface Federatable<TContextData> { TContextData >; /** * Registers an ordered collection of objects dispatcher. * * @template TContextData The context data to pass to the {@link Context}. * @template TObject The type of objects to dispatch. * @template TParam The parameter names of the requested URL. * @param name A unique name for the collection dispatcher. * @param itemType The Activity Vocabulary class of the object to dispatch. * @param path The URI path pattern for the collection dispatcher. * The syntax is based on URI Template * ([RFC 6570](https://tools.ietf.org/html/rfc6570)). * The path must have one or more variables. * @param dispatcher A collection dispatcher callback to register. */ setOrderedCollectionDispatcher< TObject extends Object, TParam extends string, >( name: string | symbol, // deno-lint-ignore no-explicit-any itemType: (new (...args: any[]) => TObject) & { typeId: URL }, path: `${string}${Rfc6570Expression<TParam>}${string}${Rfc6570Expression< TParam >}${string}${Rfc6570Expression<TParam>}${string}${Rfc6570Expression< TParam >}${string}${Rfc6570Expression<TParam>}${string}`, dispatcher: CustomCollectionDispatcher< TObject, TParam, RequestContext<TContextData>, TContextData >, ): CustomCollectionCallbackSetters< TParam, RequestContext<TContextData>, TContextData >; /** * Registers an ordered collection of objects dispatcher. * * @template TContextData The context data to pass to the {@link Context}. * @template TObject The type of objects to dispatch. * @template TParam The parameter names of the requested URL. * @param name A unique name for the collection dispatcher. * @param itemType The Activity Vocabulary class of the object to dispatch. * @param path The URI path pattern for the collection dispatcher. * The syntax is based on URI Template * ([RFC 6570](https://tools.ietf.org/html/rfc6570)). * The path must have one or more variables. * @param dispatcher A collection dispatcher callback to register. */ setOrderedCollectionDispatcher< TObject extends Object, TParam extends string, >( name: string | symbol, // deno-lint-ignore no-explicit-any itemType: (new (...args: any[]) => TObject) & { typeId: URL }, path: `${string}${Rfc6570Expression<TParam>}${string}${Rfc6570Expression< TParam >}${string}${Rfc6570Expression<TParam>}${string}${Rfc6570Expression< TParam >}${string}`, dispatcher: CustomCollectionDispatcher< TObject, TParam, RequestContext<TContextData>, TContextData >, ): CustomCollectionCallbackSetters< TParam, RequestContext<TContextData>, TContextData >; /** * Registers an ordered collection of objects dispatcher. * * @template TContextData The context data to pass to the {@link Context}. * @template TObject The type of objects to dispatch. * @template TParam The parameter names of the requested URL. * @param name A unique name for the collection dispatcher. * @param itemType The Activity Vocabulary class of the object to dispatch. * @param path The URI path pattern for the collection dispatcher. * The syntax is based on URI Template * ([RFC 6570](https://tools.ietf.org/html/rfc6570)). * The path must have one or more variables. * @param dispatcher A collection dispatcher callback to register. */ setOrderedCollectionDispatcher< TObject extends Object, TParam extends string, >( name: string | symbol, // deno-lint-ignore no-explicit-any itemType: (new (...args: any[]) => TObject) & { typeId: URL }, path: `${string}${Rfc6570Expression<TParam>}${string}${Rfc6570Expression< TParam >}${string}${Rfc6570Expression<TParam>}${string}`, dispatcher: CustomCollectionDispatcher< TObject, TParam, RequestContext<TContextData>, TContextData >, ): CustomCollectionCallbackSetters< TParam, RequestContext<TContextData>, TContextData >; /** * Registers an ordered collection of objects dispatcher. * * @template TContextData The context data to pass to the {@link Context}. * @template TObject The type of objects to dispatch. * @template TParam The parameter names of the requested URL. * @param name A unique name for the collection dispatcher. * @param itemType The Activity Vocabulary class of the object to dispatch. * @param path The URI path pattern for the collection dispatcher. * The syntax is based on URI Template * ([RFC 6570](https://tools.ietf.org/html/rfc6570)). * The path must have one or more variables. * @param dispatcher A collection dispatcher callback to register. */ setOrderedCollectionDispatcher< TObject extends Object, TParam extends string, >( name: string | symbol, // deno-lint-ignore no-explicit-any itemType: (new (...args: any[]) => TObject) & { typeId: URL }, path: `${string}${Rfc6570Expression<TParam>}${string}${Rfc6570Expression< TParam >}${string}`, dispatcher: CustomCollectionDispatcher< TObject, TParam, RequestContext<TContextData>, TContextData >, ): CustomCollectionCallbackSetters< TParam, RequestContext<TContextData>, TContextData >; /** * Registers an ordered collection of objects dispatcher. * Loading