@wrcb/cb-common 1.0.592 → 1.0.594

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.
@@ -7,7 +7,8 @@ export declare enum PredictionStatus {
7
7
  Closed = "Closed",// Fechada, aguardando resolução
8
8
  InDispute = "InDispute",// Em período de disputa (24h)
9
9
  Resolved = "Resolved",// Resolvida, prêmios distribuídos
10
- Cancelled = "Cancelled"
10
+ Cancelled = "Cancelled",// Cancelada, apostas reembolsadas
11
+ Published = "Published"
11
12
  }
12
13
  /**
13
14
  * Transições válidas de status
@@ -14,29 +14,44 @@ var PredictionStatus;
14
14
  PredictionStatus["Closed"] = "Closed";
15
15
  PredictionStatus["InDispute"] = "InDispute";
16
16
  PredictionStatus["Resolved"] = "Resolved";
17
- PredictionStatus["Cancelled"] = "Cancelled"; // Cancelada, apostas reembolsadas
17
+ PredictionStatus["Cancelled"] = "Cancelled";
18
+ PredictionStatus["Published"] = "Published";
18
19
  })(PredictionStatus || (exports.PredictionStatus = PredictionStatus = {}));
19
20
  /**
20
21
  * Transições válidas de status
21
22
  * Define quais mudanças de status são permitidas
22
23
  */
23
24
  exports.VALID_STATUS_TRANSITIONS = {
24
- [PredictionStatus.Draft]: [PredictionStatus.Open, PredictionStatus.Cancelled],
25
+ // Draft: pode publicar ou cancelar
26
+ [PredictionStatus.Draft]: [
27
+ PredictionStatus.Published,
28
+ PredictionStatus.Cancelled
29
+ ],
30
+ // Published: aguardando abertura automática ou cancelamento
31
+ [PredictionStatus.Published]: [
32
+ PredictionStatus.Open,
33
+ PredictionStatus.Cancelled
34
+ ],
35
+ // Open: pode fechar naturalmente ou ser cancelado
25
36
  [PredictionStatus.Open]: [
26
37
  PredictionStatus.Closed,
27
38
  PredictionStatus.Cancelled
28
39
  ],
40
+ // Closed: pode resolver, entrar em disputa ou cancelar
29
41
  [PredictionStatus.Closed]: [
30
42
  PredictionStatus.InDispute,
31
43
  PredictionStatus.Resolved,
32
44
  PredictionStatus.Cancelled
33
45
  ],
46
+ // InDispute: pode resolver após disputa ou cancelar
34
47
  [PredictionStatus.InDispute]: [
35
48
  PredictionStatus.Resolved,
36
49
  PredictionStatus.Cancelled
37
50
  ],
38
- [PredictionStatus.Resolved]: [], // Estado final - não pode mudar
39
- [PredictionStatus.Cancelled]: [] // Estado final - não pode mudar
51
+ // Resolved: estado final, não muda
52
+ [PredictionStatus.Resolved]: [],
53
+ // Cancelled: estado final, não muda
54
+ [PredictionStatus.Cancelled]: []
40
55
  };
41
56
  /**
42
57
  * Verifica se uma transição de status é válida
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wrcb/cb-common",
3
- "version": "1.0.592",
3
+ "version": "1.0.594",
4
4
  "description": "Common resources between services",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",