@wrcb/cb-common 1.0.81 → 1.0.83

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.
@@ -20,4 +20,5 @@ export interface PredictionOptions {
20
20
  export interface Options {
21
21
  optionId: string;
22
22
  optionLabel: string;
23
+ optionWinner: boolean;
23
24
  }
@@ -27,4 +27,7 @@ export declare function BuildBetObject(prediction: any, userId: string, value?:
27
27
  userId: string;
28
28
  value: number;
29
29
  odd: number;
30
+ description: string;
31
+ optionId: string;
32
+ optionLabel: string;
30
33
  };
@@ -8,6 +8,7 @@ exports.BuildPredictionObject = BuildPredictionObject;
8
8
  exports.BuildPredictionOptionsTwoOptionsArray = BuildPredictionOptionsTwoOptionsArray;
9
9
  exports.BuildPredictionOptionsMultipleOptionsArray = BuildPredictionOptionsMultipleOptionsArray;
10
10
  exports.BuildBetObject = BuildBetObject;
11
+ const uuid_1 = require("uuid");
11
12
  const marketStatus_1 = require("../events/types/marketStatus");
12
13
  const oddConfiguration_1 = require("../events/types/oddConfiguration");
13
14
  const predictionStatus_1 = require("../events/types/predictionStatus");
@@ -40,12 +41,14 @@ function BuildPredictionOptionsTwoOptionsArray() {
40
41
  description: 'Teremos cadeirada no marçal?',
41
42
  options: [
42
43
  {
44
+ optionId: (0, uuid_1.v4)(),
43
45
  optionLabel: 'Sim',
44
- optionId: '1--'
46
+ optionWinner: false
45
47
  },
46
48
  {
49
+ optionId: (0, uuid_1.v4)(),
47
50
  optionLabel: 'Não',
48
- optionId: '2--'
51
+ optionWinner: false
49
52
  },
50
53
  ],
51
54
  },
@@ -62,5 +65,8 @@ function BuildBetObject(prediction, userId, value, odd) {
62
65
  userId: userId !== null && userId !== void 0 ? userId : (0, createIdMongoose_1.default)(),
63
66
  value: value !== null && value !== void 0 ? value : 150,
64
67
  odd: odd !== null && odd !== void 0 ? odd : 1.5,
68
+ description: 'descricao',
69
+ optionId: '3124',
70
+ optionLabel: 'Sim'
65
71
  };
66
72
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wrcb/cb-common",
3
- "version": "1.0.81",
3
+ "version": "1.0.83",
4
4
  "description": "Common resources between services",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",
@@ -28,6 +28,7 @@
28
28
  "express-validator": "^7.1.0",
29
29
  "jsonwebtoken": "^9.0.2",
30
30
  "mongoose": "^8.6.3",
31
- "node-nats-streaming": "^0.3.2"
31
+ "node-nats-streaming": "^0.3.2",
32
+ "uuid": "^11.1.0"
32
33
  }
33
34
  }