ldco-contract 0.1.31 → 0.1.32

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.
@@ -52,7 +52,8 @@ function toCollectionDTO(collectionEntity, isVerified) {
52
52
  createdBy: collectionEntity.createdBy,
53
53
  isPrivate: collectionEntity.isPrivate,
54
54
  isCopyable: collectionEntity.isCopyable,
55
- isArchived: collectionEntity.isArchived
55
+ isArchived: collectionEntity.isArchived,
56
+ archivedAt: collectionEntity.archivedAt
56
57
  };
57
58
  }
58
59
 
@@ -168,6 +169,7 @@ function toInstructorModel(dto) {
168
169
  function toLessonDTO(LessonEntity, isVerified) {
169
170
  return {
170
171
  id: LessonEntity._id,
172
+ venueid: LessonEntity.venueid,
171
173
  lessonday: LessonEntity.lessonday,
172
174
  lessonstart: LessonEntity.lessonstart,
173
175
  instructors: LessonEntity.instructors,
@@ -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 { DanceModel } from \"../types/model/dance.model\";\nimport { UserDances } from \"../types/model/userTypes/userDances\";\n\nexport function getAllUserDanceIds(userDances: UserDances): DanceModel[] {\n const { favorites = [], flagged = [], known = [], refresh = [] } = userDances ?? {};\n\n const all = [\n ...favorites,\n ...flagged,\n ...known,\n ...refresh,\n ];\n\n return all.filter((item, index) => all.indexOf(item) === index);\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 };\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 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","filter","item","index","indexOf","itemArrayToItemRecords","arr","reduce","acc","id","toChoreographerDTO","choreographer","isVerified","_id","name","toChoreographerModel","dto","toCollectionDTO","collectionEntity","dances","danceIds","createdAt","updatedAt","createdBy","isPrivate","isCopyable","isArchived","toTrackModel","artists","isrc","uri","duration_ms","explicit","toDanceModel","trackMap","choreographerMap","tracks","map","track","console","warn","danceName","Boolean","choreographers","primaryTrackDTO","primaryTrack","stepsheet","difficulty","toCollectionModel","danceMap","dance","d","archivedAt","toDanceDTO","_dance$choreographers","_dance$choreographers2","_dance$primaryTrack","_dance$tracks$map","_dance$tracks","toInstructorDTO","instructor","userid","toInstructorModel","toLessonDTO","LessonEntity","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":";;;;SAGgBA,kBAAkBA,CAACC,UAAsB;EACrD,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,MAA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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;IACrBjH,UAAU,EAAEA,UAAU;IACtB2H,SAAS,GAAAC,gBAAA,GAAEZ,KAAK,CAACW,SAAS,YAAAC,gBAAA,GAAI,KAAK;IACnCC,SAAS,GAAAC,gBAAA,GAAEd,KAAK,CAACa,SAAS,YAAAC,gBAAA,GAAI,IAAI;IAClCrH,SAAS,GAAAsH,gBAAA,GAAEf,KAAK,CAACvG,SAAS,YAAAsH,gBAAA,GAAI;GACjC;AACL;;;;;;;;;;;;SCnBgBC,YAAYA,CACxBC,QAAkB,EAClBC,SAAoC,EACpCrE,aAA4C;EAE5C,IAAMsE,eAAe,GAAGF,QAAQ,CAACP,UAAU,CACtCjG,GAAG,CAAC,UAAA5B,EAAE;IAAA,OAAI8D,aAAa,CAACuE,SAAS,CAACrI,EAAE,CAAC,EAAEgE,aAAa,CAAC;IAAC,CACtDxE,MAAM,CAACyC,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 { DanceModel } from \"../types/model/dance.model\";\nimport { UserDances } from \"../types/model/userTypes/userDances\";\n\nexport function getAllUserDanceIds(userDances: UserDances): DanceModel[] {\n const { favorites = [], flagged = [], known = [], refresh = [] } = userDances ?? {};\n\n const all = [\n ...favorites,\n ...flagged,\n ...known,\n ...refresh,\n ];\n\n return all.filter((item, index) => all.indexOf(item) === index);\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","filter","item","index","indexOf","itemArrayToItemRecords","arr","reduce","acc","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","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":";;;;SAGgBA,kBAAkBA,CAACC,UAAsB;EACrD,IAAAC,IAAA,GAAmED,UAAU,WAAVA,UAAU,GAAI,EAAE;IAAAE,cAAA,GAAAD,IAAA,CAA3EE,SAAS;IAATA,SAAS,GAAAD,cAAA,cAAG,EAAE,GAAAA,cAAA;IAAAE,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Verified: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 s.filter((function(e,n){return s.indexOf(e)===n}))},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}},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,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,g,h,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==(g=e.profile)?void 0:g.followersCount)||0,links:(null==(h=e.profile)?void 0:h.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 s.filter((function(e,n){return s.indexOf(e)===n}))},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 { DanceModel } from \"../types/model/dance.model\";\nimport { UserDances } from \"../types/model/userTypes/userDances\";\n\nexport function getAllUserDanceIds(userDances: UserDances): DanceModel[] {\n const { favorites = [], flagged = [], known = [], refresh = [] } = userDances ?? {};\n\n const all = [\n ...favorites,\n ...flagged,\n ...known,\n ...refresh,\n ];\n\n return all.filter((item, index) => all.indexOf(item) === index);\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 };\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 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","item","index","indexOf","arr","reduce","acc","_id","collectionEntity","danceIds","isPrivate","_dance$choreographers","_dance$choreographers2","_dance$primaryTrack","_dance$tracks$map","_dance$tracks","instructor","userid","LessonEntity","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,I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,EAAiBvB,QAASa,GAC1CZ,UAAWc,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,EACAvH,aAGA,MAAO,CACHF,GAAIwH,EAAMxD,IACV0D,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,EACZvH,WAAYA,EACZiI,iBAASC,EAAEZ,EAAMW,YAASC,EAC1BC,iBAASC,EAAEd,EAAMa,WAASC,EAAI,KAC9BvG,iBAASwG,EAAEf,EAAMzF,WAASwG,EAAI,qCChBlCC,EACAC,EACAlG,GAEA,IAAMmG,EAAkBF,EAASN,WAC5BrH,KAAI,SAAAb,GAAE,OAAIqC,EAAcoG,EAAUzI,GAAKuC,MACvCrB,OAAOC,SAEZ,OAAAwH,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 { DanceModel } from \"../types/model/dance.model\";\nimport { UserDances } from \"../types/model/userTypes/userDances\";\n\nexport function getAllUserDanceIds(userDances: UserDances): DanceModel[] {\n const { favorites = [], flagged = [], known = [], refresh = [] } = userDances ?? {};\n\n const all = [\n ...favorites,\n ...flagged,\n ...known,\n ...refresh,\n ];\n\n return all.filter((item, index) => all.indexOf(item) === index);\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","item","index","indexOf","arr","reduce","acc","_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,EAA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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,EACAxH,aAGA,MAAO,CACHF,GAAIyH,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,EACZxH,WAAYA,EACZkI,iBAASC,EAAEZ,EAAMW,YAASC,EAC1BC,iBAASC,EAAEd,EAAMa,WAASC,EAAI,KAC9BxG,iBAASyG,EAAEf,EAAM1F,WAASyG,EAAI,qCChBlCC,EACAC,EACAnG,GAEA,IAAMoG,EAAkBF,EAASN,WAC5BtH,KAAI,SAAAb,GAAE,OAAIqC,EAAcqG,EAAU1I,GAAKuC,MACvCrB,OAAOC,SAEZ,OAAAyH,KACOH,GACHI,QAASF"}
@@ -48,7 +48,8 @@ function toCollectionDTO(collectionEntity, isVerified) {
48
48
  createdBy: collectionEntity.createdBy,
49
49
  isPrivate: collectionEntity.isPrivate,
50
50
  isCopyable: collectionEntity.isCopyable,
51
- isArchived: collectionEntity.isArchived
51
+ isArchived: collectionEntity.isArchived,
52
+ archivedAt: collectionEntity.archivedAt
52
53
  };
53
54
  }
54
55
 
@@ -164,6 +165,7 @@ function toInstructorModel(dto) {
164
165
  function toLessonDTO(LessonEntity, isVerified) {
165
166
  return {
166
167
  id: LessonEntity._id,
168
+ venueid: LessonEntity.venueid,
167
169
  lessonday: LessonEntity.lessonday,
168
170
  lessonstart: LessonEntity.lessonstart,
169
171
  instructors: LessonEntity.instructors,
@@ -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 { DanceModel } from \"../types/model/dance.model\";\nimport { UserDances } from \"../types/model/userTypes/userDances\";\n\nexport function getAllUserDanceIds(userDances: UserDances): DanceModel[] {\n const { favorites = [], flagged = [], known = [], refresh = [] } = userDances ?? {};\n\n const all = [\n ...favorites,\n ...flagged,\n ...known,\n ...refresh,\n ];\n\n return all.filter((item, index) => all.indexOf(item) === index);\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 };\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 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","filter","item","index","indexOf","itemArrayToItemRecords","arr","reduce","acc","id","toChoreographerDTO","choreographer","isVerified","_id","name","toChoreographerModel","dto","toCollectionDTO","collectionEntity","dances","danceIds","createdAt","updatedAt","createdBy","isPrivate","isCopyable","isArchived","toTrackModel","artists","isrc","uri","duration_ms","explicit","toDanceModel","trackMap","choreographerMap","tracks","map","track","console","warn","danceName","Boolean","choreographers","primaryTrackDTO","primaryTrack","stepsheet","difficulty","toCollectionModel","danceMap","dance","d","archivedAt","toDanceDTO","_dance$choreographers","_dance$choreographers2","_dance$primaryTrack","_dance$tracks$map","_dance$tracks","toInstructorDTO","instructor","userid","toInstructorModel","toLessonDTO","LessonEntity","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":"SAGgBA,kBAAkBA,CAACC,UAAsB;EACrD,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;EAED,OAAOC,GAAG,CAACE,MAAM,CAAC,UAACC,IAAI,EAAEC,KAAK;IAAA,OAAKJ,GAAG,CAACK,OAAO,CAACF,IAAI,CAAC,KAAKC,KAAK;IAAC;AACnE;;SCdgBE,sBAAsBA,CAA2BC,GAAQ;EACvE,OAAOA,GAAG,CAACC,MAAM,CAAC,UAACC,GAAG,EAAEN,IAAI;IAC1BM,GAAG,CAACN,IAAI,CAACO,EAAE,CAAC,GAAGP,IAAI;IACnB,OAAOM,GAAG;GACX,EAAE,EAAuB,CAAC;AAC7B;;SCFgBE,kBAAkBA,CAC9BC,aAAkC,EAClCC,UAAmB;EAGrB,OAAO;IACLH,EAAE,EAAEE,aAAa,CAACE,GAAG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ACpCrE,aAA4C;EAE5C,IAAMsE,eAAe,GAAGF,QAAQ,CAACP,UAAU,CACtCjG,GAAG,CAAC,UAAA5B,EAAE;IAAA,OAAI8D,aAAa,CAACuE,SAAS,CAACrI,EAAE,CAAC,EAAEgE,aAAa,CAAC;IAAC,CACtDxE,MAAM,CAACyC,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 { DanceModel } from \"../types/model/dance.model\";\nimport { UserDances } from \"../types/model/userTypes/userDances\";\n\nexport function getAllUserDanceIds(userDances: UserDances): DanceModel[] {\n const { favorites = [], flagged = [], known = [], refresh = [] } = userDances ?? {};\n\n const all = [\n ...favorites,\n ...flagged,\n ...known,\n ...refresh,\n ];\n\n return all.filter((item, index) => all.indexOf(item) === index);\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","filter","item","index","indexOf","itemArrayToItemRecords","arr","reduce","acc","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","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":"SAGgBA,kBAAkBA,CAACC,UAAsB;EACrD,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;EAED,OAAOC,GAAG,CAACE,MAAM,CAAC,UAACC,IAAI,EAAEC,KAAK;IAAA,OAAKJ,GAAG,CAACK,OAAO,CAACF,IAAI,CAAC,KAAKC,KAAK;IAAC;AACnE;;SCdgBE,sBAAsBA,CAA2BC,GAAQ;EACvE,OAA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S;IACrBlH,UAAU,EAAEA,UAAU;IACtB4H,SAAS,GAAAC,gBAAA,GAAEZ,KAAK,CAACW,SAAS,YAAAC,gBAAA,GAAI,KAAK;IACnCC,SAAS,GAAAC,gBAAA,GAAEd,KAAK,CAACa,SAAS,YAAAC,gBAAA,GAAI,IAAI;IAClCtH,SAAS,GAAAuH,gBAAA,GAAEf,KAAK,CAACxG,SAAS,YAAAuH,gBAAA,GAAI;GACjC;AACL;;;;;;;;;;;;SCnBgBC,YAAYA,CACxBC,QAAkB,EAClBC,SAAoC,EACpCrE,aAA4C;EAE5C,IAAMsE,eAAe,GAAGF,QAAQ,CAACP,UAAU,CACtCjG,GAAG,CAAC,UAAA7B,EAAE;IAAA,OAAI+D,aAAa,CAACuE,SAAS,CAACtI,EAAE,CAAC,EAAEiE,aAAa,CAAC;IAAC,CACtDzE,MAAM,CAAC0C,OAAO,CAAC;EAEpB,OAAAsG,QAAA,KACOH,QAAQ;IACXI,OAAO,EAAEF;;AAEjB;;;;"}
@@ -8,6 +8,6 @@ export interface CollectionDTO {
8
8
  isPrivate: boolean;
9
9
  isCopyable: boolean;
10
10
  isArchived: boolean;
11
- archivedAt?: Date;
11
+ archivedAt: Date;
12
12
  isVerified: boolean;
13
13
  }
@@ -1,5 +1,6 @@
1
1
  export interface LessonDTO {
2
2
  id: string;
3
+ venueid: string;
3
4
  lessonday: string;
4
5
  lessonstart: string;
5
6
  instructors: string[];
@@ -8,5 +8,5 @@ export interface UserCollectionEntity {
8
8
  isPrivate: boolean;
9
9
  isCopyable: boolean;
10
10
  isArchived: boolean;
11
- archivedAt?: Date;
11
+ archivedAt: Date;
12
12
  }
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.1.31",
2
+ "version": "0.1.32",
3
3
  "license": "MIT",
4
4
  "main": "dist/index.js",
5
5
  "typings": "dist/index.d.ts",
@@ -17,5 +17,6 @@ export function toCollectionDTO(
17
17
  isPrivate: collectionEntity.isPrivate,
18
18
  isCopyable: collectionEntity.isCopyable,
19
19
  isArchived: collectionEntity.isArchived,
20
+ archivedAt: collectionEntity.archivedAt
20
21
  };
21
22
  }
@@ -8,6 +8,7 @@ export function toLessonDTO(
8
8
 
9
9
  return {
10
10
  id: LessonEntity._id,
11
+ venueid: LessonEntity.venueid,
11
12
  lessonday: LessonEntity.lessonday,
12
13
  lessonstart: LessonEntity.lessonstart,
13
14
  instructors: LessonEntity.instructors,
@@ -8,7 +8,7 @@ export interface CollectionDTO {
8
8
  isPrivate: boolean; // TODO: Private collections should not be returned in public APIs
9
9
  isCopyable: boolean;
10
10
  isArchived: boolean;
11
- archivedAt?: Date;
11
+ archivedAt: Date;
12
12
 
13
13
  // Added Data
14
14
  isVerified: boolean;
@@ -1,5 +1,6 @@
1
1
  export interface LessonDTO {
2
2
  id: string;
3
+ venueid: string;
3
4
  lessonday: string;
4
5
  lessonstart: string;
5
6
  instructors: string[];
@@ -8,5 +8,5 @@ export interface UserCollectionEntity {
8
8
  isPrivate: boolean;
9
9
  isCopyable: boolean;
10
10
  isArchived: boolean;
11
- archivedAt?: Date;
11
+ archivedAt: Date;
12
12
  }