ldco-contract 0.1.38 → 0.1.39

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.
@@ -283,7 +283,7 @@ function toUserDTO(user, isVerified, danceIds, collections, venues, friends, fol
283
283
  friendRequests = [];
284
284
  }
285
285
  return {
286
- _id: user._id.toString(),
286
+ id: user._id.toString(),
287
287
  email: (_user$email = user.email) != null ? _user$email : '',
288
288
  name: (_user$name = user.name) != null ? _user$name : '',
289
289
  username: (_user$username = user.username) != null ? _user$username : '',
@@ -314,7 +314,7 @@ function toUserModel(userDTO, danceMap, collectionMap, venueMap, friendsMap, fol
314
314
  }).filter(Boolean);
315
315
  };
316
316
  return {
317
- _id: userDTO._id,
317
+ _id: userDTO.id,
318
318
  email: userDTO.email,
319
319
  name: userDTO.name,
320
320
  username: userDTO.username,
@@ -1 +1 @@
1
- {"version":3,"file":"ldco-contract.cjs.development.js","sources":["../src/lib/getAllUserDanceIds.ts","../src/lib/itemArrayToItemRecords.ts","../src/lib/converters/toChoreographerDTO.ts","../src/lib/converters/toChoreographerModel.ts","../src/lib/converters/toCollectionDTO.ts","../src/lib/converters/toTrackModel.ts","../src/lib/converters/toDanceModel.ts","../src/lib/converters/toCollectionModel.ts","../src/lib/converters/toDanceDTO.ts","../src/lib/converters/toInstructorDTO.ts","../src/lib/converters/toInstructorModel.ts","../src/lib/converters/toLessonDTO.ts","../src/lib/converters/toLessonModel.ts","../src/lib/converters/toTrackDTO.ts","../src/lib/converters/toUserAcquaintanceDTO.ts","../src/lib/converters/toUserAcquaintanceModel.ts","../src/lib/converters/toUserDTO.ts","../src/lib/converters/toUserModel.ts","../src/lib/converters/toVenueDTO.ts","../src/lib/converters/toVenueModel.ts"],"sourcesContent":["import { UserDanceDTO } from \"../types/dto/userDances.dto\";\n\nexport function getAllUserDanceIds(userDances: UserDanceDTO): string[] {\n const { favorites = [], flagged = [], known = [], refresh = [] } = userDances ?? {};\n\n const all = [\n ...favorites,\n ...flagged,\n ...known,\n ...refresh,\n ];\n\n // Remove duplicates and return array of string IDs\n return Array.from(new Set(all));\n}","export function itemArrayToItemRecords<T extends { id: string }>(arr: T[]): Record<string, T> {\n return arr.reduce((acc, item) => {\n acc[item.id] = item;\n return acc;\n }, {} as Record<string, T>);\n}\n","import { ChoreographerDTO } from '../../types/dto/choreographer.dto';\nimport { ChoreographerEntity } from '../../types/entities/choreographer.entity';\n\nexport function toChoreographerDTO(\n choreographer: ChoreographerEntity,\n isVerified: boolean\n): ChoreographerDTO {\n\n return {\n id: choreographer._id,\n name: choreographer.name,\n isVerified: isVerified\n };\n}\n","import { ChoreographerDTO } from \"../../types/dto/choreographer.dto\";\nimport { ChoreographerModel } from \"../../types/model/choreographer.model\";\n\nexport function toChoreographerModel(\n dto: ChoreographerDTO\n): ChoreographerModel {\n\n return {\n id: dto.id,\n name: dto.name,\n isVerified: dto.isVerified\n };\n}\n","import { CollectionDTO } from '../../types/dto/collection.dto';\nimport { UserCollectionEntity } from '../../types/entities/user_collection.entity';\n\nexport function toCollectionDTO(\n collectionEntity: UserCollectionEntity,\n isVerified: boolean\n): CollectionDTO {\n\n return {\n id: collectionEntity._id,\n name: collectionEntity.name,\n isVerified: isVerified,\n dances: collectionEntity.danceIds,\n createdAt: collectionEntity.createdAt,\n updatedAt: collectionEntity.updatedAt,\n createdBy: collectionEntity.createdBy,\n isPrivate: collectionEntity.isPrivate,\n isCopyable: collectionEntity.isCopyable,\n isArchived: collectionEntity.isArchived,\n archivedAt: collectionEntity.archivedAt\n };\n}\n","import { TrackDTO } from \"../../types/dto/track.dto\";\nimport { TrackModel } from \"../../types/model/track.model\";\n\nexport function toTrackModel(dto: TrackDTO): TrackModel {\n return {\n id: dto.id,\n name: dto.name,\n artists: dto.artists,\n isrc: dto.isrc,\n uri: dto.uri,\n duration_ms: dto.duration_ms,\n explicit: dto.explicit,\n isVerified: dto.isVerified,\n };\n}\n","import { ChoreographerDTO } from '../../types/dto/choreographer.dto';\nimport { DanceDTO } from '../../types/dto/dance.dto';\nimport { TrackDTO } from '../../types/dto/track.dto';\nimport { DanceModel } from '../../types/model/dance.model';\nimport { toChoreographerModel } from './toChoreographerModel';\nimport { toTrackModel } from './toTrackModel';\n\nexport function toDanceModel(\n dto: DanceDTO,\n trackMap: Record<string, TrackDTO>,\n choreographerMap: Record<string, ChoreographerDTO>\n): DanceModel {\n\n // Handle Tracks\n const tracks = dto.tracks\n .map(id => {\n const track = trackMap[id];\n if (!track) {\n console.warn(`Track not found for ID: ${id} in dance \"${dto.danceName}\"`);\n }\n return track;\n })\n .filter(Boolean)\n .map(toTrackModel);\n\n // Handle Choreographers\n const choreographers = dto.choreographers\n .map(id => {\n const choreographer = choreographerMap[id];\n if (!choreographer) {\n console.warn(`Choreographer not found for ID: ${id} in dance \"${dto.danceName}\"`);\n }\n return choreographer;\n })\n .filter(Boolean)\n .map(toChoreographerModel);\n\n // Handle Primary Track\n const primaryTrackDTO = trackMap[dto.primaryTrack];\n if (!primaryTrackDTO) {\n console.warn(`Primary track not found for dance: \"${dto.danceName}\" (primaryTrack ID: ${dto.primaryTrack})`);\n }\n const primaryTrack = primaryTrackDTO ? toTrackModel(primaryTrackDTO) : null;\n\n // Return a valid DanceModel even if some data is incomplete\n return {\n id: dto.id,\n danceName: dto.danceName,\n choreographers: choreographers,\n stepsheet: dto.stepsheet,\n difficulty: dto.difficulty,\n primaryTrack: primaryTrack,\n tracks: tracks,\n isVerified: dto.isVerified,\n };\n}\n","import { ChoreographerDTO } from '../../types/dto/choreographer.dto';\nimport { CollectionDTO } from '../../types/dto/collection.dto';\nimport { DanceDTO } from '../../types/dto/dance.dto';\nimport { TrackDTO } from '../../types/dto/track.dto';\nimport { CollectionModel } from '../../types/model/collection.model';\nimport { toDanceModel } from './toDanceModel';\n\nexport function toCollectionModel(\n dto: CollectionDTO,\n danceMap: Record<string, DanceDTO>,\n trackMap: Record<string, TrackDTO>,\n choreographerMap: Record<string, ChoreographerDTO>\n): CollectionModel {\n\n const dances = (dto.dances || [])\n .map(id => {\n const dance = danceMap[id];\n if (!dance) {\n console.warn(`Dance with id \"${id}\" not found in danceMap for collection \"${dto.name}\"`);\n }\n return dance;\n })\n .filter(Boolean);\n\n return {\n id: dto.id,\n name: dto.name,\n dances: dances.map(d => toDanceModel(d, trackMap, choreographerMap)),\n isVerified: dto.isVerified,\n createdAt: dto.createdAt,\n updatedAt: dto.updatedAt,\n createdBy: dto.createdBy,\n isCopyable: dto.isCopyable,\n isArchived: dto.isArchived,\n archivedAt: dto.archivedAt,\n };\n}\n","import { DanceDTO } from \"../../types/dto/dance.dto\";\nimport { DanceEntity } from \"../../types/entities/dance.entity\";\n\nexport function toDanceDTO(\n dance: DanceEntity,\n isVerified: boolean\n): DanceDTO {\n\n return {\n id: dance._id,\n danceName: dance.danceName,\n choreographers: dance.choreographers?.map((id: string) => id) ?? [],\n stepsheet: dance.stepsheet,\n difficulty: dance.difficulty,\n primaryTrack: dance.primaryTrack ?? '',\n tracks: dance.tracks?.map((id: string) => id) ?? [],\n isVerified: isVerified\n };\n};\n","import { InstructorDTO } from \"../../types/dto/instructor.dto\";\nimport { InstructorEntity } from \"../../types/entities/instructor.entity\";\n\nexport function toInstructorDTO(\n instructor: InstructorEntity,\n isVerified: boolean\n): InstructorDTO {\n\n return {\n id: instructor._id,\n name: instructor.name,\n userid: \"leave this this empty for now and figure it out later...\",\n isVerified: isVerified\n };\n}\n","import { InstructorDTO } from \"../../types/dto/instructor.dto\";\nimport { InstructorModel } from \"../../types/model/instructor.model\";\n\nexport function toInstructorModel(\n dto: InstructorDTO, \n): InstructorModel {\n\n return {\n id: dto.id,\n name: dto.name,\n userid: \"leave this this empty for now and figure it out later...\",\n isVerified: dto.isVerified\n };\n}\n","import { LessonDTO } from \"../../types/dto/lesson.dto\";\nimport { LessonEntity } from \"../../types/entities/lesson.entity\";\n\nexport function toLessonDTO(\n LessonEntity: LessonEntity,\n isVerified: boolean\n): LessonDTO {\n\n return {\n id: LessonEntity._id,\n venueid: LessonEntity.venueid,\n lessonday: LessonEntity.lessonday,\n lessonstart: LessonEntity.lessonstart,\n instructors: LessonEntity.instructors,\n duration: LessonEntity.duration,\n lessoncost: LessonEntity.lessoncost,\n notes: LessonEntity.notes,\n difficulty: LessonEntity.difficulty,\n isVerified: isVerified\n };\n}\n","import { InstructorDTO } from \"../../types/dto/instructor.dto\";\nimport { LessonDTO } from \"../../types/dto/lesson.dto\";\nimport { LessonModel } from \"../../types/model/lesson.model\";\n\nexport function toLessonModel(\n lessonDTO: LessonDTO,\n instructorMap: Record<string, InstructorDTO>\n): LessonModel {\n\n return {\n id: lessonDTO.id,\n lessonday: lessonDTO.lessonday,\n lessonstart: lessonDTO.lessonstart,\n instructors: lessonDTO.instructors.map(id => instructorMap[id]).filter(Boolean), // TODO: Do I need the converter?\n duration: lessonDTO.duration,\n lessoncost: lessonDTO.lessoncost,\n notes: lessonDTO.notes,\n difficulty: lessonDTO.difficulty,\n };\n}\n","import { TrackDTO } from \"../../types/dto/track.dto\";\nimport { TrackEntity } from \"../../types/entities/track.entity\";\n\nexport function toTrackDTO(dto: TrackEntity, isVerified: boolean): TrackDTO {\n return {\n id: dto._id,\n name: dto.name,\n artists: dto.artists,\n isrc: dto.isrc,\n uri: dto.uri,\n duration_ms: dto.duration_ms,\n explicit: dto.explicit,\n isVerified: isVerified,\n };\n}\n","import { UserAcquaintanceDTO } from \"../../types/dto/userAcquaintance.dto\";\nimport { UserEntity } from \"../../types/entities/user.entity\";\n\nexport function toUserAcquaintanceDTO(\n user: UserEntity,\n isVerified: boolean,\n userProfile: {\n favorites: string[];\n flagged: string[];\n known: string[];\n refresh: string[];\n collections: string[];\n venues: string[];\n friendsCount: number;\n followingCount: number;\n followersCount: number;\n mutualFriendsCount: number;\n }\n): UserAcquaintanceDTO {\n return {\n id: user._id,\n username: user.username || user.name || '',\n image: user.image || '',\n bio: user.bio || '',\n isVerified,\n profile: {\n dances: {\n favorites: userProfile.favorites,\n flagged: userProfile.flagged,\n known: userProfile.known,\n refresh: userProfile.refresh,\n },\n collections: userProfile.collections,\n venues: userProfile.venues,\n friendsCount: userProfile.friendsCount,\n followingCount: userProfile.followingCount,\n followersCount: userProfile.followersCount,\n mutualFriendsCount: userProfile.mutualFriendsCount,\n links: user.links ?? {},\n },\n };\n}\n","import { ChoreographerDTO } from \"../../types/dto/choreographer.dto\";\nimport { CollectionDTO } from \"../../types/dto/collection.dto\";\nimport { DanceDTO } from \"../../types/dto/dance.dto\";\nimport { TrackDTO } from \"../../types/dto/track.dto\";\nimport { UserAcquaintanceDTO } from \"../../types/dto/userAcquaintance.dto\";\nimport { UserAcquaintanceModel } from \"../../types/model/userAcquaintance.model\";\nimport { toCollectionModel } from \"./toCollectionModel\";\nimport { toDanceModel } from \"./toDanceModel\";\n\nexport function toUserAcquaintanceModel(\n dto: UserAcquaintanceDTO,\n danceMap: Record<string, DanceDTO>,\n trackMap: Record<string, TrackDTO>,\n collectionMap: Record<string, CollectionDTO>,\n choreographerMap: Record<string, ChoreographerDTO>\n): UserAcquaintanceModel {\n\n return {\n id: dto.id,\n username: dto.username,\n image: dto.image,\n bio: dto.bio,\n isVerified: dto.isVerified,\n friendsCount: dto.profile.friendsCount,\n followersCount: dto.profile.followersCount,\n mutualFriendsCount: dto.profile.mutualFriendsCount,\n links: dto.profile.links,\n dances: {\n favorites: dto.profile.dances.favorites.map(id => toDanceModel(danceMap[id], trackMap, choreographerMap)),\n flagged: dto.profile.dances.flagged.map(id => toDanceModel(danceMap[id], trackMap, choreographerMap)),\n known: dto.profile.dances.known.map(id => toDanceModel(danceMap[id], trackMap, choreographerMap)),\n refresh: dto.profile.dances.refresh.map(id => toDanceModel(danceMap[id], trackMap, choreographerMap))\n },\n collections: dto.profile.collections.map(id => toCollectionModel(collectionMap[id], danceMap, trackMap, choreographerMap)),\n };\n}\n","import { UserDTO } from \"../../types/dto/user.dto\";\nimport { UserEntity } from \"../../types/entities/user.entity\";\n\nexport function toUserDTO(\n user: UserEntity,\n isVerified: boolean,\n danceIds: {\n favorites: string[];\n flagged: string[];\n known: string[];\n refresh: string[];\n },\n collections: string[],\n venues: string[] = [],\n friends: string[] = [],\n following: string[] = [],\n friendsRequested: string[] = [],\n friendRequests: string[] = []\n): UserDTO {\n return {\n _id: user._id.toString(),\n email: user.email ?? '',\n name: user.name ?? '',\n username: user.username ?? '',\n image: user.image ?? '',\n bio: user.bio ?? '',\n isVerified,\n profile: {\n danceIds,\n collections,\n venues,\n friends,\n following,\n links: user.links ?? {},\n friendsRequested,\n friendRequests\n },\n };\n};\n\nexport default toUserDTO;\n","import { UserDTO } from \"../../types/dto/user.dto\";\nimport { CollectionModel } from \"../../types/model/collection.model\";\nimport { DanceModel } from \"../../types/model/dance.model\";\nimport { UserModel } from \"../../types/model/user.model\";\nimport { UserAcquaintanceModel } from \"../../types/model/userAcquaintance.model\";\nimport { VenueModel } from \"../../types/model/venue.model\";\n\nexport function toUserModel(\n userDTO: UserDTO,\n danceMap: Record<string, DanceModel>,\n collectionMap: Record<string, CollectionModel>,\n venueMap: Record<string, VenueModel>,\n friendsMap: Record<string, UserAcquaintanceModel>,\n followingMap: Record<string, UserAcquaintanceModel>\n): UserModel {\n const expand = <T>(ids: string[] = [], map: Record<string, T>): T[] => ids.map(id => map[id]).filter(Boolean);\n\n return {\n _id: userDTO._id,\n email: userDTO.email,\n name: userDTO.name,\n username: userDTO.username,\n image: userDTO.image,\n bio: userDTO.bio,\n isVerified: userDTO.isVerified,\n profile: {\n dances: {\n favorites: expand(userDTO.profile?.danceIds?.favorites, danceMap),\n flagged: expand(userDTO.profile?.danceIds?.flagged, danceMap),\n known: expand(userDTO.profile?.danceIds?.known, danceMap),\n refresh: expand(userDTO.profile?.danceIds?.refresh, danceMap),\n },\n collections: expand(userDTO.profile?.collections, collectionMap),\n venues: expand(userDTO.profile?.venues, venueMap),\n friends: expand(userDTO.profile?.friends, friendsMap),\n following: expand(userDTO.profile?.following, followingMap),\n friendsRequested: expand(userDTO.profile?.friendsRequested, friendsMap),\n friendRequests: expand(userDTO.profile?.friendRequests, friendsMap),\n followersCount: userDTO.profile?.followersCount || 0,\n links: userDTO.profile?.links || [],\n },\n };\n}\n","import { VenueDTO } from \"../../types/dto/venue.dto\";\nimport { VenueEntity } from \"../../types/entities/venue.entity\";\n\nexport function toVenueDTO(\n venue: VenueEntity,\n lessonIds: string[],\n isVerified: boolean\n): VenueDTO {\n\n return {\n id: venue._id,\n venuename: venue.venuename,\n venueaddress: venue.venueaddress,\n geolocation: venue.geolocation,\n phone: venue.phone,\n website: venue.website,\n contactEmail: venue.contactEmail,\n contactName: venue.contactName,\n contactPhone: venue.contactPhone,\n lessonsIds: lessonIds,\n isVerified: isVerified,\n isDeleted: venue.isDeleted ?? false,\n deletedAt: venue.deletedAt ?? null,\n createdAt: venue.createdAt ?? null,\n };\n}","import { InstructorDTO } from \"../../types/dto/instructor.dto\";\nimport { LessonDTO } from \"../../types/dto/lesson.dto\";\nimport { VenueDTO } from \"../../types/dto/venue.dto\";\nimport { VenueModel } from \"../../types/model/venue.model\";\nimport { toLessonModel } from \"./toLessonModel\";\n\nexport function toVenueModel(\n venueDTO: VenueDTO,\n lessonMap: Record<string, LessonDTO>,\n instructorMap: Record<string, InstructorDTO>\n): VenueModel {\n const expandedLessons = venueDTO.lessonsIds\n .map(id => toLessonModel(lessonMap[id], instructorMap))\n .filter(Boolean);\n\n return {\n ...venueDTO,\n lessons: expandedLessons,\n };\n}\n"],"names":["getAllUserDanceIds","userDances","_ref","_ref$favorites","favorites","_ref$flagged","flagged","_ref$known","known","_ref$refresh","refresh","all","concat","Array","from","Set","itemArrayToItemRecords","arr","reduce","acc","item","id","toChoreographerDTO","choreographer","isVerified","_id","name","toChoreographerModel","dto","toCollectionDTO","collectionEntity","dances","danceIds","createdAt","updatedAt","createdBy","isPrivate","isCopyable","isArchived","archivedAt","toTrackModel","artists","isrc","uri","duration_ms","explicit","toDanceModel","trackMap","choreographerMap","tracks","map","track","console","warn","danceName","filter","Boolean","choreographers","primaryTrackDTO","primaryTrack","stepsheet","difficulty","toCollectionModel","danceMap","dance","d","toDanceDTO","_dance$choreographers","_dance$choreographers2","_dance$primaryTrack","_dance$tracks$map","_dance$tracks","toInstructorDTO","instructor","userid","toInstructorModel","toLessonDTO","LessonEntity","venueid","lessonday","lessonstart","instructors","duration","lessoncost","notes","toLessonModel","lessonDTO","instructorMap","toTrackDTO","toUserAcquaintanceDTO","user","userProfile","username","image","bio","profile","collections","venues","friendsCount","followingCount","followersCount","mutualFriendsCount","links","_user$links","toUserAcquaintanceModel","collectionMap","toUserDTO","friends","following","friendsRequested","friendRequests","toString","email","_user$email","_user$name","_user$username","_user$image","_user$bio","toUserModel","userDTO","venueMap","friendsMap","followingMap","expand","ids","_userDTO$profile","_userDTO$profile2","_userDTO$profile3","_userDTO$profile4","_userDTO$profile5","_userDTO$profile6","_userDTO$profile7","_userDTO$profile8","_userDTO$profile9","_userDTO$profile10","_userDTO$profile11","_userDTO$profile12","toVenueDTO","venue","lessonIds","venuename","venueaddress","geolocation","phone","website","contactEmail","contactName","contactPhone","lessonsIds","isDeleted","_venue$isDeleted","deletedAt","_venue$deletedAt","_venue$createdAt","toVenueModel","venueDTO","lessonMap","expandedLessons","_extends","lessons"],"mappings":";;;;SAEgBA,kBAAkBA,CAACC,UAAwB;EACvD,IAAAC,IAAA,GAAmED,UAAU,WAAVA,UAAU,GAAI,EAAE;IAAAE,cAAA,GAAAD,IAAA,CAA3EE,SAAS;IAATA,SAAS,GAAAD,cAAA,cAAG,EAAE,GAAAA,cAAA;IAAAE,YAAA,GAAAH,IAAA,CAAEI,OAAO;IAAPA,OAAO,GAAAD,YAAA,cAAG,EAAE,GAAAA,YAAA;IAAAE,UAAA,GAAAL,IAAA,CAAEM,KAAK;IAALA,KAAK,GAAAD,UAAA,cAAG,EAAE,GAAAA,UAAA;IAAAE,YAAA,GAAAP,IAAA,CAAEQ,OAAO;IAAPA,OAAO,GAAAD,YAAA,cAAG,EAAE,GAAAA,YAAA;EAE9D,IAAME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CAACK,KAAK;IAClBC,OAAO,EAAEN,KAAK,CAACM,OAAO;IACtBC,YAAY,EAAEP,KAAK,CAACO,YAAY;IAChCC,WAAW,EAAER,KAAK,CAACQ,WAAW;IAC9BC,YAAY,EAAET,KAAK,CAACS,YAAY;IAChCC,UAAU,EAAET,SAAS;IACrBnH,UAAU,EAAEA,UAAU;IACtB6H,SAAS,GAAAC,gBAAA,GAAEZ,KAAK,CAACW,SAAS,YAAAC,gBAAA,GAAI,KAAK;IACnCC,SAAS,GAAAC,gBAAA,GAAEd,KAAK,CAACa,SAAS,YAAAC,gBAAA,GAAI,IAAI;IAClCvH,SAAS,GAAAwH,gBAAA,GAAEf,KAAK,CAACzG,SAAS,YAAAwH,gBAAA,GAAI;GACjC;AACL;;;;;;;;;;;;SCnBgBC,YAAYA,CACxBC,QAAkB,EAClBC,SAAoC,EACpCrE,aAA4C;EAE5C,IAAMsE,eAAe,GAAGF,QAAQ,CAACP,UAAU,CACtClG,GAAG,CAAC,UAAA7B,EAAE;IAAA,OAAIgE,aAAa,CAACuE,SAAS,CAACvI,EAAE,CAAC,EAAEkE,aAAa,CAAC;IAAC,CACtDhC,MAAM,CAACC,OAAO,CAAC;EAEpB,OAAAsG,QAAA,KACOH,QAAQ;IACXI,OAAO,EAAEF;;AAEjB;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"ldco-contract.cjs.development.js","sources":["../src/lib/getAllUserDanceIds.ts","../src/lib/itemArrayToItemRecords.ts","../src/lib/converters/toChoreographerDTO.ts","../src/lib/converters/toChoreographerModel.ts","../src/lib/converters/toCollectionDTO.ts","../src/lib/converters/toTrackModel.ts","../src/lib/converters/toDanceModel.ts","../src/lib/converters/toCollectionModel.ts","../src/lib/converters/toDanceDTO.ts","../src/lib/converters/toInstructorDTO.ts","../src/lib/converters/toInstructorModel.ts","../src/lib/converters/toLessonDTO.ts","../src/lib/converters/toLessonModel.ts","../src/lib/converters/toTrackDTO.ts","../src/lib/converters/toUserAcquaintanceDTO.ts","../src/lib/converters/toUserAcquaintanceModel.ts","../src/lib/converters/toUserDTO.ts","../src/lib/converters/toUserModel.ts","../src/lib/converters/toVenueDTO.ts","../src/lib/converters/toVenueModel.ts"],"sourcesContent":["import { UserDanceDTO } from \"../types/dto/userDances.dto\";\n\nexport function getAllUserDanceIds(userDances: UserDanceDTO): string[] {\n const { favorites = [], flagged = [], known = [], refresh = [] } = userDances ?? {};\n\n const all = [\n ...favorites,\n ...flagged,\n ...known,\n ...refresh,\n ];\n\n // Remove duplicates and return array of string IDs\n return Array.from(new Set(all));\n}","export function itemArrayToItemRecords<T extends { id: string }>(arr: T[]): Record<string, T> {\n return arr.reduce((acc, item) => {\n acc[item.id] = item;\n return acc;\n }, {} as Record<string, T>);\n}\n","import { ChoreographerDTO } from '../../types/dto/choreographer.dto';\nimport { ChoreographerEntity } from '../../types/entities/choreographer.entity';\n\nexport function toChoreographerDTO(\n choreographer: ChoreographerEntity,\n isVerified: boolean\n): ChoreographerDTO {\n\n return {\n id: choreographer._id,\n name: choreographer.name,\n isVerified: isVerified\n };\n}\n","import { ChoreographerDTO } from \"../../types/dto/choreographer.dto\";\nimport { ChoreographerModel } from \"../../types/model/choreographer.model\";\n\nexport function toChoreographerModel(\n dto: ChoreographerDTO\n): ChoreographerModel {\n\n return {\n id: dto.id,\n name: dto.name,\n isVerified: dto.isVerified\n };\n}\n","import { CollectionDTO } from '../../types/dto/collection.dto';\nimport { UserCollectionEntity } from '../../types/entities/user_collection.entity';\n\nexport function toCollectionDTO(\n collectionEntity: UserCollectionEntity,\n isVerified: boolean\n): CollectionDTO {\n\n return {\n id: collectionEntity._id,\n name: collectionEntity.name,\n isVerified: isVerified,\n dances: collectionEntity.danceIds,\n createdAt: collectionEntity.createdAt,\n updatedAt: collectionEntity.updatedAt,\n createdBy: collectionEntity.createdBy,\n isPrivate: collectionEntity.isPrivate,\n isCopyable: collectionEntity.isCopyable,\n isArchived: collectionEntity.isArchived,\n archivedAt: collectionEntity.archivedAt\n };\n}\n","import { TrackDTO } from \"../../types/dto/track.dto\";\nimport { TrackModel } from \"../../types/model/track.model\";\n\nexport function toTrackModel(dto: TrackDTO): TrackModel {\n return {\n id: dto.id,\n name: dto.name,\n artists: dto.artists,\n isrc: dto.isrc,\n uri: dto.uri,\n duration_ms: dto.duration_ms,\n explicit: dto.explicit,\n isVerified: dto.isVerified,\n };\n}\n","import { ChoreographerDTO } from '../../types/dto/choreographer.dto';\nimport { DanceDTO } from '../../types/dto/dance.dto';\nimport { TrackDTO } from '../../types/dto/track.dto';\nimport { DanceModel } from '../../types/model/dance.model';\nimport { toChoreographerModel } from './toChoreographerModel';\nimport { toTrackModel } from './toTrackModel';\n\nexport function toDanceModel(\n dto: DanceDTO,\n trackMap: Record<string, TrackDTO>,\n choreographerMap: Record<string, ChoreographerDTO>\n): DanceModel {\n\n // Handle Tracks\n const tracks = dto.tracks\n .map(id => {\n const track = trackMap[id];\n if (!track) {\n console.warn(`Track not found for ID: ${id} in dance \"${dto.danceName}\"`);\n }\n return track;\n })\n .filter(Boolean)\n .map(toTrackModel);\n\n // Handle Choreographers\n const choreographers = dto.choreographers\n .map(id => {\n const choreographer = choreographerMap[id];\n if (!choreographer) {\n console.warn(`Choreographer not found for ID: ${id} in dance \"${dto.danceName}\"`);\n }\n return choreographer;\n })\n .filter(Boolean)\n .map(toChoreographerModel);\n\n // Handle Primary Track\n const primaryTrackDTO = trackMap[dto.primaryTrack];\n if (!primaryTrackDTO) {\n console.warn(`Primary track not found for dance: \"${dto.danceName}\" (primaryTrack ID: ${dto.primaryTrack})`);\n }\n const primaryTrack = primaryTrackDTO ? toTrackModel(primaryTrackDTO) : null;\n\n // Return a valid DanceModel even if some data is incomplete\n return {\n id: dto.id,\n danceName: dto.danceName,\n choreographers: choreographers,\n stepsheet: dto.stepsheet,\n difficulty: dto.difficulty,\n primaryTrack: primaryTrack,\n tracks: tracks,\n isVerified: dto.isVerified,\n };\n}\n","import { ChoreographerDTO } from '../../types/dto/choreographer.dto';\nimport { CollectionDTO } from '../../types/dto/collection.dto';\nimport { DanceDTO } from '../../types/dto/dance.dto';\nimport { TrackDTO } from '../../types/dto/track.dto';\nimport { CollectionModel } from '../../types/model/collection.model';\nimport { toDanceModel } from './toDanceModel';\n\nexport function toCollectionModel(\n dto: CollectionDTO,\n danceMap: Record<string, DanceDTO>,\n trackMap: Record<string, TrackDTO>,\n choreographerMap: Record<string, ChoreographerDTO>\n): CollectionModel {\n\n const dances = (dto.dances || [])\n .map(id => {\n const dance = danceMap[id];\n if (!dance) {\n console.warn(`Dance with id \"${id}\" not found in danceMap for collection \"${dto.name}\"`);\n }\n return dance;\n })\n .filter(Boolean);\n\n return {\n id: dto.id,\n name: dto.name,\n dances: dances.map(d => toDanceModel(d, trackMap, choreographerMap)),\n isVerified: dto.isVerified,\n createdAt: dto.createdAt,\n updatedAt: dto.updatedAt,\n createdBy: dto.createdBy,\n isCopyable: dto.isCopyable,\n isArchived: dto.isArchived,\n archivedAt: dto.archivedAt,\n };\n}\n","import { DanceDTO } from \"../../types/dto/dance.dto\";\nimport { DanceEntity } from \"../../types/entities/dance.entity\";\n\nexport function toDanceDTO(\n dance: DanceEntity,\n isVerified: boolean\n): DanceDTO {\n\n return {\n id: dance._id,\n danceName: dance.danceName,\n choreographers: dance.choreographers?.map((id: string) => id) ?? [],\n stepsheet: dance.stepsheet,\n difficulty: dance.difficulty,\n primaryTrack: dance.primaryTrack ?? '',\n tracks: dance.tracks?.map((id: string) => id) ?? [],\n isVerified: isVerified\n };\n};\n","import { InstructorDTO } from \"../../types/dto/instructor.dto\";\nimport { InstructorEntity } from \"../../types/entities/instructor.entity\";\n\nexport function toInstructorDTO(\n instructor: InstructorEntity,\n isVerified: boolean\n): InstructorDTO {\n\n return {\n id: instructor._id,\n name: instructor.name,\n userid: \"leave this this empty for now and figure it out later...\",\n isVerified: isVerified\n };\n}\n","import { InstructorDTO } from \"../../types/dto/instructor.dto\";\nimport { InstructorModel } from \"../../types/model/instructor.model\";\n\nexport function toInstructorModel(\n dto: InstructorDTO, \n): InstructorModel {\n\n return {\n id: dto.id,\n name: dto.name,\n userid: \"leave this this empty for now and figure it out later...\",\n isVerified: dto.isVerified\n };\n}\n","import { LessonDTO } from \"../../types/dto/lesson.dto\";\nimport { LessonEntity } from \"../../types/entities/lesson.entity\";\n\nexport function toLessonDTO(\n LessonEntity: LessonEntity,\n isVerified: boolean\n): LessonDTO {\n\n return {\n id: LessonEntity._id,\n venueid: LessonEntity.venueid,\n lessonday: LessonEntity.lessonday,\n lessonstart: LessonEntity.lessonstart,\n instructors: LessonEntity.instructors,\n duration: LessonEntity.duration,\n lessoncost: LessonEntity.lessoncost,\n notes: LessonEntity.notes,\n difficulty: LessonEntity.difficulty,\n isVerified: isVerified\n };\n}\n","import { InstructorDTO } from \"../../types/dto/instructor.dto\";\nimport { LessonDTO } from \"../../types/dto/lesson.dto\";\nimport { LessonModel } from \"../../types/model/lesson.model\";\n\nexport function toLessonModel(\n lessonDTO: LessonDTO,\n instructorMap: Record<string, InstructorDTO>\n): LessonModel {\n\n return {\n id: lessonDTO.id,\n lessonday: lessonDTO.lessonday,\n lessonstart: lessonDTO.lessonstart,\n instructors: lessonDTO.instructors.map(id => instructorMap[id]).filter(Boolean), // TODO: Do I need the converter?\n duration: lessonDTO.duration,\n lessoncost: lessonDTO.lessoncost,\n notes: lessonDTO.notes,\n difficulty: lessonDTO.difficulty,\n };\n}\n","import { TrackDTO } from \"../../types/dto/track.dto\";\nimport { TrackEntity } from \"../../types/entities/track.entity\";\n\nexport function toTrackDTO(dto: TrackEntity, isVerified: boolean): TrackDTO {\n return {\n id: dto._id,\n name: dto.name,\n artists: dto.artists,\n isrc: dto.isrc,\n uri: dto.uri,\n duration_ms: dto.duration_ms,\n explicit: dto.explicit,\n isVerified: isVerified,\n };\n}\n","import { UserAcquaintanceDTO } from \"../../types/dto/userAcquaintance.dto\";\nimport { UserEntity } from \"../../types/entities/user.entity\";\n\nexport function toUserAcquaintanceDTO(\n user: UserEntity,\n isVerified: boolean,\n userProfile: {\n favorites: string[];\n flagged: string[];\n known: string[];\n refresh: string[];\n collections: string[];\n venues: string[];\n friendsCount: number;\n followingCount: number;\n followersCount: number;\n mutualFriendsCount: number;\n }\n): UserAcquaintanceDTO {\n return {\n id: user._id,\n username: user.username || user.name || '',\n image: user.image || '',\n bio: user.bio || '',\n isVerified,\n profile: {\n dances: {\n favorites: userProfile.favorites,\n flagged: userProfile.flagged,\n known: userProfile.known,\n refresh: userProfile.refresh,\n },\n collections: userProfile.collections,\n venues: userProfile.venues,\n friendsCount: userProfile.friendsCount,\n followingCount: userProfile.followingCount,\n followersCount: userProfile.followersCount,\n mutualFriendsCount: userProfile.mutualFriendsCount,\n links: user.links ?? {},\n },\n };\n}\n","import { ChoreographerDTO } from \"../../types/dto/choreographer.dto\";\nimport { CollectionDTO } from \"../../types/dto/collection.dto\";\nimport { DanceDTO } from \"../../types/dto/dance.dto\";\nimport { TrackDTO } from \"../../types/dto/track.dto\";\nimport { UserAcquaintanceDTO } from \"../../types/dto/userAcquaintance.dto\";\nimport { UserAcquaintanceModel } from \"../../types/model/userAcquaintance.model\";\nimport { toCollectionModel } from \"./toCollectionModel\";\nimport { toDanceModel } from \"./toDanceModel\";\n\nexport function toUserAcquaintanceModel(\n dto: UserAcquaintanceDTO,\n danceMap: Record<string, DanceDTO>,\n trackMap: Record<string, TrackDTO>,\n collectionMap: Record<string, CollectionDTO>,\n choreographerMap: Record<string, ChoreographerDTO>\n): UserAcquaintanceModel {\n\n return {\n id: dto.id,\n username: dto.username,\n image: dto.image,\n bio: dto.bio,\n isVerified: dto.isVerified,\n friendsCount: dto.profile.friendsCount,\n followersCount: dto.profile.followersCount,\n mutualFriendsCount: dto.profile.mutualFriendsCount,\n links: dto.profile.links,\n dances: {\n favorites: dto.profile.dances.favorites.map(id => toDanceModel(danceMap[id], trackMap, choreographerMap)),\n flagged: dto.profile.dances.flagged.map(id => toDanceModel(danceMap[id], trackMap, choreographerMap)),\n known: dto.profile.dances.known.map(id => toDanceModel(danceMap[id], trackMap, choreographerMap)),\n refresh: dto.profile.dances.refresh.map(id => toDanceModel(danceMap[id], trackMap, choreographerMap))\n },\n collections: dto.profile.collections.map(id => toCollectionModel(collectionMap[id], danceMap, trackMap, choreographerMap)),\n };\n}\n","import { UserDTO } from \"../../types/dto/user.dto\";\nimport { UserEntity } from \"../../types/entities/user.entity\";\n\nexport function toUserDTO(\n user: UserEntity,\n isVerified: boolean,\n danceIds: {\n favorites: string[];\n flagged: string[];\n known: string[];\n refresh: string[];\n },\n collections: string[],\n venues: string[] = [],\n friends: string[] = [],\n following: string[] = [],\n friendsRequested: string[] = [],\n friendRequests: string[] = []\n): UserDTO {\n return {\n id: user._id.toString(),\n email: user.email ?? '',\n name: user.name ?? '',\n username: user.username ?? '',\n image: user.image ?? '',\n bio: user.bio ?? '',\n isVerified,\n profile: {\n danceIds,\n collections,\n venues,\n friends,\n following,\n links: user.links ?? {},\n friendsRequested,\n friendRequests\n },\n };\n};\n\nexport default toUserDTO;\n","import { UserDTO } from \"../../types/dto/user.dto\";\nimport { CollectionModel } from \"../../types/model/collection.model\";\nimport { DanceModel } from \"../../types/model/dance.model\";\nimport { UserModel } from \"../../types/model/user.model\";\nimport { UserAcquaintanceModel } from \"../../types/model/userAcquaintance.model\";\nimport { VenueModel } from \"../../types/model/venue.model\";\n\nexport function toUserModel(\n userDTO: UserDTO,\n danceMap: Record<string, DanceModel>,\n collectionMap: Record<string, CollectionModel>,\n venueMap: Record<string, VenueModel>,\n friendsMap: Record<string, UserAcquaintanceModel>,\n followingMap: Record<string, UserAcquaintanceModel>\n): UserModel {\n const expand = <T>(ids: string[] = [], map: Record<string, T>): T[] => ids.map(id => map[id]).filter(Boolean);\n\n return {\n _id: userDTO.id,\n email: userDTO.email,\n name: userDTO.name,\n username: userDTO.username,\n image: userDTO.image,\n bio: userDTO.bio,\n isVerified: userDTO.isVerified,\n profile: {\n dances: {\n favorites: expand(userDTO.profile?.danceIds?.favorites, danceMap),\n flagged: expand(userDTO.profile?.danceIds?.flagged, danceMap),\n known: expand(userDTO.profile?.danceIds?.known, danceMap),\n refresh: expand(userDTO.profile?.danceIds?.refresh, danceMap),\n },\n collections: expand(userDTO.profile?.collections, collectionMap),\n venues: expand(userDTO.profile?.venues, venueMap),\n friends: expand(userDTO.profile?.friends, friendsMap),\n following: expand(userDTO.profile?.following, followingMap),\n friendsRequested: expand(userDTO.profile?.friendsRequested, friendsMap),\n friendRequests: expand(userDTO.profile?.friendRequests, friendsMap),\n followersCount: userDTO.profile?.followersCount || 0,\n links: userDTO.profile?.links || [],\n },\n };\n}\n","import { VenueDTO } from \"../../types/dto/venue.dto\";\nimport { VenueEntity } from \"../../types/entities/venue.entity\";\n\nexport function toVenueDTO(\n venue: VenueEntity,\n lessonIds: string[],\n isVerified: boolean\n): VenueDTO {\n\n return {\n id: venue._id,\n venuename: venue.venuename,\n venueaddress: venue.venueaddress,\n geolocation: venue.geolocation,\n phone: venue.phone,\n website: venue.website,\n contactEmail: venue.contactEmail,\n contactName: venue.contactName,\n contactPhone: venue.contactPhone,\n lessonsIds: lessonIds,\n isVerified: isVerified,\n isDeleted: venue.isDeleted ?? false,\n deletedAt: venue.deletedAt ?? null,\n createdAt: venue.createdAt ?? null,\n };\n}","import { InstructorDTO } from \"../../types/dto/instructor.dto\";\nimport { LessonDTO } from \"../../types/dto/lesson.dto\";\nimport { VenueDTO } from \"../../types/dto/venue.dto\";\nimport { VenueModel } from \"../../types/model/venue.model\";\nimport { toLessonModel } from \"./toLessonModel\";\n\nexport function toVenueModel(\n venueDTO: VenueDTO,\n lessonMap: Record<string, LessonDTO>,\n instructorMap: Record<string, InstructorDTO>\n): VenueModel {\n const expandedLessons = venueDTO.lessonsIds\n .map(id => toLessonModel(lessonMap[id], instructorMap))\n .filter(Boolean);\n\n return {\n ...venueDTO,\n lessons: expandedLessons,\n };\n}\n"],"names":["getAllUserDanceIds","userDances","_ref","_ref$favorites","favorites","_ref$flagged","flagged","_ref$known","known","_ref$refresh","refresh","all","concat","Array","from","Set","itemArrayToItemRecords","arr","reduce","acc","item","id","toChoreographerDTO","choreographer","isVerified","_id","name","toChoreographerModel","dto","toCollectionDTO","collectionEntity","dances","danceIds","createdAt","updatedAt","createdBy","isPrivate","isCopyable","isArchived","archivedAt","toTrackModel","artists","isrc","uri","duration_ms","explicit","toDanceModel","trackMap","choreographerMap","tracks","map","track","console","warn","danceName","filter","Boolean","choreographers","primaryTrackDTO","primaryTrack","stepsheet","difficulty","toCollectionModel","danceMap","dance","d","toDanceDTO","_dance$choreographers","_dance$choreographers2","_dance$primaryTrack","_dance$tracks$map","_dance$tracks","toInstructorDTO","instructor","userid","toInstructorModel","toLessonDTO","LessonEntity","venueid","lessonday","lessonstart","instructors","duration","lessoncost","notes","toLessonModel","lessonDTO","instructorMap","toTrackDTO","toUserAcquaintanceDTO","user","userProfile","username","image","bio","profile","collections","venues","friendsCount","followingCount","followersCount","mutualFriendsCount","links","_user$links","toUserAcquaintanceModel","collectionMap","toUserDTO","friends","following","friendsRequested","friendRequests","toString","email","_user$email","_user$name","_user$username","_user$image","_user$bio","toUserModel","userDTO","venueMap","friendsMap","followingMap","expand","ids","_userDTO$profile","_userDTO$profile2","_userDTO$profile3","_userDTO$profile4","_userDTO$profile5","_userDTO$profile6","_userDTO$profile7","_userDTO$profile8","_userDTO$profile9","_userDTO$profile10","_userDTO$profile11","_userDTO$profile12","toVenueDTO","venue","lessonIds","venuename","venueaddress","geolocation","phone","website","contactEmail","contactName","contactPhone","lessonsIds","isDeleted","_venue$isDeleted","deletedAt","_venue$deletedAt","_venue$createdAt","toVenueModel","venueDTO","lessonMap","expandedLessons","_extends","lessons"],"mappings":";;;;SAEgBA,kBAAkBA,CAACC,UAAwB;EACvD,IAAAC,IAAA,GAAmED,UAAU,WAAVA,UAAU,GAAI,EAAE;IAAAE,cAAA,GAAAD,IAAA,CAA3EE,SAAS;IAATA,SAAS,GAAAD,cAAA,cAAG,EAAE,GAAAA,cAAA;IA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KAAI;;GAExC;AACL;;SCvCgBmC,UAAUA,CACtBC,KAAkB,EAClBC,SAAmB,EACnBnH,UAAmB;;EAGnB,OAAO;IACHH,EAAE,EAAEqH,KAAK,CAACjH,GAAG;IACbmH,SAAS,EAAEF,KAAK,CAACE,SAAS;IAC1BC,YAAY,EAAEH,KAAK,CAACG,YAAY;IAChCC,WAAW,EAAEJ,KAAK,CAACI,WAAW;IAC9BC,KAAK,EAAEL,KAAK,CAACK,KAAK;IAClBC,OAAO,EAAEN,KAAK,CAACM,OAAO;IACtBC,YAAY,EAAEP,KAAK,CAACO,YAAY;IAChCC,WAAW,EAAER,KAAK,CAACQ,WAAW;IAC9BC,YAAY,EAAET,KAAK,CAACS,YAAY;IAChCC,UAAU,EAAET,SAAS;IACrBnH,UAAU,EAAEA,UAAU;IACtB6H,SAAS,GAAAC,gBAAA,GAAEZ,KAAK,CAACW,SAAS,YAAAC,gBAAA,GAAI,KAAK;IACnCC,SAAS,GAAAC,gBAAA,GAAEd,KAAK,CAACa,SAAS,YAAAC,gBAAA,GAAI,IAAI;IAClCvH,SAAS,GAAAwH,gBAAA,GAAEf,KAAK,CAACzG,SAAS,YAAAwH,gBAAA,GAAI;GACjC;AACL;;;;;;;;;;;;SCnBgBC,YAAYA,CACxBC,QAAkB,EAClBC,SAAoC,EACpCrE,aAA4C;EAE5C,IAAMsE,eAAe,GAAGF,QAAQ,CAACP,UAAU,CACtClG,GAAG,CAAC,UAAA7B,EAAE;IAAA,OAAIgE,aAAa,CAACuE,SAAS,CAACvI,EAAE,CAAC,EAAEkE,aAAa,CAAC;IAAC,CACtDhC,MAAM,CAACC,OAAO,CAAC;EAEpB,OAAAsG,QAAA,KACOH,QAAQ;IACXI,OAAO,EAAEF;;AAEjB;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,2 +1,2 @@
1
- "use strict";function e(e){return{id:e.id,name:e.name,isVerified:e.isVerified}}function n(e){return{id:e.id,name:e.name,artists:e.artists,isrc:e.isrc,uri:e.uri,duration_ms:e.duration_ms,explicit:e.explicit,isVerified:e.isVerified}}function i(i,r,o){var t=i.tracks.map((function(e){var n=r[e];return n||console.warn("Track not found for ID: "+e+' in dance "'+i.danceName+'"'),n})).filter(Boolean).map(n),s=i.choreographers.map((function(e){var n=o[e];return n||console.warn("Choreographer not found for ID: "+e+' in dance "'+i.danceName+'"'),n})).filter(Boolean).map(e),a=r[i.primaryTrack];a||console.warn('Primary track not found for dance: "'+i.danceName+'" (primaryTrack ID: '+i.primaryTrack+")");var l=a?n(a):null;return{id:i.id,danceName:i.danceName,choreographers:s,stepsheet:i.stepsheet,difficulty:i.difficulty,primaryTrack:l,tracks:t,isVerified:i.isVerified}}function r(e,n,r,o){var t=(e.dances||[]).map((function(i){var r=n[i];return r||console.warn('Dance with id "'+i+'" not found in danceMap for collection "'+e.name+'"'),r})).filter(Boolean);return{id:e.id,name:e.name,dances:t.map((function(e){return i(e,r,o)})),isVerified:e.isVerified,createdAt:e.createdAt,updatedAt:e.updatedAt,createdBy:e.createdBy,isCopyable:e.isCopyable,isArchived:e.isArchived,archivedAt:e.archivedAt}}function o(e,n){return{id:e.id,lessonday:e.lessonday,lessonstart:e.lessonstart,instructors:e.instructors.map((function(e){return n[e]})).filter(Boolean),duration:e.duration,lessoncost:e.lessoncost,notes:e.notes,difficulty:e.difficulty}}function t(){return(t=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var i=arguments[n];for(var r in i)({}).hasOwnProperty.call(i,r)&&(e[r]=i[r])}return e}).apply(null,arguments)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.getAllUserDanceIds=function(e){var n=null!=e?e:{},i=n.favorites,r=n.flagged,o=n.known,t=n.refresh,s=[].concat(void 0===i?[]:i,void 0===r?[]:r,void 0===o?[]:o,void 0===t?[]:t);return Array.from(new Set(s))},exports.itemArrayToItemRecords=function(e){return e.reduce((function(e,n){return e[n.id]=n,e}),{})},exports.toChoreographerDTO=function(e,n){return{id:e._id,name:e.name,isVerified:n}},exports.toChoreographerModel=e,exports.toCollectionDTO=function(e,n){return{id:e._id,name:e.name,isVerified:n,dances:e.danceIds,createdAt:e.createdAt,updatedAt:e.updatedAt,createdBy:e.createdBy,isPrivate:e.isPrivate,isCopyable:e.isCopyable,isArchived:e.isArchived,archivedAt:e.archivedAt}},exports.toCollectionModel=r,exports.toDanceDTO=function(e,n){var i,r,o,t,s;return{id:e._id,danceName:e.danceName,choreographers:null!=(i=null==(r=e.choreographers)?void 0:r.map((function(e){return e})))?i:[],stepsheet:e.stepsheet,difficulty:e.difficulty,primaryTrack:null!=(o=e.primaryTrack)?o:"",tracks:null!=(t=null==(s=e.tracks)?void 0:s.map((function(e){return e})))?t:[],isVerified:n}},exports.toDanceModel=i,exports.toInstructorDTO=function(e,n){return{id:e._id,name:e.name,userid:"leave this this empty for now and figure it out later...",isVerified:n}},exports.toInstructorModel=function(e){return{id:e.id,name:e.name,userid:"leave this this empty for now and figure it out later...",isVerified:e.isVerified}},exports.toLessonDTO=function(e,n){return{id:e._id,venueid:e.venueid,lessonday:e.lessonday,lessonstart:e.lessonstart,instructors:e.instructors,duration:e.duration,lessoncost:e.lessoncost,notes:e.notes,difficulty:e.difficulty,isVerified:n}},exports.toLessonModel=o,exports.toTrackDTO=function(e,n){return{id:e._id,name:e.name,artists:e.artists,isrc:e.isrc,uri:e.uri,duration_ms:e.duration_ms,explicit:e.explicit,isVerified:n}},exports.toTrackModel=n,exports.toUserAcquaintanceDTO=function(e,n,i){var r;return{id:e._id,username:e.username||e.name||"",image:e.image||"",bio:e.bio||"",isVerified:n,profile:{dances:{favorites:i.favorites,flagged:i.flagged,known:i.known,refresh:i.refresh},collections:i.collections,venues:i.venues,friendsCount:i.friendsCount,followingCount:i.followingCount,followersCount:i.followersCount,mutualFriendsCount:i.mutualFriendsCount,links:null!=(r=e.links)?r:{}}}},exports.toUserAcquaintanceModel=function(e,n,o,t,s){return{id:e.id,username:e.username,image:e.image,bio:e.bio,isVerified:e.isVerified,friendsCount:e.profile.friendsCount,followersCount:e.profile.followersCount,mutualFriendsCount:e.profile.mutualFriendsCount,links:e.profile.links,dances:{favorites:e.profile.dances.favorites.map((function(e){return i(n[e],o,s)})),flagged:e.profile.dances.flagged.map((function(e){return i(n[e],o,s)})),known:e.profile.dances.known.map((function(e){return i(n[e],o,s)})),refresh:e.profile.dances.refresh.map((function(e){return i(n[e],o,s)}))},collections:e.profile.collections.map((function(e){return r(t[e],n,o,s)}))}},exports.toUserDTO=function(e,n,i,r,o,t,s,a,l){var d,u,c,f,p,m;return void 0===o&&(o=[]),void 0===t&&(t=[]),void 0===s&&(s=[]),void 0===a&&(a=[]),void 0===l&&(l=[]),{_id:e._id.toString(),email:null!=(d=e.email)?d:"",name:null!=(u=e.name)?u:"",username:null!=(c=e.username)?c:"",image:null!=(f=e.image)?f:"",bio:null!=(p=e.bio)?p:"",isVerified:n,profile:{danceIds:i,collections:r,venues:o,friends:t,following:s,links:null!=(m=e.links)?m:{},friendsRequested:a,friendRequests:l}}},exports.toUserModel=function(e,n,i,r,o,t){var s,a,l,d,u,c,f,p,m,v,h,g,y=function(e,n){return void 0===e&&(e=[]),e.map((function(e){return n[e]})).filter(Boolean)};return{_id:e._id,email:e.email,name:e.name,username:e.username,image:e.image,bio:e.bio,isVerified:e.isVerified,profile:{dances:{favorites:y(null==(s=e.profile)||null==(s=s.danceIds)?void 0:s.favorites,n),flagged:y(null==(a=e.profile)||null==(a=a.danceIds)?void 0:a.flagged,n),known:y(null==(l=e.profile)||null==(l=l.danceIds)?void 0:l.known,n),refresh:y(null==(d=e.profile)||null==(d=d.danceIds)?void 0:d.refresh,n)},collections:y(null==(u=e.profile)?void 0:u.collections,i),venues:y(null==(c=e.profile)?void 0:c.venues,r),friends:y(null==(f=e.profile)?void 0:f.friends,o),following:y(null==(p=e.profile)?void 0:p.following,t),friendsRequested:y(null==(m=e.profile)?void 0:m.friendsRequested,o),friendRequests:y(null==(v=e.profile)?void 0:v.friendRequests,o),followersCount:(null==(h=e.profile)?void 0:h.followersCount)||0,links:(null==(g=e.profile)?void 0:g.links)||[]}}},exports.toVenueDTO=function(e,n,i){var r,o,t;return{id:e._id,venuename:e.venuename,venueaddress:e.venueaddress,geolocation:e.geolocation,phone:e.phone,website:e.website,contactEmail:e.contactEmail,contactName:e.contactName,contactPhone:e.contactPhone,lessonsIds:n,isVerified:i,isDeleted:null!=(r=e.isDeleted)&&r,deletedAt:null!=(o=e.deletedAt)?o:null,createdAt:null!=(t=e.createdAt)?t:null}},exports.toVenueModel=function(e,n,i){var r=e.lessonsIds.map((function(e){return o(n[e],i)})).filter(Boolean);return t({},e,{lessons:r})};
1
+ "use strict";function e(e){return{id:e.id,name:e.name,isVerified:e.isVerified}}function n(e){return{id:e.id,name:e.name,artists:e.artists,isrc:e.isrc,uri:e.uri,duration_ms:e.duration_ms,explicit:e.explicit,isVerified:e.isVerified}}function i(i,r,o){var t=i.tracks.map((function(e){var n=r[e];return n||console.warn("Track not found for ID: "+e+' in dance "'+i.danceName+'"'),n})).filter(Boolean).map(n),s=i.choreographers.map((function(e){var n=o[e];return n||console.warn("Choreographer not found for ID: "+e+' in dance "'+i.danceName+'"'),n})).filter(Boolean).map(e),a=r[i.primaryTrack];a||console.warn('Primary track not found for dance: "'+i.danceName+'" (primaryTrack ID: '+i.primaryTrack+")");var l=a?n(a):null;return{id:i.id,danceName:i.danceName,choreographers:s,stepsheet:i.stepsheet,difficulty:i.difficulty,primaryTrack:l,tracks:t,isVerified:i.isVerified}}function r(e,n,r,o){var t=(e.dances||[]).map((function(i){var r=n[i];return r||console.warn('Dance with id "'+i+'" not found in danceMap for collection "'+e.name+'"'),r})).filter(Boolean);return{id:e.id,name:e.name,dances:t.map((function(e){return i(e,r,o)})),isVerified:e.isVerified,createdAt:e.createdAt,updatedAt:e.updatedAt,createdBy:e.createdBy,isCopyable:e.isCopyable,isArchived:e.isArchived,archivedAt:e.archivedAt}}function o(e,n){return{id:e.id,lessonday:e.lessonday,lessonstart:e.lessonstart,instructors:e.instructors.map((function(e){return n[e]})).filter(Boolean),duration:e.duration,lessoncost:e.lessoncost,notes:e.notes,difficulty:e.difficulty}}function t(){return(t=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var i=arguments[n];for(var r in i)({}).hasOwnProperty.call(i,r)&&(e[r]=i[r])}return e}).apply(null,arguments)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.getAllUserDanceIds=function(e){var n=null!=e?e:{},i=n.favorites,r=n.flagged,o=n.known,t=n.refresh,s=[].concat(void 0===i?[]:i,void 0===r?[]:r,void 0===o?[]:o,void 0===t?[]:t);return Array.from(new Set(s))},exports.itemArrayToItemRecords=function(e){return e.reduce((function(e,n){return e[n.id]=n,e}),{})},exports.toChoreographerDTO=function(e,n){return{id:e._id,name:e.name,isVerified:n}},exports.toChoreographerModel=e,exports.toCollectionDTO=function(e,n){return{id:e._id,name:e.name,isVerified:n,dances:e.danceIds,createdAt:e.createdAt,updatedAt:e.updatedAt,createdBy:e.createdBy,isPrivate:e.isPrivate,isCopyable:e.isCopyable,isArchived:e.isArchived,archivedAt:e.archivedAt}},exports.toCollectionModel=r,exports.toDanceDTO=function(e,n){var i,r,o,t,s;return{id:e._id,danceName:e.danceName,choreographers:null!=(i=null==(r=e.choreographers)?void 0:r.map((function(e){return e})))?i:[],stepsheet:e.stepsheet,difficulty:e.difficulty,primaryTrack:null!=(o=e.primaryTrack)?o:"",tracks:null!=(t=null==(s=e.tracks)?void 0:s.map((function(e){return e})))?t:[],isVerified:n}},exports.toDanceModel=i,exports.toInstructorDTO=function(e,n){return{id:e._id,name:e.name,userid:"leave this this empty for now and figure it out later...",isVerified:n}},exports.toInstructorModel=function(e){return{id:e.id,name:e.name,userid:"leave this this empty for now and figure it out later...",isVerified:e.isVerified}},exports.toLessonDTO=function(e,n){return{id:e._id,venueid:e.venueid,lessonday:e.lessonday,lessonstart:e.lessonstart,instructors:e.instructors,duration:e.duration,lessoncost:e.lessoncost,notes:e.notes,difficulty:e.difficulty,isVerified:n}},exports.toLessonModel=o,exports.toTrackDTO=function(e,n){return{id:e._id,name:e.name,artists:e.artists,isrc:e.isrc,uri:e.uri,duration_ms:e.duration_ms,explicit:e.explicit,isVerified:n}},exports.toTrackModel=n,exports.toUserAcquaintanceDTO=function(e,n,i){var r;return{id:e._id,username:e.username||e.name||"",image:e.image||"",bio:e.bio||"",isVerified:n,profile:{dances:{favorites:i.favorites,flagged:i.flagged,known:i.known,refresh:i.refresh},collections:i.collections,venues:i.venues,friendsCount:i.friendsCount,followingCount:i.followingCount,followersCount:i.followersCount,mutualFriendsCount:i.mutualFriendsCount,links:null!=(r=e.links)?r:{}}}},exports.toUserAcquaintanceModel=function(e,n,o,t,s){return{id:e.id,username:e.username,image:e.image,bio:e.bio,isVerified:e.isVerified,friendsCount:e.profile.friendsCount,followersCount:e.profile.followersCount,mutualFriendsCount:e.profile.mutualFriendsCount,links:e.profile.links,dances:{favorites:e.profile.dances.favorites.map((function(e){return i(n[e],o,s)})),flagged:e.profile.dances.flagged.map((function(e){return i(n[e],o,s)})),known:e.profile.dances.known.map((function(e){return i(n[e],o,s)})),refresh:e.profile.dances.refresh.map((function(e){return i(n[e],o,s)}))},collections:e.profile.collections.map((function(e){return r(t[e],n,o,s)}))}},exports.toUserDTO=function(e,n,i,r,o,t,s,a,l){var d,u,c,f,p,m;return void 0===o&&(o=[]),void 0===t&&(t=[]),void 0===s&&(s=[]),void 0===a&&(a=[]),void 0===l&&(l=[]),{id:e._id.toString(),email:null!=(d=e.email)?d:"",name:null!=(u=e.name)?u:"",username:null!=(c=e.username)?c:"",image:null!=(f=e.image)?f:"",bio:null!=(p=e.bio)?p:"",isVerified:n,profile:{danceIds:i,collections:r,venues:o,friends:t,following:s,links:null!=(m=e.links)?m:{},friendsRequested:a,friendRequests:l}}},exports.toUserModel=function(e,n,i,r,o,t){var s,a,l,d,u,c,f,p,m,v,h,g,y=function(e,n){return void 0===e&&(e=[]),e.map((function(e){return n[e]})).filter(Boolean)};return{_id:e.id,email:e.email,name:e.name,username:e.username,image:e.image,bio:e.bio,isVerified:e.isVerified,profile:{dances:{favorites:y(null==(s=e.profile)||null==(s=s.danceIds)?void 0:s.favorites,n),flagged:y(null==(a=e.profile)||null==(a=a.danceIds)?void 0:a.flagged,n),known:y(null==(l=e.profile)||null==(l=l.danceIds)?void 0:l.known,n),refresh:y(null==(d=e.profile)||null==(d=d.danceIds)?void 0:d.refresh,n)},collections:y(null==(u=e.profile)?void 0:u.collections,i),venues:y(null==(c=e.profile)?void 0:c.venues,r),friends:y(null==(f=e.profile)?void 0:f.friends,o),following:y(null==(p=e.profile)?void 0:p.following,t),friendsRequested:y(null==(m=e.profile)?void 0:m.friendsRequested,o),friendRequests:y(null==(v=e.profile)?void 0:v.friendRequests,o),followersCount:(null==(h=e.profile)?void 0:h.followersCount)||0,links:(null==(g=e.profile)?void 0:g.links)||[]}}},exports.toVenueDTO=function(e,n,i){var r,o,t;return{id:e._id,venuename:e.venuename,venueaddress:e.venueaddress,geolocation:e.geolocation,phone:e.phone,website:e.website,contactEmail:e.contactEmail,contactName:e.contactName,contactPhone:e.contactPhone,lessonsIds:n,isVerified:i,isDeleted:null!=(r=e.isDeleted)&&r,deletedAt:null!=(o=e.deletedAt)?o:null,createdAt:null!=(t=e.createdAt)?t:null}},exports.toVenueModel=function(e,n,i){var r=e.lessonsIds.map((function(e){return o(n[e],i)})).filter(Boolean);return t({},e,{lessons:r})};
2
2
  //# sourceMappingURL=ldco-contract.cjs.production.min.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ldco-contract.cjs.production.min.js","sources":["../src/lib/converters/toChoreographerModel.ts","../src/lib/converters/toTrackModel.ts","../src/lib/converters/toDanceModel.ts","../src/lib/converters/toCollectionModel.ts","../src/lib/converters/toLessonModel.ts","../src/lib/getAllUserDanceIds.ts","../src/lib/itemArrayToItemRecords.ts","../src/lib/converters/toChoreographerDTO.ts","../src/lib/converters/toCollectionDTO.ts","../src/lib/converters/toDanceDTO.ts","../src/lib/converters/toInstructorDTO.ts","../src/lib/converters/toInstructorModel.ts","../src/lib/converters/toLessonDTO.ts","../src/lib/converters/toTrackDTO.ts","../src/lib/converters/toUserAcquaintanceDTO.ts","../src/lib/converters/toUserAcquaintanceModel.ts","../src/lib/converters/toUserDTO.ts","../src/lib/converters/toUserModel.ts","../src/lib/converters/toVenueDTO.ts","../src/lib/converters/toVenueModel.ts"],"sourcesContent":["import { ChoreographerDTO } from \"../../types/dto/choreographer.dto\";\nimport { ChoreographerModel } from \"../../types/model/choreographer.model\";\n\nexport function toChoreographerModel(\n dto: ChoreographerDTO\n): ChoreographerModel {\n\n return {\n id: dto.id,\n name: dto.name,\n isVerified: dto.isVerified\n };\n}\n","import { TrackDTO } from \"../../types/dto/track.dto\";\nimport { TrackModel } from \"../../types/model/track.model\";\n\nexport function toTrackModel(dto: TrackDTO): TrackModel {\n return {\n id: dto.id,\n name: dto.name,\n artists: dto.artists,\n isrc: dto.isrc,\n uri: dto.uri,\n duration_ms: dto.duration_ms,\n explicit: dto.explicit,\n isVerified: dto.isVerified,\n };\n}\n","import { ChoreographerDTO } from '../../types/dto/choreographer.dto';\nimport { DanceDTO } from '../../types/dto/dance.dto';\nimport { TrackDTO } from '../../types/dto/track.dto';\nimport { DanceModel } from '../../types/model/dance.model';\nimport { toChoreographerModel } from './toChoreographerModel';\nimport { toTrackModel } from './toTrackModel';\n\nexport function toDanceModel(\n dto: DanceDTO,\n trackMap: Record<string, TrackDTO>,\n choreographerMap: Record<string, ChoreographerDTO>\n): DanceModel {\n\n // Handle Tracks\n const tracks = dto.tracks\n .map(id => {\n const track = trackMap[id];\n if (!track) {\n console.warn(`Track not found for ID: ${id} in dance \"${dto.danceName}\"`);\n }\n return track;\n })\n .filter(Boolean)\n .map(toTrackModel);\n\n // Handle Choreographers\n const choreographers = dto.choreographers\n .map(id => {\n const choreographer = choreographerMap[id];\n if (!choreographer) {\n console.warn(`Choreographer not found for ID: ${id} in dance \"${dto.danceName}\"`);\n }\n return choreographer;\n })\n .filter(Boolean)\n .map(toChoreographerModel);\n\n // Handle Primary Track\n const primaryTrackDTO = trackMap[dto.primaryTrack];\n if (!primaryTrackDTO) {\n console.warn(`Primary track not found for dance: \"${dto.danceName}\" (primaryTrack ID: ${dto.primaryTrack})`);\n }\n const primaryTrack = primaryTrackDTO ? toTrackModel(primaryTrackDTO) : null;\n\n // Return a valid DanceModel even if some data is incomplete\n return {\n id: dto.id,\n danceName: dto.danceName,\n choreographers: choreographers,\n stepsheet: dto.stepsheet,\n difficulty: dto.difficulty,\n primaryTrack: primaryTrack,\n tracks: tracks,\n isVerified: dto.isVerified,\n };\n}\n","import { ChoreographerDTO } from '../../types/dto/choreographer.dto';\nimport { CollectionDTO } from '../../types/dto/collection.dto';\nimport { DanceDTO } from '../../types/dto/dance.dto';\nimport { TrackDTO } from '../../types/dto/track.dto';\nimport { CollectionModel } from '../../types/model/collection.model';\nimport { toDanceModel } from './toDanceModel';\n\nexport function toCollectionModel(\n dto: CollectionDTO,\n danceMap: Record<string, DanceDTO>,\n trackMap: Record<string, TrackDTO>,\n choreographerMap: Record<string, ChoreographerDTO>\n): CollectionModel {\n\n const dances = (dto.dances || [])\n .map(id => {\n const dance = danceMap[id];\n if (!dance) {\n console.warn(`Dance with id \"${id}\" not found in danceMap for collection \"${dto.name}\"`);\n }\n return dance;\n })\n .filter(Boolean);\n\n return {\n id: dto.id,\n name: dto.name,\n dances: dances.map(d => toDanceModel(d, trackMap, choreographerMap)),\n isVerified: dto.isVerified,\n createdAt: dto.createdAt,\n updatedAt: dto.updatedAt,\n createdBy: dto.createdBy,\n isCopyable: dto.isCopyable,\n isArchived: dto.isArchived,\n archivedAt: dto.archivedAt,\n };\n}\n","import { InstructorDTO } from \"../../types/dto/instructor.dto\";\nimport { LessonDTO } from \"../../types/dto/lesson.dto\";\nimport { LessonModel } from \"../../types/model/lesson.model\";\n\nexport function toLessonModel(\n lessonDTO: LessonDTO,\n instructorMap: Record<string, InstructorDTO>\n): LessonModel {\n\n return {\n id: lessonDTO.id,\n lessonday: lessonDTO.lessonday,\n lessonstart: lessonDTO.lessonstart,\n instructors: lessonDTO.instructors.map(id => instructorMap[id]).filter(Boolean), // TODO: Do I need the converter?\n duration: lessonDTO.duration,\n lessoncost: lessonDTO.lessoncost,\n notes: lessonDTO.notes,\n difficulty: lessonDTO.difficulty,\n };\n}\n","import { UserDanceDTO } from \"../types/dto/userDances.dto\";\n\nexport function getAllUserDanceIds(userDances: UserDanceDTO): string[] {\n const { favorites = [], flagged = [], known = [], refresh = [] } = userDances ?? {};\n\n const all = [\n ...favorites,\n ...flagged,\n ...known,\n ...refresh,\n ];\n\n // Remove duplicates and return array of string IDs\n return Array.from(new Set(all));\n}","export function itemArrayToItemRecords<T extends { id: string }>(arr: T[]): Record<string, T> {\n return arr.reduce((acc, item) => {\n acc[item.id] = item;\n return acc;\n }, {} as Record<string, T>);\n}\n","import { ChoreographerDTO } from '../../types/dto/choreographer.dto';\nimport { ChoreographerEntity } from '../../types/entities/choreographer.entity';\n\nexport function toChoreographerDTO(\n choreographer: ChoreographerEntity,\n isVerified: boolean\n): ChoreographerDTO {\n\n return {\n id: choreographer._id,\n name: choreographer.name,\n isVerified: isVerified\n };\n}\n","import { CollectionDTO } from '../../types/dto/collection.dto';\nimport { UserCollectionEntity } from '../../types/entities/user_collection.entity';\n\nexport function toCollectionDTO(\n collectionEntity: UserCollectionEntity,\n isVerified: boolean\n): CollectionDTO {\n\n return {\n id: collectionEntity._id,\n name: collectionEntity.name,\n isVerified: isVerified,\n dances: collectionEntity.danceIds,\n createdAt: collectionEntity.createdAt,\n updatedAt: collectionEntity.updatedAt,\n createdBy: collectionEntity.createdBy,\n isPrivate: collectionEntity.isPrivate,\n isCopyable: collectionEntity.isCopyable,\n isArchived: collectionEntity.isArchived,\n archivedAt: collectionEntity.archivedAt\n };\n}\n","import { DanceDTO } from \"../../types/dto/dance.dto\";\nimport { DanceEntity } from \"../../types/entities/dance.entity\";\n\nexport function toDanceDTO(\n dance: DanceEntity,\n isVerified: boolean\n): DanceDTO {\n\n return {\n id: dance._id,\n danceName: dance.danceName,\n choreographers: dance.choreographers?.map((id: string) => id) ?? [],\n stepsheet: dance.stepsheet,\n difficulty: dance.difficulty,\n primaryTrack: dance.primaryTrack ?? '',\n tracks: dance.tracks?.map((id: string) => id) ?? [],\n isVerified: isVerified\n };\n};\n","import { InstructorDTO } from \"../../types/dto/instructor.dto\";\nimport { InstructorEntity } from \"../../types/entities/instructor.entity\";\n\nexport function toInstructorDTO(\n instructor: InstructorEntity,\n isVerified: boolean\n): InstructorDTO {\n\n return {\n id: instructor._id,\n name: instructor.name,\n userid: \"leave this this empty for now and figure it out later...\",\n isVerified: isVerified\n };\n}\n","import { InstructorDTO } from \"../../types/dto/instructor.dto\";\nimport { InstructorModel } from \"../../types/model/instructor.model\";\n\nexport function toInstructorModel(\n dto: InstructorDTO, \n): InstructorModel {\n\n return {\n id: dto.id,\n name: dto.name,\n userid: \"leave this this empty for now and figure it out later...\",\n isVerified: dto.isVerified\n };\n}\n","import { LessonDTO } from \"../../types/dto/lesson.dto\";\nimport { LessonEntity } from \"../../types/entities/lesson.entity\";\n\nexport function toLessonDTO(\n LessonEntity: LessonEntity,\n isVerified: boolean\n): LessonDTO {\n\n return {\n id: LessonEntity._id,\n venueid: LessonEntity.venueid,\n lessonday: LessonEntity.lessonday,\n lessonstart: LessonEntity.lessonstart,\n instructors: LessonEntity.instructors,\n duration: LessonEntity.duration,\n lessoncost: LessonEntity.lessoncost,\n notes: LessonEntity.notes,\n difficulty: LessonEntity.difficulty,\n isVerified: isVerified\n };\n}\n","import { TrackDTO } from \"../../types/dto/track.dto\";\nimport { TrackEntity } from \"../../types/entities/track.entity\";\n\nexport function toTrackDTO(dto: TrackEntity, isVerified: boolean): TrackDTO {\n return {\n id: dto._id,\n name: dto.name,\n artists: dto.artists,\n isrc: dto.isrc,\n uri: dto.uri,\n duration_ms: dto.duration_ms,\n explicit: dto.explicit,\n isVerified: isVerified,\n };\n}\n","import { UserAcquaintanceDTO } from \"../../types/dto/userAcquaintance.dto\";\nimport { UserEntity } from \"../../types/entities/user.entity\";\n\nexport function toUserAcquaintanceDTO(\n user: UserEntity,\n isVerified: boolean,\n userProfile: {\n favorites: string[];\n flagged: string[];\n known: string[];\n refresh: string[];\n collections: string[];\n venues: string[];\n friendsCount: number;\n followingCount: number;\n followersCount: number;\n mutualFriendsCount: number;\n }\n): UserAcquaintanceDTO {\n return {\n id: user._id,\n username: user.username || user.name || '',\n image: user.image || '',\n bio: user.bio || '',\n isVerified,\n profile: {\n dances: {\n favorites: userProfile.favorites,\n flagged: userProfile.flagged,\n known: userProfile.known,\n refresh: userProfile.refresh,\n },\n collections: userProfile.collections,\n venues: userProfile.venues,\n friendsCount: userProfile.friendsCount,\n followingCount: userProfile.followingCount,\n followersCount: userProfile.followersCount,\n mutualFriendsCount: userProfile.mutualFriendsCount,\n links: user.links ?? {},\n },\n };\n}\n","import { ChoreographerDTO } from \"../../types/dto/choreographer.dto\";\nimport { CollectionDTO } from \"../../types/dto/collection.dto\";\nimport { DanceDTO } from \"../../types/dto/dance.dto\";\nimport { TrackDTO } from \"../../types/dto/track.dto\";\nimport { UserAcquaintanceDTO } from \"../../types/dto/userAcquaintance.dto\";\nimport { UserAcquaintanceModel } from \"../../types/model/userAcquaintance.model\";\nimport { toCollectionModel } from \"./toCollectionModel\";\nimport { toDanceModel } from \"./toDanceModel\";\n\nexport function toUserAcquaintanceModel(\n dto: UserAcquaintanceDTO,\n danceMap: Record<string, DanceDTO>,\n trackMap: Record<string, TrackDTO>,\n collectionMap: Record<string, CollectionDTO>,\n choreographerMap: Record<string, ChoreographerDTO>\n): UserAcquaintanceModel {\n\n return {\n id: dto.id,\n username: dto.username,\n image: dto.image,\n bio: dto.bio,\n isVerified: dto.isVerified,\n friendsCount: dto.profile.friendsCount,\n followersCount: dto.profile.followersCount,\n mutualFriendsCount: dto.profile.mutualFriendsCount,\n links: dto.profile.links,\n dances: {\n favorites: dto.profile.dances.favorites.map(id => toDanceModel(danceMap[id], trackMap, choreographerMap)),\n flagged: dto.profile.dances.flagged.map(id => toDanceModel(danceMap[id], trackMap, choreographerMap)),\n known: dto.profile.dances.known.map(id => toDanceModel(danceMap[id], trackMap, choreographerMap)),\n refresh: dto.profile.dances.refresh.map(id => toDanceModel(danceMap[id], trackMap, choreographerMap))\n },\n collections: dto.profile.collections.map(id => toCollectionModel(collectionMap[id], danceMap, trackMap, choreographerMap)),\n };\n}\n","import { UserDTO } from \"../../types/dto/user.dto\";\nimport { UserEntity } from \"../../types/entities/user.entity\";\n\nexport function toUserDTO(\n user: UserEntity,\n isVerified: boolean,\n danceIds: {\n favorites: string[];\n flagged: string[];\n known: string[];\n refresh: string[];\n },\n collections: string[],\n venues: string[] = [],\n friends: string[] = [],\n following: string[] = [],\n friendsRequested: string[] = [],\n friendRequests: string[] = []\n): UserDTO {\n return {\n _id: user._id.toString(),\n email: user.email ?? '',\n name: user.name ?? '',\n username: user.username ?? '',\n image: user.image ?? '',\n bio: user.bio ?? '',\n isVerified,\n profile: {\n danceIds,\n collections,\n venues,\n friends,\n following,\n links: user.links ?? {},\n friendsRequested,\n friendRequests\n },\n };\n};\n\nexport default toUserDTO;\n","import { UserDTO } from \"../../types/dto/user.dto\";\nimport { CollectionModel } from \"../../types/model/collection.model\";\nimport { DanceModel } from \"../../types/model/dance.model\";\nimport { UserModel } from \"../../types/model/user.model\";\nimport { UserAcquaintanceModel } from \"../../types/model/userAcquaintance.model\";\nimport { VenueModel } from \"../../types/model/venue.model\";\n\nexport function toUserModel(\n userDTO: UserDTO,\n danceMap: Record<string, DanceModel>,\n collectionMap: Record<string, CollectionModel>,\n venueMap: Record<string, VenueModel>,\n friendsMap: Record<string, UserAcquaintanceModel>,\n followingMap: Record<string, UserAcquaintanceModel>\n): UserModel {\n const expand = <T>(ids: string[] = [], map: Record<string, T>): T[] => ids.map(id => map[id]).filter(Boolean);\n\n return {\n _id: userDTO._id,\n email: userDTO.email,\n name: userDTO.name,\n username: userDTO.username,\n image: userDTO.image,\n bio: userDTO.bio,\n isVerified: userDTO.isVerified,\n profile: {\n dances: {\n favorites: expand(userDTO.profile?.danceIds?.favorites, danceMap),\n flagged: expand(userDTO.profile?.danceIds?.flagged, danceMap),\n known: expand(userDTO.profile?.danceIds?.known, danceMap),\n refresh: expand(userDTO.profile?.danceIds?.refresh, danceMap),\n },\n collections: expand(userDTO.profile?.collections, collectionMap),\n venues: expand(userDTO.profile?.venues, venueMap),\n friends: expand(userDTO.profile?.friends, friendsMap),\n following: expand(userDTO.profile?.following, followingMap),\n friendsRequested: expand(userDTO.profile?.friendsRequested, friendsMap),\n friendRequests: expand(userDTO.profile?.friendRequests, friendsMap),\n followersCount: userDTO.profile?.followersCount || 0,\n links: userDTO.profile?.links || [],\n },\n };\n}\n","import { VenueDTO } from \"../../types/dto/venue.dto\";\nimport { VenueEntity } from \"../../types/entities/venue.entity\";\n\nexport function toVenueDTO(\n venue: VenueEntity,\n lessonIds: string[],\n isVerified: boolean\n): VenueDTO {\n\n return {\n id: venue._id,\n venuename: venue.venuename,\n venueaddress: venue.venueaddress,\n geolocation: venue.geolocation,\n phone: venue.phone,\n website: venue.website,\n contactEmail: venue.contactEmail,\n contactName: venue.contactName,\n contactPhone: venue.contactPhone,\n lessonsIds: lessonIds,\n isVerified: isVerified,\n isDeleted: venue.isDeleted ?? false,\n deletedAt: venue.deletedAt ?? null,\n createdAt: venue.createdAt ?? null,\n };\n}","import { InstructorDTO } from \"../../types/dto/instructor.dto\";\nimport { LessonDTO } from \"../../types/dto/lesson.dto\";\nimport { VenueDTO } from \"../../types/dto/venue.dto\";\nimport { VenueModel } from \"../../types/model/venue.model\";\nimport { toLessonModel } from \"./toLessonModel\";\n\nexport function toVenueModel(\n venueDTO: VenueDTO,\n lessonMap: Record<string, LessonDTO>,\n instructorMap: Record<string, InstructorDTO>\n): VenueModel {\n const expandedLessons = venueDTO.lessonsIds\n .map(id => toLessonModel(lessonMap[id], instructorMap))\n .filter(Boolean);\n\n return {\n ...venueDTO,\n lessons: expandedLessons,\n };\n}\n"],"names":["toChoreographerModel","dto","id","name","isVerified","toTrackModel","artists","isrc","uri","duration_ms","explicit","toDanceModel","trackMap","choreographerMap","tracks","map","track","console","warn","danceName","filter","Boolean","choreographers","choreographer","primaryTrackDTO","primaryTrack","stepsheet","difficulty","toCollectionModel","danceMap","dances","dance","d","createdAt","updatedAt","createdBy","isCopyable","isArchived","archivedAt","toLessonModel","lessonDTO","instructorMap","lessonday","lessonstart","instructors","duration","lessoncost","notes","userDances","_ref","_ref$favorites","favorites","_ref$flagged","flagged","_ref$known","known","_ref$refresh","refresh","all","concat","Array","from","Set","arr","reduce","acc","item","_id","collectionEntity","danceIds","isPrivate","_dance$choreographers","_dance$choreographers2","_dance$primaryTrack","_dance$tracks$map","_dance$tracks","instructor","userid","LessonEntity","venueid","user","userProfile","username","image","bio","profile","collections","venues","friendsCount","followingCount","followersCount","mutualFriendsCount","links","_user$links","collectionMap","friends","following","friendsRequested","friendRequests","toString","email","_user$email","_user$name","_user$username","_user$image","_user$bio","userDTO","venueMap","friendsMap","followingMap","expand","ids","_userDTO$profile","_userDTO$profile2","_userDTO$profile3","_userDTO$profile4","_userDTO$profile5","_userDTO$profile6","_userDTO$profile7","_userDTO$profile8","_userDTO$profile9","_userDTO$profile10","_userDTO$profile11","_userDTO$profile12","venue","lessonIds","venuename","venueaddress","geolocation","phone","website","contactEmail","contactName","contactPhone","lessonsIds","isDeleted","_venue$isDeleted","deletedAt","_venue$deletedAt","_venue$createdAt","venueDTO","lessonMap","expandedLessons","_extends","lessons"],"mappings":"sBAGgBA,EACZC,GAGF,MAAO,CACLC,GAAID,EAAIC,GACRC,KAAMF,EAAIE,KACVC,WAAYH,EAAIG,qBCPJC,EAAaJ,GAC3B,MAAO,CACLC,GAAID,EAAIC,GACRC,KAAMF,EAAIE,KACVG,QAASL,EAAIK,QACbC,KAAMN,EAAIM,KACVC,IAAKP,EAAIO,IACTC,YAAaR,EAAIQ,YACjBC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,SAAMS,EAACb,EAAQrB,gBAARkC,EAAiBvB,UAAWa,GAC9CZ,iBAAkBa,SAAMU,EAACd,EAAQrB,gBAARmC,EAAiBvB,iBAAkBW,GAC5DV,eAAgBY,SAAMW,EAACf,EAAQrB,gBAARoC,EAAiBvB,eAAgBU,GACxDlB,uBAAgBgC,EAAAhB,EAAQrB,gBAARqC,EAAiBhC,iBAAkB,EACnDE,cAAO+B,EAAAjB,EAAQrB,gBAARsC,EAAiB/B,QAAS,kCCnCzCgC,EACAC,EACAzH,aAGA,MAAO,CACHF,GAAI0H,EAAMzD,IACV2D,UAAWF,EAAME,UACjBC,aAAcH,EAAMG,aACpBC,YAAaJ,EAAMI,YACnBC,MAAOL,EAAMK,MACbC,QAASN,EAAMM,QACfC,aAAcP,EAAMO,aACpBC,YAAaR,EAAMQ,YACnBC,aAAcT,EAAMS,aACpBC,WAAYT,EACZzH,WAAYA,EACZmI,iBAASC,EAAEZ,EAAMW,YAASC,EAC1BC,iBAASC,EAAEd,EAAMa,WAASC,EAAI,KAC9BzG,iBAAS0G,EAAEf,EAAM3F,WAAS0G,EAAI,qCChBlCC,EACAC,EACApG,GAEA,IAAMqG,EAAkBF,EAASN,WAC5BvH,KAAI,SAAAb,GAAE,OAAIqC,EAAcsG,EAAU3I,GAAKuC,MACvCrB,OAAOC,SAEZ,OAAA0H,KACOH,GACHI,QAASF"}
1
+ {"version":3,"file":"ldco-contract.cjs.production.min.js","sources":["../src/lib/converters/toChoreographerModel.ts","../src/lib/converters/toTrackModel.ts","../src/lib/converters/toDanceModel.ts","../src/lib/converters/toCollectionModel.ts","../src/lib/converters/toLessonModel.ts","../src/lib/getAllUserDanceIds.ts","../src/lib/itemArrayToItemRecords.ts","../src/lib/converters/toChoreographerDTO.ts","../src/lib/converters/toCollectionDTO.ts","../src/lib/converters/toDanceDTO.ts","../src/lib/converters/toInstructorDTO.ts","../src/lib/converters/toInstructorModel.ts","../src/lib/converters/toLessonDTO.ts","../src/lib/converters/toTrackDTO.ts","../src/lib/converters/toUserAcquaintanceDTO.ts","../src/lib/converters/toUserAcquaintanceModel.ts","../src/lib/converters/toUserDTO.ts","../src/lib/converters/toUserModel.ts","../src/lib/converters/toVenueDTO.ts","../src/lib/converters/toVenueModel.ts"],"sourcesContent":["import { ChoreographerDTO } from \"../../types/dto/choreographer.dto\";\nimport { ChoreographerModel } from \"../../types/model/choreographer.model\";\n\nexport function toChoreographerModel(\n dto: ChoreographerDTO\n): ChoreographerModel {\n\n return {\n id: dto.id,\n name: dto.name,\n isVerified: dto.isVerified\n };\n}\n","import { TrackDTO } from \"../../types/dto/track.dto\";\nimport { TrackModel } from \"../../types/model/track.model\";\n\nexport function toTrackModel(dto: TrackDTO): TrackModel {\n return {\n id: dto.id,\n name: dto.name,\n artists: dto.artists,\n isrc: dto.isrc,\n uri: dto.uri,\n duration_ms: dto.duration_ms,\n explicit: dto.explicit,\n isVerified: dto.isVerified,\n };\n}\n","import { ChoreographerDTO } from '../../types/dto/choreographer.dto';\nimport { DanceDTO } from '../../types/dto/dance.dto';\nimport { TrackDTO } from '../../types/dto/track.dto';\nimport { DanceModel } from '../../types/model/dance.model';\nimport { toChoreographerModel } from './toChoreographerModel';\nimport { toTrackModel } from './toTrackModel';\n\nexport function toDanceModel(\n dto: DanceDTO,\n trackMap: Record<string, TrackDTO>,\n choreographerMap: Record<string, ChoreographerDTO>\n): DanceModel {\n\n // Handle Tracks\n const tracks = dto.tracks\n .map(id => {\n const track = trackMap[id];\n if (!track) {\n console.warn(`Track not found for ID: ${id} in dance \"${dto.danceName}\"`);\n }\n return track;\n })\n .filter(Boolean)\n .map(toTrackModel);\n\n // Handle Choreographers\n const choreographers = dto.choreographers\n .map(id => {\n const choreographer = choreographerMap[id];\n if (!choreographer) {\n console.warn(`Choreographer not found for ID: ${id} in dance \"${dto.danceName}\"`);\n }\n return choreographer;\n })\n .filter(Boolean)\n .map(toChoreographerModel);\n\n // Handle Primary Track\n const primaryTrackDTO = trackMap[dto.primaryTrack];\n if (!primaryTrackDTO) {\n console.warn(`Primary track not found for dance: \"${dto.danceName}\" (primaryTrack ID: ${dto.primaryTrack})`);\n }\n const primaryTrack = primaryTrackDTO ? toTrackModel(primaryTrackDTO) : null;\n\n // Return a valid DanceModel even if some data is incomplete\n return {\n id: dto.id,\n danceName: dto.danceName,\n choreographers: choreographers,\n stepsheet: dto.stepsheet,\n difficulty: dto.difficulty,\n primaryTrack: primaryTrack,\n tracks: tracks,\n isVerified: dto.isVerified,\n };\n}\n","import { ChoreographerDTO } from '../../types/dto/choreographer.dto';\nimport { CollectionDTO } from '../../types/dto/collection.dto';\nimport { DanceDTO } from '../../types/dto/dance.dto';\nimport { TrackDTO } from '../../types/dto/track.dto';\nimport { CollectionModel } from '../../types/model/collection.model';\nimport { toDanceModel } from './toDanceModel';\n\nexport function toCollectionModel(\n dto: CollectionDTO,\n danceMap: Record<string, DanceDTO>,\n trackMap: Record<string, TrackDTO>,\n choreographerMap: Record<string, ChoreographerDTO>\n): CollectionModel {\n\n const dances = (dto.dances || [])\n .map(id => {\n const dance = danceMap[id];\n if (!dance) {\n console.warn(`Dance with id \"${id}\" not found in danceMap for collection \"${dto.name}\"`);\n }\n return dance;\n })\n .filter(Boolean);\n\n return {\n id: dto.id,\n name: dto.name,\n dances: dances.map(d => toDanceModel(d, trackMap, choreographerMap)),\n isVerified: dto.isVerified,\n createdAt: dto.createdAt,\n updatedAt: dto.updatedAt,\n createdBy: dto.createdBy,\n isCopyable: dto.isCopyable,\n isArchived: dto.isArchived,\n archivedAt: dto.archivedAt,\n };\n}\n","import { InstructorDTO } from \"../../types/dto/instructor.dto\";\nimport { LessonDTO } from \"../../types/dto/lesson.dto\";\nimport { LessonModel } from \"../../types/model/lesson.model\";\n\nexport function toLessonModel(\n lessonDTO: LessonDTO,\n instructorMap: Record<string, InstructorDTO>\n): LessonModel {\n\n return {\n id: lessonDTO.id,\n lessonday: lessonDTO.lessonday,\n lessonstart: lessonDTO.lessonstart,\n instructors: lessonDTO.instructors.map(id => instructorMap[id]).filter(Boolean), // TODO: Do I need the converter?\n duration: lessonDTO.duration,\n lessoncost: lessonDTO.lessoncost,\n notes: lessonDTO.notes,\n difficulty: lessonDTO.difficulty,\n };\n}\n","import { UserDanceDTO } from \"../types/dto/userDances.dto\";\n\nexport function getAllUserDanceIds(userDances: UserDanceDTO): string[] {\n const { favorites = [], flagged = [], known = [], refresh = [] } = userDances ?? {};\n\n const all = [\n ...favorites,\n ...flagged,\n ...known,\n ...refresh,\n ];\n\n // Remove duplicates and return array of string IDs\n return Array.from(new Set(all));\n}","export function itemArrayToItemRecords<T extends { id: string }>(arr: T[]): Record<string, T> {\n return arr.reduce((acc, item) => {\n acc[item.id] = item;\n return acc;\n }, {} as Record<string, T>);\n}\n","import { ChoreographerDTO } from '../../types/dto/choreographer.dto';\nimport { ChoreographerEntity } from '../../types/entities/choreographer.entity';\n\nexport function toChoreographerDTO(\n choreographer: ChoreographerEntity,\n isVerified: boolean\n): ChoreographerDTO {\n\n return {\n id: choreographer._id,\n name: choreographer.name,\n isVerified: isVerified\n };\n}\n","import { CollectionDTO } from '../../types/dto/collection.dto';\nimport { UserCollectionEntity } from '../../types/entities/user_collection.entity';\n\nexport function toCollectionDTO(\n collectionEntity: UserCollectionEntity,\n isVerified: boolean\n): CollectionDTO {\n\n return {\n id: collectionEntity._id,\n name: collectionEntity.name,\n isVerified: isVerified,\n dances: collectionEntity.danceIds,\n createdAt: collectionEntity.createdAt,\n updatedAt: collectionEntity.updatedAt,\n createdBy: collectionEntity.createdBy,\n isPrivate: collectionEntity.isPrivate,\n isCopyable: collectionEntity.isCopyable,\n isArchived: collectionEntity.isArchived,\n archivedAt: collectionEntity.archivedAt\n };\n}\n","import { DanceDTO } from \"../../types/dto/dance.dto\";\nimport { DanceEntity } from \"../../types/entities/dance.entity\";\n\nexport function toDanceDTO(\n dance: DanceEntity,\n isVerified: boolean\n): DanceDTO {\n\n return {\n id: dance._id,\n danceName: dance.danceName,\n choreographers: dance.choreographers?.map((id: string) => id) ?? [],\n stepsheet: dance.stepsheet,\n difficulty: dance.difficulty,\n primaryTrack: dance.primaryTrack ?? '',\n tracks: dance.tracks?.map((id: string) => id) ?? [],\n isVerified: isVerified\n };\n};\n","import { InstructorDTO } from \"../../types/dto/instructor.dto\";\nimport { InstructorEntity } from \"../../types/entities/instructor.entity\";\n\nexport function toInstructorDTO(\n instructor: InstructorEntity,\n isVerified: boolean\n): InstructorDTO {\n\n return {\n id: instructor._id,\n name: instructor.name,\n userid: \"leave this this empty for now and figure it out later...\",\n isVerified: isVerified\n };\n}\n","import { InstructorDTO } from \"../../types/dto/instructor.dto\";\nimport { InstructorModel } from \"../../types/model/instructor.model\";\n\nexport function toInstructorModel(\n dto: InstructorDTO, \n): InstructorModel {\n\n return {\n id: dto.id,\n name: dto.name,\n userid: \"leave this this empty for now and figure it out later...\",\n isVerified: dto.isVerified\n };\n}\n","import { LessonDTO } from \"../../types/dto/lesson.dto\";\nimport { LessonEntity } from \"../../types/entities/lesson.entity\";\n\nexport function toLessonDTO(\n LessonEntity: LessonEntity,\n isVerified: boolean\n): LessonDTO {\n\n return {\n id: LessonEntity._id,\n venueid: LessonEntity.venueid,\n lessonday: LessonEntity.lessonday,\n lessonstart: LessonEntity.lessonstart,\n instructors: LessonEntity.instructors,\n duration: LessonEntity.duration,\n lessoncost: LessonEntity.lessoncost,\n notes: LessonEntity.notes,\n difficulty: LessonEntity.difficulty,\n isVerified: isVerified\n };\n}\n","import { TrackDTO } from \"../../types/dto/track.dto\";\nimport { TrackEntity } from \"../../types/entities/track.entity\";\n\nexport function toTrackDTO(dto: TrackEntity, isVerified: boolean): TrackDTO {\n return {\n id: dto._id,\n name: dto.name,\n artists: dto.artists,\n isrc: dto.isrc,\n uri: dto.uri,\n duration_ms: dto.duration_ms,\n explicit: dto.explicit,\n isVerified: isVerified,\n };\n}\n","import { UserAcquaintanceDTO } from \"../../types/dto/userAcquaintance.dto\";\nimport { UserEntity } from \"../../types/entities/user.entity\";\n\nexport function toUserAcquaintanceDTO(\n user: UserEntity,\n isVerified: boolean,\n userProfile: {\n favorites: string[];\n flagged: string[];\n known: string[];\n refresh: string[];\n collections: string[];\n venues: string[];\n friendsCount: number;\n followingCount: number;\n followersCount: number;\n mutualFriendsCount: number;\n }\n): UserAcquaintanceDTO {\n return {\n id: user._id,\n username: user.username || user.name || '',\n image: user.image || '',\n bio: user.bio || '',\n isVerified,\n profile: {\n dances: {\n favorites: userProfile.favorites,\n flagged: userProfile.flagged,\n known: userProfile.known,\n refresh: userProfile.refresh,\n },\n collections: userProfile.collections,\n venues: userProfile.venues,\n friendsCount: userProfile.friendsCount,\n followingCount: userProfile.followingCount,\n followersCount: userProfile.followersCount,\n mutualFriendsCount: userProfile.mutualFriendsCount,\n links: user.links ?? {},\n },\n };\n}\n","import { ChoreographerDTO } from \"../../types/dto/choreographer.dto\";\nimport { CollectionDTO } from \"../../types/dto/collection.dto\";\nimport { DanceDTO } from \"../../types/dto/dance.dto\";\nimport { TrackDTO } from \"../../types/dto/track.dto\";\nimport { UserAcquaintanceDTO } from \"../../types/dto/userAcquaintance.dto\";\nimport { UserAcquaintanceModel } from \"../../types/model/userAcquaintance.model\";\nimport { toCollectionModel } from \"./toCollectionModel\";\nimport { toDanceModel } from \"./toDanceModel\";\n\nexport function toUserAcquaintanceModel(\n dto: UserAcquaintanceDTO,\n danceMap: Record<string, DanceDTO>,\n trackMap: Record<string, TrackDTO>,\n collectionMap: Record<string, CollectionDTO>,\n choreographerMap: Record<string, ChoreographerDTO>\n): UserAcquaintanceModel {\n\n return {\n id: dto.id,\n username: dto.username,\n image: dto.image,\n bio: dto.bio,\n isVerified: dto.isVerified,\n friendsCount: dto.profile.friendsCount,\n followersCount: dto.profile.followersCount,\n mutualFriendsCount: dto.profile.mutualFriendsCount,\n links: dto.profile.links,\n dances: {\n favorites: dto.profile.dances.favorites.map(id => toDanceModel(danceMap[id], trackMap, choreographerMap)),\n flagged: dto.profile.dances.flagged.map(id => toDanceModel(danceMap[id], trackMap, choreographerMap)),\n known: dto.profile.dances.known.map(id => toDanceModel(danceMap[id], trackMap, choreographerMap)),\n refresh: dto.profile.dances.refresh.map(id => toDanceModel(danceMap[id], trackMap, choreographerMap))\n },\n collections: dto.profile.collections.map(id => toCollectionModel(collectionMap[id], danceMap, trackMap, choreographerMap)),\n };\n}\n","import { UserDTO } from \"../../types/dto/user.dto\";\nimport { UserEntity } from \"../../types/entities/user.entity\";\n\nexport function toUserDTO(\n user: UserEntity,\n isVerified: boolean,\n danceIds: {\n favorites: string[];\n flagged: string[];\n known: string[];\n refresh: string[];\n },\n collections: string[],\n venues: string[] = [],\n friends: string[] = [],\n following: string[] = [],\n friendsRequested: string[] = [],\n friendRequests: string[] = []\n): UserDTO {\n return {\n id: user._id.toString(),\n email: user.email ?? '',\n name: user.name ?? '',\n username: user.username ?? '',\n image: user.image ?? '',\n bio: user.bio ?? '',\n isVerified,\n profile: {\n danceIds,\n collections,\n venues,\n friends,\n following,\n links: user.links ?? {},\n friendsRequested,\n friendRequests\n },\n };\n};\n\nexport default toUserDTO;\n","import { UserDTO } from \"../../types/dto/user.dto\";\nimport { CollectionModel } from \"../../types/model/collection.model\";\nimport { DanceModel } from \"../../types/model/dance.model\";\nimport { UserModel } from \"../../types/model/user.model\";\nimport { UserAcquaintanceModel } from \"../../types/model/userAcquaintance.model\";\nimport { VenueModel } from \"../../types/model/venue.model\";\n\nexport function toUserModel(\n userDTO: UserDTO,\n danceMap: Record<string, DanceModel>,\n collectionMap: Record<string, CollectionModel>,\n venueMap: Record<string, VenueModel>,\n friendsMap: Record<string, UserAcquaintanceModel>,\n followingMap: Record<string, UserAcquaintanceModel>\n): UserModel {\n const expand = <T>(ids: string[] = [], map: Record<string, T>): T[] => ids.map(id => map[id]).filter(Boolean);\n\n return {\n _id: userDTO.id,\n email: userDTO.email,\n name: userDTO.name,\n username: userDTO.username,\n image: userDTO.image,\n bio: userDTO.bio,\n isVerified: userDTO.isVerified,\n profile: {\n dances: {\n favorites: expand(userDTO.profile?.danceIds?.favorites, danceMap),\n flagged: expand(userDTO.profile?.danceIds?.flagged, danceMap),\n known: expand(userDTO.profile?.danceIds?.known, danceMap),\n refresh: expand(userDTO.profile?.danceIds?.refresh, danceMap),\n },\n collections: expand(userDTO.profile?.collections, collectionMap),\n venues: expand(userDTO.profile?.venues, venueMap),\n friends: expand(userDTO.profile?.friends, friendsMap),\n following: expand(userDTO.profile?.following, followingMap),\n friendsRequested: expand(userDTO.profile?.friendsRequested, friendsMap),\n friendRequests: expand(userDTO.profile?.friendRequests, friendsMap),\n followersCount: userDTO.profile?.followersCount || 0,\n links: userDTO.profile?.links || [],\n },\n };\n}\n","import { VenueDTO } from \"../../types/dto/venue.dto\";\nimport { VenueEntity } from \"../../types/entities/venue.entity\";\n\nexport function toVenueDTO(\n venue: VenueEntity,\n lessonIds: string[],\n isVerified: boolean\n): VenueDTO {\n\n return {\n id: venue._id,\n venuename: venue.venuename,\n venueaddress: venue.venueaddress,\n geolocation: venue.geolocation,\n phone: venue.phone,\n website: venue.website,\n contactEmail: venue.contactEmail,\n contactName: venue.contactName,\n contactPhone: venue.contactPhone,\n lessonsIds: lessonIds,\n isVerified: isVerified,\n isDeleted: venue.isDeleted ?? false,\n deletedAt: venue.deletedAt ?? null,\n createdAt: venue.createdAt ?? null,\n };\n}","import { InstructorDTO } from \"../../types/dto/instructor.dto\";\nimport { LessonDTO } from \"../../types/dto/lesson.dto\";\nimport { VenueDTO } from \"../../types/dto/venue.dto\";\nimport { VenueModel } from \"../../types/model/venue.model\";\nimport { toLessonModel } from \"./toLessonModel\";\n\nexport function toVenueModel(\n venueDTO: VenueDTO,\n lessonMap: Record<string, LessonDTO>,\n instructorMap: Record<string, InstructorDTO>\n): VenueModel {\n const expandedLessons = venueDTO.lessonsIds\n .map(id => toLessonModel(lessonMap[id], instructorMap))\n .filter(Boolean);\n\n return {\n ...venueDTO,\n lessons: expandedLessons,\n };\n}\n"],"names":["toChoreographerModel","dto","id","name","isVerified","toTrackModel","artists","isrc","uri","duration_ms","explicit","toDanceModel","trackMap","choreographerMap","tracks","map","track","console","warn","danceName","filter","Boolean","choreographers","choreographer","primaryTrackDTO","primaryTrack","stepsheet","difficulty","toCollectionModel","danceMap","dances","dance","d","createdAt","updatedAt","createdBy","isCopyable","isArchived","archivedAt","toLessonModel","lessonDTO","instructorMap","lessonday","lessonstart","instructors","duration","lessoncost","notes","userDances","_ref","_ref$favorites","favorites","_ref$flagged","flagged","_ref$known","known","_ref$refresh","refresh","all","concat","Array","from","Set","arr","reduce","acc","item","_id","collectionEntity","danceIds","isPrivate","_dance$choreographers","_dance$choreographers2","_dance$primaryTrack","_dance$tracks$map","_dance$tracks","instructor","userid","LessonEntity","venueid","user","userProfile","username","image","bio","profile","collections","venues","friendsCount","followingCount","followersCount","mutualFriendsCount","links","_user$links","collectionMap","friends","following","friendsRequested","friendRequests","toString","email","_user$email","_user$name","_user$username","_user$image","_user$bio","userDTO","venueMap","friendsMap","followingMap","expand","ids","_userDTO$profile","_userDTO$profile2","_userDTO$profile3","_userDTO$profile4","_userDTO$profile5","_userDTO$profile6","_userDTO$profile7","_userDTO$profile8","_userDTO$profile9","_userDTO$profile10","_userDTO$profile11","_userDTO$profile12","venue","lessonIds","venuename","venueaddress","geolocation","phone","website","contactEmail","contactName","contactPhone","lessonsIds","isDeleted","_venue$isDeleted","deletedAt","_venue$deletedAt","_venue$createdAt","venueDTO","lessonMap","expandedLessons","_extends","lessons"],"mappings":"sBAGgBA,EACZC,GAGF,MAAO,CACLC,GAAID,EAAIC,GACRC,KAAMF,EAAIE,KACVC,WAAYH,EAAIG,qBCPJC,EAAaJ,GAC3B,MAAO,CACLC,GAAID,EAAIC,GACRC,KAAMF,EAAIE,KACVG,QAASL,EAAIK,QACbC,KAAMN,EAAIM,KACVC,IAAKP,EAAIO,IACTC,YAAaR,EAAIQ,YACjBC,SAAUT,EAAIS,SACdN,WAAYH,EAAIG,qBCLJO,EACdV,EACAW,EACAC,GAIA,IAAMC,EAASb,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EAAQrB,gBAARmC,EAAiBvB,iBAAkBW,GAC5DV,eAAgBY,SAAMW,EAACf,EAAQrB,gBAARoC,EAAiBvB,eAAgBU,GACxDlB,uBAAgBgC,EAAAhB,EAAQrB,gBAARqC,EAAiBhC,iBAAkB,EACnDE,cAAO+B,EAAAjB,EAAQrB,gBAARsC,EAAiB/B,QAAS,kCCnCzCgC,EACAC,EACAzH,aAGA,MAAO,CACHF,GAAI0H,EAAMzD,IACV2D,UAAWF,EAAME,UACjBC,aAAcH,EAAMG,aACpBC,YAAaJ,EAAMI,YACnBC,MAAOL,EAAMK,MACbC,QAASN,EAAMM,QACfC,aAAcP,EAAMO,aACpBC,YAAaR,EAAMQ,YACnBC,aAAcT,EAAMS,aACpBC,WAAYT,EACZzH,WAAYA,EACZmI,iBAASC,EAAEZ,EAAMW,YAASC,EAC1BC,iBAASC,EAAEd,EAAMa,WAASC,EAAI,KAC9BzG,iBAAS0G,EAAEf,EAAM3F,WAAS0G,EAAI,qCChBlCC,EACAC,EACApG,GAEA,IAAMqG,EAAkBF,EAASN,WAC5BvH,KAAI,SAAAb,GAAE,OAAIqC,EAAcsG,EAAU3I,GAAKuC,MACvCrB,OAAOC,SAEZ,OAAA0H,KACOH,GACHI,QAASF"}
@@ -279,7 +279,7 @@ function toUserDTO(user, isVerified, danceIds, collections, venues, friends, fol
279
279
  friendRequests = [];
280
280
  }
281
281
  return {
282
- _id: user._id.toString(),
282
+ id: user._id.toString(),
283
283
  email: (_user$email = user.email) != null ? _user$email : '',
284
284
  name: (_user$name = user.name) != null ? _user$name : '',
285
285
  username: (_user$username = user.username) != null ? _user$username : '',
@@ -310,7 +310,7 @@ function toUserModel(userDTO, danceMap, collectionMap, venueMap, friendsMap, fol
310
310
  }).filter(Boolean);
311
311
  };
312
312
  return {
313
- _id: userDTO._id,
313
+ _id: userDTO.id,
314
314
  email: userDTO.email,
315
315
  name: userDTO.name,
316
316
  username: userDTO.username,
@@ -1 +1 @@
1
- {"version":3,"file":"ldco-contract.esm.js","sources":["../src/lib/getAllUserDanceIds.ts","../src/lib/itemArrayToItemRecords.ts","../src/lib/converters/toChoreographerDTO.ts","../src/lib/converters/toChoreographerModel.ts","../src/lib/converters/toCollectionDTO.ts","../src/lib/converters/toTrackModel.ts","../src/lib/converters/toDanceModel.ts","../src/lib/converters/toCollectionModel.ts","../src/lib/converters/toDanceDTO.ts","../src/lib/converters/toInstructorDTO.ts","../src/lib/converters/toInstructorModel.ts","../src/lib/converters/toLessonDTO.ts","../src/lib/converters/toLessonModel.ts","../src/lib/converters/toTrackDTO.ts","../src/lib/converters/toUserAcquaintanceDTO.ts","../src/lib/converters/toUserAcquaintanceModel.ts","../src/lib/converters/toUserDTO.ts","../src/lib/converters/toUserModel.ts","../src/lib/converters/toVenueDTO.ts","../src/lib/converters/toVenueModel.ts"],"sourcesContent":["import { UserDanceDTO } from \"../types/dto/userDances.dto\";\n\nexport function getAllUserDanceIds(userDances: UserDanceDTO): string[] {\n const { favorites = [], flagged = [], known = [], refresh = [] } = userDances ?? {};\n\n const all = [\n ...favorites,\n ...flagged,\n ...known,\n ...refresh,\n ];\n\n // Remove duplicates and return array of string IDs\n return Array.from(new Set(all));\n}","export function itemArrayToItemRecords<T extends { id: string }>(arr: T[]): Record<string, T> {\n return arr.reduce((acc, item) => {\n acc[item.id] = item;\n return acc;\n }, {} as Record<string, T>);\n}\n","import { ChoreographerDTO } from '../../types/dto/choreographer.dto';\nimport { ChoreographerEntity } from '../../types/entities/choreographer.entity';\n\nexport function toChoreographerDTO(\n choreographer: ChoreographerEntity,\n isVerified: boolean\n): ChoreographerDTO {\n\n return {\n id: choreographer._id,\n name: choreographer.name,\n isVerified: isVerified\n };\n}\n","import { ChoreographerDTO } from \"../../types/dto/choreographer.dto\";\nimport { ChoreographerModel } from \"../../types/model/choreographer.model\";\n\nexport function toChoreographerModel(\n dto: ChoreographerDTO\n): ChoreographerModel {\n\n return {\n id: dto.id,\n name: dto.name,\n isVerified: dto.isVerified\n };\n}\n","import { CollectionDTO } from '../../types/dto/collection.dto';\nimport { UserCollectionEntity } from '../../types/entities/user_collection.entity';\n\nexport function toCollectionDTO(\n collectionEntity: UserCollectionEntity,\n isVerified: boolean\n): CollectionDTO {\n\n return {\n id: collectionEntity._id,\n name: collectionEntity.name,\n isVerified: isVerified,\n dances: collectionEntity.danceIds,\n createdAt: collectionEntity.createdAt,\n updatedAt: collectionEntity.updatedAt,\n createdBy: collectionEntity.createdBy,\n isPrivate: collectionEntity.isPrivate,\n isCopyable: collectionEntity.isCopyable,\n isArchived: collectionEntity.isArchived,\n archivedAt: collectionEntity.archivedAt\n };\n}\n","import { TrackDTO } from \"../../types/dto/track.dto\";\nimport { TrackModel } from \"../../types/model/track.model\";\n\nexport function toTrackModel(dto: TrackDTO): TrackModel {\n return {\n id: dto.id,\n name: dto.name,\n artists: dto.artists,\n isrc: dto.isrc,\n uri: dto.uri,\n duration_ms: dto.duration_ms,\n explicit: dto.explicit,\n isVerified: dto.isVerified,\n };\n}\n","import { ChoreographerDTO } from '../../types/dto/choreographer.dto';\nimport { DanceDTO } from '../../types/dto/dance.dto';\nimport { TrackDTO } from '../../types/dto/track.dto';\nimport { DanceModel } from '../../types/model/dance.model';\nimport { toChoreographerModel } from './toChoreographerModel';\nimport { toTrackModel } from './toTrackModel';\n\nexport function toDanceModel(\n dto: DanceDTO,\n trackMap: Record<string, TrackDTO>,\n choreographerMap: Record<string, ChoreographerDTO>\n): DanceModel {\n\n // Handle Tracks\n const tracks = dto.tracks\n .map(id => {\n const track = trackMap[id];\n if (!track) {\n console.warn(`Track not found for ID: ${id} in dance \"${dto.danceName}\"`);\n }\n return track;\n })\n .filter(Boolean)\n .map(toTrackModel);\n\n // Handle Choreographers\n const choreographers = dto.choreographers\n .map(id => {\n const choreographer = choreographerMap[id];\n if (!choreographer) {\n console.warn(`Choreographer not found for ID: ${id} in dance \"${dto.danceName}\"`);\n }\n return choreographer;\n })\n .filter(Boolean)\n .map(toChoreographerModel);\n\n // Handle Primary Track\n const primaryTrackDTO = trackMap[dto.primaryTrack];\n if (!primaryTrackDTO) {\n console.warn(`Primary track not found for dance: \"${dto.danceName}\" (primaryTrack ID: ${dto.primaryTrack})`);\n }\n const primaryTrack = primaryTrackDTO ? toTrackModel(primaryTrackDTO) : null;\n\n // Return a valid DanceModel even if some data is incomplete\n return {\n id: dto.id,\n danceName: dto.danceName,\n choreographers: choreographers,\n stepsheet: dto.stepsheet,\n difficulty: dto.difficulty,\n primaryTrack: primaryTrack,\n tracks: tracks,\n isVerified: dto.isVerified,\n };\n}\n","import { ChoreographerDTO } from '../../types/dto/choreographer.dto';\nimport { CollectionDTO } from '../../types/dto/collection.dto';\nimport { DanceDTO } from '../../types/dto/dance.dto';\nimport { TrackDTO } from '../../types/dto/track.dto';\nimport { CollectionModel } from '../../types/model/collection.model';\nimport { toDanceModel } from './toDanceModel';\n\nexport function toCollectionModel(\n dto: CollectionDTO,\n danceMap: Record<string, DanceDTO>,\n trackMap: Record<string, TrackDTO>,\n choreographerMap: Record<string, ChoreographerDTO>\n): CollectionModel {\n\n const dances = (dto.dances || [])\n .map(id => {\n const dance = danceMap[id];\n if (!dance) {\n console.warn(`Dance with id \"${id}\" not found in danceMap for collection \"${dto.name}\"`);\n }\n return dance;\n })\n .filter(Boolean);\n\n return {\n id: dto.id,\n name: dto.name,\n dances: dances.map(d => toDanceModel(d, trackMap, choreographerMap)),\n isVerified: dto.isVerified,\n createdAt: dto.createdAt,\n updatedAt: dto.updatedAt,\n createdBy: dto.createdBy,\n isCopyable: dto.isCopyable,\n isArchived: dto.isArchived,\n archivedAt: dto.archivedAt,\n };\n}\n","import { DanceDTO } from \"../../types/dto/dance.dto\";\nimport { DanceEntity } from \"../../types/entities/dance.entity\";\n\nexport function toDanceDTO(\n dance: DanceEntity,\n isVerified: boolean\n): DanceDTO {\n\n return {\n id: dance._id,\n danceName: dance.danceName,\n choreographers: dance.choreographers?.map((id: string) => id) ?? [],\n stepsheet: dance.stepsheet,\n difficulty: dance.difficulty,\n primaryTrack: dance.primaryTrack ?? '',\n tracks: dance.tracks?.map((id: string) => id) ?? [],\n isVerified: isVerified\n };\n};\n","import { InstructorDTO } from \"../../types/dto/instructor.dto\";\nimport { InstructorEntity } from \"../../types/entities/instructor.entity\";\n\nexport function toInstructorDTO(\n instructor: InstructorEntity,\n isVerified: boolean\n): InstructorDTO {\n\n return {\n id: instructor._id,\n name: instructor.name,\n userid: \"leave this this empty for now and figure it out later...\",\n isVerified: isVerified\n };\n}\n","import { InstructorDTO } from \"../../types/dto/instructor.dto\";\nimport { InstructorModel } from \"../../types/model/instructor.model\";\n\nexport function toInstructorModel(\n dto: InstructorDTO, \n): InstructorModel {\n\n return {\n id: dto.id,\n name: dto.name,\n userid: \"leave this this empty for now and figure it out later...\",\n isVerified: dto.isVerified\n };\n}\n","import { LessonDTO } from \"../../types/dto/lesson.dto\";\nimport { LessonEntity } from \"../../types/entities/lesson.entity\";\n\nexport function toLessonDTO(\n LessonEntity: LessonEntity,\n isVerified: boolean\n): LessonDTO {\n\n return {\n id: LessonEntity._id,\n venueid: LessonEntity.venueid,\n lessonday: LessonEntity.lessonday,\n lessonstart: LessonEntity.lessonstart,\n instructors: LessonEntity.instructors,\n duration: LessonEntity.duration,\n lessoncost: LessonEntity.lessoncost,\n notes: LessonEntity.notes,\n difficulty: LessonEntity.difficulty,\n isVerified: isVerified\n };\n}\n","import { InstructorDTO } from \"../../types/dto/instructor.dto\";\nimport { LessonDTO } from \"../../types/dto/lesson.dto\";\nimport { LessonModel } from \"../../types/model/lesson.model\";\n\nexport function toLessonModel(\n lessonDTO: LessonDTO,\n instructorMap: Record<string, InstructorDTO>\n): LessonModel {\n\n return {\n id: lessonDTO.id,\n lessonday: lessonDTO.lessonday,\n lessonstart: lessonDTO.lessonstart,\n instructors: lessonDTO.instructors.map(id => instructorMap[id]).filter(Boolean), // TODO: Do I need the converter?\n duration: lessonDTO.duration,\n lessoncost: lessonDTO.lessoncost,\n notes: lessonDTO.notes,\n difficulty: lessonDTO.difficulty,\n };\n}\n","import { TrackDTO } from \"../../types/dto/track.dto\";\nimport { TrackEntity } from \"../../types/entities/track.entity\";\n\nexport function toTrackDTO(dto: TrackEntity, isVerified: boolean): TrackDTO {\n return {\n id: dto._id,\n name: dto.name,\n artists: dto.artists,\n isrc: dto.isrc,\n uri: dto.uri,\n duration_ms: dto.duration_ms,\n explicit: dto.explicit,\n isVerified: isVerified,\n };\n}\n","import { UserAcquaintanceDTO } from \"../../types/dto/userAcquaintance.dto\";\nimport { UserEntity } from \"../../types/entities/user.entity\";\n\nexport function toUserAcquaintanceDTO(\n user: UserEntity,\n isVerified: boolean,\n userProfile: {\n favorites: string[];\n flagged: string[];\n known: string[];\n refresh: string[];\n collections: string[];\n venues: string[];\n friendsCount: number;\n followingCount: number;\n followersCount: number;\n mutualFriendsCount: number;\n }\n): UserAcquaintanceDTO {\n return {\n id: user._id,\n username: user.username || user.name || '',\n image: user.image || '',\n bio: user.bio || '',\n isVerified,\n profile: {\n dances: {\n favorites: userProfile.favorites,\n flagged: userProfile.flagged,\n known: userProfile.known,\n refresh: userProfile.refresh,\n },\n collections: userProfile.collections,\n venues: userProfile.venues,\n friendsCount: userProfile.friendsCount,\n followingCount: userProfile.followingCount,\n followersCount: userProfile.followersCount,\n mutualFriendsCount: userProfile.mutualFriendsCount,\n links: user.links ?? {},\n },\n };\n}\n","import { ChoreographerDTO } from \"../../types/dto/choreographer.dto\";\nimport { CollectionDTO } from \"../../types/dto/collection.dto\";\nimport { DanceDTO } from \"../../types/dto/dance.dto\";\nimport { TrackDTO } from \"../../types/dto/track.dto\";\nimport { UserAcquaintanceDTO } from \"../../types/dto/userAcquaintance.dto\";\nimport { UserAcquaintanceModel } from \"../../types/model/userAcquaintance.model\";\nimport { toCollectionModel } from \"./toCollectionModel\";\nimport { toDanceModel } from \"./toDanceModel\";\n\nexport function toUserAcquaintanceModel(\n dto: UserAcquaintanceDTO,\n danceMap: Record<string, DanceDTO>,\n trackMap: Record<string, TrackDTO>,\n collectionMap: Record<string, CollectionDTO>,\n choreographerMap: Record<string, ChoreographerDTO>\n): UserAcquaintanceModel {\n\n return {\n id: dto.id,\n username: dto.username,\n image: dto.image,\n bio: dto.bio,\n isVerified: dto.isVerified,\n friendsCount: dto.profile.friendsCount,\n followersCount: dto.profile.followersCount,\n mutualFriendsCount: dto.profile.mutualFriendsCount,\n links: dto.profile.links,\n dances: {\n favorites: dto.profile.dances.favorites.map(id => toDanceModel(danceMap[id], trackMap, choreographerMap)),\n flagged: dto.profile.dances.flagged.map(id => toDanceModel(danceMap[id], trackMap, choreographerMap)),\n known: dto.profile.dances.known.map(id => toDanceModel(danceMap[id], trackMap, choreographerMap)),\n refresh: dto.profile.dances.refresh.map(id => toDanceModel(danceMap[id], trackMap, choreographerMap))\n },\n collections: dto.profile.collections.map(id => toCollectionModel(collectionMap[id], danceMap, trackMap, choreographerMap)),\n };\n}\n","import { UserDTO } from \"../../types/dto/user.dto\";\nimport { UserEntity } from \"../../types/entities/user.entity\";\n\nexport function toUserDTO(\n user: UserEntity,\n isVerified: boolean,\n danceIds: {\n favorites: string[];\n flagged: string[];\n known: string[];\n refresh: string[];\n },\n collections: string[],\n venues: string[] = [],\n friends: string[] = [],\n following: string[] = [],\n friendsRequested: string[] = [],\n friendRequests: string[] = []\n): UserDTO {\n return {\n _id: user._id.toString(),\n email: user.email ?? '',\n name: user.name ?? '',\n username: user.username ?? '',\n image: user.image ?? '',\n bio: user.bio ?? '',\n isVerified,\n profile: {\n danceIds,\n collections,\n venues,\n friends,\n following,\n links: user.links ?? {},\n friendsRequested,\n friendRequests\n },\n };\n};\n\nexport default toUserDTO;\n","import { UserDTO } from \"../../types/dto/user.dto\";\nimport { CollectionModel } from \"../../types/model/collection.model\";\nimport { DanceModel } from \"../../types/model/dance.model\";\nimport { UserModel } from \"../../types/model/user.model\";\nimport { UserAcquaintanceModel } from \"../../types/model/userAcquaintance.model\";\nimport { VenueModel } from \"../../types/model/venue.model\";\n\nexport function toUserModel(\n userDTO: UserDTO,\n danceMap: Record<string, DanceModel>,\n collectionMap: Record<string, CollectionModel>,\n venueMap: Record<string, VenueModel>,\n friendsMap: Record<string, UserAcquaintanceModel>,\n followingMap: Record<string, UserAcquaintanceModel>\n): UserModel {\n const expand = <T>(ids: string[] = [], map: Record<string, T>): T[] => ids.map(id => map[id]).filter(Boolean);\n\n return {\n _id: userDTO._id,\n email: userDTO.email,\n name: userDTO.name,\n username: userDTO.username,\n image: userDTO.image,\n bio: userDTO.bio,\n isVerified: userDTO.isVerified,\n profile: {\n dances: {\n favorites: expand(userDTO.profile?.danceIds?.favorites, danceMap),\n flagged: expand(userDTO.profile?.danceIds?.flagged, danceMap),\n known: expand(userDTO.profile?.danceIds?.known, danceMap),\n refresh: expand(userDTO.profile?.danceIds?.refresh, danceMap),\n },\n collections: expand(userDTO.profile?.collections, collectionMap),\n venues: expand(userDTO.profile?.venues, venueMap),\n friends: expand(userDTO.profile?.friends, friendsMap),\n following: expand(userDTO.profile?.following, followingMap),\n friendsRequested: expand(userDTO.profile?.friendsRequested, friendsMap),\n friendRequests: expand(userDTO.profile?.friendRequests, friendsMap),\n followersCount: userDTO.profile?.followersCount || 0,\n links: userDTO.profile?.links || [],\n },\n };\n}\n","import { VenueDTO } from \"../../types/dto/venue.dto\";\nimport { VenueEntity } from \"../../types/entities/venue.entity\";\n\nexport function toVenueDTO(\n venue: VenueEntity,\n lessonIds: string[],\n isVerified: boolean\n): VenueDTO {\n\n return {\n id: venue._id,\n venuename: venue.venuename,\n venueaddress: venue.venueaddress,\n geolocation: venue.geolocation,\n phone: venue.phone,\n website: venue.website,\n contactEmail: venue.contactEmail,\n contactName: venue.contactName,\n contactPhone: venue.contactPhone,\n lessonsIds: lessonIds,\n isVerified: isVerified,\n isDeleted: venue.isDeleted ?? false,\n deletedAt: venue.deletedAt ?? null,\n createdAt: venue.createdAt ?? null,\n };\n}","import { InstructorDTO } from \"../../types/dto/instructor.dto\";\nimport { LessonDTO } from \"../../types/dto/lesson.dto\";\nimport { VenueDTO } from \"../../types/dto/venue.dto\";\nimport { VenueModel } from \"../../types/model/venue.model\";\nimport { toLessonModel } from \"./toLessonModel\";\n\nexport function toVenueModel(\n venueDTO: VenueDTO,\n lessonMap: Record<string, LessonDTO>,\n instructorMap: Record<string, InstructorDTO>\n): VenueModel {\n const expandedLessons = venueDTO.lessonsIds\n .map(id => toLessonModel(lessonMap[id], instructorMap))\n .filter(Boolean);\n\n return {\n ...venueDTO,\n lessons: expandedLessons,\n };\n}\n"],"names":["getAllUserDanceIds","userDances","_ref","_ref$favorites","favorites","_ref$flagged","flagged","_ref$known","known","_ref$refresh","refresh","all","concat","Array","from","Set","itemArrayToItemRecords","arr","reduce","acc","item","id","toChoreographerDTO","choreographer","isVerified","_id","name","toChoreographerModel","dto","toCollectionDTO","collectionEntity","dances","danceIds","createdAt","updatedAt","createdBy","isPrivate","isCopyable","isArchived","archivedAt","toTrackModel","artists","isrc","uri","duration_ms","explicit","toDanceModel","trackMap","choreographerMap","tracks","map","track","console","warn","danceName","filter","Boolean","choreographers","primaryTrackDTO","primaryTrack","stepsheet","difficulty","toCollectionModel","danceMap","dance","d","toDanceDTO","_dance$choreographers","_dance$choreographers2","_dance$primaryTrack","_dance$tracks$map","_dance$tracks","toInstructorDTO","instructor","userid","toInstructorModel","toLessonDTO","LessonEntity","venueid","lessonday","lessonstart","instructors","duration","lessoncost","notes","toLessonModel","lessonDTO","instructorMap","toTrackDTO","toUserAcquaintanceDTO","user","userProfile","username","image","bio","profile","collections","venues","friendsCount","followingCount","followersCount","mutualFriendsCount","links","_user$links","toUserAcquaintanceModel","collectionMap","toUserDTO","friends","following","friendsRequested","friendRequests","toString","email","_user$email","_user$name","_user$username","_user$image","_user$bio","toUserModel","userDTO","venueMap","friendsMap","followingMap","expand","ids","_userDTO$profile","_userDTO$profile2","_userDTO$profile3","_userDTO$profile4","_userDTO$profile5","_userDTO$profile6","_userDTO$profile7","_userDTO$profile8","_userDTO$profile9","_userDTO$profile10","_userDTO$profile11","_userDTO$profile12","toVenueDTO","venue","lessonIds","venuename","venueaddress","geolocation","phone","website","contactEmail","contactName","contactPhone","lessonsIds","isDeleted","_venue$isDeleted","deletedAt","_venue$deletedAt","_venue$createdAt","toVenueModel","venueDTO","lessonMap","expandedLessons","_extends","lessons"],"mappings":"SAEgBA,kBAAkBA,CAACC,UAAwB;EACvD,IAAAC,IAAA,GAAmED,UAAU,WAAVA,UAAU,GAAI,EAAE;IAAAE,cAAA,GAAAD,IAAA,CAA3EE,SAAS;IAATA,SAAS,GAAAD,cAAA,cAAG,EAAE,GAAAA,cAAA;IAAAE,YAAA,GAAAH,IAAA,CAAEI,OAAO;IAAPA,OAAO,GAAAD,YAAA,cAAG,EAAE,GAAAA,YAAA;IAAAE,UAAA,GAAAL,IAAA,CAAEM,KAAK;IAALA,KAAK,GAAAD,UAAA,cAAG,EAAE,GAAAA,UAAA;IAAAE,YAAA,GAAAP,IAAA,CAAEQ,OAAO;IAAPA,OAAO,GAAAD,YAAA,cAAG,EAAE,GAAAA,YAAA;EAE9D,IAAME,GAAG,MAAAC,MAAA,CACFR,SAAS,EACTE,OAAO,EACPE,KAAK,EACLE,OAAO,CACb;;EAGD,OAAOG,KAAK,CAACC,IAAI,CAAC,IAAIC,GAAG,CAACJ,GAAG,CAAC,CAAC;AACnC;;SCdgBK,sBAAsBA,CAA2BC,GAAQ;EACvE,OAAOA,GAAG,CAACC,MAAM,CAAC,UAACC,GAAG,EAAEC,IAAI;IAC1BD,GAAG,CAACC,IAAI,CAACC,EAAE,CAAC,GAAGD,IAAI;IACnB,OAAOD,GAAG;GACX,EAAE,EAAuB,CAAC;AAC7B;;SCFgBG,kBAAkBA,CAC9BC,aAAkC,EAClCC,UAAmB;EAGrB,OAAO;IACLH,EAAE,EAAEE,aAAa,CAACE,GAAG;IACrBC,IAAI,EAAEH,aAAa,CAACG,IAAI;IACxBF,UAAU,EAAEA;GACb;AACH;;SCVgBG,oBAAoBA,CAChCC,GAAqB;EAGvB,OAA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AQ,CAACP,UAAU,CACtClG,GAAG,CAAC,UAAA7B,EAAE;IAAA,OAAIgE,aAAa,CAACuE,SAAS,CAACvI,EAAE,CAAC,EAAEkE,aAAa,CAAC;IAAC,CACtDhC,MAAM,CAACC,OAAO,CAAC;EAEpB,OAAAsG,QAAA,KACOH,QAAQ;IACXI,OAAO,EAAEF;;AAEjB;;;;"}
1
+ {"version":3,"file":"ldco-contract.esm.js","sources":["../src/lib/getAllUserDanceIds.ts","../src/lib/itemArrayToItemRecords.ts","../src/lib/converters/toChoreographerDTO.ts","../src/lib/converters/toChoreographerModel.ts","../src/lib/converters/toCollectionDTO.ts","../src/lib/converters/toTrackModel.ts","../src/lib/converters/toDanceModel.ts","../src/lib/converters/toCollectionModel.ts","../src/lib/converters/toDanceDTO.ts","../src/lib/converters/toInstructorDTO.ts","../src/lib/converters/toInstructorModel.ts","../src/lib/converters/toLessonDTO.ts","../src/lib/converters/toLessonModel.ts","../src/lib/converters/toTrackDTO.ts","../src/lib/converters/toUserAcquaintanceDTO.ts","../src/lib/converters/toUserAcquaintanceModel.ts","../src/lib/converters/toUserDTO.ts","../src/lib/converters/toUserModel.ts","../src/lib/converters/toVenueDTO.ts","../src/lib/converters/toVenueModel.ts"],"sourcesContent":["import { UserDanceDTO } from \"../types/dto/userDances.dto\";\n\nexport function getAllUserDanceIds(userDances: UserDanceDTO): string[] {\n const { favorites = [], flagged = [], known = [], refresh = [] } = userDances ?? {};\n\n const all = [\n ...favorites,\n ...flagged,\n ...known,\n ...refresh,\n ];\n\n // Remove duplicates and return array of string IDs\n return Array.from(new Set(all));\n}","export function itemArrayToItemRecords<T extends { id: string }>(arr: T[]): Record<string, T> {\n return arr.reduce((acc, item) => {\n acc[item.id] = item;\n return acc;\n }, {} as Record<string, T>);\n}\n","import { ChoreographerDTO } from '../../types/dto/choreographer.dto';\nimport { ChoreographerEntity } from '../../types/entities/choreographer.entity';\n\nexport function toChoreographerDTO(\n choreographer: ChoreographerEntity,\n isVerified: boolean\n): ChoreographerDTO {\n\n return {\n id: choreographer._id,\n name: choreographer.name,\n isVerified: isVerified\n };\n}\n","import { ChoreographerDTO } from \"../../types/dto/choreographer.dto\";\nimport { ChoreographerModel } from \"../../types/model/choreographer.model\";\n\nexport function toChoreographerModel(\n dto: ChoreographerDTO\n): ChoreographerModel {\n\n return {\n id: dto.id,\n name: dto.name,\n isVerified: dto.isVerified\n };\n}\n","import { CollectionDTO } from '../../types/dto/collection.dto';\nimport { UserCollectionEntity } from '../../types/entities/user_collection.entity';\n\nexport function toCollectionDTO(\n collectionEntity: UserCollectionEntity,\n isVerified: boolean\n): CollectionDTO {\n\n return {\n id: collectionEntity._id,\n name: collectionEntity.name,\n isVerified: isVerified,\n dances: collectionEntity.danceIds,\n createdAt: collectionEntity.createdAt,\n updatedAt: collectionEntity.updatedAt,\n createdBy: collectionEntity.createdBy,\n isPrivate: collectionEntity.isPrivate,\n isCopyable: collectionEntity.isCopyable,\n isArchived: collectionEntity.isArchived,\n archivedAt: collectionEntity.archivedAt\n };\n}\n","import { TrackDTO } from \"../../types/dto/track.dto\";\nimport { TrackModel } from \"../../types/model/track.model\";\n\nexport function toTrackModel(dto: TrackDTO): TrackModel {\n return {\n id: dto.id,\n name: dto.name,\n artists: dto.artists,\n isrc: dto.isrc,\n uri: dto.uri,\n duration_ms: dto.duration_ms,\n explicit: dto.explicit,\n isVerified: dto.isVerified,\n };\n}\n","import { ChoreographerDTO } from '../../types/dto/choreographer.dto';\nimport { DanceDTO } from '../../types/dto/dance.dto';\nimport { TrackDTO } from '../../types/dto/track.dto';\nimport { DanceModel } from '../../types/model/dance.model';\nimport { toChoreographerModel } from './toChoreographerModel';\nimport { toTrackModel } from './toTrackModel';\n\nexport function toDanceModel(\n dto: DanceDTO,\n trackMap: Record<string, TrackDTO>,\n choreographerMap: Record<string, ChoreographerDTO>\n): DanceModel {\n\n // Handle Tracks\n const tracks = dto.tracks\n .map(id => {\n const track = trackMap[id];\n if (!track) {\n console.warn(`Track not found for ID: ${id} in dance \"${dto.danceName}\"`);\n }\n return track;\n })\n .filter(Boolean)\n .map(toTrackModel);\n\n // Handle Choreographers\n const choreographers = dto.choreographers\n .map(id => {\n const choreographer = choreographerMap[id];\n if (!choreographer) {\n console.warn(`Choreographer not found for ID: ${id} in dance \"${dto.danceName}\"`);\n }\n return choreographer;\n })\n .filter(Boolean)\n .map(toChoreographerModel);\n\n // Handle Primary Track\n const primaryTrackDTO = trackMap[dto.primaryTrack];\n if (!primaryTrackDTO) {\n console.warn(`Primary track not found for dance: \"${dto.danceName}\" (primaryTrack ID: ${dto.primaryTrack})`);\n }\n const primaryTrack = primaryTrackDTO ? toTrackModel(primaryTrackDTO) : null;\n\n // Return a valid DanceModel even if some data is incomplete\n return {\n id: dto.id,\n danceName: dto.danceName,\n choreographers: choreographers,\n stepsheet: dto.stepsheet,\n difficulty: dto.difficulty,\n primaryTrack: primaryTrack,\n tracks: tracks,\n isVerified: dto.isVerified,\n };\n}\n","import { ChoreographerDTO } from '../../types/dto/choreographer.dto';\nimport { CollectionDTO } from '../../types/dto/collection.dto';\nimport { DanceDTO } from '../../types/dto/dance.dto';\nimport { TrackDTO } from '../../types/dto/track.dto';\nimport { CollectionModel } from '../../types/model/collection.model';\nimport { toDanceModel } from './toDanceModel';\n\nexport function toCollectionModel(\n dto: CollectionDTO,\n danceMap: Record<string, DanceDTO>,\n trackMap: Record<string, TrackDTO>,\n choreographerMap: Record<string, ChoreographerDTO>\n): CollectionModel {\n\n const dances = (dto.dances || [])\n .map(id => {\n const dance = danceMap[id];\n if (!dance) {\n console.warn(`Dance with id \"${id}\" not found in danceMap for collection \"${dto.name}\"`);\n }\n return dance;\n })\n .filter(Boolean);\n\n return {\n id: dto.id,\n name: dto.name,\n dances: dances.map(d => toDanceModel(d, trackMap, choreographerMap)),\n isVerified: dto.isVerified,\n createdAt: dto.createdAt,\n updatedAt: dto.updatedAt,\n createdBy: dto.createdBy,\n isCopyable: dto.isCopyable,\n isArchived: dto.isArchived,\n archivedAt: dto.archivedAt,\n };\n}\n","import { DanceDTO } from \"../../types/dto/dance.dto\";\nimport { DanceEntity } from \"../../types/entities/dance.entity\";\n\nexport function toDanceDTO(\n dance: DanceEntity,\n isVerified: boolean\n): DanceDTO {\n\n return {\n id: dance._id,\n danceName: dance.danceName,\n choreographers: dance.choreographers?.map((id: string) => id) ?? [],\n stepsheet: dance.stepsheet,\n difficulty: dance.difficulty,\n primaryTrack: dance.primaryTrack ?? '',\n tracks: dance.tracks?.map((id: string) => id) ?? [],\n isVerified: isVerified\n };\n};\n","import { InstructorDTO } from \"../../types/dto/instructor.dto\";\nimport { InstructorEntity } from \"../../types/entities/instructor.entity\";\n\nexport function toInstructorDTO(\n instructor: InstructorEntity,\n isVerified: boolean\n): InstructorDTO {\n\n return {\n id: instructor._id,\n name: instructor.name,\n userid: \"leave this this empty for now and figure it out later...\",\n isVerified: isVerified\n };\n}\n","import { InstructorDTO } from \"../../types/dto/instructor.dto\";\nimport { InstructorModel } from \"../../types/model/instructor.model\";\n\nexport function toInstructorModel(\n dto: InstructorDTO, \n): InstructorModel {\n\n return {\n id: dto.id,\n name: dto.name,\n userid: \"leave this this empty for now and figure it out later...\",\n isVerified: dto.isVerified\n };\n}\n","import { LessonDTO } from \"../../types/dto/lesson.dto\";\nimport { LessonEntity } from \"../../types/entities/lesson.entity\";\n\nexport function toLessonDTO(\n LessonEntity: LessonEntity,\n isVerified: boolean\n): LessonDTO {\n\n return {\n id: LessonEntity._id,\n venueid: LessonEntity.venueid,\n lessonday: LessonEntity.lessonday,\n lessonstart: LessonEntity.lessonstart,\n instructors: LessonEntity.instructors,\n duration: LessonEntity.duration,\n lessoncost: LessonEntity.lessoncost,\n notes: LessonEntity.notes,\n difficulty: LessonEntity.difficulty,\n isVerified: isVerified\n };\n}\n","import { InstructorDTO } from \"../../types/dto/instructor.dto\";\nimport { LessonDTO } from \"../../types/dto/lesson.dto\";\nimport { LessonModel } from \"../../types/model/lesson.model\";\n\nexport function toLessonModel(\n lessonDTO: LessonDTO,\n instructorMap: Record<string, InstructorDTO>\n): LessonModel {\n\n return {\n id: lessonDTO.id,\n lessonday: lessonDTO.lessonday,\n lessonstart: lessonDTO.lessonstart,\n instructors: lessonDTO.instructors.map(id => instructorMap[id]).filter(Boolean), // TODO: Do I need the converter?\n duration: lessonDTO.duration,\n lessoncost: lessonDTO.lessoncost,\n notes: lessonDTO.notes,\n difficulty: lessonDTO.difficulty,\n };\n}\n","import { TrackDTO } from \"../../types/dto/track.dto\";\nimport { TrackEntity } from \"../../types/entities/track.entity\";\n\nexport function toTrackDTO(dto: TrackEntity, isVerified: boolean): TrackDTO {\n return {\n id: dto._id,\n name: dto.name,\n artists: dto.artists,\n isrc: dto.isrc,\n uri: dto.uri,\n duration_ms: dto.duration_ms,\n explicit: dto.explicit,\n isVerified: isVerified,\n };\n}\n","import { UserAcquaintanceDTO } from \"../../types/dto/userAcquaintance.dto\";\nimport { UserEntity } from \"../../types/entities/user.entity\";\n\nexport function toUserAcquaintanceDTO(\n user: UserEntity,\n isVerified: boolean,\n userProfile: {\n favorites: string[];\n flagged: string[];\n known: string[];\n refresh: string[];\n collections: string[];\n venues: string[];\n friendsCount: number;\n followingCount: number;\n followersCount: number;\n mutualFriendsCount: number;\n }\n): UserAcquaintanceDTO {\n return {\n id: user._id,\n username: user.username || user.name || '',\n image: user.image || '',\n bio: user.bio || '',\n isVerified,\n profile: {\n dances: {\n favorites: userProfile.favorites,\n flagged: userProfile.flagged,\n known: userProfile.known,\n refresh: userProfile.refresh,\n },\n collections: userProfile.collections,\n venues: userProfile.venues,\n friendsCount: userProfile.friendsCount,\n followingCount: userProfile.followingCount,\n followersCount: userProfile.followersCount,\n mutualFriendsCount: userProfile.mutualFriendsCount,\n links: user.links ?? {},\n },\n };\n}\n","import { ChoreographerDTO } from \"../../types/dto/choreographer.dto\";\nimport { CollectionDTO } from \"../../types/dto/collection.dto\";\nimport { DanceDTO } from \"../../types/dto/dance.dto\";\nimport { TrackDTO } from \"../../types/dto/track.dto\";\nimport { UserAcquaintanceDTO } from \"../../types/dto/userAcquaintance.dto\";\nimport { UserAcquaintanceModel } from \"../../types/model/userAcquaintance.model\";\nimport { toCollectionModel } from \"./toCollectionModel\";\nimport { toDanceModel } from \"./toDanceModel\";\n\nexport function toUserAcquaintanceModel(\n dto: UserAcquaintanceDTO,\n danceMap: Record<string, DanceDTO>,\n trackMap: Record<string, TrackDTO>,\n collectionMap: Record<string, CollectionDTO>,\n choreographerMap: Record<string, ChoreographerDTO>\n): UserAcquaintanceModel {\n\n return {\n id: dto.id,\n username: dto.username,\n image: dto.image,\n bio: dto.bio,\n isVerified: dto.isVerified,\n friendsCount: dto.profile.friendsCount,\n followersCount: dto.profile.followersCount,\n mutualFriendsCount: dto.profile.mutualFriendsCount,\n links: dto.profile.links,\n dances: {\n favorites: dto.profile.dances.favorites.map(id => toDanceModel(danceMap[id], trackMap, choreographerMap)),\n flagged: dto.profile.dances.flagged.map(id => toDanceModel(danceMap[id], trackMap, choreographerMap)),\n known: dto.profile.dances.known.map(id => toDanceModel(danceMap[id], trackMap, choreographerMap)),\n refresh: dto.profile.dances.refresh.map(id => toDanceModel(danceMap[id], trackMap, choreographerMap))\n },\n collections: dto.profile.collections.map(id => toCollectionModel(collectionMap[id], danceMap, trackMap, choreographerMap)),\n };\n}\n","import { UserDTO } from \"../../types/dto/user.dto\";\nimport { UserEntity } from \"../../types/entities/user.entity\";\n\nexport function toUserDTO(\n user: UserEntity,\n isVerified: boolean,\n danceIds: {\n favorites: string[];\n flagged: string[];\n known: string[];\n refresh: string[];\n },\n collections: string[],\n venues: string[] = [],\n friends: string[] = [],\n following: string[] = [],\n friendsRequested: string[] = [],\n friendRequests: string[] = []\n): UserDTO {\n return {\n id: user._id.toString(),\n email: user.email ?? '',\n name: user.name ?? '',\n username: user.username ?? '',\n image: user.image ?? '',\n bio: user.bio ?? '',\n isVerified,\n profile: {\n danceIds,\n collections,\n venues,\n friends,\n following,\n links: user.links ?? {},\n friendsRequested,\n friendRequests\n },\n };\n};\n\nexport default toUserDTO;\n","import { UserDTO } from \"../../types/dto/user.dto\";\nimport { CollectionModel } from \"../../types/model/collection.model\";\nimport { DanceModel } from \"../../types/model/dance.model\";\nimport { UserModel } from \"../../types/model/user.model\";\nimport { UserAcquaintanceModel } from \"../../types/model/userAcquaintance.model\";\nimport { VenueModel } from \"../../types/model/venue.model\";\n\nexport function toUserModel(\n userDTO: UserDTO,\n danceMap: Record<string, DanceModel>,\n collectionMap: Record<string, CollectionModel>,\n venueMap: Record<string, VenueModel>,\n friendsMap: Record<string, UserAcquaintanceModel>,\n followingMap: Record<string, UserAcquaintanceModel>\n): UserModel {\n const expand = <T>(ids: string[] = [], map: Record<string, T>): T[] => ids.map(id => map[id]).filter(Boolean);\n\n return {\n _id: userDTO.id,\n email: userDTO.email,\n name: userDTO.name,\n username: userDTO.username,\n image: userDTO.image,\n bio: userDTO.bio,\n isVerified: userDTO.isVerified,\n profile: {\n dances: {\n favorites: expand(userDTO.profile?.danceIds?.favorites, danceMap),\n flagged: expand(userDTO.profile?.danceIds?.flagged, danceMap),\n known: expand(userDTO.profile?.danceIds?.known, danceMap),\n refresh: expand(userDTO.profile?.danceIds?.refresh, danceMap),\n },\n collections: expand(userDTO.profile?.collections, collectionMap),\n venues: expand(userDTO.profile?.venues, venueMap),\n friends: expand(userDTO.profile?.friends, friendsMap),\n following: expand(userDTO.profile?.following, followingMap),\n friendsRequested: expand(userDTO.profile?.friendsRequested, friendsMap),\n friendRequests: expand(userDTO.profile?.friendRequests, friendsMap),\n followersCount: userDTO.profile?.followersCount || 0,\n links: userDTO.profile?.links || [],\n },\n };\n}\n","import { VenueDTO } from \"../../types/dto/venue.dto\";\nimport { VenueEntity } from \"../../types/entities/venue.entity\";\n\nexport function toVenueDTO(\n venue: VenueEntity,\n lessonIds: string[],\n isVerified: boolean\n): VenueDTO {\n\n return {\n id: venue._id,\n venuename: venue.venuename,\n venueaddress: venue.venueaddress,\n geolocation: venue.geolocation,\n phone: venue.phone,\n website: venue.website,\n contactEmail: venue.contactEmail,\n contactName: venue.contactName,\n contactPhone: venue.contactPhone,\n lessonsIds: lessonIds,\n isVerified: isVerified,\n isDeleted: venue.isDeleted ?? false,\n deletedAt: venue.deletedAt ?? null,\n createdAt: venue.createdAt ?? null,\n };\n}","import { InstructorDTO } from \"../../types/dto/instructor.dto\";\nimport { LessonDTO } from \"../../types/dto/lesson.dto\";\nimport { VenueDTO } from \"../../types/dto/venue.dto\";\nimport { VenueModel } from \"../../types/model/venue.model\";\nimport { toLessonModel } from \"./toLessonModel\";\n\nexport function toVenueModel(\n venueDTO: VenueDTO,\n lessonMap: Record<string, LessonDTO>,\n instructorMap: Record<string, InstructorDTO>\n): VenueModel {\n const expandedLessons = venueDTO.lessonsIds\n .map(id => toLessonModel(lessonMap[id], instructorMap))\n .filter(Boolean);\n\n return {\n ...venueDTO,\n lessons: expandedLessons,\n };\n}\n"],"names":["getAllUserDanceIds","userDances","_ref","_ref$favorites","favorites","_ref$flagged","flagged","_ref$known","known","_ref$refresh","refresh","all","concat","Array","from","Set","itemArrayToItemRecords","arr","reduce","acc","item","id","toChoreographerDTO","choreographer","isVerified","_id","name","toChoreographerModel","dto","toCollectionDTO","collectionEntity","dances","danceIds","createdAt","updatedAt","createdBy","isPrivate","isCopyable","isArchived","archivedAt","toTrackModel","artists","isrc","uri","duration_ms","explicit","toDanceModel","trackMap","choreographerMap","tracks","map","track","console","warn","danceName","filter","Boolean","choreographers","primaryTrackDTO","primaryTrack","stepsheet","difficulty","toCollectionModel","danceMap","dance","d","toDanceDTO","_dance$choreographers","_dance$choreographers2","_dance$primaryTrack","_dance$tracks$map","_dance$tracks","toInstructorDTO","instructor","userid","toInstructorModel","toLessonDTO","LessonEntity","venueid","lessonday","lessonstart","instructors","duration","lessoncost","notes","toLessonModel","lessonDTO","instructorMap","toTrackDTO","toUserAcquaintanceDTO","user","userProfile","username","image","bio","profile","collections","venues","friendsCount","followingCount","followersCount","mutualFriendsCount","links","_user$links","toUserAcquaintanceModel","collectionMap","toUserDTO","friends","following","friendsRequested","friendRequests","toString","email","_user$email","_user$name","_user$username","_user$image","_user$bio","toUserModel","userDTO","venueMap","friendsMap","followingMap","expand","ids","_userDTO$profile","_userDTO$profile2","_userDTO$profile3","_userDTO$profile4","_userDTO$profile5","_userDTO$profile6","_userDTO$profile7","_userDTO$profile8","_userDTO$profile9","_userDTO$profile10","_userDTO$profile11","_userDTO$profile12","toVenueDTO","venue","lessonIds","venuename","venueaddress","geolocation","phone","website","contactEmail","contactName","contactPhone","lessonsIds","isDeleted","_venue$isDeleted","deletedAt","_venue$deletedAt","_venue$createdAt","toVenueModel","venueDTO","lessonMap","expandedLessons","_extends","lessons"],"mappings":"SAEgBA,kBAAkBA,CAACC,UAAwB;EACvD,IAAAC,IAAA,GAAmED,UAAU,WAAVA,UAAU,GAAI,EAAE;IAAAE,cAAA,GAAAD,IAAA,CAA3EE,SAAS;IAATA,SAAS,GAAAD,cAAA,cAAG,EAAE,GAAAA,cAAA;IAAAE,YAAA,GAAAH,IAAA,CAAEI,OAAO;IAAPA,OAAO,GAAAD,YAAA,cAAG,EAAE,GAAAA,YAAA;IAAAE,UAAA,GAAAL,IAAA,CAAEM,KAAK;IAALA,KAAK,GAAAD,UAAA,cAAG,EAAE,GAAAA,UAAA;IAAAE,YAAA,GAAAP,IAAA,CAAEQ,OAAO;IAAPA,OAAO,GAAAD,YAAA,cAAG,EAAE,GAAAA,YAAA;EAE9D,IAAME,GAAG,MAAAC,MAAA,CACFR,SAAS,EACTE,OAAO,EACPE,KAAK,EACLE,OAAO,CACb;;EAGD,OAAOG,KAAK,CAACC,IAAI,CAAC,IAAIC,GAAG,CAACJ,GAAG,CAAC,CAAC;AACnC;;SCdgBK,sBAAsBA,CAA2BC,GAAQ;EACvE,OAAOA,GAAG,CAACC,MAAM,CAAC,UAACC,GAAG,EAAEC,IAAI;IAC1BD,GAAG,CAACC,IAAI,CAACC,EAAE,CAAC,GAAGD,IAAI;IACnB,OAA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AAA,GAAEd,KAAK,CAACa,SAAS,YAAAC,gBAAA,GAAI,IAAI;IAClCvH,SAAS,GAAAwH,gBAAA,GAAEf,KAAK,CAACzG,SAAS,YAAAwH,gBAAA,GAAI;GACjC;AACL;;;;;;;;;;;;SCnBgBC,YAAYA,CACxBC,QAAkB,EAClBC,SAAoC,EACpCrE,aAA4C;EAE5C,IAAMsE,eAAe,GAAGF,QAAQ,CAACP,UAAU,CACtClG,GAAG,CAAC,UAAA7B,EAAE;IAAA,OAAIgE,aAAa,CAACuE,SAAS,CAACvI,EAAE,CAAC,EAAEkE,aAAa,CAAC;IAAC,CACtDhC,MAAM,CAACC,OAAO,CAAC;EAEpB,OAAAsG,QAAA,KACOH,QAAQ;IACXI,OAAO,EAAEF;;AAEjB;;;;"}
@@ -1,6 +1,6 @@
1
1
  import { UserDanceDTO } from "./userDances.dto";
2
2
  export interface UserDTO {
3
- _id: string;
3
+ id: string;
4
4
  email: string;
5
5
  name: string;
6
6
  username: string;
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.1.38",
2
+ "version": "0.1.39",
3
3
  "license": "MIT",
4
4
  "main": "dist/index.js",
5
5
  "typings": "dist/index.d.ts",
@@ -18,7 +18,7 @@ export function toUserDTO(
18
18
  friendRequests: string[] = []
19
19
  ): UserDTO {
20
20
  return {
21
- _id: user._id.toString(),
21
+ id: user._id.toString(),
22
22
  email: user.email ?? '',
23
23
  name: user.name ?? '',
24
24
  username: user.username ?? '',
@@ -16,7 +16,7 @@ export function toUserModel(
16
16
  const expand = <T>(ids: string[] = [], map: Record<string, T>): T[] => ids.map(id => map[id]).filter(Boolean);
17
17
 
18
18
  return {
19
- _id: userDTO._id,
19
+ _id: userDTO.id,
20
20
  email: userDTO.email,
21
21
  name: userDTO.name,
22
22
  username: userDTO.username,
@@ -1,7 +1,7 @@
1
1
  import { UserDanceDTO } from "./userDances.dto";
2
2
 
3
3
  export interface UserDTO {
4
- _id: string;
4
+ id: string;
5
5
  email: string;
6
6
  name: string;
7
7
  username: string;