wenum 1.91.1 → 1.92.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/dist/index.d.mts +3 -2
- package/dist/index.d.ts +3 -2
- package/dist/index.js +17 -0
- package/dist/index.mjs +16 -0
- package/package.json +1 -1
- package/src/page/pid.ts +17 -1
- package/src/page/profile/addingEntity.ts +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -69,7 +69,7 @@ declare const ZeroGameMeta: GameMetaProps;
|
|
|
69
69
|
type LeaderboardType = "score" | "duel" | "time" | "distance" | "weight";
|
|
70
70
|
|
|
71
71
|
type AddingEntityType = "gameToLeaderboard" | "playerToDuelGame" | "playerToNonDuelGame" | "memberToCircle";
|
|
72
|
-
type EntityType = "
|
|
72
|
+
type EntityType = "leaderboard" | "team" | "collection" | "uoi";
|
|
73
73
|
|
|
74
74
|
type PlayerType = 'uoi' | 'team' | 'collection';
|
|
75
75
|
|
|
@@ -81,6 +81,7 @@ type PIDPrefixType = 'usr' | 'uoi' | 'tms' | 'arn' | 'evt' | 'col' | 'lbd' | 'gm
|
|
|
81
81
|
declare const PID_LENGTH = 9;
|
|
82
82
|
declare const PID_PREFIX_LENGTH = 3;
|
|
83
83
|
declare function getProfileTypeByPID(pid: string): ProfileType;
|
|
84
|
+
declare function getEntityTypeByPID(pid: string): EntityType | undefined;
|
|
84
85
|
declare const getPIDPrefixByProfileType: (profileType: ProfileType) => PIDPrefixType;
|
|
85
86
|
declare function isTeamPID(pid: string): boolean;
|
|
86
87
|
declare function isUoiPID(pid: string): boolean;
|
|
@@ -271,4 +272,4 @@ type AvatarR2Folder = 'collection' | 'game' | 'user' | 'team' | 'leaderboard' |
|
|
|
271
272
|
declare function getAvatarR2FolderByProfileType(profileType: ProfileType): AvatarR2Folder;
|
|
272
273
|
declare function getAvatarR2CdnUrl(folder: AvatarR2Folder, pageID: string, imageID: string, size: ImageSize): string;
|
|
273
274
|
|
|
274
|
-
export { ALL_CARDGAMES_INTERESTS, ALL_INTEREST_CATEGORIES, ALL_LEISURE_INTERESTS, ALL_MUSIC_INTERESTS, ALL_PETS_INTERESTS, ALL_SPORTS_INTERESTS, ALL_TRAVEL_INTERESTS, type AccountStatus, type AddingEntityType, AdminAccountStatus, AttachmentType, AttendanceStatus, type AvatarR2Folder, BasketballPosition, type BroadcastType, type BuddyingStatus, COLLECTION_ATTRIBUTE_LABEL, COLLECTION_PETS_ATTRIBUTE_LABEL, COMMON_ATTRIBUTE_LABEL, type CardGamesInterestType, type CategoryType, ChallengeStatus, type CollectionAttributeType, type CollectionMetaProps, type CollectionMetaStatus, type CollectionOwnerStatus, type CollectionPetsAttributeType, type CollectionPrivacy, type CollectionStatus, type CollectionType, type CommonAttributeType, type CommonMarketType, type DuelGameResultType, type EntityType, type EventsNearbyProps, FollowingStatus, type GameMetaProps, type GameType, type GamesByTypeNearbyProps, type GamesNearbyProps, type Gender, type Handedness, INTERESTS_BY_CATEGORY, type ImageSize, type InterestNearbyProps, type InterestType, type LeaderboardType, type LeaderboardsByGameTypeNearbyProps, type LeisureInterestType, type LengthUnit, type LocationType, type MarketMetaProps, type MarketMetaStatus, type MarketType, type MarketsByTypeNearbyProps, type MemberingStatus, type MusicInterestType, type NearbyProps, type NotificationType, type PIDPrefixType, PID_LENGTH, PID_PREFIX_LENGTH, type PageR2Folder, type PageType, type PetsInterestType, type PlayerType, type PostPrivacy, type ProfilePermission, type ProfilePrivacy, type ProfileStatus, type ProfileType, ReactionType, type SocialMediaType, type SportsInterestType, type SubjectR2Folder, type SubjectType, type TennisBackhand, type TennisLevel, type TravelInterestType, UOI_ATTRIBUTE_LABEL, UOI_SPORTS_ATTRIBUTE_LABEL, UOI_SPORTS_BASKETBALL_ATTRIBUTE_LABEL, UOI_SPORTS_TENNIS_ATTRIBUTE_LABEL, type UoiAttributeType, type UoiSportsAttributeType, type UoiSportsBasketballAttributeType, type UoiSportsTennisAttributeType, type UserPronoun, type WeightUnit, ZeroCollectionMeta, ZeroGameMeta, ZeroMarketOption, getAvatarR2CdnUrl, getAvatarR2FolderByProfileType, getCollectionAttributeLabel, getCommonAttributeLabel, getNearbyIndex, getPIDPrefixByProfileType, getPageR2CdnUrl, getProfileTypeByPID, getSubjectR2CdnUrl, getUoiAttributeLabel, isGamePID, isLeaderboardPID, isTeamPID, isUoiPID };
|
|
275
|
+
export { ALL_CARDGAMES_INTERESTS, ALL_INTEREST_CATEGORIES, ALL_LEISURE_INTERESTS, ALL_MUSIC_INTERESTS, ALL_PETS_INTERESTS, ALL_SPORTS_INTERESTS, ALL_TRAVEL_INTERESTS, type AccountStatus, type AddingEntityType, AdminAccountStatus, AttachmentType, AttendanceStatus, type AvatarR2Folder, BasketballPosition, type BroadcastType, type BuddyingStatus, COLLECTION_ATTRIBUTE_LABEL, COLLECTION_PETS_ATTRIBUTE_LABEL, COMMON_ATTRIBUTE_LABEL, type CardGamesInterestType, type CategoryType, ChallengeStatus, type CollectionAttributeType, type CollectionMetaProps, type CollectionMetaStatus, type CollectionOwnerStatus, type CollectionPetsAttributeType, type CollectionPrivacy, type CollectionStatus, type CollectionType, type CommonAttributeType, type CommonMarketType, type DuelGameResultType, type EntityType, type EventsNearbyProps, FollowingStatus, type GameMetaProps, type GameType, type GamesByTypeNearbyProps, type GamesNearbyProps, type Gender, type Handedness, INTERESTS_BY_CATEGORY, type ImageSize, type InterestNearbyProps, type InterestType, type LeaderboardType, type LeaderboardsByGameTypeNearbyProps, type LeisureInterestType, type LengthUnit, type LocationType, type MarketMetaProps, type MarketMetaStatus, type MarketType, type MarketsByTypeNearbyProps, type MemberingStatus, type MusicInterestType, type NearbyProps, type NotificationType, type PIDPrefixType, PID_LENGTH, PID_PREFIX_LENGTH, type PageR2Folder, type PageType, type PetsInterestType, type PlayerType, type PostPrivacy, type ProfilePermission, type ProfilePrivacy, type ProfileStatus, type ProfileType, ReactionType, type SocialMediaType, type SportsInterestType, type SubjectR2Folder, type SubjectType, type TennisBackhand, type TennisLevel, type TravelInterestType, UOI_ATTRIBUTE_LABEL, UOI_SPORTS_ATTRIBUTE_LABEL, UOI_SPORTS_BASKETBALL_ATTRIBUTE_LABEL, UOI_SPORTS_TENNIS_ATTRIBUTE_LABEL, type UoiAttributeType, type UoiSportsAttributeType, type UoiSportsBasketballAttributeType, type UoiSportsTennisAttributeType, type UserPronoun, type WeightUnit, ZeroCollectionMeta, ZeroGameMeta, ZeroMarketOption, getAvatarR2CdnUrl, getAvatarR2FolderByProfileType, getCollectionAttributeLabel, getCommonAttributeLabel, getEntityTypeByPID, getNearbyIndex, getPIDPrefixByProfileType, getPageR2CdnUrl, getProfileTypeByPID, getSubjectR2CdnUrl, getUoiAttributeLabel, isGamePID, isLeaderboardPID, isTeamPID, isUoiPID };
|
package/dist/index.d.ts
CHANGED
|
@@ -69,7 +69,7 @@ declare const ZeroGameMeta: GameMetaProps;
|
|
|
69
69
|
type LeaderboardType = "score" | "duel" | "time" | "distance" | "weight";
|
|
70
70
|
|
|
71
71
|
type AddingEntityType = "gameToLeaderboard" | "playerToDuelGame" | "playerToNonDuelGame" | "memberToCircle";
|
|
72
|
-
type EntityType = "
|
|
72
|
+
type EntityType = "leaderboard" | "team" | "collection" | "uoi";
|
|
73
73
|
|
|
74
74
|
type PlayerType = 'uoi' | 'team' | 'collection';
|
|
75
75
|
|
|
@@ -81,6 +81,7 @@ type PIDPrefixType = 'usr' | 'uoi' | 'tms' | 'arn' | 'evt' | 'col' | 'lbd' | 'gm
|
|
|
81
81
|
declare const PID_LENGTH = 9;
|
|
82
82
|
declare const PID_PREFIX_LENGTH = 3;
|
|
83
83
|
declare function getProfileTypeByPID(pid: string): ProfileType;
|
|
84
|
+
declare function getEntityTypeByPID(pid: string): EntityType | undefined;
|
|
84
85
|
declare const getPIDPrefixByProfileType: (profileType: ProfileType) => PIDPrefixType;
|
|
85
86
|
declare function isTeamPID(pid: string): boolean;
|
|
86
87
|
declare function isUoiPID(pid: string): boolean;
|
|
@@ -271,4 +272,4 @@ type AvatarR2Folder = 'collection' | 'game' | 'user' | 'team' | 'leaderboard' |
|
|
|
271
272
|
declare function getAvatarR2FolderByProfileType(profileType: ProfileType): AvatarR2Folder;
|
|
272
273
|
declare function getAvatarR2CdnUrl(folder: AvatarR2Folder, pageID: string, imageID: string, size: ImageSize): string;
|
|
273
274
|
|
|
274
|
-
export { ALL_CARDGAMES_INTERESTS, ALL_INTEREST_CATEGORIES, ALL_LEISURE_INTERESTS, ALL_MUSIC_INTERESTS, ALL_PETS_INTERESTS, ALL_SPORTS_INTERESTS, ALL_TRAVEL_INTERESTS, type AccountStatus, type AddingEntityType, AdminAccountStatus, AttachmentType, AttendanceStatus, type AvatarR2Folder, BasketballPosition, type BroadcastType, type BuddyingStatus, COLLECTION_ATTRIBUTE_LABEL, COLLECTION_PETS_ATTRIBUTE_LABEL, COMMON_ATTRIBUTE_LABEL, type CardGamesInterestType, type CategoryType, ChallengeStatus, type CollectionAttributeType, type CollectionMetaProps, type CollectionMetaStatus, type CollectionOwnerStatus, type CollectionPetsAttributeType, type CollectionPrivacy, type CollectionStatus, type CollectionType, type CommonAttributeType, type CommonMarketType, type DuelGameResultType, type EntityType, type EventsNearbyProps, FollowingStatus, type GameMetaProps, type GameType, type GamesByTypeNearbyProps, type GamesNearbyProps, type Gender, type Handedness, INTERESTS_BY_CATEGORY, type ImageSize, type InterestNearbyProps, type InterestType, type LeaderboardType, type LeaderboardsByGameTypeNearbyProps, type LeisureInterestType, type LengthUnit, type LocationType, type MarketMetaProps, type MarketMetaStatus, type MarketType, type MarketsByTypeNearbyProps, type MemberingStatus, type MusicInterestType, type NearbyProps, type NotificationType, type PIDPrefixType, PID_LENGTH, PID_PREFIX_LENGTH, type PageR2Folder, type PageType, type PetsInterestType, type PlayerType, type PostPrivacy, type ProfilePermission, type ProfilePrivacy, type ProfileStatus, type ProfileType, ReactionType, type SocialMediaType, type SportsInterestType, type SubjectR2Folder, type SubjectType, type TennisBackhand, type TennisLevel, type TravelInterestType, UOI_ATTRIBUTE_LABEL, UOI_SPORTS_ATTRIBUTE_LABEL, UOI_SPORTS_BASKETBALL_ATTRIBUTE_LABEL, UOI_SPORTS_TENNIS_ATTRIBUTE_LABEL, type UoiAttributeType, type UoiSportsAttributeType, type UoiSportsBasketballAttributeType, type UoiSportsTennisAttributeType, type UserPronoun, type WeightUnit, ZeroCollectionMeta, ZeroGameMeta, ZeroMarketOption, getAvatarR2CdnUrl, getAvatarR2FolderByProfileType, getCollectionAttributeLabel, getCommonAttributeLabel, getNearbyIndex, getPIDPrefixByProfileType, getPageR2CdnUrl, getProfileTypeByPID, getSubjectR2CdnUrl, getUoiAttributeLabel, isGamePID, isLeaderboardPID, isTeamPID, isUoiPID };
|
|
275
|
+
export { ALL_CARDGAMES_INTERESTS, ALL_INTEREST_CATEGORIES, ALL_LEISURE_INTERESTS, ALL_MUSIC_INTERESTS, ALL_PETS_INTERESTS, ALL_SPORTS_INTERESTS, ALL_TRAVEL_INTERESTS, type AccountStatus, type AddingEntityType, AdminAccountStatus, AttachmentType, AttendanceStatus, type AvatarR2Folder, BasketballPosition, type BroadcastType, type BuddyingStatus, COLLECTION_ATTRIBUTE_LABEL, COLLECTION_PETS_ATTRIBUTE_LABEL, COMMON_ATTRIBUTE_LABEL, type CardGamesInterestType, type CategoryType, ChallengeStatus, type CollectionAttributeType, type CollectionMetaProps, type CollectionMetaStatus, type CollectionOwnerStatus, type CollectionPetsAttributeType, type CollectionPrivacy, type CollectionStatus, type CollectionType, type CommonAttributeType, type CommonMarketType, type DuelGameResultType, type EntityType, type EventsNearbyProps, FollowingStatus, type GameMetaProps, type GameType, type GamesByTypeNearbyProps, type GamesNearbyProps, type Gender, type Handedness, INTERESTS_BY_CATEGORY, type ImageSize, type InterestNearbyProps, type InterestType, type LeaderboardType, type LeaderboardsByGameTypeNearbyProps, type LeisureInterestType, type LengthUnit, type LocationType, type MarketMetaProps, type MarketMetaStatus, type MarketType, type MarketsByTypeNearbyProps, type MemberingStatus, type MusicInterestType, type NearbyProps, type NotificationType, type PIDPrefixType, PID_LENGTH, PID_PREFIX_LENGTH, type PageR2Folder, type PageType, type PetsInterestType, type PlayerType, type PostPrivacy, type ProfilePermission, type ProfilePrivacy, type ProfileStatus, type ProfileType, ReactionType, type SocialMediaType, type SportsInterestType, type SubjectR2Folder, type SubjectType, type TennisBackhand, type TennisLevel, type TravelInterestType, UOI_ATTRIBUTE_LABEL, UOI_SPORTS_ATTRIBUTE_LABEL, UOI_SPORTS_BASKETBALL_ATTRIBUTE_LABEL, UOI_SPORTS_TENNIS_ATTRIBUTE_LABEL, type UoiAttributeType, type UoiSportsAttributeType, type UoiSportsBasketballAttributeType, type UoiSportsTennisAttributeType, type UserPronoun, type WeightUnit, ZeroCollectionMeta, ZeroGameMeta, ZeroMarketOption, getAvatarR2CdnUrl, getAvatarR2FolderByProfileType, getCollectionAttributeLabel, getCommonAttributeLabel, getEntityTypeByPID, getNearbyIndex, getPIDPrefixByProfileType, getPageR2CdnUrl, getProfileTypeByPID, getSubjectR2CdnUrl, getUoiAttributeLabel, isGamePID, isLeaderboardPID, isTeamPID, isUoiPID };
|
package/dist/index.js
CHANGED
|
@@ -51,6 +51,7 @@ __export(index_exports, {
|
|
|
51
51
|
getAvatarR2FolderByProfileType: () => getAvatarR2FolderByProfileType,
|
|
52
52
|
getCollectionAttributeLabel: () => getCollectionAttributeLabel,
|
|
53
53
|
getCommonAttributeLabel: () => getCommonAttributeLabel,
|
|
54
|
+
getEntityTypeByPID: () => getEntityTypeByPID,
|
|
54
55
|
getNearbyIndex: () => getNearbyIndex,
|
|
55
56
|
getPIDPrefixByProfileType: () => getPIDPrefixByProfileType,
|
|
56
57
|
getPageR2CdnUrl: () => getPageR2CdnUrl,
|
|
@@ -136,6 +137,21 @@ function getProfileTypeByPID(pid) {
|
|
|
136
137
|
return "none";
|
|
137
138
|
}
|
|
138
139
|
}
|
|
140
|
+
function getEntityTypeByPID(pid) {
|
|
141
|
+
const prefix = getPIDPrefix(pid);
|
|
142
|
+
switch (prefix) {
|
|
143
|
+
case "lbd":
|
|
144
|
+
return "leaderboard";
|
|
145
|
+
case "tms":
|
|
146
|
+
return "team";
|
|
147
|
+
case "col":
|
|
148
|
+
return "collection";
|
|
149
|
+
case "uoi":
|
|
150
|
+
return "uoi";
|
|
151
|
+
default:
|
|
152
|
+
return void 0;
|
|
153
|
+
}
|
|
154
|
+
}
|
|
139
155
|
var getPIDPrefixByProfileType = (profileType) => {
|
|
140
156
|
switch (profileType) {
|
|
141
157
|
case "user":
|
|
@@ -488,6 +504,7 @@ function getAvatarR2CdnUrl(folder, pageID, imageID, size) {
|
|
|
488
504
|
getAvatarR2FolderByProfileType,
|
|
489
505
|
getCollectionAttributeLabel,
|
|
490
506
|
getCommonAttributeLabel,
|
|
507
|
+
getEntityTypeByPID,
|
|
491
508
|
getNearbyIndex,
|
|
492
509
|
getPIDPrefixByProfileType,
|
|
493
510
|
getPageR2CdnUrl,
|
package/dist/index.mjs
CHANGED
|
@@ -70,6 +70,21 @@ function getProfileTypeByPID(pid) {
|
|
|
70
70
|
return "none";
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
|
+
function getEntityTypeByPID(pid) {
|
|
74
|
+
const prefix = getPIDPrefix(pid);
|
|
75
|
+
switch (prefix) {
|
|
76
|
+
case "lbd":
|
|
77
|
+
return "leaderboard";
|
|
78
|
+
case "tms":
|
|
79
|
+
return "team";
|
|
80
|
+
case "col":
|
|
81
|
+
return "collection";
|
|
82
|
+
case "uoi":
|
|
83
|
+
return "uoi";
|
|
84
|
+
default:
|
|
85
|
+
return void 0;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
73
88
|
var getPIDPrefixByProfileType = (profileType) => {
|
|
74
89
|
switch (profileType) {
|
|
75
90
|
case "user":
|
|
@@ -421,6 +436,7 @@ export {
|
|
|
421
436
|
getAvatarR2FolderByProfileType,
|
|
422
437
|
getCollectionAttributeLabel,
|
|
423
438
|
getCommonAttributeLabel,
|
|
439
|
+
getEntityTypeByPID,
|
|
424
440
|
getNearbyIndex,
|
|
425
441
|
getPIDPrefixByProfileType,
|
|
426
442
|
getPageR2CdnUrl,
|
package/package.json
CHANGED
package/src/page/pid.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ProfileType } from './profile';
|
|
1
|
+
import { ProfileType, EntityType } from './profile';
|
|
2
2
|
|
|
3
3
|
export type PIDPrefixType =
|
|
4
4
|
'usr' | 'uoi' | 'tms' | 'arn' | 'evt' | 'col' | 'lbd' | 'gme' | 'mkt' | 'org'
|
|
@@ -51,6 +51,22 @@ export function getProfileTypeByPID(pid: string): ProfileType {
|
|
|
51
51
|
}
|
|
52
52
|
}
|
|
53
53
|
|
|
54
|
+
export function getEntityTypeByPID(pid: string): EntityType | undefined {
|
|
55
|
+
const prefix = getPIDPrefix(pid);
|
|
56
|
+
switch (prefix) {
|
|
57
|
+
case 'lbd':
|
|
58
|
+
return 'leaderboard';
|
|
59
|
+
case 'tms':
|
|
60
|
+
return 'team';
|
|
61
|
+
case 'col':
|
|
62
|
+
return 'collection';
|
|
63
|
+
case 'uoi':
|
|
64
|
+
return 'uoi';
|
|
65
|
+
default:
|
|
66
|
+
return undefined;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
54
70
|
export const getPIDPrefixByProfileType = (profileType: ProfileType): PIDPrefixType => {
|
|
55
71
|
switch (profileType) {
|
|
56
72
|
case 'user':
|