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:
@@ -29,6 +29,7 @@ const bob: User = {
|
||||
|
||||
/**
|
||||
* Registers a user with the server and provides them with a pod.
|
||||
*
|
||||
* @param user - The user settings necessary to register a user.
|
||||
*/
|
||||
async function register(user: User): Promise<{ webId: string; authorization: string }> {
|
||||
@@ -78,8 +79,10 @@ async function register(user: User): Promise<{ webId: string; authorization: str
|
||||
|
||||
/**
|
||||
* Requests a client credentials API token.
|
||||
*
|
||||
* @param webId - WebID to create credentials for.
|
||||
* @param authorization - Authorization header for the account that tries to create credentials.
|
||||
*
|
||||
* @returns The id/secret for the client credentials request.
|
||||
*/
|
||||
async function createCredentials(webId: string, authorization: string): Promise<{ id: string; secret: string }> {
|
||||
@@ -104,6 +107,7 @@ async function createCredentials(webId: string, authorization: string): Promise<
|
||||
* Generates all the necessary data and outputs the necessary lines
|
||||
* that need to be added to the CTH environment file
|
||||
* so it can use client credentials.
|
||||
*
|
||||
* @param user - User for which data needs to be generated.
|
||||
*/
|
||||
async function outputCredentials(user: User): Promise<void> {
|
||||
|
||||
@@ -28,6 +28,7 @@ export class IdentityTestState {
|
||||
|
||||
/**
|
||||
* Performs a fetch call while keeping track of the stored cookies and preventing redirects.
|
||||
*
|
||||
* @param url - URL to call.
|
||||
* @param method - Method to use.
|
||||
* @param body - Body to send along. If this is not a string it will be JSONified.
|
||||
|
||||
@@ -10,6 +10,7 @@ export type User = {
|
||||
|
||||
/**
|
||||
* Registers an account for the given user details and creates one or more pods.
|
||||
*
|
||||
* @param baseUrl - Base URL of the server.
|
||||
* @param user - User details to register.
|
||||
*/
|
||||
|
||||
@@ -2,6 +2,7 @@ import { fetch } from 'cross-fetch';
|
||||
|
||||
/**
|
||||
* Subscribes to a notification channel.
|
||||
*
|
||||
* @param type - The type of the notification channel, e.g., "NOTIFY.WebhookChannel2023".
|
||||
* @param webId - The WebID to spoof in the authorization header. This assumes the config uses the debug auth import.
|
||||
* @param subscriptionUrl - The subscription URL to which the request needs to be sent.
|
||||
@@ -36,6 +37,7 @@ export async function subscribe(
|
||||
|
||||
/**
|
||||
* Verifies if a notification has the expected format.
|
||||
*
|
||||
* @param notification - The (parsed) notification.
|
||||
* @param topic - The topic of the notification.
|
||||
* @param type - What type of notification is expected.
|
||||
|
||||
Reference in New Issue
Block a user