@structbuild/sdk 0.3.10-staging.3 → 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.
@@ -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;
@@ -2448,6 +2448,26 @@ export interface components {
2448
2448
  label: string;
2449
2449
  /** @default null */
2450
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;
2451
2471
  };
2452
2472
  /** @description Polymarket user profile (public API format) */
2453
2473
  PolymarketUserProfile: {
@@ -2959,6 +2979,20 @@ export interface components {
2959
2979
  /** Format: int32 */
2960
2980
  ask_levels?: number | null;
2961
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";
2962
2996
  /**
2963
2997
  * @description Timeseries bucket row.
2964
2998
  * Short field names for compact JSON responses:
@@ -5192,8 +5226,12 @@ export interface operations {
5192
5226
  limit?: number;
5193
5227
  /** @description Offset-based pagination (number of results to skip). Takes precedence over pagination_key. */
5194
5228
  offset?: number;
5195
- /** @description Cursor-based pagination key */
5229
+ /** @description Cursor-based pagination key (alphabetical mode only). */
5196
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"];
5197
5235
  };
5198
5236
  header?: never;
5199
5237
  path?: never;
@@ -53,6 +53,8 @@ export type Event = Omit<Schemas["PolymarketEvent"], "metrics"> & {
53
53
  };
54
54
  export type PolymarketSeries = Schemas["PolymarketSeries"];
55
55
  export type Tag = Schemas["PolymarketTag"];
56
+ export type TagSortBy = Schemas["TagSortBy"];
57
+ export type TagSortTimeframe = Schemas["TagSortTimeframe"];
56
58
  export type UserProfile = Schemas["PolymarketUserProfile"];
57
59
  export type PositionHoldersResponse = Schemas["PositionHoldersResponse"];
58
60
  export type PositionStatus = Schemas["PositionStatus"];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@structbuild/sdk",
3
- "version": "0.3.10-staging.3",
3
+ "version": "0.3.10-staging.4",
4
4
  "type": "module",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.js",