@quenty/userserviceutils 9.18.0 → 9.18.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +11 -0
- package/package.json +10 -10
- package/src/Shared/UserInfoAggregator.lua +19 -22
- package/src/Shared/UserInfoService.lua +12 -11
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,17 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [9.18.1](https://github.com/Quenty/NevermoreEngine/compare/@quenty/userserviceutils@9.18.0...@quenty/userserviceutils@9.18.1) (2025-04-05)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* Add types to packages ([2374fb2](https://github.com/Quenty/NevermoreEngine/commit/2374fb2b043cfbe0e9b507b3316eec46a4e353a0))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
# [9.18.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/userserviceutils@9.17.2...@quenty/userserviceutils@9.18.0) (2025-04-02)
|
|
7
18
|
|
|
8
19
|
**Note:** Version bump only for package @quenty/userserviceutils
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@quenty/userserviceutils",
|
|
3
|
-
"version": "9.18.
|
|
3
|
+
"version": "9.18.1",
|
|
4
4
|
"description": "Utilities involving UserService in Roblox",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Roblox",
|
|
@@ -25,17 +25,17 @@
|
|
|
25
25
|
"Quenty"
|
|
26
26
|
],
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@quenty/aggregator": "^1.4.
|
|
29
|
-
"@quenty/baseobject": "^10.8.
|
|
30
|
-
"@quenty/loader": "^10.8.
|
|
31
|
-
"@quenty/maid": "^3.4.
|
|
32
|
-
"@quenty/math": "^2.7.
|
|
33
|
-
"@quenty/promise": "^10.10.
|
|
34
|
-
"@quenty/rx": "^13.17.
|
|
35
|
-
"@quenty/servicebag": "^11.11.
|
|
28
|
+
"@quenty/aggregator": "^1.4.1",
|
|
29
|
+
"@quenty/baseobject": "^10.8.1",
|
|
30
|
+
"@quenty/loader": "^10.8.1",
|
|
31
|
+
"@quenty/maid": "^3.4.1",
|
|
32
|
+
"@quenty/math": "^2.7.2",
|
|
33
|
+
"@quenty/promise": "^10.10.2",
|
|
34
|
+
"@quenty/rx": "^13.17.1",
|
|
35
|
+
"@quenty/servicebag": "^11.11.2"
|
|
36
36
|
},
|
|
37
37
|
"publishConfig": {
|
|
38
38
|
"access": "public"
|
|
39
39
|
},
|
|
40
|
-
"gitHead": "
|
|
40
|
+
"gitHead": "78c3ac0ab08dd18085b6e6e6e4f745e76ed99f68"
|
|
41
41
|
}
|
|
@@ -39,7 +39,7 @@ end
|
|
|
39
39
|
@param userId number
|
|
40
40
|
@return Promise<UserInfo>
|
|
41
41
|
]=]
|
|
42
|
-
function UserInfoAggregator:PromiseUserInfo(userId)
|
|
42
|
+
function UserInfoAggregator:PromiseUserInfo(userId: number)
|
|
43
43
|
assert(type(userId) == "number", "Bad userId")
|
|
44
44
|
|
|
45
45
|
return self._aggregator:Promise(userId)
|
|
@@ -51,13 +51,12 @@ end
|
|
|
51
51
|
@param userId number
|
|
52
52
|
@return Promise<string>
|
|
53
53
|
]=]
|
|
54
|
-
function UserInfoAggregator:PromiseDisplayName(userId)
|
|
54
|
+
function UserInfoAggregator:PromiseDisplayName(userId: number)
|
|
55
55
|
assert(type(userId) == "number", "Bad userId")
|
|
56
56
|
|
|
57
|
-
return self._aggregator:Promise(userId)
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
end)
|
|
57
|
+
return self._aggregator:Promise(userId):Then(function(userInfo)
|
|
58
|
+
return userInfo.DisplayName
|
|
59
|
+
end)
|
|
61
60
|
end
|
|
62
61
|
|
|
63
62
|
--[=[
|
|
@@ -66,13 +65,12 @@ end
|
|
|
66
65
|
@param userId number
|
|
67
66
|
@return Promise<string>
|
|
68
67
|
]=]
|
|
69
|
-
function UserInfoAggregator:PromiseUsername(userId)
|
|
68
|
+
function UserInfoAggregator:PromiseUsername(userId: number)
|
|
70
69
|
assert(type(userId) == "number", "Bad userId")
|
|
71
70
|
|
|
72
|
-
return self._aggregator:Promise(userId)
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
end)
|
|
71
|
+
return self._aggregator:Promise(userId):Then(function(userInfo)
|
|
72
|
+
return userInfo.Username
|
|
73
|
+
end)
|
|
76
74
|
end
|
|
77
75
|
|
|
78
76
|
--[=[
|
|
@@ -81,13 +79,12 @@ end
|
|
|
81
79
|
@param userId number
|
|
82
80
|
@return Promise<boolean>
|
|
83
81
|
]=]
|
|
84
|
-
function UserInfoAggregator:PromiseHasVerifiedBadge(userId)
|
|
82
|
+
function UserInfoAggregator:PromiseHasVerifiedBadge(userId: number)
|
|
85
83
|
assert(type(userId) == "number", "Bad userId")
|
|
86
84
|
|
|
87
|
-
return self._aggregator:Promise(userId)
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
end)
|
|
85
|
+
return self._aggregator:Promise(userId):Then(function(userInfo)
|
|
86
|
+
return userInfo.HasVerifiedBadge
|
|
87
|
+
end)
|
|
91
88
|
end
|
|
92
89
|
|
|
93
90
|
--[=[
|
|
@@ -96,7 +93,7 @@ end
|
|
|
96
93
|
@param userId number
|
|
97
94
|
@return Observable<UserInfo>
|
|
98
95
|
]=]
|
|
99
|
-
function UserInfoAggregator:ObserveUserInfo(userId)
|
|
96
|
+
function UserInfoAggregator:ObserveUserInfo(userId: number)
|
|
100
97
|
assert(type(userId) == "number", "Bad userId")
|
|
101
98
|
|
|
102
99
|
return self._aggregator:Observe(userId)
|
|
@@ -108,13 +105,13 @@ end
|
|
|
108
105
|
@param userId number
|
|
109
106
|
@return Observable<string>
|
|
110
107
|
]=]
|
|
111
|
-
function UserInfoAggregator:ObserveDisplayName(userId)
|
|
108
|
+
function UserInfoAggregator:ObserveDisplayName(userId: number)
|
|
112
109
|
assert(type(userId) == "number", "Bad userId")
|
|
113
110
|
|
|
114
111
|
return self._aggregator:Observe(userId):Pipe({
|
|
115
112
|
Rx.map(function(userInfo)
|
|
116
113
|
return userInfo.DisplayName
|
|
117
|
-
end)
|
|
114
|
+
end),
|
|
118
115
|
})
|
|
119
116
|
end
|
|
120
117
|
|
|
@@ -124,13 +121,13 @@ end
|
|
|
124
121
|
@param userId number
|
|
125
122
|
@return Observable<string>
|
|
126
123
|
]=]
|
|
127
|
-
function UserInfoAggregator:ObserveUsername(userId)
|
|
124
|
+
function UserInfoAggregator:ObserveUsername(userId: number)
|
|
128
125
|
assert(type(userId) == "number", "Bad userId")
|
|
129
126
|
|
|
130
127
|
return self._aggregator:Observe(userId):Pipe({
|
|
131
128
|
Rx.map(function(userInfo)
|
|
132
129
|
return userInfo.Username
|
|
133
|
-
end)
|
|
130
|
+
end),
|
|
134
131
|
})
|
|
135
132
|
end
|
|
136
133
|
|
|
@@ -140,7 +137,7 @@ end
|
|
|
140
137
|
@param userId number
|
|
141
138
|
@return Observable<boolean>
|
|
142
139
|
]=]
|
|
143
|
-
function UserInfoAggregator:ObserveHasVerifiedBadge(userId)
|
|
140
|
+
function UserInfoAggregator:ObserveHasVerifiedBadge(userId: number)
|
|
144
141
|
assert(type(userId) == "number", "Bad userId")
|
|
145
142
|
|
|
146
143
|
return self._aggregator:Observe(userId):Pipe({
|
|
@@ -8,11 +8,12 @@ local require = require(script.Parent.loader).load(script)
|
|
|
8
8
|
|
|
9
9
|
local UserInfoAggregator = require("UserInfoAggregator")
|
|
10
10
|
local Maid = require("Maid")
|
|
11
|
+
local _ServiceBag = require("ServiceBag")
|
|
11
12
|
|
|
12
13
|
local UserInfoService = {}
|
|
13
14
|
UserInfoService.ServiceName = "UserInfoService"
|
|
14
15
|
|
|
15
|
-
function UserInfoService:Init(serviceBag)
|
|
16
|
+
function UserInfoService:Init(serviceBag: _ServiceBag.ServiceBag)
|
|
16
17
|
assert(not self._serviceBag, "Already initialized")
|
|
17
18
|
self._serviceBag = assert(serviceBag, "No serviceBag")
|
|
18
19
|
self._maid = Maid.new()
|
|
@@ -27,8 +28,8 @@ end
|
|
|
27
28
|
@param userId number
|
|
28
29
|
@return Promise<UserInfo>
|
|
29
30
|
]=]
|
|
30
|
-
function UserInfoService:PromiseUserInfo(userId)
|
|
31
|
-
|
|
31
|
+
function UserInfoService:PromiseUserInfo(userId: number)
|
|
32
|
+
assert(type(userId) == "number", "Bad userId")
|
|
32
33
|
|
|
33
34
|
return self._aggregator:PromiseUserInfo(userId)
|
|
34
35
|
end
|
|
@@ -39,8 +40,8 @@ end
|
|
|
39
40
|
@param userId number
|
|
40
41
|
@return Observable<UserInfo>
|
|
41
42
|
]=]
|
|
42
|
-
function UserInfoService:ObserveUserInfo(userId)
|
|
43
|
-
|
|
43
|
+
function UserInfoService:ObserveUserInfo(userId: number)
|
|
44
|
+
assert(type(userId) == "number", "Bad userId")
|
|
44
45
|
|
|
45
46
|
return self._aggregator:ObserveUserInfo(userId)
|
|
46
47
|
end
|
|
@@ -51,8 +52,8 @@ end
|
|
|
51
52
|
@param userId number
|
|
52
53
|
@return Promise<string>
|
|
53
54
|
]=]
|
|
54
|
-
function UserInfoService:PromiseDisplayName(userId)
|
|
55
|
-
|
|
55
|
+
function UserInfoService:PromiseDisplayName(userId: number)
|
|
56
|
+
assert(type(userId) == "number", "Bad userId")
|
|
56
57
|
|
|
57
58
|
return self._aggregator:PromiseDisplayName(userId)
|
|
58
59
|
end
|
|
@@ -63,8 +64,8 @@ end
|
|
|
63
64
|
@param userId number
|
|
64
65
|
@return Promise<string>
|
|
65
66
|
]=]
|
|
66
|
-
function UserInfoService:PromiseUsername(userId)
|
|
67
|
-
|
|
67
|
+
function UserInfoService:PromiseUsername(userId: number)
|
|
68
|
+
assert(type(userId) == "number", "Bad userId")
|
|
68
69
|
|
|
69
70
|
return self._aggregator:PromiseUsername(userId)
|
|
70
71
|
end
|
|
@@ -75,8 +76,8 @@ end
|
|
|
75
76
|
@param userId number
|
|
76
77
|
@return Observable<string>
|
|
77
78
|
]=]
|
|
78
|
-
function UserInfoService:ObserveDisplayName(userId)
|
|
79
|
-
|
|
79
|
+
function UserInfoService:ObserveDisplayName(userId: number)
|
|
80
|
+
assert(type(userId) == "number", "Bad userId")
|
|
80
81
|
|
|
81
82
|
return self._aggregator:ObserveDisplayName(userId)
|
|
82
83
|
end
|