@structbuild/sdk 0.3.10-staging.2 → 0.3.10-staging.4
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/generated/polymarket.d.ts +69 -23
- package/dist/types/index.d.ts +3 -0
- package/package.json +1 -1
|
@@ -852,7 +852,7 @@ export interface paths {
|
|
|
852
852
|
};
|
|
853
853
|
/**
|
|
854
854
|
* Get tags
|
|
855
|
-
* @description Retrieve all available event tags/categories. Supports both cursor-based and offset-based pagination.
|
|
855
|
+
* @description Retrieve all available event tags/categories. Supports both cursor-based and offset-based pagination. Pass `sort=<metric>` to order tags by a traded-volume-style metric — requires `timeframe` to pick the window.
|
|
856
856
|
*/
|
|
857
857
|
get: operations["get_tags"];
|
|
858
858
|
put?: never;
|
|
@@ -1247,6 +1247,14 @@ export interface paths {
|
|
|
1247
1247
|
export type webhooks = Record<string, never>;
|
|
1248
1248
|
export interface components {
|
|
1249
1249
|
schemas: {
|
|
1250
|
+
/**
|
|
1251
|
+
* @description Resolution for `/analytics/timeseries` and `/analytics/deltas`.
|
|
1252
|
+
* Superset of `CandlestickResolution` — adds 7-day (`W`/`1W`) and calendar
|
|
1253
|
+
* month (`M`/`1M`) buckets, which are pre-aggregated for global and tag
|
|
1254
|
+
* domains and re-bucketed from the `_1d` MV for market/event/trader.
|
|
1255
|
+
* @enum {string}
|
|
1256
|
+
*/
|
|
1257
|
+
AnalyticsResolution: "1" | "5" | "15" | "30" | "60" | "240" | "D" | "1D" | "W" | "1W" | "M" | "1M";
|
|
1250
1258
|
/** @description Output payload for ERC1155 setApprovalForAll events. */
|
|
1251
1259
|
ApprovalTrade: {
|
|
1252
1260
|
id: string;
|
|
@@ -2440,6 +2448,26 @@ export interface components {
|
|
|
2440
2448
|
label: string;
|
|
2441
2449
|
/** @default null */
|
|
2442
2450
|
slug: string | null;
|
|
2451
|
+
/**
|
|
2452
|
+
* Format: double
|
|
2453
|
+
* @default null
|
|
2454
|
+
*/
|
|
2455
|
+
volume_usd: number;
|
|
2456
|
+
/**
|
|
2457
|
+
* Format: int64
|
|
2458
|
+
* @default null
|
|
2459
|
+
*/
|
|
2460
|
+
txn_count: number;
|
|
2461
|
+
/**
|
|
2462
|
+
* Format: int64
|
|
2463
|
+
* @default null
|
|
2464
|
+
*/
|
|
2465
|
+
unique_traders: number;
|
|
2466
|
+
/**
|
|
2467
|
+
* Format: double
|
|
2468
|
+
* @default null
|
|
2469
|
+
*/
|
|
2470
|
+
fees_usd: number;
|
|
2443
2471
|
};
|
|
2444
2472
|
/** @description Polymarket user profile (public API format) */
|
|
2445
2473
|
PolymarketUserProfile: {
|
|
@@ -2951,6 +2979,20 @@ export interface components {
|
|
|
2951
2979
|
/** Format: int32 */
|
|
2952
2980
|
ask_levels?: number | null;
|
|
2953
2981
|
};
|
|
2982
|
+
/**
|
|
2983
|
+
* @description Metric to order by when `sort=<value>` is provided.
|
|
2984
|
+
* `traders` windowed sums per-block deltas — approximate for the "unique
|
|
2985
|
+
* traders in window" reading (double-counts traders active in multiple
|
|
2986
|
+
* blocks) but fine for ranking. `lifetime` uses the exact cumulative.
|
|
2987
|
+
* @enum {string}
|
|
2988
|
+
*/
|
|
2989
|
+
TagSortBy: "volume" | "txns" | "traders" | "fees";
|
|
2990
|
+
/**
|
|
2991
|
+
* @description Timeframe for `?sort=...` — defines the window the metric is summed over
|
|
2992
|
+
* (or `lifetime` for all-time cumulative).
|
|
2993
|
+
* @enum {string}
|
|
2994
|
+
*/
|
|
2995
|
+
TagSortTimeframe: "lifetime" | "1h" | "24h" | "7d" | "30d" | "1mo" | "1y";
|
|
2954
2996
|
/**
|
|
2955
2997
|
* @description Timeseries bucket row.
|
|
2956
2998
|
* Short field names for compact JSON responses:
|
|
@@ -3332,7 +3374,7 @@ export interface operations {
|
|
|
3332
3374
|
get_global_analytics_changes: {
|
|
3333
3375
|
parameters: {
|
|
3334
3376
|
query: {
|
|
3335
|
-
/** @description Lookback window: 1h, 24h, 7d, 30d, 1y */
|
|
3377
|
+
/** @description Lookback window: 1h, 24h, 7d, 30d, 1mo, 1y */
|
|
3336
3378
|
timeframe: components["schemas"]["ChangeTimeframe"];
|
|
3337
3379
|
};
|
|
3338
3380
|
header?: never;
|
|
@@ -3375,8 +3417,8 @@ export interface operations {
|
|
|
3375
3417
|
get_global_analytics_deltas: {
|
|
3376
3418
|
parameters: {
|
|
3377
3419
|
query?: {
|
|
3378
|
-
/** @description Bucket size: 1, 5, 15, 30, 60, 240, D, 1D (default: 60) */
|
|
3379
|
-
resolution?: components["schemas"]["
|
|
3420
|
+
/** @description Bucket size: 1, 5, 15, 30, 60, 240, D, 1D, W, 1W, M, 1M (default: 60) */
|
|
3421
|
+
resolution?: components["schemas"]["AnalyticsResolution"];
|
|
3380
3422
|
/** @description Start timestamp (Unix seconds). Omit for all-time. */
|
|
3381
3423
|
from?: number;
|
|
3382
3424
|
/** @description End timestamp (Unix seconds) */
|
|
@@ -3406,8 +3448,8 @@ export interface operations {
|
|
|
3406
3448
|
get_global_analytics_timeseries: {
|
|
3407
3449
|
parameters: {
|
|
3408
3450
|
query?: {
|
|
3409
|
-
/** @description Bucket size: 1, 5, 15, 30, 60, 240, D, 1D (default: 60) */
|
|
3410
|
-
resolution?: components["schemas"]["
|
|
3451
|
+
/** @description Bucket size: 1, 5, 15, 30, 60, 240, D, 1D, W, 1W, M, 1M (default: 60) */
|
|
3452
|
+
resolution?: components["schemas"]["AnalyticsResolution"];
|
|
3411
3453
|
/** @description Start timestamp (Unix seconds). Omit for all-time. */
|
|
3412
3454
|
from?: number;
|
|
3413
3455
|
/** @description End timestamp (Unix seconds) */
|
|
@@ -3729,8 +3771,8 @@ export interface operations {
|
|
|
3729
3771
|
get_event_analytics_deltas: {
|
|
3730
3772
|
parameters: {
|
|
3731
3773
|
query?: {
|
|
3732
|
-
/** @description Bucket size: 1, 5, 15, 30, 60, 240, D, 1D (default: 60) */
|
|
3733
|
-
resolution?: components["schemas"]["
|
|
3774
|
+
/** @description Bucket size: 1, 5, 15, 30, 60, 240, D, 1D, W, 1W, M, 1M (default: 60) */
|
|
3775
|
+
resolution?: components["schemas"]["AnalyticsResolution"];
|
|
3734
3776
|
/** @description Start timestamp (Unix seconds) */
|
|
3735
3777
|
from?: number;
|
|
3736
3778
|
/** @description End timestamp (Unix seconds) */
|
|
@@ -3763,8 +3805,8 @@ export interface operations {
|
|
|
3763
3805
|
get_event_analytics_timeseries: {
|
|
3764
3806
|
parameters: {
|
|
3765
3807
|
query?: {
|
|
3766
|
-
/** @description Bucket size: 1, 5, 15, 30, 60, 240, D, 1D (default: 60) */
|
|
3767
|
-
resolution?: components["schemas"]["
|
|
3808
|
+
/** @description Bucket size: 1, 5, 15, 30, 60, 240, D, 1D, W, 1W, M, 1M (default: 60) */
|
|
3809
|
+
resolution?: components["schemas"]["AnalyticsResolution"];
|
|
3768
3810
|
/** @description Start timestamp (Unix seconds) */
|
|
3769
3811
|
from?: number;
|
|
3770
3812
|
/** @description End timestamp (Unix seconds) */
|
|
@@ -4694,8 +4736,8 @@ export interface operations {
|
|
|
4694
4736
|
get_market_analytics_deltas: {
|
|
4695
4737
|
parameters: {
|
|
4696
4738
|
query?: {
|
|
4697
|
-
/** @description Bucket size: 1, 5, 15, 30, 60, 240, D, 1D (default: 60) */
|
|
4698
|
-
resolution?: components["schemas"]["
|
|
4739
|
+
/** @description Bucket size: 1, 5, 15, 30, 60, 240, D, 1D, W, 1W, M, 1M (default: 60) */
|
|
4740
|
+
resolution?: components["schemas"]["AnalyticsResolution"];
|
|
4699
4741
|
/** @description Start timestamp (Unix seconds) */
|
|
4700
4742
|
from?: number;
|
|
4701
4743
|
/** @description End timestamp (Unix seconds) */
|
|
@@ -4728,8 +4770,8 @@ export interface operations {
|
|
|
4728
4770
|
get_market_analytics_timeseries: {
|
|
4729
4771
|
parameters: {
|
|
4730
4772
|
query?: {
|
|
4731
|
-
/** @description Bucket size: 1, 5, 15, 30, 60, 240, D, 1D (default: 60) */
|
|
4732
|
-
resolution?: components["schemas"]["
|
|
4773
|
+
/** @description Bucket size: 1, 5, 15, 30, 60, 240, D, 1D, W, 1W, M, 1M (default: 60) */
|
|
4774
|
+
resolution?: components["schemas"]["AnalyticsResolution"];
|
|
4733
4775
|
/** @description Start timestamp (Unix seconds) */
|
|
4734
4776
|
from?: number;
|
|
4735
4777
|
/** @description End timestamp (Unix seconds) */
|
|
@@ -5184,8 +5226,12 @@ export interface operations {
|
|
|
5184
5226
|
limit?: number;
|
|
5185
5227
|
/** @description Offset-based pagination (number of results to skip). Takes precedence over pagination_key. */
|
|
5186
5228
|
offset?: number;
|
|
5187
|
-
/** @description Cursor-based pagination key */
|
|
5229
|
+
/** @description Cursor-based pagination key (alphabetical mode only). */
|
|
5188
5230
|
pagination_key?: string;
|
|
5231
|
+
/** @description Sort metric (offset-paginated). Omit for default alphabetical listing. */
|
|
5232
|
+
sort?: components["schemas"]["TagSortBy"];
|
|
5233
|
+
/** @description Window for the sort metric. Required when `sort` is set. */
|
|
5234
|
+
timeframe?: components["schemas"]["TagSortTimeframe"];
|
|
5189
5235
|
};
|
|
5190
5236
|
header?: never;
|
|
5191
5237
|
path?: never;
|
|
@@ -5263,8 +5309,8 @@ export interface operations {
|
|
|
5263
5309
|
get_tag_analytics_deltas: {
|
|
5264
5310
|
parameters: {
|
|
5265
5311
|
query?: {
|
|
5266
|
-
/** @description Bucket size: 1, 5, 15, 30, 60, 240, D, 1D (default: 60) */
|
|
5267
|
-
resolution?: components["schemas"]["
|
|
5312
|
+
/** @description Bucket size: 1, 5, 15, 30, 60, 240, D, 1D, W, 1W, M, 1M (default: 60) */
|
|
5313
|
+
resolution?: components["schemas"]["AnalyticsResolution"];
|
|
5268
5314
|
/** @description Start timestamp (Unix seconds) */
|
|
5269
5315
|
from?: number;
|
|
5270
5316
|
/** @description End timestamp (Unix seconds) */
|
|
@@ -5297,8 +5343,8 @@ export interface operations {
|
|
|
5297
5343
|
get_tag_analytics_timeseries: {
|
|
5298
5344
|
parameters: {
|
|
5299
5345
|
query?: {
|
|
5300
|
-
/** @description Bucket size: 1, 5, 15, 30, 60, 240, D, 1D (default: 60) */
|
|
5301
|
-
resolution?: components["schemas"]["
|
|
5346
|
+
/** @description Bucket size: 1, 5, 15, 30, 60, 240, D, 1D, W, 1W, M, 1M (default: 60) */
|
|
5347
|
+
resolution?: components["schemas"]["AnalyticsResolution"];
|
|
5302
5348
|
/** @description Start timestamp (Unix seconds) */
|
|
5303
5349
|
from?: number;
|
|
5304
5350
|
/** @description End timestamp (Unix seconds) */
|
|
@@ -5792,8 +5838,8 @@ export interface operations {
|
|
|
5792
5838
|
get_trader_analytics_deltas: {
|
|
5793
5839
|
parameters: {
|
|
5794
5840
|
query?: {
|
|
5795
|
-
/** @description Bucket size: 1, 5, 15, 30, 60, 240, D, 1D (default: 60) */
|
|
5796
|
-
resolution?: components["schemas"]["
|
|
5841
|
+
/** @description Bucket size: 1, 5, 15, 30, 60, 240, D, 1D, W, 1W, M, 1M (default: 60) */
|
|
5842
|
+
resolution?: components["schemas"]["AnalyticsResolution"];
|
|
5797
5843
|
/** @description Start timestamp (Unix seconds) */
|
|
5798
5844
|
from?: number;
|
|
5799
5845
|
/** @description End timestamp (Unix seconds) */
|
|
@@ -5826,8 +5872,8 @@ export interface operations {
|
|
|
5826
5872
|
get_trader_analytics_timeseries: {
|
|
5827
5873
|
parameters: {
|
|
5828
5874
|
query?: {
|
|
5829
|
-
/** @description Bucket size: 1, 5, 15, 30, 60, 240, D, 1D (default: 60) */
|
|
5830
|
-
resolution?: components["schemas"]["
|
|
5875
|
+
/** @description Bucket size: 1, 5, 15, 30, 60, 240, D, 1D, W, 1W, M, 1M (default: 60) */
|
|
5876
|
+
resolution?: components["schemas"]["AnalyticsResolution"];
|
|
5831
5877
|
/** @description Start timestamp (Unix seconds) */
|
|
5832
5878
|
from?: number;
|
|
5833
5879
|
/** @description End timestamp (Unix seconds) */
|
package/dist/types/index.d.ts
CHANGED
|
@@ -9,6 +9,7 @@ import type { Schemas, OperationQuery } from "./helpers.js";
|
|
|
9
9
|
import type { WebhookSchemas, WebhookOperationQuery, WebhookOperationRequestBody } from "./webhook-helpers.js";
|
|
10
10
|
type TimeframeKey = Schemas["MetricsTimeframe"];
|
|
11
11
|
type TimeframeRecord<V> = Partial<Record<TimeframeKey, V>>;
|
|
12
|
+
export type AnalyticsResolution = Schemas["AnalyticsResolution"];
|
|
12
13
|
export type BondMarket = Schemas["BondMarket"];
|
|
13
14
|
export type BondOutcome = Schemas["BondOutcome"];
|
|
14
15
|
export type BondsSortBy = Schemas["BondsSortBy"];
|
|
@@ -52,6 +53,8 @@ export type Event = Omit<Schemas["PolymarketEvent"], "metrics"> & {
|
|
|
52
53
|
};
|
|
53
54
|
export type PolymarketSeries = Schemas["PolymarketSeries"];
|
|
54
55
|
export type Tag = Schemas["PolymarketTag"];
|
|
56
|
+
export type TagSortBy = Schemas["TagSortBy"];
|
|
57
|
+
export type TagSortTimeframe = Schemas["TagSortTimeframe"];
|
|
55
58
|
export type UserProfile = Schemas["PolymarketUserProfile"];
|
|
56
59
|
export type PositionHoldersResponse = Schemas["PositionHoldersResponse"];
|
|
57
60
|
export type PositionStatus = Schemas["PositionStatus"];
|