@wrcb/cb-common 1.0.100 → 1.0.102

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.
@@ -14,10 +14,11 @@ function signUpReturnCookie(id) {
14
14
  const payload = {
15
15
  id: id !== null && id !== void 0 ? id : new mongoose_1.default.Types.ObjectId().toHexString(),
16
16
  email: 'test@test.com',
17
- cpf: '05854744600',
17
+ doc: '05854744600',
18
18
  nickName: 'apelido',
19
19
  role: userRole_1.UserRole.User,
20
20
  language: country_1.Language.pt,
21
+ country: country_1.Country.Brazil,
21
22
  isVerified: true
22
23
  };
23
24
  // Create the JWT
@@ -37,11 +38,12 @@ function signUpReturnCookieAdmin(id) {
37
38
  const payload = {
38
39
  id: id !== null && id !== void 0 ? id : new mongoose_1.default.Types.ObjectId().toHexString(),
39
40
  email: 'test@test.com',
40
- cpf: '05854744600',
41
+ doc: '05854744600',
41
42
  nickName: 'apelido',
42
43
  role: userRole_1.UserRole.Admin,
43
44
  isVerified: true,
44
- language: country_1.Language.pt
45
+ language: country_1.Language.pt,
46
+ country: country_1.Country.Brazil
45
47
  };
46
48
  // Create the JWT
47
49
  const token = jsonwebtoken_1.default.sign(payload, process.env.JWT_KEY);
@@ -1,12 +1,13 @@
1
1
  import { Request, Response, NextFunction } from 'express';
2
- import { Language } from '../events/types/country';
2
+ import { Country, Language } from '../events/types/country';
3
3
  export interface UserPayload {
4
4
  id: string;
5
5
  email: string;
6
- cpf: string;
6
+ doc: string;
7
7
  nickName: string;
8
8
  isVerified: boolean;
9
9
  language: Language;
10
+ country: Country;
10
11
  role?: string;
11
12
  }
12
13
  declare global {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wrcb/cb-common",
3
- "version": "1.0.100",
3
+ "version": "1.0.102",
4
4
  "description": "Common resources between services",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",