wenum 1.64.0 → 1.67.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 +45 -40
- package/dist/index.d.ts +45 -40
- package/dist/index.js +64 -47
- package/dist/index.mjs +54 -38
- package/package.json +1 -1
- package/src/meta/collection/index.ts +1 -0
- package/src/meta/collection/label.ts +3 -3
- package/src/meta/collection/pets/label.ts +2 -2
- package/src/meta/collection/pets/type.ts +1 -1
- package/src/meta/collection/type.ts +2 -2
- package/src/meta/collection/util.ts +22 -0
- package/src/meta/common/index.ts +1 -0
- package/src/meta/common/label.ts +2 -2
- package/src/meta/common/type.ts +1 -1
- package/src/meta/common/util.ts +10 -0
- package/src/meta/index.ts +0 -3
- package/src/meta/uoi/index.ts +1 -0
- package/src/meta/uoi/label.ts +3 -3
- package/src/meta/uoi/sports/basketball/label.ts +3 -3
- package/src/meta/uoi/sports/basketball/type.ts +1 -1
- package/src/meta/uoi/sports/label.ts +5 -5
- package/src/meta/uoi/sports/tennis/label.ts +3 -3
- package/src/meta/uoi/sports/tennis/type.ts +1 -1
- package/src/meta/uoi/sports/type.ts +5 -5
- package/src/meta/uoi/type.ts +2 -2
- package/src/meta/uoi/util.ts +22 -0
- package/src/page/index.ts +2 -1
- package/src/page/page.ts +2 -1
- package/src/page/pid.ts +6 -6
- package/src/page/profile/index.ts +0 -1
- package/src/page/profile/profile.ts +1 -1
- package/src/meta/label.ts +0 -11
- package/src/meta/type.ts +0 -9
- package/src/meta/util.ts +0 -25
- /package/src/page/{profile/collection → collection}/index.ts +0 -0
- /package/src/page/{profile/collection → collection}/status.ts +0 -0
- /package/src/page/{profile/collection → collection}/type/index.ts +0 -0
- /package/src/page/{profile/collection → collection}/type/pets/cat.ts +0 -0
- /package/src/page/{profile/collection → collection}/type/pets/dog.ts +0 -0
- /package/src/page/{profile/collection → collection}/type/pets/index.ts +0 -0
- /package/src/page/{profile/collection → collection}/type/sports/index.ts +0 -0
- /package/src/page/{profile/collection → collection}/type/sports/tennis.ts +0 -0
- /package/src/page/{profile/collection → collection}/type/util.ts +0 -0
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
type PageType = "none" | "profile" | "post" | "loi" | "location";
|
|
1
|
+
type PageType = "none" | "profile" | "post" | "loi" | "location" | "collection";
|
|
2
2
|
|
|
3
|
-
type ProfileType = "none" | "user" | "uoi" | "market" | "arena" | "
|
|
3
|
+
type ProfileType = "none" | "user" | "uoi" | "market" | "arena" | "organization" | "event" | "team" | "leaderboard" | "game";
|
|
4
4
|
type ProfilePrivacy = "public" | "private" | "internal";
|
|
5
5
|
type ProfilePermission = "none" | "admin" | "connected" | "following" | "blocked";
|
|
6
6
|
type ProfileStatus = "none" | "active" | "inactive";
|
|
@@ -25,22 +25,6 @@ type MarketTypeSports = MarketTypeTennis;
|
|
|
25
25
|
type CommonMarketType = "0_shop" | "1_repair" | "2_rental" | "3_exchange" | "4_giveaway" | "5_lost" | "6_found" | "other";
|
|
26
26
|
type MarketType = CommonMarketType | MarketTypePets | MarketTypeSports;
|
|
27
27
|
|
|
28
|
-
type CollectionMetaStatus = "inactive" | "active" | "none";
|
|
29
|
-
|
|
30
|
-
type CollectionTypeOther = 'zzzother';
|
|
31
|
-
|
|
32
|
-
type CollectionTypeCat = '0cat' | 'bed' | 'cage' | 'carrier' | 'clothing' | 'food' | CollectionTypeOther;
|
|
33
|
-
|
|
34
|
-
type CollectionTypeDog = '0dog' | 'bed' | 'cage' | 'carrier' | 'clothing' | 'collar' | 'food' | 'house' | 'leash' | CollectionTypeOther;
|
|
35
|
-
|
|
36
|
-
type CollectionTypePets = CollectionTypeCat | CollectionTypeDog;
|
|
37
|
-
|
|
38
|
-
type CollectionTypeTennis = '0racket' | 'ball' | 'ballmachine' | 'shoes' | 'overgrip' | 'tennisstring' | CollectionTypeOther;
|
|
39
|
-
|
|
40
|
-
type CollectionTypeSports = CollectionTypeTennis;
|
|
41
|
-
|
|
42
|
-
type CollectionType = CollectionTypePets | CollectionTypeSports;
|
|
43
|
-
|
|
44
28
|
type UserPronoun = "none" | "he" | "she";
|
|
45
29
|
|
|
46
30
|
declare enum AttendanceStatus {
|
|
@@ -86,7 +70,7 @@ type PostPrivacy = "public" | "private" | "parent" | "internal";
|
|
|
86
70
|
|
|
87
71
|
type LocationType = "none" | "point" | "street" | "city";
|
|
88
72
|
|
|
89
|
-
type PIDPrefixType = 'usr' | 'uoi' | 'tms' | 'arn' | 'evt' | 'col' | 'lbd' | 'gme' | 'mkt' | 'lcp' | 'lcs' | 'lcc' | 'lip' | 'lis' | 'lic' | '
|
|
73
|
+
type PIDPrefixType = 'usr' | 'uoi' | 'tms' | 'arn' | 'evt' | 'col' | 'lbd' | 'gme' | 'mkt' | 'org' | 'lcp' | 'lcs' | 'lcc' | 'lip' | 'lis' | 'lic' | 'txt' | 'img' | 'pol' | 'vid' | '';
|
|
90
74
|
declare const PID_LENGTH = 9;
|
|
91
75
|
declare const PID_PREFIX_LENGTH = 3;
|
|
92
76
|
declare function getProfileTypeByPID(pid: string): ProfileType;
|
|
@@ -98,6 +82,22 @@ declare function isLeaderboardPID(pid: string): boolean;
|
|
|
98
82
|
|
|
99
83
|
type BroadcastType = 'info' | 'warn' | 'alert';
|
|
100
84
|
|
|
85
|
+
type CollectionMetaStatus = "inactive" | "active" | "none";
|
|
86
|
+
|
|
87
|
+
type CollectionTypeOther = 'zzzother';
|
|
88
|
+
|
|
89
|
+
type CollectionTypeCat = '0cat' | 'bed' | 'cage' | 'carrier' | 'clothing' | 'food' | CollectionTypeOther;
|
|
90
|
+
|
|
91
|
+
type CollectionTypeDog = '0dog' | 'bed' | 'cage' | 'carrier' | 'clothing' | 'collar' | 'food' | 'house' | 'leash' | CollectionTypeOther;
|
|
92
|
+
|
|
93
|
+
type CollectionTypePets = CollectionTypeCat | CollectionTypeDog;
|
|
94
|
+
|
|
95
|
+
type CollectionTypeTennis = '0racket' | 'ball' | 'ballmachine' | 'shoes' | 'overgrip' | 'tennisstring' | CollectionTypeOther;
|
|
96
|
+
|
|
97
|
+
type CollectionTypeSports = CollectionTypeTennis;
|
|
98
|
+
|
|
99
|
+
type CollectionType = CollectionTypePets | CollectionTypeSports;
|
|
100
|
+
|
|
101
101
|
type AccountStatus = "none" | "registrationNeedBasicInfo" | "registrationNeedInterests" | "active" | "inactive";
|
|
102
102
|
declare enum AdminAccountStatus {
|
|
103
103
|
None = 0,
|
|
@@ -152,43 +152,48 @@ type SocialMediaType = "none" | "facebook" | "linkedIn" | "instagram";
|
|
|
152
152
|
|
|
153
153
|
type NotificationType = "addBuddy" | "acceptBuddy" | "uoiJoinCircle" | "acceptUoiJoinCircle" | "inviteUoiToCircle" | "acceptInviteUoiToCircle" | "teamJoinCircle" | "acceptTeamJoinCircle" | "inviteTeamToCircle" | "acceptInviteTeamToCircle" | "addGameToLeaderboard" | "acceptAddGameToLeaderboard" | "inviteGameToLeaderboard" | "acceptInviteGameToLeaderboard" | "createPost";
|
|
154
154
|
|
|
155
|
-
type
|
|
155
|
+
type CommonAttributeType = 'handedness' | 'gender' | 'dob';
|
|
156
156
|
|
|
157
|
-
declare const
|
|
157
|
+
declare const COMMON_ATTRIBUTE_LABEL: Record<CommonAttributeType, string>;
|
|
158
158
|
|
|
159
|
-
|
|
159
|
+
declare const getCommonAttributeLabel: ({ attributeType }: {
|
|
160
|
+
attributeType: CommonAttributeType;
|
|
161
|
+
}) => string;
|
|
160
162
|
|
|
161
|
-
|
|
163
|
+
type UoiSportsTennisAttributeType = 'level' | 'backhand' | 'handedness';
|
|
162
164
|
|
|
163
|
-
|
|
165
|
+
declare const UOI_SPORTS_TENNIS_ATTRIBUTE_LABEL: Record<UoiSportsTennisAttributeType, string>;
|
|
164
166
|
|
|
165
|
-
|
|
167
|
+
type UoiSportsBasketballAttributeType = 'positions';
|
|
166
168
|
|
|
167
|
-
declare const
|
|
169
|
+
declare const UOI_SPORTS_BASKETBALL_ATTRIBUTE_LABEL: Record<UoiSportsBasketballAttributeType, string>;
|
|
168
170
|
|
|
169
|
-
|
|
171
|
+
declare const UOI_SPORTS_ATTRIBUTE_LABEL: Partial<Record<SportsInterestType, any>>;
|
|
170
172
|
|
|
171
|
-
|
|
173
|
+
type UoiSportsAttributeType = UoiSportsTennisAttributeType | UoiSportsBasketballAttributeType;
|
|
172
174
|
|
|
173
|
-
|
|
175
|
+
declare const UOI_ATTRIBUTE_LABEL: Partial<Record<CategoryType, any>>;
|
|
174
176
|
|
|
175
|
-
type
|
|
177
|
+
type UoiAttributeType = UoiSportsAttributeType;
|
|
176
178
|
|
|
177
|
-
declare const
|
|
179
|
+
declare const getUoiAttributeLabel: ({ categoryType, interestType, attributeType }: {
|
|
180
|
+
categoryType: CategoryType;
|
|
181
|
+
interestType?: InterestType;
|
|
182
|
+
attributeType: UoiAttributeType;
|
|
183
|
+
}) => any;
|
|
178
184
|
|
|
179
|
-
type
|
|
185
|
+
type CollectionPetsAttributeType = 'dob' | 'breed' | 'father' | 'mother' | 'gender' | 'height' | 'weight' | 'children';
|
|
180
186
|
|
|
181
|
-
declare const
|
|
187
|
+
declare const COLLECTION_PETS_ATTRIBUTE_LABEL: Record<CollectionPetsAttributeType, string>;
|
|
182
188
|
|
|
183
|
-
|
|
189
|
+
type CollectionAttributeType = CollectionPetsAttributeType;
|
|
184
190
|
|
|
185
|
-
|
|
191
|
+
declare const COLLECTION_ATTRIBUTE_LABEL: Partial<Record<CategoryType, any>>;
|
|
186
192
|
|
|
187
|
-
declare const
|
|
188
|
-
|
|
189
|
-
categoryType?: CategoryType;
|
|
193
|
+
declare const getCollectionAttributeLabel: ({ categoryType, interestType, attributeType }: {
|
|
194
|
+
categoryType: CategoryType;
|
|
190
195
|
interestType?: InterestType;
|
|
191
|
-
attributeType:
|
|
196
|
+
attributeType: CollectionAttributeType;
|
|
192
197
|
}) => any;
|
|
193
198
|
|
|
194
|
-
export {
|
|
199
|
+
export { type AccountStatus, AdminAccountStatus, AttendanceStatus, AvatarType, BasketballPosition, type BroadcastType, type BuddyingStatus, COLLECTION_ATTRIBUTE_LABEL, COLLECTION_PETS_ATTRIBUTE_LABEL, COMMON_ATTRIBUTE_LABEL, type CardGamesInterestType, type CategoryType, ChallengeStatus, type CollectionAttributeType, type CollectionMetaStatus, type CollectionPetsAttributeType, type CollectionType, type CommonAttributeType, type CommonMarketType, type DuelGameResultType, FollowingStatus, type GameType, type Gender, type Handedness, type InterestType, type LeaderboardType, type LengthUnit, type LocationType, type MarketMetaStatus, type MarketType, type MemberingStatus, type MusicInterestType, type NotificationType, type PIDPrefixType, PID_LENGTH, PID_PREFIX_LENGTH, type PageType, type PetsInterestType, type PlayerType, type PostPrivacy, type PostType, type ProfileJoiningType, type ProfilePermission, type ProfilePrivacy, type ProfileStatus, type ProfileType, type SocialMediaType, type SportsInterestType, type SubjectType, type TennisBackhand, type TennisLevel, 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, getCollectionAttributeLabel, getCommonAttributeLabel, getPIDPrefixByProfileType, getProfileTypeByPID, getUoiAttributeLabel, isGamePID, isLeaderboardPID, isTeamPID, isUoiPID };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
type PageType = "none" | "profile" | "post" | "loi" | "location";
|
|
1
|
+
type PageType = "none" | "profile" | "post" | "loi" | "location" | "collection";
|
|
2
2
|
|
|
3
|
-
type ProfileType = "none" | "user" | "uoi" | "market" | "arena" | "
|
|
3
|
+
type ProfileType = "none" | "user" | "uoi" | "market" | "arena" | "organization" | "event" | "team" | "leaderboard" | "game";
|
|
4
4
|
type ProfilePrivacy = "public" | "private" | "internal";
|
|
5
5
|
type ProfilePermission = "none" | "admin" | "connected" | "following" | "blocked";
|
|
6
6
|
type ProfileStatus = "none" | "active" | "inactive";
|
|
@@ -25,22 +25,6 @@ type MarketTypeSports = MarketTypeTennis;
|
|
|
25
25
|
type CommonMarketType = "0_shop" | "1_repair" | "2_rental" | "3_exchange" | "4_giveaway" | "5_lost" | "6_found" | "other";
|
|
26
26
|
type MarketType = CommonMarketType | MarketTypePets | MarketTypeSports;
|
|
27
27
|
|
|
28
|
-
type CollectionMetaStatus = "inactive" | "active" | "none";
|
|
29
|
-
|
|
30
|
-
type CollectionTypeOther = 'zzzother';
|
|
31
|
-
|
|
32
|
-
type CollectionTypeCat = '0cat' | 'bed' | 'cage' | 'carrier' | 'clothing' | 'food' | CollectionTypeOther;
|
|
33
|
-
|
|
34
|
-
type CollectionTypeDog = '0dog' | 'bed' | 'cage' | 'carrier' | 'clothing' | 'collar' | 'food' | 'house' | 'leash' | CollectionTypeOther;
|
|
35
|
-
|
|
36
|
-
type CollectionTypePets = CollectionTypeCat | CollectionTypeDog;
|
|
37
|
-
|
|
38
|
-
type CollectionTypeTennis = '0racket' | 'ball' | 'ballmachine' | 'shoes' | 'overgrip' | 'tennisstring' | CollectionTypeOther;
|
|
39
|
-
|
|
40
|
-
type CollectionTypeSports = CollectionTypeTennis;
|
|
41
|
-
|
|
42
|
-
type CollectionType = CollectionTypePets | CollectionTypeSports;
|
|
43
|
-
|
|
44
28
|
type UserPronoun = "none" | "he" | "she";
|
|
45
29
|
|
|
46
30
|
declare enum AttendanceStatus {
|
|
@@ -86,7 +70,7 @@ type PostPrivacy = "public" | "private" | "parent" | "internal";
|
|
|
86
70
|
|
|
87
71
|
type LocationType = "none" | "point" | "street" | "city";
|
|
88
72
|
|
|
89
|
-
type PIDPrefixType = 'usr' | 'uoi' | 'tms' | 'arn' | 'evt' | 'col' | 'lbd' | 'gme' | 'mkt' | 'lcp' | 'lcs' | 'lcc' | 'lip' | 'lis' | 'lic' | '
|
|
73
|
+
type PIDPrefixType = 'usr' | 'uoi' | 'tms' | 'arn' | 'evt' | 'col' | 'lbd' | 'gme' | 'mkt' | 'org' | 'lcp' | 'lcs' | 'lcc' | 'lip' | 'lis' | 'lic' | 'txt' | 'img' | 'pol' | 'vid' | '';
|
|
90
74
|
declare const PID_LENGTH = 9;
|
|
91
75
|
declare const PID_PREFIX_LENGTH = 3;
|
|
92
76
|
declare function getProfileTypeByPID(pid: string): ProfileType;
|
|
@@ -98,6 +82,22 @@ declare function isLeaderboardPID(pid: string): boolean;
|
|
|
98
82
|
|
|
99
83
|
type BroadcastType = 'info' | 'warn' | 'alert';
|
|
100
84
|
|
|
85
|
+
type CollectionMetaStatus = "inactive" | "active" | "none";
|
|
86
|
+
|
|
87
|
+
type CollectionTypeOther = 'zzzother';
|
|
88
|
+
|
|
89
|
+
type CollectionTypeCat = '0cat' | 'bed' | 'cage' | 'carrier' | 'clothing' | 'food' | CollectionTypeOther;
|
|
90
|
+
|
|
91
|
+
type CollectionTypeDog = '0dog' | 'bed' | 'cage' | 'carrier' | 'clothing' | 'collar' | 'food' | 'house' | 'leash' | CollectionTypeOther;
|
|
92
|
+
|
|
93
|
+
type CollectionTypePets = CollectionTypeCat | CollectionTypeDog;
|
|
94
|
+
|
|
95
|
+
type CollectionTypeTennis = '0racket' | 'ball' | 'ballmachine' | 'shoes' | 'overgrip' | 'tennisstring' | CollectionTypeOther;
|
|
96
|
+
|
|
97
|
+
type CollectionTypeSports = CollectionTypeTennis;
|
|
98
|
+
|
|
99
|
+
type CollectionType = CollectionTypePets | CollectionTypeSports;
|
|
100
|
+
|
|
101
101
|
type AccountStatus = "none" | "registrationNeedBasicInfo" | "registrationNeedInterests" | "active" | "inactive";
|
|
102
102
|
declare enum AdminAccountStatus {
|
|
103
103
|
None = 0,
|
|
@@ -152,43 +152,48 @@ type SocialMediaType = "none" | "facebook" | "linkedIn" | "instagram";
|
|
|
152
152
|
|
|
153
153
|
type NotificationType = "addBuddy" | "acceptBuddy" | "uoiJoinCircle" | "acceptUoiJoinCircle" | "inviteUoiToCircle" | "acceptInviteUoiToCircle" | "teamJoinCircle" | "acceptTeamJoinCircle" | "inviteTeamToCircle" | "acceptInviteTeamToCircle" | "addGameToLeaderboard" | "acceptAddGameToLeaderboard" | "inviteGameToLeaderboard" | "acceptInviteGameToLeaderboard" | "createPost";
|
|
154
154
|
|
|
155
|
-
type
|
|
155
|
+
type CommonAttributeType = 'handedness' | 'gender' | 'dob';
|
|
156
156
|
|
|
157
|
-
declare const
|
|
157
|
+
declare const COMMON_ATTRIBUTE_LABEL: Record<CommonAttributeType, string>;
|
|
158
158
|
|
|
159
|
-
|
|
159
|
+
declare const getCommonAttributeLabel: ({ attributeType }: {
|
|
160
|
+
attributeType: CommonAttributeType;
|
|
161
|
+
}) => string;
|
|
160
162
|
|
|
161
|
-
|
|
163
|
+
type UoiSportsTennisAttributeType = 'level' | 'backhand' | 'handedness';
|
|
162
164
|
|
|
163
|
-
|
|
165
|
+
declare const UOI_SPORTS_TENNIS_ATTRIBUTE_LABEL: Record<UoiSportsTennisAttributeType, string>;
|
|
164
166
|
|
|
165
|
-
|
|
167
|
+
type UoiSportsBasketballAttributeType = 'positions';
|
|
166
168
|
|
|
167
|
-
declare const
|
|
169
|
+
declare const UOI_SPORTS_BASKETBALL_ATTRIBUTE_LABEL: Record<UoiSportsBasketballAttributeType, string>;
|
|
168
170
|
|
|
169
|
-
|
|
171
|
+
declare const UOI_SPORTS_ATTRIBUTE_LABEL: Partial<Record<SportsInterestType, any>>;
|
|
170
172
|
|
|
171
|
-
|
|
173
|
+
type UoiSportsAttributeType = UoiSportsTennisAttributeType | UoiSportsBasketballAttributeType;
|
|
172
174
|
|
|
173
|
-
|
|
175
|
+
declare const UOI_ATTRIBUTE_LABEL: Partial<Record<CategoryType, any>>;
|
|
174
176
|
|
|
175
|
-
type
|
|
177
|
+
type UoiAttributeType = UoiSportsAttributeType;
|
|
176
178
|
|
|
177
|
-
declare const
|
|
179
|
+
declare const getUoiAttributeLabel: ({ categoryType, interestType, attributeType }: {
|
|
180
|
+
categoryType: CategoryType;
|
|
181
|
+
interestType?: InterestType;
|
|
182
|
+
attributeType: UoiAttributeType;
|
|
183
|
+
}) => any;
|
|
178
184
|
|
|
179
|
-
type
|
|
185
|
+
type CollectionPetsAttributeType = 'dob' | 'breed' | 'father' | 'mother' | 'gender' | 'height' | 'weight' | 'children';
|
|
180
186
|
|
|
181
|
-
declare const
|
|
187
|
+
declare const COLLECTION_PETS_ATTRIBUTE_LABEL: Record<CollectionPetsAttributeType, string>;
|
|
182
188
|
|
|
183
|
-
|
|
189
|
+
type CollectionAttributeType = CollectionPetsAttributeType;
|
|
184
190
|
|
|
185
|
-
|
|
191
|
+
declare const COLLECTION_ATTRIBUTE_LABEL: Partial<Record<CategoryType, any>>;
|
|
186
192
|
|
|
187
|
-
declare const
|
|
188
|
-
|
|
189
|
-
categoryType?: CategoryType;
|
|
193
|
+
declare const getCollectionAttributeLabel: ({ categoryType, interestType, attributeType }: {
|
|
194
|
+
categoryType: CategoryType;
|
|
190
195
|
interestType?: InterestType;
|
|
191
|
-
attributeType:
|
|
196
|
+
attributeType: CollectionAttributeType;
|
|
192
197
|
}) => any;
|
|
193
198
|
|
|
194
|
-
export {
|
|
199
|
+
export { type AccountStatus, AdminAccountStatus, AttendanceStatus, AvatarType, BasketballPosition, type BroadcastType, type BuddyingStatus, COLLECTION_ATTRIBUTE_LABEL, COLLECTION_PETS_ATTRIBUTE_LABEL, COMMON_ATTRIBUTE_LABEL, type CardGamesInterestType, type CategoryType, ChallengeStatus, type CollectionAttributeType, type CollectionMetaStatus, type CollectionPetsAttributeType, type CollectionType, type CommonAttributeType, type CommonMarketType, type DuelGameResultType, FollowingStatus, type GameType, type Gender, type Handedness, type InterestType, type LeaderboardType, type LengthUnit, type LocationType, type MarketMetaStatus, type MarketType, type MemberingStatus, type MusicInterestType, type NotificationType, type PIDPrefixType, PID_LENGTH, PID_PREFIX_LENGTH, type PageType, type PetsInterestType, type PlayerType, type PostPrivacy, type PostType, type ProfileJoiningType, type ProfilePermission, type ProfilePrivacy, type ProfileStatus, type ProfileType, type SocialMediaType, type SportsInterestType, type SubjectType, type TennisBackhand, type TennisLevel, 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, getCollectionAttributeLabel, getCommonAttributeLabel, getPIDPrefixByProfileType, getProfileTypeByPID, getUoiAttributeLabel, isGamePID, isLeaderboardPID, isTeamPID, isUoiPID };
|
package/dist/index.js
CHANGED
|
@@ -20,25 +20,26 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
20
20
|
// src/index.ts
|
|
21
21
|
var index_exports = {};
|
|
22
22
|
__export(index_exports, {
|
|
23
|
-
ATTRIBUTE_LABEL: () => ATTRIBUTE_LABEL,
|
|
24
|
-
ATTRIBUTE_LABEL_COLLECTION: () => ATTRIBUTE_LABEL_COLLECTION,
|
|
25
|
-
ATTRIBUTE_LABEL_COLLECTION_PETS: () => ATTRIBUTE_LABEL_COLLECTION_PETS,
|
|
26
|
-
ATTRIBUTE_LABEL_COMMON: () => ATTRIBUTE_LABEL_COMMON,
|
|
27
|
-
ATTRIBUTE_LABEL_UOI: () => ATTRIBUTE_LABEL_UOI,
|
|
28
|
-
ATTRIBUTE_LABEL_UOI_SPORTS: () => ATTRIBUTE_LABEL_UOI_SPORTS,
|
|
29
|
-
ATTRIBUTE_LABEL_UOI_SPORTS_BASKETBALL: () => ATTRIBUTE_LABEL_UOI_SPORTS_BASKETBALL,
|
|
30
|
-
ATTRIBUTE_LABEL_UOI_SPORTS_TENNIS: () => ATTRIBUTE_LABEL_UOI_SPORTS_TENNIS,
|
|
31
23
|
AdminAccountStatus: () => AdminAccountStatus,
|
|
32
24
|
AttendanceStatus: () => AttendanceStatus,
|
|
33
25
|
AvatarType: () => AvatarType,
|
|
34
26
|
BasketballPosition: () => BasketballPosition,
|
|
27
|
+
COLLECTION_ATTRIBUTE_LABEL: () => COLLECTION_ATTRIBUTE_LABEL,
|
|
28
|
+
COLLECTION_PETS_ATTRIBUTE_LABEL: () => COLLECTION_PETS_ATTRIBUTE_LABEL,
|
|
29
|
+
COMMON_ATTRIBUTE_LABEL: () => COMMON_ATTRIBUTE_LABEL,
|
|
35
30
|
ChallengeStatus: () => ChallengeStatus,
|
|
36
31
|
FollowingStatus: () => FollowingStatus,
|
|
37
32
|
PID_LENGTH: () => PID_LENGTH,
|
|
38
33
|
PID_PREFIX_LENGTH: () => PID_PREFIX_LENGTH,
|
|
34
|
+
UOI_ATTRIBUTE_LABEL: () => UOI_ATTRIBUTE_LABEL,
|
|
35
|
+
UOI_SPORTS_ATTRIBUTE_LABEL: () => UOI_SPORTS_ATTRIBUTE_LABEL,
|
|
36
|
+
UOI_SPORTS_BASKETBALL_ATTRIBUTE_LABEL: () => UOI_SPORTS_BASKETBALL_ATTRIBUTE_LABEL,
|
|
37
|
+
UOI_SPORTS_TENNIS_ATTRIBUTE_LABEL: () => UOI_SPORTS_TENNIS_ATTRIBUTE_LABEL,
|
|
38
|
+
getCollectionAttributeLabel: () => getCollectionAttributeLabel,
|
|
39
|
+
getCommonAttributeLabel: () => getCommonAttributeLabel,
|
|
39
40
|
getPIDPrefixByProfileType: () => getPIDPrefixByProfileType,
|
|
40
|
-
getProfileAttributeLabel: () => getProfileAttributeLabel,
|
|
41
41
|
getProfileTypeByPID: () => getProfileTypeByPID,
|
|
42
|
+
getUoiAttributeLabel: () => getUoiAttributeLabel,
|
|
42
43
|
isGamePID: () => isGamePID,
|
|
43
44
|
isLeaderboardPID: () => isLeaderboardPID,
|
|
44
45
|
isTeamPID: () => isTeamPID,
|
|
@@ -103,8 +104,8 @@ function getProfileTypeByPID(pid) {
|
|
|
103
104
|
return "arena";
|
|
104
105
|
case "evt":
|
|
105
106
|
return "event";
|
|
106
|
-
case "
|
|
107
|
-
return "
|
|
107
|
+
case "org":
|
|
108
|
+
return "organization";
|
|
108
109
|
case "lbd":
|
|
109
110
|
return "leaderboard";
|
|
110
111
|
case "gme":
|
|
@@ -127,8 +128,8 @@ var getPIDPrefixByProfileType = (profileType) => {
|
|
|
127
128
|
return "arn";
|
|
128
129
|
case "event":
|
|
129
130
|
return "evt";
|
|
130
|
-
case "
|
|
131
|
-
return "
|
|
131
|
+
case "organization":
|
|
132
|
+
return "org";
|
|
132
133
|
case "leaderboard":
|
|
133
134
|
return "lbd";
|
|
134
135
|
case "game":
|
|
@@ -181,37 +182,60 @@ var BasketballPosition = /* @__PURE__ */ ((BasketballPosition2) => {
|
|
|
181
182
|
})(BasketballPosition || {});
|
|
182
183
|
|
|
183
184
|
// src/meta/common/label.ts
|
|
184
|
-
var
|
|
185
|
+
var COMMON_ATTRIBUTE_LABEL = {
|
|
185
186
|
handedness: "Handedness",
|
|
186
187
|
gender: "Gender",
|
|
187
188
|
dob: "Date of Birth"
|
|
188
189
|
};
|
|
189
190
|
|
|
191
|
+
// src/meta/common/util.ts
|
|
192
|
+
var getCommonAttributeLabel = ({
|
|
193
|
+
attributeType
|
|
194
|
+
}) => {
|
|
195
|
+
return COMMON_ATTRIBUTE_LABEL[attributeType] || "";
|
|
196
|
+
};
|
|
197
|
+
|
|
190
198
|
// src/meta/uoi/sports/tennis/label.ts
|
|
191
|
-
var
|
|
199
|
+
var UOI_SPORTS_TENNIS_ATTRIBUTE_LABEL = {
|
|
192
200
|
level: "Level",
|
|
193
201
|
backhand: "Backhand",
|
|
194
202
|
handedness: "Handedness"
|
|
195
203
|
};
|
|
196
204
|
|
|
197
205
|
// src/meta/uoi/sports/basketball/label.ts
|
|
198
|
-
var
|
|
206
|
+
var UOI_SPORTS_BASKETBALL_ATTRIBUTE_LABEL = {
|
|
199
207
|
positions: "Positions"
|
|
200
208
|
};
|
|
201
209
|
|
|
202
210
|
// src/meta/uoi/sports/label.ts
|
|
203
|
-
var
|
|
204
|
-
tennis:
|
|
205
|
-
basketball:
|
|
211
|
+
var UOI_SPORTS_ATTRIBUTE_LABEL = {
|
|
212
|
+
tennis: UOI_SPORTS_TENNIS_ATTRIBUTE_LABEL,
|
|
213
|
+
basketball: UOI_SPORTS_BASKETBALL_ATTRIBUTE_LABEL
|
|
206
214
|
};
|
|
207
215
|
|
|
208
216
|
// src/meta/uoi/label.ts
|
|
209
|
-
var
|
|
210
|
-
"1_sports":
|
|
217
|
+
var UOI_ATTRIBUTE_LABEL = {
|
|
218
|
+
"1_sports": UOI_SPORTS_ATTRIBUTE_LABEL
|
|
219
|
+
};
|
|
220
|
+
|
|
221
|
+
// src/meta/uoi/util.ts
|
|
222
|
+
var getUoiAttributeLabel = ({
|
|
223
|
+
categoryType,
|
|
224
|
+
interestType,
|
|
225
|
+
attributeType
|
|
226
|
+
}) => {
|
|
227
|
+
let labels = UOI_ATTRIBUTE_LABEL;
|
|
228
|
+
if (categoryType) {
|
|
229
|
+
labels = (labels == null ? void 0 : labels[categoryType]) || {};
|
|
230
|
+
}
|
|
231
|
+
if (interestType) {
|
|
232
|
+
labels = (labels == null ? void 0 : labels[interestType]) || {};
|
|
233
|
+
}
|
|
234
|
+
return (labels == null ? void 0 : labels[attributeType]) || "";
|
|
211
235
|
};
|
|
212
236
|
|
|
213
237
|
// src/meta/collection/pets/label.ts
|
|
214
|
-
var
|
|
238
|
+
var COLLECTION_PETS_ATTRIBUTE_LABEL = {
|
|
215
239
|
breed: "Breed",
|
|
216
240
|
father: "Father",
|
|
217
241
|
mother: "Mother",
|
|
@@ -223,54 +247,47 @@ var ATTRIBUTE_LABEL_COLLECTION_PETS = {
|
|
|
223
247
|
};
|
|
224
248
|
|
|
225
249
|
// src/meta/collection/label.ts
|
|
226
|
-
var
|
|
227
|
-
"2_pets":
|
|
228
|
-
};
|
|
229
|
-
|
|
230
|
-
// src/meta/label.ts
|
|
231
|
-
var ATTRIBUTE_LABEL = {
|
|
232
|
-
uoi: ATTRIBUTE_LABEL_UOI,
|
|
233
|
-
collection: ATTRIBUTE_LABEL_COLLECTION,
|
|
234
|
-
none: ATTRIBUTE_LABEL_COMMON
|
|
250
|
+
var COLLECTION_ATTRIBUTE_LABEL = {
|
|
251
|
+
"2_pets": COLLECTION_PETS_ATTRIBUTE_LABEL
|
|
235
252
|
};
|
|
236
253
|
|
|
237
|
-
// src/meta/util.ts
|
|
238
|
-
var
|
|
239
|
-
profileType,
|
|
254
|
+
// src/meta/collection/util.ts
|
|
255
|
+
var getCollectionAttributeLabel = ({
|
|
240
256
|
categoryType,
|
|
241
257
|
interestType,
|
|
242
258
|
attributeType
|
|
243
259
|
}) => {
|
|
244
|
-
let
|
|
260
|
+
let labels = COLLECTION_ATTRIBUTE_LABEL;
|
|
245
261
|
if (categoryType) {
|
|
246
|
-
|
|
262
|
+
labels = (labels == null ? void 0 : labels[categoryType]) || {};
|
|
247
263
|
}
|
|
248
264
|
if (interestType) {
|
|
249
|
-
|
|
265
|
+
labels = (labels == null ? void 0 : labels[interestType]) || {};
|
|
250
266
|
}
|
|
251
|
-
return (
|
|
267
|
+
return (labels == null ? void 0 : labels[attributeType]) || "";
|
|
252
268
|
};
|
|
253
269
|
// Annotate the CommonJS export names for ESM import in node:
|
|
254
270
|
0 && (module.exports = {
|
|
255
|
-
ATTRIBUTE_LABEL,
|
|
256
|
-
ATTRIBUTE_LABEL_COLLECTION,
|
|
257
|
-
ATTRIBUTE_LABEL_COLLECTION_PETS,
|
|
258
|
-
ATTRIBUTE_LABEL_COMMON,
|
|
259
|
-
ATTRIBUTE_LABEL_UOI,
|
|
260
|
-
ATTRIBUTE_LABEL_UOI_SPORTS,
|
|
261
|
-
ATTRIBUTE_LABEL_UOI_SPORTS_BASKETBALL,
|
|
262
|
-
ATTRIBUTE_LABEL_UOI_SPORTS_TENNIS,
|
|
263
271
|
AdminAccountStatus,
|
|
264
272
|
AttendanceStatus,
|
|
265
273
|
AvatarType,
|
|
266
274
|
BasketballPosition,
|
|
275
|
+
COLLECTION_ATTRIBUTE_LABEL,
|
|
276
|
+
COLLECTION_PETS_ATTRIBUTE_LABEL,
|
|
277
|
+
COMMON_ATTRIBUTE_LABEL,
|
|
267
278
|
ChallengeStatus,
|
|
268
279
|
FollowingStatus,
|
|
269
280
|
PID_LENGTH,
|
|
270
281
|
PID_PREFIX_LENGTH,
|
|
282
|
+
UOI_ATTRIBUTE_LABEL,
|
|
283
|
+
UOI_SPORTS_ATTRIBUTE_LABEL,
|
|
284
|
+
UOI_SPORTS_BASKETBALL_ATTRIBUTE_LABEL,
|
|
285
|
+
UOI_SPORTS_TENNIS_ATTRIBUTE_LABEL,
|
|
286
|
+
getCollectionAttributeLabel,
|
|
287
|
+
getCommonAttributeLabel,
|
|
271
288
|
getPIDPrefixByProfileType,
|
|
272
|
-
getProfileAttributeLabel,
|
|
273
289
|
getProfileTypeByPID,
|
|
290
|
+
getUoiAttributeLabel,
|
|
274
291
|
isGamePID,
|
|
275
292
|
isLeaderboardPID,
|
|
276
293
|
isTeamPID,
|
package/dist/index.mjs
CHANGED
|
@@ -55,8 +55,8 @@ function getProfileTypeByPID(pid) {
|
|
|
55
55
|
return "arena";
|
|
56
56
|
case "evt":
|
|
57
57
|
return "event";
|
|
58
|
-
case "
|
|
59
|
-
return "
|
|
58
|
+
case "org":
|
|
59
|
+
return "organization";
|
|
60
60
|
case "lbd":
|
|
61
61
|
return "leaderboard";
|
|
62
62
|
case "gme":
|
|
@@ -79,8 +79,8 @@ var getPIDPrefixByProfileType = (profileType) => {
|
|
|
79
79
|
return "arn";
|
|
80
80
|
case "event":
|
|
81
81
|
return "evt";
|
|
82
|
-
case "
|
|
83
|
-
return "
|
|
82
|
+
case "organization":
|
|
83
|
+
return "org";
|
|
84
84
|
case "leaderboard":
|
|
85
85
|
return "lbd";
|
|
86
86
|
case "game":
|
|
@@ -133,37 +133,60 @@ var BasketballPosition = /* @__PURE__ */ ((BasketballPosition2) => {
|
|
|
133
133
|
})(BasketballPosition || {});
|
|
134
134
|
|
|
135
135
|
// src/meta/common/label.ts
|
|
136
|
-
var
|
|
136
|
+
var COMMON_ATTRIBUTE_LABEL = {
|
|
137
137
|
handedness: "Handedness",
|
|
138
138
|
gender: "Gender",
|
|
139
139
|
dob: "Date of Birth"
|
|
140
140
|
};
|
|
141
141
|
|
|
142
|
+
// src/meta/common/util.ts
|
|
143
|
+
var getCommonAttributeLabel = ({
|
|
144
|
+
attributeType
|
|
145
|
+
}) => {
|
|
146
|
+
return COMMON_ATTRIBUTE_LABEL[attributeType] || "";
|
|
147
|
+
};
|
|
148
|
+
|
|
142
149
|
// src/meta/uoi/sports/tennis/label.ts
|
|
143
|
-
var
|
|
150
|
+
var UOI_SPORTS_TENNIS_ATTRIBUTE_LABEL = {
|
|
144
151
|
level: "Level",
|
|
145
152
|
backhand: "Backhand",
|
|
146
153
|
handedness: "Handedness"
|
|
147
154
|
};
|
|
148
155
|
|
|
149
156
|
// src/meta/uoi/sports/basketball/label.ts
|
|
150
|
-
var
|
|
157
|
+
var UOI_SPORTS_BASKETBALL_ATTRIBUTE_LABEL = {
|
|
151
158
|
positions: "Positions"
|
|
152
159
|
};
|
|
153
160
|
|
|
154
161
|
// src/meta/uoi/sports/label.ts
|
|
155
|
-
var
|
|
156
|
-
tennis:
|
|
157
|
-
basketball:
|
|
162
|
+
var UOI_SPORTS_ATTRIBUTE_LABEL = {
|
|
163
|
+
tennis: UOI_SPORTS_TENNIS_ATTRIBUTE_LABEL,
|
|
164
|
+
basketball: UOI_SPORTS_BASKETBALL_ATTRIBUTE_LABEL
|
|
158
165
|
};
|
|
159
166
|
|
|
160
167
|
// src/meta/uoi/label.ts
|
|
161
|
-
var
|
|
162
|
-
"1_sports":
|
|
168
|
+
var UOI_ATTRIBUTE_LABEL = {
|
|
169
|
+
"1_sports": UOI_SPORTS_ATTRIBUTE_LABEL
|
|
170
|
+
};
|
|
171
|
+
|
|
172
|
+
// src/meta/uoi/util.ts
|
|
173
|
+
var getUoiAttributeLabel = ({
|
|
174
|
+
categoryType,
|
|
175
|
+
interestType,
|
|
176
|
+
attributeType
|
|
177
|
+
}) => {
|
|
178
|
+
let labels = UOI_ATTRIBUTE_LABEL;
|
|
179
|
+
if (categoryType) {
|
|
180
|
+
labels = (labels == null ? void 0 : labels[categoryType]) || {};
|
|
181
|
+
}
|
|
182
|
+
if (interestType) {
|
|
183
|
+
labels = (labels == null ? void 0 : labels[interestType]) || {};
|
|
184
|
+
}
|
|
185
|
+
return (labels == null ? void 0 : labels[attributeType]) || "";
|
|
163
186
|
};
|
|
164
187
|
|
|
165
188
|
// src/meta/collection/pets/label.ts
|
|
166
|
-
var
|
|
189
|
+
var COLLECTION_PETS_ATTRIBUTE_LABEL = {
|
|
167
190
|
breed: "Breed",
|
|
168
191
|
father: "Father",
|
|
169
192
|
mother: "Mother",
|
|
@@ -175,53 +198,46 @@ var ATTRIBUTE_LABEL_COLLECTION_PETS = {
|
|
|
175
198
|
};
|
|
176
199
|
|
|
177
200
|
// src/meta/collection/label.ts
|
|
178
|
-
var
|
|
179
|
-
"2_pets":
|
|
180
|
-
};
|
|
181
|
-
|
|
182
|
-
// src/meta/label.ts
|
|
183
|
-
var ATTRIBUTE_LABEL = {
|
|
184
|
-
uoi: ATTRIBUTE_LABEL_UOI,
|
|
185
|
-
collection: ATTRIBUTE_LABEL_COLLECTION,
|
|
186
|
-
none: ATTRIBUTE_LABEL_COMMON
|
|
201
|
+
var COLLECTION_ATTRIBUTE_LABEL = {
|
|
202
|
+
"2_pets": COLLECTION_PETS_ATTRIBUTE_LABEL
|
|
187
203
|
};
|
|
188
204
|
|
|
189
|
-
// src/meta/util.ts
|
|
190
|
-
var
|
|
191
|
-
profileType,
|
|
205
|
+
// src/meta/collection/util.ts
|
|
206
|
+
var getCollectionAttributeLabel = ({
|
|
192
207
|
categoryType,
|
|
193
208
|
interestType,
|
|
194
209
|
attributeType
|
|
195
210
|
}) => {
|
|
196
|
-
let
|
|
211
|
+
let labels = COLLECTION_ATTRIBUTE_LABEL;
|
|
197
212
|
if (categoryType) {
|
|
198
|
-
|
|
213
|
+
labels = (labels == null ? void 0 : labels[categoryType]) || {};
|
|
199
214
|
}
|
|
200
215
|
if (interestType) {
|
|
201
|
-
|
|
216
|
+
labels = (labels == null ? void 0 : labels[interestType]) || {};
|
|
202
217
|
}
|
|
203
|
-
return (
|
|
218
|
+
return (labels == null ? void 0 : labels[attributeType]) || "";
|
|
204
219
|
};
|
|
205
220
|
export {
|
|
206
|
-
ATTRIBUTE_LABEL,
|
|
207
|
-
ATTRIBUTE_LABEL_COLLECTION,
|
|
208
|
-
ATTRIBUTE_LABEL_COLLECTION_PETS,
|
|
209
|
-
ATTRIBUTE_LABEL_COMMON,
|
|
210
|
-
ATTRIBUTE_LABEL_UOI,
|
|
211
|
-
ATTRIBUTE_LABEL_UOI_SPORTS,
|
|
212
|
-
ATTRIBUTE_LABEL_UOI_SPORTS_BASKETBALL,
|
|
213
|
-
ATTRIBUTE_LABEL_UOI_SPORTS_TENNIS,
|
|
214
221
|
AdminAccountStatus,
|
|
215
222
|
AttendanceStatus,
|
|
216
223
|
AvatarType,
|
|
217
224
|
BasketballPosition,
|
|
225
|
+
COLLECTION_ATTRIBUTE_LABEL,
|
|
226
|
+
COLLECTION_PETS_ATTRIBUTE_LABEL,
|
|
227
|
+
COMMON_ATTRIBUTE_LABEL,
|
|
218
228
|
ChallengeStatus,
|
|
219
229
|
FollowingStatus,
|
|
220
230
|
PID_LENGTH,
|
|
221
231
|
PID_PREFIX_LENGTH,
|
|
232
|
+
UOI_ATTRIBUTE_LABEL,
|
|
233
|
+
UOI_SPORTS_ATTRIBUTE_LABEL,
|
|
234
|
+
UOI_SPORTS_BASKETBALL_ATTRIBUTE_LABEL,
|
|
235
|
+
UOI_SPORTS_TENNIS_ATTRIBUTE_LABEL,
|
|
236
|
+
getCollectionAttributeLabel,
|
|
237
|
+
getCommonAttributeLabel,
|
|
222
238
|
getPIDPrefixByProfileType,
|
|
223
|
-
getProfileAttributeLabel,
|
|
224
239
|
getProfileTypeByPID,
|
|
240
|
+
getUoiAttributeLabel,
|
|
225
241
|
isGamePID,
|
|
226
242
|
isLeaderboardPID,
|
|
227
243
|
isTeamPID,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { CategoryType } from 'src/interest';
|
|
2
|
-
import {
|
|
2
|
+
import { COLLECTION_PETS_ATTRIBUTE_LABEL } from './pets';
|
|
3
3
|
|
|
4
|
-
export const
|
|
5
|
-
'2_pets':
|
|
4
|
+
export const COLLECTION_ATTRIBUTE_LABEL: Partial<Record<CategoryType, any>> = {
|
|
5
|
+
'2_pets': COLLECTION_PETS_ATTRIBUTE_LABEL
|
|
6
6
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CollectionPetsAttributeType } from './type';
|
|
2
2
|
|
|
3
|
-
export const
|
|
3
|
+
export const COLLECTION_PETS_ATTRIBUTE_LABEL: Record<CollectionPetsAttributeType, string> = {
|
|
4
4
|
breed: 'Breed',
|
|
5
5
|
father: 'Father',
|
|
6
6
|
mother: 'Mother',
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CollectionPetsAttributeType } from './pets';
|
|
2
2
|
|
|
3
|
-
export type
|
|
3
|
+
export type CollectionAttributeType = CollectionPetsAttributeType;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { CategoryType, InterestType } from 'src/interest';
|
|
2
|
+
import { COLLECTION_ATTRIBUTE_LABEL } from './label';
|
|
3
|
+
import { CollectionAttributeType } from './type';
|
|
4
|
+
|
|
5
|
+
export const getCollectionAttributeLabel = ({
|
|
6
|
+
categoryType,
|
|
7
|
+
interestType,
|
|
8
|
+
attributeType
|
|
9
|
+
}:{
|
|
10
|
+
categoryType: CategoryType,
|
|
11
|
+
interestType?: InterestType,
|
|
12
|
+
attributeType: CollectionAttributeType,
|
|
13
|
+
}) => {
|
|
14
|
+
let labels: any = COLLECTION_ATTRIBUTE_LABEL;
|
|
15
|
+
if (categoryType) {
|
|
16
|
+
labels = labels?.[categoryType] || {};
|
|
17
|
+
}
|
|
18
|
+
if (interestType) {
|
|
19
|
+
labels = labels?.[interestType] || {};
|
|
20
|
+
}
|
|
21
|
+
return labels?.[attributeType as any] || '';
|
|
22
|
+
};
|
package/src/meta/common/index.ts
CHANGED
package/src/meta/common/label.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CommonAttributeType } from './type';
|
|
2
2
|
|
|
3
|
-
export const
|
|
3
|
+
export const COMMON_ATTRIBUTE_LABEL: Record<CommonAttributeType, string> = {
|
|
4
4
|
handedness: 'Handedness',
|
|
5
5
|
gender: 'Gender',
|
|
6
6
|
dob: 'Date of Birth'
|
package/src/meta/common/type.ts
CHANGED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { COMMON_ATTRIBUTE_LABEL } from './label';
|
|
2
|
+
import { CommonAttributeType } from './type';
|
|
3
|
+
|
|
4
|
+
export const getCommonAttributeLabel = ({
|
|
5
|
+
attributeType
|
|
6
|
+
}:{
|
|
7
|
+
attributeType: CommonAttributeType,
|
|
8
|
+
}) => {
|
|
9
|
+
return COMMON_ATTRIBUTE_LABEL[attributeType] || '';
|
|
10
|
+
};
|
package/src/meta/index.ts
CHANGED
package/src/meta/uoi/index.ts
CHANGED
package/src/meta/uoi/label.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { CategoryType } from 'src/interest';
|
|
2
|
-
import {
|
|
2
|
+
import { UOI_SPORTS_ATTRIBUTE_LABEL } from './sports';
|
|
3
3
|
|
|
4
|
-
export const
|
|
5
|
-
'1_sports':
|
|
4
|
+
export const UOI_ATTRIBUTE_LABEL: Partial<Record<CategoryType, any>> = {
|
|
5
|
+
'1_sports': UOI_SPORTS_ATTRIBUTE_LABEL,
|
|
6
6
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { UoiSportsBasketballAttributeType } from './type';
|
|
2
2
|
|
|
3
|
-
export const
|
|
4
|
-
|
|
3
|
+
export const UOI_SPORTS_BASKETBALL_ATTRIBUTE_LABEL: Record<
|
|
4
|
+
UoiSportsBasketballAttributeType,
|
|
5
5
|
string
|
|
6
6
|
> = {
|
|
7
7
|
positions: 'Positions'
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { SportsInterestType } from 'src/interest';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { UOI_SPORTS_BASKETBALL_ATTRIBUTE_LABEL } from './basketball';
|
|
3
|
+
import { UOI_SPORTS_TENNIS_ATTRIBUTE_LABEL } from './tennis';
|
|
4
4
|
|
|
5
|
-
export const
|
|
6
|
-
tennis:
|
|
7
|
-
basketball:
|
|
5
|
+
export const UOI_SPORTS_ATTRIBUTE_LABEL: Partial<Record<SportsInterestType, any>> = {
|
|
6
|
+
tennis: UOI_SPORTS_TENNIS_ATTRIBUTE_LABEL,
|
|
7
|
+
basketball: UOI_SPORTS_BASKETBALL_ATTRIBUTE_LABEL,
|
|
8
8
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
export const
|
|
1
|
+
import { UoiSportsTennisAttributeType } from './type';
|
|
2
|
+
|
|
3
|
+
export const UOI_SPORTS_TENNIS_ATTRIBUTE_LABEL: Record<UoiSportsTennisAttributeType, string> = {
|
|
4
4
|
level: 'Level',
|
|
5
5
|
backhand: 'Backhand',
|
|
6
6
|
handedness: 'Handedness'
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { UoiSportsBasketballAttributeType } from './basketball/type';
|
|
2
|
+
import { UoiSportsTennisAttributeType } from './tennis/type';
|
|
3
3
|
|
|
4
|
-
export type
|
|
5
|
-
|
|
|
6
|
-
|
|
|
4
|
+
export type UoiSportsAttributeType =
|
|
5
|
+
| UoiSportsTennisAttributeType
|
|
6
|
+
| UoiSportsBasketballAttributeType;
|
package/src/meta/uoi/type.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { UoiSportsAttributeType } from './sports';
|
|
2
2
|
|
|
3
|
-
export type
|
|
3
|
+
export type UoiAttributeType = UoiSportsAttributeType;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { CategoryType, InterestType } from 'src/interest';
|
|
2
|
+
import { UOI_ATTRIBUTE_LABEL } from './label';
|
|
3
|
+
import { UoiAttributeType } from './type';
|
|
4
|
+
|
|
5
|
+
export const getUoiAttributeLabel = ({
|
|
6
|
+
categoryType,
|
|
7
|
+
interestType,
|
|
8
|
+
attributeType
|
|
9
|
+
}:{
|
|
10
|
+
categoryType: CategoryType,
|
|
11
|
+
interestType?: InterestType,
|
|
12
|
+
attributeType: UoiAttributeType,
|
|
13
|
+
}) => {
|
|
14
|
+
let labels: any = UOI_ATTRIBUTE_LABEL;
|
|
15
|
+
if (categoryType) {
|
|
16
|
+
labels = labels?.[categoryType] || {};
|
|
17
|
+
}
|
|
18
|
+
if (interestType) {
|
|
19
|
+
labels = labels?.[interestType] || {};
|
|
20
|
+
}
|
|
21
|
+
return labels?.[attributeType as any] || '';
|
|
22
|
+
};
|
package/src/page/index.ts
CHANGED
package/src/page/page.ts
CHANGED
package/src/page/pid.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { ProfileType } from './profile';
|
|
2
2
|
|
|
3
3
|
export type PIDPrefixType =
|
|
4
|
-
'usr' | 'uoi' | 'tms' | 'arn' | 'evt' | 'col' | 'lbd' | 'gme' | 'mkt'
|
|
4
|
+
'usr' | 'uoi' | 'tms' | 'arn' | 'evt' | 'col' | 'lbd' | 'gme' | 'mkt' | 'org'
|
|
5
5
|
| 'lcp' | 'lcs' | 'lcc'
|
|
6
6
|
| 'lip' | 'lis' | 'lic'
|
|
7
|
-
| '
|
|
7
|
+
| 'txt' | 'img' | 'pol' | 'vid'
|
|
8
8
|
| '';
|
|
9
9
|
|
|
10
10
|
export const PID_LENGTH = 9;
|
|
@@ -38,8 +38,8 @@ export function getProfileTypeByPID(pid: string): ProfileType {
|
|
|
38
38
|
return 'arena';
|
|
39
39
|
case 'evt':
|
|
40
40
|
return 'event';
|
|
41
|
-
case '
|
|
42
|
-
return '
|
|
41
|
+
case 'org':
|
|
42
|
+
return 'organization';
|
|
43
43
|
case 'lbd':
|
|
44
44
|
return 'leaderboard';
|
|
45
45
|
case 'gme':
|
|
@@ -63,8 +63,8 @@ export const getPIDPrefixByProfileType = (profileType: ProfileType): PIDPrefixTy
|
|
|
63
63
|
return 'arn';
|
|
64
64
|
case 'event':
|
|
65
65
|
return 'evt';
|
|
66
|
-
case '
|
|
67
|
-
return '
|
|
66
|
+
case 'organization':
|
|
67
|
+
return 'org';
|
|
68
68
|
case 'leaderboard':
|
|
69
69
|
return 'lbd';
|
|
70
70
|
case 'game':
|
package/src/meta/label.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { ProfileType } from 'src/page';
|
|
3
|
-
import { ATTRIBUTE_LABEL_COLLECTION } from './collection';
|
|
4
|
-
import { ATTRIBUTE_LABEL_COMMON } from './common';
|
|
5
|
-
import { ATTRIBUTE_LABEL_UOI } from './uoi';
|
|
6
|
-
|
|
7
|
-
export const ATTRIBUTE_LABEL:Partial<Record<ProfileType, any>> = {
|
|
8
|
-
uoi: ATTRIBUTE_LABEL_UOI,
|
|
9
|
-
collection: ATTRIBUTE_LABEL_COLLECTION,
|
|
10
|
-
none: ATTRIBUTE_LABEL_COMMON,
|
|
11
|
-
};
|
package/src/meta/type.ts
DELETED
package/src/meta/util.ts
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { CategoryType, InterestType } from 'src/interest';
|
|
2
|
-
import { ProfileType } from 'src/page';
|
|
3
|
-
import { ATTRIBUTE_LABEL } from './label';
|
|
4
|
-
import { AttributeType } from './type';
|
|
5
|
-
|
|
6
|
-
export const getProfileAttributeLabel = ({
|
|
7
|
-
profileType,
|
|
8
|
-
categoryType,
|
|
9
|
-
interestType,
|
|
10
|
-
attributeType
|
|
11
|
-
}:{
|
|
12
|
-
profileType: ProfileType,
|
|
13
|
-
categoryType?: CategoryType,
|
|
14
|
-
interestType?: InterestType,
|
|
15
|
-
attributeType: AttributeType,
|
|
16
|
-
}) => {
|
|
17
|
-
let titles: any = ATTRIBUTE_LABEL[profileType];
|
|
18
|
-
if (categoryType) {
|
|
19
|
-
titles = titles?.[categoryType] || {};
|
|
20
|
-
}
|
|
21
|
-
if (interestType) {
|
|
22
|
-
titles = titles?.[interestType] || {};
|
|
23
|
-
}
|
|
24
|
-
return titles?.[attributeType as any] || '';
|
|
25
|
-
};
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|