wenum 1.30.0 → 1.32.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -210,7 +210,8 @@ declare enum FollowingStatus {
210
210
  }
211
211
 
212
212
  declare enum AttributeTypeCommon {
213
- Handedness = 0
213
+ Handedness = 0,
214
+ Gender = 1
214
215
  }
215
216
 
216
217
  declare const ATTRIBUTE_LABEL_COMMON: Partial<Record<AttributeTypeCommon, any>>;
@@ -220,6 +221,11 @@ declare enum Handedness {
220
221
  Left = 1,
221
222
  Right = 2
222
223
  }
224
+ declare enum Gender {
225
+ None = 0,
226
+ Male = 1,
227
+ Female = 2
228
+ }
223
229
 
224
230
  declare enum AttributeTypeUoiSportsTennis {
225
231
  Level = 0,
@@ -338,11 +344,12 @@ declare const ATTRIBUTE_LABEL: Partial<Record<ProfileType, any>>;
338
344
 
339
345
  type AttributeType = AttributeTypeUoi | AttributeTypeCollection | AttributeTypeCommon;
340
346
 
341
- declare enum Gender {
342
- None = 0,
343
- Male = 1,
344
- Female = 2
345
- }
347
+ declare const getProfileAttributeLabel: ({ profileType, categoryName, interestName, attributeType }: {
348
+ profileType: ProfileType;
349
+ categoryName?: CategoryName;
350
+ interestName?: InterestName;
351
+ attributeType: AttributeType;
352
+ }) => any;
346
353
 
347
354
  declare enum PageUpdateType {
348
355
  None = 0,
@@ -367,7 +374,7 @@ declare enum LengthUnit {
367
374
  Meter = 0,
368
375
  CM = 1,
369
376
  KM = 2,
370
- Foott = 3,
377
+ Foot = 3,
371
378
  Inch = 4,
372
379
  Mile = 5,
373
380
  Yard = 6
@@ -379,4 +386,4 @@ declare enum WeightUnit {
379
386
  Ounce = 3
380
387
  }
381
388
 
382
- export { ATTRIBUTE_LABEL, ATTRIBUTE_LABEL_COLLECTION, 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, AttributeTypeCollectionPets, AttributeTypeCommon, type AttributeTypeUoi, type AttributeTypeUoiSports, AttributeTypeUoiSportsBasketball, AttributeTypeUoiSportsTennis, AvatarType, BasketballPosition, BuddyingStatus, CategoryName, ChallengeStatus, CollectionMetaStatus, CollectionType, ConnectionType, DuelGameResultType, FollowingStatus, GameType, Gender, Handedness, type InterestName, InterestNameNone, LeaderboardOrder, LeaderboardType, LengthUnit, LocationType, MarketMetaStatus, MarketType, MemberingStatus, MusicInterestName, PageType, PageUpdateType, PetsInterestName, PostPrivacy, PostType, ProfilePermission, ProfilePrivacy, ProfileStatus, ProfileType, Pronoun, SportsInterestName, SubjectType, TennisBackhand, TennisLevel, WeightUnit };
389
+ export { ATTRIBUTE_LABEL, ATTRIBUTE_LABEL_COLLECTION, 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, AttributeTypeCollectionPets, AttributeTypeCommon, type AttributeTypeUoi, type AttributeTypeUoiSports, AttributeTypeUoiSportsBasketball, AttributeTypeUoiSportsTennis, AvatarType, BasketballPosition, BuddyingStatus, CategoryName, ChallengeStatus, CollectionMetaStatus, CollectionType, ConnectionType, DuelGameResultType, FollowingStatus, GameType, Gender, Handedness, type InterestName, InterestNameNone, LeaderboardOrder, LeaderboardType, LengthUnit, LocationType, MarketMetaStatus, MarketType, MemberingStatus, MusicInterestName, PageType, PageUpdateType, PetsInterestName, PostPrivacy, PostType, ProfilePermission, ProfilePrivacy, ProfileStatus, ProfileType, Pronoun, SportsInterestName, SubjectType, TennisBackhand, TennisLevel, WeightUnit, getProfileAttributeLabel };
package/dist/index.d.ts CHANGED
@@ -210,7 +210,8 @@ declare enum FollowingStatus {
210
210
  }
211
211
 
212
212
  declare enum AttributeTypeCommon {
213
- Handedness = 0
213
+ Handedness = 0,
214
+ Gender = 1
214
215
  }
215
216
 
216
217
  declare const ATTRIBUTE_LABEL_COMMON: Partial<Record<AttributeTypeCommon, any>>;
@@ -220,6 +221,11 @@ declare enum Handedness {
220
221
  Left = 1,
221
222
  Right = 2
222
223
  }
224
+ declare enum Gender {
225
+ None = 0,
226
+ Male = 1,
227
+ Female = 2
228
+ }
223
229
 
224
230
  declare enum AttributeTypeUoiSportsTennis {
225
231
  Level = 0,
@@ -338,11 +344,12 @@ declare const ATTRIBUTE_LABEL: Partial<Record<ProfileType, any>>;
338
344
 
339
345
  type AttributeType = AttributeTypeUoi | AttributeTypeCollection | AttributeTypeCommon;
340
346
 
341
- declare enum Gender {
342
- None = 0,
343
- Male = 1,
344
- Female = 2
345
- }
347
+ declare const getProfileAttributeLabel: ({ profileType, categoryName, interestName, attributeType }: {
348
+ profileType: ProfileType;
349
+ categoryName?: CategoryName;
350
+ interestName?: InterestName;
351
+ attributeType: AttributeType;
352
+ }) => any;
346
353
 
347
354
  declare enum PageUpdateType {
348
355
  None = 0,
@@ -367,7 +374,7 @@ declare enum LengthUnit {
367
374
  Meter = 0,
368
375
  CM = 1,
369
376
  KM = 2,
370
- Foott = 3,
377
+ Foot = 3,
371
378
  Inch = 4,
372
379
  Mile = 5,
373
380
  Yard = 6
@@ -379,4 +386,4 @@ declare enum WeightUnit {
379
386
  Ounce = 3
380
387
  }
381
388
 
382
- export { ATTRIBUTE_LABEL, ATTRIBUTE_LABEL_COLLECTION, 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, AttributeTypeCollectionPets, AttributeTypeCommon, type AttributeTypeUoi, type AttributeTypeUoiSports, AttributeTypeUoiSportsBasketball, AttributeTypeUoiSportsTennis, AvatarType, BasketballPosition, BuddyingStatus, CategoryName, ChallengeStatus, CollectionMetaStatus, CollectionType, ConnectionType, DuelGameResultType, FollowingStatus, GameType, Gender, Handedness, type InterestName, InterestNameNone, LeaderboardOrder, LeaderboardType, LengthUnit, LocationType, MarketMetaStatus, MarketType, MemberingStatus, MusicInterestName, PageType, PageUpdateType, PetsInterestName, PostPrivacy, PostType, ProfilePermission, ProfilePrivacy, ProfileStatus, ProfileType, Pronoun, SportsInterestName, SubjectType, TennisBackhand, TennisLevel, WeightUnit };
389
+ export { ATTRIBUTE_LABEL, ATTRIBUTE_LABEL_COLLECTION, 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, AttributeTypeCollectionPets, AttributeTypeCommon, type AttributeTypeUoi, type AttributeTypeUoiSports, AttributeTypeUoiSportsBasketball, AttributeTypeUoiSportsTennis, AvatarType, BasketballPosition, BuddyingStatus, CategoryName, ChallengeStatus, CollectionMetaStatus, CollectionType, ConnectionType, DuelGameResultType, FollowingStatus, GameType, Gender, Handedness, type InterestName, InterestNameNone, LeaderboardOrder, LeaderboardType, LengthUnit, LocationType, MarketMetaStatus, MarketType, MemberingStatus, MusicInterestName, PageType, PageUpdateType, PetsInterestName, PostPrivacy, PostType, ProfilePermission, ProfilePrivacy, ProfileStatus, ProfileType, Pronoun, SportsInterestName, SubjectType, TennisBackhand, TennisLevel, WeightUnit, getProfileAttributeLabel };
package/dist/index.js CHANGED
@@ -70,7 +70,8 @@ __export(index_exports, {
70
70
  SubjectType: () => SubjectType,
71
71
  TennisBackhand: () => TennisBackhand,
72
72
  TennisLevel: () => TennisLevel,
73
- WeightUnit: () => WeightUnit
73
+ WeightUnit: () => WeightUnit,
74
+ getProfileAttributeLabel: () => getProfileAttributeLabel
74
75
  });
75
76
  module.exports = __toCommonJS(index_exports);
76
77
 
@@ -326,12 +327,14 @@ var FollowingStatus = /* @__PURE__ */ ((FollowingStatus2) => {
326
327
  // src/attribute/common/type.ts
327
328
  var AttributeTypeCommon = /* @__PURE__ */ ((AttributeTypeCommon2) => {
328
329
  AttributeTypeCommon2[AttributeTypeCommon2["Handedness"] = 0] = "Handedness";
330
+ AttributeTypeCommon2[AttributeTypeCommon2["Gender"] = 1] = "Gender";
329
331
  return AttributeTypeCommon2;
330
332
  })(AttributeTypeCommon || {});
331
333
 
332
334
  // src/attribute/common/label.ts
333
335
  var ATTRIBUTE_LABEL_COMMON = {
334
- [0 /* Handedness */]: "Handedness"
336
+ [0 /* Handedness */]: "Handedness",
337
+ [1 /* Gender */]: "Gender"
335
338
  };
336
339
 
337
340
  // src/attribute/common/common.ts
@@ -341,6 +344,12 @@ var Handedness = /* @__PURE__ */ ((Handedness2) => {
341
344
  Handedness2[Handedness2["Right"] = 2] = "Right";
342
345
  return Handedness2;
343
346
  })(Handedness || {});
347
+ var Gender = /* @__PURE__ */ ((Gender2) => {
348
+ Gender2[Gender2["None"] = 0] = "None";
349
+ Gender2[Gender2["Male"] = 1] = "Male";
350
+ Gender2[Gender2["Female"] = 2] = "Female";
351
+ return Gender2;
352
+ })(Gender || {});
344
353
 
345
354
  // src/attribute/uoi/sports/tennis/type.ts
346
355
  var AttributeTypeUoiSportsTennis = /* @__PURE__ */ ((AttributeTypeUoiSportsTennis2) => {
@@ -492,13 +501,22 @@ var ATTRIBUTE_LABEL = {
492
501
  [0 /* None */]: ATTRIBUTE_LABEL_COMMON
493
502
  };
494
503
 
495
- // src/attribute/attributes.ts
496
- var Gender = /* @__PURE__ */ ((Gender2) => {
497
- Gender2[Gender2["None"] = 0] = "None";
498
- Gender2[Gender2["Male"] = 1] = "Male";
499
- Gender2[Gender2["Female"] = 2] = "Female";
500
- return Gender2;
501
- })(Gender || {});
504
+ // src/attribute/util.ts
505
+ var getProfileAttributeLabel = ({
506
+ profileType,
507
+ categoryName,
508
+ interestName,
509
+ attributeType
510
+ }) => {
511
+ let titles = ATTRIBUTE_LABEL[profileType];
512
+ if (categoryName) {
513
+ titles = (titles == null ? void 0 : titles[categoryName]) || {};
514
+ }
515
+ if (interestName) {
516
+ titles = (titles == null ? void 0 : titles[interestName]) || {};
517
+ }
518
+ return (titles == null ? void 0 : titles[attributeType]) || "";
519
+ };
502
520
 
503
521
  // src/pageUpdate.ts
504
522
  var PageUpdateType = /* @__PURE__ */ ((PageUpdateType2) => {
@@ -529,7 +547,7 @@ var LengthUnit = /* @__PURE__ */ ((LengthUnit2) => {
529
547
  LengthUnit2[LengthUnit2["Meter"] = 0] = "Meter";
530
548
  LengthUnit2[LengthUnit2["CM"] = 1] = "CM";
531
549
  LengthUnit2[LengthUnit2["KM"] = 2] = "KM";
532
- LengthUnit2[LengthUnit2["Foott"] = 3] = "Foott";
550
+ LengthUnit2[LengthUnit2["Foot"] = 3] = "Foot";
533
551
  LengthUnit2[LengthUnit2["Inch"] = 4] = "Inch";
534
552
  LengthUnit2[LengthUnit2["Mile"] = 5] = "Mile";
535
553
  LengthUnit2[LengthUnit2["Yard"] = 6] = "Yard";
@@ -594,5 +612,6 @@ var WeightUnit = /* @__PURE__ */ ((WeightUnit2) => {
594
612
  SubjectType,
595
613
  TennisBackhand,
596
614
  TennisLevel,
597
- WeightUnit
615
+ WeightUnit,
616
+ getProfileAttributeLabel
598
617
  });
package/dist/index.mjs CHANGED
@@ -250,12 +250,14 @@ var FollowingStatus = /* @__PURE__ */ ((FollowingStatus2) => {
250
250
  // src/attribute/common/type.ts
251
251
  var AttributeTypeCommon = /* @__PURE__ */ ((AttributeTypeCommon2) => {
252
252
  AttributeTypeCommon2[AttributeTypeCommon2["Handedness"] = 0] = "Handedness";
253
+ AttributeTypeCommon2[AttributeTypeCommon2["Gender"] = 1] = "Gender";
253
254
  return AttributeTypeCommon2;
254
255
  })(AttributeTypeCommon || {});
255
256
 
256
257
  // src/attribute/common/label.ts
257
258
  var ATTRIBUTE_LABEL_COMMON = {
258
- [0 /* Handedness */]: "Handedness"
259
+ [0 /* Handedness */]: "Handedness",
260
+ [1 /* Gender */]: "Gender"
259
261
  };
260
262
 
261
263
  // src/attribute/common/common.ts
@@ -265,6 +267,12 @@ var Handedness = /* @__PURE__ */ ((Handedness2) => {
265
267
  Handedness2[Handedness2["Right"] = 2] = "Right";
266
268
  return Handedness2;
267
269
  })(Handedness || {});
270
+ var Gender = /* @__PURE__ */ ((Gender2) => {
271
+ Gender2[Gender2["None"] = 0] = "None";
272
+ Gender2[Gender2["Male"] = 1] = "Male";
273
+ Gender2[Gender2["Female"] = 2] = "Female";
274
+ return Gender2;
275
+ })(Gender || {});
268
276
 
269
277
  // src/attribute/uoi/sports/tennis/type.ts
270
278
  var AttributeTypeUoiSportsTennis = /* @__PURE__ */ ((AttributeTypeUoiSportsTennis2) => {
@@ -416,13 +424,22 @@ var ATTRIBUTE_LABEL = {
416
424
  [0 /* None */]: ATTRIBUTE_LABEL_COMMON
417
425
  };
418
426
 
419
- // src/attribute/attributes.ts
420
- var Gender = /* @__PURE__ */ ((Gender2) => {
421
- Gender2[Gender2["None"] = 0] = "None";
422
- Gender2[Gender2["Male"] = 1] = "Male";
423
- Gender2[Gender2["Female"] = 2] = "Female";
424
- return Gender2;
425
- })(Gender || {});
427
+ // src/attribute/util.ts
428
+ var getProfileAttributeLabel = ({
429
+ profileType,
430
+ categoryName,
431
+ interestName,
432
+ attributeType
433
+ }) => {
434
+ let titles = ATTRIBUTE_LABEL[profileType];
435
+ if (categoryName) {
436
+ titles = (titles == null ? void 0 : titles[categoryName]) || {};
437
+ }
438
+ if (interestName) {
439
+ titles = (titles == null ? void 0 : titles[interestName]) || {};
440
+ }
441
+ return (titles == null ? void 0 : titles[attributeType]) || "";
442
+ };
426
443
 
427
444
  // src/pageUpdate.ts
428
445
  var PageUpdateType = /* @__PURE__ */ ((PageUpdateType2) => {
@@ -453,7 +470,7 @@ var LengthUnit = /* @__PURE__ */ ((LengthUnit2) => {
453
470
  LengthUnit2[LengthUnit2["Meter"] = 0] = "Meter";
454
471
  LengthUnit2[LengthUnit2["CM"] = 1] = "CM";
455
472
  LengthUnit2[LengthUnit2["KM"] = 2] = "KM";
456
- LengthUnit2[LengthUnit2["Foott"] = 3] = "Foott";
473
+ LengthUnit2[LengthUnit2["Foot"] = 3] = "Foot";
457
474
  LengthUnit2[LengthUnit2["Inch"] = 4] = "Inch";
458
475
  LengthUnit2[LengthUnit2["Mile"] = 5] = "Mile";
459
476
  LengthUnit2[LengthUnit2["Yard"] = 6] = "Yard";
@@ -517,5 +534,6 @@ export {
517
534
  SubjectType,
518
535
  TennisBackhand,
519
536
  TennisLevel,
520
- WeightUnit
537
+ WeightUnit,
538
+ getProfileAttributeLabel
521
539
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wenum",
3
- "version": "1.30.0",
3
+ "version": "1.32.0",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/index.mjs",
6
6
  "types": "dist/index.d.ts",
@@ -1,3 +1,7 @@
1
1
  export enum Handedness {
2
2
  None, Left, Right,
3
3
  }
4
+
5
+ export enum Gender {
6
+ None, Male, Female,
7
+ }
@@ -2,4 +2,5 @@ import { AttributeTypeCommon } from './type';
2
2
 
3
3
  export const ATTRIBUTE_LABEL_COMMON: Partial<Record<AttributeTypeCommon, any>> = {
4
4
  [AttributeTypeCommon.Handedness]: 'Handedness',
5
+ [AttributeTypeCommon.Gender]: 'Gender',
5
6
  };
@@ -1,3 +1,4 @@
1
1
  export enum AttributeTypeCommon {
2
2
  Handedness,
3
+ Gender,
3
4
  }
@@ -3,4 +3,4 @@ export * from './uoi';
3
3
  export * from './collection';
4
4
  export * from './label';
5
5
  export * from './type';
6
- export * from './attributes';
6
+ export * from './util';
@@ -0,0 +1,25 @@
1
+ import { CategoryName, InterestName } from '../interest';
2
+ import { ProfileType } from '../page';
3
+ import { ATTRIBUTE_LABEL } from './label';
4
+ import { AttributeType } from './type';
5
+
6
+ export const getProfileAttributeLabel = ({
7
+ profileType,
8
+ categoryName,
9
+ interestName,
10
+ attributeType
11
+ }:{
12
+ profileType: ProfileType,
13
+ categoryName?: CategoryName,
14
+ interestName?: InterestName,
15
+ attributeType: AttributeType,
16
+ }) => {
17
+ let titles: any = ATTRIBUTE_LABEL[profileType];
18
+ if (categoryName) {
19
+ titles = titles?.[categoryName] || {};
20
+ }
21
+ if (interestName) {
22
+ titles = titles?.[interestName] || {};
23
+ }
24
+ return titles?.[attributeType as any] || '';
25
+ };
@@ -1,5 +1,5 @@
1
1
  export enum LengthUnit {
2
- Meter, CM, KM, Foott, Inch, Mile, Yard,
2
+ Meter, CM, KM, Foot, Inch, Mile, Yard,
3
3
  }
4
4
 
5
5
  export enum WeightUnit {
@@ -1,3 +0,0 @@
1
- export enum Gender {
2
- None, Male, Female,
3
- }