jp.db.schemas 1.0.28 → 1.0.30

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.
@@ -9,7 +9,7 @@ export declare class UsersRepository {
9
9
  findByYAId(yaId: string): Promise<User | null>;
10
10
  findByGoogleId(googleId: string): Promise<User | null>;
11
11
  findByFBId(fbId: string): Promise<User | null>;
12
- findByTGId(tgId: string): Promise<User | null>;
12
+ findByTGId(tgId: number): Promise<User | null>;
13
13
  findAndCount(userName: string, limit: number, skip: number): Promise<{
14
14
  items: Array<User>;
15
15
  total: number;
@@ -3,11 +3,11 @@ export type TGUserDocument = HydratedDocument<TGUser>;
3
3
  export declare class TGUser {
4
4
  id: number;
5
5
  firstName: string;
6
- lastName: string;
7
- username: string;
8
- languageCode: string;
9
- photoUrl: string;
10
- allowsWriteToPm: boolean;
6
+ lastName?: string;
7
+ username?: string;
8
+ languageCode?: string;
9
+ photoUrl?: string;
10
+ allowsWriteToPm?: boolean;
11
11
  }
12
12
  export declare const TGUserSchema: import("mongoose").Schema<TGUser, import("mongoose").Model<TGUser, any, any, any, import("mongoose").Document<unknown, any, TGUser, any> & TGUser & {
13
13
  _id: import("mongoose").Types.ObjectId;
@@ -1 +1 @@
1
- {"version":3,"file":"user.tg.schema.d.ts","sourceRoot":"","sources":["../../src/schemas/user.tg.schema.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAE5C,MAAM,MAAM,cAAc,GAAG,gBAAgB,CAAC,MAAM,CAAC,CAAC;AAEtD,qBACa,MAAM;IAEf,EAAE,EAAE,MAAM,CAAC;IAGX,SAAS,EAAE,MAAM,CAAC;IAGlB,QAAQ,EAAE,MAAM,CAAC;IAGjB,QAAQ,EAAE,MAAM,CAAC;IAGjB,YAAY,EAAE,MAAM,CAAC;IAGrB,QAAQ,EAAE,MAAM,CAAC;IAGjB,eAAe,EAAE,OAAO,CAAC;CAC5B;AAED,eAAO,MAAM,YAAY;;;;;;;;EAAuC,CAAC"}
1
+ {"version":3,"file":"user.tg.schema.d.ts","sourceRoot":"","sources":["../../src/schemas/user.tg.schema.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAE5C,MAAM,MAAM,cAAc,GAAG,gBAAgB,CAAC,MAAM,CAAC,CAAC;AAEtD,qBACa,MAAM;IAEf,EAAE,EAAE,MAAM,CAAC;IAGX,SAAS,EAAE,MAAM,CAAC;IAGlB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAGlB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAGlB,YAAY,CAAC,EAAE,MAAM,CAAC;IAGtB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAGlB,eAAe,CAAC,EAAE,OAAO,CAAC;CAC7B;AAED,eAAO,MAAM,YAAY;;;;;;;;EAAuC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"user.tg.schema.js","sourceRoot":"","sources":["../../src/schemas/user.tg.schema.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+CAA+D;AAMxD,IAAM,MAAM,GAAZ,MAAM,MAAM;CAqBlB,CAAA;AArBY,wBAAM;AAEf;IADC,IAAA,eAAI,GAAE;;kCACI;AAGX;IADC,IAAA,eAAI,GAAE;;yCACW;AAGlB;IADC,IAAA,eAAI,GAAE;;wCACU;AAGjB;IADC,IAAA,eAAI,GAAE;;wCACU;AAGjB;IADC,IAAA,eAAI,GAAE;;4CACc;AAGrB;IADC,IAAA,eAAI,GAAE;;wCACU;AAGjB;IADC,IAAA,eAAI,GAAE;;+CACkB;iBApBhB,MAAM;IADlB,IAAA,iBAAM,GAAE;GACI,MAAM,CAqBlB;AAEY,QAAA,YAAY,GAAG,wBAAa,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC"}
1
+ {"version":3,"file":"user.tg.schema.js","sourceRoot":"","sources":["../../src/schemas/user.tg.schema.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+CAA+D;AAMxD,IAAM,MAAM,GAAZ,MAAM,MAAM;CAqBlB,CAAA;AArBY,wBAAM;AAEf;IADC,IAAA,eAAI,GAAE;;kCACI;AAGX;IADC,IAAA,eAAI,GAAE;;yCACW;AAGlB;IADC,IAAA,eAAI,GAAE;;wCACW;AAGlB;IADC,IAAA,eAAI,GAAE;;wCACW;AAGlB;IADC,IAAA,eAAI,GAAE;;4CACe;AAGtB;IADC,IAAA,eAAI,GAAE;;wCACW;AAGlB;IADC,IAAA,eAAI,GAAE;;+CACmB;iBApBjB,MAAM;IADlB,IAAA,iBAAM,GAAE;GACI,MAAM,CAqBlB;AAEY,QAAA,YAAY,GAAG,wBAAa,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jp.db.schemas",
3
- "version": "1.0.28",
3
+ "version": "1.0.30",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -54,7 +54,7 @@ export class UsersRepository {
54
54
  .exec();
55
55
  }
56
56
 
57
- async findByTGId (tgId: string): Promise<User | null> {
57
+ async findByTGId (tgId: number): Promise<User | null> {
58
58
  return this.userModel
59
59
  .findOne({ 'tgUser.id': tgId })
60
60
  .exec();
@@ -12,19 +12,19 @@ export class TGUser {
12
12
  firstName: string;
13
13
 
14
14
  @Prop()
15
- lastName: string;
15
+ lastName?: string;
16
16
 
17
17
  @Prop()
18
- username: string;
18
+ username?: string;
19
19
 
20
20
  @Prop()
21
- languageCode: string;
21
+ languageCode?: string;
22
22
 
23
23
  @Prop()
24
- photoUrl: string;
24
+ photoUrl?: string;
25
25
 
26
26
  @Prop()
27
- allowsWriteToPm: boolean;
27
+ allowsWriteToPm?: boolean;
28
28
  }
29
29
 
30
30
  export const TGUserSchema = SchemaFactory.createForClass(TGUser);