mirror of
https://github.com/stoatchat/javascript-client-api.git
synced 2026-07-18 16:14:27 -04:00
65 lines
1.0 KiB
TypeScript
65 lines
1.0 KiB
TypeScript
/**
|
|
* An embedded image
|
|
*/
|
|
export type EmbedImage = {
|
|
url: string
|
|
|
|
width: number
|
|
|
|
height: number
|
|
|
|
size: 'Large' | 'Preview'
|
|
}
|
|
|
|
/**
|
|
* An embedded video
|
|
*/
|
|
export type EmbedVideo = {
|
|
url: string
|
|
|
|
width: number
|
|
|
|
height: number
|
|
}
|
|
|
|
/**
|
|
* A special 3rd party embed
|
|
*/
|
|
export type EmbedSpecial = (
|
|
{ type: 'None' } |
|
|
{ type: 'YouTube', id: string, timestamp?: string } |
|
|
{ type: 'Twitch', content_type: 'Channel' | 'Video' | 'Clip', id: string } |
|
|
{ type: 'Spotify', content_type: string, id: string } |
|
|
{ type: 'Soundcloud' } |
|
|
{ type: 'Bandcamp', content_type: 'Album' | 'Track', id: string }
|
|
)
|
|
|
|
/**
|
|
* Message url embed
|
|
*/
|
|
export type JanuaryEmbed = (
|
|
{
|
|
type: 'Website'
|
|
|
|
url?: string
|
|
|
|
special?: EmbedSpecial
|
|
|
|
title?: string
|
|
|
|
description?: string
|
|
|
|
image?: EmbedImage
|
|
|
|
video?: EmbedVideo
|
|
|
|
site_name?: string
|
|
|
|
icon_url?: string
|
|
|
|
colour?: string
|
|
} | ({
|
|
type: 'Image'
|
|
} & EmbedImage)
|
|
);
|