wenum 1.63.0 → 1.66.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 +44 -42
- package/dist/index.d.ts +44 -42
- package/dist/index.js +55 -47
- package/dist/index.mjs +46 -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/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/market/type/index.ts +11 -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";
|
|
@@ -22,23 +22,8 @@ type MarketTypeTennis = '0_coaching' | '1_stringing';
|
|
|
22
22
|
|
|
23
23
|
type MarketTypeSports = MarketTypeTennis;
|
|
24
24
|
|
|
25
|
-
type
|
|
26
|
-
|
|
27
|
-
type CollectionMetaStatus = "inactive" | "active" | "none";
|
|
28
|
-
|
|
29
|
-
type CollectionTypeOther = 'zzzother';
|
|
30
|
-
|
|
31
|
-
type CollectionTypeCat = '0cat' | 'bed' | 'cage' | 'carrier' | 'clothing' | 'food' | CollectionTypeOther;
|
|
32
|
-
|
|
33
|
-
type CollectionTypeDog = '0dog' | 'bed' | 'cage' | 'carrier' | 'clothing' | 'collar' | 'food' | 'house' | 'leash' | CollectionTypeOther;
|
|
34
|
-
|
|
35
|
-
type CollectionTypePets = CollectionTypeCat | CollectionTypeDog;
|
|
36
|
-
|
|
37
|
-
type CollectionTypeTennis = '0racket' | 'ball' | 'ballmachine' | 'shoes' | 'overgrip' | 'tennisstring' | CollectionTypeOther;
|
|
38
|
-
|
|
39
|
-
type CollectionTypeSports = CollectionTypeTennis;
|
|
40
|
-
|
|
41
|
-
type CollectionType = CollectionTypePets | CollectionTypeSports;
|
|
25
|
+
type CommonMarketType = "0_shop" | "1_repair" | "2_rental" | "3_exchange" | "4_giveaway" | "5_lost" | "6_found" | "other";
|
|
26
|
+
type MarketType = CommonMarketType | MarketTypePets | MarketTypeSports;
|
|
42
27
|
|
|
43
28
|
type UserPronoun = "none" | "he" | "she";
|
|
44
29
|
|
|
@@ -85,7 +70,7 @@ type PostPrivacy = "public" | "private" | "parent" | "internal";
|
|
|
85
70
|
|
|
86
71
|
type LocationType = "none" | "point" | "street" | "city";
|
|
87
72
|
|
|
88
|
-
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' | '';
|
|
89
74
|
declare const PID_LENGTH = 9;
|
|
90
75
|
declare const PID_PREFIX_LENGTH = 3;
|
|
91
76
|
declare function getProfileTypeByPID(pid: string): ProfileType;
|
|
@@ -97,6 +82,22 @@ declare function isLeaderboardPID(pid: string): boolean;
|
|
|
97
82
|
|
|
98
83
|
type BroadcastType = 'info' | 'warn' | 'alert';
|
|
99
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
|
+
|
|
100
101
|
type AccountStatus = "none" | "registrationNeedBasicInfo" | "registrationNeedInterests" | "active" | "inactive";
|
|
101
102
|
declare enum AdminAccountStatus {
|
|
102
103
|
None = 0,
|
|
@@ -151,43 +152,44 @@ type SocialMediaType = "none" | "facebook" | "linkedIn" | "instagram";
|
|
|
151
152
|
|
|
152
153
|
type NotificationType = "addBuddy" | "acceptBuddy" | "uoiJoinCircle" | "acceptUoiJoinCircle" | "inviteUoiToCircle" | "acceptInviteUoiToCircle" | "teamJoinCircle" | "acceptTeamJoinCircle" | "inviteTeamToCircle" | "acceptInviteTeamToCircle" | "addGameToLeaderboard" | "acceptAddGameToLeaderboard" | "inviteGameToLeaderboard" | "acceptInviteGameToLeaderboard" | "createPost";
|
|
153
154
|
|
|
154
|
-
type
|
|
155
|
-
|
|
156
|
-
declare const ATTRIBUTE_LABEL_COMMON: Record<AttributeTypeCommon, string>;
|
|
155
|
+
type CommonAttributeType = 'handedness' | 'gender' | 'dob';
|
|
157
156
|
|
|
158
|
-
|
|
157
|
+
declare const COMMON_ATTRIBUTE_LABEL: Record<CommonAttributeType, string>;
|
|
159
158
|
|
|
160
|
-
|
|
159
|
+
type UoiSportsTennisAttributeType = 'level' | 'backhand' | 'handedness';
|
|
161
160
|
|
|
162
|
-
|
|
161
|
+
declare const UOI_SPORTS_TENNIS_ATTRIBUTE_LABEL: Record<UoiSportsTennisAttributeType, string>;
|
|
163
162
|
|
|
164
|
-
|
|
163
|
+
type UoiSportsBasketballAttributeType = 'positions';
|
|
165
164
|
|
|
166
|
-
declare const
|
|
165
|
+
declare const UOI_SPORTS_BASKETBALL_ATTRIBUTE_LABEL: Record<UoiSportsBasketballAttributeType, string>;
|
|
167
166
|
|
|
168
|
-
|
|
167
|
+
declare const UOI_SPORTS_ATTRIBUTE_LABEL: Partial<Record<SportsInterestType, any>>;
|
|
169
168
|
|
|
170
|
-
|
|
169
|
+
type UoiSportsAttributeType = UoiSportsTennisAttributeType | UoiSportsBasketballAttributeType;
|
|
171
170
|
|
|
172
|
-
|
|
171
|
+
declare const UOI_ATTRIBUTE_LABEL: Partial<Record<CategoryType, any>>;
|
|
173
172
|
|
|
174
|
-
type
|
|
173
|
+
type UoiAttributeType = UoiSportsAttributeType;
|
|
175
174
|
|
|
176
|
-
declare const
|
|
175
|
+
declare const getUoiAttributeLabel: ({ categoryType, interestType, attributeType }: {
|
|
176
|
+
categoryType: CategoryType;
|
|
177
|
+
interestType?: InterestType;
|
|
178
|
+
attributeType: UoiAttributeType;
|
|
179
|
+
}) => any;
|
|
177
180
|
|
|
178
|
-
type
|
|
181
|
+
type CollectionPetsAttributeType = 'dob' | 'breed' | 'father' | 'mother' | 'gender' | 'height' | 'weight' | 'children';
|
|
179
182
|
|
|
180
|
-
declare const
|
|
183
|
+
declare const COLLECTION_PETS_ATTRIBUTE_LABEL: Record<CollectionPetsAttributeType, string>;
|
|
181
184
|
|
|
182
|
-
|
|
185
|
+
type CollectionAttributeType = CollectionPetsAttributeType;
|
|
183
186
|
|
|
184
|
-
|
|
187
|
+
declare const COLLECTION_ATTRIBUTE_LABEL: Partial<Record<CategoryType, any>>;
|
|
185
188
|
|
|
186
|
-
declare const
|
|
187
|
-
|
|
188
|
-
categoryType?: CategoryType;
|
|
189
|
+
declare const getCollectionAttributeLabel: ({ categoryType, interestType, attributeType }: {
|
|
190
|
+
categoryType: CategoryType;
|
|
189
191
|
interestType?: InterestType;
|
|
190
|
-
attributeType:
|
|
192
|
+
attributeType: CollectionAttributeType;
|
|
191
193
|
}) => any;
|
|
192
194
|
|
|
193
|
-
export {
|
|
195
|
+
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, 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";
|
|
@@ -22,23 +22,8 @@ type MarketTypeTennis = '0_coaching' | '1_stringing';
|
|
|
22
22
|
|
|
23
23
|
type MarketTypeSports = MarketTypeTennis;
|
|
24
24
|
|
|
25
|
-
type
|
|
26
|
-
|
|
27
|
-
type CollectionMetaStatus = "inactive" | "active" | "none";
|
|
28
|
-
|
|
29
|
-
type CollectionTypeOther = 'zzzother';
|
|
30
|
-
|
|
31
|
-
type CollectionTypeCat = '0cat' | 'bed' | 'cage' | 'carrier' | 'clothing' | 'food' | CollectionTypeOther;
|
|
32
|
-
|
|
33
|
-
type CollectionTypeDog = '0dog' | 'bed' | 'cage' | 'carrier' | 'clothing' | 'collar' | 'food' | 'house' | 'leash' | CollectionTypeOther;
|
|
34
|
-
|
|
35
|
-
type CollectionTypePets = CollectionTypeCat | CollectionTypeDog;
|
|
36
|
-
|
|
37
|
-
type CollectionTypeTennis = '0racket' | 'ball' | 'ballmachine' | 'shoes' | 'overgrip' | 'tennisstring' | CollectionTypeOther;
|
|
38
|
-
|
|
39
|
-
type CollectionTypeSports = CollectionTypeTennis;
|
|
40
|
-
|
|
41
|
-
type CollectionType = CollectionTypePets | CollectionTypeSports;
|
|
25
|
+
type CommonMarketType = "0_shop" | "1_repair" | "2_rental" | "3_exchange" | "4_giveaway" | "5_lost" | "6_found" | "other";
|
|
26
|
+
type MarketType = CommonMarketType | MarketTypePets | MarketTypeSports;
|
|
42
27
|
|
|
43
28
|
type UserPronoun = "none" | "he" | "she";
|
|
44
29
|
|
|
@@ -85,7 +70,7 @@ type PostPrivacy = "public" | "private" | "parent" | "internal";
|
|
|
85
70
|
|
|
86
71
|
type LocationType = "none" | "point" | "street" | "city";
|
|
87
72
|
|
|
88
|
-
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' | '';
|
|
89
74
|
declare const PID_LENGTH = 9;
|
|
90
75
|
declare const PID_PREFIX_LENGTH = 3;
|
|
91
76
|
declare function getProfileTypeByPID(pid: string): ProfileType;
|
|
@@ -97,6 +82,22 @@ declare function isLeaderboardPID(pid: string): boolean;
|
|
|
97
82
|
|
|
98
83
|
type BroadcastType = 'info' | 'warn' | 'alert';
|
|
99
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
|
+
|
|
100
101
|
type AccountStatus = "none" | "registrationNeedBasicInfo" | "registrationNeedInterests" | "active" | "inactive";
|
|
101
102
|
declare enum AdminAccountStatus {
|
|
102
103
|
None = 0,
|
|
@@ -151,43 +152,44 @@ type SocialMediaType = "none" | "facebook" | "linkedIn" | "instagram";
|
|
|
151
152
|
|
|
152
153
|
type NotificationType = "addBuddy" | "acceptBuddy" | "uoiJoinCircle" | "acceptUoiJoinCircle" | "inviteUoiToCircle" | "acceptInviteUoiToCircle" | "teamJoinCircle" | "acceptTeamJoinCircle" | "inviteTeamToCircle" | "acceptInviteTeamToCircle" | "addGameToLeaderboard" | "acceptAddGameToLeaderboard" | "inviteGameToLeaderboard" | "acceptInviteGameToLeaderboard" | "createPost";
|
|
153
154
|
|
|
154
|
-
type
|
|
155
|
-
|
|
156
|
-
declare const ATTRIBUTE_LABEL_COMMON: Record<AttributeTypeCommon, string>;
|
|
155
|
+
type CommonAttributeType = 'handedness' | 'gender' | 'dob';
|
|
157
156
|
|
|
158
|
-
|
|
157
|
+
declare const COMMON_ATTRIBUTE_LABEL: Record<CommonAttributeType, string>;
|
|
159
158
|
|
|
160
|
-
|
|
159
|
+
type UoiSportsTennisAttributeType = 'level' | 'backhand' | 'handedness';
|
|
161
160
|
|
|
162
|
-
|
|
161
|
+
declare const UOI_SPORTS_TENNIS_ATTRIBUTE_LABEL: Record<UoiSportsTennisAttributeType, string>;
|
|
163
162
|
|
|
164
|
-
|
|
163
|
+
type UoiSportsBasketballAttributeType = 'positions';
|
|
165
164
|
|
|
166
|
-
declare const
|
|
165
|
+
declare const UOI_SPORTS_BASKETBALL_ATTRIBUTE_LABEL: Record<UoiSportsBasketballAttributeType, string>;
|
|
167
166
|
|
|
168
|
-
|
|
167
|
+
declare const UOI_SPORTS_ATTRIBUTE_LABEL: Partial<Record<SportsInterestType, any>>;
|
|
169
168
|
|
|
170
|
-
|
|
169
|
+
type UoiSportsAttributeType = UoiSportsTennisAttributeType | UoiSportsBasketballAttributeType;
|
|
171
170
|
|
|
172
|
-
|
|
171
|
+
declare const UOI_ATTRIBUTE_LABEL: Partial<Record<CategoryType, any>>;
|
|
173
172
|
|
|
174
|
-
type
|
|
173
|
+
type UoiAttributeType = UoiSportsAttributeType;
|
|
175
174
|
|
|
176
|
-
declare const
|
|
175
|
+
declare const getUoiAttributeLabel: ({ categoryType, interestType, attributeType }: {
|
|
176
|
+
categoryType: CategoryType;
|
|
177
|
+
interestType?: InterestType;
|
|
178
|
+
attributeType: UoiAttributeType;
|
|
179
|
+
}) => any;
|
|
177
180
|
|
|
178
|
-
type
|
|
181
|
+
type CollectionPetsAttributeType = 'dob' | 'breed' | 'father' | 'mother' | 'gender' | 'height' | 'weight' | 'children';
|
|
179
182
|
|
|
180
|
-
declare const
|
|
183
|
+
declare const COLLECTION_PETS_ATTRIBUTE_LABEL: Record<CollectionPetsAttributeType, string>;
|
|
181
184
|
|
|
182
|
-
|
|
185
|
+
type CollectionAttributeType = CollectionPetsAttributeType;
|
|
183
186
|
|
|
184
|
-
|
|
187
|
+
declare const COLLECTION_ATTRIBUTE_LABEL: Partial<Record<CategoryType, any>>;
|
|
185
188
|
|
|
186
|
-
declare const
|
|
187
|
-
|
|
188
|
-
categoryType?: CategoryType;
|
|
189
|
+
declare const getCollectionAttributeLabel: ({ categoryType, interestType, attributeType }: {
|
|
190
|
+
categoryType: CategoryType;
|
|
189
191
|
interestType?: InterestType;
|
|
190
|
-
attributeType:
|
|
192
|
+
attributeType: CollectionAttributeType;
|
|
191
193
|
}) => any;
|
|
192
194
|
|
|
193
|
-
export {
|
|
195
|
+
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, getPIDPrefixByProfileType, getProfileTypeByPID, getUoiAttributeLabel, isGamePID, isLeaderboardPID, isTeamPID, isUoiPID };
|
package/dist/index.js
CHANGED
|
@@ -20,25 +20,25 @@ 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
39
|
getPIDPrefixByProfileType: () => getPIDPrefixByProfileType,
|
|
40
|
-
getProfileAttributeLabel: () => getProfileAttributeLabel,
|
|
41
40
|
getProfileTypeByPID: () => getProfileTypeByPID,
|
|
41
|
+
getUoiAttributeLabel: () => getUoiAttributeLabel,
|
|
42
42
|
isGamePID: () => isGamePID,
|
|
43
43
|
isLeaderboardPID: () => isLeaderboardPID,
|
|
44
44
|
isTeamPID: () => isTeamPID,
|
|
@@ -103,8 +103,8 @@ function getProfileTypeByPID(pid) {
|
|
|
103
103
|
return "arena";
|
|
104
104
|
case "evt":
|
|
105
105
|
return "event";
|
|
106
|
-
case "
|
|
107
|
-
return "
|
|
106
|
+
case "org":
|
|
107
|
+
return "organization";
|
|
108
108
|
case "lbd":
|
|
109
109
|
return "leaderboard";
|
|
110
110
|
case "gme":
|
|
@@ -127,8 +127,8 @@ var getPIDPrefixByProfileType = (profileType) => {
|
|
|
127
127
|
return "arn";
|
|
128
128
|
case "event":
|
|
129
129
|
return "evt";
|
|
130
|
-
case "
|
|
131
|
-
return "
|
|
130
|
+
case "organization":
|
|
131
|
+
return "org";
|
|
132
132
|
case "leaderboard":
|
|
133
133
|
return "lbd";
|
|
134
134
|
case "game":
|
|
@@ -181,37 +181,53 @@ var BasketballPosition = /* @__PURE__ */ ((BasketballPosition2) => {
|
|
|
181
181
|
})(BasketballPosition || {});
|
|
182
182
|
|
|
183
183
|
// src/meta/common/label.ts
|
|
184
|
-
var
|
|
184
|
+
var COMMON_ATTRIBUTE_LABEL = {
|
|
185
185
|
handedness: "Handedness",
|
|
186
186
|
gender: "Gender",
|
|
187
187
|
dob: "Date of Birth"
|
|
188
188
|
};
|
|
189
189
|
|
|
190
190
|
// src/meta/uoi/sports/tennis/label.ts
|
|
191
|
-
var
|
|
191
|
+
var UOI_SPORTS_TENNIS_ATTRIBUTE_LABEL = {
|
|
192
192
|
level: "Level",
|
|
193
193
|
backhand: "Backhand",
|
|
194
194
|
handedness: "Handedness"
|
|
195
195
|
};
|
|
196
196
|
|
|
197
197
|
// src/meta/uoi/sports/basketball/label.ts
|
|
198
|
-
var
|
|
198
|
+
var UOI_SPORTS_BASKETBALL_ATTRIBUTE_LABEL = {
|
|
199
199
|
positions: "Positions"
|
|
200
200
|
};
|
|
201
201
|
|
|
202
202
|
// src/meta/uoi/sports/label.ts
|
|
203
|
-
var
|
|
204
|
-
tennis:
|
|
205
|
-
basketball:
|
|
203
|
+
var UOI_SPORTS_ATTRIBUTE_LABEL = {
|
|
204
|
+
tennis: UOI_SPORTS_TENNIS_ATTRIBUTE_LABEL,
|
|
205
|
+
basketball: UOI_SPORTS_BASKETBALL_ATTRIBUTE_LABEL
|
|
206
206
|
};
|
|
207
207
|
|
|
208
208
|
// src/meta/uoi/label.ts
|
|
209
|
-
var
|
|
210
|
-
"1_sports":
|
|
209
|
+
var UOI_ATTRIBUTE_LABEL = {
|
|
210
|
+
"1_sports": UOI_SPORTS_ATTRIBUTE_LABEL
|
|
211
|
+
};
|
|
212
|
+
|
|
213
|
+
// src/meta/uoi/util.ts
|
|
214
|
+
var getUoiAttributeLabel = ({
|
|
215
|
+
categoryType,
|
|
216
|
+
interestType,
|
|
217
|
+
attributeType
|
|
218
|
+
}) => {
|
|
219
|
+
let labels = UOI_ATTRIBUTE_LABEL;
|
|
220
|
+
if (categoryType) {
|
|
221
|
+
labels = (labels == null ? void 0 : labels[categoryType]) || {};
|
|
222
|
+
}
|
|
223
|
+
if (interestType) {
|
|
224
|
+
labels = (labels == null ? void 0 : labels[interestType]) || {};
|
|
225
|
+
}
|
|
226
|
+
return (labels == null ? void 0 : labels[attributeType]) || "";
|
|
211
227
|
};
|
|
212
228
|
|
|
213
229
|
// src/meta/collection/pets/label.ts
|
|
214
|
-
var
|
|
230
|
+
var COLLECTION_PETS_ATTRIBUTE_LABEL = {
|
|
215
231
|
breed: "Breed",
|
|
216
232
|
father: "Father",
|
|
217
233
|
mother: "Mother",
|
|
@@ -223,54 +239,46 @@ var ATTRIBUTE_LABEL_COLLECTION_PETS = {
|
|
|
223
239
|
};
|
|
224
240
|
|
|
225
241
|
// 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
|
|
242
|
+
var COLLECTION_ATTRIBUTE_LABEL = {
|
|
243
|
+
"2_pets": COLLECTION_PETS_ATTRIBUTE_LABEL
|
|
235
244
|
};
|
|
236
245
|
|
|
237
|
-
// src/meta/util.ts
|
|
238
|
-
var
|
|
239
|
-
profileType,
|
|
246
|
+
// src/meta/collection/util.ts
|
|
247
|
+
var getCollectionAttributeLabel = ({
|
|
240
248
|
categoryType,
|
|
241
249
|
interestType,
|
|
242
250
|
attributeType
|
|
243
251
|
}) => {
|
|
244
|
-
let
|
|
252
|
+
let labels = COLLECTION_ATTRIBUTE_LABEL;
|
|
245
253
|
if (categoryType) {
|
|
246
|
-
|
|
254
|
+
labels = (labels == null ? void 0 : labels[categoryType]) || {};
|
|
247
255
|
}
|
|
248
256
|
if (interestType) {
|
|
249
|
-
|
|
257
|
+
labels = (labels == null ? void 0 : labels[interestType]) || {};
|
|
250
258
|
}
|
|
251
|
-
return (
|
|
259
|
+
return (labels == null ? void 0 : labels[attributeType]) || "";
|
|
252
260
|
};
|
|
253
261
|
// Annotate the CommonJS export names for ESM import in node:
|
|
254
262
|
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
263
|
AdminAccountStatus,
|
|
264
264
|
AttendanceStatus,
|
|
265
265
|
AvatarType,
|
|
266
266
|
BasketballPosition,
|
|
267
|
+
COLLECTION_ATTRIBUTE_LABEL,
|
|
268
|
+
COLLECTION_PETS_ATTRIBUTE_LABEL,
|
|
269
|
+
COMMON_ATTRIBUTE_LABEL,
|
|
267
270
|
ChallengeStatus,
|
|
268
271
|
FollowingStatus,
|
|
269
272
|
PID_LENGTH,
|
|
270
273
|
PID_PREFIX_LENGTH,
|
|
274
|
+
UOI_ATTRIBUTE_LABEL,
|
|
275
|
+
UOI_SPORTS_ATTRIBUTE_LABEL,
|
|
276
|
+
UOI_SPORTS_BASKETBALL_ATTRIBUTE_LABEL,
|
|
277
|
+
UOI_SPORTS_TENNIS_ATTRIBUTE_LABEL,
|
|
278
|
+
getCollectionAttributeLabel,
|
|
271
279
|
getPIDPrefixByProfileType,
|
|
272
|
-
getProfileAttributeLabel,
|
|
273
280
|
getProfileTypeByPID,
|
|
281
|
+
getUoiAttributeLabel,
|
|
274
282
|
isGamePID,
|
|
275
283
|
isLeaderboardPID,
|
|
276
284
|
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,53 @@ 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
142
|
// src/meta/uoi/sports/tennis/label.ts
|
|
143
|
-
var
|
|
143
|
+
var UOI_SPORTS_TENNIS_ATTRIBUTE_LABEL = {
|
|
144
144
|
level: "Level",
|
|
145
145
|
backhand: "Backhand",
|
|
146
146
|
handedness: "Handedness"
|
|
147
147
|
};
|
|
148
148
|
|
|
149
149
|
// src/meta/uoi/sports/basketball/label.ts
|
|
150
|
-
var
|
|
150
|
+
var UOI_SPORTS_BASKETBALL_ATTRIBUTE_LABEL = {
|
|
151
151
|
positions: "Positions"
|
|
152
152
|
};
|
|
153
153
|
|
|
154
154
|
// src/meta/uoi/sports/label.ts
|
|
155
|
-
var
|
|
156
|
-
tennis:
|
|
157
|
-
basketball:
|
|
155
|
+
var UOI_SPORTS_ATTRIBUTE_LABEL = {
|
|
156
|
+
tennis: UOI_SPORTS_TENNIS_ATTRIBUTE_LABEL,
|
|
157
|
+
basketball: UOI_SPORTS_BASKETBALL_ATTRIBUTE_LABEL
|
|
158
158
|
};
|
|
159
159
|
|
|
160
160
|
// src/meta/uoi/label.ts
|
|
161
|
-
var
|
|
162
|
-
"1_sports":
|
|
161
|
+
var UOI_ATTRIBUTE_LABEL = {
|
|
162
|
+
"1_sports": UOI_SPORTS_ATTRIBUTE_LABEL
|
|
163
|
+
};
|
|
164
|
+
|
|
165
|
+
// src/meta/uoi/util.ts
|
|
166
|
+
var getUoiAttributeLabel = ({
|
|
167
|
+
categoryType,
|
|
168
|
+
interestType,
|
|
169
|
+
attributeType
|
|
170
|
+
}) => {
|
|
171
|
+
let labels = UOI_ATTRIBUTE_LABEL;
|
|
172
|
+
if (categoryType) {
|
|
173
|
+
labels = (labels == null ? void 0 : labels[categoryType]) || {};
|
|
174
|
+
}
|
|
175
|
+
if (interestType) {
|
|
176
|
+
labels = (labels == null ? void 0 : labels[interestType]) || {};
|
|
177
|
+
}
|
|
178
|
+
return (labels == null ? void 0 : labels[attributeType]) || "";
|
|
163
179
|
};
|
|
164
180
|
|
|
165
181
|
// src/meta/collection/pets/label.ts
|
|
166
|
-
var
|
|
182
|
+
var COLLECTION_PETS_ATTRIBUTE_LABEL = {
|
|
167
183
|
breed: "Breed",
|
|
168
184
|
father: "Father",
|
|
169
185
|
mother: "Mother",
|
|
@@ -175,53 +191,45 @@ var ATTRIBUTE_LABEL_COLLECTION_PETS = {
|
|
|
175
191
|
};
|
|
176
192
|
|
|
177
193
|
// 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
|
|
194
|
+
var COLLECTION_ATTRIBUTE_LABEL = {
|
|
195
|
+
"2_pets": COLLECTION_PETS_ATTRIBUTE_LABEL
|
|
187
196
|
};
|
|
188
197
|
|
|
189
|
-
// src/meta/util.ts
|
|
190
|
-
var
|
|
191
|
-
profileType,
|
|
198
|
+
// src/meta/collection/util.ts
|
|
199
|
+
var getCollectionAttributeLabel = ({
|
|
192
200
|
categoryType,
|
|
193
201
|
interestType,
|
|
194
202
|
attributeType
|
|
195
203
|
}) => {
|
|
196
|
-
let
|
|
204
|
+
let labels = COLLECTION_ATTRIBUTE_LABEL;
|
|
197
205
|
if (categoryType) {
|
|
198
|
-
|
|
206
|
+
labels = (labels == null ? void 0 : labels[categoryType]) || {};
|
|
199
207
|
}
|
|
200
208
|
if (interestType) {
|
|
201
|
-
|
|
209
|
+
labels = (labels == null ? void 0 : labels[interestType]) || {};
|
|
202
210
|
}
|
|
203
|
-
return (
|
|
211
|
+
return (labels == null ? void 0 : labels[attributeType]) || "";
|
|
204
212
|
};
|
|
205
213
|
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
214
|
AdminAccountStatus,
|
|
215
215
|
AttendanceStatus,
|
|
216
216
|
AvatarType,
|
|
217
217
|
BasketballPosition,
|
|
218
|
+
COLLECTION_ATTRIBUTE_LABEL,
|
|
219
|
+
COLLECTION_PETS_ATTRIBUTE_LABEL,
|
|
220
|
+
COMMON_ATTRIBUTE_LABEL,
|
|
218
221
|
ChallengeStatus,
|
|
219
222
|
FollowingStatus,
|
|
220
223
|
PID_LENGTH,
|
|
221
224
|
PID_PREFIX_LENGTH,
|
|
225
|
+
UOI_ATTRIBUTE_LABEL,
|
|
226
|
+
UOI_SPORTS_ATTRIBUTE_LABEL,
|
|
227
|
+
UOI_SPORTS_BASKETBALL_ATTRIBUTE_LABEL,
|
|
228
|
+
UOI_SPORTS_TENNIS_ATTRIBUTE_LABEL,
|
|
229
|
+
getCollectionAttributeLabel,
|
|
222
230
|
getPIDPrefixByProfileType,
|
|
223
|
-
getProfileAttributeLabel,
|
|
224
231
|
getProfileTypeByPID,
|
|
232
|
+
getUoiAttributeLabel,
|
|
225
233
|
isGamePID,
|
|
226
234
|
isLeaderboardPID,
|
|
227
235
|
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/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':
|
|
@@ -1,4 +1,14 @@
|
|
|
1
1
|
import { MarketTypePets } from './pets';
|
|
2
2
|
import { MarketTypeSports } from './sports';
|
|
3
3
|
|
|
4
|
-
export type
|
|
4
|
+
export type CommonMarketType =
|
|
5
|
+
"0_shop" |
|
|
6
|
+
"1_repair" |
|
|
7
|
+
"2_rental" |
|
|
8
|
+
"3_exchange" |
|
|
9
|
+
"4_giveaway" |
|
|
10
|
+
"5_lost" |
|
|
11
|
+
"6_found" |
|
|
12
|
+
"other";
|
|
13
|
+
|
|
14
|
+
export type MarketType = CommonMarketType | MarketTypePets | MarketTypeSports;
|
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
|