wenum 1.50.0 → 1.52.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 (37) hide show
  1. package/dist/index.d.mts +45 -6
  2. package/dist/index.d.ts +45 -6
  3. package/dist/index.js +88 -0
  4. package/dist/index.mjs +79 -0
  5. package/package.json +1 -1
  6. package/src/index.ts +2 -1
  7. package/src/meta/collection/index.ts +3 -0
  8. package/src/meta/collection/label.ts +6 -0
  9. package/src/meta/collection/pets/index.ts +2 -0
  10. package/src/meta/collection/pets/label.ts +11 -0
  11. package/src/meta/collection/pets/type.ts +8 -0
  12. package/src/meta/collection/type.ts +3 -0
  13. package/src/meta/common/index.ts +2 -0
  14. package/src/meta/common/label.ts +7 -0
  15. package/src/meta/common/type.ts +5 -0
  16. package/src/meta/index.ts +6 -0
  17. package/src/meta/label.ts +11 -0
  18. package/src/meta/type.ts +9 -0
  19. package/src/meta/uoi/index.ts +3 -0
  20. package/src/meta/uoi/label.ts +6 -0
  21. package/src/meta/uoi/sports/basketball/index.ts +2 -0
  22. package/src/meta/uoi/sports/basketball/label.ts +8 -0
  23. package/src/meta/uoi/sports/basketball/type.ts +3 -0
  24. package/src/meta/uoi/sports/index.ts +4 -0
  25. package/src/meta/uoi/sports/label.ts +8 -0
  26. package/src/meta/uoi/sports/tennis/index.ts +2 -0
  27. package/src/meta/uoi/sports/tennis/label.ts +7 -0
  28. package/src/meta/uoi/sports/tennis/type.ts +5 -0
  29. package/src/meta/uoi/sports/type.ts +6 -0
  30. package/src/meta/uoi/type.ts +3 -0
  31. package/src/meta/util.ts +25 -0
  32. package/src/page/profile/collection/type/index.ts +1 -1
  33. package/src/page/profile/collection/type/pets/cat.ts +1 -1
  34. package/src/page/profile/collection/type/pets/dog.ts +1 -1
  35. package/src/page/profile/collection/type/sports/tennis.ts +1 -1
  36. package/src/page/profile/game/type/index.ts +1 -1
  37. package/tsconfig.json +1 -2
package/dist/index.d.mts CHANGED
@@ -66,17 +66,17 @@ declare enum CollectionMetaStatus {
66
66
  Inactive = 2
67
67
  }
68
68
 
69
- type CollectionTypeCat = '0cat' | 'bed' | 'cage' | 'carrier' | 'clothing' | 'food';
69
+ type CollectionTypeCat = '0cat' | 'bed' | 'cage' | 'carrier' | 'clothing' | 'food' | 'other';
70
70
 
71
- type CollectionTypeDog = '0dog' | 'bed' | 'cage' | 'carrier' | 'clothing' | 'collar' | 'food' | 'house' | 'leash';
71
+ type CollectionTypeDog = '0dog' | 'bed' | 'cage' | 'carrier' | 'clothing' | 'collar' | 'food' | 'house' | 'leash' | 'other';
72
72
 
73
73
  type CollectionTypePets = CollectionTypeCat | CollectionTypeDog;
74
74
 
75
- type CollectionTypeTennis = '0racket' | 'ball' | 'ballmachine' | 'shoes' | 'overgrip' | 'tennisstring';
75
+ type CollectionTypeTennis = '0racket' | 'ball' | 'ballmachine' | 'shoes' | 'overgrip' | 'tennisstring' | 'other';
76
76
 
77
77
  type CollectionTypeSports = CollectionTypeTennis;
78
78
 
79
- type CollectionType = CollectionTypePets | CollectionTypeSports | '';
79
+ type CollectionType = CollectionTypePets | CollectionTypeSports;
80
80
 
81
81
  declare enum UserPronoun {
82
82
  None = 0,
@@ -109,7 +109,7 @@ type GameTypeGolf = '0_18hole' | '1_9hole' | '2_drivingrange' | '3_putting' | '4
109
109
 
110
110
  type GameTypeSports = GameTypeBasketball | GameTypeRunning | GameTypeTennis | GameTypeGolf;
111
111
 
112
- type GameType = GameTypeSports | '';
112
+ type GameType = GameTypeSports;
113
113
 
114
114
  declare enum LeaderboardType {
115
115
  Score = 0,
@@ -302,4 +302,43 @@ declare enum NotificationType {
302
302
  }
303
303
  declare const getNotificationTypeName: (type: NotificationType) => "AddBuddy" | "AcceptBuddy" | "UoiJoinCircle" | "AcceptUoiJoinCircle" | "InviteUoiToCircle" | "AcceptInviteUoiToCircle" | "TeamJoinCircle" | "AcceptTeamJoinCircle" | "InviteTeamToCircle" | "AcceptInviteTeamToCircle" | "AddGameToLeaderboard" | "AcceptAddGameToLeaderboard" | "InviteGameToLeaderboard" | "AcceptInviteGameToLeaderboard" | "CreatePost" | "Unknown";
304
304
 
305
- export { AccountStatus, AdminAccountStatus, AttendanceStatus, AvatarType, BasketballPosition, BuddyingStatus, type CardGamesInterestType, type CategoryType, ChallengeStatus, CollectionMetaStatus, type CollectionType, DuelGameResultType, FollowingStatus, type GameType, Gender, Handedness, type InterestType, LeaderboardType, LengthUnit, LocationType, MarketMetaStatus, type MarketType, MemberingStatus, type MusicInterestType, NotificationType, type PIDPrefixType, PID_LENGTH, PID_PREFIX_LENGTH, PageType, type PetsInterestType, PostPrivacy, PostType, ProfileJoiningType, ProfilePermission, ProfilePrivacy, ProfileStatus, ProfileType, type SportsInterestType, SubjectType, TennisBackhand, TennisLevel, UserPronoun, WeightUnit, getBuddyingStatusName, getMemberingStatusName, getNotificationTypeName, getPIDPrefixByProfileType, getProfileTypeByPID, getProfileTypeName, isGamePID, isLeaderboardPID, isTeamPID, isUoiPID };
305
+ type AttributeTypeCommon = 'handedness' | 'gender' | 'dob';
306
+
307
+ declare const ATTRIBUTE_LABEL_COMMON: Record<AttributeTypeCommon, string>;
308
+
309
+ type AttributeTypeUoiSportsTennis = 'level' | 'backhand' | 'handedness';
310
+
311
+ declare const ATTRIBUTE_LABEL_UOI_SPORTS_TENNIS: Record<AttributeTypeUoiSportsTennis, string>;
312
+
313
+ type AttributeTypeUoiSportsBasketball = 'positions';
314
+
315
+ declare const ATTRIBUTE_LABEL_UOI_SPORTS_BASKETBALL: Record<AttributeTypeUoiSportsBasketball, string>;
316
+
317
+ declare const ATTRIBUTE_LABEL_UOI_SPORTS: Partial<Record<SportsInterestType, any>>;
318
+
319
+ type AttributeTypeUoiSports = AttributeTypeUoiSportsTennis | AttributeTypeUoiSportsBasketball;
320
+
321
+ declare const ATTRIBUTE_LABEL_UOI: Partial<Record<CategoryType, any>>;
322
+
323
+ type AttributeTypeUoi = AttributeTypeUoiSports;
324
+
325
+ type AttributeTypeCollectionPets = 'breed' | 'father' | 'mother' | 'gender' | 'height' | 'weight' | 'children';
326
+
327
+ declare const ATTRIBUTE_LABEL_COLLECTION_PETS: Record<AttributeTypeCollectionPets, string>;
328
+
329
+ type AttributeTypeCollection = AttributeTypeCollectionPets;
330
+
331
+ declare const ATTRIBUTE_LABEL_COLLECTION: Partial<Record<CategoryType, any>>;
332
+
333
+ declare const ATTRIBUTE_LABEL: Partial<Record<ProfileType, any>>;
334
+
335
+ type AttributeType = AttributeTypeUoi | AttributeTypeCollection | AttributeTypeCommon;
336
+
337
+ declare const getProfileAttributeLabel: ({ profileType, categoryType, interestType, attributeType }: {
338
+ profileType: ProfileType;
339
+ categoryType?: CategoryType;
340
+ interestType?: InterestType;
341
+ attributeType: AttributeType;
342
+ }) => any;
343
+
344
+ 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, AccountStatus, AdminAccountStatus, AttendanceStatus, type AttributeType, type AttributeTypeCollection, type AttributeTypeCollectionPets, type AttributeTypeCommon, type AttributeTypeUoi, type AttributeTypeUoiSports, type AttributeTypeUoiSportsBasketball, type AttributeTypeUoiSportsTennis, AvatarType, BasketballPosition, BuddyingStatus, type CardGamesInterestType, type CategoryType, ChallengeStatus, CollectionMetaStatus, type CollectionType, DuelGameResultType, FollowingStatus, type GameType, Gender, Handedness, type InterestType, LeaderboardType, LengthUnit, LocationType, MarketMetaStatus, type MarketType, MemberingStatus, type MusicInterestType, NotificationType, type PIDPrefixType, PID_LENGTH, PID_PREFIX_LENGTH, PageType, type PetsInterestType, PostPrivacy, PostType, ProfileJoiningType, ProfilePermission, ProfilePrivacy, ProfileStatus, ProfileType, type SportsInterestType, SubjectType, TennisBackhand, TennisLevel, UserPronoun, WeightUnit, getBuddyingStatusName, getMemberingStatusName, getNotificationTypeName, getPIDPrefixByProfileType, getProfileAttributeLabel, getProfileTypeByPID, getProfileTypeName, isGamePID, isLeaderboardPID, isTeamPID, isUoiPID };
package/dist/index.d.ts CHANGED
@@ -66,17 +66,17 @@ declare enum CollectionMetaStatus {
66
66
  Inactive = 2
67
67
  }
68
68
 
69
- type CollectionTypeCat = '0cat' | 'bed' | 'cage' | 'carrier' | 'clothing' | 'food';
69
+ type CollectionTypeCat = '0cat' | 'bed' | 'cage' | 'carrier' | 'clothing' | 'food' | 'other';
70
70
 
71
- type CollectionTypeDog = '0dog' | 'bed' | 'cage' | 'carrier' | 'clothing' | 'collar' | 'food' | 'house' | 'leash';
71
+ type CollectionTypeDog = '0dog' | 'bed' | 'cage' | 'carrier' | 'clothing' | 'collar' | 'food' | 'house' | 'leash' | 'other';
72
72
 
73
73
  type CollectionTypePets = CollectionTypeCat | CollectionTypeDog;
74
74
 
75
- type CollectionTypeTennis = '0racket' | 'ball' | 'ballmachine' | 'shoes' | 'overgrip' | 'tennisstring';
75
+ type CollectionTypeTennis = '0racket' | 'ball' | 'ballmachine' | 'shoes' | 'overgrip' | 'tennisstring' | 'other';
76
76
 
77
77
  type CollectionTypeSports = CollectionTypeTennis;
78
78
 
79
- type CollectionType = CollectionTypePets | CollectionTypeSports | '';
79
+ type CollectionType = CollectionTypePets | CollectionTypeSports;
80
80
 
81
81
  declare enum UserPronoun {
82
82
  None = 0,
@@ -109,7 +109,7 @@ type GameTypeGolf = '0_18hole' | '1_9hole' | '2_drivingrange' | '3_putting' | '4
109
109
 
110
110
  type GameTypeSports = GameTypeBasketball | GameTypeRunning | GameTypeTennis | GameTypeGolf;
111
111
 
112
- type GameType = GameTypeSports | '';
112
+ type GameType = GameTypeSports;
113
113
 
114
114
  declare enum LeaderboardType {
115
115
  Score = 0,
@@ -302,4 +302,43 @@ declare enum NotificationType {
302
302
  }
303
303
  declare const getNotificationTypeName: (type: NotificationType) => "AddBuddy" | "AcceptBuddy" | "UoiJoinCircle" | "AcceptUoiJoinCircle" | "InviteUoiToCircle" | "AcceptInviteUoiToCircle" | "TeamJoinCircle" | "AcceptTeamJoinCircle" | "InviteTeamToCircle" | "AcceptInviteTeamToCircle" | "AddGameToLeaderboard" | "AcceptAddGameToLeaderboard" | "InviteGameToLeaderboard" | "AcceptInviteGameToLeaderboard" | "CreatePost" | "Unknown";
304
304
 
305
- export { AccountStatus, AdminAccountStatus, AttendanceStatus, AvatarType, BasketballPosition, BuddyingStatus, type CardGamesInterestType, type CategoryType, ChallengeStatus, CollectionMetaStatus, type CollectionType, DuelGameResultType, FollowingStatus, type GameType, Gender, Handedness, type InterestType, LeaderboardType, LengthUnit, LocationType, MarketMetaStatus, type MarketType, MemberingStatus, type MusicInterestType, NotificationType, type PIDPrefixType, PID_LENGTH, PID_PREFIX_LENGTH, PageType, type PetsInterestType, PostPrivacy, PostType, ProfileJoiningType, ProfilePermission, ProfilePrivacy, ProfileStatus, ProfileType, type SportsInterestType, SubjectType, TennisBackhand, TennisLevel, UserPronoun, WeightUnit, getBuddyingStatusName, getMemberingStatusName, getNotificationTypeName, getPIDPrefixByProfileType, getProfileTypeByPID, getProfileTypeName, isGamePID, isLeaderboardPID, isTeamPID, isUoiPID };
305
+ type AttributeTypeCommon = 'handedness' | 'gender' | 'dob';
306
+
307
+ declare const ATTRIBUTE_LABEL_COMMON: Record<AttributeTypeCommon, string>;
308
+
309
+ type AttributeTypeUoiSportsTennis = 'level' | 'backhand' | 'handedness';
310
+
311
+ declare const ATTRIBUTE_LABEL_UOI_SPORTS_TENNIS: Record<AttributeTypeUoiSportsTennis, string>;
312
+
313
+ type AttributeTypeUoiSportsBasketball = 'positions';
314
+
315
+ declare const ATTRIBUTE_LABEL_UOI_SPORTS_BASKETBALL: Record<AttributeTypeUoiSportsBasketball, string>;
316
+
317
+ declare const ATTRIBUTE_LABEL_UOI_SPORTS: Partial<Record<SportsInterestType, any>>;
318
+
319
+ type AttributeTypeUoiSports = AttributeTypeUoiSportsTennis | AttributeTypeUoiSportsBasketball;
320
+
321
+ declare const ATTRIBUTE_LABEL_UOI: Partial<Record<CategoryType, any>>;
322
+
323
+ type AttributeTypeUoi = AttributeTypeUoiSports;
324
+
325
+ type AttributeTypeCollectionPets = 'breed' | 'father' | 'mother' | 'gender' | 'height' | 'weight' | 'children';
326
+
327
+ declare const ATTRIBUTE_LABEL_COLLECTION_PETS: Record<AttributeTypeCollectionPets, string>;
328
+
329
+ type AttributeTypeCollection = AttributeTypeCollectionPets;
330
+
331
+ declare const ATTRIBUTE_LABEL_COLLECTION: Partial<Record<CategoryType, any>>;
332
+
333
+ declare const ATTRIBUTE_LABEL: Partial<Record<ProfileType, any>>;
334
+
335
+ type AttributeType = AttributeTypeUoi | AttributeTypeCollection | AttributeTypeCommon;
336
+
337
+ declare const getProfileAttributeLabel: ({ profileType, categoryType, interestType, attributeType }: {
338
+ profileType: ProfileType;
339
+ categoryType?: CategoryType;
340
+ interestType?: InterestType;
341
+ attributeType: AttributeType;
342
+ }) => any;
343
+
344
+ 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, AccountStatus, AdminAccountStatus, AttendanceStatus, type AttributeType, type AttributeTypeCollection, type AttributeTypeCollectionPets, type AttributeTypeCommon, type AttributeTypeUoi, type AttributeTypeUoiSports, type AttributeTypeUoiSportsBasketball, type AttributeTypeUoiSportsTennis, AvatarType, BasketballPosition, BuddyingStatus, type CardGamesInterestType, type CategoryType, ChallengeStatus, CollectionMetaStatus, type CollectionType, DuelGameResultType, FollowingStatus, type GameType, Gender, Handedness, type InterestType, LeaderboardType, LengthUnit, LocationType, MarketMetaStatus, type MarketType, MemberingStatus, type MusicInterestType, NotificationType, type PIDPrefixType, PID_LENGTH, PID_PREFIX_LENGTH, PageType, type PetsInterestType, PostPrivacy, PostType, ProfileJoiningType, ProfilePermission, ProfilePrivacy, ProfileStatus, ProfileType, type SportsInterestType, SubjectType, TennisBackhand, TennisLevel, UserPronoun, WeightUnit, getBuddyingStatusName, getMemberingStatusName, getNotificationTypeName, getPIDPrefixByProfileType, getProfileAttributeLabel, getProfileTypeByPID, getProfileTypeName, isGamePID, isLeaderboardPID, isTeamPID, isUoiPID };
package/dist/index.js CHANGED
@@ -20,6 +20,14 @@ 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,
23
31
  AccountStatus: () => AccountStatus,
24
32
  AdminAccountStatus: () => AdminAccountStatus,
25
33
  AttendanceStatus: () => AttendanceStatus,
@@ -57,6 +65,7 @@ __export(index_exports, {
57
65
  getMemberingStatusName: () => getMemberingStatusName,
58
66
  getNotificationTypeName: () => getNotificationTypeName,
59
67
  getPIDPrefixByProfileType: () => getPIDPrefixByProfileType,
68
+ getProfileAttributeLabel: () => getProfileAttributeLabel,
60
69
  getProfileTypeByPID: () => getProfileTypeByPID,
61
70
  getProfileTypeName: () => getProfileTypeName,
62
71
  isGamePID: () => isGamePID,
@@ -540,8 +549,86 @@ var getNotificationTypeName = (type) => {
540
549
  return "Unknown";
541
550
  }
542
551
  };
552
+
553
+ // src/meta/common/label.ts
554
+ var ATTRIBUTE_LABEL_COMMON = {
555
+ handedness: "Handedness",
556
+ gender: "Gender",
557
+ dob: "Date of Birth"
558
+ };
559
+
560
+ // src/meta/uoi/sports/tennis/label.ts
561
+ var ATTRIBUTE_LABEL_UOI_SPORTS_TENNIS = {
562
+ level: "Level",
563
+ backhand: "Backhand",
564
+ handedness: "Handedness"
565
+ };
566
+
567
+ // src/meta/uoi/sports/basketball/label.ts
568
+ var ATTRIBUTE_LABEL_UOI_SPORTS_BASKETBALL = {
569
+ positions: "Positions"
570
+ };
571
+
572
+ // src/meta/uoi/sports/label.ts
573
+ var ATTRIBUTE_LABEL_UOI_SPORTS = {
574
+ tennis: ATTRIBUTE_LABEL_UOI_SPORTS_TENNIS,
575
+ basketball: ATTRIBUTE_LABEL_UOI_SPORTS_BASKETBALL
576
+ };
577
+
578
+ // src/meta/uoi/label.ts
579
+ var ATTRIBUTE_LABEL_UOI = {
580
+ sports: ATTRIBUTE_LABEL_UOI_SPORTS
581
+ };
582
+
583
+ // src/meta/collection/pets/label.ts
584
+ var ATTRIBUTE_LABEL_COLLECTION_PETS = {
585
+ breed: "Breed",
586
+ father: "Father",
587
+ mother: "Mother",
588
+ gender: "Gender",
589
+ height: "Height",
590
+ weight: "Weight",
591
+ children: "Children"
592
+ };
593
+
594
+ // src/meta/collection/label.ts
595
+ var ATTRIBUTE_LABEL_COLLECTION = {
596
+ pets: ATTRIBUTE_LABEL_COLLECTION_PETS
597
+ };
598
+
599
+ // src/meta/label.ts
600
+ var ATTRIBUTE_LABEL = {
601
+ [2 /* Uoi */]: ATTRIBUTE_LABEL_UOI,
602
+ [5 /* Collection */]: ATTRIBUTE_LABEL_COLLECTION,
603
+ [0 /* None */]: ATTRIBUTE_LABEL_COMMON
604
+ };
605
+
606
+ // src/meta/util.ts
607
+ var getProfileAttributeLabel = ({
608
+ profileType,
609
+ categoryType,
610
+ interestType,
611
+ attributeType
612
+ }) => {
613
+ let titles = ATTRIBUTE_LABEL[profileType];
614
+ if (categoryType) {
615
+ titles = (titles == null ? void 0 : titles[categoryType]) || {};
616
+ }
617
+ if (interestType) {
618
+ titles = (titles == null ? void 0 : titles[interestType]) || {};
619
+ }
620
+ return (titles == null ? void 0 : titles[attributeType]) || "";
621
+ };
543
622
  // Annotate the CommonJS export names for ESM import in node:
544
623
  0 && (module.exports = {
624
+ ATTRIBUTE_LABEL,
625
+ ATTRIBUTE_LABEL_COLLECTION,
626
+ ATTRIBUTE_LABEL_COLLECTION_PETS,
627
+ ATTRIBUTE_LABEL_COMMON,
628
+ ATTRIBUTE_LABEL_UOI,
629
+ ATTRIBUTE_LABEL_UOI_SPORTS,
630
+ ATTRIBUTE_LABEL_UOI_SPORTS_BASKETBALL,
631
+ ATTRIBUTE_LABEL_UOI_SPORTS_TENNIS,
545
632
  AccountStatus,
546
633
  AdminAccountStatus,
547
634
  AttendanceStatus,
@@ -579,6 +666,7 @@ var getNotificationTypeName = (type) => {
579
666
  getMemberingStatusName,
580
667
  getNotificationTypeName,
581
668
  getPIDPrefixByProfileType,
669
+ getProfileAttributeLabel,
582
670
  getProfileTypeByPID,
583
671
  getProfileTypeName,
584
672
  isGamePID,
package/dist/index.mjs CHANGED
@@ -472,7 +472,85 @@ var getNotificationTypeName = (type) => {
472
472
  return "Unknown";
473
473
  }
474
474
  };
475
+
476
+ // src/meta/common/label.ts
477
+ var ATTRIBUTE_LABEL_COMMON = {
478
+ handedness: "Handedness",
479
+ gender: "Gender",
480
+ dob: "Date of Birth"
481
+ };
482
+
483
+ // src/meta/uoi/sports/tennis/label.ts
484
+ var ATTRIBUTE_LABEL_UOI_SPORTS_TENNIS = {
485
+ level: "Level",
486
+ backhand: "Backhand",
487
+ handedness: "Handedness"
488
+ };
489
+
490
+ // src/meta/uoi/sports/basketball/label.ts
491
+ var ATTRIBUTE_LABEL_UOI_SPORTS_BASKETBALL = {
492
+ positions: "Positions"
493
+ };
494
+
495
+ // src/meta/uoi/sports/label.ts
496
+ var ATTRIBUTE_LABEL_UOI_SPORTS = {
497
+ tennis: ATTRIBUTE_LABEL_UOI_SPORTS_TENNIS,
498
+ basketball: ATTRIBUTE_LABEL_UOI_SPORTS_BASKETBALL
499
+ };
500
+
501
+ // src/meta/uoi/label.ts
502
+ var ATTRIBUTE_LABEL_UOI = {
503
+ sports: ATTRIBUTE_LABEL_UOI_SPORTS
504
+ };
505
+
506
+ // src/meta/collection/pets/label.ts
507
+ var ATTRIBUTE_LABEL_COLLECTION_PETS = {
508
+ breed: "Breed",
509
+ father: "Father",
510
+ mother: "Mother",
511
+ gender: "Gender",
512
+ height: "Height",
513
+ weight: "Weight",
514
+ children: "Children"
515
+ };
516
+
517
+ // src/meta/collection/label.ts
518
+ var ATTRIBUTE_LABEL_COLLECTION = {
519
+ pets: ATTRIBUTE_LABEL_COLLECTION_PETS
520
+ };
521
+
522
+ // src/meta/label.ts
523
+ var ATTRIBUTE_LABEL = {
524
+ [2 /* Uoi */]: ATTRIBUTE_LABEL_UOI,
525
+ [5 /* Collection */]: ATTRIBUTE_LABEL_COLLECTION,
526
+ [0 /* None */]: ATTRIBUTE_LABEL_COMMON
527
+ };
528
+
529
+ // src/meta/util.ts
530
+ var getProfileAttributeLabel = ({
531
+ profileType,
532
+ categoryType,
533
+ interestType,
534
+ attributeType
535
+ }) => {
536
+ let titles = ATTRIBUTE_LABEL[profileType];
537
+ if (categoryType) {
538
+ titles = (titles == null ? void 0 : titles[categoryType]) || {};
539
+ }
540
+ if (interestType) {
541
+ titles = (titles == null ? void 0 : titles[interestType]) || {};
542
+ }
543
+ return (titles == null ? void 0 : titles[attributeType]) || "";
544
+ };
475
545
  export {
546
+ ATTRIBUTE_LABEL,
547
+ ATTRIBUTE_LABEL_COLLECTION,
548
+ ATTRIBUTE_LABEL_COLLECTION_PETS,
549
+ ATTRIBUTE_LABEL_COMMON,
550
+ ATTRIBUTE_LABEL_UOI,
551
+ ATTRIBUTE_LABEL_UOI_SPORTS,
552
+ ATTRIBUTE_LABEL_UOI_SPORTS_BASKETBALL,
553
+ ATTRIBUTE_LABEL_UOI_SPORTS_TENNIS,
476
554
  AccountStatus,
477
555
  AdminAccountStatus,
478
556
  AttendanceStatus,
@@ -510,6 +588,7 @@ export {
510
588
  getMemberingStatusName,
511
589
  getNotificationTypeName,
512
590
  getPIDPrefixByProfileType,
591
+ getProfileAttributeLabel,
513
592
  getProfileTypeByPID,
514
593
  getProfileTypeName,
515
594
  isGamePID,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wenum",
3
- "version": "1.50.0",
3
+ "version": "1.52.0",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/index.mjs",
6
6
  "types": "dist/index.d.ts",
package/src/index.ts CHANGED
@@ -5,4 +5,5 @@ export * from './attribute';
5
5
  export * from './comment';
6
6
  export * from './interest';
7
7
  export * from './common';
8
- export * from './notification';
8
+ export * from './notification';
9
+ export * from './meta';
@@ -0,0 +1,3 @@
1
+ export * from './pets';
2
+ export * from './type';
3
+ export * from './label';
@@ -0,0 +1,6 @@
1
+ import { CategoryType } from 'src/interest';
2
+ import { ATTRIBUTE_LABEL_COLLECTION_PETS } from './pets';
3
+
4
+ export const ATTRIBUTE_LABEL_COLLECTION: Partial<Record<CategoryType, any>> = {
5
+ pets: ATTRIBUTE_LABEL_COLLECTION_PETS
6
+ };
@@ -0,0 +1,2 @@
1
+ export * from './type';
2
+ export * from './label';
@@ -0,0 +1,11 @@
1
+ import { AttributeTypeCollectionPets } from './type';
2
+
3
+ export const ATTRIBUTE_LABEL_COLLECTION_PETS: Record<AttributeTypeCollectionPets, string> = {
4
+ breed: 'Breed',
5
+ father: 'Father',
6
+ mother: 'Mother',
7
+ gender: 'Gender',
8
+ height: 'Height',
9
+ weight: 'Weight',
10
+ children: 'Children'
11
+ };
@@ -0,0 +1,8 @@
1
+ export type AttributeTypeCollectionPets =
2
+ | 'breed'
3
+ | 'father'
4
+ | 'mother'
5
+ | 'gender'
6
+ | 'height'
7
+ | 'weight'
8
+ | 'children';
@@ -0,0 +1,3 @@
1
+ import { AttributeTypeCollectionPets } from './pets';
2
+
3
+ export type AttributeTypeCollection = AttributeTypeCollectionPets;
@@ -0,0 +1,2 @@
1
+ export * from './label';
2
+ export * from './type';
@@ -0,0 +1,7 @@
1
+ import { AttributeTypeCommon } from './type';
2
+
3
+ export const ATTRIBUTE_LABEL_COMMON: Record<AttributeTypeCommon, string> = {
4
+ handedness: 'Handedness',
5
+ gender: 'Gender',
6
+ dob: 'Date of Birth'
7
+ };
@@ -0,0 +1,5 @@
1
+ export type AttributeTypeCommon =
2
+ | 'handedness'
3
+ | 'gender'
4
+ | 'dob'
5
+ ;
@@ -0,0 +1,6 @@
1
+ export * from './common';
2
+ export * from './uoi';
3
+ export * from './collection';
4
+ export * from './label';
5
+ export * from './type';
6
+ export * from './util';
@@ -0,0 +1,11 @@
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
+ [ProfileType.Uoi]: ATTRIBUTE_LABEL_UOI,
9
+ [ProfileType.Collection]: ATTRIBUTE_LABEL_COLLECTION,
10
+ [ProfileType.None]: ATTRIBUTE_LABEL_COMMON,
11
+ };
@@ -0,0 +1,9 @@
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;
@@ -0,0 +1,3 @@
1
+ export * from './sports';
2
+ export * from './label';
3
+ export * from './type';
@@ -0,0 +1,6 @@
1
+ import { CategoryType } from 'src/interest';
2
+ import { ATTRIBUTE_LABEL_UOI_SPORTS } from './sports';
3
+
4
+ export const ATTRIBUTE_LABEL_UOI: Partial<Record<CategoryType, any>> = {
5
+ sports: ATTRIBUTE_LABEL_UOI_SPORTS,
6
+ };
@@ -0,0 +1,2 @@
1
+ export * from './label';
2
+ export * from './type';
@@ -0,0 +1,8 @@
1
+ import { AttributeTypeUoiSportsBasketball } from './type';
2
+
3
+ export const ATTRIBUTE_LABEL_UOI_SPORTS_BASKETBALL: Record<
4
+ AttributeTypeUoiSportsBasketball,
5
+ string
6
+ > = {
7
+ positions: 'Positions'
8
+ };
@@ -0,0 +1,3 @@
1
+ export type AttributeTypeUoiSportsBasketball = 'positions';
2
+
3
+
@@ -0,0 +1,4 @@
1
+ export * from './tennis';
2
+ export * from './basketball';
3
+ export * from './label';
4
+ export * from './type';
@@ -0,0 +1,8 @@
1
+ import { SportsInterestType } from 'src/interest';
2
+ import { ATTRIBUTE_LABEL_UOI_SPORTS_BASKETBALL } from './basketball';
3
+ import { ATTRIBUTE_LABEL_UOI_SPORTS_TENNIS } from './tennis';
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,
8
+ };
@@ -0,0 +1,2 @@
1
+ export * from './label';
2
+ export * from './type';
@@ -0,0 +1,7 @@
1
+ import { AttributeTypeUoiSportsTennis } from './type';
2
+
3
+ export const ATTRIBUTE_LABEL_UOI_SPORTS_TENNIS: Record<AttributeTypeUoiSportsTennis, string> = {
4
+ level: 'Level',
5
+ backhand: 'Backhand',
6
+ handedness: 'Handedness'
7
+ };
@@ -0,0 +1,5 @@
1
+ export type AttributeTypeUoiSportsTennis =
2
+ | 'level'
3
+ | 'backhand'
4
+ | 'handedness'
5
+ ;
@@ -0,0 +1,6 @@
1
+ import { AttributeTypeUoiSportsBasketball } from './basketball/type';
2
+ import { AttributeTypeUoiSportsTennis } from './tennis/type';
3
+
4
+ export type AttributeTypeUoiSports =
5
+ | AttributeTypeUoiSportsTennis
6
+ | AttributeTypeUoiSportsBasketball;
@@ -0,0 +1,3 @@
1
+ import { AttributeTypeUoiSports } from './sports';
2
+
3
+ export type AttributeTypeUoi = AttributeTypeUoiSports;
@@ -0,0 +1,25 @@
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
+ };
@@ -1,4 +1,4 @@
1
1
  import { CollectionTypePets } from './pets';
2
2
  import { CollectionTypeSports } from './sports';
3
3
 
4
- export type CollectionType = CollectionTypePets | CollectionTypeSports | '';
4
+ export type CollectionType = CollectionTypePets | CollectionTypeSports;
@@ -1 +1 @@
1
- export type CollectionTypeCat = '0cat' | 'bed' | 'cage' | 'carrier' | 'clothing' | 'food' ;
1
+ export type CollectionTypeCat = '0cat' | 'bed' | 'cage' | 'carrier' | 'clothing' | 'food' | 'other';
@@ -1 +1 @@
1
- export type CollectionTypeDog = '0dog' |'bed' | 'cage' | 'carrier' | 'clothing' | 'collar' | 'food' | 'house' | 'leash';
1
+ export type CollectionTypeDog = '0dog' |'bed' | 'cage' | 'carrier' | 'clothing' | 'collar' | 'food' | 'house' | 'leash' |'other';
@@ -1 +1 @@
1
- export type CollectionTypeTennis = '0racket' | 'ball' | 'ballmachine' | 'shoes' | 'overgrip' | 'tennisstring';
1
+ export type CollectionTypeTennis = '0racket' | 'ball' | 'ballmachine' | 'shoes' | 'overgrip' | 'tennisstring' | 'other';
@@ -1,3 +1,3 @@
1
1
  import { GameTypeSports } from './sports';
2
2
 
3
- export type GameType = GameTypeSports | '';
3
+ export type GameType = GameTypeSports;
package/tsconfig.json CHANGED
@@ -27,9 +27,8 @@
27
27
 
28
28
  /* Modules */
29
29
  "module": "commonjs", /* Specify what module code is generated. */
30
- // "rootDir": "./", /* Specify the root folder within your source files. */
31
30
  // "moduleResolution": "node10", /* Specify how TypeScript looks up a file from a given module specifier. */
32
- // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */
31
+ "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */
33
32
  // "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */
34
33
  // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */
35
34
  // "typeRoots": [], /* Specify multiple folders that act like './node_modules/@types'. */