Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@satorijs/protocol

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@satorijs/protocol - npm Package Compare versions

Comparing version 1.3.0 to 1.3.1

8

lib/index.d.ts

@@ -18,2 +18,8 @@ import Element from '@satorijs/element';

}
export interface TwoWayList<T> {
data: T[];
prev?: string;
next?: string;
}
export type Direction = 'before' | 'after' | 'around';
export interface Methods {

@@ -24,3 +30,3 @@ createMessage(channelId: string, content: Element.Fragment, guildId?: string, options?: SendOptions): Promise<Message[]>;

getMessage(channelId: string, messageId: string): Promise<Message>;
getMessageList(channelId: string, next?: string): Promise<List<Message>>;
getMessageList(channelId: string, next?: string, direction?: Direction): Promise<TwoWayList<Message>>;
getMessageIter(channelId: string): AsyncIterable<Message>;

@@ -27,0 +33,0 @@ editMessage(channelId: string, messageId: string, content: Element.Fragment): Promise<void>;

6

package.json
{
"name": "@satorijs/protocol",
"description": "Protocol types for Satori protocol",
"version": "1.3.0",
"version": "1.3.1",
"type": "module",

@@ -41,5 +41,5 @@ "main": "lib/index.cjs",

"dependencies": {
"@satorijs/element": "^3.1.6",
"cosmokit": "^1.5.2"
"@satorijs/element": "^3.1.7",
"cosmokit": "^1.6.2"
}
}

@@ -37,3 +37,3 @@ import Element from '@satorijs/element'

'message.get': Method('getMessage', ['channel_id', 'message_id']),
'message.list': Method('getMessageList', ['channel_id', 'next']),
'message.list': Method('getMessageList', ['channel_id', 'next', 'direction']),

@@ -76,2 +76,10 @@ 'reaction.create': Method('createReaction', ['channel_id', 'message_id', 'emoji']),

export interface TwoWayList<T> {
data: T[]
prev?: string
next?: string
}
export type Direction = 'before' | 'after' | 'around'
export interface Methods {

@@ -83,3 +91,3 @@ // message

getMessage(channelId: string, messageId: string): Promise<Message>
getMessageList(channelId: string, next?: string): Promise<List<Message>>
getMessageList(channelId: string, next?: string, direction?: Direction): Promise<TwoWayList<Message>>
getMessageIter(channelId: string): AsyncIterable<Message>

@@ -86,0 +94,0 @@ editMessage(channelId: string, messageId: string, content: Element.Fragment): Promise<void>

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc