-
Notifications
You must be signed in to change notification settings - Fork 5
/
index.js
96 lines (85 loc) · 3.5 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
exports.status = require('./lib/mojang/status')
exports.getProfile = require('./lib/mojang/get-profile')
exports.getProfileHistory = require('./lib/mojang/get-profile-history')
exports.lookupProfiles = require('./lib/mojang/lookup-profiles')
exports.lookupProfileAt = require('./lib/mojang/lookup-profile-at')
exports.getOrdersStatistics = require('./lib/mojang/get-orders-statistics')
exports.authenticate = require('./lib/yggdrasil/authenticate')
exports.isValid = require('./lib/yggdrasil/is-valid')
exports.refresh = require('./lib/yggdrasil/refresh')
exports.invalidate = require('./lib/yggdrasil/invalidate')
exports.signout = require('./lib/yggdrasil/signout')
exports.isSecure = require('./lib/security/is-secure')
exports.getChallenges = require('./lib/security/get-challenges')
exports.answerChallenges = require('./lib/security/answer-challenges')
exports.getSession = require('./lib/session/get-session')
exports.getBlockedServers = require('./lib/session/get-blocked-servers')
exports.getUser = require('./lib/account/get-user')
exports.setSkin = require('./lib/account/set-skin')
exports.uploadSkin = require('./lib/account/upload-skin')
exports.resetSkin = require('./lib/account/reset-skin')
exports.getUserProfiles = require('./lib/account/get-user-profiles')
exports.getUserCapeData = require('./lib/account/get-user-cape-data')
// For document types, prefer dotless Array<Object>
// https://github.com/jsdoc3/jsdoc/issues/1375
/**
* @typedef {Object} CustomSession
* @property {string} id - profile UUID
* @property {string} name - in-game name (IGN)
* @property {number} timestamp
* @property {string} skin - URL of the current skin texture
* @property {string} cape - URL of the current cape texture
* @property {boolean} isSlim - true if profile is using slim model
*/
/**
* @typedef {Object} MojangSession
* @property {string} clientToken
* @property {string} accessToken
* @property {{id: string, name: string}} [selectedProfile]
* @property {Array<{id: string, name: string}>} [availableProfiles]
* @property {{id: string}} [user] - always included by {@link authenticate}
*/
/**
* @typedef {Object} MojangProfile
* @property {string} id - profile UUID
* @property {string} agent - minecraft, scrolls
* @property {string} name - in-game name (IGN)
* @property {string} userId - user UUID
* @property {number} createdAt
* @property {boolean} legacyProfile
* @property {boolean} deleted
* @property {boolean} paid
* @property {boolean} migrated
*/
/**
* @typedef {Object} MojangChallenge
* @property {Object} answer
* @property {number} answer.id - used in {@link answerChallenges}
* @property {Object} question
* @property {number} question.id
* @property {string} question.question - text to prompt user with
*/
/**
* @typedef {Object} MojangUser
* @property {string} id - user UUID
* @property {string} email
* @property {string} firstName
* @property {string} lastName
* @property {string} username
* @property {string} registerIp
* @property {string} migratedFrom
* @property {number} migratedAt
* @property {number} registeredAt
* @property {number} passwordChangedAt
* @property {number} dateOfBirth
* @property {boolean} deleted
* @property {boolean} blocked
* @property {boolean} secured
* @property {boolean} migrated
* @property {boolean} emailVerified
* @property {boolean} legacyUser
* @property {boolean} verifiedByParent
* @property {string} fullName
* @property {boolean} fromMigratedUser
* @property {boolean} hashed
*/