wenum 1.51.0 → 1.52.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +40 -1
- package/dist/index.d.ts +40 -1
- package/dist/index.js +89 -0
- package/dist/index.mjs +80 -0
- package/package.json +1 -1
- package/src/index.ts +2 -1
- package/src/meta/collection/index.ts +3 -0
- package/src/meta/collection/label.ts +6 -0
- package/src/meta/collection/pets/index.ts +2 -0
- package/src/meta/collection/pets/label.ts +12 -0
- package/src/meta/collection/pets/type.ts +8 -0
- package/src/meta/collection/type.ts +3 -0
- package/src/meta/common/index.ts +2 -0
- package/src/meta/common/label.ts +7 -0
- package/src/meta/common/type.ts +5 -0
- package/src/meta/index.ts +6 -0
- package/src/meta/label.ts +11 -0
- package/src/meta/type.ts +9 -0
- package/src/meta/uoi/index.ts +3 -0
- package/src/meta/uoi/label.ts +6 -0
- package/src/meta/uoi/sports/basketball/index.ts +2 -0
- package/src/meta/uoi/sports/basketball/label.ts +8 -0
- package/src/meta/uoi/sports/basketball/type.ts +3 -0
- package/src/meta/uoi/sports/index.ts +4 -0
- package/src/meta/uoi/sports/label.ts +8 -0
- package/src/meta/uoi/sports/tennis/index.ts +2 -0
- package/src/meta/uoi/sports/tennis/label.ts +7 -0
- package/src/meta/uoi/sports/tennis/type.ts +5 -0
- package/src/meta/uoi/sports/type.ts +6 -0
- package/src/meta/uoi/type.ts +3 -0
- package/src/meta/util.ts +25 -0
- package/tsconfig.json +1 -2
package/dist/index.d.mts
CHANGED
|
@@ -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
|
-
|
|
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 = 'dob' | '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
|
@@ -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
|
-
|
|
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 = 'dob' | '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,87 @@ 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
|
+
dob: "Date of Birth"
|
|
593
|
+
};
|
|
594
|
+
|
|
595
|
+
// src/meta/collection/label.ts
|
|
596
|
+
var ATTRIBUTE_LABEL_COLLECTION = {
|
|
597
|
+
pets: ATTRIBUTE_LABEL_COLLECTION_PETS
|
|
598
|
+
};
|
|
599
|
+
|
|
600
|
+
// src/meta/label.ts
|
|
601
|
+
var ATTRIBUTE_LABEL = {
|
|
602
|
+
[2 /* Uoi */]: ATTRIBUTE_LABEL_UOI,
|
|
603
|
+
[5 /* Collection */]: ATTRIBUTE_LABEL_COLLECTION,
|
|
604
|
+
[0 /* None */]: ATTRIBUTE_LABEL_COMMON
|
|
605
|
+
};
|
|
606
|
+
|
|
607
|
+
// src/meta/util.ts
|
|
608
|
+
var getProfileAttributeLabel = ({
|
|
609
|
+
profileType,
|
|
610
|
+
categoryType,
|
|
611
|
+
interestType,
|
|
612
|
+
attributeType
|
|
613
|
+
}) => {
|
|
614
|
+
let titles = ATTRIBUTE_LABEL[profileType];
|
|
615
|
+
if (categoryType) {
|
|
616
|
+
titles = (titles == null ? void 0 : titles[categoryType]) || {};
|
|
617
|
+
}
|
|
618
|
+
if (interestType) {
|
|
619
|
+
titles = (titles == null ? void 0 : titles[interestType]) || {};
|
|
620
|
+
}
|
|
621
|
+
return (titles == null ? void 0 : titles[attributeType]) || "";
|
|
622
|
+
};
|
|
543
623
|
// Annotate the CommonJS export names for ESM import in node:
|
|
544
624
|
0 && (module.exports = {
|
|
625
|
+
ATTRIBUTE_LABEL,
|
|
626
|
+
ATTRIBUTE_LABEL_COLLECTION,
|
|
627
|
+
ATTRIBUTE_LABEL_COLLECTION_PETS,
|
|
628
|
+
ATTRIBUTE_LABEL_COMMON,
|
|
629
|
+
ATTRIBUTE_LABEL_UOI,
|
|
630
|
+
ATTRIBUTE_LABEL_UOI_SPORTS,
|
|
631
|
+
ATTRIBUTE_LABEL_UOI_SPORTS_BASKETBALL,
|
|
632
|
+
ATTRIBUTE_LABEL_UOI_SPORTS_TENNIS,
|
|
545
633
|
AccountStatus,
|
|
546
634
|
AdminAccountStatus,
|
|
547
635
|
AttendanceStatus,
|
|
@@ -579,6 +667,7 @@ var getNotificationTypeName = (type) => {
|
|
|
579
667
|
getMemberingStatusName,
|
|
580
668
|
getNotificationTypeName,
|
|
581
669
|
getPIDPrefixByProfileType,
|
|
670
|
+
getProfileAttributeLabel,
|
|
582
671
|
getProfileTypeByPID,
|
|
583
672
|
getProfileTypeName,
|
|
584
673
|
isGamePID,
|
package/dist/index.mjs
CHANGED
|
@@ -472,7 +472,86 @@ 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
|
+
dob: "Date of Birth"
|
|
516
|
+
};
|
|
517
|
+
|
|
518
|
+
// src/meta/collection/label.ts
|
|
519
|
+
var ATTRIBUTE_LABEL_COLLECTION = {
|
|
520
|
+
pets: ATTRIBUTE_LABEL_COLLECTION_PETS
|
|
521
|
+
};
|
|
522
|
+
|
|
523
|
+
// src/meta/label.ts
|
|
524
|
+
var ATTRIBUTE_LABEL = {
|
|
525
|
+
[2 /* Uoi */]: ATTRIBUTE_LABEL_UOI,
|
|
526
|
+
[5 /* Collection */]: ATTRIBUTE_LABEL_COLLECTION,
|
|
527
|
+
[0 /* None */]: ATTRIBUTE_LABEL_COMMON
|
|
528
|
+
};
|
|
529
|
+
|
|
530
|
+
// src/meta/util.ts
|
|
531
|
+
var getProfileAttributeLabel = ({
|
|
532
|
+
profileType,
|
|
533
|
+
categoryType,
|
|
534
|
+
interestType,
|
|
535
|
+
attributeType
|
|
536
|
+
}) => {
|
|
537
|
+
let titles = ATTRIBUTE_LABEL[profileType];
|
|
538
|
+
if (categoryType) {
|
|
539
|
+
titles = (titles == null ? void 0 : titles[categoryType]) || {};
|
|
540
|
+
}
|
|
541
|
+
if (interestType) {
|
|
542
|
+
titles = (titles == null ? void 0 : titles[interestType]) || {};
|
|
543
|
+
}
|
|
544
|
+
return (titles == null ? void 0 : titles[attributeType]) || "";
|
|
545
|
+
};
|
|
475
546
|
export {
|
|
547
|
+
ATTRIBUTE_LABEL,
|
|
548
|
+
ATTRIBUTE_LABEL_COLLECTION,
|
|
549
|
+
ATTRIBUTE_LABEL_COLLECTION_PETS,
|
|
550
|
+
ATTRIBUTE_LABEL_COMMON,
|
|
551
|
+
ATTRIBUTE_LABEL_UOI,
|
|
552
|
+
ATTRIBUTE_LABEL_UOI_SPORTS,
|
|
553
|
+
ATTRIBUTE_LABEL_UOI_SPORTS_BASKETBALL,
|
|
554
|
+
ATTRIBUTE_LABEL_UOI_SPORTS_TENNIS,
|
|
476
555
|
AccountStatus,
|
|
477
556
|
AdminAccountStatus,
|
|
478
557
|
AttendanceStatus,
|
|
@@ -510,6 +589,7 @@ export {
|
|
|
510
589
|
getMemberingStatusName,
|
|
511
590
|
getNotificationTypeName,
|
|
512
591
|
getPIDPrefixByProfileType,
|
|
592
|
+
getProfileAttributeLabel,
|
|
513
593
|
getProfileTypeByPID,
|
|
514
594
|
getProfileTypeName,
|
|
515
595
|
isGamePID,
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -0,0 +1,12 @@
|
|
|
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
|
+
dob: 'Date of Birth',
|
|
12
|
+
};
|
|
@@ -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
|
+
};
|
package/src/meta/type.ts
ADDED
|
@@ -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
|
+
};
|
package/src/meta/util.ts
ADDED
|
@@ -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
|
+
};
|
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
|
-
|
|
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'. */
|