Add Push API routes.

This commit is contained in:
Paul Makles
2021-02-18 14:23:44 +00:00
parent 76bd8d6900
commit fcea45699d
3 changed files with 21 additions and 2 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "revolt.js",
"version": "3.0.3-alpha.6",
"version": "3.0.3-alpha.7",
"main": "dist/index.js",
"repository": "https://gitlab.insrt.uk/revolt/revolt.js",
"author": "Paul Makles <insrt.uk>",
+19
View File
@@ -339,6 +339,25 @@ type Routes =
route: '/channels/:id/messages/:id',
data: undefined,
response: undefined
} |
/**
* Push API
*/
{
method: 'POST',
route: '/push/subscribe',
data: {
endpoint: string,
p256dh: string,
auth: string
},
response: undefined
} |
{
method: 'POST',
route: '/push/unsubscribe',
data: undefined,
response: undefined
}
// ? Below are Typescript typings for extracting route data from the object above.
+1 -1
View File
@@ -4,7 +4,7 @@ export { default as User } from './objects/User';
export { default as Message } from './objects/Message';
export { default as Channel, SavedMessagesChannel, DirectMessageChannel, GroupChannel } from './objects/Channel';
export const LIBRARY_VERSION = '3.0.3-alpha.6';
export const LIBRARY_VERSION = '3.0.3-alpha.7';
export const defaultConfig = {
apiURL: 'https://api.revolt.chat',