@squarecloud/api
Advanced tools
+3
-2
| import { Application } from './structures/Application'; | ||
| import { User } from './structures/User'; | ||
| import { FullUser, User } from './structures/User'; | ||
| export declare class SquareCloudAPI { | ||
@@ -20,3 +20,4 @@ static apiInfo: { | ||
| */ | ||
| getUser(userId?: string): Promise<User>; | ||
| getUser(): Promise<FullUser>; | ||
| getUser(userId: string): Promise<User>; | ||
| /** | ||
@@ -23,0 +24,0 @@ * Returns an application that you can manage or get information |
+0
-5
@@ -23,7 +23,2 @@ "use strict"; | ||
| } | ||
| /** | ||
| * Gets a user's informations | ||
| * | ||
| * @param userId - The user id, if not provided it will get your own information | ||
| */ | ||
| async getUser(userId) { | ||
@@ -30,0 +25,0 @@ if (userId) |
@@ -28,5 +28,5 @@ import { AccountPlan, RawUserData } from '../typings'; | ||
| email: string; | ||
| /** The user's registered applications */ | ||
| applications: Application[]; | ||
| /** The user's registered applications Map */ | ||
| applications: Map<string, Application>; | ||
| constructor(apiManager: APIManager, data: RawUserData); | ||
| } |
@@ -46,10 +46,10 @@ "use strict"; | ||
| email; | ||
| /** The user's registered applications */ | ||
| applications; | ||
| /** The user's registered applications Map */ | ||
| applications = new Map(); | ||
| constructor(apiManager, data) { | ||
| super(apiManager, data); | ||
| this.email = data.user.email; | ||
| this.applications = data.applications.map((data) => new Application_1.Application(apiManager, data)); | ||
| data.applications.map((app) => this.applications.set(app.id, new Application_1.Application(apiManager, app))); | ||
| } | ||
| } | ||
| exports.FullUser = FullUser; |
+1
-1
| { | ||
| "name": "@squarecloud/api", | ||
| "version": "1.1.2", | ||
| "version": "1.1.3", | ||
| "description": "A JavaScript Wrapper for SquareCloud API", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
34137
-0.18%632
-0.63%