guilded-api-typings
Advanced tools
Comparing version 0.7.0 to 0.8.0
@@ -22,6 +22,6 @@ "use strict"; | ||
__exportStar(require("./structures/Embed"), exports); | ||
__exportStar(require("./structures/ForumTopic"), exports); | ||
__exportStar(require("./structures/ListItem"), exports); | ||
__exportStar(require("./structures/Message"), exports); | ||
__exportStar(require("./structures/Server"), exports); | ||
__exportStar(require("./structures/Topic"), exports); | ||
__exportStar(require("./structures/User"), exports); | ||
@@ -28,0 +28,0 @@ __exportStar(require("./structures/Webhook"), exports); |
@@ -106,11 +106,24 @@ "use strict"; | ||
/** | ||
* The endpoint for topics. | ||
* @param channelId The ID of the channel the topics belongs to. | ||
* The endpoint for forum topics. | ||
* @param channelId The ID of the channel the forum topics belongs to. | ||
* @see https://www.guilded.gg/docs/api/forums/ForumTopicReadMany | ||
* @see https://www.guilded.gg/docs/api/forums/ForumTopicCreate | ||
* @example Routes.topics('abc'); // '/channels/abc/topics' | ||
* @example Routes.forumTopics('abc'); // '/channels/abc/topics' | ||
*/ | ||
static topics(channelId) { | ||
static forumTopics(channelId) { | ||
return `/channels/${channelId}/topics`; | ||
} | ||
/** | ||
* The endpoint for a forum topic. | ||
* @param channelId The ID of the channel the forum topic belongs to. | ||
* @param topicId The ID of the forum topic. | ||
* @see https://www.guilded.gg/docs/api/forums/ForumTopicRead | ||
* @see https://www.guilded.gg/docs/api/forums/ForumTopicUpdate | ||
* @see https://www.guilded.gg/docs/api/forums/ForumTopicDelete | ||
* @example Routes.forumTopic('abc', 123); // '/channels/abc/topics/123' | ||
*/ | ||
static forumTopic(channelId, topicId) { | ||
return `/channels/${channelId}/topics/${topicId}`; | ||
} | ||
/** | ||
* The endpoint for list items on Guilded. | ||
@@ -117,0 +130,0 @@ * @param channelId The ID of the channel the list items belongs to. |
{ | ||
"name": "guilded-api-typings", | ||
"version": "0.7.0", | ||
"description": "Type definitions for the Guilded API.", | ||
"main": "lib/index.js", | ||
"types": "typings/index.d.ts", | ||
"files": [ | ||
"lib", | ||
"typings" | ||
], | ||
"scripts": { | ||
"build": "run clear && tsc", | ||
"clear": "rimraf lib typings", | ||
"prepublishOnly": "run build" | ||
}, | ||
"keywords": [ | ||
"guilded", | ||
"api", | ||
"js", | ||
"ts", | ||
"types" | ||
], | ||
"contributors": [ | ||
"Gamertike (https://gamertike.com)" | ||
], | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/guildedts/guilded.ts.git" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/guildedts/guilded.ts/issues" | ||
}, | ||
"homepage": "https://guildedts.js.org", | ||
"license": "Apache-2.0", | ||
"devDependencies": { | ||
"rimraf": "^3.0.2", | ||
"typescript": "^4.7.4" | ||
} | ||
} | ||
"name": "guilded-api-typings", | ||
"version": "0.8.0", | ||
"description": "Type definitions for the Guilded API.", | ||
"main": "lib/index.js", | ||
"types": "typings/index.d.ts", | ||
"files": [ | ||
"lib", | ||
"typings" | ||
], | ||
"keywords": [ | ||
"guilded", | ||
"api", | ||
"js", | ||
"ts", | ||
"types" | ||
], | ||
"contributors": [ | ||
"Gamertike (https://gamertike.com)" | ||
], | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/guildedts/guilded.ts.git" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/guildedts/guilded.ts/issues" | ||
}, | ||
"homepage": "https://guildedts.js.org", | ||
"license": "Apache-2.0", | ||
"devDependencies": { | ||
"rimraf": "^3.0.2", | ||
"typescript": "^4.7.4" | ||
}, | ||
"scripts": { | ||
"build": "pnpm clear && tsc", | ||
"clear": "rimraf lib typings" | ||
} | ||
} |
@@ -5,6 +5,6 @@ export * from './structures/CalendarEvent'; | ||
export * from './structures/Embed'; | ||
export * from './structures/ForumTopic'; | ||
export * from './structures/ListItem'; | ||
export * from './structures/Message'; | ||
export * from './structures/Server'; | ||
export * from './structures/Topic'; | ||
export * from './structures/User'; | ||
@@ -11,0 +11,0 @@ export * from './structures/Webhook'; |
@@ -94,9 +94,20 @@ /** Represents a error that occurred while interacting with the Guilded REST API. */ | ||
/** | ||
* The endpoint for topics. | ||
* @param channelId The ID of the channel the topics belongs to. | ||
* The endpoint for forum topics. | ||
* @param channelId The ID of the channel the forum topics belongs to. | ||
* @see https://www.guilded.gg/docs/api/forums/ForumTopicReadMany | ||
* @see https://www.guilded.gg/docs/api/forums/ForumTopicCreate | ||
* @example Routes.topics('abc'); // '/channels/abc/topics' | ||
* @example Routes.forumTopics('abc'); // '/channels/abc/topics' | ||
*/ | ||
static topics(channelId: string): `/channels/${string}/topics`; | ||
static forumTopics(channelId: string): `/channels/${string}/topics`; | ||
/** | ||
* The endpoint for a forum topic. | ||
* @param channelId The ID of the channel the forum topic belongs to. | ||
* @param topicId The ID of the forum topic. | ||
* @see https://www.guilded.gg/docs/api/forums/ForumTopicRead | ||
* @see https://www.guilded.gg/docs/api/forums/ForumTopicUpdate | ||
* @see https://www.guilded.gg/docs/api/forums/ForumTopicDelete | ||
* @example Routes.forumTopic('abc', 123); // '/channels/abc/topics/123' | ||
*/ | ||
static forumTopic(channelId: string, topicId: number): `/channels/${string}/topics/${number}`; | ||
/** | ||
* The endpoint for list items on Guilded. | ||
@@ -103,0 +114,0 @@ * @param channelId The ID of the channel the list items belongs to. |
@@ -82,6 +82,6 @@ import { APIMentions } from './Channel'; | ||
/** | ||
* The query parameters for fetching calendar events. | ||
* The options for fetching calendar events. | ||
* @see https://www.guilded.gg/docs/api/calendarEvents/CalendarEventReadMany | ||
*/ | ||
export interface APIFetchCalendarEventsQuery { | ||
export interface APICalendarEventFetchManyOptions { | ||
/** The date to fetch calendar events before. */ | ||
@@ -88,0 +88,0 @@ before?: Date; |
@@ -106,18 +106,2 @@ /** | ||
} | ||
/** | ||
* Represents a content reaction on Guilded. | ||
* @see https://www.guilded.gg/docs/api/reactions/ContentReaction | ||
*/ | ||
export interface APIReaction { | ||
/** The ID of the reaction. */ | ||
id: number; | ||
/** The ID of the server the reaction belongs to. */ | ||
serverId?: string; | ||
/** The date the reaction was created. */ | ||
createdAt: string; | ||
/** The ID of the user that created the reaction. */ | ||
createdBy: string; | ||
/** The ID of the webhook that created the reaction. */ | ||
createdByWebhookId?: string; | ||
} | ||
//# sourceMappingURL=Channel.d.ts.map |
@@ -40,6 +40,6 @@ import { APIMentions } from './Channel'; | ||
/** | ||
* The query parameters for fetching docs. | ||
* The options for fetching docs. | ||
* @see https://www.guilded.gg/docs/api/docs/DocReadMany | ||
*/ | ||
export interface APIFetchDocsQuery { | ||
export interface APIDocFetchManyOptions { | ||
/** The date to fetch docs before. */ | ||
@@ -46,0 +46,0 @@ before?: Date; |
@@ -8,3 +8,3 @@ import { APIMentions } from './Channel'; | ||
/** The note of the list item. */ | ||
note?: APINote; | ||
note?: APIListItemNote; | ||
} | ||
@@ -43,3 +43,3 @@ /** | ||
/** The note of the list item. */ | ||
note?: APINoteSummary; | ||
note?: APIListItemNoteSummary; | ||
} | ||
@@ -50,4 +50,4 @@ /** | ||
*/ | ||
export interface APINote extends APINoteSummary { | ||
/** The content of the note. */ | ||
export interface APIListItemNote extends APIListItemNoteSummary { | ||
/** The content of the list item note. */ | ||
content: string; | ||
@@ -59,12 +59,12 @@ } | ||
*/ | ||
export interface APINoteSummary { | ||
/** The mentions of the note. */ | ||
export interface APIListItemNoteSummary { | ||
/** The mentions of the list item note. */ | ||
mentions?: APIMentions; | ||
/** The date the note was created. */ | ||
/** The date the list item note was created. */ | ||
createdAt: string; | ||
/** The ID of the user that created the note. */ | ||
/** The ID of the user that created the list item note. */ | ||
createdBy: string; | ||
/** The date the note was edited. */ | ||
/** The date the list item note was edited. */ | ||
updatedAt?: string; | ||
/** The ID of the user that edited the note. */ | ||
/** The ID of the user that edited the list item note. */ | ||
updatedBy?: string; | ||
@@ -80,3 +80,3 @@ } | ||
/** The note of the list item. */ | ||
note?: APINotePayload; | ||
note?: APIListItemNotePayload; | ||
} | ||
@@ -87,6 +87,6 @@ /** | ||
*/ | ||
export interface APINotePayload { | ||
/** The content of the note. */ | ||
export interface APIListItemNotePayload { | ||
/** The content of the list item note. */ | ||
content: string; | ||
} | ||
//# sourceMappingURL=ListItem.d.ts.map |
@@ -86,6 +86,6 @@ import { APIMentions } from './Channel'; | ||
/** | ||
* The query parameters for fetching messages. | ||
* The options for fetching messages. | ||
* @see https://www.guilded.gg/docs/api/chat/ChannelMessageReadMany | ||
*/ | ||
export interface APIFetchMessagesQuery { | ||
export interface APIMessageFetchOptions { | ||
/** The date to fetch messages before. */ | ||
@@ -92,0 +92,0 @@ before?: Date; |
@@ -42,6 +42,6 @@ /** | ||
/** | ||
* The query parameters for fetching webhooks. | ||
* The options for fetching webhooks. | ||
* @see https://www.guilded.gg/docs/api/webhook/WebhookReadMany | ||
*/ | ||
export interface APIFetchWebhooksQuery { | ||
export interface APIhWebhookFetchManyOptions { | ||
/** The ID of the channel the webhooks belong to. */ | ||
@@ -48,0 +48,0 @@ channelId: string; |
@@ -9,2 +9,3 @@ import { APIChannel } from './structures/Channel'; | ||
import { APIClientUser } from './structures/User'; | ||
import { APIForumTopic } from './structures/ForumTopic'; | ||
/** The ready payload of the websocket. */ | ||
@@ -259,2 +260,32 @@ export interface WSReadyPayload { | ||
/** | ||
* Emitted when a forum topic is created. | ||
* @see https://www.guilded.gg/docs/api/websockets/ForumTopicCreated | ||
*/ | ||
ForumTopicCreated: { | ||
/** The ID of the server the forum topic belongs to. */ | ||
serverId: string; | ||
/** The created forum topic. */ | ||
forumTopic: APIForumTopic; | ||
}; | ||
/** | ||
* Emitted when a forum topic is edited. | ||
* @see https://www.guilded.gg/docs/api/websockets/ForumTopicUpdated | ||
*/ | ||
ForumTopicUpdated: { | ||
/** The ID of the server the forum topic belongs to. */ | ||
serverId: string; | ||
/** The edited forum topic. */ | ||
forumTopic: APIForumTopic; | ||
}; | ||
/** | ||
* Emitted when a forum topic is deleted. | ||
* @see https://www.guilded.gg/docs/api/websockets/ForumTopicDeleted | ||
*/ | ||
ForumTopicDeleted: { | ||
/** The ID of the server the forum topic belongs to. */ | ||
serverId: string; | ||
/** The deleted forum topic. */ | ||
forumTopic: APIForumTopic; | ||
}; | ||
/** | ||
* Emitted when a calendar event RSVP is edited. | ||
@@ -261,0 +292,0 @@ * @see https://www.guilded.gg/docs/api/websockets/CalendarEventRsvpUpdated |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
117944
55
1974