@structbuild/sdk 0.5.1 → 0.5.3

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.
@@ -254,6 +254,26 @@ export interface paths {
254
254
  patch?: never;
255
255
  trace?: never;
256
256
  };
257
+ "/polymarket/builders/search": {
258
+ parameters: {
259
+ query?: never;
260
+ header?: never;
261
+ path?: never;
262
+ cookie?: never;
263
+ };
264
+ /**
265
+ * Search builders by name or code
266
+ * @description Returns builder metadata rows matching the query. Matches against `name` and `builder_code` (the `0x` prefix is optional). Results are sorted alphabetically by name and paginated.
267
+ */
268
+ get: operations["search_builders"];
269
+ put?: never;
270
+ post?: never;
271
+ delete?: never;
272
+ options?: never;
273
+ head?: never;
274
+ patch?: never;
275
+ trace?: never;
276
+ };
257
277
  "/polymarket/builders/tags/{tag}": {
258
278
  parameters: {
259
279
  query?: never;
@@ -1242,8 +1262,8 @@ export interface paths {
1242
1262
  cookie?: never;
1243
1263
  };
1244
1264
  /**
1245
- * Search events, markets, and traders
1246
- * @description Search across markets, events, and traders. Use `type` to limit which categories are searched. Trader search supports wallet address lookup or name search. Results for each category are independently paginated. Only requested categories are included in the response.
1265
+ * Search events, markets, traders, and builders
1266
+ * @description Search across markets, events, traders, and builders. Use `type` to limit which categories are searched. Trader search supports wallet address lookup or name search; builder search matches against builder name and builder_code. Results for each category are independently paginated. Only requested categories are included in the response.
1247
1267
  */
1248
1268
  get: operations["search"];
1249
1269
  put?: never;
@@ -2107,6 +2127,11 @@ export interface components {
2107
2127
  };
2108
2128
  /** @description Per-metric percentage change for a builder over the requested lookback window. */
2109
2129
  BuilderPctChange: {
2130
+ /**
2131
+ * @description The builder this response is about. Always populated, even when no
2132
+ * activity exists in either the current or previous window.
2133
+ */
2134
+ builder_code: string;
2110
2135
  /** Format: double */
2111
2136
  volume_usd: number;
2112
2137
  /** Format: double */
@@ -2453,22 +2478,20 @@ export interface components {
2453
2478
  av: number;
2454
2479
  };
2455
2480
  /**
2456
- * @description Wrapped response: an array of bucket rows plus a top-level
2457
- * `builder_metadata` lookup. Metadata is keyed by `builder_code` and
2458
- * returned once per builder rather than duplicated on every row, since
2459
- * composition responses can carry hundreds of rows per builder.
2481
+ * @description Composition response: bucket rows plus a top-level `builder_metadata`
2482
+ * lookup keyed by `builder_code`. Metadata is returned once per builder
2483
+ * here rather than embedded on each bucket row.
2460
2484
  */
2461
2485
  CompositionResponse: {
2462
2486
  /** @description Bucket rows, ordered ascending by `t` and then by `r` within each bucket. */
2463
2487
  data: components["schemas"]["CompositionBucketRow"][];
2464
2488
  /**
2465
- * @description Display metadata for each unique builder code present in `data`.
2466
- * Builders with no registered metadata are absent from the map. The
2467
- * synthetic `"other"` aggregate row is never present here.
2489
+ * @description Display metadata for each unique builder code present in `data`,
2490
+ * keyed by `builder_code`. Builders with no registered metadata are
2491
+ * absent from the map. The synthetic `"other"` aggregate row is never
2492
+ * a key here.
2468
2493
  */
2469
- builder_metadata: {
2470
- [key: string]: components["schemas"]["BuilderMetadataInline"];
2471
- };
2494
+ builder_metadata: Record<string, never>;
2472
2495
  };
2473
2496
  /**
2474
2497
  * @description Series mode — cumulative end-of-bucket snapshot or in-bucket delta.
@@ -2476,6 +2499,11 @@ export interface components {
2476
2499
  */
2477
2500
  CompositionSeries: "cumulative" | "delta";
2478
2501
  ConcentrationResponse: {
2502
+ /**
2503
+ * @description The builder this response is about. Always populated, even when the
2504
+ * builder has no activity in the window (the rest of the fields are 0).
2505
+ */
2506
+ builder_code: string;
2479
2507
  /**
2480
2508
  * Format: double
2481
2509
  * @description Total volume in the window across every trader of this builder.
@@ -2874,22 +2902,22 @@ export interface components {
2874
2902
  buy_dist_50k_plus: number;
2875
2903
  /**
2876
2904
  * Format: int64
2877
- * @description Estimated total number of tags.
2905
+ * @description Total number of tags.
2878
2906
  */
2879
2907
  tags: number;
2880
2908
  /**
2881
2909
  * Format: int64
2882
- * @description Estimated total number of events.
2910
+ * @description Total number of events.
2883
2911
  */
2884
2912
  events: number;
2885
2913
  /**
2886
2914
  * Format: int64
2887
- * @description Estimated total number of markets.
2915
+ * @description Total number of markets.
2888
2916
  */
2889
2917
  markets: number;
2890
2918
  /**
2891
2919
  * Format: int64
2892
- * @description Estimated total number of unique positions / traders.
2920
+ * @description Total number of unique positions / traders.
2893
2921
  */
2894
2922
  positions: number;
2895
2923
  };
@@ -3936,6 +3964,10 @@ export interface components {
3936
3964
  index_set: string;
3937
3965
  /** Format: double */
3938
3966
  shares_amount: number;
3967
+ /** Format: double */
3968
+ fee?: number | null;
3969
+ /** Format: double */
3970
+ fee_pct?: number | null;
3939
3971
  exchange: components["schemas"]["PolymarketExchange"];
3940
3972
  };
3941
3973
  PredictionCandlestickBar: {
@@ -4297,6 +4329,8 @@ export interface components {
4297
4329
  markets_pagination?: null | components["schemas"]["PaginationMeta"];
4298
4330
  traders?: components["schemas"]["TraderWithPnl"][] | null;
4299
4331
  traders_pagination?: null | components["schemas"]["PaginationMeta"];
4332
+ builders?: components["schemas"]["BuilderMetadata"][] | null;
4333
+ builders_pagination?: null | components["schemas"]["PaginationMeta"];
4300
4334
  };
4301
4335
  /**
4302
4336
  * @description Combined sort options valid for both events and markets in search
@@ -5524,6 +5558,42 @@ export interface operations {
5524
5558
  };
5525
5559
  };
5526
5560
  };
5561
+ search_builders: {
5562
+ parameters: {
5563
+ query: {
5564
+ /** @description Search query (min 2 characters). */
5565
+ q: string;
5566
+ /** @description Max results per page (default 10, max 50). */
5567
+ limit?: number;
5568
+ /** @description Offset for pagination (default 0). Takes precedence over `pagination_key`. */
5569
+ offset?: number;
5570
+ /** @description Opaque cursor from a previous response. */
5571
+ pagination_key?: string;
5572
+ };
5573
+ header?: never;
5574
+ path?: never;
5575
+ cookie?: never;
5576
+ };
5577
+ requestBody?: never;
5578
+ responses: {
5579
+ /** @description Matching builder metadata rows. */
5580
+ 200: {
5581
+ headers: {
5582
+ [name: string]: unknown;
5583
+ };
5584
+ content: {
5585
+ "application/json": components["schemas"]["BuilderMetadata"][];
5586
+ };
5587
+ };
5588
+ /** @description Bad request — `q` is missing or shorter than 2 characters. */
5589
+ 400: {
5590
+ headers: {
5591
+ [name: string]: unknown;
5592
+ };
5593
+ content?: never;
5594
+ };
5595
+ };
5596
+ };
5527
5597
  list_tag_builders: {
5528
5598
  parameters: {
5529
5599
  query?: {
@@ -7534,7 +7604,7 @@ export interface operations {
7534
7604
  query: {
7535
7605
  /** @description Search query (min 2 characters). Prefix with 0x for exact wallet address lookup. */
7536
7606
  q: string;
7537
- /** @description Comma-separated categories to search: events, markets, traders (default: all three, 1 credit per type). Example: type=markets,traders */
7607
+ /** @description Comma-separated categories to search: events, markets, traders, builders (default: all four, 1 credit per type). Example: type=markets,builders */
7538
7608
  type?: string;
7539
7609
  /** @description Include lifetime PnL summary for each trader (default: false, +1 credit) */
7540
7610
  include_pnl?: boolean;
@@ -7552,6 +7622,8 @@ export interface operations {
7552
7622
  markets_pagination_key?: string;
7553
7623
  /** @description Cursor for the next page of traders, obtained from previous response's traders_pagination.pagination_key */
7554
7624
  traders_pagination_key?: string;
7625
+ /** @description Cursor for the next page of builders, obtained from previous response's builders_pagination.pagination_key */
7626
+ builders_pagination_key?: string;
7555
7627
  };
7556
7628
  header?: never;
7557
7629
  path?: never;