Class CalendarEventsService

Hierarchy

  • CalendarEventsService

Constructors

Properties

httpRequest: BaseHttpRequest

Methods

  • Create a calendar event We currently do not have a way to surface the repeatInfo after event series are updated. Stay tuned!

    Throws

    ApiError

    Parameters

    • options: {
          channelId: string;
          requestBody: {
              autofillWaitlist?: boolean;
              color?: number;
              description?: string;
              duration?: number;
              isAllDay?: boolean;
              isPrivate?: boolean;
              location?: string;
              name: string;
              repeatInfo?: {
                  endDate?: string;
                  endsAfterOccurrences?: number;
                  every?: {
                      count: number;
                      interval: "day" | "month" | "year" | "week";
                  };
                  on?: ("sunday" | "monday" | "tuesday" | "wednesday" | "thursday" | "friday" | "saturday")[];
                  type: "once" | "everyDay" | "everyWeek" | "everyMonth" | "custom";
              };
              roleIds?: number[];
              rsvpDisabled?: boolean;
              rsvpLimit?: number;
              startsAt?: string;
              url?: string;
          };
      }
      • channelId: string

        The calendar to create the event in

      • requestBody: {
            autofillWaitlist?: boolean;
            color?: number;
            description?: string;
            duration?: number;
            isAllDay?: boolean;
            isPrivate?: boolean;
            location?: string;
            name: string;
            repeatInfo?: {
                endDate?: string;
                endsAfterOccurrences?: number;
                every?: {
                    count: number;
                    interval: "day" | "month" | "year" | "week";
                };
                on?: ("sunday" | "monday" | "tuesday" | "wednesday" | "thursday" | "friday" | "saturday")[];
                type: "once" | "everyDay" | "everyWeek" | "everyMonth" | "custom";
            };
            roleIds?: number[];
            rsvpDisabled?: boolean;
            rsvpLimit?: number;
            startsAt?: string;
            url?: string;
        }
        • Optional autofillWaitlist?: boolean

          When rsvpLimit is set, users from the waitlist will be added as space becomes available in the event

        • Optional color?: number

          The integer value corresponds to the decimal RGB representation for the color. The color of the event when viewing in the calendar

        • Optional description?: string

          The description of the event

        • Optional duration?: number

          The duration of the event in minutes

        • Optional isAllDay?: boolean

          Does the event last all day? If passed with duration, duration will only be applied if it is an interval of minutes represented in days (e.g., duration: 2880)

        • Optional isPrivate?: boolean
        • Optional location?: string

          The location of the event

        • name: string

          The name of the event

        • Optional repeatInfo?: {
              endDate?: string;
              endsAfterOccurrences?: number;
              every?: {
                  count: number;
                  interval: "day" | "month" | "year" | "week";
              };
              on?: ("sunday" | "monday" | "tuesday" | "wednesday" | "thursday" | "friday" | "saturday")[];
              type: "once" | "everyDay" | "everyWeek" | "everyMonth" | "custom";
          }
          • Optional endDate?: string

            The ISO 8601 timestamp that the event ends at. Used to control the end date of the event repeat (only used when type is custom; if used with endsAfterOccurrences, the earliest resultant date of the two will be used)

          • Optional endsAfterOccurrences?: number

            Used to control the end date of the event repeat (only used when type is custom; if used with endDate, the earliest resultant date of the two will be used)

          • Optional every?: {
                count: number;
                interval: "day" | "month" | "year" | "week";
            }

            Apply further clarification to your events. This must have type set to custom

            • count: number

              How often between your interval the event should repeat. For example, 1 would be every interval, 2 would be every second occurrence of the interval

            • interval: "day" | "month" | "year" | "week"

              Coupled with count, this indicates the time range you are repeating your event over

          • Optional on?: ("sunday" | "monday" | "tuesday" | "wednesday" | "thursday" | "friday" | "saturday")[]

            Used to control the day of the week that the event should repeat on (only used when type is custom and when every.interval is week)

          • type: "once" | "everyDay" | "everyWeek" | "everyMonth" | "custom"

            How often you want your event to repeat (important note: this will repeat for the next 365 days unless custom is defined)

        • Optional roleIds?: number[]

          The role IDs to restrict the event to

        • Optional rsvpDisabled?: boolean

          When disabled, users will not be able to RSVP to the event

        • Optional rsvpLimit?: number

          The number of RSVPs to allow before waitlisting RSVPs

        • Optional startsAt?: string

          The ISO 8601 timestamp that the event starts at

        • Optional url?: string

          A URL to associate with the event

    Returns CancelablePromise<{
        calendarEvent: CalendarEventPayload;
    }>

    any Success

  • Create or update a calendar event RSVP

    Throws

    ApiError

    Parameters

    • options: {
          calendarEventId: number;
          channelId: string;
          requestBody: {
              status: "going" | "maybe" | "declined" | "invited";
          };
          userId: string;
      }
      • calendarEventId: number
      • channelId: string
      • requestBody: {
            status: "going" | "maybe" | "declined" | "invited";
        }
        • status: "going" | "maybe" | "declined" | "invited"

          The status of the RSVP

      • userId: string

    Returns CancelablePromise<{
        calendarEventRsvp: CalendarEventRsvpPayload;
    }>

    any Success

  • Create or update a calendar event RSVP for multiple users

    Throws

    ApiError

    Parameters

    • options: {
          calendarEventId: number;
          channelId: string;
          requestBody: {
              status: "going" | "maybe" | "declined" | "invited";
              userIds: string[];
          };
      }
      • calendarEventId: number
      • channelId: string
      • requestBody: {
            status: "going" | "maybe" | "declined" | "invited";
            userIds: string[];
        }
        • status: "going" | "maybe" | "declined" | "invited"

          The status of the RSVP

        • userIds: string[]

    Returns CancelablePromise<void>

    void

  • Update a calendar event We currently do not have a way to surface the repeatInfo after event series are updated. Stay tuned!

    Throws

    ApiError

    Parameters

    • options: {
          calendarEventId: number;
          channelId: string;
          requestBody: {
              autofillWaitlist?: boolean;
              cancellation?: {
                  description?: string;
              };
              color?: number;
              description?: string;
              duration?: number;
              isAllDay?: boolean;
              isPrivate?: boolean;
              location?: string;
              name?: string;
              roleIds?: number[];
              rsvpDisabled?: boolean;
              rsvpLimit?: number;
              startsAt?: string;
              url?: string;
          };
      }
      • calendarEventId: number
      • channelId: string
      • requestBody: {
            autofillWaitlist?: boolean;
            cancellation?: {
                description?: string;
            };
            color?: number;
            description?: string;
            duration?: number;
            isAllDay?: boolean;
            isPrivate?: boolean;
            location?: string;
            name?: string;
            roleIds?: number[];
            rsvpDisabled?: boolean;
            rsvpLimit?: number;
            startsAt?: string;
            url?: string;
        }
        • Optional autofillWaitlist?: boolean

          When rsvpLimit is set, users from the waitlist will be added as space becomes available in the event

        • Optional cancellation?: {
              description?: string;
          }
          • Optional description?: string

            The description of event cancellation

        • Optional color?: number

          The integer value corresponds to the decimal RGB representation for the color. The color of the event when viewing in the calendar

        • Optional description?: string

          The description of the event

        • Optional duration?: number

          The duration of the event in minutes

        • Optional isAllDay?: boolean

          Does the event last all day? If passed with duration, duration will only be applied if it is an interval of minutes represented in days (e.g., duration: 2880)

        • Optional isPrivate?: boolean
        • Optional location?: string

          The location of the event

        • Optional name?: string

          The name of the event

        • Optional roleIds?: number[]

          The role IDs to restrict the event to. Passing an empty array will clear the role IDs on the event

        • Optional rsvpDisabled?: boolean

          When disabled, users will not be able to RSVP to the event

        • Optional rsvpLimit?: number

          The number of RSVPs to allow before waitlisting RSVPs

        • Optional startsAt?: string

          The ISO 8601 timestamp that the event starts at

        • Optional url?: string

          A URL to associate with the event

    Returns CancelablePromise<{
        calendarEvent: CalendarEventPayload;
    }>

    any Success

Generated using TypeDoc