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.
Files changed (43) hide show
  1. package/dist/index.d.mts +45 -40
  2. package/dist/index.d.ts +45 -40
  3. package/dist/index.js +64 -47
  4. package/dist/index.mjs +54 -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/index.ts +1 -0
  13. package/src/meta/common/label.ts +2 -2
  14. package/src/meta/common/type.ts +1 -1
  15. package/src/meta/common/util.ts +10 -0
  16. package/src/meta/index.ts +0 -3
  17. package/src/meta/uoi/index.ts +1 -0
  18. package/src/meta/uoi/label.ts +3 -3
  19. package/src/meta/uoi/sports/basketball/label.ts +3 -3
  20. package/src/meta/uoi/sports/basketball/type.ts +1 -1
  21. package/src/meta/uoi/sports/label.ts +5 -5
  22. package/src/meta/uoi/sports/tennis/label.ts +3 -3
  23. package/src/meta/uoi/sports/tennis/type.ts +1 -1
  24. package/src/meta/uoi/sports/type.ts +5 -5
  25. package/src/meta/uoi/type.ts +2 -2
  26. package/src/meta/uoi/util.ts +22 -0
  27. package/src/page/index.ts +2 -1
  28. package/src/page/page.ts +2 -1
  29. package/src/page/pid.ts +6 -6
  30. package/src/page/profile/index.ts +0 -1
  31. package/src/page/profile/profile.ts +1 -1
  32. package/src/meta/label.ts +0 -11
  33. package/src/meta/type.ts +0 -9
  34. package/src/meta/util.ts +0 -25
  35. /package/src/page/{profile/collection → collection}/index.ts +0 -0
  36. /package/src/page/{profile/collection → collection}/status.ts +0 -0
  37. /package/src/page/{profile/collection → collection}/type/index.ts +0 -0
  38. /package/src/page/{profile/collection → collection}/type/pets/cat.ts +0 -0
  39. /package/src/page/{profile/collection → collection}/type/pets/dog.ts +0 -0
  40. /package/src/page/{profile/collection → collection}/type/pets/index.ts +0 -0
  41. /package/src/page/{profile/collection → collection}/type/sports/index.ts +0 -0
  42. /package/src/page/{profile/collection → collection}/type/sports/tennis.ts +0 -0
  43. /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,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 AttributeTypeCommon = 'handedness' | 'gender' | 'dob';
155
+ type CommonAttributeType = 'handedness' | 'gender' | 'dob';
156
156
 
157
- declare const ATTRIBUTE_LABEL_COMMON: Record<AttributeTypeCommon, string>;
157
+ declare const COMMON_ATTRIBUTE_LABEL: Record<CommonAttributeType, string>;
158
158
 
159
- type AttributeTypeUoiSportsTennis = 'level' | 'backhand' | 'handedness';
159
+ declare const getCommonAttributeLabel: ({ attributeType }: {
160
+ attributeType: CommonAttributeType;
161
+ }) => string;
160
162
 
161
- declare const ATTRIBUTE_LABEL_UOI_SPORTS_TENNIS: Record<AttributeTypeUoiSportsTennis, string>;
163
+ type UoiSportsTennisAttributeType = 'level' | 'backhand' | 'handedness';
162
164
 
163
- type AttributeTypeUoiSportsBasketball = 'positions';
165
+ declare const UOI_SPORTS_TENNIS_ATTRIBUTE_LABEL: Record<UoiSportsTennisAttributeType, string>;
164
166
 
165
- declare const ATTRIBUTE_LABEL_UOI_SPORTS_BASKETBALL: Record<AttributeTypeUoiSportsBasketball, string>;
167
+ type UoiSportsBasketballAttributeType = 'positions';
166
168
 
167
- declare const ATTRIBUTE_LABEL_UOI_SPORTS: Partial<Record<SportsInterestType, any>>;
169
+ declare const UOI_SPORTS_BASKETBALL_ATTRIBUTE_LABEL: Record<UoiSportsBasketballAttributeType, string>;
168
170
 
169
- type AttributeTypeUoiSports = AttributeTypeUoiSportsTennis | AttributeTypeUoiSportsBasketball;
171
+ declare const UOI_SPORTS_ATTRIBUTE_LABEL: Partial<Record<SportsInterestType, any>>;
170
172
 
171
- declare const ATTRIBUTE_LABEL_UOI: Partial<Record<CategoryType, any>>;
173
+ type UoiSportsAttributeType = UoiSportsTennisAttributeType | UoiSportsBasketballAttributeType;
172
174
 
173
- type AttributeTypeUoi = AttributeTypeUoiSports;
175
+ declare const UOI_ATTRIBUTE_LABEL: Partial<Record<CategoryType, any>>;
174
176
 
175
- type AttributeTypeCollectionPets = 'dob' | 'breed' | 'father' | 'mother' | 'gender' | 'height' | 'weight' | 'children';
177
+ type UoiAttributeType = UoiSportsAttributeType;
176
178
 
177
- declare const ATTRIBUTE_LABEL_COLLECTION_PETS: Record<AttributeTypeCollectionPets, string>;
179
+ declare const getUoiAttributeLabel: ({ categoryType, interestType, attributeType }: {
180
+ categoryType: CategoryType;
181
+ interestType?: InterestType;
182
+ attributeType: UoiAttributeType;
183
+ }) => any;
178
184
 
179
- type AttributeTypeCollection = AttributeTypeCollectionPets;
185
+ type CollectionPetsAttributeType = 'dob' | 'breed' | 'father' | 'mother' | 'gender' | 'height' | 'weight' | 'children';
180
186
 
181
- declare const ATTRIBUTE_LABEL_COLLECTION: Partial<Record<CategoryType, any>>;
187
+ declare const COLLECTION_PETS_ATTRIBUTE_LABEL: Record<CollectionPetsAttributeType, string>;
182
188
 
183
- declare const ATTRIBUTE_LABEL: Partial<Record<ProfileType, any>>;
189
+ type CollectionAttributeType = CollectionPetsAttributeType;
184
190
 
185
- type AttributeType = AttributeTypeUoi | AttributeTypeCollection | AttributeTypeCommon;
191
+ declare const COLLECTION_ATTRIBUTE_LABEL: Partial<Record<CategoryType, any>>;
186
192
 
187
- declare const getProfileAttributeLabel: ({ profileType, categoryType, interestType, attributeType }: {
188
- profileType: ProfileType;
189
- categoryType?: CategoryType;
193
+ declare const getCollectionAttributeLabel: ({ categoryType, interestType, attributeType }: {
194
+ categoryType: CategoryType;
190
195
  interestType?: InterestType;
191
- attributeType: AttributeType;
196
+ attributeType: CollectionAttributeType;
192
197
  }) => any;
193
198
 
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 };
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" | "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,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 AttributeTypeCommon = 'handedness' | 'gender' | 'dob';
155
+ type CommonAttributeType = 'handedness' | 'gender' | 'dob';
156
156
 
157
- declare const ATTRIBUTE_LABEL_COMMON: Record<AttributeTypeCommon, string>;
157
+ declare const COMMON_ATTRIBUTE_LABEL: Record<CommonAttributeType, string>;
158
158
 
159
- type AttributeTypeUoiSportsTennis = 'level' | 'backhand' | 'handedness';
159
+ declare const getCommonAttributeLabel: ({ attributeType }: {
160
+ attributeType: CommonAttributeType;
161
+ }) => string;
160
162
 
161
- declare const ATTRIBUTE_LABEL_UOI_SPORTS_TENNIS: Record<AttributeTypeUoiSportsTennis, string>;
163
+ type UoiSportsTennisAttributeType = 'level' | 'backhand' | 'handedness';
162
164
 
163
- type AttributeTypeUoiSportsBasketball = 'positions';
165
+ declare const UOI_SPORTS_TENNIS_ATTRIBUTE_LABEL: Record<UoiSportsTennisAttributeType, string>;
164
166
 
165
- declare const ATTRIBUTE_LABEL_UOI_SPORTS_BASKETBALL: Record<AttributeTypeUoiSportsBasketball, string>;
167
+ type UoiSportsBasketballAttributeType = 'positions';
166
168
 
167
- declare const ATTRIBUTE_LABEL_UOI_SPORTS: Partial<Record<SportsInterestType, any>>;
169
+ declare const UOI_SPORTS_BASKETBALL_ATTRIBUTE_LABEL: Record<UoiSportsBasketballAttributeType, string>;
168
170
 
169
- type AttributeTypeUoiSports = AttributeTypeUoiSportsTennis | AttributeTypeUoiSportsBasketball;
171
+ declare const UOI_SPORTS_ATTRIBUTE_LABEL: Partial<Record<SportsInterestType, any>>;
170
172
 
171
- declare const ATTRIBUTE_LABEL_UOI: Partial<Record<CategoryType, any>>;
173
+ type UoiSportsAttributeType = UoiSportsTennisAttributeType | UoiSportsBasketballAttributeType;
172
174
 
173
- type AttributeTypeUoi = AttributeTypeUoiSports;
175
+ declare const UOI_ATTRIBUTE_LABEL: Partial<Record<CategoryType, any>>;
174
176
 
175
- type AttributeTypeCollectionPets = 'dob' | 'breed' | 'father' | 'mother' | 'gender' | 'height' | 'weight' | 'children';
177
+ type UoiAttributeType = UoiSportsAttributeType;
176
178
 
177
- declare const ATTRIBUTE_LABEL_COLLECTION_PETS: Record<AttributeTypeCollectionPets, string>;
179
+ declare const getUoiAttributeLabel: ({ categoryType, interestType, attributeType }: {
180
+ categoryType: CategoryType;
181
+ interestType?: InterestType;
182
+ attributeType: UoiAttributeType;
183
+ }) => any;
178
184
 
179
- type AttributeTypeCollection = AttributeTypeCollectionPets;
185
+ type CollectionPetsAttributeType = 'dob' | 'breed' | 'father' | 'mother' | 'gender' | 'height' | 'weight' | 'children';
180
186
 
181
- declare const ATTRIBUTE_LABEL_COLLECTION: Partial<Record<CategoryType, any>>;
187
+ declare const COLLECTION_PETS_ATTRIBUTE_LABEL: Record<CollectionPetsAttributeType, string>;
182
188
 
183
- declare const ATTRIBUTE_LABEL: Partial<Record<ProfileType, any>>;
189
+ type CollectionAttributeType = CollectionPetsAttributeType;
184
190
 
185
- type AttributeType = AttributeTypeUoi | AttributeTypeCollection | AttributeTypeCommon;
191
+ declare const COLLECTION_ATTRIBUTE_LABEL: Partial<Record<CategoryType, any>>;
186
192
 
187
- declare const getProfileAttributeLabel: ({ profileType, categoryType, interestType, attributeType }: {
188
- profileType: ProfileType;
189
- categoryType?: CategoryType;
193
+ declare const getCollectionAttributeLabel: ({ categoryType, interestType, attributeType }: {
194
+ categoryType: CategoryType;
190
195
  interestType?: InterestType;
191
- attributeType: AttributeType;
196
+ attributeType: CollectionAttributeType;
192
197
  }) => any;
193
198
 
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 };
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 "col":
107
- return "collection";
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 "collection":
131
- return "col";
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 ATTRIBUTE_LABEL_COMMON = {
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 ATTRIBUTE_LABEL_UOI_SPORTS_TENNIS = {
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 ATTRIBUTE_LABEL_UOI_SPORTS_BASKETBALL = {
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 ATTRIBUTE_LABEL_UOI_SPORTS = {
204
- tennis: ATTRIBUTE_LABEL_UOI_SPORTS_TENNIS,
205
- basketball: ATTRIBUTE_LABEL_UOI_SPORTS_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 ATTRIBUTE_LABEL_UOI = {
210
- "1_sports": ATTRIBUTE_LABEL_UOI_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 ATTRIBUTE_LABEL_COLLECTION_PETS = {
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 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
250
+ var COLLECTION_ATTRIBUTE_LABEL = {
251
+ "2_pets": COLLECTION_PETS_ATTRIBUTE_LABEL
235
252
  };
236
253
 
237
- // src/meta/util.ts
238
- var getProfileAttributeLabel = ({
239
- profileType,
254
+ // src/meta/collection/util.ts
255
+ var getCollectionAttributeLabel = ({
240
256
  categoryType,
241
257
  interestType,
242
258
  attributeType
243
259
  }) => {
244
- let titles = ATTRIBUTE_LABEL[profileType];
260
+ let labels = COLLECTION_ATTRIBUTE_LABEL;
245
261
  if (categoryType) {
246
- titles = (titles == null ? void 0 : titles[categoryType]) || {};
262
+ labels = (labels == null ? void 0 : labels[categoryType]) || {};
247
263
  }
248
264
  if (interestType) {
249
- titles = (titles == null ? void 0 : titles[interestType]) || {};
265
+ labels = (labels == null ? void 0 : labels[interestType]) || {};
250
266
  }
251
- return (titles == null ? void 0 : titles[attributeType]) || "";
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 "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,60 @@ 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
+ // 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 ATTRIBUTE_LABEL_UOI_SPORTS_TENNIS = {
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 ATTRIBUTE_LABEL_UOI_SPORTS_BASKETBALL = {
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 ATTRIBUTE_LABEL_UOI_SPORTS = {
156
- tennis: ATTRIBUTE_LABEL_UOI_SPORTS_TENNIS,
157
- basketball: ATTRIBUTE_LABEL_UOI_SPORTS_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 ATTRIBUTE_LABEL_UOI = {
162
- "1_sports": ATTRIBUTE_LABEL_UOI_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 ATTRIBUTE_LABEL_COLLECTION_PETS = {
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 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
201
+ var COLLECTION_ATTRIBUTE_LABEL = {
202
+ "2_pets": COLLECTION_PETS_ATTRIBUTE_LABEL
187
203
  };
188
204
 
189
- // src/meta/util.ts
190
- var getProfileAttributeLabel = ({
191
- profileType,
205
+ // src/meta/collection/util.ts
206
+ var getCollectionAttributeLabel = ({
192
207
  categoryType,
193
208
  interestType,
194
209
  attributeType
195
210
  }) => {
196
- let titles = ATTRIBUTE_LABEL[profileType];
211
+ let labels = COLLECTION_ATTRIBUTE_LABEL;
197
212
  if (categoryType) {
198
- titles = (titles == null ? void 0 : titles[categoryType]) || {};
213
+ labels = (labels == null ? void 0 : labels[categoryType]) || {};
199
214
  }
200
215
  if (interestType) {
201
- titles = (titles == null ? void 0 : titles[interestType]) || {};
216
+ labels = (labels == null ? void 0 : labels[interestType]) || {};
202
217
  }
203
- return (titles == null ? void 0 : titles[attributeType]) || "";
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
  {
2
2
  "name": "wenum",
3
- "version": "1.64.0",
3
+ "version": "1.67.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,2 +1,3 @@
1
1
  export * from './label';
2
2
  export * from './type';
3
+ export * from './util';
@@ -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
- };