@structbuild/sdk 0.3.10-staging.4 → 0.3.10-staging.5

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. Pass `sort=<metric>` to order tags by a traded-volume-style metric requires `timeframe` to pick the window.
855
+ * @description Retrieve all available event tags/categories. Default listing is alphabetical (cursor-paginated). If either `sort` or `timeframe` is provided, the listing is ranked by the chosen metric+window (offset-paginated): sort defaults to `volume` when only `timeframe` is set, timeframe defaults to `24h` when only `sort` is set.
856
856
  */
857
857
  get: operations["get_tags"];
858
858
  put?: never;
@@ -872,7 +872,7 @@ export interface paths {
872
872
  };
873
873
  /**
874
874
  * Get tag by slug
875
- * @description Retrieve a single tag by its ID or slug
875
+ * @description Retrieve a single tag by its ID or slug. Pass `include_metrics=true` to attach analytics metrics (volume_usd, txn_count, unique_traders, fees_usd) — adds +1 credit. Use `timeframe` to select the window; defaults to `1d`.
876
876
  */
877
877
  get: operations["get_tag_by_id"];
878
878
  put?: never;
@@ -1641,8 +1641,7 @@ export interface components {
1641
1641
  EventSortBy: "volume" | "txns" | "unique_traders" | "title" | "creation_date" | "start_date" | "end_date" | "relevance";
1642
1642
  /**
1643
1643
  * @description Response body for `GET /polymarket/analytics/counts`.
1644
- * Cumulative analytics metrics (from ClickHouse `analytics_global`) plus
1645
- * entity-count enrichment (from Postgres `pg_class.reltuples` estimates).
1644
+ * Cumulative analytics metrics plus entity-count enrichment.
1646
1645
  */
1647
1646
  GlobalCountsResponse: {
1648
1647
  /**
@@ -1691,22 +1690,22 @@ export interface components {
1691
1690
  no_count: number;
1692
1691
  /**
1693
1692
  * Format: int64
1694
- * @description Estimated row count of `polymarket_tags` (Postgres pg_class.reltuples).
1693
+ * @description Estimated total number of tags.
1695
1694
  */
1696
1695
  tags: number;
1697
1696
  /**
1698
1697
  * Format: int64
1699
- * @description Estimated row count of `polymarket_events`.
1698
+ * @description Estimated total number of events.
1700
1699
  */
1701
1700
  events: number;
1702
1701
  /**
1703
1702
  * Format: int64
1704
- * @description Estimated row count of `prediction_markets`.
1703
+ * @description Estimated total number of markets.
1705
1704
  */
1706
1705
  markets: number;
1707
1706
  /**
1708
1707
  * Format: int64
1709
- * @description Estimated row count of `polymarket_accounts` (traders / positions).
1708
+ * @description Estimated total number of unique positions / traders.
1710
1709
  */
1711
1710
  positions: number;
1712
1711
  };
@@ -2994,11 +2993,16 @@ export interface components {
2994
2993
  */
2995
2994
  TagSortTimeframe: "lifetime" | "1h" | "24h" | "7d" | "30d" | "1mo" | "1y";
2996
2995
  /**
2997
- * @description Timeseries bucket row.
2996
+ * @description Bucket row returned by both `/analytics/timeseries` (cumulative values
2997
+ * at end of bucket) and `/analytics/deltas` (per-bucket deltas). All metrics
2998
+ * the snapshot `/counts` returns are included.
2999
+ *
2998
3000
  * Short field names for compact JSON responses:
2999
3001
  * t=bucket (unix seconds), v=volume_usd, bv=buy_volume_usd, sv=sell_volume_usd,
3000
- * ut=unique_traders, tc=txn_count, f=fees_usd, sh=shares_volume,
3001
- * yv=yes_volume_usd, nv=no_volume_usd
3002
+ * ut=unique_traders, tc=txn_count, bc=buy_count, sc=sell_count,
3003
+ * rc=redemption_count, rv=redemption_volume_usd, mc=merge_count,
3004
+ * sp=split_count, f=fees_usd, sh=shares_volume,
3005
+ * yv=yes_volume_usd, nv=no_volume_usd, yc=yes_count, nc=no_count
3002
3006
  */
3003
3007
  TimeBucketRow: {
3004
3008
  /** Format: int32 */
@@ -3013,6 +3017,18 @@ export interface components {
3013
3017
  ut: number;
3014
3018
  /** Format: int64 */
3015
3019
  tc: number;
3020
+ /** Format: int64 */
3021
+ bc: number;
3022
+ /** Format: int64 */
3023
+ sc: number;
3024
+ /** Format: int64 */
3025
+ rc: number;
3026
+ /** Format: double */
3027
+ rv: number;
3028
+ /** Format: int64 */
3029
+ mc: number;
3030
+ /** Format: int64 */
3031
+ sp: number;
3016
3032
  /** Format: double */
3017
3033
  f: number;
3018
3034
  /** Format: double */
@@ -3021,6 +3037,10 @@ export interface components {
3021
3037
  yv: number;
3022
3038
  /** Format: double */
3023
3039
  nv: number;
3040
+ /** Format: int64 */
3041
+ yc: number;
3042
+ /** Format: int64 */
3043
+ nc: number;
3024
3044
  };
3025
3045
  /** @description Token outcome (position) */
3026
3046
  TokenOutcome: {
@@ -5228,9 +5248,9 @@ export interface operations {
5228
5248
  offset?: number;
5229
5249
  /** @description Cursor-based pagination key (alphabetical mode only). */
5230
5250
  pagination_key?: string;
5231
- /** @description Sort metric (offset-paginated). Omit for default alphabetical listing. */
5251
+ /** @description Sort metric. Defaults to `volume` when only `timeframe` is set. Setting either `sort` or `timeframe` adds +2 credits. */
5232
5252
  sort?: components["schemas"]["TagSortBy"];
5233
- /** @description Window for the sort metric. Required when `sort` is set. */
5253
+ /** @description Window for the sort metric. Defaults to `24h` when only `sort` is set. Setting either `sort` or `timeframe` adds +2 credits. */
5234
5254
  timeframe?: components["schemas"]["TagSortTimeframe"];
5235
5255
  };
5236
5256
  header?: never;
@@ -5252,7 +5272,12 @@ export interface operations {
5252
5272
  };
5253
5273
  get_tag_by_id: {
5254
5274
  parameters: {
5255
- query?: never;
5275
+ query?: {
5276
+ /** @description Attach analytics metrics. +1 credit. */
5277
+ include_metrics?: boolean;
5278
+ /** @description Metrics window. Default `1d` (= `24h`). Ignored unless `include_metrics=true`. */
5279
+ timeframe?: components["schemas"]["TagSortTimeframe"];
5280
+ };
5256
5281
  header?: never;
5257
5282
  path: {
5258
5283
  /** @description Tag ID or slug */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@structbuild/sdk",
3
- "version": "0.3.10-staging.4",
3
+ "version": "0.3.10-staging.5",
4
4
  "type": "module",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.js",