revolt-api
Advanced tools
Comparing version 0.5.3-alpha.11 to 0.5.3-alpha.12
{ | ||
"name": "revolt-api", | ||
"version": "0.5.3-alpha.11", | ||
"version": "0.5.3-alpha.12", | ||
"description": "Revolt API typings", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -15,29 +15,4 @@ # Revolt API | ||
### Commit Style | ||
### Tip (for development) | ||
If publishing a new version of the spec, the first line should always be the API version. | ||
``` | ||
0.5.0-alpha.0 | ||
Commit description. | ||
Line 2. | ||
``` | ||
If you are creating new changes for a PR, don't include any version! | ||
For any subsequent lines, prepend the relevant text: | ||
Prefix | Description | ||
--------|------------- | ||
`Structure` | Added a new data structure to the API. | ||
`Route` | Added a new route to the API. | ||
`Change` | Changed an existing route or data structure. | ||
`Fix` | Fixes to structures / routes. | ||
`Deprecation` | Use when deprecating a structure or route. | ||
`Library` | Changes to this repo unrelated to the API. | ||
Add new prefixes to this list as necessary. | ||
### Tip | ||
For faster compile times when working on API routes, comment out the categories you don't care about. | ||
@@ -44,0 +19,0 @@ |
@@ -172,3 +172,3 @@ import { body, noContent, parameter, ref, success } from "../openapi/generators.js"; | ||
import type { Id, AutumnId } from './_common'; | ||
import type { Masquerade } from './Channels'; | ||
import type { Masquerade, SendableEmbed } from './Channels'; | ||
@@ -189,2 +189,9 @@ interface ${'SendMessage'} { | ||
/** | ||
* Embeds to include in the message | ||
* @minLength 1 | ||
* @maxLength 10 | ||
*/ | ||
embeds?: SendableEmbed[]; | ||
/** | ||
* Messages to reply to. | ||
@@ -283,2 +290,4 @@ */ | ||
...await body("Message edit data.", schema` | ||
import type { SendableEmbed } from './Channels'; | ||
interface ${'MessageEdit'} { | ||
@@ -291,2 +300,9 @@ /** | ||
content: string; | ||
/** | ||
* Embeds to include in the message. | ||
* @minLength 0 | ||
* @maxLength 10 | ||
*/ | ||
embeds?: SendableEmbed[]; | ||
} | ||
@@ -293,0 +309,0 @@ `), |
import type { Attachment } from "./Autumn" | ||
import type { Id, Nonce } from "./_common" | ||
import type { Embed } from "./January" | ||
import type { JanuaryEmbed } from "./January" | ||
@@ -229,1 +229,25 @@ /** | ||
| { type: "channel_icon_changed"; by: Id }; | ||
export type TextEmbed = { | ||
type: "Text", | ||
icon_url?: string, | ||
url?: string, | ||
title?: string, | ||
description?: string, | ||
media?: Attachment, | ||
colour?: string | ||
} | ||
export type Embed = TextEmbed | JanuaryEmbed | { type: "None" } | ||
export type SendableEmbed = { | ||
type: "Text", | ||
icon_url?: string, | ||
url?: string, | ||
title?: string, | ||
description?: string, | ||
media?: string, | ||
colour?: string | ||
} |
@@ -12,7 +12,2 @@ export interface RevoltConfiguration { | ||
/** | ||
* Whether users can register | ||
*/ | ||
registration: boolean | ||
/** | ||
* hCaptcha options | ||
@@ -40,3 +35,3 @@ */ | ||
*/ | ||
invite_only: string | ||
invite_only: boolean | ||
@@ -43,0 +38,0 @@ /** |
@@ -38,8 +38,6 @@ /** | ||
/** | ||
* Message embed | ||
* Message url embed | ||
*/ | ||
export type Embed = ( | ||
export type JanuaryEmbed = ( | ||
{ | ||
type: 'None' | ||
} | { | ||
type: 'Website' | ||
@@ -46,0 +44,0 @@ |
Sorry, the diff of this file is too big to display
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
785861
22392
30