You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

revolt-api

Package Overview
Dependencies
Maintainers
1
Versions
114
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

revolt-api - npm Package Compare versions

Comparing version

to
0.8.4-rc.5

2

lib/index.d.ts

@@ -70,3 +70,3 @@ import type { APIRoutes } from "./routes.js";

*/
get auth(): RequestOptions;
get auth(): Record<string, string>;
/**

@@ -73,0 +73,0 @@ * Generate config to pass through to API.

@@ -46,5 +46,3 @@ export * from "./types.js";

return {
headers: {
"X-Session-Token": this.authentication.rauth,
},
"X-Session-Token": this.authentication.rauth,
};

@@ -57,5 +55,3 @@ }

return {
headers: {
"X-Bot-Token": this.authentication.revolt,
},
"X-Bot-Token": this.authentication.revolt,
};

@@ -65,5 +61,3 @@ }

return {
headers: {
"X-Session-Token": this.authentication.revolt.token,
},
"X-Session-Token": this.authentication.revolt.token,
};

@@ -74,3 +68,3 @@ }

else if (this.authentication.headers) {
return { headers: this.authentication.headers };
return this.authentication.headers;
}

@@ -85,4 +79,6 @@ return {};

baseURL: this.baseURL,
...this.auth,
headers: this.headers,
headers: {
...this.auth,
...this.headers,
},
};

@@ -89,0 +85,0 @@ }

{
"name": "revolt-api",
"version": "0.8.4-rc.4",
"version": "0.8.4-rc.5",
"description": "Revolt API Library",

@@ -13,3 +13,3 @@ "type": "module",

"devDependencies": {
"@insertish/oapi": "0.2.1",
"@insertish/oapi": "0.2.2",
"in-publish": "^2.0.1",

@@ -16,0 +16,0 @@ "openapi-typescript": "^5.4.2",

@@ -109,9 +109,7 @@ // This file was auto-generated by @insertish/oapi!

*/
get auth(): RequestOptions {
get auth(): Record<string, string> {
if (this.authentication.rauth) {
if (typeof this.authentication.rauth === "string") {
return {
headers: {
"X-Session-Token": this.authentication.rauth,
},
"X-Session-Token": this.authentication.rauth,
};

@@ -123,5 +121,3 @@ }

return {
headers: {
"X-Bot-Token": this.authentication.revolt,
},
"X-Bot-Token": this.authentication.revolt,
};

@@ -131,5 +127,3 @@ }

return {
headers: {
"X-Session-Token": this.authentication.revolt.token,
},
"X-Session-Token": this.authentication.revolt.token,
};

@@ -139,3 +133,3 @@ }

} else if (this.authentication.headers) {
return { headers: this.authentication.headers };
return this.authentication.headers;
}

@@ -152,4 +146,6 @@

baseURL: this.baseURL,
...this.auth,
headers: this.headers,
headers: {
...this.auth,
...this.headers,
},
};

@@ -156,0 +152,0 @@ }

Sorry, the diff of this file is not supported yet