wenum 1.58.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 +3 -21
- package/dist/index.d.ts +3 -21
- package/dist/index.js +21 -72
- package/dist/index.mjs +21 -69
- package/package.json +2 -1
- package/src/auth.ts +7 -7
- 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,
|
|
@@ -169,13 +157,7 @@ declare function isLeaderboardPID(pid: string): boolean;
|
|
|
169
157
|
|
|
170
158
|
type BroadcastType = 'info' | 'warn' | 'alert';
|
|
171
159
|
|
|
172
|
-
|
|
173
|
-
None = 0,
|
|
174
|
-
RegistrationNeedBasicInfo = 1,
|
|
175
|
-
RegistrationNeedInterests = 2,
|
|
176
|
-
Active = 3,
|
|
177
|
-
Inactive = 4
|
|
178
|
-
}
|
|
160
|
+
type AccountStatus = "none" | "registrationNeedBasicInfo" | "registrationNeedInterests" | "active" | "inactive";
|
|
179
161
|
declare enum AdminAccountStatus {
|
|
180
162
|
None = 0,
|
|
181
163
|
Active = 1,
|
|
@@ -343,4 +325,4 @@ declare const getProfileAttributeLabel: ({ profileType, categoryType, interestTy
|
|
|
343
325
|
attributeType: AttributeType;
|
|
344
326
|
}) => any;
|
|
345
327
|
|
|
346
|
-
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, 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,
|
|
@@ -169,13 +157,7 @@ declare function isLeaderboardPID(pid: string): boolean;
|
|
|
169
157
|
|
|
170
158
|
type BroadcastType = 'info' | 'warn' | 'alert';
|
|
171
159
|
|
|
172
|
-
|
|
173
|
-
None = 0,
|
|
174
|
-
RegistrationNeedBasicInfo = 1,
|
|
175
|
-
RegistrationNeedInterests = 2,
|
|
176
|
-
Active = 3,
|
|
177
|
-
Inactive = 4
|
|
178
|
-
}
|
|
160
|
+
type AccountStatus = "none" | "registrationNeedBasicInfo" | "registrationNeedInterests" | "active" | "inactive";
|
|
179
161
|
declare enum AdminAccountStatus {
|
|
180
162
|
None = 0,
|
|
181
163
|
Active = 1,
|
|
@@ -343,4 +325,4 @@ declare const getProfileAttributeLabel: ({ profileType, categoryType, interestTy
|
|
|
343
325
|
attributeType: AttributeType;
|
|
344
326
|
}) => any;
|
|
345
327
|
|
|
346
|
-
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, 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
|
@@ -28,7 +28,6 @@ __export(index_exports, {
|
|
|
28
28
|
ATTRIBUTE_LABEL_UOI_SPORTS: () => ATTRIBUTE_LABEL_UOI_SPORTS,
|
|
29
29
|
ATTRIBUTE_LABEL_UOI_SPORTS_BASKETBALL: () => ATTRIBUTE_LABEL_UOI_SPORTS_BASKETBALL,
|
|
30
30
|
ATTRIBUTE_LABEL_UOI_SPORTS_TENNIS: () => ATTRIBUTE_LABEL_UOI_SPORTS_TENNIS,
|
|
31
|
-
AccountStatus: () => AccountStatus,
|
|
32
31
|
AdminAccountStatus: () => AdminAccountStatus,
|
|
33
32
|
AttendanceStatus: () => AttendanceStatus,
|
|
34
33
|
AvatarType: () => AvatarType,
|
|
@@ -54,7 +53,6 @@ __export(index_exports, {
|
|
|
54
53
|
ProfilePermission: () => ProfilePermission,
|
|
55
54
|
ProfilePrivacy: () => ProfilePrivacy,
|
|
56
55
|
ProfileStatus: () => ProfileStatus,
|
|
57
|
-
ProfileType: () => ProfileType,
|
|
58
56
|
SocialMediaType: () => SocialMediaType,
|
|
59
57
|
SubjectType: () => SubjectType,
|
|
60
58
|
TennisBackhand: () => TennisBackhand,
|
|
@@ -66,7 +64,6 @@ __export(index_exports, {
|
|
|
66
64
|
getPIDPrefixByProfileType: () => getPIDPrefixByProfileType,
|
|
67
65
|
getProfileAttributeLabel: () => getProfileAttributeLabel,
|
|
68
66
|
getProfileTypeByPID: () => getProfileTypeByPID,
|
|
69
|
-
getProfileTypeName: () => getProfileTypeName,
|
|
70
67
|
isGamePID: () => isGamePID,
|
|
71
68
|
isLeaderboardPID: () => isLeaderboardPID,
|
|
72
69
|
isTeamPID: () => isTeamPID,
|
|
@@ -85,43 +82,6 @@ var PageType = /* @__PURE__ */ ((PageType2) => {
|
|
|
85
82
|
})(PageType || {});
|
|
86
83
|
|
|
87
84
|
// src/page/profile/profile.ts
|
|
88
|
-
var ProfileType = /* @__PURE__ */ ((ProfileType2) => {
|
|
89
|
-
ProfileType2[ProfileType2["None"] = 0] = "None";
|
|
90
|
-
ProfileType2[ProfileType2["User"] = 1] = "User";
|
|
91
|
-
ProfileType2[ProfileType2["Uoi"] = 2] = "Uoi";
|
|
92
|
-
ProfileType2[ProfileType2["Market"] = 3] = "Market";
|
|
93
|
-
ProfileType2[ProfileType2["Arena"] = 4] = "Arena";
|
|
94
|
-
ProfileType2[ProfileType2["Collection"] = 5] = "Collection";
|
|
95
|
-
ProfileType2[ProfileType2["Event"] = 6] = "Event";
|
|
96
|
-
ProfileType2[ProfileType2["Team"] = 7] = "Team";
|
|
97
|
-
ProfileType2[ProfileType2["Leaderboard"] = 8] = "Leaderboard";
|
|
98
|
-
ProfileType2[ProfileType2["Game"] = 9] = "Game";
|
|
99
|
-
return ProfileType2;
|
|
100
|
-
})(ProfileType || {});
|
|
101
|
-
var getProfileTypeName = (type) => {
|
|
102
|
-
switch (type) {
|
|
103
|
-
case 1 /* User */:
|
|
104
|
-
return "User";
|
|
105
|
-
case 2 /* Uoi */:
|
|
106
|
-
return "UOI";
|
|
107
|
-
case 3 /* Market */:
|
|
108
|
-
return "Market";
|
|
109
|
-
case 4 /* Arena */:
|
|
110
|
-
return "Arena";
|
|
111
|
-
case 5 /* Collection */:
|
|
112
|
-
return "Collection";
|
|
113
|
-
case 6 /* Event */:
|
|
114
|
-
return "Event";
|
|
115
|
-
case 7 /* Team */:
|
|
116
|
-
return "Team";
|
|
117
|
-
case 8 /* Leaderboard */:
|
|
118
|
-
return "Leaderboard";
|
|
119
|
-
case 9 /* Game */:
|
|
120
|
-
return "Game";
|
|
121
|
-
default:
|
|
122
|
-
return "Invalid profile type";
|
|
123
|
-
}
|
|
124
|
-
};
|
|
125
85
|
var ProfilePrivacy = /* @__PURE__ */ ((ProfilePrivacy2) => {
|
|
126
86
|
ProfilePrivacy2[ProfilePrivacy2["Public"] = 0] = "Public";
|
|
127
87
|
ProfilePrivacy2[ProfilePrivacy2["Private"] = 1] = "Private";
|
|
@@ -263,44 +223,44 @@ function getProfileTypeByPID(pid) {
|
|
|
263
223
|
const prefix = getPIDPrefix(pid);
|
|
264
224
|
switch (prefix) {
|
|
265
225
|
case "usr":
|
|
266
|
-
return
|
|
226
|
+
return "user";
|
|
267
227
|
case "uoi":
|
|
268
|
-
return
|
|
228
|
+
return "uoi";
|
|
269
229
|
case "tms":
|
|
270
|
-
return
|
|
230
|
+
return "team";
|
|
271
231
|
case "arn":
|
|
272
|
-
return
|
|
232
|
+
return "arena";
|
|
273
233
|
case "evt":
|
|
274
|
-
return
|
|
234
|
+
return "event";
|
|
275
235
|
case "col":
|
|
276
|
-
return
|
|
236
|
+
return "collection";
|
|
277
237
|
case "lbd":
|
|
278
|
-
return
|
|
238
|
+
return "leaderboard";
|
|
279
239
|
case "gme":
|
|
280
|
-
return
|
|
240
|
+
return "game";
|
|
281
241
|
case "mkt":
|
|
282
|
-
return
|
|
242
|
+
return "market";
|
|
283
243
|
default:
|
|
284
|
-
return
|
|
244
|
+
return "none";
|
|
285
245
|
}
|
|
286
246
|
}
|
|
287
247
|
var getPIDPrefixByProfileType = (profileType) => {
|
|
288
248
|
switch (profileType) {
|
|
289
|
-
case
|
|
249
|
+
case "user":
|
|
290
250
|
return "usr";
|
|
291
|
-
case
|
|
251
|
+
case "uoi":
|
|
292
252
|
return "uoi";
|
|
293
|
-
case
|
|
253
|
+
case "team":
|
|
294
254
|
return "tms";
|
|
295
|
-
case
|
|
255
|
+
case "arena":
|
|
296
256
|
return "arn";
|
|
297
|
-
case
|
|
257
|
+
case "event":
|
|
298
258
|
return "evt";
|
|
299
|
-
case
|
|
259
|
+
case "collection":
|
|
300
260
|
return "col";
|
|
301
|
-
case
|
|
261
|
+
case "leaderboard":
|
|
302
262
|
return "lbd";
|
|
303
|
-
case
|
|
263
|
+
case "game":
|
|
304
264
|
return "gme";
|
|
305
265
|
default:
|
|
306
266
|
return "";
|
|
@@ -320,14 +280,6 @@ function isLeaderboardPID(pid) {
|
|
|
320
280
|
}
|
|
321
281
|
|
|
322
282
|
// src/auth.ts
|
|
323
|
-
var AccountStatus = /* @__PURE__ */ ((AccountStatus2) => {
|
|
324
|
-
AccountStatus2[AccountStatus2["None"] = 0] = "None";
|
|
325
|
-
AccountStatus2[AccountStatus2["RegistrationNeedBasicInfo"] = 1] = "RegistrationNeedBasicInfo";
|
|
326
|
-
AccountStatus2[AccountStatus2["RegistrationNeedInterests"] = 2] = "RegistrationNeedInterests";
|
|
327
|
-
AccountStatus2[AccountStatus2["Active"] = 3] = "Active";
|
|
328
|
-
AccountStatus2[AccountStatus2["Inactive"] = 4] = "Inactive";
|
|
329
|
-
return AccountStatus2;
|
|
330
|
-
})(AccountStatus || {});
|
|
331
283
|
var AdminAccountStatus = /* @__PURE__ */ ((AdminAccountStatus2) => {
|
|
332
284
|
AdminAccountStatus2[AdminAccountStatus2["None"] = 0] = "None";
|
|
333
285
|
AdminAccountStatus2[AdminAccountStatus2["Active"] = 1] = "Active";
|
|
@@ -588,9 +540,9 @@ var ATTRIBUTE_LABEL_COLLECTION = {
|
|
|
588
540
|
|
|
589
541
|
// src/meta/label.ts
|
|
590
542
|
var ATTRIBUTE_LABEL = {
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
543
|
+
uoi: ATTRIBUTE_LABEL_UOI,
|
|
544
|
+
collection: ATTRIBUTE_LABEL_COLLECTION,
|
|
545
|
+
none: ATTRIBUTE_LABEL_COMMON
|
|
594
546
|
};
|
|
595
547
|
|
|
596
548
|
// src/meta/util.ts
|
|
@@ -619,7 +571,6 @@ var getProfileAttributeLabel = ({
|
|
|
619
571
|
ATTRIBUTE_LABEL_UOI_SPORTS,
|
|
620
572
|
ATTRIBUTE_LABEL_UOI_SPORTS_BASKETBALL,
|
|
621
573
|
ATTRIBUTE_LABEL_UOI_SPORTS_TENNIS,
|
|
622
|
-
AccountStatus,
|
|
623
574
|
AdminAccountStatus,
|
|
624
575
|
AttendanceStatus,
|
|
625
576
|
AvatarType,
|
|
@@ -645,7 +596,6 @@ var getProfileAttributeLabel = ({
|
|
|
645
596
|
ProfilePermission,
|
|
646
597
|
ProfilePrivacy,
|
|
647
598
|
ProfileStatus,
|
|
648
|
-
ProfileType,
|
|
649
599
|
SocialMediaType,
|
|
650
600
|
SubjectType,
|
|
651
601
|
TennisBackhand,
|
|
@@ -657,7 +607,6 @@ var getProfileAttributeLabel = ({
|
|
|
657
607
|
getPIDPrefixByProfileType,
|
|
658
608
|
getProfileAttributeLabel,
|
|
659
609
|
getProfileTypeByPID,
|
|
660
|
-
getProfileTypeName,
|
|
661
610
|
isGamePID,
|
|
662
611
|
isLeaderboardPID,
|
|
663
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 "";
|
|
@@ -244,14 +207,6 @@ function isLeaderboardPID(pid) {
|
|
|
244
207
|
}
|
|
245
208
|
|
|
246
209
|
// src/auth.ts
|
|
247
|
-
var AccountStatus = /* @__PURE__ */ ((AccountStatus2) => {
|
|
248
|
-
AccountStatus2[AccountStatus2["None"] = 0] = "None";
|
|
249
|
-
AccountStatus2[AccountStatus2["RegistrationNeedBasicInfo"] = 1] = "RegistrationNeedBasicInfo";
|
|
250
|
-
AccountStatus2[AccountStatus2["RegistrationNeedInterests"] = 2] = "RegistrationNeedInterests";
|
|
251
|
-
AccountStatus2[AccountStatus2["Active"] = 3] = "Active";
|
|
252
|
-
AccountStatus2[AccountStatus2["Inactive"] = 4] = "Inactive";
|
|
253
|
-
return AccountStatus2;
|
|
254
|
-
})(AccountStatus || {});
|
|
255
210
|
var AdminAccountStatus = /* @__PURE__ */ ((AdminAccountStatus2) => {
|
|
256
211
|
AdminAccountStatus2[AdminAccountStatus2["None"] = 0] = "None";
|
|
257
212
|
AdminAccountStatus2[AdminAccountStatus2["Active"] = 1] = "Active";
|
|
@@ -512,9 +467,9 @@ var ATTRIBUTE_LABEL_COLLECTION = {
|
|
|
512
467
|
|
|
513
468
|
// src/meta/label.ts
|
|
514
469
|
var ATTRIBUTE_LABEL = {
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
470
|
+
uoi: ATTRIBUTE_LABEL_UOI,
|
|
471
|
+
collection: ATTRIBUTE_LABEL_COLLECTION,
|
|
472
|
+
none: ATTRIBUTE_LABEL_COMMON
|
|
518
473
|
};
|
|
519
474
|
|
|
520
475
|
// src/meta/util.ts
|
|
@@ -542,7 +497,6 @@ export {
|
|
|
542
497
|
ATTRIBUTE_LABEL_UOI_SPORTS,
|
|
543
498
|
ATTRIBUTE_LABEL_UOI_SPORTS_BASKETBALL,
|
|
544
499
|
ATTRIBUTE_LABEL_UOI_SPORTS_TENNIS,
|
|
545
|
-
AccountStatus,
|
|
546
500
|
AdminAccountStatus,
|
|
547
501
|
AttendanceStatus,
|
|
548
502
|
AvatarType,
|
|
@@ -568,7 +522,6 @@ export {
|
|
|
568
522
|
ProfilePermission,
|
|
569
523
|
ProfilePrivacy,
|
|
570
524
|
ProfileStatus,
|
|
571
|
-
ProfileType,
|
|
572
525
|
SocialMediaType,
|
|
573
526
|
SubjectType,
|
|
574
527
|
TennisBackhand,
|
|
@@ -580,7 +533,6 @@ export {
|
|
|
580
533
|
getPIDPrefixByProfileType,
|
|
581
534
|
getProfileAttributeLabel,
|
|
582
535
|
getProfileTypeByPID,
|
|
583
|
-
getProfileTypeName,
|
|
584
536
|
isGamePID,
|
|
585
537
|
isLeaderboardPID,
|
|
586
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/auth.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
export
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
}
|
|
1
|
+
export type AccountStatus =
|
|
2
|
+
"none"|
|
|
3
|
+
"registrationNeedBasicInfo"|
|
|
4
|
+
"registrationNeedInterests"|
|
|
5
|
+
"active"|
|
|
6
|
+
"inactive";
|
|
8
7
|
|
|
9
8
|
export enum AdminAccountStatus {
|
|
10
9
|
None,
|
|
11
10
|
Active,
|
|
12
11
|
Inactive,
|
|
13
12
|
}
|
|
13
|
+
|
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,
|