@wrcb/cb-common 1.0.101 → 1.0.103

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.
@@ -10,10 +10,10 @@ class RequestValidationError extends customError_1.CustomError {
10
10
  Object.setPrototypeOf(this, RequestValidationError.prototype);
11
11
  }
12
12
  serializeErrors() {
13
- return this.errors.map((error) => {
13
+ return this.errors.map(error => {
14
14
  return {
15
15
  message: error.msg,
16
- field: error.type === 'field' ? error.path : '',
16
+ field: error.type === 'field' ? error.path : ''
17
17
  };
18
18
  });
19
19
  }
@@ -7,7 +7,7 @@ class Publisher {
7
7
  }
8
8
  publish(data) {
9
9
  return new Promise((resolve, reject) => {
10
- this.client.publish(this.subject, JSON.stringify(data), (err) => {
10
+ this.client.publish(this.subject, JSON.stringify(data), err => {
11
11
  if (err) {
12
12
  return reject(err);
13
13
  }
@@ -14,30 +14,30 @@ var OddType;
14
14
  exports.oddInfoMap = {
15
15
  [OddType.Automatic05]: {
16
16
  oddType: OddType.Automatic05,
17
- housePercentage: 5,
17
+ housePercentage: 5
18
18
  },
19
19
  [OddType.Automatic06]: {
20
20
  oddType: OddType.Automatic06,
21
- housePercentage: 6,
21
+ housePercentage: 6
22
22
  },
23
23
  [OddType.Automatic07]: {
24
24
  oddType: OddType.Automatic07,
25
- housePercentage: 7,
25
+ housePercentage: 7
26
26
  },
27
27
  [OddType.Automatic08]: {
28
28
  oddType: OddType.Automatic08,
29
- housePercentage: 8,
29
+ housePercentage: 8
30
30
  },
31
31
  [OddType.Automatic09]: {
32
32
  oddType: OddType.Automatic09,
33
- housePercentage: 9,
33
+ housePercentage: 9
34
34
  },
35
35
  [OddType.Automatic10]: {
36
36
  oddType: OddType.Automatic10,
37
- housePercentage: 10,
37
+ housePercentage: 10
38
38
  },
39
39
  [OddType.Manual]: {
40
40
  oddType: OddType.Manual,
41
- housePercentage: 0, // Pode ser 0 por padrão, já que será manualmente definido
42
- },
41
+ housePercentage: 0 // Pode ser 0 por padrão, já que será manualmente definido
42
+ }
43
43
  };
@@ -14,7 +14,7 @@ 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,
@@ -38,7 +38,7 @@ function signUpReturnCookieAdmin(id) {
38
38
  const payload = {
39
39
  id: id !== null && id !== void 0 ? id : new mongoose_1.default.Types.ObjectId().toHexString(),
40
40
  email: 'test@test.com',
41
- cpf: '05854744600',
41
+ doc: '05854744600',
42
42
  nickName: 'apelido',
43
43
  role: userRole_1.UserRole.Admin,
44
44
  isVerified: true,
@@ -18,7 +18,7 @@ function BuildMarketObject(title, description, status, priority) {
18
18
  title: title !== null && title !== void 0 ? title : 'Politics',
19
19
  description: description !== null && description !== void 0 ? description : 'Politics predictions',
20
20
  status: status !== null && status !== void 0 ? status : marketStatus_1.MarketStatus.Active,
21
- priority: priority !== null && priority !== void 0 ? priority : 1,
21
+ priority: priority !== null && priority !== void 0 ? priority : 1
22
22
  };
23
23
  }
24
24
  function BuildPredictionObject(market, predictionOptions, title, details, status, deadLine, oddType, image, rules, slug) {
@@ -32,7 +32,7 @@ function BuildPredictionObject(market, predictionOptions, title, details, status
32
32
  rules: rules !== null && rules !== void 0 ? rules : 'rules',
33
33
  slug: slug !== null && slug !== void 0 ? slug : 'slug',
34
34
  market,
35
- predictionOptions: predictionOptions !== null && predictionOptions !== void 0 ? predictionOptions : BuildPredictionOptionsTwoOptionsArray(),
35
+ predictionOptions: predictionOptions !== null && predictionOptions !== void 0 ? predictionOptions : BuildPredictionOptionsTwoOptionsArray()
36
36
  };
37
37
  }
38
38
  function BuildPredictionOptionsTwoOptionsArray() {
@@ -51,9 +51,9 @@ function BuildPredictionOptionsTwoOptionsArray() {
51
51
  optionLabel: 'Não',
52
52
  optionWinner: false,
53
53
  optionInitialOdd: 0
54
- },
55
- ],
56
- },
54
+ }
55
+ ]
56
+ }
57
57
  ];
58
58
  return predictionOptionsTwoOptions;
59
59
  }
@@ -3,7 +3,7 @@ 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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wrcb/cb-common",
3
- "version": "1.0.101",
3
+ "version": "1.0.103",
4
4
  "description": "Common resources between services",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",
@@ -10,7 +10,7 @@
10
10
  "scripts": {
11
11
  "clean": "rimraf ./build",
12
12
  "build": "npm run clean && tsc",
13
- "pub": "git add . && git commit -m \"updates\" && npm version patch && npm run build && npm publish",
13
+ "pub": "git add . && git commit -m \"updates\" || echo \"No commit needed\" && npm version patch && npm run build && npm publish",
14
14
  "lint": "eslint . --ext .ts --fix",
15
15
  "format": "prettier --write ."
16
16
  },