pmxtjs 1.2.0 → 1.3.1
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.
- package/dist/esm/generated/src/apis/DefaultApi.d.ts +23 -1
- package/dist/esm/generated/src/apis/DefaultApi.js +38 -1
- package/dist/esm/generated/src/models/SearchEvents200Response.d.ts +46 -0
- package/dist/esm/generated/src/models/SearchEvents200Response.js +47 -0
- package/dist/esm/generated/src/models/SearchEventsRequest.d.ts +40 -0
- package/dist/esm/generated/src/models/SearchEventsRequest.js +47 -0
- package/dist/esm/generated/src/models/UnifiedEvent.d.ts +81 -0
- package/dist/esm/generated/src/models/UnifiedEvent.js +58 -0
- package/dist/esm/generated/src/models/index.d.ts +3 -0
- package/dist/esm/generated/src/models/index.js +3 -0
- package/dist/generated/src/apis/DefaultApi.d.ts +23 -1
- package/dist/generated/src/apis/DefaultApi.js +38 -1
- package/dist/generated/src/models/SearchEvents200Response.d.ts +46 -0
- package/dist/generated/src/models/SearchEvents200Response.js +54 -0
- package/dist/generated/src/models/SearchEventsRequest.d.ts +40 -0
- package/dist/generated/src/models/SearchEventsRequest.js +54 -0
- package/dist/generated/src/models/UnifiedEvent.d.ts +81 -0
- package/dist/generated/src/models/UnifiedEvent.js +65 -0
- package/dist/generated/src/models/index.d.ts +3 -0
- package/dist/generated/src/models/index.js +3 -0
- package/generated/.openapi-generator/FILES +6 -0
- package/generated/docs/DefaultApi.md +71 -0
- package/generated/docs/SearchEvents200Response.md +38 -0
- package/generated/docs/SearchEventsRequest.md +36 -0
- package/generated/docs/UnifiedEvent.md +51 -0
- package/generated/package.json +1 -1
- package/generated/src/apis/DefaultApi.ts +61 -0
- package/generated/src/models/SearchEvents200Response.ts +96 -0
- package/generated/src/models/SearchEventsRequest.ts +89 -0
- package/generated/src/models/UnifiedEvent.ts +137 -0
- package/generated/src/models/index.ts +3 -0
- package/package.json +2 -2
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* PMXT Sidecar API
|
|
5
|
+
* A unified local sidecar API for prediction markets (Polymarket, Kalshi). This API acts as a JSON-RPC-style gateway. Each endpoint corresponds to a specific method on the generic exchange implementation.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 0.4.4
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
import type { ErrorDetail } from './ErrorDetail';
|
|
17
|
+
import {
|
|
18
|
+
ErrorDetailFromJSON,
|
|
19
|
+
ErrorDetailFromJSONTyped,
|
|
20
|
+
ErrorDetailToJSON,
|
|
21
|
+
ErrorDetailToJSONTyped,
|
|
22
|
+
} from './ErrorDetail';
|
|
23
|
+
import type { UnifiedEvent } from './UnifiedEvent';
|
|
24
|
+
import {
|
|
25
|
+
UnifiedEventFromJSON,
|
|
26
|
+
UnifiedEventFromJSONTyped,
|
|
27
|
+
UnifiedEventToJSON,
|
|
28
|
+
UnifiedEventToJSONTyped,
|
|
29
|
+
} from './UnifiedEvent';
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
*
|
|
33
|
+
* @export
|
|
34
|
+
* @interface SearchEvents200Response
|
|
35
|
+
*/
|
|
36
|
+
export interface SearchEvents200Response {
|
|
37
|
+
/**
|
|
38
|
+
*
|
|
39
|
+
* @type {boolean}
|
|
40
|
+
* @memberof SearchEvents200Response
|
|
41
|
+
*/
|
|
42
|
+
success?: boolean;
|
|
43
|
+
/**
|
|
44
|
+
*
|
|
45
|
+
* @type {ErrorDetail}
|
|
46
|
+
* @memberof SearchEvents200Response
|
|
47
|
+
*/
|
|
48
|
+
error?: ErrorDetail;
|
|
49
|
+
/**
|
|
50
|
+
*
|
|
51
|
+
* @type {Array<UnifiedEvent>}
|
|
52
|
+
* @memberof SearchEvents200Response
|
|
53
|
+
*/
|
|
54
|
+
data?: Array<UnifiedEvent>;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Check if a given object implements the SearchEvents200Response interface.
|
|
59
|
+
*/
|
|
60
|
+
export function instanceOfSearchEvents200Response(value: object): value is SearchEvents200Response {
|
|
61
|
+
return true;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export function SearchEvents200ResponseFromJSON(json: any): SearchEvents200Response {
|
|
65
|
+
return SearchEvents200ResponseFromJSONTyped(json, false);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export function SearchEvents200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): SearchEvents200Response {
|
|
69
|
+
if (json == null) {
|
|
70
|
+
return json;
|
|
71
|
+
}
|
|
72
|
+
return {
|
|
73
|
+
|
|
74
|
+
'success': json['success'] == null ? undefined : json['success'],
|
|
75
|
+
'error': json['error'] == null ? undefined : ErrorDetailFromJSON(json['error']),
|
|
76
|
+
'data': json['data'] == null ? undefined : ((json['data'] as Array<any>).map(UnifiedEventFromJSON)),
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export function SearchEvents200ResponseToJSON(json: any): SearchEvents200Response {
|
|
81
|
+
return SearchEvents200ResponseToJSONTyped(json, false);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export function SearchEvents200ResponseToJSONTyped(value?: SearchEvents200Response | null, ignoreDiscriminator: boolean = false): any {
|
|
85
|
+
if (value == null) {
|
|
86
|
+
return value;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
return {
|
|
90
|
+
|
|
91
|
+
'success': value['success'],
|
|
92
|
+
'error': ErrorDetailToJSON(value['error']),
|
|
93
|
+
'data': value['data'] == null ? undefined : ((value['data'] as Array<any>).map(UnifiedEventToJSON)),
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* PMXT Sidecar API
|
|
5
|
+
* A unified local sidecar API for prediction markets (Polymarket, Kalshi). This API acts as a JSON-RPC-style gateway. Each endpoint corresponds to a specific method on the generic exchange implementation.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 0.4.4
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
import type { ExchangeCredentials } from './ExchangeCredentials';
|
|
17
|
+
import {
|
|
18
|
+
ExchangeCredentialsFromJSON,
|
|
19
|
+
ExchangeCredentialsFromJSONTyped,
|
|
20
|
+
ExchangeCredentialsToJSON,
|
|
21
|
+
ExchangeCredentialsToJSONTyped,
|
|
22
|
+
} from './ExchangeCredentials';
|
|
23
|
+
import type { SearchMarketsRequestArgsInner } from './SearchMarketsRequestArgsInner';
|
|
24
|
+
import {
|
|
25
|
+
SearchMarketsRequestArgsInnerFromJSON,
|
|
26
|
+
SearchMarketsRequestArgsInnerFromJSONTyped,
|
|
27
|
+
SearchMarketsRequestArgsInnerToJSON,
|
|
28
|
+
SearchMarketsRequestArgsInnerToJSONTyped,
|
|
29
|
+
} from './SearchMarketsRequestArgsInner';
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
*
|
|
33
|
+
* @export
|
|
34
|
+
* @interface SearchEventsRequest
|
|
35
|
+
*/
|
|
36
|
+
export interface SearchEventsRequest {
|
|
37
|
+
/**
|
|
38
|
+
* [query, params?]
|
|
39
|
+
* @type {Array<SearchMarketsRequestArgsInner>}
|
|
40
|
+
* @memberof SearchEventsRequest
|
|
41
|
+
*/
|
|
42
|
+
args: Array<SearchMarketsRequestArgsInner>;
|
|
43
|
+
/**
|
|
44
|
+
*
|
|
45
|
+
* @type {ExchangeCredentials}
|
|
46
|
+
* @memberof SearchEventsRequest
|
|
47
|
+
*/
|
|
48
|
+
credentials?: ExchangeCredentials;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Check if a given object implements the SearchEventsRequest interface.
|
|
53
|
+
*/
|
|
54
|
+
export function instanceOfSearchEventsRequest(value: object): value is SearchEventsRequest {
|
|
55
|
+
if (!('args' in value) || value['args'] === undefined) return false;
|
|
56
|
+
return true;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export function SearchEventsRequestFromJSON(json: any): SearchEventsRequest {
|
|
60
|
+
return SearchEventsRequestFromJSONTyped(json, false);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export function SearchEventsRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): SearchEventsRequest {
|
|
64
|
+
if (json == null) {
|
|
65
|
+
return json;
|
|
66
|
+
}
|
|
67
|
+
return {
|
|
68
|
+
|
|
69
|
+
'args': ((json['args'] as Array<any>).map(SearchMarketsRequestArgsInnerFromJSON)),
|
|
70
|
+
'credentials': json['credentials'] == null ? undefined : ExchangeCredentialsFromJSON(json['credentials']),
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export function SearchEventsRequestToJSON(json: any): SearchEventsRequest {
|
|
75
|
+
return SearchEventsRequestToJSONTyped(json, false);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export function SearchEventsRequestToJSONTyped(value?: SearchEventsRequest | null, ignoreDiscriminator: boolean = false): any {
|
|
79
|
+
if (value == null) {
|
|
80
|
+
return value;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
return {
|
|
84
|
+
|
|
85
|
+
'args': ((value['args'] as Array<any>).map(SearchMarketsRequestArgsInnerToJSON)),
|
|
86
|
+
'credentials': ExchangeCredentialsToJSON(value['credentials']),
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* PMXT Sidecar API
|
|
5
|
+
* A unified local sidecar API for prediction markets (Polymarket, Kalshi). This API acts as a JSON-RPC-style gateway. Each endpoint corresponds to a specific method on the generic exchange implementation.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 0.4.4
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
import type { UnifiedMarket } from './UnifiedMarket';
|
|
17
|
+
import {
|
|
18
|
+
UnifiedMarketFromJSON,
|
|
19
|
+
UnifiedMarketFromJSONTyped,
|
|
20
|
+
UnifiedMarketToJSON,
|
|
21
|
+
UnifiedMarketToJSONTyped,
|
|
22
|
+
} from './UnifiedMarket';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* A grouped collection of related markets (e.g., "Who will be Fed Chair?" contains multiple candidate markets)
|
|
26
|
+
* @export
|
|
27
|
+
* @interface UnifiedEvent
|
|
28
|
+
*/
|
|
29
|
+
export interface UnifiedEvent {
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof UnifiedEvent
|
|
34
|
+
*/
|
|
35
|
+
id?: string;
|
|
36
|
+
/**
|
|
37
|
+
*
|
|
38
|
+
* @type {string}
|
|
39
|
+
* @memberof UnifiedEvent
|
|
40
|
+
*/
|
|
41
|
+
title?: string;
|
|
42
|
+
/**
|
|
43
|
+
*
|
|
44
|
+
* @type {string}
|
|
45
|
+
* @memberof UnifiedEvent
|
|
46
|
+
*/
|
|
47
|
+
description?: string;
|
|
48
|
+
/**
|
|
49
|
+
*
|
|
50
|
+
* @type {string}
|
|
51
|
+
* @memberof UnifiedEvent
|
|
52
|
+
*/
|
|
53
|
+
slug?: string;
|
|
54
|
+
/**
|
|
55
|
+
*
|
|
56
|
+
* @type {Array<UnifiedMarket>}
|
|
57
|
+
* @memberof UnifiedEvent
|
|
58
|
+
*/
|
|
59
|
+
markets?: Array<UnifiedMarket>;
|
|
60
|
+
/**
|
|
61
|
+
*
|
|
62
|
+
* @type {string}
|
|
63
|
+
* @memberof UnifiedEvent
|
|
64
|
+
*/
|
|
65
|
+
url?: string;
|
|
66
|
+
/**
|
|
67
|
+
*
|
|
68
|
+
* @type {string}
|
|
69
|
+
* @memberof UnifiedEvent
|
|
70
|
+
*/
|
|
71
|
+
image?: string;
|
|
72
|
+
/**
|
|
73
|
+
*
|
|
74
|
+
* @type {string}
|
|
75
|
+
* @memberof UnifiedEvent
|
|
76
|
+
*/
|
|
77
|
+
category?: string;
|
|
78
|
+
/**
|
|
79
|
+
*
|
|
80
|
+
* @type {Array<string>}
|
|
81
|
+
* @memberof UnifiedEvent
|
|
82
|
+
*/
|
|
83
|
+
tags?: Array<string>;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* Check if a given object implements the UnifiedEvent interface.
|
|
88
|
+
*/
|
|
89
|
+
export function instanceOfUnifiedEvent(value: object): value is UnifiedEvent {
|
|
90
|
+
return true;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
export function UnifiedEventFromJSON(json: any): UnifiedEvent {
|
|
94
|
+
return UnifiedEventFromJSONTyped(json, false);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
export function UnifiedEventFromJSONTyped(json: any, ignoreDiscriminator: boolean): UnifiedEvent {
|
|
98
|
+
if (json == null) {
|
|
99
|
+
return json;
|
|
100
|
+
}
|
|
101
|
+
return {
|
|
102
|
+
|
|
103
|
+
'id': json['id'] == null ? undefined : json['id'],
|
|
104
|
+
'title': json['title'] == null ? undefined : json['title'],
|
|
105
|
+
'description': json['description'] == null ? undefined : json['description'],
|
|
106
|
+
'slug': json['slug'] == null ? undefined : json['slug'],
|
|
107
|
+
'markets': json['markets'] == null ? undefined : ((json['markets'] as Array<any>).map(UnifiedMarketFromJSON)),
|
|
108
|
+
'url': json['url'] == null ? undefined : json['url'],
|
|
109
|
+
'image': json['image'] == null ? undefined : json['image'],
|
|
110
|
+
'category': json['category'] == null ? undefined : json['category'],
|
|
111
|
+
'tags': json['tags'] == null ? undefined : json['tags'],
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
export function UnifiedEventToJSON(json: any): UnifiedEvent {
|
|
116
|
+
return UnifiedEventToJSONTyped(json, false);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
export function UnifiedEventToJSONTyped(value?: UnifiedEvent | null, ignoreDiscriminator: boolean = false): any {
|
|
120
|
+
if (value == null) {
|
|
121
|
+
return value;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
return {
|
|
125
|
+
|
|
126
|
+
'id': value['id'],
|
|
127
|
+
'title': value['title'],
|
|
128
|
+
'description': value['description'],
|
|
129
|
+
'slug': value['slug'],
|
|
130
|
+
'markets': value['markets'] == null ? undefined : ((value['markets'] as Array<any>).map(UnifiedMarketToJSON)),
|
|
131
|
+
'url': value['url'],
|
|
132
|
+
'image': value['image'],
|
|
133
|
+
'category': value['category'],
|
|
134
|
+
'tags': value['tags'],
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
|
|
@@ -34,9 +34,12 @@ export * from './OrderBook';
|
|
|
34
34
|
export * from './OrderLevel';
|
|
35
35
|
export * from './Position';
|
|
36
36
|
export * from './PriceCandle';
|
|
37
|
+
export * from './SearchEvents200Response';
|
|
38
|
+
export * from './SearchEventsRequest';
|
|
37
39
|
export * from './SearchMarketsRequest';
|
|
38
40
|
export * from './SearchMarketsRequestArgsInner';
|
|
39
41
|
export * from './Trade';
|
|
42
|
+
export * from './UnifiedEvent';
|
|
40
43
|
export * from './UnifiedMarket';
|
|
41
44
|
export * from './WatchOrderBookRequest';
|
|
42
45
|
export * from './WatchOrderBookRequestArgsInner';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pmxtjs",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.1",
|
|
4
4
|
"description": "Unified prediction market data API - The ccxt for prediction markets",
|
|
5
5
|
"author": "PMXT Contributors",
|
|
6
6
|
"repository": {
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"unified"
|
|
43
43
|
],
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"pmxt-core": "1.
|
|
45
|
+
"pmxt-core": "1.3.1"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"@types/jest": "^30.0.0",
|