@wrcb/cb-common 1.0.6 → 1.0.8

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.
@@ -0,0 +1,15 @@
1
+ import { Subjects } from './subjects';
2
+ import { PredictionStatus } from './types/predictionStatus';
3
+ export interface PredictionFinishedEvent {
4
+ subject: Subjects.PredictionFinished;
5
+ data: {
6
+ id: string;
7
+ status: PredictionStatus;
8
+ title: string;
9
+ description: string;
10
+ market: {
11
+ id: string;
12
+ marketTitle: string;
13
+ };
14
+ };
15
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,15 @@
1
+ import { Subjects } from './subjects';
2
+ import { PredictionStatus } from './types/predictionStatus';
3
+ export interface PredictionStartedEvent {
4
+ subject: Subjects.PredictionStarted;
5
+ data: {
6
+ id: string;
7
+ status: PredictionStatus;
8
+ title: string;
9
+ description: string;
10
+ market: {
11
+ id: string;
12
+ marketTitle: string;
13
+ };
14
+ };
15
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,4 +1,8 @@
1
1
  export declare enum Subjects {
2
2
  CommentCreated = "comment:created",
3
- CommentUpdated = "comment:updated"
3
+ CommentUpdated = "comment:updated",
4
+ PredictionCreated = "prediction:created",
5
+ PredictionStarted = "prediction:started",
6
+ PredictionFinished = "prediction:finished",
7
+ PredictionPaymentProcessed = "prediction:paymentprocessed"
4
8
  }
@@ -5,4 +5,8 @@ var Subjects;
5
5
  (function (Subjects) {
6
6
  Subjects["CommentCreated"] = "comment:created";
7
7
  Subjects["CommentUpdated"] = "comment:updated";
8
+ Subjects["PredictionCreated"] = "prediction:created";
9
+ Subjects["PredictionStarted"] = "prediction:started";
10
+ Subjects["PredictionFinished"] = "prediction:finished";
11
+ Subjects["PredictionPaymentProcessed"] = "prediction:paymentprocessed";
8
12
  })(Subjects || (exports.Subjects = Subjects = {}));
@@ -1,7 +1,6 @@
1
1
  export declare enum PredictionStatus {
2
- Pending = "pending",
2
+ Created = "created",
3
3
  Started = "started",
4
- Cancelled = "cancelled",
5
4
  Finished = "finished",
6
5
  PaymentProcessed = "payment:processed"
7
6
  }
@@ -3,10 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.PredictionStatus = void 0;
4
4
  var PredictionStatus;
5
5
  (function (PredictionStatus) {
6
- PredictionStatus["Pending"] = "pending";
6
+ PredictionStatus["Created"] = "created";
7
7
  // Confirmed = 'confirmed', // aposta que foi confirmada mas não iniciou o evento (preciso disso?)
8
8
  PredictionStatus["Started"] = "started";
9
- PredictionStatus["Cancelled"] = "cancelled";
10
9
  PredictionStatus["Finished"] = "finished";
11
10
  PredictionStatus["PaymentProcessed"] = "payment:processed";
12
11
  })(PredictionStatus || (exports.PredictionStatus = PredictionStatus = {}));
package/build/index.d.ts CHANGED
@@ -11,7 +11,9 @@ export * from './middlewares/validateRequest';
11
11
  export * from './events/baseListener';
12
12
  export * from './events/basePublisher';
13
13
  export * from './events/subjects';
14
+ export * from './events/types/marketStatus';
15
+ export * from './events/types/predictionStatus';
14
16
  export * from './events/commentCreatedEvent';
15
17
  export * from './events/commentUpdatedEvent';
16
- export * from './events/types/predictionStatus';
17
- export * from './events/types/marketStatus';
18
+ export * from './events/predictionFinishedEvent';
19
+ export * from './events/predictionStartedEvent';
package/build/index.js CHANGED
@@ -27,7 +27,9 @@ __exportStar(require("./middlewares/validateRequest"), exports);
27
27
  __exportStar(require("./events/baseListener"), exports);
28
28
  __exportStar(require("./events/basePublisher"), exports);
29
29
  __exportStar(require("./events/subjects"), exports);
30
+ __exportStar(require("./events/types/marketStatus"), exports);
31
+ __exportStar(require("./events/types/predictionStatus"), exports);
30
32
  __exportStar(require("./events/commentCreatedEvent"), exports);
31
33
  __exportStar(require("./events/commentUpdatedEvent"), exports);
32
- __exportStar(require("./events/types/predictionStatus"), exports);
33
- __exportStar(require("./events/types/marketStatus"), exports);
34
+ __exportStar(require("./events/predictionFinishedEvent"), exports);
35
+ __exportStar(require("./events/predictionStartedEvent"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wrcb/cb-common",
3
- "version": "1.0.6",
3
+ "version": "1.0.8",
4
4
  "description": "Common resources between services",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",