jp.db.schemas 2.2.0 → 2.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (75) hide show
  1. package/dist/index.d.ts +8 -6
  2. package/dist/index.d.ts.map +1 -1
  3. package/dist/index.js +10 -6
  4. package/dist/index.js.map +1 -1
  5. package/dist/models/account-type.enum.d.ts +9 -0
  6. package/dist/models/account-type.enum.d.ts.map +1 -0
  7. package/dist/models/account-type.enum.js +13 -0
  8. package/dist/models/account-type.enum.js.map +1 -0
  9. package/dist/models/users-balance-reason.enum.d.ts +9 -0
  10. package/dist/models/users-balance-reason.enum.d.ts.map +1 -0
  11. package/dist/models/users-balance-reason.enum.js +13 -0
  12. package/dist/models/users-balance-reason.enum.js.map +1 -0
  13. package/dist/repositories/index.d.ts +3 -2
  14. package/dist/repositories/index.d.ts.map +1 -1
  15. package/dist/repositories/index.js +5 -3
  16. package/dist/repositories/index.js.map +1 -1
  17. package/dist/repositories/settings-options.repository.d.ts +1 -1
  18. package/dist/repositories/settings-options.repository.d.ts.map +1 -1
  19. package/dist/repositories/settings-options.repository.js +2 -5
  20. package/dist/repositories/settings-options.repository.js.map +1 -1
  21. package/dist/repositories/users-achievements.repository.d.ts +10 -0
  22. package/dist/repositories/users-achievements.repository.d.ts.map +1 -0
  23. package/dist/repositories/users-achievements.repository.js +52 -0
  24. package/dist/repositories/users-achievements.repository.js.map +1 -0
  25. package/dist/repositories/users-balances.repository.d.ts +11 -0
  26. package/dist/repositories/users-balances.repository.d.ts.map +1 -0
  27. package/dist/repositories/users-balances.repository.js +44 -0
  28. package/dist/repositories/users-balances.repository.js.map +1 -0
  29. package/dist/schemas/setting.schema.d.ts +30 -0
  30. package/dist/schemas/setting.schema.d.ts.map +1 -1
  31. package/dist/schemas/setting.schema.js +12 -0
  32. package/dist/schemas/setting.schema.js.map +1 -1
  33. package/dist/schemas/settings_option.schema.d.ts +20 -0
  34. package/dist/schemas/settings_option.schema.d.ts.map +1 -1
  35. package/dist/schemas/settings_option.schema.js +8 -0
  36. package/dist/schemas/settings_option.schema.js.map +1 -1
  37. package/dist/schemas/user.schema.d.ts +40 -63
  38. package/dist/schemas/user.schema.d.ts.map +1 -1
  39. package/dist/schemas/user.schema.js +72 -21
  40. package/dist/schemas/user.schema.js.map +1 -1
  41. package/dist/schemas/users_achievement.schema.d.ts +115 -0
  42. package/dist/schemas/users_achievement.schema.d.ts.map +1 -0
  43. package/dist/schemas/users_achievement.schema.js +61 -0
  44. package/dist/schemas/users_achievement.schema.js.map +1 -0
  45. package/dist/schemas/users_balance.schema.d.ts +95 -0
  46. package/dist/schemas/users_balance.schema.d.ts.map +1 -0
  47. package/dist/schemas/{balance_history.schema.js → users_balance.schema.js} +18 -22
  48. package/dist/schemas/users_balance.schema.js.map +1 -0
  49. package/package.json +1 -1
  50. package/src/index.ts +14 -7
  51. package/src/models/account-type.enum.ts +8 -0
  52. package/src/models/users-balance-reason.enum.ts +8 -0
  53. package/src/repositories/index.ts +4 -2
  54. package/src/repositories/settings-options.repository.ts +2 -4
  55. package/src/repositories/users-achievements.repository.ts +43 -0
  56. package/src/repositories/users-balances.repository.ts +28 -0
  57. package/src/schemas/setting.schema.ts +9 -0
  58. package/src/schemas/settings_option.schema.ts +6 -0
  59. package/src/schemas/user.schema.ts +58 -89
  60. package/src/schemas/users_achievement.schema.ts +40 -0
  61. package/src/schemas/users_balance.schema.ts +34 -0
  62. package/dist/models/activity-log-user-login.interface copy.d.ts +0 -11
  63. package/dist/models/activity-log-user-login.interface copy.d.ts.map +0 -1
  64. package/dist/models/activity-log-user-login.interface copy.js +0 -3
  65. package/dist/models/activity-log-user-login.interface copy.js.map +0 -1
  66. package/dist/repositories/balance-history.repository.d.ts +0 -8
  67. package/dist/repositories/balance-history.repository.d.ts.map +0 -1
  68. package/dist/repositories/balance-history.repository.js +0 -34
  69. package/dist/repositories/balance-history.repository.js.map +0 -1
  70. package/dist/schemas/balance_history.schema.d.ts +0 -105
  71. package/dist/schemas/balance_history.schema.d.ts.map +0 -1
  72. package/dist/schemas/balance_history.schema.js.map +0 -1
  73. package/src/models/activity-log-user-login.interface copy.ts +0 -10
  74. package/src/repositories/balance-history.repository.ts +0 -15
  75. package/src/schemas/balance_history.schema.ts +0 -37
@@ -9,6 +9,8 @@ export declare class SettingsOption {
9
9
  payd?: boolean;
10
10
  code: string;
11
11
  productId?: string;
12
+ premium?: boolean;
13
+ platformAvatar?: boolean;
12
14
  }
13
15
  export declare const SettingsOptionSchema: import("mongoose").Schema<SettingsOption, import("mongoose").Model<SettingsOption, any, any, any, (Document<unknown, any, SettingsOption, any, import("mongoose").DefaultSchemaOptions> & SettingsOption & {
14
16
  _id: import("mongoose").Types.ObjectId;
@@ -101,5 +103,23 @@ export declare const SettingsOptionSchema: import("mongoose").Schema<SettingsOpt
101
103
  }, "id"> & {
102
104
  id: string;
103
105
  }>;
106
+ premium?: import("mongoose").SchemaDefinitionProperty<boolean, SettingsOption, Document<unknown, {}, SettingsOption, {
107
+ id: string;
108
+ }, import("mongoose").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & Omit<SettingsOption & {
109
+ _id: import("mongoose").Types.ObjectId;
110
+ } & {
111
+ __v: number;
112
+ }, "id"> & {
113
+ id: string;
114
+ }>;
115
+ platformAvatar?: import("mongoose").SchemaDefinitionProperty<boolean, SettingsOption, Document<unknown, {}, SettingsOption, {
116
+ id: string;
117
+ }, import("mongoose").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & Omit<SettingsOption & {
118
+ _id: import("mongoose").Types.ObjectId;
119
+ } & {
120
+ __v: number;
121
+ }, "id"> & {
122
+ id: string;
123
+ }>;
104
124
  }, SettingsOption>;
105
125
  //# sourceMappingURL=settings_option.schema.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"settings_option.schema.d.ts","sourceRoot":"","sources":["../../src/schemas/settings_option.schema.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,gBAAgB,E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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAA+C,CAAC"}
@@ -50,6 +50,14 @@ __decorate([
50
50
  (0, mongoose_1.Prop)(),
51
51
  __metadata("design:type", String)
52
52
  ], SettingsOption.prototype, "productId", void 0);
53
+ __decorate([
54
+ (0, mongoose_1.Prop)(),
55
+ __metadata("design:type", Boolean)
56
+ ], SettingsOption.prototype, "premium", void 0);
57
+ __decorate([
58
+ (0, mongoose_1.Prop)(),
59
+ __metadata("design:type", Boolean)
60
+ ], SettingsOption.prototype, "platformAvatar", void 0);
53
61
  exports.SettingsOption = SettingsOption = __decorate([
54
62
  (0, mongoose_1.Schema)({ collection: 'settings_options' })
55
63
  ], SettingsOption);
@@ -1 +1 @@
1
- {"version":3,"file":"settings_option.schema.js","sourceRoot":"","sources":["../../src/schemas/settings_option.schema.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+CAAwE;AAMjE,IAAM,cAAc,GAApB,MAAM,cAAc;CA4B1B,CAAA;AA5BY,wCAAc;AAMd;IALR,IAAA,kBAAO,EAAC;QACL,GAAG,EAAE;YACD,OAAO,IAAI,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC;QAC/B,CAAC;KACJ,CAAC;;uDAC+B;AAGjC;IADC,IAAA,eAAI,GAAE;;4CACM;AAGb;IADC,IAAA,eAAI,GAAE;;gDACU;AAGjB;IADC,IAAA,eAAI,GAAE;;6CACO;AAGd;IADC,IAAA,eAAI,GAAE;;+CACS;AAGhB;IADC,IAAA,eAAI,GAAE;;4CACQ;AAGf;IADC,IAAA,eAAI,GAAE;;4CACM;AAGb;IADC,IAAA,eAAI,GAAE;;iDACY;yBA3BV,cAAc;IAD1B,IAAA,iBAAM,EAAC,EAAE,UAAU,EAAE,kBAAkB,EAAE,CAAC;GAC9B,cAAc,CA4B1B;AAEY,QAAA,oBAAoB,GAAG,wBAAa,CAAC,cAAc,CAAC,cAAc,CAAC,CAAC"}
1
+ {"version":3,"file":"settings_option.schema.js","sourceRoot":"","sources":["../../src/schemas/settings_option.schema.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+CAAwE;AAMjE,IAAM,cAAc,GAApB,MAAM,cAAc;CAkC1B,CAAA;AAlCY,wCAAc;AAMd;IALR,IAAA,kBAAO,EAAC;QACL,GAAG,EAAE;YACD,OAAO,IAAI,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC;QAC/B,CAAC;KACJ,CAAC;;uDAC+B;AAGjC;IADC,IAAA,eAAI,GAAE;;4CACM;AAGb;IADC,IAAA,eAAI,GAAE;;gDACU;AAGjB;IADC,IAAA,eAAI,GAAE;;6CACO;AAGd;IADC,IAAA,eAAI,GAAE;;+CACS;AAGhB;IADC,IAAA,eAAI,GAAE;;4CACQ;AAGf;IADC,IAAA,eAAI,GAAE;;4CACM;AAGb;IADC,IAAA,eAAI,GAAE;;iDACY;AAGnB;IADC,IAAA,eAAI,GAAE;;+CACW;AAGlB;IADC,IAAA,eAAI,GAAE;;sDACkB;yBAjChB,cAAc;IAD1B,IAAA,iBAAM,EAAC,EAAE,UAAU,EAAE,kBAAkB,EAAE,CAAC;GAC9B,cAAc,CAkC1B;AAEY,QAAA,oBAAoB,GAAG,wBAAa,CAAC,cAAc,CAAC,cAAc,CAAC,CAAC"}
@@ -6,57 +6,16 @@ import { TGUser } from './user.tg.schema';
6
6
  import { GoogleUser } from './user.google.schema';
7
7
  import { FBUser } from './user.fb.schema';
8
8
  export type UserDocument = HydratedDocument<User>;
9
- export type IUserWinnerRating = {
10
- month: string;
11
- rank: number;
12
- profit: number;
13
- };
14
- export type IUserFriend = {
15
- userIdWhoAdded: string;
16
- addedUserId: string;
17
- friendId: string;
18
- confirmed: boolean;
19
- channelId: string;
20
- lastVisitChannel?: Date;
21
- };
22
- export type ILastLogin = {
23
- lastLoginClientVersion: string;
24
- lastLoginClientChannel: string;
25
- lastLoginClientDevice: string;
26
- lastLoginClientOS: string;
27
- lastLoginClientBrowser: string;
28
- lastLoginClientDeviceWidth: number;
29
- lastLoginClientDeviceHeight: number;
30
- lastLoginClientIsMobile: boolean;
31
- };
32
- export type IGameStatistics = {
33
- gamesPlayed: number;
34
- gamesWon: number;
35
- gamesTheBestSet: number;
36
- gamesMaxProfit: number;
37
- earnProfitCount: number;
38
- winSharksCount: number;
39
- fastTournamentsWonCount: number;
40
- allInWinCount: number;
41
- watchedAdvRewardCount: number;
42
- textedMessagesCount: number;
43
- sentReactionsCount: number;
44
- setTwoPairCount: number;
45
- setThreeOfAKind: number;
46
- setStraightCount: number;
47
- setFlushCount: number;
48
- setFullHouseCount: number;
49
- setFourOfAKindCount: number;
50
- setStraightFlushCount: number;
51
- };
52
9
  export declare class User {
53
10
  readonly userId: string;
54
11
  fullName: string;
55
12
  balance: number;
56
13
  avatarUrl: string;
14
+ registerDate: Date;
57
15
  premiumExpired: Date;
58
16
  fullNameAlias: string;
59
17
  avatarAliasUrl: string;
18
+ avatar: string;
60
19
  theme: string;
61
20
  language: string;
62
21
  avatarFrame: string;
@@ -65,19 +24,19 @@ export declare class User {
65
24
  bgPattern: string;
66
25
  roomTable: string;
67
26
  colorSchema: string;
27
+ experience: number;
28
+ level: number;
68
29
  vkUser?: VKUser;
69
30
  okUser?: OKUser;
70
31
  yaUser?: YAUser;
71
32
  googleUser?: GoogleUser;
72
33
  fbUser?: FBUser;
73
34
  tgUser?: TGUser;
74
- experience: number;
75
- level: number;
76
- registerDate: Date;
77
- friends: Array<IUserFriend>;
78
- achievements: Array<string>;
79
- hasAchievement(achievementCode: string): boolean;
80
- hasNoAchievement(achievementCode: string): boolean;
35
+ readonly hasPremiumAccount: string;
36
+ readonly publicFullName: string;
37
+ readonly publicAvatarUrl: string;
38
+ readonly accountType: string;
39
+ readonly isGuest: string;
81
40
  }
82
41
  export declare const UserSchema: import("mongoose").Schema<User, import("mongoose").Model<User, any, any, any, (Document<unknown, any, User, any, import("mongoose").DefaultSchemaOptions> & User & {
83
42
  _id: import("mongoose").Types.ObjectId;
@@ -134,6 +93,15 @@ export declare const UserSchema: import("mongoose").Schema<User, import("mongoos
134
93
  }, "id"> & {
135
94
  id: string;
136
95
  }>;
96
+ registerDate?: import("mongoose").SchemaDefinitionProperty<Date, User, Document<unknown, {}, User, {
97
+ id: string;
98
+ }, import("mongoose").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & Omit<User & {
99
+ _id: import("mongoose").Types.ObjectId;
100
+ } & {
101
+ __v: number;
102
+ }, "id"> & {
103
+ id: string;
104
+ }>;
137
105
  premiumExpired?: import("mongoose").SchemaDefinitionProperty<Date, User, Document<unknown, {}, User, {
138
106
  id: string;
139
107
  }, import("mongoose").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & Omit<User & {
@@ -161,6 +129,15 @@ export declare const UserSchema: import("mongoose").Schema<User, import("mongoos
161
129
  }, "id"> & {
162
130
  id: string;
163
131
  }>;
132
+ avatar?: import("mongoose").SchemaDefinitionProperty<string, User, Document<unknown, {}, User, {
133
+ id: string;
134
+ }, import("mongoose").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & Omit<User & {
135
+ _id: import("mongoose").Types.ObjectId;
136
+ } & {
137
+ __v: number;
138
+ }, "id"> & {
139
+ id: string;
140
+ }>;
164
141
  theme?: import("mongoose").SchemaDefinitionProperty<string, User, Document<unknown, {}, User, {
165
142
  id: string;
166
143
  }, import("mongoose").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & Omit<User & {
@@ -233,7 +210,7 @@ export declare const UserSchema: import("mongoose").Schema<User, import("mongoos
233
210
  }, "id"> & {
234
211
  id: string;
235
212
  }>;
236
- vkUser?: import("mongoose").SchemaDefinitionProperty<VKUser, User, Document<unknown, {}, User, {
213
+ experience?: import("mongoose").SchemaDefinitionProperty<number, User, Document<unknown, {}, User, {
237
214
  id: string;
238
215
  }, import("mongoose").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & Omit<User & {
239
216
  _id: import("mongoose").Types.ObjectId;
@@ -242,7 +219,7 @@ export declare const UserSchema: import("mongoose").Schema<User, import("mongoos
242
219
  }, "id"> & {
243
220
  id: string;
244
221
  }>;
245
- okUser?: import("mongoose").SchemaDefinitionProperty<OKUser, User, Document<unknown, {}, User, {
222
+ level?: import("mongoose").SchemaDefinitionProperty<number, User, Document<unknown, {}, User, {
246
223
  id: string;
247
224
  }, import("mongoose").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & Omit<User & {
248
225
  _id: import("mongoose").Types.ObjectId;
@@ -251,7 +228,7 @@ export declare const UserSchema: import("mongoose").Schema<User, import("mongoos
251
228
  }, "id"> & {
252
229
  id: string;
253
230
  }>;
254
- yaUser?: import("mongoose").SchemaDefinitionProperty<YAUser, User, Document<unknown, {}, User, {
231
+ vkUser?: import("mongoose").SchemaDefinitionProperty<VKUser, User, Document<unknown, {}, User, {
255
232
  id: string;
256
233
  }, import("mongoose").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & Omit<User & {
257
234
  _id: import("mongoose").Types.ObjectId;
@@ -260,7 +237,7 @@ export declare const UserSchema: import("mongoose").Schema<User, import("mongoos
260
237
  }, "id"> & {
261
238
  id: string;
262
239
  }>;
263
- googleUser?: import("mongoose").SchemaDefinitionProperty<GoogleUser, User, Document<unknown, {}, User, {
240
+ okUser?: import("mongoose").SchemaDefinitionProperty<OKUser, User, Document<unknown, {}, User, {
264
241
  id: string;
265
242
  }, import("mongoose").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & Omit<User & {
266
243
  _id: import("mongoose").Types.ObjectId;
@@ -269,7 +246,7 @@ export declare const UserSchema: import("mongoose").Schema<User, import("mongoos
269
246
  }, "id"> & {
270
247
  id: string;
271
248
  }>;
272
- fbUser?: import("mongoose").SchemaDefinitionProperty<FBUser, User, Document<unknown, {}, User, {
249
+ yaUser?: import("mongoose").SchemaDefinitionProperty<YAUser, User, Document<unknown, {}, User, {
273
250
  id: string;
274
251
  }, import("mongoose").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & Omit<User & {
275
252
  _id: import("mongoose").Types.ObjectId;
@@ -278,7 +255,7 @@ export declare const UserSchema: import("mongoose").Schema<User, import("mongoos
278
255
  }, "id"> & {
279
256
  id: string;
280
257
  }>;
281
- tgUser?: import("mongoose").SchemaDefinitionProperty<TGUser, User, Document<unknown, {}, User, {
258
+ googleUser?: import("mongoose").SchemaDefinitionProperty<GoogleUser, User, Document<unknown, {}, User, {
282
259
  id: string;
283
260
  }, import("mongoose").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & Omit<User & {
284
261
  _id: import("mongoose").Types.ObjectId;
@@ -287,7 +264,7 @@ export declare const UserSchema: import("mongoose").Schema<User, import("mongoos
287
264
  }, "id"> & {
288
265
  id: string;
289
266
  }>;
290
- experience?: import("mongoose").SchemaDefinitionProperty<number, User, Document<unknown, {}, User, {
267
+ fbUser?: import("mongoose").SchemaDefinitionProperty<FBUser, User, Document<unknown, {}, User, {
291
268
  id: string;
292
269
  }, import("mongoose").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & Omit<User & {
293
270
  _id: import("mongoose").Types.ObjectId;
@@ -296,7 +273,7 @@ export declare const UserSchema: import("mongoose").Schema<User, import("mongoos
296
273
  }, "id"> & {
297
274
  id: string;
298
275
  }>;
299
- level?: import("mongoose").SchemaDefinitionProperty<number, User, Document<unknown, {}, User, {
276
+ tgUser?: import("mongoose").SchemaDefinitionProperty<TGUser, User, Document<unknown, {}, User, {
300
277
  id: string;
301
278
  }, import("mongoose").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & Omit<User & {
302
279
  _id: import("mongoose").Types.ObjectId;
@@ -305,7 +282,7 @@ export declare const UserSchema: import("mongoose").Schema<User, import("mongoos
305
282
  }, "id"> & {
306
283
  id: string;
307
284
  }>;
308
- registerDate?: import("mongoose").SchemaDefinitionProperty<Date, User, Document<unknown, {}, User, {
285
+ readonly hasPremiumAccount?: import("mongoose").SchemaDefinitionProperty<string, User, Document<unknown, {}, User, {
309
286
  id: string;
310
287
  }, import("mongoose").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & Omit<User & {
311
288
  _id: import("mongoose").Types.ObjectId;
@@ -314,7 +291,7 @@ export declare const UserSchema: import("mongoose").Schema<User, import("mongoos
314
291
  }, "id"> & {
315
292
  id: string;
316
293
  }>;
317
- friends?: import("mongoose").SchemaDefinitionProperty<IUserFriend[], User, Document<unknown, {}, User, {
294
+ readonly publicFullName?: import("mongoose").SchemaDefinitionProperty<string, User, Document<unknown, {}, User, {
318
295
  id: string;
319
296
  }, import("mongoose").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & Omit<User & {
320
297
  _id: import("mongoose").Types.ObjectId;
@@ -323,7 +300,7 @@ export declare const UserSchema: import("mongoose").Schema<User, import("mongoos
323
300
  }, "id"> & {
324
301
  id: string;
325
302
  }>;
326
- achievements?: import("mongoose").SchemaDefinitionProperty<string[], User, Document<unknown, {}, User, {
303
+ readonly publicAvatarUrl?: import("mongoose").SchemaDefinitionProperty<string, User, Document<unknown, {}, User, {
327
304
  id: string;
328
305
  }, import("mongoose").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & Omit<User & {
329
306
  _id: import("mongoose").Types.ObjectId;
@@ -332,7 +309,7 @@ export declare const UserSchema: import("mongoose").Schema<User, import("mongoos
332
309
  }, "id"> & {
333
310
  id: string;
334
311
  }>;
335
- hasAchievement?: import("mongoose").SchemaDefinitionProperty<(achievementCode: string) => boolean, User, Document<unknown, {}, User, {
312
+ readonly accountType?: import("mongoose").SchemaDefinitionProperty<string, User, Document<unknown, {}, User, {
336
313
  id: string;
337
314
  }, import("mongoose").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & Omit<User & {
338
315
  _id: import("mongoose").Types.ObjectId;
@@ -341,7 +318,7 @@ export declare const UserSchema: import("mongoose").Schema<User, import("mongoos
341
318
  }, "id"> & {
342
319
  id: string;
343
320
  }>;
344
- hasNoAchievement?: import("mongoose").SchemaDefinitionProperty<(achievementCode: string) => boolean, User, Document<unknown, {}, User, {
321
+ readonly isGuest?: import("mongoose").SchemaDefinitionProperty<string, User, Document<unknown, {}, User, {
345
322
  id: string;
346
323
  }, import("mongoose").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & Omit<User & {
347
324
  _id: import("mongoose").Types.ObjectId;
@@ -1 +1 @@
1
- {"version":3,"file":"user.schema.d.ts","sourceRoot":"","sources":["../../src/schemas/user.schema.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAEtD,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAE1C,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAE1C,MAAM,MAAM,YAAY,GAAG,gBAAgB,CAAC,IAAI,CAAC,CAAC;AAElD,MAAM,MAAM,iBAAiB,GAAG;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;CAClB,CAAA;AAED,MAAM,MAAM,WAAW,GAAG;IACtB,cAAc,EAAE,MAAM,CAAA;IACtB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,OAAO,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,gBAAgB,CAAC,EAAE,IAAI,CAAC;CAC3B,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG;IACrB,sBAAsB,EAAE,MAAM,CAAC;IAC/B,sBAAsB,EAAE,MAAM,CAAC;IAC/B,qBAAqB,EAAE,MAAM,CAAC;IAC9B,iBAAi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,CAAC;IAmBjC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAO7B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC5B;AAED,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAAqC,CAAC"}
@@ -8,9 +8,14 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
8
8
  var __metadata = (this && this.__metadata) || function (k, v) {
9
9
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
10
  };
11
+ var __importDefault = (this && this.__importDefault) || function (mod) {
12
+ return (mod && mod.__esModule) ? mod : { "default": mod };
13
+ };
11
14
  Object.defineProperty(exports, "__esModule", { value: true });
12
15
  exports.UserSchema = exports.User = void 0;
13
16
  const mongoose_1 = require("@nestjs/mongoose");
17
+ const dayjs_1 = __importDefault(require("dayjs"));
18
+ const account_type_enum_1 = require("../models/account-type.enum");
14
19
  const user_vk_schema_1 = require("./user.vk.schema");
15
20
  const user_ok_schema_1 = require("./user.ok.schema");
16
21
  const user_ya_schema_1 = require("./user.ya.schema");
@@ -18,12 +23,6 @@ const user_tg_schema_1 = require("./user.tg.schema");
18
23
  const user_google_schema_1 = require("./user.google.schema");
19
24
  const user_fb_schema_1 = require("./user.fb.schema");
20
25
  let User = class User {
21
- hasAchievement(achievementCode) {
22
- return this.achievements.some((item) => item === achievementCode);
23
- }
24
- hasNoAchievement(achievementCode) {
25
- return !this.hasAchievement(achievementCode);
26
- }
27
26
  };
28
27
  exports.User = User;
29
28
  __decorate([
@@ -46,6 +45,10 @@ __decorate([
46
45
  (0, mongoose_1.Prop)({ required: true }),
47
46
  __metadata("design:type", String)
48
47
  ], User.prototype, "avatarUrl", void 0);
48
+ __decorate([
49
+ (0, mongoose_1.Prop)({ default: new Date() }),
50
+ __metadata("design:type", Date)
51
+ ], User.prototype, "registerDate", void 0);
49
52
  __decorate([
50
53
  (0, mongoose_1.Prop)({ required: true }),
51
54
  __metadata("design:type", Date)
@@ -58,6 +61,10 @@ __decorate([
58
61
  (0, mongoose_1.Prop)({ default: '' }),
59
62
  __metadata("design:type", String)
60
63
  ], User.prototype, "avatarAliasUrl", void 0);
64
+ __decorate([
65
+ (0, mongoose_1.Prop)({ default: '' }),
66
+ __metadata("design:type", String)
67
+ ], User.prototype, "avatar", void 0);
61
68
  __decorate([
62
69
  (0, mongoose_1.Prop)({ default: 'theme__light' }),
63
70
  __metadata("design:type", String)
@@ -90,6 +97,14 @@ __decorate([
90
97
  (0, mongoose_1.Prop)({ default: 'color_schema__default' }),
91
98
  __metadata("design:type", String)
92
99
  ], User.prototype, "colorSchema", void 0);
100
+ __decorate([
101
+ (0, mongoose_1.Prop)({ default: 0 }),
102
+ __metadata("design:type", Number)
103
+ ], User.prototype, "experience", void 0);
104
+ __decorate([
105
+ (0, mongoose_1.Prop)({ default: 1 }),
106
+ __metadata("design:type", Number)
107
+ ], User.prototype, "level", void 0);
93
108
  __decorate([
94
109
  (0, mongoose_1.Prop)({ type: user_vk_schema_1.VKUser }),
95
110
  __metadata("design:type", user_vk_schema_1.VKUser)
@@ -115,25 +130,61 @@ __decorate([
115
130
  __metadata("design:type", user_tg_schema_1.TGUser)
116
131
  ], User.prototype, "tgUser", void 0);
117
132
  __decorate([
118
- (0, mongoose_1.Prop)({ default: 0 }),
119
- __metadata("design:type", Number)
120
- ], User.prototype, "experience", void 0);
133
+ (0, mongoose_1.Virtual)({
134
+ get: function () {
135
+ return (0, dayjs_1.default)().isAfter(this.premiumExpired);
136
+ },
137
+ }),
138
+ __metadata("design:type", String)
139
+ ], User.prototype, "hasPremiumAccount", void 0);
121
140
  __decorate([
122
- (0, mongoose_1.Prop)({ default: 1 }),
123
- __metadata("design:type", Number)
124
- ], User.prototype, "level", void 0);
141
+ (0, mongoose_1.Virtual)({
142
+ get: function () {
143
+ return this.fullNameAlias || this.fullName;
144
+ },
145
+ }),
146
+ __metadata("design:type", String)
147
+ ], User.prototype, "publicFullName", void 0);
125
148
  __decorate([
126
- (0, mongoose_1.Prop)({ default: new Date() }),
127
- __metadata("design:type", Date)
128
- ], User.prototype, "registerDate", void 0);
149
+ (0, mongoose_1.Virtual)({
150
+ get: function () {
151
+ return this.avatarAliasUrl || this.avatarUrl;
152
+ },
153
+ }),
154
+ __metadata("design:type", String)
155
+ ], User.prototype, "publicAvatarUrl", void 0);
129
156
  __decorate([
130
- (0, mongoose_1.Prop)({ default: [] }),
131
- __metadata("design:type", Array)
132
- ], User.prototype, "friends", void 0);
157
+ (0, mongoose_1.Virtual)({
158
+ get: function () {
159
+ if (this.yaUser) {
160
+ return account_type_enum_1.AccountTypeEnum.YA;
161
+ }
162
+ else if (this.vkUser) {
163
+ return account_type_enum_1.AccountTypeEnum.VK;
164
+ }
165
+ else if (this.okUser) {
166
+ return account_type_enum_1.AccountTypeEnum.OK;
167
+ }
168
+ else if (this.fbUser) {
169
+ return account_type_enum_1.AccountTypeEnum.FB;
170
+ }
171
+ else if (this.googleUser) {
172
+ return account_type_enum_1.AccountTypeEnum.GOOGLE;
173
+ }
174
+ return account_type_enum_1.AccountTypeEnum.GUEST;
175
+ },
176
+ }),
177
+ __metadata("design:type", String)
178
+ ], User.prototype, "accountType", void 0);
133
179
  __decorate([
134
- (0, mongoose_1.Prop)({ default: [] }),
135
- __metadata("design:type", Array)
136
- ], User.prototype, "achievements", void 0);
180
+ (0, mongoose_1.Virtual)({
181
+ get: function () {
182
+ var _a;
183
+ return this.accountType === account_type_enum_1.AccountTypeEnum.GUEST || !!((_a = this.yaUser) === null || _a === void 0 ? void 0 : _a.isGuest);
184
+ },
185
+ }),
186
+ __metadata("design:type", String)
187
+ ], User.prototype, "isGuest", void 0);
137
188
  exports.User = User = __decorate([
138
189
  (0, mongoose_1.Schema)()
139
190
  ], User);
@@ -1 +1 @@
1
- {"version":3,"file":"user.schema.js","sourceRoot":"","sources":["../../src/schemas/user.schema.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+CAAwE;AAGxE,qDAA0C;AAE1C,qDAA0C;AAC1C,qDAA0C;AAC1C,qDAA0C;AAC1C,6DAAkD;AAClD,qDAA0C;AAoDnC,IAAM,IAAI,GAAV,MAAM,IAAI;IA+Gb,cAAc,CAAC,eAAuB;QAClC,OAAO,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,KAAK,eAAe,CAAC,CAAC;IACtE,CAAC;IAED,gBAAgB,CAAC,eAAuB;QACpC,OAAO,CAAC,IAAI,CAAC,cAAc,CAAC,eAAe,CAAC,CAAC;IACjD,CAAC;CACJ,CAAA;AAtHY,oBAAI;AAMJ;IALR,IAAA,kBAAO,EAAC;QACL,GAAG,EAAE;YACD,OAAO,IAAI,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC;QAC/B,CAAC;KACJ,CAAC;;oCACsB;AAGxB;IADC,IAAA,eAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;sCACR;AAGjB;IADC,IAAA,eAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;qCACT;AAGhB;IADC,IAAA,eAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;uCACP;AAGlB;IADC,IAAA,eAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;8BACT,IAAI;4CAAC;AAKrB;IADC,IAAA,eAAI,EAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;;2CACA;AAGtB;IADC,IAAA,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C;YAC9B,CAAC;iBAAM,IAAI,IAAI,CAAC,UAAU,EAAE,CAAC;gBACzB,OAAO,mCAAe,CAAC,MAAM,CAAC;YAClC,CAAC;YAED,OAAO,mCAAe,CAAC,KAAK,CAAC;QACjC,CAAC;KACJ,CAAC;;yCAC2B;AAOpB;IALR,IAAA,kBAAO,EAAC;QACL,GAAG,EAAE;;YACD,OAAO,IAAI,CAAC,WAAW,KAAK,mCAAe,CAAC,KAAK,IAAI,CAAC,CAAC,CAAA,MAAA,IAAI,CAAC,MAAM,0CAAE,OAAO,CAAA,CAAC;QAChF,CAAC;KACJ,CAAC;;qCACuB;eAnIhB,IAAI;IADhB,IAAA,iBAAM,GAAE;GACI,IAAI,CAoIhB;AAEY,QAAA,UAAU,GAAG,wBAAa,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC"}
@@ -0,0 +1,115 @@
1
+ import { Document, HydratedDocument } from 'mongoose';
2
+ export type UsersAchievementDocument = HydratedDocument<UsersAchievement>;
3
+ export declare class UsersAchievement {
4
+ readonly usersAchievementId: string;
5
+ date: Date;
6
+ userId: string;
7
+ userName: string;
8
+ achievementId: string;
9
+ achievementTitle: string;
10
+ achievementCode: string;
11
+ achievementPrize: number;
12
+ game: string;
13
+ }
14
+ export declare const UsersAchievementSchema: import("mongoose").Schema<UsersAchievement, import("mongoose").Model<UsersAchievement, any, any, any, (Document<unknown, any, UsersAchievement, any, import("mongoose").DefaultSchemaOptions> & UsersAchievement & {
15
+ _id: import("mongoose").Types.ObjectId;
16
+ } & {
17
+ __v: number;
18
+ } & {
19
+ id: string;
20
+ }) | (Document<unknown, any, UsersAchievement, any, import("mongoose").DefaultSchemaOptions> & UsersAchievement & {
21
+ _id: import("mongoose").Types.ObjectId;
22
+ } & {
23
+ __v: number;
24
+ }), any, UsersAchievement>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, UsersAchievement, Document<unknown, {}, UsersAchievement, {
25
+ id: string;
26
+ }, import("mongoose").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & Omit<UsersAchievement & {
27
+ _id: import("mongoose").Types.ObjectId;
28
+ } & {
29
+ __v: number;
30
+ }, "id"> & {
31
+ id: string;
32
+ }, {
33
+ readonly usersAchievementId?: import("mongoose").SchemaDefinitionProperty<string, UsersAchievement, Document<unknown, {}, UsersAchievement, {
34
+ id: string;
35
+ }, import("mongoose").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & Omit<UsersAchievement & {
36
+ _id: import("mongoose").Types.ObjectId;
37
+ } & {
38
+ __v: number;
39
+ }, "id"> & {
40
+ id: string;
41
+ }>;
42
+ date?: import("mongoose").SchemaDefinitionProperty<Date, UsersAchievement, Document<unknown, {}, UsersAchievement, {
43
+ id: string;
44
+ }, import("mongoose").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & Omit<UsersAchievement & {
45
+ _id: import("mongoose").Types.ObjectId;
46
+ } & {
47
+ __v: number;
48
+ }, "id"> & {
49
+ id: string;
50
+ }>;
51
+ userId?: import("mongoose").SchemaDefinitionProperty<string, UsersAchievement, Document<unknown, {}, UsersAchievement, {
52
+ id: string;
53
+ }, import("mongoose").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & Omit<UsersAchievement & {
54
+ _id: import("mongoose").Types.ObjectId;
55
+ } & {
56
+ __v: number;
57
+ }, "id"> & {
58
+ id: string;
59
+ }>;
60
+ userName?: import("mongoose").SchemaDefinitionProperty<string, UsersAchievement, Document<unknown, {}, UsersAchievement, {
61
+ id: string;
62
+ }, import("mongoose").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & Omit<UsersAchievement & {
63
+ _id: import("mongoose").Types.ObjectId;
64
+ } & {
65
+ __v: number;
66
+ }, "id"> & {
67
+ id: string;
68
+ }>;
69
+ achievementId?: import("mongoose").SchemaDefinitionProperty<string, UsersAchievement, Document<unknown, {}, UsersAchievement, {
70
+ id: string;
71
+ }, import("mongoose").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & Omit<UsersAchievement & {
72
+ _id: import("mongoose").Types.ObjectId;
73
+ } & {
74
+ __v: number;
75
+ }, "id"> & {
76
+ id: string;
77
+ }>;
78
+ achievementTitle?: import("mongoose").SchemaDefinitionProperty<string, UsersAchievement, Document<unknown, {}, UsersAchievement, {
79
+ id: string;
80
+ }, import("mongoose").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & Omit<UsersAchievement & {
81
+ _id: import("mongoose").Types.ObjectId;
82
+ } & {
83
+ __v: number;
84
+ }, "id"> & {
85
+ id: string;
86
+ }>;
87
+ achievementCode?: import("mongoose").SchemaDefinitionProperty<string, UsersAchievement, Document<unknown, {}, UsersAchievement, {
88
+ id: string;
89
+ }, import("mongoose").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & Omit<UsersAchievement & {
90
+ _id: import("mongoose").Types.ObjectId;
91
+ } & {
92
+ __v: number;
93
+ }, "id"> & {
94
+ id: string;
95
+ }>;
96
+ achievementPrize?: import("mongoose").SchemaDefinitionProperty<number, UsersAchievement, Document<unknown, {}, UsersAchievement, {
97
+ id: string;
98
+ }, import("mongoose").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & Omit<UsersAchievement & {
99
+ _id: import("mongoose").Types.ObjectId;
100
+ } & {
101
+ __v: number;
102
+ }, "id"> & {
103
+ id: string;
104
+ }>;
105
+ game?: import("mongoose").SchemaDefinitionProperty<string, UsersAchievement, Document<unknown, {}, UsersAchievement, {
106
+ id: string;
107
+ }, import("mongoose").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & Omit<UsersAchievement & {
108
+ _id: import("mongoose").Types.ObjectId;
109
+ } & {
110
+ __v: number;
111
+ }, "id"> & {
112
+ id: string;
113
+ }>;
114
+ }, UsersAchievement>;
115
+ //# sourceMappingURL=users_achievement.schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"users_achievement.schema.d.ts","sourceRoot":"","sources":["../../src/schemas/users_achievement.schema.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAEtD,MAAM,MAAM,wBAAwB,GAAG,gBAAgB,CAAC,gBAAgB,CAAC,CAAC;AAE1E,qBACa,gBAAgB;IAMzB,QAAQ,CAAC,kBAAkB,EAAE,MAAM,CAAC;IAGpC,IAAI,EAAE,IAAI,CAAC;IAGX,MAAM,EAAE,MAAM,CAAC;IAGf,QAAQ,EAAE,MAAM,CAAC;IAGjB,aAAa,EAAE,MAAM,CAAC;IAGtB,gBAAgB,EAAE,MAAM,CAAC;IAGzB,eAAe,EAAE,MAAM,CAAC;IAGxB,gBAAgB,EAAE,MAAM,CAAC;IAGzB,IAAI,EAAE,MAAM,CAAC;CAChB;AAED,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oBAAiD,CAAC"}
@@ -0,0 +1,61 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.UsersAchievementSchema = exports.UsersAchievement = void 0;
13
+ const mongoose_1 = require("@nestjs/mongoose");
14
+ let UsersAchievement = class UsersAchievement {
15
+ };
16
+ exports.UsersAchievement = UsersAchievement;
17
+ __decorate([
18
+ (0, mongoose_1.Virtual)({
19
+ get: function () {
20
+ return this._id.toString();
21
+ },
22
+ }),
23
+ __metadata("design:type", String)
24
+ ], UsersAchievement.prototype, "usersAchievementId", void 0);
25
+ __decorate([
26
+ (0, mongoose_1.Prop)({ default: new Date() }),
27
+ __metadata("design:type", Date)
28
+ ], UsersAchievement.prototype, "date", void 0);
29
+ __decorate([
30
+ (0, mongoose_1.Prop)(),
31
+ __metadata("design:type", String)
32
+ ], UsersAchievement.prototype, "userId", void 0);
33
+ __decorate([
34
+ (0, mongoose_1.Prop)(),
35
+ __metadata("design:type", String)
36
+ ], UsersAchievement.prototype, "userName", void 0);
37
+ __decorate([
38
+ (0, mongoose_1.Prop)(),
39
+ __metadata("design:type", String)
40
+ ], UsersAchievement.prototype, "achievementId", void 0);
41
+ __decorate([
42
+ (0, mongoose_1.Prop)(),
43
+ __metadata("design:type", String)
44
+ ], UsersAchievement.prototype, "achievementTitle", void 0);
45
+ __decorate([
46
+ (0, mongoose_1.Prop)(),
47
+ __metadata("design:type", String)
48
+ ], UsersAchievement.prototype, "achievementCode", void 0);
49
+ __decorate([
50
+ (0, mongoose_1.Prop)(),
51
+ __metadata("design:type", Number)
52
+ ], UsersAchievement.prototype, "achievementPrize", void 0);
53
+ __decorate([
54
+ (0, mongoose_1.Prop)(),
55
+ __metadata("design:type", String)
56
+ ], UsersAchievement.prototype, "game", void 0);
57
+ exports.UsersAchievement = UsersAchievement = __decorate([
58
+ (0, mongoose_1.Schema)({ collection: 'users_achievements' })
59
+ ], UsersAchievement);
60
+ exports.UsersAchievementSchema = mongoose_1.SchemaFactory.createForClass(UsersAchievement);
61
+ //# sourceMappingURL=users_achievement.schema.js.map