ldco-contract 0.1.26 → 0.1.28

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.
@@ -95,7 +95,7 @@ function toCollectionModel(dto, danceMap, trackMap, choreographerMap) {
95
95
  return danceMap[id];
96
96
  }).filter(Boolean);
97
97
  return {
98
- id: dto._id,
98
+ id: dto.id,
99
99
  name: dto.name,
100
100
  dances: dances.map(function (d) {
101
101
  return toDanceModel(d, trackMap, choreographerMap);
@@ -104,7 +104,9 @@ function toCollectionModel(dto, danceMap, trackMap, choreographerMap) {
104
104
  createdAt: dto.createdAt,
105
105
  updatedAt: dto.updatedAt,
106
106
  createdBy: dto.createdBy,
107
- isCopyable: dto.isCopyable
107
+ isCopyable: dto.isCopyable,
108
+ isArchived: dto.isArchived,
109
+ archivedAt: dto.archivedAt
108
110
  };
109
111
  }
110
112
 
@@ -282,7 +284,11 @@ function toUserDTO(user, isVerified, danceIds, collections, venues, friends, fol
282
284
  }
283
285
 
284
286
  function toUserModel(userDTO, danceMap, collectionMap, venueMap, friendsMap, followingMap) {
287
+ var _userDTO$profile, _userDTO$profile2, _userDTO$profile3, _userDTO$profile4, _userDTO$profile5, _userDTO$profile6, _userDTO$profile7, _userDTO$profile8, _userDTO$profile9, _userDTO$profile10, _userDTO$profile11, _userDTO$profile12;
285
288
  var expand = function expand(ids, map) {
289
+ if (ids === void 0) {
290
+ ids = [];
291
+ }
286
292
  return ids.map(function (id) {
287
293
  return map[id];
288
294
  }).filter(Boolean);
@@ -297,19 +303,19 @@ function toUserModel(userDTO, danceMap, collectionMap, venueMap, friendsMap, fol
297
303
  isVerified: userDTO.isVerified,
298
304
  profile: {
299
305
  dances: {
300
- favorites: expand(userDTO.profile.danceIds.favorites, danceMap),
301
- flagged: expand(userDTO.profile.danceIds.flagged, danceMap),
302
- known: expand(userDTO.profile.danceIds.known, danceMap),
303
- refresh: expand(userDTO.profile.danceIds.refresh, danceMap)
306
+ favorites: expand((_userDTO$profile = userDTO.profile) == null || (_userDTO$profile = _userDTO$profile.danceIds) == null ? void 0 : _userDTO$profile.favorites, danceMap),
307
+ flagged: expand((_userDTO$profile2 = userDTO.profile) == null || (_userDTO$profile2 = _userDTO$profile2.danceIds) == null ? void 0 : _userDTO$profile2.flagged, danceMap),
308
+ known: expand((_userDTO$profile3 = userDTO.profile) == null || (_userDTO$profile3 = _userDTO$profile3.danceIds) == null ? void 0 : _userDTO$profile3.known, danceMap),
309
+ refresh: expand((_userDTO$profile4 = userDTO.profile) == null || (_userDTO$profile4 = _userDTO$profile4.danceIds) == null ? void 0 : _userDTO$profile4.refresh, danceMap)
304
310
  },
305
- collections: expand(userDTO.profile.collections, collectionMap),
306
- venues: expand(userDTO.profile.venues, venueMap),
307
- friends: expand(userDTO.profile.friends, friendsMap),
308
- following: expand(userDTO.profile.following, followingMap),
309
- friendsRequested: expand(userDTO.profile.friendsRequested, friendsMap),
310
- friendRequests: expand(userDTO.profile.friendRequests, friendsMap),
311
- followersCount: userDTO.profile.followersCount || 0,
312
- links: userDTO.profile.links
311
+ collections: expand((_userDTO$profile5 = userDTO.profile) == null ? void 0 : _userDTO$profile5.collections, collectionMap),
312
+ venues: expand((_userDTO$profile6 = userDTO.profile) == null ? void 0 : _userDTO$profile6.venues, venueMap),
313
+ friends: expand((_userDTO$profile7 = userDTO.profile) == null ? void 0 : _userDTO$profile7.friends, friendsMap),
314
+ following: expand((_userDTO$profile8 = userDTO.profile) == null ? void 0 : _userDTO$profile8.following, followingMap),
315
+ friendsRequested: expand((_userDTO$profile9 = userDTO.profile) == null ? void 0 : _userDTO$profile9.friendsRequested, friendsMap),
316
+ friendRequests: expand((_userDTO$profile10 = userDTO.profile) == null ? void 0 : _userDTO$profile10.friendRequests, friendsMap),
317
+ followersCount: ((_userDTO$profile11 = userDTO.profile) == null ? void 0 : _userDTO$profile11.followersCount) || 0,
318
+ links: ((_userDTO$profile12 = userDTO.profile) == null ? void 0 : _userDTO$profile12.links) || []
313
319
  }
314
320
  };
315
321
  }
@@ -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/toTrackModel.ts","../src/lib/converters/toDanceModel.ts","../src/lib/converters/toCollectionsModel.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 { 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 const dances = dto.dances.map(id => danceMap[id]).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 };\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 \"./toCollectionsModel\";\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","toTrackModel","artists","isrc","uri","duration_ms","explicit","toDanceModel","trackMap","choreographerMap","tracks","map","track","console","warn","danceName","Boolean","choreographers","primaryTrackDTO","primaryTrack","stepsheet","difficulty","toCollectionModel","danceMap","dances","d","createdAt","updatedAt","createdBy","isCopyable","toDanceDTO","dance","_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","danceIds","friends","following","friendsRequested","friendRequests","toString","email","_user$email","_user$name","_user$username","_user$image","_user$bio","toUserModel","userDTO","venueMap","friendsMap","followingMap","expand","ids","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,E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,YAAY;IAChCC,UAAU,EAAET,SAAS;IACrBhG,UAAU,EAAEA,UAAU;IACtB0G,SAAS,GAAAC,gBAAA,GAAEZ,KAAK,CAACW,SAAS,YAAAC,gBAAA,GAAI,KAAK;IACnCC,SAAS,GAAAC,gBAAA,GAAEd,KAAK,CAACa,SAAS,YAAAC,gBAAA,GAAI,IAAI;IAClC/E,SAAS,GAAAgF,gBAAA,GAAEf,KAAK,CAACjE,SAAS,YAAAgF,gBAAA,GAAI;GACjC;AACL;;;;;;;;;;;;SCnBgBC,YAAYA,CACxBC,QAAkB,EAClBC,SAAoC,EACpC1D,aAA4C;EAE5C,IAAM2D,eAAe,GAAGF,QAAQ,CAACP,UAAU,CACtC1F,GAAG,CAAC,UAAAlB,EAAE;IAAA,OAAIwD,aAAa,CAAC4D,SAAS,CAACpH,EAAE,CAAC,EAAE0D,aAAa,CAAC;IAAC,CACtDlE,MAAM,CAAC+B,OAAO,CAAC;EAEpB,OAAA+F,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/toTrackModel.ts","../src/lib/converters/toDanceModel.ts","../src/lib/converters/toCollectionsModel.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 { 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 const dances = dto.dances.map(id => danceMap[id]).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 \"./toCollectionsModel\";\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","toTrackModel","artists","isrc","uri","duration_ms","explicit","toDanceModel","trackMap","choreographerMap","tracks","map","track","console","warn","danceName","Boolean","choreographers","primaryTrackDTO","primaryTrack","stepsheet","difficulty","toCollectionModel","danceMap","dances","d","createdAt","updatedAt","createdBy","isCopyable","isArchived","archivedAt","toDanceDTO","dance","_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","danceIds","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;AAC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gH,KAAK,CAAC5G,GAAG;IACb8G,SAAS,EAAEF,KAAK,CAACE,SAAS;IAC1BC,YAAY,EAAEH,KAAK,CAACG,YAAY;IAChCC,WAAW,EAAEJ,KAAK,CAACI,WAAW;IAC9BC,KAAK,EAAEL,KAAK,CAACK,KAAK;IAClBC,OAAO,EAAEN,KAAK,CAACM,OAAO;IACtBC,YAAY,EAAEP,KAAK,CAACO,YAAY;IAChCC,WAAW,EAAER,KAAK,CAACQ,WAAW;IAC9BC,YAAY,EAAET,KAAK,CAACS,YAAY;IAChCC,UAAU,EAAET,SAAS;IACrB9G,UAAU,EAAEA,UAAU;IACtBwH,SAAS,GAAAC,gBAAA,GAAEZ,KAAK,CAACW,SAAS,YAAAC,gBAAA,GAAI,KAAK;IACnCC,SAAS,GAAAC,gBAAA,GAAEd,KAAK,CAACa,SAAS,YAAAC,gBAAA,GAAI,IAAI;IAClC7F,SAAS,GAAA8F,gBAAA,GAAEf,KAAK,CAAC/E,SAAS,YAAA8F,gBAAA,GAAI;GACjC;AACL;;;;;;;;;;;;SCnBgBC,YAAYA,CACxBC,QAAkB,EAClBC,SAAoC,EACpCtE,aAA4C;EAE5C,IAAMuE,eAAe,GAAGF,QAAQ,CAACP,UAAU,CACtCxG,GAAG,CAAC,UAAAlB,EAAE;IAAA,OAAI0D,aAAa,CAACwE,SAAS,CAAClI,EAAE,CAAC,EAAE4D,aAAa,CAAC;IAAC,CACtDpE,MAAM,CAAC+B,OAAO,CAAC;EAEpB,OAAA6G,QAAA,KACOH,QAAQ;IACXI,OAAO,EAAEF;;AAEjB;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,2 +1,2 @@
1
- "use strict";function e(e){return{id:e.id,name:e.name,isVerified:e.isVerified}}function n(e){return{id:e.id,name:e.name,artists:e.artists,isrc:e.isrc,uri:e.uri,duration_ms:e.duration_ms,explicit:e.explicit,isVerified:e.isVerified}}function r(r,i,o){var t=r.tracks.map((function(e){var n=i[e];return n||console.warn("Track not found for ID: "+e+' in dance "'+r.danceName+'"'),n})).filter(Boolean).map(n),s=r.choreographers.map((function(e){var n=o[e];return n||console.warn("Choreographer not found for ID: "+e+' in dance "'+r.danceName+'"'),n})).filter(Boolean).map(e),a=i[r.primaryTrack];a||console.warn('Primary track not found for dance: "'+r.danceName+'" (primaryTrack ID: '+r.primaryTrack+")");var l=a?n(a):null;return{id:r.id,danceName:r.danceName,choreographers:s,stepsheet:r.stepsheet,difficulty:r.difficulty,primaryTrack:l,tracks:t,isVerified:r.isVerified}}function i(e,n,i,o){var t=e.dances.map((function(e){return n[e]})).filter(Boolean);return{id:e._id,name:e.name,dances:t.map((function(e){return r(e,i,o)})),isVerified:e.isVerified,createdAt:e.createdAt,updatedAt:e.updatedAt,createdBy:e.createdBy,isCopyable:e.isCopyable}}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 r=arguments[n];for(var i in r)({}).hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e}).apply(null,arguments)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.getAllUserDanceIds=function(e){var n=null!=e?e:{},r=n.favorites,i=n.flagged,o=n.known,t=n.refresh,s=[].concat(void 0===r?[]:r,void 0===i?[]:i,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.toCollectionModel=i,exports.toDanceDTO=function(e,n){var r,i,o,t,s;return{id:e._id,danceName:e.danceName,choreographers:null!=(r=null==(i=e.choreographers)?void 0:i.map((function(e){return e})))?r:[],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=r,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,r){var i;return{id:e._id,username:e.username||e.name||"",image:e.image||"",bio:e.bio||"",isVerified:n,profile:{dances:{favorites:r.favorites,flagged:r.flagged,known:r.known,refresh:r.refresh},collections:r.collections,venues:r.venues,friendsCount:r.friendsCount,followingCount:r.followingCount,followersCount:r.followersCount,mutualFriendsCount:r.mutualFriendsCount,links:null!=(i=e.links)?i:{}}}},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 r(n[e],o,s)})),flagged:e.profile.dances.flagged.map((function(e){return r(n[e],o,s)})),known:e.profile.dances.known.map((function(e){return r(n[e],o,s)})),refresh:e.profile.dances.refresh.map((function(e){return r(n[e],o,s)}))},collections:e.profile.collections.map((function(e){return i(t[e],n,o,s)}))}},exports.toUserDTO=function(e,n,r,i,o,t,s,a,l){var u,d,f,c,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!=(u=e.email)?u:"",name:null!=(d=e.name)?d:"",username:null!=(f=e.username)?f:"",image:null!=(c=e.image)?c:"",bio:null!=(p=e.bio)?p:"",isVerified:n,profile:{danceIds:r,collections:i,venues:o,friends:t,following:s,links:null!=(m=e.links)?m:{},friendsRequested:a,friendRequests:l}}},exports.toUserModel=function(e,n,r,i,o,t){var s=function(e,n){return 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:s(e.profile.danceIds.favorites,n),flagged:s(e.profile.danceIds.flagged,n),known:s(e.profile.danceIds.known,n),refresh:s(e.profile.danceIds.refresh,n)},collections:s(e.profile.collections,r),venues:s(e.profile.venues,i),friends:s(e.profile.friends,o),following:s(e.profile.following,t),friendsRequested:s(e.profile.friendsRequested,o),friendRequests:s(e.profile.friendRequests,o),followersCount:e.profile.followersCount||0,links:e.profile.links}}},exports.toVenueDTO=function(e,n,r){var i,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:r,isDeleted:null!=(i=e.isDeleted)&&i,deletedAt:null!=(o=e.deletedAt)?o:null,createdAt:null!=(t=e.createdAt)?t:null}},exports.toVenueModel=function(e,n,r){var i=e.lessonsIds.map((function(e){return o(n[e],r)})).filter(Boolean);return t({},e,{lessons:i})};
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),l=r[i.primaryTrack];l||console.warn('Primary track not found for dance: "'+i.danceName+'" (primaryTrack ID: '+i.primaryTrack+")");var a=l?n(l):null;return{id:i.id,danceName:i.danceName,choreographers:s,stepsheet:i.stepsheet,difficulty:i.difficulty,primaryTrack:a,tracks:t,isVerified:i.isVerified}}function r(e,n,r,o){var t=e.dances.map((function(e){return n[e]})).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.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,l,a){var d,u,f,c,p,m;return void 0===o&&(o=[]),void 0===t&&(t=[]),void 0===s&&(s=[]),void 0===l&&(l=[]),void 0===a&&(a=[]),{_id:e._id.toString(),email:null!=(d=e.email)?d:"",name:null!=(u=e.name)?u:"",username:null!=(f=e.username)?f:"",image:null!=(c=e.image)?c:"",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:l,friendRequests:a}}},exports.toUserModel=function(e,n,i,r,o,t){var s,l,a,d,u,f,c,p,m,v,g,h,k=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:k(null==(s=e.profile)||null==(s=s.danceIds)?void 0:s.favorites,n),flagged:k(null==(l=e.profile)||null==(l=l.danceIds)?void 0:l.flagged,n),known:k(null==(a=e.profile)||null==(a=a.danceIds)?void 0:a.known,n),refresh:k(null==(d=e.profile)||null==(d=d.danceIds)?void 0:d.refresh,n)},collections:k(null==(u=e.profile)?void 0:u.collections,i),venues:k(null==(f=e.profile)?void 0:f.venues,r),friends:k(null==(c=e.profile)?void 0:c.friends,o),following:k(null==(p=e.profile)?void 0:p.following,t),friendsRequested:k(null==(m=e.profile)?void 0:m.friendsRequested,o),friendRequests:k(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})};
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/toCollectionsModel.ts","../src/lib/converters/toLessonModel.ts","../src/lib/getAllUserDanceIds.ts","../src/lib/itemArrayToItemRecords.ts","../src/lib/converters/toChoreographerDTO.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 const dances = dto.dances.map(id => danceMap[id]).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 };\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 { 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 \"./toCollectionsModel\";\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","_id","d","createdAt","updatedAt","createdBy","isCopyable","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","dance","_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","danceIds","friends","following","friendsRequested","friendRequests","toString","email","_user$email","_user$name","_user$username","_user$image","_user$bio","userDTO","venueMap","friendsMap","followingMap","expand","ids","venue","lessonIds","venuename","venueaddress","geolocation","phone","website","contactEmail","contactName","contactPhone","lessonsIds","isDeleted","_venue$isDeleted","deletedAt","_venue$deletedAt","_venue$createdAt","venueDTO","lessonMap","expandedLessons","_extends","lessons"],"mappings":"sBAGgBA,EACZC,GAGF,MAAO,CACLC,GAAID,EAAIC,GACRC,KAAMF,EAAIE,KACVC,WAAYH,EAAIG,qBCPJC,EAAaJ,GAC3B,MAAO,CACLC,GAAID,EAAIC,GACRC,KAAMF,EAAIE,KACVG,QAASL,EAAIK,QACbC,KAAMN,EAAIM,KACVC,IAAKP,EAAIO,IACTC,YAAaR,EAAIQ,YACjBC,SAAUT,EAAIS,SACdN,WAAYH,EAAIG,qBCLJO,EACdV,EACAW,EACAC,GAIA,IAAMC,EAASb,EAAIa,OAChBC,KAAI,SAAAb,GACH,IAAMc,EAAQJ,EAASV,GAIvB,OAHKc,GACHC,QAAQC,gCAAgChB,gBAAgBD,EAAIkB,eAEvDH,KAERI,OAAOC,SACPN,IAAIV,GAGDiB,EAAiBrB,EAAIqB,eACxBP,KAAI,SAAAb,GACH,IAAMqB,EAAgBV,EAAiBX,GAIvC,OAHKqB,GACHN,QAAQC,wCAAwChB,gBAAgBD,EAAIkB,eAE/DI,KA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QtB,QAAQU,SAASnC,MAAOxB,GAC9C0B,QAASiD,EAAOJ,EAAQtB,QAAQU,SAASjC,QAAS1B,IAEtDkD,YAAayB,EAAOJ,EAAQtB,QAAQC,YAAaQ,GACjDP,OAAQwB,EAAOJ,EAAQtB,QAAQE,OAAQqB,GACvCZ,QAASe,EAAOJ,EAAQtB,QAAQW,QAASa,GACzCZ,UAAWc,EAAOJ,EAAQtB,QAAQY,UAAWa,GAC7CZ,iBAAkBa,EAAOJ,EAAQtB,QAAQa,iBAAkBW,GAC3DV,eAAgBY,EAAOJ,EAAQtB,QAAQc,eAAgBU,GACvDnB,eAAgBiB,EAAQtB,QAAQK,gBAAkB,EAClDE,MAAOe,EAAQtB,QAAQO,qCCnC/BqB,EACAC,EACAvG,aAGA,MAAO,CACHF,GAAIwG,EAAM3E,IACV6E,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,EACZvG,WAAYA,EACZiH,iBAASC,EAAEZ,EAAMW,YAASC,EAC1BC,iBAASC,EAAEd,EAAMa,WAASC,EAAI,KAC9BvF,iBAASwF,EAAEf,EAAMzE,WAASwF,EAAI,qCChBlCC,EACAC,EACApF,GAEA,IAAMqF,EAAkBF,EAASN,WAC5BrG,KAAI,SAAAb,GAAE,OAAImC,EAAcsF,EAAUzH,GAAKqC,MACvCnB,OAAOC,SAEZ,OAAAwG,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/toCollectionsModel.ts","../src/lib/converters/toLessonModel.ts","../src/lib/getAllUserDanceIds.ts","../src/lib/itemArrayToItemRecords.ts","../src/lib/converters/toChoreographerDTO.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 const dances = dto.dances.map(id => danceMap[id]).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 { 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 \"./toCollectionsModel\";\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","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","dance","_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","danceIds","friends","following","friendsRequested","friendRequests","toString","email","_user$email","_user$name","_user$username","_user$image","_user$bio","userDTO","venueMap","friendsMap","followingMap","expand","ids","_userDTO$profile","_userDTO$profile2","_userDTO$profile3","_userDTO$profile4","_userDTO$profile5","_userDTO$profile6","_userDTO$profile7","_userDTO$profile8","_userDTO$profile9","_userDTO$profile10","_userDTO$profile11","_userDTO$profile12","venue","lessonIds","venuename","venueaddress","geolocation","phone","website","contactEmail","contactName","contactPhone","lessonsIds","isDeleted","_venue$isDeleted","deletedAt","_venue$deletedAt","_venue$createdAt","venueDTO","lessonMap","expandedLessons","_extends","lessons"],"mappings":"sBAGgBA,EACZC,GAGF,MAAO,CACLC,GAAID,EAAIC,GACRC,KAAMF,EAAIE,KACVC,WAAYH,EAAIG,qBCPJC,EAAaJ,GAC3B,MAAO,CACLC,GAAID,EAAIC,GACRC,KAAMF,EAAIE,KACVG,QAASL,EAAIK,QACbC,KAAMN,EAAIM,KACVC,IAAKP,EAAIO,IACTC,YAAaR,EAAIQ,YACjBC,SAAUT,EAAIS,SACdN,WAAYH,EAAIG,qBCLJO,EACdV,EACAW,EACAC,GAIA,IAAMC,EAASb,EAAIa,OAChBC,KAAI,SAAAb,GACH,IAAMc,EAAQJ,EAASV,GAIvB,OAHKc,GACHC,QAAQC,gCAAgChB,gBAAgBD,EAAIkB,eAEvDH,KAERI,OAAOC,SACPN,IAAIV,GAGDiB,EAAiBrB,EAAIqB,eACxBP,KAAI,SAAAb,GACH,IAAMqB,EAAgBV,EAAiBX,GAIvC,OAHKqB,GACHN,QAAQC,wCAAwChB,gBAAgBD,EAAIkB,eAE/DI,KAERH,OAAOC,SACPN,IAAIf,GAGDwB,EAAkBZ,EAASX,EAAIwB,cAChCD,GACHP,QAAQC,4CAA4CjB,EAAIkB,iC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GACHI,QAASF"}
@@ -91,7 +91,7 @@ function toCollectionModel(dto, danceMap, trackMap, choreographerMap) {
91
91
  return danceMap[id];
92
92
  }).filter(Boolean);
93
93
  return {
94
- id: dto._id,
94
+ id: dto.id,
95
95
  name: dto.name,
96
96
  dances: dances.map(function (d) {
97
97
  return toDanceModel(d, trackMap, choreographerMap);
@@ -100,7 +100,9 @@ function toCollectionModel(dto, danceMap, trackMap, choreographerMap) {
100
100
  createdAt: dto.createdAt,
101
101
  updatedAt: dto.updatedAt,
102
102
  createdBy: dto.createdBy,
103
- isCopyable: dto.isCopyable
103
+ isCopyable: dto.isCopyable,
104
+ isArchived: dto.isArchived,
105
+ archivedAt: dto.archivedAt
104
106
  };
105
107
  }
106
108
 
@@ -278,7 +280,11 @@ function toUserDTO(user, isVerified, danceIds, collections, venues, friends, fol
278
280
  }
279
281
 
280
282
  function toUserModel(userDTO, danceMap, collectionMap, venueMap, friendsMap, followingMap) {
283
+ var _userDTO$profile, _userDTO$profile2, _userDTO$profile3, _userDTO$profile4, _userDTO$profile5, _userDTO$profile6, _userDTO$profile7, _userDTO$profile8, _userDTO$profile9, _userDTO$profile10, _userDTO$profile11, _userDTO$profile12;
281
284
  var expand = function expand(ids, map) {
285
+ if (ids === void 0) {
286
+ ids = [];
287
+ }
282
288
  return ids.map(function (id) {
283
289
  return map[id];
284
290
  }).filter(Boolean);
@@ -293,19 +299,19 @@ function toUserModel(userDTO, danceMap, collectionMap, venueMap, friendsMap, fol
293
299
  isVerified: userDTO.isVerified,
294
300
  profile: {
295
301
  dances: {
296
- favorites: expand(userDTO.profile.danceIds.favorites, danceMap),
297
- flagged: expand(userDTO.profile.danceIds.flagged, danceMap),
298
- known: expand(userDTO.profile.danceIds.known, danceMap),
299
- refresh: expand(userDTO.profile.danceIds.refresh, danceMap)
302
+ favorites: expand((_userDTO$profile = userDTO.profile) == null || (_userDTO$profile = _userDTO$profile.danceIds) == null ? void 0 : _userDTO$profile.favorites, danceMap),
303
+ flagged: expand((_userDTO$profile2 = userDTO.profile) == null || (_userDTO$profile2 = _userDTO$profile2.danceIds) == null ? void 0 : _userDTO$profile2.flagged, danceMap),
304
+ known: expand((_userDTO$profile3 = userDTO.profile) == null || (_userDTO$profile3 = _userDTO$profile3.danceIds) == null ? void 0 : _userDTO$profile3.known, danceMap),
305
+ refresh: expand((_userDTO$profile4 = userDTO.profile) == null || (_userDTO$profile4 = _userDTO$profile4.danceIds) == null ? void 0 : _userDTO$profile4.refresh, danceMap)
300
306
  },
301
- collections: expand(userDTO.profile.collections, collectionMap),
302
- venues: expand(userDTO.profile.venues, venueMap),
303
- friends: expand(userDTO.profile.friends, friendsMap),
304
- following: expand(userDTO.profile.following, followingMap),
305
- friendsRequested: expand(userDTO.profile.friendsRequested, friendsMap),
306
- friendRequests: expand(userDTO.profile.friendRequests, friendsMap),
307
- followersCount: userDTO.profile.followersCount || 0,
308
- links: userDTO.profile.links
307
+ collections: expand((_userDTO$profile5 = userDTO.profile) == null ? void 0 : _userDTO$profile5.collections, collectionMap),
308
+ venues: expand((_userDTO$profile6 = userDTO.profile) == null ? void 0 : _userDTO$profile6.venues, venueMap),
309
+ friends: expand((_userDTO$profile7 = userDTO.profile) == null ? void 0 : _userDTO$profile7.friends, friendsMap),
310
+ following: expand((_userDTO$profile8 = userDTO.profile) == null ? void 0 : _userDTO$profile8.following, followingMap),
311
+ friendsRequested: expand((_userDTO$profile9 = userDTO.profile) == null ? void 0 : _userDTO$profile9.friendsRequested, friendsMap),
312
+ friendRequests: expand((_userDTO$profile10 = userDTO.profile) == null ? void 0 : _userDTO$profile10.friendRequests, friendsMap),
313
+ followersCount: ((_userDTO$profile11 = userDTO.profile) == null ? void 0 : _userDTO$profile11.followersCount) || 0,
314
+ links: ((_userDTO$profile12 = userDTO.profile) == null ? void 0 : _userDTO$profile12.links) || []
309
315
  }
310
316
  };
311
317
  }
@@ -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/toTrackModel.ts","../src/lib/converters/toDanceModel.ts","../src/lib/converters/toCollectionsModel.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 { 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 const dances = dto.dances.map(id => danceMap[id]).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 };\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 \"./toCollectionsModel\";\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","toTrackModel","artists","isrc","uri","duration_ms","explicit","toDanceModel","trackMap","choreographerMap","tracks","map","track","console","warn","danceName","Boolean","choreographers","primaryTrackDTO","primaryTrack","stepsheet","difficulty","toCollectionModel","danceMap","dances","d","createdAt","updatedAt","createdBy","isCopyable","toDanceDTO","dance","_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","danceIds","friends","following","friendsRequested","friendRequests","toString","email","_user$email","_user$name","_user$username","_user$image","_user$bio","toUserModel","userDTO","venueMap","friendsMap","followingMap","expand","ids","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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K,CAACW,SAAS,YAAAC,gBAAA,GAAI,KAAK;IACnCC,SAAS,GAAAC,gBAAA,GAAEd,KAAK,CAACa,SAAS,YAAAC,gBAAA,GAAI,IAAI;IAClC/E,SAAS,GAAAgF,gBAAA,GAAEf,KAAK,CAACjE,SAAS,YAAAgF,gBAAA,GAAI;GACjC;AACL;;;;;;;;;;;;SCnBgBC,YAAYA,CACxBC,QAAkB,EAClBC,SAAoC,EACpC1D,aAA4C;EAE5C,IAAM2D,eAAe,GAAGF,QAAQ,CAACP,UAAU,CACtC1F,GAAG,CAAC,UAAAlB,EAAE;IAAA,OAAIwD,aAAa,CAAC4D,SAAS,CAACpH,EAAE,CAAC,EAAE0D,aAAa,CAAC;IAAC,CACtDlE,MAAM,CAAC+B,OAAO,CAAC;EAEpB,OAAA+F,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/toTrackModel.ts","../src/lib/converters/toDanceModel.ts","../src/lib/converters/toCollectionsModel.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 { 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 const dances = dto.dances.map(id => danceMap[id]).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 \"./toCollectionsModel\";\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","toTrackModel","artists","isrc","uri","duration_ms","explicit","toDanceModel","trackMap","choreographerMap","tracks","map","track","console","warn","danceName","Boolean","choreographers","primaryTrackDTO","primaryTrack","stepsheet","difficulty","toCollectionModel","danceMap","dances","d","createdAt","updatedAt","createdBy","isCopyable","isArchived","archivedAt","toDanceDTO","dance","_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","danceIds","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;IACrBC,IAAI,EAAEH,aAAa,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CAACI,WAAW;IAC9BC,KAAK,EAAEL,KAAK,CAACK,KAAK;IAClBC,OAAO,EAAEN,KAAK,CAACM,OAAO;IACtBC,YAAY,EAAEP,KAAK,CAACO,YAAY;IAChCC,WAAW,EAAER,KAAK,CAACQ,WAAW;IAC9BC,YAAY,EAAET,KAAK,CAACS,YAAY;IAChCC,UAAU,EAAET,SAAS;IACrB9G,UAAU,EAAEA,UAAU;IACtBwH,SAAS,GAAAC,gBAAA,GAAEZ,KAAK,CAACW,SAAS,YAAAC,gBAAA,GAAI,KAAK;IACnCC,SAAS,GAAAC,gBAAA,GAAEd,KAAK,CAACa,SAAS,YAAAC,gBAAA,GAAI,IAAI;IAClC7F,SAAS,GAAA8F,gBAAA,GAAEf,KAAK,CAAC/E,SAAS,YAAA8F,gBAAA,GAAI;GACjC;AACL;;;;;;;;;;;;SCnBgBC,YAAYA,CACxBC,QAAkB,EAClBC,SAAoC,EACpCtE,aAA4C;EAE5C,IAAMuE,eAAe,GAAGF,QAAQ,CAACP,UAAU,CACtCxG,GAAG,CAAC,UAAAlB,EAAE;IAAA,OAAI0D,aAAa,CAACwE,SAAS,CAAClI,EAAE,CAAC,EAAE4D,aAAa,CAAC;IAAC,CACtDpE,MAAM,CAAC+B,OAAO,CAAC;EAEpB,OAAA6G,QAAA,KACOH,QAAQ;IACXI,OAAO,EAAEF;;AAEjB;;;;"}
@@ -1,5 +1,5 @@
1
1
  export interface CollectionDTO {
2
- _id: string;
2
+ id: string;
3
3
  name: string;
4
4
  dances: string[];
5
5
  createdAt: Date;
@@ -7,5 +7,7 @@ export interface CollectionDTO {
7
7
  createdBy: string;
8
8
  isPrivate: boolean;
9
9
  isCopyable: boolean;
10
+ isArchived: boolean;
11
+ archivedAt?: Date;
10
12
  isVerified: boolean;
11
13
  }
@@ -8,4 +8,6 @@ export interface CollectionModel {
8
8
  createdBy: string;
9
9
  isCopyable: boolean;
10
10
  isVerified: boolean;
11
+ isArchived: boolean;
12
+ archivedAt?: Date;
11
13
  }
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.1.26",
2
+ "version": "0.1.28",
3
3
  "license": "MIT",
4
4
  "main": "dist/index.js",
5
5
  "typings": "dist/index.d.ts",
@@ -14,7 +14,7 @@ export function toCollectionModel(
14
14
  const dances = dto.dances.map(id => danceMap[id]).filter(Boolean);
15
15
 
16
16
  return {
17
- id: dto._id,
17
+ id: dto.id,
18
18
  name: dto.name,
19
19
  dances: dances.map(d => toDanceModel(d, trackMap, choreographerMap)),
20
20
  isVerified: dto.isVerified,
@@ -22,5 +22,7 @@ export function toCollectionModel(
22
22
  updatedAt: dto.updatedAt,
23
23
  createdBy: dto.createdBy,
24
24
  isCopyable: dto.isCopyable,
25
+ isArchived: dto.isArchived,
26
+ archivedAt: dto.archivedAt,
25
27
  };
26
28
  }
@@ -13,7 +13,7 @@ export function toUserModel(
13
13
  friendsMap: Record<string, UserAcquaintanceModel>,
14
14
  followingMap: Record<string, UserAcquaintanceModel>
15
15
  ): UserModel {
16
- const expand = <T>(ids: string[], map: Record<string, T>): T[] => ids.map(id => map[id]).filter(Boolean);
16
+ const expand = <T>(ids: string[] = [], map: Record<string, T>): T[] => ids.map(id => map[id]).filter(Boolean);
17
17
 
18
18
  return {
19
19
  _id: userDTO._id,
@@ -25,19 +25,19 @@ export function toUserModel(
25
25
  isVerified: userDTO.isVerified,
26
26
  profile: {
27
27
  dances: {
28
- favorites: expand(userDTO.profile.danceIds.favorites, danceMap),
29
- flagged: expand(userDTO.profile.danceIds.flagged, danceMap),
30
- known: expand(userDTO.profile.danceIds.known, danceMap),
31
- refresh: expand(userDTO.profile.danceIds.refresh, danceMap),
28
+ favorites: expand(userDTO.profile?.danceIds?.favorites, danceMap),
29
+ flagged: expand(userDTO.profile?.danceIds?.flagged, danceMap),
30
+ known: expand(userDTO.profile?.danceIds?.known, danceMap),
31
+ refresh: expand(userDTO.profile?.danceIds?.refresh, danceMap),
32
32
  },
33
- collections: expand(userDTO.profile.collections, collectionMap),
34
- venues: expand(userDTO.profile.venues, venueMap),
35
- friends: expand(userDTO.profile.friends, friendsMap),
36
- following: expand(userDTO.profile.following, followingMap),
37
- friendsRequested: expand(userDTO.profile.friendsRequested, friendsMap),
38
- friendRequests: expand(userDTO.profile.friendRequests, friendsMap),
39
- followersCount: userDTO.profile.followersCount || 0,
40
- links: userDTO.profile.links,
33
+ collections: expand(userDTO.profile?.collections, collectionMap),
34
+ venues: expand(userDTO.profile?.venues, venueMap),
35
+ friends: expand(userDTO.profile?.friends, friendsMap),
36
+ following: expand(userDTO.profile?.following, followingMap),
37
+ friendsRequested: expand(userDTO.profile?.friendsRequested, friendsMap),
38
+ friendRequests: expand(userDTO.profile?.friendRequests, friendsMap),
39
+ followersCount: userDTO.profile?.followersCount || 0,
40
+ links: userDTO.profile?.links || [],
41
41
  },
42
42
  };
43
43
  }
@@ -1,5 +1,5 @@
1
1
  export interface CollectionDTO {
2
- _id: string;
2
+ id: string;
3
3
  name: string;
4
4
  dances: string[];
5
5
  createdAt: Date;
@@ -7,6 +7,8 @@ export interface CollectionDTO {
7
7
  createdBy: string;
8
8
  isPrivate: boolean; // TODO: Private collections should not be returned in public APIs
9
9
  isCopyable: boolean;
10
+ isArchived: boolean;
11
+ archivedAt?: Date;
10
12
 
11
13
  // Added Data
12
14
  isVerified: boolean;
@@ -9,4 +9,6 @@ export interface CollectionModel {
9
9
  createdBy: string;
10
10
  isCopyable: boolean;
11
11
  isVerified: boolean;
12
+ isArchived: boolean;
13
+ archivedAt?: Date;
12
14
  }
@@ -1,4 +1,3 @@
1
-
2
1
  export interface UserCollectionUpdateRequest {
3
2
  name?: string;
4
3
  danceIds?: string[];