@structbuild/sdk 0.1.24 → 0.2.0
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/client.d.ts +2 -1
- package/dist/generated/polymarket.d.ts +554 -12
- package/dist/generated/webhooks.d.ts +4 -4
- package/dist/index.cjs +18 -1
- package/dist/index.cjs.map +5 -4
- package/dist/index.js +18 -1
- package/dist/index.js.map +5 -4
- package/dist/namespaces/index.d.ts +1 -0
- package/dist/namespaces/orderBook.d.ts +10 -0
- package/dist/types/index.d.ts +27 -4
- package/package.json +1 -1
package/dist/types/index.d.ts
CHANGED
|
@@ -4,6 +4,8 @@ export type { WebhookSchemas, WebhookOperationQuery, WebhookOperationPath, Webho
|
|
|
4
4
|
export type { components as WebhookComponents, operations as WebhookOperations, paths as WebhookPaths, } from "../generated/webhooks.js";
|
|
5
5
|
import type { Schemas, OperationQuery } from "./helpers.js";
|
|
6
6
|
import type { WebhookSchemas, WebhookOperationQuery, WebhookOperationRequestBody } from "./webhook-helpers.js";
|
|
7
|
+
type TimeframeKey = Schemas["MetricsTimeframe"];
|
|
8
|
+
type TimeframeRecord<V> = Partial<Record<TimeframeKey, V>>;
|
|
7
9
|
export type BondMarket = Schemas["BondMarket"];
|
|
8
10
|
export type BondOutcome = Schemas["BondOutcome"];
|
|
9
11
|
export type CandlestickResolution = Schemas["CandlestickResolution"];
|
|
@@ -20,8 +22,12 @@ export type Holder = Schemas["Holder"];
|
|
|
20
22
|
export type HolderHistoryCandle = Schemas["HolderHistoryCandle"];
|
|
21
23
|
export type MarketHolderPnl = Schemas["MarketHolderPnl"];
|
|
22
24
|
export type MarketHoldersResponse = Schemas["MarketHoldersResponse"];
|
|
23
|
-
export type MarketMetadata = Schemas["MarketMetadata"]
|
|
24
|
-
|
|
25
|
+
export type MarketMetadata = Omit<Schemas["MarketMetadata"], "metrics"> & {
|
|
26
|
+
metrics: TimeframeRecord<number>;
|
|
27
|
+
};
|
|
28
|
+
export type MarketMetadataOutcome = Omit<Schemas["MarketMetadataOutcome"], "metrics"> & {
|
|
29
|
+
metrics?: TimeframeRecord<OutcomeTimeframeMetrics>;
|
|
30
|
+
};
|
|
25
31
|
export type MarketOutcome = Schemas["MarketOutcome"];
|
|
26
32
|
export type MarketPnlSortBy = Schemas["MarketPnlSortBy"];
|
|
27
33
|
export type MarketVolumeChartResponse = Schemas["MarketVolumeChartResponse"];
|
|
@@ -32,7 +38,9 @@ export type OutcomeTimeframeMetrics = Schemas["OutcomeTimeframeMetrics"];
|
|
|
32
38
|
export type PaginationMeta = Schemas["PaginationMeta"];
|
|
33
39
|
export type PnlCandleResolution = Schemas["PnlCandleResolution"];
|
|
34
40
|
export type PnlTimeframe = Schemas["PnlTimeframe"];
|
|
35
|
-
export type Event = Schemas["PolymarketEvent"]
|
|
41
|
+
export type Event = Omit<Schemas["PolymarketEvent"], "metrics"> & {
|
|
42
|
+
metrics: TimeframeRecord<SimpleTimeframeMetrics>;
|
|
43
|
+
};
|
|
36
44
|
export type PolymarketSeries = Schemas["PolymarketSeries"];
|
|
37
45
|
export type Tag = Schemas["PolymarketTag"];
|
|
38
46
|
export type UserProfile = Schemas["PolymarketUserProfile"];
|
|
@@ -62,7 +70,9 @@ export type AssetSymbol = Schemas["AssetSymbol"];
|
|
|
62
70
|
export type AssetVariant = Schemas["AssetVariant"];
|
|
63
71
|
export type PriceJump = Schemas["PriceJump"];
|
|
64
72
|
export type EventMarketChartDataPoint = Schemas["EventMarketChartDataPoint"];
|
|
65
|
-
export type MarketResponse = Schemas["MarketResponse"]
|
|
73
|
+
export type MarketResponse = Omit<Schemas["MarketResponse"], "metrics"> & {
|
|
74
|
+
metrics?: TimeframeRecord<SimpleTimeframeMetrics>;
|
|
75
|
+
};
|
|
66
76
|
export type MarketReward = Schemas["MarketReward"];
|
|
67
77
|
export type MarketSortBy = Schemas["MarketSortBy"];
|
|
68
78
|
export type MarketStatus = Schemas["MarketStatus"];
|
|
@@ -71,6 +81,11 @@ export type PositionChartDataPoint = Schemas["PositionChartDataPoint"];
|
|
|
71
81
|
export type TradeType = Schemas["TradeType"];
|
|
72
82
|
export type WebhookAssetSymbol = Schemas["WebhookAssetSymbol"];
|
|
73
83
|
export type WebhookTimeframe = Schemas["WebhookTimeframe"];
|
|
84
|
+
export type ConditionOrderbookRow = Schemas["ConditionOrderbookRow"];
|
|
85
|
+
export type OrderbookHistoryRow = Schemas["OrderbookHistoryRow"];
|
|
86
|
+
export type OrderbookLevel = Schemas["OrderbookLevel"];
|
|
87
|
+
export type OrderbookSnapshotRow = Schemas["OrderbookSnapshotRow"];
|
|
88
|
+
export type SpreadRow = Schemas["SpreadRow"];
|
|
74
89
|
export type Series = Schemas["PolymarketSeries"];
|
|
75
90
|
export type Trade = Schemas["PredictionTradeResponse"];
|
|
76
91
|
export type Candlestick = Schemas["PredictionCandlestickBar"];
|
|
@@ -141,6 +156,14 @@ export interface TraderSearchResult {
|
|
|
141
156
|
x_username?: string;
|
|
142
157
|
verified_badge: boolean;
|
|
143
158
|
}
|
|
159
|
+
export interface GetOrderBookParams extends OperationQuery<"get_order_book"> {
|
|
160
|
+
}
|
|
161
|
+
export interface GetOrderBookHistoryParams extends OperationQuery<"get_order_book_history"> {
|
|
162
|
+
}
|
|
163
|
+
export interface GetMarketOrderBookParams extends OperationQuery<"get_market_order_book"> {
|
|
164
|
+
}
|
|
165
|
+
export interface GetSpreadHistoryParams extends OperationQuery<"get_spread_history"> {
|
|
166
|
+
}
|
|
144
167
|
export interface GetAssetHistoryParams extends OperationQuery<"get_asset_history"> {
|
|
145
168
|
}
|
|
146
169
|
export interface GetBondsParams extends OperationQuery<"get_bonds"> {
|