revolt.js
Advanced tools
Comparing version 3.0.2 to 3.0.3-alpha.0
@@ -11,2 +11,3 @@ export declare namespace Core { | ||
email: boolean; | ||
invite_only: string; | ||
}; | ||
@@ -13,0 +14,0 @@ ws: string; |
@@ -1,2 +0,2 @@ | ||
import { Channels, Users } from './objects'; | ||
import { Channels, Core, Users } from './objects'; | ||
declare type Routes = | ||
@@ -10,15 +10,3 @@ /** | ||
data: undefined; | ||
response: { | ||
revolt: string; | ||
features: { | ||
registration: boolean; | ||
captcha: { | ||
enabled: boolean; | ||
key: string; | ||
}; | ||
email: boolean; | ||
invite_only: boolean; | ||
}; | ||
ws: string; | ||
}; | ||
response: Core.RevoltNodeConfiguration; | ||
} | ||
@@ -25,0 +13,0 @@ /** |
@@ -74,2 +74,3 @@ import { AxiosRequestConfig } from 'axios'; | ||
logout(): Promise<void>; | ||
reset(): void; | ||
register(apiURL: string, data: Route<'POST', '/auth/create'>["data"]): Promise<{ | ||
@@ -76,0 +77,0 @@ user_id: string; |
@@ -153,6 +153,14 @@ "use strict"; | ||
return __awaiter(this, void 0, void 0, function* () { | ||
this.websocket.disconnect(); | ||
this.reset(); | ||
yield this.req('GET', '/auth/logout'); | ||
}); | ||
} | ||
reset() { | ||
this.websocket.disconnect(); | ||
delete this.user; | ||
delete this.session; | ||
this.users = new Map(); | ||
this.channels = new Map(); | ||
this.messages = new Map(); | ||
} | ||
register(apiURL, data) { | ||
@@ -159,0 +167,0 @@ return this.request('POST', '/auth/create', { data, baseURL: apiURL }); |
@@ -5,3 +5,3 @@ export * from './Client'; | ||
export { default as Channel, SavedMessagesChannel, DirectMessageChannel, GroupChannel } from './objects/Channel'; | ||
export declare const LIBRARY_VERSION = "3.0.2"; | ||
export declare const LIBRARY_VERSION = "3.0.3-alpha.0"; | ||
export declare const defaultConfig: { | ||
@@ -8,0 +8,0 @@ apiURL: string; |
@@ -16,3 +16,3 @@ "use strict"; | ||
exports.GroupChannel = Channel_1.GroupChannel; | ||
exports.LIBRARY_VERSION = '3.0.2'; | ||
exports.LIBRARY_VERSION = '3.0.3-alpha.0'; | ||
exports.defaultConfig = { | ||
@@ -19,0 +19,0 @@ apiURL: 'https://api.revolt.chat', |
{ | ||
"name": "revolt.js", | ||
"version": "3.0.2", | ||
"version": "3.0.3-alpha.0", | ||
"main": "dist/index.js", | ||
@@ -5,0 +5,0 @@ "repository": "https://gitlab.insrt.uk/revolt/revolt.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
58845
1642
2