Skip to main content

talawa-api / Exports / helpers/event/createEventHelpers/createRecurringEvent

Module: helpers/event/createEventHelpers/createRecurringEvent

Table of contents

Functions

Functions

createRecurringEvent

createRecurringEvent(args, creatorId, organizationId, session): Promise<InterfaceEvent>

This function creates the instances of a recurring event upto a certain date.

Parameters

NameTypeDescription
argsMutationCreateEventArgspayload of the createEvent mutation
creatorIdstring_id of the creator
organizationIdstring_id of the organization the events belongs to
sessionClientSession-

Returns

Promise<InterfaceEvent>

Created recurring event instance

Remarks

The following steps are followed:

  1. Create a default recurrenceRuleData.
  2. Generate a recurrence rule string based on the recurrenceRuleData.
  3. Create a baseRecurringEvent on which recurring instances would be based.
  4. Get the dates for recurring instances.
  5. Create a recurrenceRule document.
  6. Generate recurring instances according to the recurrence rule.

Defined in

src/helpers/event/createEventHelpers/createRecurringEvent.ts:27