Comparing version 1.1.0 to 1.2.0
@@ -5,3 +5,3 @@ import { IStatus } from "./interfaces/IStatus.js"; | ||
import { IDeleteKey } from "./interfaces/IDeleteKey.js"; | ||
import { IUser } from "./interfaces/IUser.js"; | ||
import { IUserGet } from "./interfaces/IUser.js"; | ||
import { IUsers } from "./interfaces/IUsers.js"; | ||
@@ -23,3 +23,3 @@ import { IResetHWID, IResetHWIDPayload } from "./interfaces/IResetHWID.js"; | ||
deleteKey(project_id: string, userKey: string): Promise<IDeleteKey>; | ||
getUsers(project_id: string, payload?: IUser): Promise<IUsers>; | ||
getUsers(project_id: string, payload?: IUserGet): Promise<IUsers>; | ||
resetHWID(project_id: string, payload: IResetHWIDPayload): Promise<IResetHWID>; | ||
@@ -26,0 +26,0 @@ linkDiscord(project_id: string, payload: ILinkDiscordPayload): Promise<ILinkDiscord>; |
@@ -14,4 +14,5 @@ // Dependencies | ||
console.log("Key details:"); | ||
console.log(await Client.keyDetails()); | ||
console.log((await Client.keyDetails()).projects?.at(0)); | ||
const keyDetails = await Client.keyDetails(); | ||
console.log(keyDetails); | ||
console.log(keyDetails.projects?.[0]); | ||
// Grabbing key stats | ||
@@ -18,0 +19,0 @@ console.log("Key stats:"); |
@@ -6,2 +6,7 @@ export interface IUser { | ||
} | ||
export interface IUserGet { | ||
discord_id?: string; | ||
user_key?: string; | ||
identifier?: string; | ||
} | ||
export interface IUserFull extends IUser { | ||
@@ -8,0 +13,0 @@ user_key: string; |
{ | ||
"name": "luarmor-ts", | ||
"version": "1.1.0", | ||
"version": "1.2.0", | ||
"description": "A luarmor.net API wrapper written in TypeScript", | ||
@@ -5,0 +5,0 @@ "main": "./lib/index.js", |
@@ -7,3 +7,3 @@ // Dependencies | ||
import { IDeleteKey } from "./interfaces/IDeleteKey.js" | ||
import { IUser } from "./interfaces/IUser.js" | ||
import { IUser, IUserGet } from "./interfaces/IUser.js" | ||
import { IUsers } from "./interfaces/IUsers.js" | ||
@@ -81,3 +81,3 @@ import { IResetHWID, IResetHWIDPayload } from "./interfaces/IResetHWID.js" | ||
// Getting users | ||
async getUsers(project_id: string, payload: IUser = {}) { | ||
async getUsers(project_id: string, payload: IUserGet = {}) { | ||
return (await this.httpClient.get(`v3/projects/${project_id}/users`, { | ||
@@ -84,0 +84,0 @@ searchParams: <any>payload |
@@ -9,2 +9,10 @@ export interface IUser { | ||
} | ||
export interface IUserGet { | ||
// Discord ID of the user. If not specified, user won't be able to resethwid on their own. They can still link their discord id to their key using /redeem command (if you configured the bot) | ||
discord_id?: string | ||
// The key of the user | ||
user_key?: string | ||
// Identifier of the user to whitelist. Could be a HWID. | ||
identifier?: string | ||
} | ||
export interface IUserFull extends IUser { | ||
@@ -11,0 +19,0 @@ user_key: string |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
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
40177
77
658