Skip to main content

talawa-api / Exports / helpers/event/recurringEventHelpers/createRecurrenceRule

Module: helpers/event/recurringEventHelpers/createRecurrenceRule

Table of contents

Functions

Functions

createRecurrenceRule

createRecurrenceRule(recurrenceRuleString, recurrenceStartDate, recurrenceEndDate, organizationId, baseRecurringEventId, latestInstanceDate, session): Promise<InterfaceRecurrenceRule>

This function generates the recurrenceRule document.

Parameters

NameTypeDescription
recurrenceRuleStringstringthe rrule string containing the rules that the instances would follow.
recurrenceStartDateDatestart date of recurrence.
recurrenceEndDatenull | Dateend date of recurrence.
organizationIdstring_id of the current organization.
baseRecurringEventIdstring_id of the base recurring event.
latestInstanceDateDatestart date of the last instance generated during this operation.
sessionClientSession-

Returns

Promise<InterfaceRecurrenceRule>

The recurrence rule document.

Remarks

The following steps are followed:

  1. Create an rrule object from the rrule string.
  2. Get the fields for the RecurrenceRule document.
  3. Create the RecurrenceRuleDocument.

Defined in

src/helpers/event/recurringEventHelpers/createRecurrenceRule.ts:25