wenum 1.64.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.
Files changed (42) hide show
  1. package/dist/index.d.mts +42 -41
  2. package/dist/index.d.ts +42 -41
  3. package/dist/index.js +55 -47
  4. package/dist/index.mjs +46 -38
  5. package/package.json +1 -1
  6. package/src/meta/collection/index.ts +1 -0
  7. package/src/meta/collection/label.ts +3 -3
  8. package/src/meta/collection/pets/label.ts +2 -2
  9. package/src/meta/collection/pets/type.ts +1 -1
  10. package/src/meta/collection/type.ts +2 -2
  11. package/src/meta/collection/util.ts +22 -0
  12. package/src/meta/common/label.ts +2 -2
  13. package/src/meta/common/type.ts +1 -1
  14. package/src/meta/common/util.ts +10 -0
  15. package/src/meta/index.ts +0 -3
  16. package/src/meta/uoi/index.ts +1 -0
  17. package/src/meta/uoi/label.ts +3 -3
  18. package/src/meta/uoi/sports/basketball/label.ts +3 -3
  19. package/src/meta/uoi/sports/basketball/type.ts +1 -1
  20. package/src/meta/uoi/sports/label.ts +5 -5
  21. package/src/meta/uoi/sports/tennis/label.ts +3 -3
  22. package/src/meta/uoi/sports/tennis/type.ts +1 -1
  23. package/src/meta/uoi/sports/type.ts +5 -5
  24. package/src/meta/uoi/type.ts +2 -2
  25. package/src/meta/uoi/util.ts +22 -0
  26. package/src/page/index.ts +2 -1
  27. package/src/page/page.ts +2 -1
  28. package/src/page/pid.ts +6 -6
  29. package/src/page/profile/index.ts +0 -1
  30. package/src/page/profile/profile.ts +1 -1
  31. package/src/meta/label.ts +0 -11
  32. package/src/meta/type.ts +0 -9
  33. package/src/meta/util.ts +0 -25
  34. /package/src/page/{profile/collection → collection}/index.ts +0 -0
  35. /package/src/page/{profile/collection → collection}/status.ts +0 -0
  36. /package/src/page/{profile/collection → collection}/type/index.ts +0 -0
  37. /package/src/page/{profile/collection → collection}/type/pets/cat.ts +0 -0
  38. /package/src/page/{profile/collection → collection}/type/pets/dog.ts +0 -0
  39. /package/src/page/{profile/collection → collection}/type/pets/index.ts +0 -0
  40. /package/src/page/{profile/collection → collection}/type/sports/index.ts +0 -0
  41. /package/src/page/{profile/collection → collection}/type/sports/tennis.ts +0 -0
  42. /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" | "collection" | "event" | "team" | "leaderboard" | "game";
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' | 'tpo' | '';
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,44 @@ 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 AttributeTypeCommon = 'handedness' | 'gender' | 'dob';
156
-
157
- declare const ATTRIBUTE_LABEL_COMMON: Record<AttributeTypeCommon, string>;
155
+ type CommonAttributeType = 'handedness' | 'gender' | 'dob';
158
156
 
159
- type AttributeTypeUoiSportsTennis = 'level' | 'backhand' | 'handedness';
157
+ declare const COMMON_ATTRIBUTE_LABEL: Record<CommonAttributeType, string>;
160
158
 
161
- declare const ATTRIBUTE_LABEL_UOI_SPORTS_TENNIS: Record<AttributeTypeUoiSportsTennis, string>;
159
+ type UoiSportsTennisAttributeType = 'level' | 'backhand' | 'handedness';
162
160
 
163
- type AttributeTypeUoiSportsBasketball = 'positions';
161
+ declare const UOI_SPORTS_TENNIS_ATTRIBUTE_LABEL: Record<UoiSportsTennisAttributeType, string>;
164
162
 
165
- declare const ATTRIBUTE_LABEL_UOI_SPORTS_BASKETBALL: Record<AttributeTypeUoiSportsBasketball, string>;
163
+ type UoiSportsBasketballAttributeType = 'positions';
166
164
 
167
- declare const ATTRIBUTE_LABEL_UOI_SPORTS: Partial<Record<SportsInterestType, any>>;
165
+ declare const UOI_SPORTS_BASKETBALL_ATTRIBUTE_LABEL: Record<UoiSportsBasketballAttributeType, string>;
168
166
 
169
- type AttributeTypeUoiSports = AttributeTypeUoiSportsTennis | AttributeTypeUoiSportsBasketball;
167
+ declare const UOI_SPORTS_ATTRIBUTE_LABEL: Partial<Record<SportsInterestType, any>>;
170
168
 
171
- declare const ATTRIBUTE_LABEL_UOI: Partial<Record<CategoryType, any>>;
169
+ type UoiSportsAttributeType = UoiSportsTennisAttributeType | UoiSportsBasketballAttributeType;
172
170
 
173
- type AttributeTypeUoi = AttributeTypeUoiSports;
171
+ declare const UOI_ATTRIBUTE_LABEL: Partial<Record<CategoryType, any>>;
174
172
 
175
- type AttributeTypeCollectionPets = 'dob' | 'breed' | 'father' | 'mother' | 'gender' | 'height' | 'weight' | 'children';
173
+ type UoiAttributeType = UoiSportsAttributeType;
176
174
 
177
- declare const ATTRIBUTE_LABEL_COLLECTION_PETS: Record<AttributeTypeCollectionPets, string>;
175
+ declare const getUoiAttributeLabel: ({ categoryType, interestType, attributeType }: {
176
+ categoryType: CategoryType;
177
+ interestType?: InterestType;
178
+ attributeType: UoiAttributeType;
179
+ }) => any;
178
180
 
179
- type AttributeTypeCollection = AttributeTypeCollectionPets;
181
+ type CollectionPetsAttributeType = 'dob' | 'breed' | 'father' | 'mother' | 'gender' | 'height' | 'weight' | 'children';
180
182
 
181
- declare const ATTRIBUTE_LABEL_COLLECTION: Partial<Record<CategoryType, any>>;
183
+ declare const COLLECTION_PETS_ATTRIBUTE_LABEL: Record<CollectionPetsAttributeType, string>;
182
184
 
183
- declare const ATTRIBUTE_LABEL: Partial<Record<ProfileType, any>>;
185
+ type CollectionAttributeType = CollectionPetsAttributeType;
184
186
 
185
- type AttributeType = AttributeTypeUoi | AttributeTypeCollection | AttributeTypeCommon;
187
+ declare const COLLECTION_ATTRIBUTE_LABEL: Partial<Record<CategoryType, any>>;
186
188
 
187
- declare const getProfileAttributeLabel: ({ profileType, categoryType, interestType, attributeType }: {
188
- profileType: ProfileType;
189
- categoryType?: CategoryType;
189
+ declare const getCollectionAttributeLabel: ({ categoryType, interestType, attributeType }: {
190
+ categoryType: CategoryType;
190
191
  interestType?: InterestType;
191
- attributeType: AttributeType;
192
+ attributeType: CollectionAttributeType;
192
193
  }) => any;
193
194
 
194
- export { ATTRIBUTE_LABEL, ATTRIBUTE_LABEL_COLLECTION, ATTRIBUTE_LABEL_COLLECTION_PETS, ATTRIBUTE_LABEL_COMMON, ATTRIBUTE_LABEL_UOI, ATTRIBUTE_LABEL_UOI_SPORTS, ATTRIBUTE_LABEL_UOI_SPORTS_BASKETBALL, ATTRIBUTE_LABEL_UOI_SPORTS_TENNIS, type AccountStatus, AdminAccountStatus, AttendanceStatus, type AttributeType, type AttributeTypeCollection, type AttributeTypeCollectionPets, type AttributeTypeCommon, type AttributeTypeUoi, type AttributeTypeUoiSports, type AttributeTypeUoiSportsBasketball, type AttributeTypeUoiSportsTennis, AvatarType, BasketballPosition, type BroadcastType, type BuddyingStatus, type CardGamesInterestType, type CategoryType, ChallengeStatus, type CollectionMetaStatus, type CollectionType, 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, type UserPronoun, type WeightUnit, getPIDPrefixByProfileType, getProfileAttributeLabel, getProfileTypeByPID, isGamePID, isLeaderboardPID, isTeamPID, isUoiPID };
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" | "collection" | "event" | "team" | "leaderboard" | "game";
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' | 'tpo' | '';
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,44 @@ 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 AttributeTypeCommon = 'handedness' | 'gender' | 'dob';
156
-
157
- declare const ATTRIBUTE_LABEL_COMMON: Record<AttributeTypeCommon, string>;
155
+ type CommonAttributeType = 'handedness' | 'gender' | 'dob';
158
156
 
159
- type AttributeTypeUoiSportsTennis = 'level' | 'backhand' | 'handedness';
157
+ declare const COMMON_ATTRIBUTE_LABEL: Record<CommonAttributeType, string>;
160
158
 
161
- declare const ATTRIBUTE_LABEL_UOI_SPORTS_TENNIS: Record<AttributeTypeUoiSportsTennis, string>;
159
+ type UoiSportsTennisAttributeType = 'level' | 'backhand' | 'handedness';
162
160
 
163
- type AttributeTypeUoiSportsBasketball = 'positions';
161
+ declare const UOI_SPORTS_TENNIS_ATTRIBUTE_LABEL: Record<UoiSportsTennisAttributeType, string>;
164
162
 
165
- declare const ATTRIBUTE_LABEL_UOI_SPORTS_BASKETBALL: Record<AttributeTypeUoiSportsBasketball, string>;
163
+ type UoiSportsBasketballAttributeType = 'positions';
166
164
 
167
- declare const ATTRIBUTE_LABEL_UOI_SPORTS: Partial<Record<SportsInterestType, any>>;
165
+ declare const UOI_SPORTS_BASKETBALL_ATTRIBUTE_LABEL: Record<UoiSportsBasketballAttributeType, string>;
168
166
 
169
- type AttributeTypeUoiSports = AttributeTypeUoiSportsTennis | AttributeTypeUoiSportsBasketball;
167
+ declare const UOI_SPORTS_ATTRIBUTE_LABEL: Partial<Record<SportsInterestType, any>>;
170
168
 
171
- declare const ATTRIBUTE_LABEL_UOI: Partial<Record<CategoryType, any>>;
169
+ type UoiSportsAttributeType = UoiSportsTennisAttributeType | UoiSportsBasketballAttributeType;
172
170
 
173
- type AttributeTypeUoi = AttributeTypeUoiSports;
171
+ declare const UOI_ATTRIBUTE_LABEL: Partial<Record<CategoryType, any>>;
174
172
 
175
- type AttributeTypeCollectionPets = 'dob' | 'breed' | 'father' | 'mother' | 'gender' | 'height' | 'weight' | 'children';
173
+ type UoiAttributeType = UoiSportsAttributeType;
176
174
 
177
- declare const ATTRIBUTE_LABEL_COLLECTION_PETS: Record<AttributeTypeCollectionPets, string>;
175
+ declare const getUoiAttributeLabel: ({ categoryType, interestType, attributeType }: {
176
+ categoryType: CategoryType;
177
+ interestType?: InterestType;
178
+ attributeType: UoiAttributeType;
179
+ }) => any;
178
180
 
179
- type AttributeTypeCollection = AttributeTypeCollectionPets;
181
+ type CollectionPetsAttributeType = 'dob' | 'breed' | 'father' | 'mother' | 'gender' | 'height' | 'weight' | 'children';
180
182
 
181
- declare const ATTRIBUTE_LABEL_COLLECTION: Partial<Record<CategoryType, any>>;
183
+ declare const COLLECTION_PETS_ATTRIBUTE_LABEL: Record<CollectionPetsAttributeType, string>;
182
184
 
183
- declare const ATTRIBUTE_LABEL: Partial<Record<ProfileType, any>>;
185
+ type CollectionAttributeType = CollectionPetsAttributeType;
184
186
 
185
- type AttributeType = AttributeTypeUoi | AttributeTypeCollection | AttributeTypeCommon;
187
+ declare const COLLECTION_ATTRIBUTE_LABEL: Partial<Record<CategoryType, any>>;
186
188
 
187
- declare const getProfileAttributeLabel: ({ profileType, categoryType, interestType, attributeType }: {
188
- profileType: ProfileType;
189
- categoryType?: CategoryType;
189
+ declare const getCollectionAttributeLabel: ({ categoryType, interestType, attributeType }: {
190
+ categoryType: CategoryType;
190
191
  interestType?: InterestType;
191
- attributeType: AttributeType;
192
+ attributeType: CollectionAttributeType;
192
193
  }) => any;
193
194
 
194
- export { ATTRIBUTE_LABEL, ATTRIBUTE_LABEL_COLLECTION, ATTRIBUTE_LABEL_COLLECTION_PETS, ATTRIBUTE_LABEL_COMMON, ATTRIBUTE_LABEL_UOI, ATTRIBUTE_LABEL_UOI_SPORTS, ATTRIBUTE_LABEL_UOI_SPORTS_BASKETBALL, ATTRIBUTE_LABEL_UOI_SPORTS_TENNIS, type AccountStatus, AdminAccountStatus, AttendanceStatus, type AttributeType, type AttributeTypeCollection, type AttributeTypeCollectionPets, type AttributeTypeCommon, type AttributeTypeUoi, type AttributeTypeUoiSports, type AttributeTypeUoiSportsBasketball, type AttributeTypeUoiSportsTennis, AvatarType, BasketballPosition, type BroadcastType, type BuddyingStatus, type CardGamesInterestType, type CategoryType, ChallengeStatus, type CollectionMetaStatus, type CollectionType, 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, type UserPronoun, type WeightUnit, getPIDPrefixByProfileType, getProfileAttributeLabel, getProfileTypeByPID, isGamePID, isLeaderboardPID, isTeamPID, isUoiPID };
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 "col":
107
- return "collection";
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 "collection":
131
- return "col";
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 ATTRIBUTE_LABEL_COMMON = {
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 ATTRIBUTE_LABEL_UOI_SPORTS_TENNIS = {
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 ATTRIBUTE_LABEL_UOI_SPORTS_BASKETBALL = {
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 ATTRIBUTE_LABEL_UOI_SPORTS = {
204
- tennis: ATTRIBUTE_LABEL_UOI_SPORTS_TENNIS,
205
- basketball: ATTRIBUTE_LABEL_UOI_SPORTS_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 ATTRIBUTE_LABEL_UOI = {
210
- "1_sports": ATTRIBUTE_LABEL_UOI_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 ATTRIBUTE_LABEL_COLLECTION_PETS = {
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 ATTRIBUTE_LABEL_COLLECTION = {
227
- "2_pets": ATTRIBUTE_LABEL_COLLECTION_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 getProfileAttributeLabel = ({
239
- profileType,
246
+ // src/meta/collection/util.ts
247
+ var getCollectionAttributeLabel = ({
240
248
  categoryType,
241
249
  interestType,
242
250
  attributeType
243
251
  }) => {
244
- let titles = ATTRIBUTE_LABEL[profileType];
252
+ let labels = COLLECTION_ATTRIBUTE_LABEL;
245
253
  if (categoryType) {
246
- titles = (titles == null ? void 0 : titles[categoryType]) || {};
254
+ labels = (labels == null ? void 0 : labels[categoryType]) || {};
247
255
  }
248
256
  if (interestType) {
249
- titles = (titles == null ? void 0 : titles[interestType]) || {};
257
+ labels = (labels == null ? void 0 : labels[interestType]) || {};
250
258
  }
251
- return (titles == null ? void 0 : titles[attributeType]) || "";
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 "col":
59
- return "collection";
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 "collection":
83
- return "col";
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 ATTRIBUTE_LABEL_COMMON = {
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 ATTRIBUTE_LABEL_UOI_SPORTS_TENNIS = {
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 ATTRIBUTE_LABEL_UOI_SPORTS_BASKETBALL = {
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 ATTRIBUTE_LABEL_UOI_SPORTS = {
156
- tennis: ATTRIBUTE_LABEL_UOI_SPORTS_TENNIS,
157
- basketball: ATTRIBUTE_LABEL_UOI_SPORTS_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 ATTRIBUTE_LABEL_UOI = {
162
- "1_sports": ATTRIBUTE_LABEL_UOI_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 ATTRIBUTE_LABEL_COLLECTION_PETS = {
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 ATTRIBUTE_LABEL_COLLECTION = {
179
- "2_pets": ATTRIBUTE_LABEL_COLLECTION_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 getProfileAttributeLabel = ({
191
- profileType,
198
+ // src/meta/collection/util.ts
199
+ var getCollectionAttributeLabel = ({
192
200
  categoryType,
193
201
  interestType,
194
202
  attributeType
195
203
  }) => {
196
- let titles = ATTRIBUTE_LABEL[profileType];
204
+ let labels = COLLECTION_ATTRIBUTE_LABEL;
197
205
  if (categoryType) {
198
- titles = (titles == null ? void 0 : titles[categoryType]) || {};
206
+ labels = (labels == null ? void 0 : labels[categoryType]) || {};
199
207
  }
200
208
  if (interestType) {
201
- titles = (titles == null ? void 0 : titles[interestType]) || {};
209
+ labels = (labels == null ? void 0 : labels[interestType]) || {};
202
210
  }
203
- return (titles == null ? void 0 : titles[attributeType]) || "";
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
  {
2
2
  "name": "wenum",
3
- "version": "1.64.0",
3
+ "version": "1.66.0",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/index.mjs",
6
6
  "types": "dist/index.d.ts",
@@ -1,3 +1,4 @@
1
1
  export * from './pets';
2
2
  export * from './type';
3
3
  export * from './label';
4
+ export * from './util';
@@ -1,6 +1,6 @@
1
1
  import { CategoryType } from 'src/interest';
2
- import { ATTRIBUTE_LABEL_COLLECTION_PETS } from './pets';
2
+ import { COLLECTION_PETS_ATTRIBUTE_LABEL } from './pets';
3
3
 
4
- export const ATTRIBUTE_LABEL_COLLECTION: Partial<Record<CategoryType, any>> = {
5
- '2_pets': ATTRIBUTE_LABEL_COLLECTION_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 { AttributeTypeCollectionPets } from './type';
1
+ import { CollectionPetsAttributeType } from './type';
2
2
 
3
- export const ATTRIBUTE_LABEL_COLLECTION_PETS: Record<AttributeTypeCollectionPets, string> = {
3
+ export const COLLECTION_PETS_ATTRIBUTE_LABEL: Record<CollectionPetsAttributeType, string> = {
4
4
  breed: 'Breed',
5
5
  father: 'Father',
6
6
  mother: 'Mother',
@@ -1,4 +1,4 @@
1
- export type AttributeTypeCollectionPets = 'dob'
1
+ export type CollectionPetsAttributeType = 'dob'
2
2
  | 'breed'
3
3
  | 'father'
4
4
  | 'mother'
@@ -1,3 +1,3 @@
1
- import { AttributeTypeCollectionPets } from './pets';
1
+ import { CollectionPetsAttributeType } from './pets';
2
2
 
3
- export type AttributeTypeCollection = AttributeTypeCollectionPets;
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
+ };
@@ -1,6 +1,6 @@
1
- import { AttributeTypeCommon } from './type';
1
+ import { CommonAttributeType } from './type';
2
2
 
3
- export const ATTRIBUTE_LABEL_COMMON: Record<AttributeTypeCommon, string> = {
3
+ export const COMMON_ATTRIBUTE_LABEL: Record<CommonAttributeType, string> = {
4
4
  handedness: 'Handedness',
5
5
  gender: 'Gender',
6
6
  dob: 'Date of Birth'
@@ -1,4 +1,4 @@
1
- export type AttributeTypeCommon =
1
+ export type CommonAttributeType =
2
2
  | 'handedness'
3
3
  | 'gender'
4
4
  | 'dob'
@@ -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
@@ -1,6 +1,3 @@
1
1
  export * from './common';
2
2
  export * from './uoi';
3
3
  export * from './collection';
4
- export * from './label';
5
- export * from './type';
6
- export * from './util';
@@ -1,3 +1,4 @@
1
1
  export * from './sports';
2
2
  export * from './label';
3
3
  export * from './type';
4
+ export * from './util';
@@ -1,6 +1,6 @@
1
1
  import { CategoryType } from 'src/interest';
2
- import { ATTRIBUTE_LABEL_UOI_SPORTS } from './sports';
2
+ import { UOI_SPORTS_ATTRIBUTE_LABEL } from './sports';
3
3
 
4
- export const ATTRIBUTE_LABEL_UOI: Partial<Record<CategoryType, any>> = {
5
- '1_sports': ATTRIBUTE_LABEL_UOI_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 { AttributeTypeUoiSportsBasketball } from './type';
1
+ import { UoiSportsBasketballAttributeType } from './type';
2
2
 
3
- export const ATTRIBUTE_LABEL_UOI_SPORTS_BASKETBALL: Record<
4
- AttributeTypeUoiSportsBasketball,
3
+ export const UOI_SPORTS_BASKETBALL_ATTRIBUTE_LABEL: Record<
4
+ UoiSportsBasketballAttributeType,
5
5
  string
6
6
  > = {
7
7
  positions: 'Positions'
@@ -1,3 +1,3 @@
1
- export type AttributeTypeUoiSportsBasketball = 'positions';
1
+ export type UoiSportsBasketballAttributeType = 'positions';
2
2
 
3
3
 
@@ -1,8 +1,8 @@
1
1
  import { SportsInterestType } from 'src/interest';
2
- import { ATTRIBUTE_LABEL_UOI_SPORTS_BASKETBALL } from './basketball';
3
- import { ATTRIBUTE_LABEL_UOI_SPORTS_TENNIS } from './tennis';
2
+ import { UOI_SPORTS_BASKETBALL_ATTRIBUTE_LABEL } from './basketball';
3
+ import { UOI_SPORTS_TENNIS_ATTRIBUTE_LABEL } from './tennis';
4
4
 
5
- export const ATTRIBUTE_LABEL_UOI_SPORTS: Partial<Record<SportsInterestType, any>> = {
6
- tennis: ATTRIBUTE_LABEL_UOI_SPORTS_TENNIS,
7
- basketball: ATTRIBUTE_LABEL_UOI_SPORTS_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 { AttributeTypeUoiSportsTennis } from './type';
2
-
3
- export const ATTRIBUTE_LABEL_UOI_SPORTS_TENNIS: Record<AttributeTypeUoiSportsTennis, string> = {
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,4 +1,4 @@
1
- export type AttributeTypeUoiSportsTennis =
1
+ export type UoiSportsTennisAttributeType =
2
2
  | 'level'
3
3
  | 'backhand'
4
4
  | 'handedness'
@@ -1,6 +1,6 @@
1
- import { AttributeTypeUoiSportsBasketball } from './basketball/type';
2
- import { AttributeTypeUoiSportsTennis } from './tennis/type';
1
+ import { UoiSportsBasketballAttributeType } from './basketball/type';
2
+ import { UoiSportsTennisAttributeType } from './tennis/type';
3
3
 
4
- export type AttributeTypeUoiSports =
5
- | AttributeTypeUoiSportsTennis
6
- | AttributeTypeUoiSportsBasketball;
4
+ export type UoiSportsAttributeType =
5
+ | UoiSportsTennisAttributeType
6
+ | UoiSportsBasketballAttributeType;
@@ -1,3 +1,3 @@
1
- import { AttributeTypeUoiSports } from './sports';
1
+ import { UoiSportsAttributeType } from './sports';
2
2
 
3
- export type AttributeTypeUoi = AttributeTypeUoiSports;
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
@@ -3,4 +3,5 @@ export * from './profile';
3
3
  export * from './post';
4
4
  export * from './location';
5
5
  export * from './pid';
6
- export * from './broadcast';
6
+ export * from './broadcast';
7
+ export * from './collection';
package/src/page/page.ts CHANGED
@@ -3,4 +3,5 @@ export type PageType =
3
3
  "profile" |
4
4
  "post" |
5
5
  "loi" |
6
- "location";
6
+ "location" |
7
+ "collection";
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
- | 'tpo'
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 'col':
42
- return 'collection';
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 'collection':
67
- return 'col';
66
+ case 'organization':
67
+ return 'org';
68
68
  case 'leaderboard':
69
69
  return 'lbd';
70
70
  case 'game':
@@ -1,6 +1,5 @@
1
1
  export * from './profile';
2
2
  export * from './market';
3
- export * from './collection';
4
3
  export * from './user';
5
4
  export * from './event';
6
5
  export * from './game';
@@ -4,7 +4,7 @@ export type ProfileType =
4
4
  "uoi" |
5
5
  "market"|
6
6
  "arena"|
7
- "collection"|
7
+ "organization"|
8
8
  "event"|
9
9
  "team"|
10
10
  "leaderboard" |
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
@@ -1,9 +0,0 @@
1
-
2
- import { AttributeTypeCollection } from './collection';
3
- import { AttributeTypeCommon } from './common';
4
- import { AttributeTypeUoi } from './uoi';
5
-
6
- export type AttributeType =
7
- | AttributeTypeUoi
8
- | AttributeTypeCollection
9
- | AttributeTypeCommon;
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
- };