UNPKG

guilded.ts

Version:

A powerful NPM module that allows you to easily interact with the Guilded API.

103 lines 4.59 kB
import { APICalendarEventRsvp, CalendarEventRsvpStatus } from 'guilded-api-typings'; import { FetchOptions } from '../../managers/BaseManager'; import { Base } from '../Base'; import { CalendarEvent } from './CalendarEvent'; /** * Represents a calendar event RSVP on Guilded. * @example new CalendarEventRsvp(calendarEvent, rawCalendarEventRsvp); */ export declare class CalendarEventRsvp extends Base { readonly calendarEvent: CalendarEvent; readonly raw: APICalendarEventRsvp; /** The ID of the calendar event the RSVP belongs to. */ readonly calendarEventId: number; /** The ID of the channel the calendar event RSVP belongs to. */ readonly channelId: string; /** The ID of the server the calendar event RSVP belongs to. */ readonly serverId: string; /** The ID of the user the calendar event RSVP belongs to. */ readonly userId: string; /** The status of the calendar event RSVP. */ readonly status: CalendarEventRsvpStatus; /** The ID of the user that created the calendar event RSVP. */ readonly createdBy: string; /** The date the calendar event RSVP was created. */ readonly createdAt: Date; /** The ID of the user that edited the calendar event RSVP. */ readonly editedBy?: string; /** The date the calendar event RSVP was edited. */ readonly editedAt?: Date; /** * @param calendarEvent The calendar event the RSVP belongs to. * @param raw The raw data of the calendar event RSVP. * @param cache Whether to cache the calendar event RSVP. */ constructor(calendarEvent: CalendarEvent, raw: APICalendarEventRsvp, cache?: boolean); /** Whether the calendar event RSVP is cached. */ get isCached(): boolean; /** The channel the calendar event RSVP belongs to. */ get channel(): import("../..").CalendarChannel; /** The server the calendar event RSVP belongs to. */ get server(): import("../..").Server | undefined; /** The user the calendar event RSVP belongs to. */ get user(): import("../User").User | undefined; /** The server member that created the calendar event RSVP. */ get author(): import("../..").ServerMember | undefined; /** The ID of the user that created the calendar event RSVP. */ get authorId(): string; /** The timestamp the calendar event RSVP was created. */ get createdTimestamp(): number; /** The server member that edited the calendar event RSVP. */ get editor(): import("../..").ServerMember | undefined; /** The timestamp the calendar event RSVP was edited. */ get editedTimestamp(): number | undefined; /** * Fetch the calendar event RSVP. * @param options The options to fetch the calendar event RSVP with. * @returns The fetched calendar event RSVP. * @example calendarEventRsvp.fetch(); */ fetch(options?: FetchOptions): Promise<CalendarEventRsvp>; /** * Fetch the server the calendar event RSVP belongs to. * @param options The options to fetch the server with. * @returns The fetched server. * @example calendarEventRsvp.fetchServer(); */ fetchServer(options?: FetchOptions): Promise<import("../..").Server>; /** * Fetch the user the calendar event RSVP belongs to. * @returns The fetched user. * @example calendarEventRsvp.fetchUser(); */ fetchUser(): Promise<import("../User").User>; /** * Fetch the server member that created the calendar event RSVP. * @param options The options to fetch the server member with. * @returns The fetched server member. * @example calendarEventRsvp.fetchAuthor(); */ fetchAuthor(options?: FetchOptions): Promise<import("../..").ServerMember>; /** * Fetch the server member that edited the calendar event RSVP. * @param options The options to fetch the server member with. * @returns The fetched server member. * @example calendarEventRsvp.fetchEditor(); */ fetchEditor(options?: FetchOptions): Promise<import("../..").ServerMember | undefined>; /** * Edit the calendar event RSVP. * @param status The status of the calendar event RSVP. * @returns The edited calendar event RSVP. * @example calendarEventRsvp.edit('going'); */ edit(status: CalendarEventRsvpStatus): Promise<this>; /** * Delete the calendar event RSVP. * @returns The deleted calendar event RSVP. * @example calendarEventRsvp.delete(); */ delete(): Promise<this>; } export { CalendarEventRsvpStatus }; //# sourceMappingURL=CalendarEventRsvp.d.ts.map