guilded-api-typings
Advanced tools
Comparing version
# guilded-api-typings | ||
## 0.12.0 | ||
### Minor Changes | ||
- 88420fe: feat: webhook `username` and `avatar_url` support | ||
## 0.11.0 | ||
@@ -4,0 +10,0 @@ |
@@ -333,4 +333,13 @@ "use strict"; | ||
} | ||
/** | ||
* The endpoint for a webhook execution on Guilded. | ||
* @param webhookId The ID of the webhook. | ||
* @param webhookToken The ID of the webhook. | ||
* @example Routes.webhookExecute('abc', 'abc'); // '/webhooks/abc/abc' | ||
*/ | ||
static webhookExecute(webhookId, webhookToken) { | ||
return `/webhooks/${webhookId}/${webhookToken}`; | ||
} | ||
} | ||
exports.Routes = Routes; | ||
//# sourceMappingURL=REST.js.map |
{ | ||
"name": "guilded-api-typings", | ||
"version": "0.11.0", | ||
"version": "0.12.0", | ||
"description": "Type definitions for the Guilded API.", | ||
@@ -5,0 +5,0 @@ "repository": { |
@@ -279,3 +279,10 @@ /** Represents a error that occurred while interacting with the Guilded REST API. */ | ||
static webhook(serverId: string, webhookId: string): `/servers/${string}/webhooks/${string}`; | ||
/** | ||
* The endpoint for a webhook execution on Guilded. | ||
* @param webhookId The ID of the webhook. | ||
* @param webhookToken The ID of the webhook. | ||
* @example Routes.webhookExecute('abc', 'abc'); // '/webhooks/abc/abc' | ||
*/ | ||
static webhookExecute(webhookId: string, webhookToken: string): `/webhooks/${string}/${string}`; | ||
} | ||
//# sourceMappingURL=REST.d.ts.map |
@@ -0,1 +1,3 @@ | ||
import { APIEmbed } from './Embed'; | ||
import { APIMessageEditPayload } from './Message'; | ||
/** | ||
@@ -32,2 +34,14 @@ * Represents a webhook on Guilded. | ||
/** | ||
* The payload for creating a webhook message. | ||
* @see https://guildedapi.com/resources/webhook/#execute-webhook | ||
*/ | ||
export interface APIWebhookMessagePayload extends APIMessageEditPayload { | ||
/** The name of the webhook. */ | ||
username?: string; | ||
/** The avatar URL of the webhook. */ | ||
avatar_url?: string; | ||
} | ||
/** The resolvable payload for creating a webhook message. */ | ||
export declare type APIWebhookMessagePayloadResolvable = string | APIEmbed[] | APIWebhookMessagePayload; | ||
/** | ||
* The payload for editing a webhook. | ||
@@ -34,0 +48,0 @@ * @see https://www.guilded.gg/docs/api/webhook/WebhookUpdate |
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
128977
1.49%2023
1.51%