fix jsdoc warnings (#2750)

This commit is contained in:
Tessa Thornton
2019-12-12 11:41:57 -05:00
committed by GitHub
parent 3358cef433
commit 116d3c0c81
9 changed files with 32 additions and 15 deletions
@@ -21,10 +21,13 @@ export interface PublisherOptions {
* over the pubsub broker to facilitate live updates and notifications.
*
* TODO: Update
* @param pubsub the pubsub broker to be used to facilitate the publish action
* @param notifier
* @param tenantID the ID of the Tenant where the event will be published with
* @param clientID the ID of the client to de-duplicate mutation responses
*
* @param options options object
* @param options.pubsub the pubsub broker to be used to facilitate the publish action
* @param options.slackPublisher the slack publisher instance
* @param options.notifierQueue the queue
* @param options.tenantID the ID of the Tenant where the event will be published with
* @param options.clientID the ID of the client to de-duplicate mutation responses
*/
export const createPublisher = ({
pubsub,
+5 -1
View File
@@ -412,6 +412,8 @@ function cursorGetterFactory(
* replies.
*
* @param mongo database connection
* @param tenantID the tenant id
* @param storyID the id of the story the comment belongs to
* @param parentID the parent id for the comment to retrieve
* @param input connection configuration
*/
@@ -437,7 +439,7 @@ export const retrieveCommentRepliesConnection = (
*
* @param mongo the database connection to use when retrieving comments
* @param tenantID the tenant id for where the comment exists
* @param commentID the id of the comment to retrieve parents of
* @param comment the comment to retrieve parents of
* @param pagination pagination options to paginate the results
*/
export async function retrieveCommentParentsConnection(
@@ -507,6 +509,7 @@ export async function retrieveCommentParentsConnection(
* comments.
*
* @param mongo database connection
* @param tenantID the Tenant id
* @param storyID the Story id for the comment to retrieve
* @param input connection configuration
*/
@@ -763,6 +766,7 @@ export async function updateCommentStatus(
* @param mongo the database handle
* @param tenantID the id of the Tenant
* @param id the id of the Comment being updated
* @param revisionID the id of the Comment revision being updated
* @param actionCounts the action counts to merge into the Comment
*/
export async function updateCommentActionCounts(
+1
View File
@@ -61,6 +61,7 @@ export type CreateTenantInput = Pick<
* create will create a new Tenant.
*
* @param mongo the MongoDB connection used to create the tenant.
* @param i18n i18n instance
* @param input the customizable parts of the Tenant available during creation
*/
export async function createTenant(
+3 -2
View File
@@ -1434,7 +1434,7 @@ export async function premodUser(
* @param mongo the mongo database handle
* @param tenantID the Tenant's ID where the User exists
* @param id the ID of the user having their ban lifted
* @param modifiedBy the ID of the user lifting the premod
* @param createdBy the ID of the user lifting the premod
* @param now the current date
*/
export async function removeUserPremod(
@@ -1635,7 +1635,7 @@ export async function removeUserBan(
* @param tenantID the Tenant's ID where the User exists
* @param id the ID of the user being suspended
* @param createdBy the ID of the user banning the above mentioned user
* @param from the range of time that the user is being banned for
* @param finish the date the suspension ends
* @param message the message sent to suspended user in email
* @param now the current date
*/
@@ -2335,6 +2335,7 @@ export async function pullUserNotificationDigests(
* @param mongo the database to pull scheduled users to delete from
* @param tenantID the tenant ID to pull users that have been scheduled for
* deletion on
* @param rescheduledDuration duration in which to reschedule
* @param now the current time
*/
export async function retrieveUserScheduledForDeletion(
@@ -85,9 +85,9 @@ export default class MailerContent {
* generateHTML will generate the HTML for a template and optionally cache
* the compiled template based on the configured environment.
*
* @param options configuration for generating HTML based on the email
* template.
*/
* @param tenant the tenant
* @param template the HTML email template
**/
public async generateHTML(
tenant: Tenant,
template: EmailTemplate
@@ -94,6 +94,7 @@ function createMessageTranslator(i18n: I18n) {
* translateMessage will translate the message to the specified locale as well
* a juice the contents.
*
* @param tenant the tenant
* @param templateName the name of the template to base the translations off of
* @param locale the locale to translate the email content into
* @param fromAddress the address that is sending the email (from the Tenant)
@@ -185,7 +185,7 @@ function convertLanguage(locale: LanguageCode): PerspectiveLanguage {
*
* @param text comment text to check for toxicity
* @param model the specific model to use when storing the toxicity
* @param settings integration settings used to communicate with the perspective api
* @param language language to run perspective api
* @param timeout timeout for communicating with the perspective api
*/
async function getScore(
@@ -60,6 +60,7 @@ export function isResetToken(token: ResetToken | object): token is ResetToken {
*
* @param mongo MongoDB instance to interact with
* @param tenant Tenant that the user exists on
* @param config the convict config object
* @param signingConfig signing configuration that will be used to sign the token
* @param user User to create the password reset URL for
* @param now the current time
+10 -4
View File
@@ -204,6 +204,7 @@ export async function setUsername(
* one associated with them.
*
* @param mongo mongo database to interact with
* @param mailer the mailer
* @param tenant Tenant where the User will be interacted with
* @param user User that should get their username changed
* @param email the new email for the User
@@ -273,9 +274,11 @@ export async function setPassword(
* will fail.
*
* @param mongo mongo database to interact with
* @param mailer the mailer
* @param tenant Tenant where the User will be interacted with
* @param user User that should get their password changed
* @param password the new password for the User
* @param oldPassword the old password for the User
* @param newPassword the new password for the User
*/
export async function updatePassword(
mongo: Db,
@@ -481,7 +484,6 @@ export async function createToken(
*
* @param mongo mongo database to interact with
* @param tenant Tenant where the User will be interacted with
* @param config signing configuration to create the signed token
* @param user User that should get updated
* @param id of the Token to be deactivated
*/
@@ -600,6 +602,7 @@ export async function updateUsernameByID(
*
* @param mongo mongo database to interact with
* @param tenant Tenant where the User will be interacted with
* @param user the user making the request
* @param userID the User's ID that we are updating
* @param role the role that we are setting on the User
*/
@@ -669,8 +672,9 @@ function canUpdateLocalProfile(tenant: Tenant, user: User): boolean {
* @param tenant Tenant where the User will be interacted with
* @param mailer The mailer queue
* @param config Convict config
* @param signingConfig jwt signing config
* @param user the User that we are updating
* @param email the email address that we are setting on the User
* @param emailAddress the email address that we are setting on the User
* @param password the users password for confirmation
*/
export async function updateEmail(
@@ -800,8 +804,9 @@ export async function destroyModeratorNote(
* ban will ban a specific user from interacting with Coral.
*
* @param mongo mongo database to interact with
* @param mailer the mailer
* @param tenant Tenant where the User will be banned on
* @param user the User that is banning the User
* @param banner the User that is banning the User
* @param userID the ID of the User being banned
* @param message message to banned user
* @param now the current time that the ban took effect
@@ -919,6 +924,7 @@ export async function removePremod(
* suspend will suspend a give user from interacting with Coral.
*
* @param mongo mongo database to interact with
* @param mailer the mailer
* @param tenant Tenant where the User will be suspended on
* @param user the User that is suspending the User
* @param userID the ID of the user being suspended