wenum 1.80.0 → 1.81.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 CHANGED
@@ -262,5 +262,7 @@ declare enum ReactionType {
262
262
  }
263
263
 
264
264
  type R2Folder = 'collection' | 'post' | 'game' | 'uoi' | 'user' | 'team' | 'leaderboard' | 'arena' | 'event';
265
+ type ImageVariant = 'thumbnail' | 'large';
266
+ declare function getR2CdnUrl(folderName: R2Folder, imageID: string, variant: ImageVariant): string;
265
267
 
266
- export { type AccountStatus, AdminAccountStatus, AttachmentType, 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 CollectionMetaProps, type CollectionMetaStatus, type CollectionOwnerStatus, type CollectionPetsAttributeType, type CollectionPrivacy, type CollectionStatus, type CollectionType, type CommonAttributeType, type CommonMarketType, type CoordinatesProps, type DuelGameResultType, type EventsNearbyProps, FollowingStatus, type GameMetaProps, type GameType, type GamesByTypeNearbyProps, type GamesNearbyProps, type Gender, HEADERQUARTER_LAT, HEADERQUARTER_LNG, type Handedness, type InterestNearbyProps, type InterestType, type LeaderboardType, type LeaderboardsByGameTypeNearbyProps, type LengthUnit, type LocationType, type MarketMetaProps, type MarketMetaStatus, type MarketType, type MarketsByTypeNearbyProps, type MemberingStatus, type MusicInterestType, type NearbyProps, type NotificationType, type PIDPrefixType, PID_LENGTH, PID_PREFIX_LENGTH, type PageType, type PetsInterestType, type PlayerType, type PostPrivacy, type ProfileJoiningType, type ProfilePermission, type ProfilePrivacy, type ProfileStatus, type ProfileType, type R2Folder, ReactionType, type SetCoordinatesFuncType, 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, ZeroCollectionMeta, ZeroGameMeta, ZeroMarketOption, getCollectionAttributeLabel, getCommonAttributeLabel, getNearbyIndex, getPIDPrefixByProfileType, getProfileTypeByPID, getUoiAttributeLabel, isGamePID, isLeaderboardPID, isTeamPID, isUoiPID };
268
+ export { type AccountStatus, AdminAccountStatus, AttachmentType, 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 CollectionMetaProps, type CollectionMetaStatus, type CollectionOwnerStatus, type CollectionPetsAttributeType, type CollectionPrivacy, type CollectionStatus, type CollectionType, type CommonAttributeType, type CommonMarketType, type CoordinatesProps, type DuelGameResultType, type EventsNearbyProps, FollowingStatus, type GameMetaProps, type GameType, type GamesByTypeNearbyProps, type GamesNearbyProps, type Gender, HEADERQUARTER_LAT, HEADERQUARTER_LNG, type Handedness, type ImageVariant, type InterestNearbyProps, type InterestType, type LeaderboardType, type LeaderboardsByGameTypeNearbyProps, type LengthUnit, type LocationType, type MarketMetaProps, type MarketMetaStatus, type MarketType, type MarketsByTypeNearbyProps, type MemberingStatus, type MusicInterestType, type NearbyProps, type NotificationType, type PIDPrefixType, PID_LENGTH, PID_PREFIX_LENGTH, type PageType, type PetsInterestType, type PlayerType, type PostPrivacy, type ProfileJoiningType, type ProfilePermission, type ProfilePrivacy, type ProfileStatus, type ProfileType, type R2Folder, ReactionType, type SetCoordinatesFuncType, 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, ZeroCollectionMeta, ZeroGameMeta, ZeroMarketOption, getCollectionAttributeLabel, getCommonAttributeLabel, getNearbyIndex, getPIDPrefixByProfileType, getProfileTypeByPID, getR2CdnUrl, getUoiAttributeLabel, isGamePID, isLeaderboardPID, isTeamPID, isUoiPID };
package/dist/index.d.ts CHANGED
@@ -262,5 +262,7 @@ declare enum ReactionType {
262
262
  }
263
263
 
264
264
  type R2Folder = 'collection' | 'post' | 'game' | 'uoi' | 'user' | 'team' | 'leaderboard' | 'arena' | 'event';
265
+ type ImageVariant = 'thumbnail' | 'large';
266
+ declare function getR2CdnUrl(folderName: R2Folder, imageID: string, variant: ImageVariant): string;
265
267
 
266
- export { type AccountStatus, AdminAccountStatus, AttachmentType, 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 CollectionMetaProps, type CollectionMetaStatus, type CollectionOwnerStatus, type CollectionPetsAttributeType, type CollectionPrivacy, type CollectionStatus, type CollectionType, type CommonAttributeType, type CommonMarketType, type CoordinatesProps, type DuelGameResultType, type EventsNearbyProps, FollowingStatus, type GameMetaProps, type GameType, type GamesByTypeNearbyProps, type GamesNearbyProps, type Gender, HEADERQUARTER_LAT, HEADERQUARTER_LNG, type Handedness, type InterestNearbyProps, type InterestType, type LeaderboardType, type LeaderboardsByGameTypeNearbyProps, type LengthUnit, type LocationType, type MarketMetaProps, type MarketMetaStatus, type MarketType, type MarketsByTypeNearbyProps, type MemberingStatus, type MusicInterestType, type NearbyProps, type NotificationType, type PIDPrefixType, PID_LENGTH, PID_PREFIX_LENGTH, type PageType, type PetsInterestType, type PlayerType, type PostPrivacy, type ProfileJoiningType, type ProfilePermission, type ProfilePrivacy, type ProfileStatus, type ProfileType, type R2Folder, ReactionType, type SetCoordinatesFuncType, 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, ZeroCollectionMeta, ZeroGameMeta, ZeroMarketOption, getCollectionAttributeLabel, getCommonAttributeLabel, getNearbyIndex, getPIDPrefixByProfileType, getProfileTypeByPID, getUoiAttributeLabel, isGamePID, isLeaderboardPID, isTeamPID, isUoiPID };
268
+ export { type AccountStatus, AdminAccountStatus, AttachmentType, 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 CollectionMetaProps, type CollectionMetaStatus, type CollectionOwnerStatus, type CollectionPetsAttributeType, type CollectionPrivacy, type CollectionStatus, type CollectionType, type CommonAttributeType, type CommonMarketType, type CoordinatesProps, type DuelGameResultType, type EventsNearbyProps, FollowingStatus, type GameMetaProps, type GameType, type GamesByTypeNearbyProps, type GamesNearbyProps, type Gender, HEADERQUARTER_LAT, HEADERQUARTER_LNG, type Handedness, type ImageVariant, type InterestNearbyProps, type InterestType, type LeaderboardType, type LeaderboardsByGameTypeNearbyProps, type LengthUnit, type LocationType, type MarketMetaProps, type MarketMetaStatus, type MarketType, type MarketsByTypeNearbyProps, type MemberingStatus, type MusicInterestType, type NearbyProps, type NotificationType, type PIDPrefixType, PID_LENGTH, PID_PREFIX_LENGTH, type PageType, type PetsInterestType, type PlayerType, type PostPrivacy, type ProfileJoiningType, type ProfilePermission, type ProfilePrivacy, type ProfileStatus, type ProfileType, type R2Folder, ReactionType, type SetCoordinatesFuncType, 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, ZeroCollectionMeta, ZeroGameMeta, ZeroMarketOption, getCollectionAttributeLabel, getCommonAttributeLabel, getNearbyIndex, getPIDPrefixByProfileType, getProfileTypeByPID, getR2CdnUrl, getUoiAttributeLabel, isGamePID, isLeaderboardPID, isTeamPID, isUoiPID };
package/dist/index.js CHANGED
@@ -47,6 +47,7 @@ __export(index_exports, {
47
47
  getNearbyIndex: () => getNearbyIndex,
48
48
  getPIDPrefixByProfileType: () => getPIDPrefixByProfileType,
49
49
  getProfileTypeByPID: () => getProfileTypeByPID,
50
+ getR2CdnUrl: () => getR2CdnUrl,
50
51
  getUoiAttributeLabel: () => getUoiAttributeLabel,
51
52
  isGamePID: () => isGamePID,
52
53
  isLeaderboardPID: () => isLeaderboardPID,
@@ -315,6 +316,13 @@ var ReactionType = /* @__PURE__ */ ((ReactionType2) => {
315
316
  ReactionType2[ReactionType2["Like"] = 1] = "Like";
316
317
  return ReactionType2;
317
318
  })(ReactionType || {});
319
+
320
+ // src/r2.ts
321
+ var bucketName = "image";
322
+ var cdnBaseURL = "image.buddiesnearby.com";
323
+ function getR2CdnUrl(folderName, imageID, variant) {
324
+ return `https://${cdnBaseURL}/${bucketName}/${folderName}/${imageID}_${variant}.webp`;
325
+ }
318
326
  // Annotate the CommonJS export names for ESM import in node:
319
327
  0 && (module.exports = {
320
328
  AdminAccountStatus,
@@ -344,6 +352,7 @@ var ReactionType = /* @__PURE__ */ ((ReactionType2) => {
344
352
  getNearbyIndex,
345
353
  getPIDPrefixByProfileType,
346
354
  getProfileTypeByPID,
355
+ getR2CdnUrl,
347
356
  getUoiAttributeLabel,
348
357
  isGamePID,
349
358
  isLeaderboardPID,
package/dist/index.mjs CHANGED
@@ -258,6 +258,13 @@ var ReactionType = /* @__PURE__ */ ((ReactionType2) => {
258
258
  ReactionType2[ReactionType2["Like"] = 1] = "Like";
259
259
  return ReactionType2;
260
260
  })(ReactionType || {});
261
+
262
+ // src/r2.ts
263
+ var bucketName = "image";
264
+ var cdnBaseURL = "image.buddiesnearby.com";
265
+ function getR2CdnUrl(folderName, imageID, variant) {
266
+ return `https://${cdnBaseURL}/${bucketName}/${folderName}/${imageID}_${variant}.webp`;
267
+ }
261
268
  export {
262
269
  AdminAccountStatus,
263
270
  AttachmentType,
@@ -286,6 +293,7 @@ export {
286
293
  getNearbyIndex,
287
294
  getPIDPrefixByProfileType,
288
295
  getProfileTypeByPID,
296
+ getR2CdnUrl,
289
297
  getUoiAttributeLabel,
290
298
  isGamePID,
291
299
  isLeaderboardPID,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wenum",
3
- "version": "1.80.0",
3
+ "version": "1.81.1",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/index.mjs",
6
6
  "types": "dist/index.d.ts",
package/src/r2.ts CHANGED
@@ -1,2 +1,11 @@
1
1
  export type R2Folder = 'collection' | 'post' | 'game' | 'uoi' | 'user' | 'team' | 'leaderboard' | 'arena' | 'event';
2
2
 
3
+ export type ImageVariant = 'thumbnail' | 'large';
4
+
5
+ const bucketName = "image"
6
+
7
+ const cdnBaseURL = "image.buddiesnearby.com"
8
+
9
+ export function getR2CdnUrl(folderName: R2Folder, imageID: string, variant: ImageVariant): string {
10
+ return `https://${cdnBaseURL}/${bucketName}/${folderName}/${imageID}_${variant}.webp`;
11
+ }