mirror of
https://github.com/stoatchat/javascript-client-sdk.git
synced 2026-07-21 04:25:27 -04:00
Add Push API routes.
This commit is contained in:
+1
-1
@@ -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>",
|
||||
|
||||
@@ -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
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user