wenum 1.59.0 → 1.60.0
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/dist/index.d.mts +2 -14
- package/dist/index.d.ts +2 -14
- package/dist/index.js +21 -62
- package/dist/index.mjs +21 -60
- package/package.json +2 -1
- package/src/meta/label.ts +3 -3
- package/src/page/pid.ts +18 -18
- package/src/page/profile/profile.ts +13 -36
package/dist/index.d.mts
CHANGED
|
@@ -6,19 +6,7 @@ declare enum PageType {
|
|
|
6
6
|
Location = 4
|
|
7
7
|
}
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
None = 0,
|
|
11
|
-
User = 1,
|
|
12
|
-
Uoi = 2,
|
|
13
|
-
Market = 3,
|
|
14
|
-
Arena = 4,
|
|
15
|
-
Collection = 5,
|
|
16
|
-
Event = 6,
|
|
17
|
-
Team = 7,
|
|
18
|
-
Leaderboard = 8,
|
|
19
|
-
Game = 9
|
|
20
|
-
}
|
|
21
|
-
declare const getProfileTypeName: (type: ProfileType) => string;
|
|
9
|
+
type ProfileType = "none" | "user" | "uoi" | "market" | "arena" | "collection" | "event" | "team" | "leaderboard" | "game";
|
|
22
10
|
declare enum ProfilePrivacy {
|
|
23
11
|
Public = 0,
|
|
24
12
|
Private = 1,
|
|
@@ -337,4 +325,4 @@ declare const getProfileAttributeLabel: ({ profileType, categoryType, interestTy
|
|
|
337
325
|
attributeType: AttributeType;
|
|
338
326
|
}) => any;
|
|
339
327
|
|
|
340
|
-
export { ATTRIBUTE_LABEL, ATTRIBUTE_LABEL_COLLECTION, ATTRIBUTE_LABEL_COLLECTION_PETS, ATTRIBUTE_LABEL_COMMON, ATTRIBUTE_LABEL_UOI, ATTRIBUTE_LABEL_UOI_SPORTS, ATTRIBUTE_LABEL_UOI_SPORTS_BASKETBALL, ATTRIBUTE_LABEL_UOI_SPORTS_TENNIS, type AccountStatus, AdminAccountStatus, AttendanceStatus, type AttributeType, type AttributeTypeCollection, type AttributeTypeCollectionPets, type AttributeTypeCommon, type AttributeTypeUoi, type AttributeTypeUoiSports, type AttributeTypeUoiSportsBasketball, type AttributeTypeUoiSportsTennis, AvatarType, BasketballPosition, type BroadcastType, BuddyingStatus, type CardGamesInterestType, type CategoryType, ChallengeStatus, CollectionMetaStatus, type CollectionType, DuelGameResultType, FollowingStatus, type GameType, Gender, Handedness, type InterestType, LeaderboardType, type LengthUnit, LocationType, MarketMetaStatus, type MarketType, MemberingStatus, type MusicInterestType, NotificationType, type PIDPrefixType, PID_LENGTH, PID_PREFIX_LENGTH, PageType, type PetsInterestType, type PlayerType, PostPrivacy, PostType, ProfileJoiningType, ProfilePermission, ProfilePrivacy, ProfileStatus, ProfileType, SocialMediaType, type SportsInterestType, SubjectType, TennisBackhand, TennisLevel, UserPronoun, type WeightUnit, getBuddyingStatusName, getMemberingStatusName, getNotificationTypeName, getPIDPrefixByProfileType, getProfileAttributeLabel, getProfileTypeByPID,
|
|
328
|
+
export { ATTRIBUTE_LABEL, ATTRIBUTE_LABEL_COLLECTION, ATTRIBUTE_LABEL_COLLECTION_PETS, ATTRIBUTE_LABEL_COMMON, ATTRIBUTE_LABEL_UOI, ATTRIBUTE_LABEL_UOI_SPORTS, ATTRIBUTE_LABEL_UOI_SPORTS_BASKETBALL, ATTRIBUTE_LABEL_UOI_SPORTS_TENNIS, type AccountStatus, AdminAccountStatus, AttendanceStatus, type AttributeType, type AttributeTypeCollection, type AttributeTypeCollectionPets, type AttributeTypeCommon, type AttributeTypeUoi, type AttributeTypeUoiSports, type AttributeTypeUoiSportsBasketball, type AttributeTypeUoiSportsTennis, AvatarType, BasketballPosition, type BroadcastType, BuddyingStatus, type CardGamesInterestType, type CategoryType, ChallengeStatus, CollectionMetaStatus, type CollectionType, DuelGameResultType, FollowingStatus, type GameType, Gender, Handedness, type InterestType, LeaderboardType, type LengthUnit, LocationType, MarketMetaStatus, type MarketType, MemberingStatus, type MusicInterestType, NotificationType, type PIDPrefixType, PID_LENGTH, PID_PREFIX_LENGTH, PageType, type PetsInterestType, type PlayerType, PostPrivacy, PostType, ProfileJoiningType, ProfilePermission, ProfilePrivacy, ProfileStatus, type ProfileType, SocialMediaType, type SportsInterestType, SubjectType, TennisBackhand, TennisLevel, UserPronoun, type WeightUnit, getBuddyingStatusName, getMemberingStatusName, getNotificationTypeName, getPIDPrefixByProfileType, getProfileAttributeLabel, getProfileTypeByPID, isGamePID, isLeaderboardPID, isTeamPID, isUoiPID };
|
package/dist/index.d.ts
CHANGED
|
@@ -6,19 +6,7 @@ declare enum PageType {
|
|
|
6
6
|
Location = 4
|
|
7
7
|
}
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
None = 0,
|
|
11
|
-
User = 1,
|
|
12
|
-
Uoi = 2,
|
|
13
|
-
Market = 3,
|
|
14
|
-
Arena = 4,
|
|
15
|
-
Collection = 5,
|
|
16
|
-
Event = 6,
|
|
17
|
-
Team = 7,
|
|
18
|
-
Leaderboard = 8,
|
|
19
|
-
Game = 9
|
|
20
|
-
}
|
|
21
|
-
declare const getProfileTypeName: (type: ProfileType) => string;
|
|
9
|
+
type ProfileType = "none" | "user" | "uoi" | "market" | "arena" | "collection" | "event" | "team" | "leaderboard" | "game";
|
|
22
10
|
declare enum ProfilePrivacy {
|
|
23
11
|
Public = 0,
|
|
24
12
|
Private = 1,
|
|
@@ -337,4 +325,4 @@ declare const getProfileAttributeLabel: ({ profileType, categoryType, interestTy
|
|
|
337
325
|
attributeType: AttributeType;
|
|
338
326
|
}) => any;
|
|
339
327
|
|
|
340
|
-
export { ATTRIBUTE_LABEL, ATTRIBUTE_LABEL_COLLECTION, ATTRIBUTE_LABEL_COLLECTION_PETS, ATTRIBUTE_LABEL_COMMON, ATTRIBUTE_LABEL_UOI, ATTRIBUTE_LABEL_UOI_SPORTS, ATTRIBUTE_LABEL_UOI_SPORTS_BASKETBALL, ATTRIBUTE_LABEL_UOI_SPORTS_TENNIS, type AccountStatus, AdminAccountStatus, AttendanceStatus, type AttributeType, type AttributeTypeCollection, type AttributeTypeCollectionPets, type AttributeTypeCommon, type AttributeTypeUoi, type AttributeTypeUoiSports, type AttributeTypeUoiSportsBasketball, type AttributeTypeUoiSportsTennis, AvatarType, BasketballPosition, type BroadcastType, BuddyingStatus, type CardGamesInterestType, type CategoryType, ChallengeStatus, CollectionMetaStatus, type CollectionType, DuelGameResultType, FollowingStatus, type GameType, Gender, Handedness, type InterestType, LeaderboardType, type LengthUnit, LocationType, MarketMetaStatus, type MarketType, MemberingStatus, type MusicInterestType, NotificationType, type PIDPrefixType, PID_LENGTH, PID_PREFIX_LENGTH, PageType, type PetsInterestType, type PlayerType, PostPrivacy, PostType, ProfileJoiningType, ProfilePermission, ProfilePrivacy, ProfileStatus, ProfileType, SocialMediaType, type SportsInterestType, SubjectType, TennisBackhand, TennisLevel, UserPronoun, type WeightUnit, getBuddyingStatusName, getMemberingStatusName, getNotificationTypeName, getPIDPrefixByProfileType, getProfileAttributeLabel, getProfileTypeByPID,
|
|
328
|
+
export { ATTRIBUTE_LABEL, ATTRIBUTE_LABEL_COLLECTION, ATTRIBUTE_LABEL_COLLECTION_PETS, ATTRIBUTE_LABEL_COMMON, ATTRIBUTE_LABEL_UOI, ATTRIBUTE_LABEL_UOI_SPORTS, ATTRIBUTE_LABEL_UOI_SPORTS_BASKETBALL, ATTRIBUTE_LABEL_UOI_SPORTS_TENNIS, type AccountStatus, AdminAccountStatus, AttendanceStatus, type AttributeType, type AttributeTypeCollection, type AttributeTypeCollectionPets, type AttributeTypeCommon, type AttributeTypeUoi, type AttributeTypeUoiSports, type AttributeTypeUoiSportsBasketball, type AttributeTypeUoiSportsTennis, AvatarType, BasketballPosition, type BroadcastType, BuddyingStatus, type CardGamesInterestType, type CategoryType, ChallengeStatus, CollectionMetaStatus, type CollectionType, DuelGameResultType, FollowingStatus, type GameType, Gender, Handedness, type InterestType, LeaderboardType, type LengthUnit, LocationType, MarketMetaStatus, type MarketType, MemberingStatus, type MusicInterestType, NotificationType, type PIDPrefixType, PID_LENGTH, PID_PREFIX_LENGTH, PageType, type PetsInterestType, type PlayerType, PostPrivacy, PostType, ProfileJoiningType, ProfilePermission, ProfilePrivacy, ProfileStatus, type ProfileType, SocialMediaType, type SportsInterestType, SubjectType, TennisBackhand, TennisLevel, UserPronoun, type WeightUnit, getBuddyingStatusName, getMemberingStatusName, getNotificationTypeName, getPIDPrefixByProfileType, getProfileAttributeLabel, getProfileTypeByPID, isGamePID, isLeaderboardPID, isTeamPID, isUoiPID };
|
package/dist/index.js
CHANGED
|
@@ -53,7 +53,6 @@ __export(index_exports, {
|
|
|
53
53
|
ProfilePermission: () => ProfilePermission,
|
|
54
54
|
ProfilePrivacy: () => ProfilePrivacy,
|
|
55
55
|
ProfileStatus: () => ProfileStatus,
|
|
56
|
-
ProfileType: () => ProfileType,
|
|
57
56
|
SocialMediaType: () => SocialMediaType,
|
|
58
57
|
SubjectType: () => SubjectType,
|
|
59
58
|
TennisBackhand: () => TennisBackhand,
|
|
@@ -65,7 +64,6 @@ __export(index_exports, {
|
|
|
65
64
|
getPIDPrefixByProfileType: () => getPIDPrefixByProfileType,
|
|
66
65
|
getProfileAttributeLabel: () => getProfileAttributeLabel,
|
|
67
66
|
getProfileTypeByPID: () => getProfileTypeByPID,
|
|
68
|
-
getProfileTypeName: () => getProfileTypeName,
|
|
69
67
|
isGamePID: () => isGamePID,
|
|
70
68
|
isLeaderboardPID: () => isLeaderboardPID,
|
|
71
69
|
isTeamPID: () => isTeamPID,
|
|
@@ -84,43 +82,6 @@ var PageType = /* @__PURE__ */ ((PageType2) => {
|
|
|
84
82
|
})(PageType || {});
|
|
85
83
|
|
|
86
84
|
// src/page/profile/profile.ts
|
|
87
|
-
var ProfileType = /* @__PURE__ */ ((ProfileType2) => {
|
|
88
|
-
ProfileType2[ProfileType2["None"] = 0] = "None";
|
|
89
|
-
ProfileType2[ProfileType2["User"] = 1] = "User";
|
|
90
|
-
ProfileType2[ProfileType2["Uoi"] = 2] = "Uoi";
|
|
91
|
-
ProfileType2[ProfileType2["Market"] = 3] = "Market";
|
|
92
|
-
ProfileType2[ProfileType2["Arena"] = 4] = "Arena";
|
|
93
|
-
ProfileType2[ProfileType2["Collection"] = 5] = "Collection";
|
|
94
|
-
ProfileType2[ProfileType2["Event"] = 6] = "Event";
|
|
95
|
-
ProfileType2[ProfileType2["Team"] = 7] = "Team";
|
|
96
|
-
ProfileType2[ProfileType2["Leaderboard"] = 8] = "Leaderboard";
|
|
97
|
-
ProfileType2[ProfileType2["Game"] = 9] = "Game";
|
|
98
|
-
return ProfileType2;
|
|
99
|
-
})(ProfileType || {});
|
|
100
|
-
var getProfileTypeName = (type) => {
|
|
101
|
-
switch (type) {
|
|
102
|
-
case 1 /* User */:
|
|
103
|
-
return "User";
|
|
104
|
-
case 2 /* Uoi */:
|
|
105
|
-
return "UOI";
|
|
106
|
-
case 3 /* Market */:
|
|
107
|
-
return "Market";
|
|
108
|
-
case 4 /* Arena */:
|
|
109
|
-
return "Arena";
|
|
110
|
-
case 5 /* Collection */:
|
|
111
|
-
return "Collection";
|
|
112
|
-
case 6 /* Event */:
|
|
113
|
-
return "Event";
|
|
114
|
-
case 7 /* Team */:
|
|
115
|
-
return "Team";
|
|
116
|
-
case 8 /* Leaderboard */:
|
|
117
|
-
return "Leaderboard";
|
|
118
|
-
case 9 /* Game */:
|
|
119
|
-
return "Game";
|
|
120
|
-
default:
|
|
121
|
-
return "Invalid profile type";
|
|
122
|
-
}
|
|
123
|
-
};
|
|
124
85
|
var ProfilePrivacy = /* @__PURE__ */ ((ProfilePrivacy2) => {
|
|
125
86
|
ProfilePrivacy2[ProfilePrivacy2["Public"] = 0] = "Public";
|
|
126
87
|
ProfilePrivacy2[ProfilePrivacy2["Private"] = 1] = "Private";
|
|
@@ -262,44 +223,44 @@ function getProfileTypeByPID(pid) {
|
|
|
262
223
|
const prefix = getPIDPrefix(pid);
|
|
263
224
|
switch (prefix) {
|
|
264
225
|
case "usr":
|
|
265
|
-
return
|
|
226
|
+
return "user";
|
|
266
227
|
case "uoi":
|
|
267
|
-
return
|
|
228
|
+
return "uoi";
|
|
268
229
|
case "tms":
|
|
269
|
-
return
|
|
230
|
+
return "team";
|
|
270
231
|
case "arn":
|
|
271
|
-
return
|
|
232
|
+
return "arena";
|
|
272
233
|
case "evt":
|
|
273
|
-
return
|
|
234
|
+
return "event";
|
|
274
235
|
case "col":
|
|
275
|
-
return
|
|
236
|
+
return "collection";
|
|
276
237
|
case "lbd":
|
|
277
|
-
return
|
|
238
|
+
return "leaderboard";
|
|
278
239
|
case "gme":
|
|
279
|
-
return
|
|
240
|
+
return "game";
|
|
280
241
|
case "mkt":
|
|
281
|
-
return
|
|
242
|
+
return "market";
|
|
282
243
|
default:
|
|
283
|
-
return
|
|
244
|
+
return "none";
|
|
284
245
|
}
|
|
285
246
|
}
|
|
286
247
|
var getPIDPrefixByProfileType = (profileType) => {
|
|
287
248
|
switch (profileType) {
|
|
288
|
-
case
|
|
249
|
+
case "user":
|
|
289
250
|
return "usr";
|
|
290
|
-
case
|
|
251
|
+
case "uoi":
|
|
291
252
|
return "uoi";
|
|
292
|
-
case
|
|
253
|
+
case "team":
|
|
293
254
|
return "tms";
|
|
294
|
-
case
|
|
255
|
+
case "arena":
|
|
295
256
|
return "arn";
|
|
296
|
-
case
|
|
257
|
+
case "event":
|
|
297
258
|
return "evt";
|
|
298
|
-
case
|
|
259
|
+
case "collection":
|
|
299
260
|
return "col";
|
|
300
|
-
case
|
|
261
|
+
case "leaderboard":
|
|
301
262
|
return "lbd";
|
|
302
|
-
case
|
|
263
|
+
case "game":
|
|
303
264
|
return "gme";
|
|
304
265
|
default:
|
|
305
266
|
return "";
|
|
@@ -579,9 +540,9 @@ var ATTRIBUTE_LABEL_COLLECTION = {
|
|
|
579
540
|
|
|
580
541
|
// src/meta/label.ts
|
|
581
542
|
var ATTRIBUTE_LABEL = {
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
543
|
+
uoi: ATTRIBUTE_LABEL_UOI,
|
|
544
|
+
collection: ATTRIBUTE_LABEL_COLLECTION,
|
|
545
|
+
none: ATTRIBUTE_LABEL_COMMON
|
|
585
546
|
};
|
|
586
547
|
|
|
587
548
|
// src/meta/util.ts
|
|
@@ -635,7 +596,6 @@ var getProfileAttributeLabel = ({
|
|
|
635
596
|
ProfilePermission,
|
|
636
597
|
ProfilePrivacy,
|
|
637
598
|
ProfileStatus,
|
|
638
|
-
ProfileType,
|
|
639
599
|
SocialMediaType,
|
|
640
600
|
SubjectType,
|
|
641
601
|
TennisBackhand,
|
|
@@ -647,7 +607,6 @@ var getProfileAttributeLabel = ({
|
|
|
647
607
|
getPIDPrefixByProfileType,
|
|
648
608
|
getProfileAttributeLabel,
|
|
649
609
|
getProfileTypeByPID,
|
|
650
|
-
getProfileTypeName,
|
|
651
610
|
isGamePID,
|
|
652
611
|
isLeaderboardPID,
|
|
653
612
|
isTeamPID,
|
package/dist/index.mjs
CHANGED
|
@@ -9,43 +9,6 @@ var PageType = /* @__PURE__ */ ((PageType2) => {
|
|
|
9
9
|
})(PageType || {});
|
|
10
10
|
|
|
11
11
|
// src/page/profile/profile.ts
|
|
12
|
-
var ProfileType = /* @__PURE__ */ ((ProfileType2) => {
|
|
13
|
-
ProfileType2[ProfileType2["None"] = 0] = "None";
|
|
14
|
-
ProfileType2[ProfileType2["User"] = 1] = "User";
|
|
15
|
-
ProfileType2[ProfileType2["Uoi"] = 2] = "Uoi";
|
|
16
|
-
ProfileType2[ProfileType2["Market"] = 3] = "Market";
|
|
17
|
-
ProfileType2[ProfileType2["Arena"] = 4] = "Arena";
|
|
18
|
-
ProfileType2[ProfileType2["Collection"] = 5] = "Collection";
|
|
19
|
-
ProfileType2[ProfileType2["Event"] = 6] = "Event";
|
|
20
|
-
ProfileType2[ProfileType2["Team"] = 7] = "Team";
|
|
21
|
-
ProfileType2[ProfileType2["Leaderboard"] = 8] = "Leaderboard";
|
|
22
|
-
ProfileType2[ProfileType2["Game"] = 9] = "Game";
|
|
23
|
-
return ProfileType2;
|
|
24
|
-
})(ProfileType || {});
|
|
25
|
-
var getProfileTypeName = (type) => {
|
|
26
|
-
switch (type) {
|
|
27
|
-
case 1 /* User */:
|
|
28
|
-
return "User";
|
|
29
|
-
case 2 /* Uoi */:
|
|
30
|
-
return "UOI";
|
|
31
|
-
case 3 /* Market */:
|
|
32
|
-
return "Market";
|
|
33
|
-
case 4 /* Arena */:
|
|
34
|
-
return "Arena";
|
|
35
|
-
case 5 /* Collection */:
|
|
36
|
-
return "Collection";
|
|
37
|
-
case 6 /* Event */:
|
|
38
|
-
return "Event";
|
|
39
|
-
case 7 /* Team */:
|
|
40
|
-
return "Team";
|
|
41
|
-
case 8 /* Leaderboard */:
|
|
42
|
-
return "Leaderboard";
|
|
43
|
-
case 9 /* Game */:
|
|
44
|
-
return "Game";
|
|
45
|
-
default:
|
|
46
|
-
return "Invalid profile type";
|
|
47
|
-
}
|
|
48
|
-
};
|
|
49
12
|
var ProfilePrivacy = /* @__PURE__ */ ((ProfilePrivacy2) => {
|
|
50
13
|
ProfilePrivacy2[ProfilePrivacy2["Public"] = 0] = "Public";
|
|
51
14
|
ProfilePrivacy2[ProfilePrivacy2["Private"] = 1] = "Private";
|
|
@@ -187,44 +150,44 @@ function getProfileTypeByPID(pid) {
|
|
|
187
150
|
const prefix = getPIDPrefix(pid);
|
|
188
151
|
switch (prefix) {
|
|
189
152
|
case "usr":
|
|
190
|
-
return
|
|
153
|
+
return "user";
|
|
191
154
|
case "uoi":
|
|
192
|
-
return
|
|
155
|
+
return "uoi";
|
|
193
156
|
case "tms":
|
|
194
|
-
return
|
|
157
|
+
return "team";
|
|
195
158
|
case "arn":
|
|
196
|
-
return
|
|
159
|
+
return "arena";
|
|
197
160
|
case "evt":
|
|
198
|
-
return
|
|
161
|
+
return "event";
|
|
199
162
|
case "col":
|
|
200
|
-
return
|
|
163
|
+
return "collection";
|
|
201
164
|
case "lbd":
|
|
202
|
-
return
|
|
165
|
+
return "leaderboard";
|
|
203
166
|
case "gme":
|
|
204
|
-
return
|
|
167
|
+
return "game";
|
|
205
168
|
case "mkt":
|
|
206
|
-
return
|
|
169
|
+
return "market";
|
|
207
170
|
default:
|
|
208
|
-
return
|
|
171
|
+
return "none";
|
|
209
172
|
}
|
|
210
173
|
}
|
|
211
174
|
var getPIDPrefixByProfileType = (profileType) => {
|
|
212
175
|
switch (profileType) {
|
|
213
|
-
case
|
|
176
|
+
case "user":
|
|
214
177
|
return "usr";
|
|
215
|
-
case
|
|
178
|
+
case "uoi":
|
|
216
179
|
return "uoi";
|
|
217
|
-
case
|
|
180
|
+
case "team":
|
|
218
181
|
return "tms";
|
|
219
|
-
case
|
|
182
|
+
case "arena":
|
|
220
183
|
return "arn";
|
|
221
|
-
case
|
|
184
|
+
case "event":
|
|
222
185
|
return "evt";
|
|
223
|
-
case
|
|
186
|
+
case "collection":
|
|
224
187
|
return "col";
|
|
225
|
-
case
|
|
188
|
+
case "leaderboard":
|
|
226
189
|
return "lbd";
|
|
227
|
-
case
|
|
190
|
+
case "game":
|
|
228
191
|
return "gme";
|
|
229
192
|
default:
|
|
230
193
|
return "";
|
|
@@ -504,9 +467,9 @@ var ATTRIBUTE_LABEL_COLLECTION = {
|
|
|
504
467
|
|
|
505
468
|
// src/meta/label.ts
|
|
506
469
|
var ATTRIBUTE_LABEL = {
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
470
|
+
uoi: ATTRIBUTE_LABEL_UOI,
|
|
471
|
+
collection: ATTRIBUTE_LABEL_COLLECTION,
|
|
472
|
+
none: ATTRIBUTE_LABEL_COMMON
|
|
510
473
|
};
|
|
511
474
|
|
|
512
475
|
// src/meta/util.ts
|
|
@@ -559,7 +522,6 @@ export {
|
|
|
559
522
|
ProfilePermission,
|
|
560
523
|
ProfilePrivacy,
|
|
561
524
|
ProfileStatus,
|
|
562
|
-
ProfileType,
|
|
563
525
|
SocialMediaType,
|
|
564
526
|
SubjectType,
|
|
565
527
|
TennisBackhand,
|
|
@@ -571,7 +533,6 @@ export {
|
|
|
571
533
|
getPIDPrefixByProfileType,
|
|
572
534
|
getProfileAttributeLabel,
|
|
573
535
|
getProfileTypeByPID,
|
|
574
|
-
getProfileTypeName,
|
|
575
536
|
isGamePID,
|
|
576
537
|
isLeaderboardPID,
|
|
577
538
|
isTeamPID,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wenum",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.60.0",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"module": "dist/index.mjs",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -23,6 +23,7 @@
|
|
|
23
23
|
"devDependencies": {
|
|
24
24
|
"@types/jest": "^29.5.14",
|
|
25
25
|
"eslint": "^9.27.0",
|
|
26
|
+
"eslint-config-prettier": "^10.1.8",
|
|
26
27
|
"jest": "^29.7.0",
|
|
27
28
|
"prettier": "^3.5.3",
|
|
28
29
|
"tsup": "^8.5.0",
|
package/src/meta/label.ts
CHANGED
|
@@ -5,7 +5,7 @@ import { ATTRIBUTE_LABEL_COMMON } from './common';
|
|
|
5
5
|
import { ATTRIBUTE_LABEL_UOI } from './uoi';
|
|
6
6
|
|
|
7
7
|
export const ATTRIBUTE_LABEL:Partial<Record<ProfileType, any>> = {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
uoi: ATTRIBUTE_LABEL_UOI,
|
|
9
|
+
collection: ATTRIBUTE_LABEL_COLLECTION,
|
|
10
|
+
none: ATTRIBUTE_LABEL_COMMON,
|
|
11
11
|
};
|
package/src/page/pid.ts
CHANGED
|
@@ -29,45 +29,45 @@ export function getProfileTypeByPID(pid: string): ProfileType {
|
|
|
29
29
|
const prefix = getPIDPrefix(pid);
|
|
30
30
|
switch (prefix) {
|
|
31
31
|
case 'usr':
|
|
32
|
-
return
|
|
32
|
+
return 'user';
|
|
33
33
|
case 'uoi':
|
|
34
|
-
return
|
|
34
|
+
return 'uoi';
|
|
35
35
|
case 'tms':
|
|
36
|
-
return
|
|
36
|
+
return 'team';
|
|
37
37
|
case 'arn':
|
|
38
|
-
return
|
|
38
|
+
return 'arena';
|
|
39
39
|
case 'evt':
|
|
40
|
-
return
|
|
40
|
+
return 'event';
|
|
41
41
|
case 'col':
|
|
42
|
-
return
|
|
42
|
+
return 'collection';
|
|
43
43
|
case 'lbd':
|
|
44
|
-
return
|
|
44
|
+
return 'leaderboard';
|
|
45
45
|
case 'gme':
|
|
46
|
-
return
|
|
46
|
+
return 'game';
|
|
47
47
|
case 'mkt':
|
|
48
|
-
return
|
|
48
|
+
return 'market';
|
|
49
49
|
default:
|
|
50
|
-
return
|
|
50
|
+
return 'none';
|
|
51
51
|
}
|
|
52
52
|
}
|
|
53
53
|
|
|
54
54
|
export const getPIDPrefixByProfileType = (profileType: ProfileType): PIDPrefixType => {
|
|
55
55
|
switch (profileType) {
|
|
56
|
-
case
|
|
56
|
+
case 'user':
|
|
57
57
|
return 'usr';
|
|
58
|
-
case
|
|
58
|
+
case 'uoi':
|
|
59
59
|
return 'uoi';
|
|
60
|
-
case
|
|
60
|
+
case 'team':
|
|
61
61
|
return 'tms';
|
|
62
|
-
case
|
|
62
|
+
case 'arena':
|
|
63
63
|
return 'arn';
|
|
64
|
-
case
|
|
64
|
+
case 'event':
|
|
65
65
|
return 'evt';
|
|
66
|
-
case
|
|
66
|
+
case 'collection':
|
|
67
67
|
return 'col';
|
|
68
|
-
case
|
|
68
|
+
case 'leaderboard':
|
|
69
69
|
return 'lbd';
|
|
70
|
-
case
|
|
70
|
+
case 'game':
|
|
71
71
|
return 'gme';
|
|
72
72
|
default:
|
|
73
73
|
return '';
|
|
@@ -1,40 +1,17 @@
|
|
|
1
|
-
export
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
1
|
+
export type ProfileType =
|
|
2
|
+
"none" |
|
|
3
|
+
"user" |
|
|
4
|
+
"uoi" |
|
|
5
|
+
"market"|
|
|
6
|
+
"arena"|
|
|
7
|
+
"collection"|
|
|
8
|
+
"event"|
|
|
9
|
+
"team"|
|
|
10
|
+
"leaderboard" |
|
|
11
|
+
"game"
|
|
12
|
+
|
|
13
|
+
|
|
13
14
|
|
|
14
|
-
export const getProfileTypeName = (type: ProfileType): string => {
|
|
15
|
-
switch (type) {
|
|
16
|
-
case ProfileType.User:
|
|
17
|
-
return 'User';
|
|
18
|
-
case ProfileType.Uoi:
|
|
19
|
-
return 'UOI';
|
|
20
|
-
case ProfileType.Market:
|
|
21
|
-
return 'Market';
|
|
22
|
-
case ProfileType.Arena:
|
|
23
|
-
return 'Arena';
|
|
24
|
-
case ProfileType.Collection:
|
|
25
|
-
return 'Collection';
|
|
26
|
-
case ProfileType.Event:
|
|
27
|
-
return 'Event';
|
|
28
|
-
case ProfileType.Team:
|
|
29
|
-
return 'Team';
|
|
30
|
-
case ProfileType.Leaderboard:
|
|
31
|
-
return 'Leaderboard';
|
|
32
|
-
case ProfileType.Game:
|
|
33
|
-
return 'Game';
|
|
34
|
-
default:
|
|
35
|
-
return 'Invalid profile type';
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
15
|
|
|
39
16
|
export enum ProfilePrivacy {
|
|
40
17
|
Public, Private, Internal,
|