ldco-contract 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +103 -0
  3. package/dist/entities/user.entity.d.ts +16 -0
  4. package/dist/index.d.ts +13 -0
  5. package/dist/index.js +8 -0
  6. package/dist/ldco-contract.cjs.development.js +134 -0
  7. package/dist/ldco-contract.cjs.development.js.map +1 -0
  8. package/dist/ldco-contract.cjs.production.min.js +2 -0
  9. package/dist/ldco-contract.cjs.production.min.js.map +1 -0
  10. package/dist/ldco-contract.esm.js +118 -0
  11. package/dist/ldco-contract.esm.js.map +1 -0
  12. package/dist/models/collection.model.d.ts +5 -0
  13. package/dist/models/dance.model.d.ts +11 -0
  14. package/dist/models/friendRequest.model.d.ts +8 -0
  15. package/dist/models/instructor.model.d.ts +5 -0
  16. package/dist/models/lesson.model.d.ts +11 -0
  17. package/dist/models/profileData.model.d.ts +16 -0
  18. package/dist/models/socialMediaLinks.model.d.ts +25 -0
  19. package/dist/models/track.model.d.ts +9 -0
  20. package/dist/models/user.model.d.ts +10 -0
  21. package/dist/models/userAcquaintance.model.d.ts +19 -0
  22. package/dist/models/userDances.model.d.ts +8 -0
  23. package/dist/models/venue.model.d.ts +11 -0
  24. package/package.json +55 -0
  25. package/src/entities/user.entity.ts +17 -0
  26. package/src/index.ts +14 -0
  27. package/src/models/collection.model.ts +8 -0
  28. package/src/models/dance.model.ts +15 -0
  29. package/src/models/friendRequest.model.ts +11 -0
  30. package/src/models/instructor.model.ts +8 -0
  31. package/src/models/lesson.model.ts +11 -0
  32. package/src/models/profileData.model.ts +31 -0
  33. package/src/models/socialMediaLinks.model.ts +25 -0
  34. package/src/models/track.model.ts +12 -0
  35. package/src/models/user.model.ts +19 -0
  36. package/src/models/userAcquaintance.model.ts +37 -0
  37. package/src/models/userDances.model.ts +18 -0
  38. package/src/models/venue.model.ts +17 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Stephen Wike
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,103 @@
1
+ # TSDX User Guide
2
+
3
+ Congrats! You just saved yourself hours of work by bootstrapping this project with TSDX. Let’s get you oriented with what’s here and how to use it.
4
+
5
+ > This TSDX setup is meant for developing libraries (not apps!) that can be published to NPM. If you’re looking to build a Node app, you could use `ts-node-dev`, plain `ts-node`, or simple `tsc`.
6
+
7
+ > If you’re new to TypeScript, checkout [this handy cheatsheet](https://devhints.io/typescript)
8
+
9
+ ## Commands
10
+
11
+ TSDX scaffolds your new library inside `/src`.
12
+
13
+ To run TSDX, use:
14
+
15
+ ```bash
16
+ npm start # or yarn start
17
+ ```
18
+
19
+ This builds to `/dist` and runs the project in watch mode so any edits you save inside `src` causes a rebuild to `/dist`.
20
+
21
+ To do a one-off build, use `npm run build` or `yarn build`.
22
+
23
+ To run tests, use `npm test` or `yarn test`.
24
+
25
+ ## Configuration
26
+
27
+ Code quality is set up for you with `prettier`, `husky`, and `lint-staged`. Adjust the respective fields in `package.json` accordingly.
28
+
29
+ ### Jest
30
+
31
+ Jest tests are set up to run with `npm test` or `yarn test`.
32
+
33
+ ### Bundle Analysis
34
+
35
+ [`size-limit`](https://github.com/ai/size-limit) is set up to calculate the real cost of your library with `npm run size` and visualize the bundle with `npm run analyze`.
36
+
37
+ #### Setup Files
38
+
39
+ This is the folder structure we set up for you:
40
+
41
+ ```txt
42
+ /src
43
+ index.tsx # EDIT THIS
44
+ /test
45
+ blah.test.tsx # EDIT THIS
46
+ .gitignore
47
+ package.json
48
+ README.md # EDIT THIS
49
+ tsconfig.json
50
+ ```
51
+
52
+ ### Rollup
53
+
54
+ TSDX uses [Rollup](https://rollupjs.org) as a bundler and generates multiple rollup configs for various module formats and build settings. See [Optimizations](#optimizations) for details.
55
+
56
+ ### TypeScript
57
+
58
+ `tsconfig.json` is set up to interpret `dom` and `esnext` types, as well as `react` for `jsx`. Adjust according to your needs.
59
+
60
+ ## Continuous Integration
61
+
62
+ ### GitHub Actions
63
+
64
+ Two actions are added by default:
65
+
66
+ - `main` which installs deps w/ cache, lints, tests, and builds on all pushes against a Node and OS matrix
67
+ - `size` which comments cost comparison of your library on every pull request using [`size-limit`](https://github.com/ai/size-limit)
68
+
69
+ ## Optimizations
70
+
71
+ Please see the main `tsdx` [optimizations docs](https://github.com/palmerhq/tsdx#optimizations). In particular, know that you can take advantage of development-only optimizations:
72
+
73
+ ```js
74
+ // ./types/index.d.ts
75
+ declare var __DEV__: boolean;
76
+
77
+ // inside your code...
78
+ if (__DEV__) {
79
+ console.log('foo');
80
+ }
81
+ ```
82
+
83
+ You can also choose to install and use [invariant](https://github.com/palmerhq/tsdx#invariant) and [warning](https://github.com/palmerhq/tsdx#warning) functions.
84
+
85
+ ## Module Formats
86
+
87
+ CJS, ESModules, and UMD module formats are supported.
88
+
89
+ The appropriate paths are configured in `package.json` and `dist/index.js` accordingly. Please report if any issues are found.
90
+
91
+ ## Named Exports
92
+
93
+ Per Palmer Group guidelines, [always use named exports.](https://github.com/palmerhq/typescript#exports) Code split inside your React app instead of your React library.
94
+
95
+ ## Including Styles
96
+
97
+ There are many ways to ship styles, including with CSS-in-JS. TSDX has no opinion on this, configure how you like.
98
+
99
+ For vanilla CSS, you can include it at the root directory and add it to the `files` section in your `package.json`, so that it can be imported separately by your users and run through their bundler's loader.
100
+
101
+ ## Publishing to NPM
102
+
103
+ We recommend using [np](https://github.com/sindresorhus/np).
@@ -0,0 +1,16 @@
1
+ import Collection from "../models/collection.model";
2
+ export default class UserEntity {
3
+ _id: string;
4
+ email: string;
5
+ name: string;
6
+ image?: any;
7
+ bio?: string;
8
+ favorites?: string[];
9
+ flagged?: string[];
10
+ known?: string[];
11
+ refresh?: string[];
12
+ collections?: Collection[];
13
+ venues?: string[];
14
+ friends?: string[];
15
+ following?: string[];
16
+ }
@@ -0,0 +1,13 @@
1
+ export { default as Collection } from './models/collection.model';
2
+ export { default as Dance } from './models/dance.model';
3
+ export { default as FriendRequest } from './models/friendRequest.model';
4
+ export { default as Instructor } from './models/instructor.model';
5
+ export { default as Lesson } from './models/lesson.model';
6
+ export { default as ProfileData } from './models/profileData.model';
7
+ export { default as SocialMediaLinks } from './models/socialMediaLinks.model';
8
+ export { default as Track } from './models/track.model';
9
+ export { default as User } from './models/user.model';
10
+ export { default as UserAcquaintance } from './models/userAcquaintance.model';
11
+ export { default as UserDances } from './models/userDances.model';
12
+ export { default as Venue } from './models/venue.model';
13
+ export { default as UserEntity } from './entities/user.entity';
package/dist/index.js ADDED
@@ -0,0 +1,8 @@
1
+
2
+ 'use strict'
3
+
4
+ if (process.env.NODE_ENV === 'production') {
5
+ module.exports = require('./ldco-contract.cjs.production.min.js')
6
+ } else {
7
+ module.exports = require('./ldco-contract.cjs.development.js')
8
+ }
@@ -0,0 +1,134 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var Collection = function Collection(obj) {
6
+ Object.assign(this, obj);
7
+ };
8
+
9
+ var Dance = function Dance(obj) {
10
+ this.tracks = [];
11
+ Object.assign(this, obj);
12
+ };
13
+
14
+ var FriendRequest = function FriendRequest(obj) {
15
+ this.requester = [];
16
+ this.requestee = [];
17
+ Object.assign(this, obj);
18
+ };
19
+
20
+ var Instructor = function Instructor(obj) {
21
+ Object.assign(this, obj);
22
+ };
23
+
24
+ var Lesson = function Lesson() {};
25
+
26
+ function _defineProperties(e, r) {
27
+ for (var t = 0; t < r.length; t++) {
28
+ var o = r[t];
29
+ o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o);
30
+ }
31
+ }
32
+ function _createClass(e, r, t) {
33
+ return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", {
34
+ writable: !1
35
+ }), e;
36
+ }
37
+ function _toPrimitive(t, r) {
38
+ if ("object" != typeof t || !t) return t;
39
+ var e = t[Symbol.toPrimitive];
40
+ if (void 0 !== e) {
41
+ var i = e.call(t, r || "default");
42
+ if ("object" != typeof i) return i;
43
+ throw new TypeError("@@toPrimitive must return a primitive value.");
44
+ }
45
+ return ("string" === r ? String : Number)(t);
46
+ }
47
+ function _toPropertyKey(t) {
48
+ var i = _toPrimitive(t, "string");
49
+ return "symbol" == typeof i ? i : i + "";
50
+ }
51
+
52
+ var UserDances = /*#__PURE__*/function () {
53
+ function UserDances(data) {
54
+ var _data$favorites, _data$flagged, _data$known, _data$refresh;
55
+ if (data === void 0) {
56
+ data = {};
57
+ }
58
+ this.favorites = (_data$favorites = data.favorites) != null ? _data$favorites : [];
59
+ this.flagged = (_data$flagged = data.flagged) != null ? _data$flagged : [];
60
+ this.known = (_data$known = data.known) != null ? _data$known : [];
61
+ this.refresh = (_data$refresh = data.refresh) != null ? _data$refresh : [];
62
+ }
63
+ return _createClass(UserDances, [{
64
+ key: "all",
65
+ get: function get() {
66
+ return [].concat(this.favorites, this.flagged, this.known, this.refresh);
67
+ }
68
+ }]);
69
+ }();
70
+
71
+ var ProfileData = function ProfileData(data) {
72
+ var _data$collections, _data$venues, _data$friends, _data$following, _data$friendsRequeste, _data$friendRequests, _data$followersCount;
73
+ this.dances = new UserDances(data.dances);
74
+ this.collections = (_data$collections = data.collections) != null ? _data$collections : [];
75
+ this.venues = (_data$venues = data.venues) != null ? _data$venues : [];
76
+ this.friends = (_data$friends = data.friends) != null ? _data$friends : [];
77
+ this.following = (_data$following = data.following) != null ? _data$following : [];
78
+ this.friendsRequested = (_data$friendsRequeste = data.friendsRequested) != null ? _data$friendsRequeste : [];
79
+ this.friendRequests = (_data$friendRequests = data.friendRequests) != null ? _data$friendRequests : [];
80
+ this.followersCount = (_data$followersCount = data.followersCount) != null ? _data$followersCount : 0;
81
+ this.links = {};
82
+ };
83
+
84
+ var SocialMediaLinks = function SocialMediaLinks() {};
85
+
86
+ var Track = function Track(obj) {
87
+ this.artists = [];
88
+ Object.assign(this, obj);
89
+ };
90
+
91
+ var User = function User(data) {
92
+ var _data$_id, _data$email, _data$name, _data$profile;
93
+ this._id = (_data$_id = data._id) != null ? _data$_id : '';
94
+ this.email = (_data$email = data.email) != null ? _data$email : '';
95
+ this.name = (_data$name = data.name) != null ? _data$name : '';
96
+ this.image = data.image;
97
+ this.profile = new ProfileData((_data$profile = data == null ? void 0 : data.profile) != null ? _data$profile : {});
98
+ };
99
+
100
+ var UserAcquaintance = function UserAcquaintance(data) {
101
+ var _data$_id, _data$email, _data$name, _data$collections, _data$followersCount, _data$venuesCount, _data$mutualsCount, _data$friends, _data$following;
102
+ this._id = (_data$_id = data._id) != null ? _data$_id : '';
103
+ this.email = (_data$email = data.email) != null ? _data$email : '';
104
+ this.name = (_data$name = data.name) != null ? _data$name : '';
105
+ this.image = data.image;
106
+ this.dances = new UserDances(data.dances);
107
+ this.collections = (_data$collections = data.collections) != null ? _data$collections : [];
108
+ this.followersCount = (_data$followersCount = data.followersCount) != null ? _data$followersCount : 0;
109
+ this.venuesCount = (_data$venuesCount = data.venuesCount) != null ? _data$venuesCount : 0;
110
+ this.mutualsCount = (_data$mutualsCount = data.mutualsCount) != null ? _data$mutualsCount : 0;
111
+ this.friends = (_data$friends = data.friends) != null ? _data$friends : [];
112
+ this.following = (_data$following = data.following) != null ? _data$following : [];
113
+ };
114
+
115
+ var Venue = function Venue(obj) {
116
+ Object.assign(this, obj);
117
+ };
118
+
119
+ var UserEntity = function UserEntity() {};
120
+
121
+ exports.Collection = Collection;
122
+ exports.Dance = Dance;
123
+ exports.FriendRequest = FriendRequest;
124
+ exports.Instructor = Instructor;
125
+ exports.Lesson = Lesson;
126
+ exports.ProfileData = ProfileData;
127
+ exports.SocialMediaLinks = SocialMediaLinks;
128
+ exports.Track = Track;
129
+ exports.User = User;
130
+ exports.UserAcquaintance = UserAcquaintance;
131
+ exports.UserDances = UserDances;
132
+ exports.UserEntity = UserEntity;
133
+ exports.Venue = Venue;
134
+ //# sourceMappingURL=ldco-contract.cjs.development.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ldco-contract.cjs.development.js","sources":["../src/models/collection.model.ts","../src/models/dance.model.ts","../src/models/friendRequest.model.ts","../src/models/instructor.model.ts","../src/models/lesson.model.ts","../src/models/userDances.model.ts","../src/models/profileData.model.ts","../src/models/socialMediaLinks.model.ts","../src/models/track.model.ts","../src/models/user.model.ts","../src/models/userAcquaintance.model.ts","../src/models/venue.model.ts","../src/entities/user.entity.ts"],"sourcesContent":["export default class Collection {\r\n constructor(obj: Partial<Collection>) {\r\n Object.assign(this, obj);\r\n }\r\n\r\n name?: string;\r\n dances?: string[];\r\n}","import Track from \"./track.model\";\r\n\r\nexport default class Dance {\r\n constructor(obj: Partial<Dance>) {\r\n Object.assign(this, obj);\r\n }\r\n\r\n _id?: string;\r\n difficulty?: string;\r\n tracks?: Track[] = [];\r\n primaryTrack?: Track;\r\n danceName!: string;\r\n choreographers!: string[];\r\n stepsheet?: string;\r\n}","export default class FriendRequest {\r\n constructor(obj: Partial<FriendRequest>) {\r\n Object.assign(this, obj);\r\n }\r\n\r\n _id?: string;\r\n requester?: string[] = [];\r\n requestee?: string[] = [];\r\n status?: string;\r\n timestamp?: Date;\r\n}","export default class Instructor {\r\n constructor(obj: Partial<Instructor>) {\r\n Object.assign(this, obj);\r\n }\r\n\r\n _id!: string;\r\n name!: string;\r\n}","export default class Lesson {\r\n _id!: string;\r\n venueid!: string;\r\n lessonday!: string;\r\n lessonstart!: string;\r\n instructors!: string[];\r\n duration?: string;\r\n lessoncost?: string;\r\n notes?: string;\r\n difficulty?: string;\r\n}\r\n","export default class UserDances {\r\n\r\n constructor(data: Partial<UserDances> = {}) {\r\n this.favorites = data.favorites ?? [];\r\n this.flagged = data.flagged ?? [];\r\n this.known = data.known ?? [];\r\n this.refresh = data.refresh ?? [];\r\n }\r\n\r\n get all(): string[] {\r\n return [...this.favorites, ...this.flagged, ...this.known, ...this.refresh];\r\n }\r\n\r\n favorites: string[];\r\n flagged: string[];\r\n known: string[];\r\n refresh: string[];\r\n}\r\n","import Collection from \"./collection.model\";\r\nimport SocialMediaLinks from \"./socialMediaLinks.model\";\r\nimport UserDances from \"./userDances.model\";\r\nimport UserAcquaintance from \"./userAcquaintance.model\";\r\n\r\nexport default class ProfileData {\r\n\r\n constructor(data: Partial<ProfileData>) {\r\n this.dances = new UserDances(data.dances);\r\n this.collections = data.collections ?? [];\r\n this.venues = data.venues ?? [];\r\n this.friends = data.friends ?? [];\r\n this.following = data.following ?? [];\r\n this.friendsRequested = data.friendsRequested ?? [];\r\n this.friendRequests = data.friendRequests ?? [];\r\n this.followersCount = data.followersCount ?? 0;\r\n this.links = {};\r\n }\r\n\r\n dances: UserDances;\r\n collections: Collection[];\r\n venues: string[];\r\n friends: UserAcquaintance[];\r\n following: UserAcquaintance[];\r\n friendsRequested: UserAcquaintance[];\r\n friendRequests: UserAcquaintance[];\r\n followersCount: number;\r\n links: SocialMediaLinks;\r\n\r\n\r\n}\r\n","export default class SocialMediaLinks {\r\n facebook?: string;\r\n twitter?: string;\r\n instagram?: string;\r\n linkedin?: string;\r\n youtube?: string;\r\n tiktok?: string;\r\n pinterest?: string;\r\n reddit?: string;\r\n snapchat?: string;\r\n github?: string;\r\n stackoverflow?: string;\r\n dribbble?: string;\r\n behance?: string;\r\n tumblr?: string;\r\n vimeo?: string;\r\n soundcloud?: string;\r\n deviantart?: string;\r\n twitch?: string;\r\n discord?: string;\r\n steam?: string;\r\n wechat?: string;\r\n vk?: string;\r\n website?: string;\r\n};","export default class Track {\r\n constructor(obj: Partial<Track>) {\r\n Object.assign(this, obj);\r\n }\r\n\r\n _id!: string;\r\n isrc!: string;\r\n name!: string;\r\n artists: string[] = [];\r\n duration_ms!: number;\r\n explicit!: boolean;\r\n}\r\n","import ProfileData from \"./profileData.model\";\r\n\r\nexport default class User {\r\n\r\n constructor(data: Partial<User>) {\r\n this._id = data._id ?? '';\r\n this.email = data.email ?? '';\r\n this.name = data.name ?? '';\r\n this.image = data.image;\r\n this.profile = new ProfileData(data?.profile as ProfileData ?? {});\r\n }\r\n\r\n _id!: string;\r\n email!: string;\r\n name!: string;\r\n image?: string;\r\n bio?: string;\r\n profile: ProfileData;\r\n}\r\n","import UserDances from \"./userDances.model\";\r\nimport SocialMediaLinks from \"./socialMediaLinks.model\";\r\nimport Collection from \"./collection.model\";\r\n\r\nexport default class UserAcquaintance {\r\n\r\n constructor(data: Partial<UserAcquaintance>) {\r\n this._id = data._id ?? '';\r\n this.email = data.email ?? '';\r\n this.name = data.name ?? '';\r\n this.image = data.image;\r\n this.dances = new UserDances(data.dances);\r\n this.collections = data.collections ?? [];\r\n this.followersCount = data.followersCount ?? 0;\r\n this.venuesCount = data.venuesCount ?? 0;\r\n this.mutualsCount = data.mutualsCount ?? 0;\r\n this.friends = data.friends ?? [];\r\n this.following = data.following ?? [];\r\n }\r\n\r\n _id!: string;\r\n email!: string;\r\n name!: string;\r\n image?: string;\r\n bio?: string;\r\n\r\n friends: string[];\r\n following: string[];\r\n dances: UserDances;\r\n collections: Collection[];\r\n\r\n followersCount: number;\r\n venuesCount: number;\r\n mutualsCount: number;\r\n\r\n links?: SocialMediaLinks;\r\n}\r\n","import Lesson from \"./lesson.model\";\r\n\r\nexport default class Venue {\r\n constructor(obj: Partial<Venue>) {\r\n Object.assign(this, obj);\r\n }\r\n\r\n _id!: string;\r\n venuename!: string;\r\n venueaddress!: string;\r\n geolocation!: [number, number];\r\n phone?: string;\r\n website?: string;\r\n\r\n // Loaded Data\r\n lessons?: Lesson[];\r\n}","import Collection from \"../models/collection.model\";\r\n\r\nexport default class UserEntity {\r\n\t_id!: string;\r\n\temail!: string;\r\n\tname!: string;\r\n\timage?: any;\r\n\tbio?: string;\r\n\tfavorites?: string[];\r\n\tflagged?: string[];\r\n\tknown?: string[];\r\n\trefresh?: string[];\r\n\tcollections?: Collection[];\r\n\tvenues?: string[];\r\n\tfriends?: string[];\r\n\tfollowing?: string[];\r\n}\r\n"],"names":["Collection","obj","Object","assign","Dance","FriendRequest","Instructor","Lesson","UserDances","data","favorites","_data$favorites","flagged","_data$flagged","known","_data$known","refresh","_data$refresh","_createClass","key","get","concat","ProfileData","dances","collections","_data$collections","venues","_data$venues","friends","_data$friends","following","_data$following","friendsRequested","_data$friendsRequeste","friendRequests","_data$friendRequests","followersCount","_data$followersCount","links","SocialMediaLinks","Track","User","_id","_data$_id","email","_data$email","name","_data$name","image","profile","_data$profile","UserAcquaintance","venuesCount","_data$venuesCount","mutualsCount","_data$mutualsCount","Venue","UserEntity"],"mappings":";;;;IAAqBA,UAAU,GAC3B,SAAAA,WAAYC,GAAwB;EAChCC,MAAM,CAACC,MAAM,CAAC,IAAI,EAAEF,GAAG,CAAC;AAC5B;;ICDiBG,KAAK,GACtB,SAAAA,MAAYH,GAAmB;EAM/B,WAAM,GAAa,EAAE;EALjBC,MAAM,CAACC,MAAM,CAAC,IAAI,EAAEF,GAAG,CAAC;AAC5B,C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e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,"string");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}Object.defineProperty(exports,"__esModule",{value:!0});var t=function(){return t=function(e){var t,n,i,s;void 0===e&&(e={}),this.favorites=null!=(t=e.favorites)?t:[],this.flagged=null!=(n=e.flagged)?n:[],this.known=null!=(i=e.known)?i:[],this.refresh=null!=(s=e.refresh)?s:[]},(n=[{key:"all",get:function(){return[].concat(this.favorites,this.flagged,this.known,this.refresh)}}])&&function(t,n){for(var i=0;i<n.length;i++){var s=n[i];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(t,e(s.key),s)}}(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,n}(),n=function(e){var n,i,s,l,o,r,u;this.dances=new t(e.dances),this.collections=null!=(n=e.collections)?n:[],this.venues=null!=(i=e.venues)?i:[],this.friends=null!=(s=e.friends)?s:[],this.following=null!=(l=e.following)?l:[],this.friendsRequested=null!=(o=e.friendsRequested)?o:[],this.friendRequests=null!=(r=e.friendRequests)?r:[],this.followersCount=null!=(u=e.followersCount)?u:0,this.links={}};exports.Collection=function(e){Object.assign(this,e)},exports.Dance=function(e){this.tracks=[],Object.assign(this,e)},exports.FriendRequest=function(e){this.requester=[],this.requestee=[],Object.assign(this,e)},exports.Instructor=function(e){Object.assign(this,e)},exports.Lesson=function(){},exports.ProfileData=n,exports.SocialMediaLinks=function(){},exports.Track=function(e){this.artists=[],Object.assign(this,e)},exports.User=function(e){var t,i,s,l;this._id=null!=(t=e._id)?t:"",this.email=null!=(i=e.email)?i:"",this.name=null!=(s=e.name)?s:"",this.image=e.image,this.profile=new n(null!=(l=null==e?void 0:e.profile)?l:{})},exports.UserAcquaintance=function(e){var n,i,s,l,o,r,u,a,f;this._id=null!=(n=e._id)?n:"",this.email=null!=(i=e.email)?i:"",this.name=null!=(s=e.name)?s:"",this.image=e.image,this.dances=new t(e.dances),this.collections=null!=(l=e.collections)?l:[],this.followersCount=null!=(o=e.followersCount)?o:0,this.venuesCount=null!=(r=e.venuesCount)?r:0,this.mutualsCount=null!=(u=e.mutualsCount)?u:0,this.friends=null!=(a=e.friends)?a:[],this.following=null!=(f=e.following)?f:[]},exports.UserDances=t,exports.UserEntity=function(){},exports.Venue=function(e){Object.assign(this,e)};
2
+ //# sourceMappingURL=ldco-contract.cjs.production.min.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ldco-contract.cjs.production.min.js","sources":["../src/models/userDances.model.ts","../src/models/profileData.model.ts","../src/models/collection.model.ts","../src/models/dance.model.ts","../src/models/friendRequest.model.ts","../src/models/instructor.model.ts","../src/models/track.model.ts","../src/models/user.model.ts","../src/models/userAcquaintance.model.ts","../src/models/venue.model.ts"],"sourcesContent":["export default class UserDances {\r\n\r\n constructor(data: Partial<UserDances> = {}) {\r\n this.favorites = data.favorites ?? [];\r\n this.flagged = data.flagged ?? [];\r\n this.known = data.known ?? [];\r\n this.refresh = data.refresh ?? [];\r\n }\r\n\r\n get all(): string[] {\r\n return [...this.favorites, ...this.flagged, ...this.known, ...this.refresh];\r\n }\r\n\r\n favorites: string[];\r\n flagged: string[];\r\n known: string[];\r\n refresh: string[];\r\n}\r\n","import Collection from \"./collection.model\";\r\nimport SocialMediaLinks from \"./socialMediaLinks.model\";\r\nimport UserDances from \"./userDances.model\";\r\nimport UserAcquaintance from \"./userAcquaintance.model\";\r\n\r\nexport default class ProfileData {\r\n\r\n constructor(data: Partial<ProfileData>) {\r\n this.dances = new UserDances(data.dances);\r\n this.collections = data.collections ?? [];\r\n this.venues = data.venues ?? [];\r\n this.friends = data.friends ?? [];\r\n this.following = data.following ?? [];\r\n this.friendsRequested = data.friendsRequested ?? [];\r\n this.friendRequests = data.friendRequests ?? [];\r\n this.followersCount = data.followersCount ?? 0;\r\n this.links = {};\r\n }\r\n\r\n dances: UserDances;\r\n collections: Collection[];\r\n venues: string[];\r\n friends: UserAcquaintance[];\r\n following: UserAcquaintance[];\r\n friendsRequested: UserAcquaintance[];\r\n friendRequests: UserAcquaintance[];\r\n followersCount: number;\r\n links: SocialMediaLinks;\r\n\r\n\r\n}\r\n","export default class Collection {\r\n constructor(obj: Partial<Collection>) {\r\n Object.assign(this, obj);\r\n }\r\n\r\n name?: string;\r\n dances?: string[];\r\n}","import Track from \"./track.model\";\r\n\r\nexport default class Dance {\r\n constructor(obj: Partial<Dance>) {\r\n Object.assign(this, obj);\r\n }\r\n\r\n _id?: string;\r\n difficulty?: string;\r\n tracks?: Track[] = [];\r\n primaryTrack?: Track;\r\n danceName!: string;\r\n choreographers!: string[];\r\n stepsheet?: string;\r\n}","export default class FriendRequest {\r\n constructor(obj: Partial<FriendRequest>) {\r\n Object.assign(this, obj);\r\n }\r\n\r\n _id?: string;\r\n requester?: string[] = [];\r\n requestee?: string[] = [];\r\n status?: string;\r\n timestamp?: Date;\r\n}","export default class Instructor {\r\n constructor(obj: Partial<Instructor>) {\r\n Object.assign(this, obj);\r\n }\r\n\r\n _id!: string;\r\n name!: string;\r\n}","export default class Track {\r\n constructor(obj: Partial<Track>) {\r\n Object.assign(this, obj);\r\n }\r\n\r\n _id!: string;\r\n isrc!: string;\r\n name!: string;\r\n artists: string[] = [];\r\n duration_ms!: number;\r\n explicit!: boolean;\r\n}\r\n","import ProfileData from \"./profileData.model\";\r\n\r\nexport default class User {\r\n\r\n constructor(data: Partial<User>) {\r\n this._id = data._id ?? '';\r\n this.email = data.email ?? '';\r\n this.name = data.name ?? '';\r\n this.image = data.image;\r\n this.profile = new ProfileData(data?.profile as ProfileData ?? {});\r\n }\r\n\r\n _id!: string;\r\n email!: string;\r\n name!: string;\r\n image?: string;\r\n bio?: string;\r\n profile: ProfileData;\r\n}\r\n","import UserDances from \"./userDances.model\";\r\nimport SocialMediaLinks from \"./socialMediaLinks.model\";\r\nimport Collection from \"./collection.model\";\r\n\r\nexport default class UserAcquaintance {\r\n\r\n constructor(data: Partial<UserAcquaintance>) {\r\n this._id = data._id ?? '';\r\n this.email = data.email ?? '';\r\n this.name = data.name ?? '';\r\n this.image = data.image;\r\n this.dances = new UserDances(data.dances);\r\n this.collections = data.collections ?? [];\r\n this.followersCount = data.followersCount ?? 0;\r\n this.venuesCount = data.venuesCount ?? 0;\r\n this.mutualsCount = data.mutualsCount ?? 0;\r\n this.friends = data.friends ?? [];\r\n this.following = data.following ?? [];\r\n }\r\n\r\n _id!: string;\r\n email!: string;\r\n name!: string;\r\n image?: string;\r\n bio?: string;\r\n\r\n friends: string[];\r\n following: string[];\r\n dances: UserDances;\r\n collections: Collection[];\r\n\r\n followersCount: number;\r\n venuesCount: number;\r\n mutualsCount: number;\r\n\r\n links?: SocialMediaLinks;\r\n}\r\n","import Lesson from \"./lesson.model\";\r\n\r\nexport default class Venue {\r\n constructor(obj: Partial<Venue>) {\r\n Object.assign(this, obj);\r\n }\r\n\r\n _id!: string;\r\n venuename!: string;\r\n venueaddress!: string;\r\n geolocation!: [number, number];\r\n phone?: string;\r\n website?: string;\r\n\r\n // Loaded Data\r\n lessons?: Lesson[];\r\n}"],"names":["UserDances","data","this","favorites","_data$favorites","flagged","_data$flagged","known","_data$known","refresh","_data$refresh","key","get","concat","ProfileData","dances","collections","_data$collections","venues","_data$venues","friends","_data$friends","following","_data$following","friendsRequested","_data$friendsRequeste","friendRequests","_data$friendRequests","followersCount","_data$followersCount","links","obj","Object","assign","_id","_data$_id","email","_data$email","name","_data$name","image","profile","_data$profile","venuesCount","_data$venuesCount","mutualsCount","_data$mutualsCount"],"mappings":"yWAAqBA,aAOhB,SALD,SAAYC,wBAAAA,IAAAA,EAA4B,IACpCC,KAAKC,iBAASC,EAAGH,EAAKE,WAASC,EAAI,GACnCF,KAAKG,eAAOC,EAAGL,EAAKI,SAAOC,EAAI,GAC/BJ,KAAKK,aAAKC,EAAGP,EAAKM,OAAKC,EAAI,GAC3BN,KAAKO,eAAOC,EAAGT,EAAKQ,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EAAI,GACvBjC,KAAKkC,aAAKC,EAAGpC,EAAKmC,OAAKC,EAAI,GAC3BnC,KAAKoC,YAAIC,EAAGtC,EAAKqC,MAAIC,EAAI,GACzBrC,KAAKsC,MAAQvC,EAAKuC,MAClBtC,KAAKa,OAAS,IAAIf,EAAWC,EAAKc,QAClCb,KAAKc,mBAAWC,EAAGhB,EAAKe,aAAWC,EAAI,GACvCf,KAAK0B,sBAAcC,EAAG5B,EAAK2B,gBAAcC,EAAI,EAC7C3B,KAAKyC,mBAAWC,EAAG3C,EAAK0C,aAAWC,EAAI,EACvC1C,KAAK2C,oBAAYC,EAAG7C,EAAK4C,cAAYC,EAAI,EACzC5C,KAAKkB,eAAOC,EAAGpB,EAAKmB,SAAOC,EAAI,GAC/BnB,KAAKoB,iBAASC,EAAGtB,EAAKqB,WAASC,EAAI,uECdvC,SAAYQ,GACRC,OAAOC,OAAO/B,KAAM6B"}
@@ -0,0 +1,118 @@
1
+ var Collection = function Collection(obj) {
2
+ Object.assign(this, obj);
3
+ };
4
+
5
+ var Dance = function Dance(obj) {
6
+ this.tracks = [];
7
+ Object.assign(this, obj);
8
+ };
9
+
10
+ var FriendRequest = function FriendRequest(obj) {
11
+ this.requester = [];
12
+ this.requestee = [];
13
+ Object.assign(this, obj);
14
+ };
15
+
16
+ var Instructor = function Instructor(obj) {
17
+ Object.assign(this, obj);
18
+ };
19
+
20
+ var Lesson = function Lesson() {};
21
+
22
+ function _defineProperties(e, r) {
23
+ for (var t = 0; t < r.length; t++) {
24
+ var o = r[t];
25
+ o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o);
26
+ }
27
+ }
28
+ function _createClass(e, r, t) {
29
+ return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", {
30
+ writable: !1
31
+ }), e;
32
+ }
33
+ function _toPrimitive(t, r) {
34
+ if ("object" != typeof t || !t) return t;
35
+ var e = t[Symbol.toPrimitive];
36
+ if (void 0 !== e) {
37
+ var i = e.call(t, r || "default");
38
+ if ("object" != typeof i) return i;
39
+ throw new TypeError("@@toPrimitive must return a primitive value.");
40
+ }
41
+ return ("string" === r ? String : Number)(t);
42
+ }
43
+ function _toPropertyKey(t) {
44
+ var i = _toPrimitive(t, "string");
45
+ return "symbol" == typeof i ? i : i + "";
46
+ }
47
+
48
+ var UserDances = /*#__PURE__*/function () {
49
+ function UserDances(data) {
50
+ var _data$favorites, _data$flagged, _data$known, _data$refresh;
51
+ if (data === void 0) {
52
+ data = {};
53
+ }
54
+ this.favorites = (_data$favorites = data.favorites) != null ? _data$favorites : [];
55
+ this.flagged = (_data$flagged = data.flagged) != null ? _data$flagged : [];
56
+ this.known = (_data$known = data.known) != null ? _data$known : [];
57
+ this.refresh = (_data$refresh = data.refresh) != null ? _data$refresh : [];
58
+ }
59
+ return _createClass(UserDances, [{
60
+ key: "all",
61
+ get: function get() {
62
+ return [].concat(this.favorites, this.flagged, this.known, this.refresh);
63
+ }
64
+ }]);
65
+ }();
66
+
67
+ var ProfileData = function ProfileData(data) {
68
+ var _data$collections, _data$venues, _data$friends, _data$following, _data$friendsRequeste, _data$friendRequests, _data$followersCount;
69
+ this.dances = new UserDances(data.dances);
70
+ this.collections = (_data$collections = data.collections) != null ? _data$collections : [];
71
+ this.venues = (_data$venues = data.venues) != null ? _data$venues : [];
72
+ this.friends = (_data$friends = data.friends) != null ? _data$friends : [];
73
+ this.following = (_data$following = data.following) != null ? _data$following : [];
74
+ this.friendsRequested = (_data$friendsRequeste = data.friendsRequested) != null ? _data$friendsRequeste : [];
75
+ this.friendRequests = (_data$friendRequests = data.friendRequests) != null ? _data$friendRequests : [];
76
+ this.followersCount = (_data$followersCount = data.followersCount) != null ? _data$followersCount : 0;
77
+ this.links = {};
78
+ };
79
+
80
+ var SocialMediaLinks = function SocialMediaLinks() {};
81
+
82
+ var Track = function Track(obj) {
83
+ this.artists = [];
84
+ Object.assign(this, obj);
85
+ };
86
+
87
+ var User = function User(data) {
88
+ var _data$_id, _data$email, _data$name, _data$profile;
89
+ this._id = (_data$_id = data._id) != null ? _data$_id : '';
90
+ this.email = (_data$email = data.email) != null ? _data$email : '';
91
+ this.name = (_data$name = data.name) != null ? _data$name : '';
92
+ this.image = data.image;
93
+ this.profile = new ProfileData((_data$profile = data == null ? void 0 : data.profile) != null ? _data$profile : {});
94
+ };
95
+
96
+ var UserAcquaintance = function UserAcquaintance(data) {
97
+ var _data$_id, _data$email, _data$name, _data$collections, _data$followersCount, _data$venuesCount, _data$mutualsCount, _data$friends, _data$following;
98
+ this._id = (_data$_id = data._id) != null ? _data$_id : '';
99
+ this.email = (_data$email = data.email) != null ? _data$email : '';
100
+ this.name = (_data$name = data.name) != null ? _data$name : '';
101
+ this.image = data.image;
102
+ this.dances = new UserDances(data.dances);
103
+ this.collections = (_data$collections = data.collections) != null ? _data$collections : [];
104
+ this.followersCount = (_data$followersCount = data.followersCount) != null ? _data$followersCount : 0;
105
+ this.venuesCount = (_data$venuesCount = data.venuesCount) != null ? _data$venuesCount : 0;
106
+ this.mutualsCount = (_data$mutualsCount = data.mutualsCount) != null ? _data$mutualsCount : 0;
107
+ this.friends = (_data$friends = data.friends) != null ? _data$friends : [];
108
+ this.following = (_data$following = data.following) != null ? _data$following : [];
109
+ };
110
+
111
+ var Venue = function Venue(obj) {
112
+ Object.assign(this, obj);
113
+ };
114
+
115
+ var UserEntity = function UserEntity() {};
116
+
117
+ export { Collection, Dance, FriendRequest, Instructor, Lesson, ProfileData, SocialMediaLinks, Track, User, UserAcquaintance, UserDances, UserEntity, Venue };
118
+ //# sourceMappingURL=ldco-contract.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ldco-contract.esm.js","sources":["../src/models/collection.model.ts","../src/models/dance.model.ts","../src/models/friendRequest.model.ts","../src/models/instructor.model.ts","../src/models/lesson.model.ts","../src/models/userDances.model.ts","../src/models/profileData.model.ts","../src/models/socialMediaLinks.model.ts","../src/models/track.model.ts","../src/models/user.model.ts","../src/models/userAcquaintance.model.ts","../src/models/venue.model.ts","../src/entities/user.entity.ts"],"sourcesContent":["export default class Collection {\r\n constructor(obj: Partial<Collection>) {\r\n Object.assign(this, obj);\r\n }\r\n\r\n name?: string;\r\n dances?: string[];\r\n}","import Track from \"./track.model\";\r\n\r\nexport default class Dance {\r\n constructor(obj: Partial<Dance>) {\r\n Object.assign(this, obj);\r\n }\r\n\r\n _id?: string;\r\n difficulty?: string;\r\n tracks?: Track[] = [];\r\n primaryTrack?: Track;\r\n danceName!: string;\r\n choreographers!: string[];\r\n stepsheet?: string;\r\n}","export default class FriendRequest {\r\n constructor(obj: Partial<FriendRequest>) {\r\n Object.assign(this, obj);\r\n }\r\n\r\n _id?: string;\r\n requester?: string[] = [];\r\n requestee?: string[] = [];\r\n status?: string;\r\n timestamp?: Date;\r\n}","export default class Instructor {\r\n constructor(obj: Partial<Instructor>) {\r\n Object.assign(this, obj);\r\n }\r\n\r\n _id!: string;\r\n name!: string;\r\n}","export default class Lesson {\r\n _id!: string;\r\n venueid!: string;\r\n lessonday!: string;\r\n lessonstart!: string;\r\n instructors!: string[];\r\n duration?: string;\r\n lessoncost?: string;\r\n notes?: string;\r\n difficulty?: string;\r\n}\r\n","export default class UserDances {\r\n\r\n constructor(data: Partial<UserDances> = {}) {\r\n this.favorites = data.favorites ?? [];\r\n this.flagged = data.flagged ?? [];\r\n this.known = data.known ?? [];\r\n this.refresh = data.refresh ?? [];\r\n }\r\n\r\n get all(): string[] {\r\n return [...this.favorites, ...this.flagged, ...this.known, ...this.refresh];\r\n }\r\n\r\n favorites: string[];\r\n flagged: string[];\r\n known: string[];\r\n refresh: string[];\r\n}\r\n","import Collection from \"./collection.model\";\r\nimport SocialMediaLinks from \"./socialMediaLinks.model\";\r\nimport UserDances from \"./userDances.model\";\r\nimport UserAcquaintance from \"./userAcquaintance.model\";\r\n\r\nexport default class ProfileData {\r\n\r\n constructor(data: Partial<ProfileData>) {\r\n this.dances = new UserDances(data.dances);\r\n this.collections = data.collections ?? [];\r\n this.venues = data.venues ?? [];\r\n this.friends = data.friends ?? [];\r\n this.following = data.following ?? [];\r\n this.friendsRequested = data.friendsRequested ?? [];\r\n this.friendRequests = data.friendRequests ?? [];\r\n this.followersCount = data.followersCount ?? 0;\r\n this.links = {};\r\n }\r\n\r\n dances: UserDances;\r\n collections: Collection[];\r\n venues: string[];\r\n friends: UserAcquaintance[];\r\n following: UserAcquaintance[];\r\n friendsRequested: UserAcquaintance[];\r\n friendRequests: UserAcquaintance[];\r\n followersCount: number;\r\n links: SocialMediaLinks;\r\n\r\n\r\n}\r\n","export default class SocialMediaLinks {\r\n facebook?: string;\r\n twitter?: string;\r\n instagram?: string;\r\n linkedin?: string;\r\n youtube?: string;\r\n tiktok?: string;\r\n pinterest?: string;\r\n reddit?: string;\r\n snapchat?: string;\r\n github?: string;\r\n stackoverflow?: string;\r\n dribbble?: string;\r\n behance?: string;\r\n tumblr?: string;\r\n vimeo?: string;\r\n soundcloud?: string;\r\n deviantart?: string;\r\n twitch?: string;\r\n discord?: string;\r\n steam?: string;\r\n wechat?: string;\r\n vk?: string;\r\n website?: string;\r\n};","export default class Track {\r\n constructor(obj: Partial<Track>) {\r\n Object.assign(this, obj);\r\n }\r\n\r\n _id!: string;\r\n isrc!: string;\r\n name!: string;\r\n artists: string[] = [];\r\n duration_ms!: number;\r\n explicit!: boolean;\r\n}\r\n","import ProfileData from \"./profileData.model\";\r\n\r\nexport default class User {\r\n\r\n constructor(data: Partial<User>) {\r\n this._id = data._id ?? '';\r\n this.email = data.email ?? '';\r\n this.name = data.name ?? '';\r\n this.image = data.image;\r\n this.profile = new ProfileData(data?.profile as ProfileData ?? {});\r\n }\r\n\r\n _id!: string;\r\n email!: string;\r\n name!: string;\r\n image?: string;\r\n bio?: string;\r\n profile: ProfileData;\r\n}\r\n","import UserDances from \"./userDances.model\";\r\nimport SocialMediaLinks from \"./socialMediaLinks.model\";\r\nimport Collection from \"./collection.model\";\r\n\r\nexport default class UserAcquaintance {\r\n\r\n constructor(data: Partial<UserAcquaintance>) {\r\n this._id = data._id ?? '';\r\n this.email = data.email ?? '';\r\n this.name = data.name ?? '';\r\n this.image = data.image;\r\n this.dances = new UserDances(data.dances);\r\n this.collections = data.collections ?? [];\r\n this.followersCount = data.followersCount ?? 0;\r\n this.venuesCount = data.venuesCount ?? 0;\r\n this.mutualsCount = data.mutualsCount ?? 0;\r\n this.friends = data.friends ?? [];\r\n this.following = data.following ?? [];\r\n }\r\n\r\n _id!: string;\r\n email!: string;\r\n name!: string;\r\n image?: string;\r\n bio?: string;\r\n\r\n friends: string[];\r\n following: string[];\r\n dances: UserDances;\r\n collections: Collection[];\r\n\r\n followersCount: number;\r\n venuesCount: number;\r\n mutualsCount: number;\r\n\r\n links?: SocialMediaLinks;\r\n}\r\n","import Lesson from \"./lesson.model\";\r\n\r\nexport default class Venue {\r\n constructor(obj: Partial<Venue>) {\r\n Object.assign(this, obj);\r\n }\r\n\r\n _id!: string;\r\n venuename!: string;\r\n venueaddress!: string;\r\n geolocation!: [number, number];\r\n phone?: string;\r\n website?: string;\r\n\r\n // Loaded Data\r\n lessons?: Lesson[];\r\n}","import Collection from \"../models/collection.model\";\r\n\r\nexport default class UserEntity {\r\n\t_id!: string;\r\n\temail!: string;\r\n\tname!: string;\r\n\timage?: any;\r\n\tbio?: string;\r\n\tfavorites?: string[];\r\n\tflagged?: string[];\r\n\tknown?: string[];\r\n\trefresh?: string[];\r\n\tcollections?: Collection[];\r\n\tvenues?: string[];\r\n\tfriends?: string[];\r\n\tfollowing?: string[];\r\n}\r\n"],"names":["Collection","obj","Object","assign","Dance","FriendRequest","Instructor","Lesson","UserDances","data","favorites","_data$favorites","flagged","_data$flagged","known","_data$known","refresh","_data$refresh","_createClass","key","get","concat","ProfileData","dances","collections","_data$collections","venues","_data$venues","friends","_data$friends","following","_data$following","friendsRequested","_data$friendsRequeste","friendRequests","_data$friendRequests","followersCount","_data$followersCount","links","SocialMediaLinks","Track","User","_id","_data$_id","email","_data$email","name","_data$name","image","profile","_data$profile","UserAcquaintance","venuesCount","_data$venuesCount","mutualsCount","_data$mutualsCount","Venue","UserEntity"],"mappings":"IAAqBA,UAAU,GAC3B,SAAAA,WAAYC,GAAwB;EAChCC,MAAM,CAACC,MAAM,CAAC,IAAI,EAAEF,GAAG,CAAC;AAC5B;;ICDiBG,KAAK,GACtB,SAAAA,MAAYH,GAAmB;EAM/B,WAAM,GAAa,EAAE;EALjBC,MAAM,CAACC,MAAM,CAAC,IAAI,EAAEF,GAAG,CAAC;AAC5B,CAAC;;ICLgBI,aAAa,GAC9B,SAAAA,cAAYJ,GAA2B;EAKvC,cAAS,GAAc,EAAE;EACzB,cAAS,GAAc,EAAE;EALrBC,MAAM,CAACC,MAAM,CAAC,IAAI,EAAEF,GAAG,CAAC;AAC5B,CAAC;;ICHgBK,UAAU,GAC3B,SAAAA,WAAYL,GAAwB;EAChCC,MAAM,CAACC,MAAM,CAAC,IAAI,EAAEF,GAAG,CAAC;AAC5B,CAAC;;ICHgBM,MAAM,YAAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;ICANC,UAAU;EAE3B,SAAAA,WAAYC;;QAAAA;MAAAA,OAA4B,EAAE;;IACtC,IAAI,CAACC,SAAS,IAAAC,eAAA,GAAGF,IAAI,CAACC,SAAS,YAAAC,eAAA,GAAI,EAAE;IACrC,IAAI,CAACC,OAAO,IAAAC,aAAA,GAAGJ,IAAI,CAACG,OAAO,YAAAC,aAAA,GAAI,EAAE;IACjC,IAAI,CAACC,KAAK,IAAAC,WAAA,GAAGN,IAAI,CAACK,KAAK,YAAAC,WAAA,GAAI,EAAE;IAC7B,IAAI,CAACC,OAAO,IAAAC,aAAA,GAAGR,IAAI,CAACO,OAAO,YAAAC,aAAA,GAAI,EAAE;;EACpC,OAAAC,YAAA,CAAAV,UAAA;IAAAW,GAAA;IAAAC,GAAA,EAED,SAAAA;MACI,UAAAC,MAAA,CAAW,IAAI,CAACX,SAAS,EAAK,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B,OAAO,YAAAC,aAAA,GAAI,EAAE;EACjC,IAAI,CAACC,SAAS,IAAAC,eAAA,GAAGtB,IAAI,CAACqB,SAAS,YAAAC,eAAA,GAAI,EAAE;AACzC,CAAC;;IChBgByB,KAAK,GACtB,SAAAA,MAAYvD,GAAmB;EAC3BC,MAAM,CAACC,MAAM,CAAC,IAAI,EAAEF,GAAG,CAAC;AAC5B,CAAC;;ICHgBwD,UAAU,YAAAA;;;;"}
@@ -0,0 +1,5 @@
1
+ export default class Collection {
2
+ constructor(obj: Partial<Collection>);
3
+ name?: string;
4
+ dances?: string[];
5
+ }
@@ -0,0 +1,11 @@
1
+ import Track from "./track.model";
2
+ export default class Dance {
3
+ constructor(obj: Partial<Dance>);
4
+ _id?: string;
5
+ difficulty?: string;
6
+ tracks?: Track[];
7
+ primaryTrack?: Track;
8
+ danceName: string;
9
+ choreographers: string[];
10
+ stepsheet?: string;
11
+ }
@@ -0,0 +1,8 @@
1
+ export default class FriendRequest {
2
+ constructor(obj: Partial<FriendRequest>);
3
+ _id?: string;
4
+ requester?: string[];
5
+ requestee?: string[];
6
+ status?: string;
7
+ timestamp?: Date;
8
+ }
@@ -0,0 +1,5 @@
1
+ export default class Instructor {
2
+ constructor(obj: Partial<Instructor>);
3
+ _id: string;
4
+ name: string;
5
+ }
@@ -0,0 +1,11 @@
1
+ export default class Lesson {
2
+ _id: string;
3
+ venueid: string;
4
+ lessonday: string;
5
+ lessonstart: string;
6
+ instructors: string[];
7
+ duration?: string;
8
+ lessoncost?: string;
9
+ notes?: string;
10
+ difficulty?: string;
11
+ }
@@ -0,0 +1,16 @@
1
+ import Collection from "./collection.model";
2
+ import SocialMediaLinks from "./socialMediaLinks.model";
3
+ import UserDances from "./userDances.model";
4
+ import UserAcquaintance from "./userAcquaintance.model";
5
+ export default class ProfileData {
6
+ constructor(data: Partial<ProfileData>);
7
+ dances: UserDances;
8
+ collections: Collection[];
9
+ venues: string[];
10
+ friends: UserAcquaintance[];
11
+ following: UserAcquaintance[];
12
+ friendsRequested: UserAcquaintance[];
13
+ friendRequests: UserAcquaintance[];
14
+ followersCount: number;
15
+ links: SocialMediaLinks;
16
+ }
@@ -0,0 +1,25 @@
1
+ export default class SocialMediaLinks {
2
+ facebook?: string;
3
+ twitter?: string;
4
+ instagram?: string;
5
+ linkedin?: string;
6
+ youtube?: string;
7
+ tiktok?: string;
8
+ pinterest?: string;
9
+ reddit?: string;
10
+ snapchat?: string;
11
+ github?: string;
12
+ stackoverflow?: string;
13
+ dribbble?: string;
14
+ behance?: string;
15
+ tumblr?: string;
16
+ vimeo?: string;
17
+ soundcloud?: string;
18
+ deviantart?: string;
19
+ twitch?: string;
20
+ discord?: string;
21
+ steam?: string;
22
+ wechat?: string;
23
+ vk?: string;
24
+ website?: string;
25
+ }
@@ -0,0 +1,9 @@
1
+ export default class Track {
2
+ constructor(obj: Partial<Track>);
3
+ _id: string;
4
+ isrc: string;
5
+ name: string;
6
+ artists: string[];
7
+ duration_ms: number;
8
+ explicit: boolean;
9
+ }
@@ -0,0 +1,10 @@
1
+ import ProfileData from "./profileData.model";
2
+ export default class User {
3
+ constructor(data: Partial<User>);
4
+ _id: string;
5
+ email: string;
6
+ name: string;
7
+ image?: string;
8
+ bio?: string;
9
+ profile: ProfileData;
10
+ }
@@ -0,0 +1,19 @@
1
+ import UserDances from "./userDances.model";
2
+ import SocialMediaLinks from "./socialMediaLinks.model";
3
+ import Collection from "./collection.model";
4
+ export default class UserAcquaintance {
5
+ constructor(data: Partial<UserAcquaintance>);
6
+ _id: string;
7
+ email: string;
8
+ name: string;
9
+ image?: string;
10
+ bio?: string;
11
+ friends: string[];
12
+ following: string[];
13
+ dances: UserDances;
14
+ collections: Collection[];
15
+ followersCount: number;
16
+ venuesCount: number;
17
+ mutualsCount: number;
18
+ links?: SocialMediaLinks;
19
+ }
@@ -0,0 +1,8 @@
1
+ export default class UserDances {
2
+ constructor(data?: Partial<UserDances>);
3
+ get all(): string[];
4
+ favorites: string[];
5
+ flagged: string[];
6
+ known: string[];
7
+ refresh: string[];
8
+ }
@@ -0,0 +1,11 @@
1
+ import Lesson from "./lesson.model";
2
+ export default class Venue {
3
+ constructor(obj: Partial<Venue>);
4
+ _id: string;
5
+ venuename: string;
6
+ venueaddress: string;
7
+ geolocation: [number, number];
8
+ phone?: string;
9
+ website?: string;
10
+ lessons?: Lesson[];
11
+ }
package/package.json ADDED
@@ -0,0 +1,55 @@
1
+ {
2
+ "version": "0.1.0",
3
+ "license": "MIT",
4
+ "main": "dist/index.js",
5
+ "typings": "dist/index.d.ts",
6
+ "files": [
7
+ "dist",
8
+ "src"
9
+ ],
10
+ "engines": {
11
+ "node": ">=10"
12
+ },
13
+ "scripts": {
14
+ "start": "tsdx watch",
15
+ "build": "tsdx build",
16
+ "test": "tsdx test",
17
+ "lint": "tsdx lint",
18
+ "prepare": "tsdx build",
19
+ "size": "size-limit",
20
+ "analyze": "size-limit --why"
21
+ },
22
+ "peerDependencies": {},
23
+ "husky": {
24
+ "hooks": {
25
+ "pre-commit": "tsdx lint"
26
+ }
27
+ },
28
+ "prettier": {
29
+ "printWidth": 80,
30
+ "semi": true,
31
+ "singleQuote": true,
32
+ "trailingComma": "es5"
33
+ },
34
+ "name": "ldco-contract",
35
+ "author": "Stephen Wike",
36
+ "module": "dist/contract.esm.js",
37
+ "size-limit": [
38
+ {
39
+ "path": "dist/contract.cjs.production.min.js",
40
+ "limit": "10 KB"
41
+ },
42
+ {
43
+ "path": "dist/contract.esm.js",
44
+ "limit": "10 KB"
45
+ }
46
+ ],
47
+ "devDependencies": {
48
+ "@size-limit/preset-small-lib": "^11.1.6",
49
+ "husky": "^9.1.7",
50
+ "size-limit": "^11.1.6",
51
+ "tsdx": "^0.14.1",
52
+ "tslib": "^2.8.1",
53
+ "typescript": "^5.7.3"
54
+ }
55
+ }
@@ -0,0 +1,17 @@
1
+ import Collection from "../models/collection.model";
2
+
3
+ export default class UserEntity {
4
+ _id!: string;
5
+ email!: string;
6
+ name!: string;
7
+ image?: any;
8
+ bio?: string;
9
+ favorites?: string[];
10
+ flagged?: string[];
11
+ known?: string[];
12
+ refresh?: string[];
13
+ collections?: Collection[];
14
+ venues?: string[];
15
+ friends?: string[];
16
+ following?: string[];
17
+ }
package/src/index.ts ADDED
@@ -0,0 +1,14 @@
1
+ export { default as Collection } from './models/collection.model';
2
+ export { default as Dance } from './models/dance.model';
3
+ export { default as FriendRequest } from './models/friendRequest.model';
4
+ export { default as Instructor } from './models/instructor.model';
5
+ export { default as Lesson } from './models/lesson.model';
6
+ export { default as ProfileData } from './models/profileData.model';
7
+ export { default as SocialMediaLinks } from './models/socialMediaLinks.model';
8
+ export { default as Track } from './models/track.model';
9
+ export { default as User } from './models/user.model';
10
+ export { default as UserAcquaintance } from './models/userAcquaintance.model';
11
+ export { default as UserDances } from './models/userDances.model';
12
+ export { default as Venue } from './models/venue.model';
13
+
14
+ export { default as UserEntity } from './entities/user.entity';
@@ -0,0 +1,8 @@
1
+ export default class Collection {
2
+ constructor(obj: Partial<Collection>) {
3
+ Object.assign(this, obj);
4
+ }
5
+
6
+ name?: string;
7
+ dances?: string[];
8
+ }
@@ -0,0 +1,15 @@
1
+ import Track from "./track.model";
2
+
3
+ export default class Dance {
4
+ constructor(obj: Partial<Dance>) {
5
+ Object.assign(this, obj);
6
+ }
7
+
8
+ _id?: string;
9
+ difficulty?: string;
10
+ tracks?: Track[] = [];
11
+ primaryTrack?: Track;
12
+ danceName!: string;
13
+ choreographers!: string[];
14
+ stepsheet?: string;
15
+ }
@@ -0,0 +1,11 @@
1
+ export default class FriendRequest {
2
+ constructor(obj: Partial<FriendRequest>) {
3
+ Object.assign(this, obj);
4
+ }
5
+
6
+ _id?: string;
7
+ requester?: string[] = [];
8
+ requestee?: string[] = [];
9
+ status?: string;
10
+ timestamp?: Date;
11
+ }
@@ -0,0 +1,8 @@
1
+ export default class Instructor {
2
+ constructor(obj: Partial<Instructor>) {
3
+ Object.assign(this, obj);
4
+ }
5
+
6
+ _id!: string;
7
+ name!: string;
8
+ }
@@ -0,0 +1,11 @@
1
+ export default class Lesson {
2
+ _id!: string;
3
+ venueid!: string;
4
+ lessonday!: string;
5
+ lessonstart!: string;
6
+ instructors!: string[];
7
+ duration?: string;
8
+ lessoncost?: string;
9
+ notes?: string;
10
+ difficulty?: string;
11
+ }
@@ -0,0 +1,31 @@
1
+ import Collection from "./collection.model";
2
+ import SocialMediaLinks from "./socialMediaLinks.model";
3
+ import UserDances from "./userDances.model";
4
+ import UserAcquaintance from "./userAcquaintance.model";
5
+
6
+ export default class ProfileData {
7
+
8
+ constructor(data: Partial<ProfileData>) {
9
+ this.dances = new UserDances(data.dances);
10
+ this.collections = data.collections ?? [];
11
+ this.venues = data.venues ?? [];
12
+ this.friends = data.friends ?? [];
13
+ this.following = data.following ?? [];
14
+ this.friendsRequested = data.friendsRequested ?? [];
15
+ this.friendRequests = data.friendRequests ?? [];
16
+ this.followersCount = data.followersCount ?? 0;
17
+ this.links = {};
18
+ }
19
+
20
+ dances: UserDances;
21
+ collections: Collection[];
22
+ venues: string[];
23
+ friends: UserAcquaintance[];
24
+ following: UserAcquaintance[];
25
+ friendsRequested: UserAcquaintance[];
26
+ friendRequests: UserAcquaintance[];
27
+ followersCount: number;
28
+ links: SocialMediaLinks;
29
+
30
+
31
+ }
@@ -0,0 +1,25 @@
1
+ export default class SocialMediaLinks {
2
+ facebook?: string;
3
+ twitter?: string;
4
+ instagram?: string;
5
+ linkedin?: string;
6
+ youtube?: string;
7
+ tiktok?: string;
8
+ pinterest?: string;
9
+ reddit?: string;
10
+ snapchat?: string;
11
+ github?: string;
12
+ stackoverflow?: string;
13
+ dribbble?: string;
14
+ behance?: string;
15
+ tumblr?: string;
16
+ vimeo?: string;
17
+ soundcloud?: string;
18
+ deviantart?: string;
19
+ twitch?: string;
20
+ discord?: string;
21
+ steam?: string;
22
+ wechat?: string;
23
+ vk?: string;
24
+ website?: string;
25
+ };
@@ -0,0 +1,12 @@
1
+ export default class Track {
2
+ constructor(obj: Partial<Track>) {
3
+ Object.assign(this, obj);
4
+ }
5
+
6
+ _id!: string;
7
+ isrc!: string;
8
+ name!: string;
9
+ artists: string[] = [];
10
+ duration_ms!: number;
11
+ explicit!: boolean;
12
+ }
@@ -0,0 +1,19 @@
1
+ import ProfileData from "./profileData.model";
2
+
3
+ export default class User {
4
+
5
+ constructor(data: Partial<User>) {
6
+ this._id = data._id ?? '';
7
+ this.email = data.email ?? '';
8
+ this.name = data.name ?? '';
9
+ this.image = data.image;
10
+ this.profile = new ProfileData(data?.profile as ProfileData ?? {});
11
+ }
12
+
13
+ _id!: string;
14
+ email!: string;
15
+ name!: string;
16
+ image?: string;
17
+ bio?: string;
18
+ profile: ProfileData;
19
+ }
@@ -0,0 +1,37 @@
1
+ import UserDances from "./userDances.model";
2
+ import SocialMediaLinks from "./socialMediaLinks.model";
3
+ import Collection from "./collection.model";
4
+
5
+ export default class UserAcquaintance {
6
+
7
+ constructor(data: Partial<UserAcquaintance>) {
8
+ this._id = data._id ?? '';
9
+ this.email = data.email ?? '';
10
+ this.name = data.name ?? '';
11
+ this.image = data.image;
12
+ this.dances = new UserDances(data.dances);
13
+ this.collections = data.collections ?? [];
14
+ this.followersCount = data.followersCount ?? 0;
15
+ this.venuesCount = data.venuesCount ?? 0;
16
+ this.mutualsCount = data.mutualsCount ?? 0;
17
+ this.friends = data.friends ?? [];
18
+ this.following = data.following ?? [];
19
+ }
20
+
21
+ _id!: string;
22
+ email!: string;
23
+ name!: string;
24
+ image?: string;
25
+ bio?: string;
26
+
27
+ friends: string[];
28
+ following: string[];
29
+ dances: UserDances;
30
+ collections: Collection[];
31
+
32
+ followersCount: number;
33
+ venuesCount: number;
34
+ mutualsCount: number;
35
+
36
+ links?: SocialMediaLinks;
37
+ }
@@ -0,0 +1,18 @@
1
+ export default class UserDances {
2
+
3
+ constructor(data: Partial<UserDances> = {}) {
4
+ this.favorites = data.favorites ?? [];
5
+ this.flagged = data.flagged ?? [];
6
+ this.known = data.known ?? [];
7
+ this.refresh = data.refresh ?? [];
8
+ }
9
+
10
+ get all(): string[] {
11
+ return [...this.favorites, ...this.flagged, ...this.known, ...this.refresh];
12
+ }
13
+
14
+ favorites: string[];
15
+ flagged: string[];
16
+ known: string[];
17
+ refresh: string[];
18
+ }
@@ -0,0 +1,17 @@
1
+ import Lesson from "./lesson.model";
2
+
3
+ export default class Venue {
4
+ constructor(obj: Partial<Venue>) {
5
+ Object.assign(this, obj);
6
+ }
7
+
8
+ _id!: string;
9
+ venuename!: string;
10
+ venueaddress!: string;
11
+ geolocation!: [number, number];
12
+ phone?: string;
13
+ website?: string;
14
+
15
+ // Loaded Data
16
+ lessons?: Lesson[];
17
+ }