diff --git a/package.json b/package.json index 5ae4e3bd..95aafb19 100644 --- a/package.json +++ b/package.json @@ -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 ", diff --git a/src/api/routes.ts b/src/api/routes.ts index f5d9e75f..bbfb8329 100644 --- a/src/api/routes.ts +++ b/src/api/routes.ts @@ -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. diff --git a/src/index.ts b/src/index.ts index aa1e93b8..3f377359 100644 --- a/src/index.ts +++ b/src/index.ts @@ -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',