mirror of
https://github.com/CommunitySolidServer/CommunitySolidServer.git
synced 2024-10-03 14:55:10 +00:00
refactor: Enable jsdoc/tag-lines and jsdoc/sort-tags rules
This commit is contained in:
@@ -39,6 +39,7 @@ export class StaticAssetHandler extends HttpHandler {
|
||||
|
||||
/**
|
||||
* Creates a handler for the provided static resources.
|
||||
*
|
||||
* @param assets - A list of {@link StaticAssetEntry}.
|
||||
* @param baseUrl - The base URL of the server.
|
||||
* @param options - Specific options.
|
||||
|
||||
@@ -11,6 +11,7 @@ export interface NotificationChannelStorage {
|
||||
/**
|
||||
* Returns the requested channel.
|
||||
* `undefined` if no match was found or if the notification channel expired.
|
||||
*
|
||||
* @param id - The identifier of the notification channel.
|
||||
*/
|
||||
get: (id: string) => Promise<NotificationChannel | undefined>;
|
||||
@@ -18,12 +19,14 @@ export interface NotificationChannelStorage {
|
||||
/**
|
||||
* Returns the identifiers of all notification channel entries that have the given identifier as their topic.
|
||||
* The identifiers can potentially correspond to expired channels.
|
||||
*
|
||||
* @param topic - The identifier that is the topic.
|
||||
*/
|
||||
getAll: (topic: ResourceIdentifier) => Promise<string[]>;
|
||||
|
||||
/**
|
||||
* Adds the given channel to the storage.
|
||||
*
|
||||
* @param channel - Channel to add.
|
||||
*/
|
||||
add: (channel: NotificationChannel) => Promise<void>;
|
||||
@@ -31,6 +34,7 @@ export interface NotificationChannelStorage {
|
||||
/**
|
||||
* Updates the given notification channel.
|
||||
* The `id` and the `topic` can not be updated.
|
||||
*
|
||||
* @param channel - The channel to update.
|
||||
*/
|
||||
update: (channel: NotificationChannel) => Promise<void>;
|
||||
@@ -38,6 +42,7 @@ export interface NotificationChannelStorage {
|
||||
/**
|
||||
* Deletes the given notification channel from the storage.
|
||||
* Returns true if the channel existed.
|
||||
*
|
||||
* @param id - The identifier of the notification channel
|
||||
*/
|
||||
delete: (id: string) => Promise<boolean>;
|
||||
|
||||
@@ -31,6 +31,7 @@ export interface NotificationChannelType {
|
||||
|
||||
/**
|
||||
* Validate and convert the input quads into a {@link NotificationChannel}.
|
||||
*
|
||||
* @param data - The input quads.
|
||||
* @param credentials - The credentials of the agent doing the request.
|
||||
*/
|
||||
@@ -38,12 +39,14 @@ export interface NotificationChannelType {
|
||||
|
||||
/**
|
||||
* Converts a {@link NotificationChannel} to a serialized JSON-LD representation.
|
||||
*
|
||||
* @param channel - The notification channel to serialize.
|
||||
*/
|
||||
toJsonLd: (channel: NotificationChannel) => Promise<Record<string, unknown>>;
|
||||
|
||||
/**
|
||||
* Determines which modes are required to allow the given notification channel.
|
||||
*
|
||||
* @param channel - The notification channel to verify.
|
||||
*
|
||||
* @returns The required modes.
|
||||
@@ -53,6 +56,7 @@ export interface NotificationChannelType {
|
||||
/**
|
||||
* This function will be called after the serialized channel is sent back as a response,
|
||||
* allowing for any final actions that need to happen.
|
||||
*
|
||||
* @param channel - The notification channel that is completed.
|
||||
*/
|
||||
completeChannel: (channel: NotificationChannel) => Promise<void>;
|
||||
|
||||
@@ -3,6 +3,7 @@ import { BadRequestHttpError } from '../../../util/errors/BadRequestHttpError';
|
||||
|
||||
/**
|
||||
* Generates a WebSocket URL by converting an HTTP(S) URL into a WS(S) URL.
|
||||
*
|
||||
* @param id - The identifier of the channel. Needs to be a URL.
|
||||
*/
|
||||
export function generateWebSocketUrl(id: string): string {
|
||||
|
||||
@@ -37,6 +37,7 @@ export class RedirectingHttpHandler extends HttpHandler {
|
||||
|
||||
/**
|
||||
* Creates a handler for the provided redirects.
|
||||
*
|
||||
* @param redirects - A mapping between URL patterns.
|
||||
* @param baseUrl - Base URL of the server.
|
||||
* @param targetExtractor - To extract the target from the request.
|
||||
|
||||
Reference in New Issue
Block a user