pmxtjs 2.48.4 → 2.48.6

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.
@@ -53,11 +53,11 @@ export interface UnifiedMarket {
53
53
  */
54
54
  outcomes: Array<MarketOutcome>;
55
55
  /**
56
- * When the market is scheduled to resolve.
56
+ * When the market is scheduled to resolve. Optional because some venues do not publish a cutoff for every market (e.g. Opinion categorical children) — emit `undefined` rather than coercing to epoch.
57
57
  * @type {Date}
58
58
  * @memberof UnifiedMarket
59
59
  */
60
- resolutionDate: Date;
60
+ resolutionDate?: Date;
61
61
  /**
62
62
  * Trading volume over the past 24 hours (USD).
63
63
  * @type {number}
@@ -24,8 +24,6 @@ export function instanceOfUnifiedMarket(value) {
24
24
  return false;
25
25
  if (!('outcomes' in value) || value['outcomes'] === undefined)
26
26
  return false;
27
- if (!('resolutionDate' in value) || value['resolutionDate'] === undefined)
28
- return false;
29
27
  if (!('volume24h' in value) || value['volume24h'] === undefined)
30
28
  return false;
31
29
  if (!('liquidity' in value) || value['liquidity'] === undefined)
@@ -48,7 +46,7 @@ export function UnifiedMarketFromJSONTyped(json, ignoreDiscriminator) {
48
46
  'description': json['description'],
49
47
  'slug': json['slug'] == null ? undefined : json['slug'],
50
48
  'outcomes': (json['outcomes'].map(MarketOutcomeFromJSON)),
51
- 'resolutionDate': (new Date(json['resolutionDate'])),
49
+ 'resolutionDate': json['resolutionDate'] == null ? undefined : (new Date(json['resolutionDate'])),
52
50
  'volume24h': json['volume24h'],
53
51
  'volume': json['volume'] == null ? undefined : json['volume'],
54
52
  'liquidity': json['liquidity'],
@@ -82,7 +80,7 @@ export function UnifiedMarketToJSONTyped(value, ignoreDiscriminator = false) {
82
80
  'description': value['description'],
83
81
  'slug': value['slug'],
84
82
  'outcomes': (value['outcomes'].map(MarketOutcomeToJSON)),
85
- 'resolutionDate': value['resolutionDate'].toISOString(),
83
+ 'resolutionDate': value['resolutionDate'] == null ? value['resolutionDate'] : value['resolutionDate'].toISOString(),
86
84
  'volume24h': value['volume24h'],
87
85
  'volume': value['volume'],
88
86
  'liquidity': value['liquidity'],
@@ -53,11 +53,11 @@ export interface UnifiedMarket {
53
53
  */
54
54
  outcomes: Array<MarketOutcome>;
55
55
  /**
56
- * When the market is scheduled to resolve.
56
+ * When the market is scheduled to resolve. Optional because some venues do not publish a cutoff for every market (e.g. Opinion categorical children) — emit `undefined` rather than coercing to epoch.
57
57
  * @type {Date}
58
58
  * @memberof UnifiedMarket
59
59
  */
60
- resolutionDate: Date;
60
+ resolutionDate?: Date;
61
61
  /**
62
62
  * Trading volume over the past 24 hours (USD).
63
63
  * @type {number}
@@ -31,8 +31,6 @@ function instanceOfUnifiedMarket(value) {
31
31
  return false;
32
32
  if (!('outcomes' in value) || value['outcomes'] === undefined)
33
33
  return false;
34
- if (!('resolutionDate' in value) || value['resolutionDate'] === undefined)
35
- return false;
36
34
  if (!('volume24h' in value) || value['volume24h'] === undefined)
37
35
  return false;
38
36
  if (!('liquidity' in value) || value['liquidity'] === undefined)
@@ -55,7 +53,7 @@ function UnifiedMarketFromJSONTyped(json, ignoreDiscriminator) {
55
53
  'description': json['description'],
56
54
  'slug': json['slug'] == null ? undefined : json['slug'],
57
55
  'outcomes': (json['outcomes'].map(MarketOutcome_1.MarketOutcomeFromJSON)),
58
- 'resolutionDate': (new Date(json['resolutionDate'])),
56
+ 'resolutionDate': json['resolutionDate'] == null ? undefined : (new Date(json['resolutionDate'])),
59
57
  'volume24h': json['volume24h'],
60
58
  'volume': json['volume'] == null ? undefined : json['volume'],
61
59
  'liquidity': json['liquidity'],
@@ -89,7 +87,7 @@ function UnifiedMarketToJSONTyped(value, ignoreDiscriminator = false) {
89
87
  'description': value['description'],
90
88
  'slug': value['slug'],
91
89
  'outcomes': (value['outcomes'].map(MarketOutcome_1.MarketOutcomeToJSON)),
92
- 'resolutionDate': value['resolutionDate'].toISOString(),
90
+ 'resolutionDate': value['resolutionDate'] == null ? value['resolutionDate'] : value['resolutionDate'].toISOString(),
93
91
  'volume24h': value['volume24h'],
94
92
  'volume': value['volume'],
95
93
  'liquidity': value['liquidity'],
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pmxtjs",
3
- "version": "2.48.4",
3
+ "version": "2.48.6",
4
4
  "description": "OpenAPI client for pmxtjs",
5
5
  "author": "OpenAPI-Generator",
6
6
  "repository": {
@@ -64,11 +64,11 @@ export interface UnifiedMarket {
64
64
  */
65
65
  outcomes: Array<MarketOutcome>;
66
66
  /**
67
- * When the market is scheduled to resolve.
67
+ * When the market is scheduled to resolve. Optional because some venues do not publish a cutoff for every market (e.g. Opinion categorical children) — emit `undefined` rather than coercing to epoch.
68
68
  * @type {Date}
69
69
  * @memberof UnifiedMarket
70
70
  */
71
- resolutionDate: Date;
71
+ resolutionDate?: Date;
72
72
  /**
73
73
  * Trading volume over the past 24 hours (USD).
74
74
  * @type {number}
@@ -181,7 +181,6 @@ export function instanceOfUnifiedMarket(value: object): value is UnifiedMarket {
181
181
  if (!('title' in value) || value['title'] === undefined) return false;
182
182
  if (!('description' in value) || value['description'] === undefined) return false;
183
183
  if (!('outcomes' in value) || value['outcomes'] === undefined) return false;
184
- if (!('resolutionDate' in value) || value['resolutionDate'] === undefined) return false;
185
184
  if (!('volume24h' in value) || value['volume24h'] === undefined) return false;
186
185
  if (!('liquidity' in value) || value['liquidity'] === undefined) return false;
187
186
  if (!('url' in value) || value['url'] === undefined) return false;
@@ -204,7 +203,7 @@ export function UnifiedMarketFromJSONTyped(json: any, ignoreDiscriminator: boole
204
203
  'description': json['description'],
205
204
  'slug': json['slug'] == null ? undefined : json['slug'],
206
205
  'outcomes': ((json['outcomes'] as Array<any>).map(MarketOutcomeFromJSON)),
207
- 'resolutionDate': (new Date(json['resolutionDate'])),
206
+ 'resolutionDate': json['resolutionDate'] == null ? undefined : (new Date(json['resolutionDate'])),
208
207
  'volume24h': json['volume24h'],
209
208
  'volume': json['volume'] == null ? undefined : json['volume'],
210
209
  'liquidity': json['liquidity'],
@@ -242,7 +241,7 @@ export function UnifiedMarketToJSONTyped(value?: UnifiedMarket | null, ignoreDis
242
241
  'description': value['description'],
243
242
  'slug': value['slug'],
244
243
  'outcomes': ((value['outcomes'] as Array<any>).map(MarketOutcomeToJSON)),
245
- 'resolutionDate': value['resolutionDate'].toISOString(),
244
+ 'resolutionDate': value['resolutionDate'] == null ? value['resolutionDate'] : value['resolutionDate'].toISOString(),
246
245
  'volume24h': value['volume24h'],
247
246
  'volume': value['volume'],
248
247
  'liquidity': value['liquidity'],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pmxtjs",
3
- "version": "2.48.4",
3
+ "version": "2.48.6",
4
4
  "description": "Unified prediction market data API - The ccxt for prediction markets",
5
5
  "author": "PMXT Contributors",
6
6
  "repository": {
@@ -43,7 +43,7 @@
43
43
  "unified"
44
44
  ],
45
45
  "dependencies": {
46
- "pmxt-core": "2.48.4",
46
+ "pmxt-core": "2.48.6",
47
47
  "ws": "^8.18.0"
48
48
  },
49
49
  "devDependencies": {