Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
DaStormer committed Mar 17, 2023
1 parent dc00d28 commit ca674d7
Show file tree
Hide file tree
Showing 3 changed files with 146 additions and 128 deletions.
254 changes: 127 additions & 127 deletions packages/guilded-api-typings/lib/v1/structs/CalendarEvent.ts
Original file line number Diff line number Diff line change
@@ -1,137 +1,137 @@
import type { MentionsPayload } from "./Message";

export type CalendarEventCancellationPayload = {
/**
* The ID of the user who created this event cancellation
*/
createdBy?: string;
/**
* The description of event cancellation (min 1; max 140)
*/
description?: string;
/**
* The ID of the user who created this event cancellation
*/
createdBy?: string;
/**
* The description of event cancellation (min 1; max 140)
*/
description?: string;
};

export type CalendarEventPayload = {
cancellation?: CalendarEventCancellationPayload;
/**
* The ID of the channel
*/
channelId: string;
/**
* The color of the event when viewed in the calendar (min 0; max 16777215)
*/
color?: number;
/**
* The ISO 8601 timestamp that the event was created at
*/
createdAt: string;
/**
* The ID of the user who created this event
*/
createdBy: string;
/**
* The description of the event length: (min 1; max 8000)
*/
description?: string;
/**
* The duration of the event IN MINUTES (min 1)
*/
duration?: number;
/**
* The ID of the calendar event
*/
id: number;
/**
* If the event has a limited view
*/
isPrivate?: boolean;
/**
* The location of the event
*/
location?: string;
mentions?: MentionsPayload;
/**
* The name of the event length: (min 1; max 60)
*/
name: string;
/**
* The number of rsvps to allow before waitlisting rsvps (min 1)
*/
rsvpLimit?: number;
/**
* Collection of fetched rsvps if cached
*/
rsvps?: CalendarEventRsvpPayload[];
/**
* The ID of the server
*/
serverId: string;
/**
* The ID of the calendar event series. Only shows if the event is repeating
*/
seriesId?: string;
/**
* The role IDs to restrict the event to (min items 1; must have unique items true)
*/
roleIds?: number[];
/**
* The ISO 8601 timestamp that the event starts at
*/
startsAt: string;
/**
* Whether this is a repeating event
*/
repeats?: boolean;
/**
* Whether this event lasts all day
*/
isAllDay?: boolean;
/**
* When rsvpLimit is set, users from the waitlist will be added as space becomes available in the event
*/
autofillWaitlist?: boolean;
/**
* A URL to associate with the event
*/
url?: string;
/**
* When rsvpLimit is set, users from the waitlist will be added as space becomes available in the event
*/
autofillWaitlist?: boolean;
cancellation?: CalendarEventCancellationPayload;
/**
* The ID of the channel
*/
channelId: string;
/**
* The color of the event when viewed in the calendar (min 0; max 16777215)
*/
color?: number;
/**
* The ISO 8601 timestamp that the event was created at
*/
createdAt: string;
/**
* The ID of the user who created this event
*/
createdBy: string;
/**
* The description of the event length: (min 1; max 8000)
*/
description?: string;
/**
* The duration of the event IN MINUTES (min 1)
*/
duration?: number;
/**
* The ID of the calendar event
*/
id: number;
/**
* Whether this event lasts all day
*/
isAllDay?: boolean;
/**
* If the event has a limited view
*/
isPrivate?: boolean;
/**
* The location of the event
*/
location?: string;
mentions?: MentionsPayload;
/**
* The name of the event length: (min 1; max 60)
*/
name: string;
/**
* Whether this is a repeating event
*/
repeats?: boolean;
/**
* The role IDs to restrict the event to (min items 1; must have unique items true)
*/
roleIds?: number[];
/**
* The number of rsvps to allow before waitlisting rsvps (min 1)
*/
rsvpLimit?: number;
/**
* Collection of fetched rsvps if cached
*/
rsvps?: CalendarEventRsvpPayload[];
/**
* The ID of the calendar event series. Only shows if the event is repeating
*/
seriesId?: string;
/**
* The ID of the server
*/
serverId: string;
/**
* The ISO 8601 timestamp that the event starts at
*/
startsAt: string;
/**
* A URL to associate with the event
*/
url?: string;
};

export type CalendarEventRsvpPayload = {
/**
* The ID of the calendar event
*/
calendarEventId: number;
/**
* The ID of the channel
*/
channelId: string;
/**
* The ISO 8601 timestamp that the rsvp was created at
*/
createdAt: string;
/**
* The ID of the user who created this rsvp
*/
createdBy: string;
id: string;
/**
* The ID of the server
*/
serverId: string;
/**
* The status of the rsvp ("going", "maybe", "declined", "invited", "waitlisted", or "not responded")
*/
status: string;
/**
* The ISO 8601 timestamp that the rsvp was updated at, if relevant
*/
updatedAt?: string;
/**
* The ID of the user who updated this rsvp
*/
updatedBy?: string;
/**
* The ID of the user
*/
userId: string;
/**
* The ID of the calendar event
*/
calendarEventId: number;
/**
* The ID of the channel
*/
channelId: string;
/**
* The ISO 8601 timestamp that the rsvp was created at
*/
createdAt: string;
/**
* The ID of the user who created this rsvp
*/
createdBy: string;
id: string;
/**
* The ID of the server
*/
serverId: string;
/**
* The status of the rsvp ("going", "maybe", "declined", "invited", "waitlisted", or "not responded")
*/
status: string;
/**
* The ISO 8601 timestamp that the rsvp was updated at, if relevant
*/
updatedAt?: string;
/**
* The ID of the user who updated this rsvp
*/
updatedBy?: string;
/**
* The ID of the user
*/
userId: string;
};
8 changes: 7 additions & 1 deletion packages/rest/lib/webhook/WebhookClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,21 @@ import {
type MessageAttachment,
type WebhookMessageContent,
parseMessage,
transformEmbedToAPIEmbed } from "../util/message";
transformEmbedToAPIEmbed,
} from "../util/message";
import type { WebhookEmbed } from "./WebhookEmbed";

export class WebhookClient {
public URL: string;

public id: string;

public token: string;

public username: string | null;

public avatarURL: string | null;

private readonly rest: RestManager;

public constructor(
Expand Down
12 changes: 12 additions & 0 deletions packages/rest/lib/webhook/WebhookEmbed.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,29 +3,41 @@ import { resolveColor } from "../util/color";

export class WebhookEmbed {
public title: string | null;

public description: string | null;

public url: string | null;

public timestamp: number | null;

public timestampString: string | null;

public color: number | null;

public footer: {
iconURL: string | null;
proxyIconURL: string | null;
text: string;
} | null;

public image: APIWebhookEmbedMediaData | null;

public thumbnail: APIWebhookEmbedMediaData | null;

public video: APIWebhookEmbedMediaData | null;

public provider: {
name: string | null;
url: string | null;
} | null;

public author: {
iconURL: string | null;
name: string | null;
proxyIconURL: string | null;
url: string | null;
} | null;

public fields: {
inline: boolean | null;
name: string;
Expand Down

0 comments on commit ca674d7

Please sign in to comment.