@structbuild/sdk 0.5.0 → 0.5.1

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.
@@ -2069,7 +2069,21 @@ export interface components {
2069
2069
  */
2070
2070
  builder_taker_fee_rate_bps: number;
2071
2071
  };
2072
- /** @description One row of `polymarket_builder_metadata`. */
2072
+ /**
2073
+ * @description Documentation-only response shape for endpoints that embed display
2074
+ * metadata onto each row (`/`, `/{builder_code}`, `/tags/{tag}`). Mirrors
2075
+ * `BuilderLatestRow` and adds a nullable `metadata` field. Not used as a
2076
+ * data structure at runtime — the actual response is built by
2077
+ * `BuilderLatestRow` plus a JSON-level merge from the metadata cache, which
2078
+ * produces this exact shape.
2079
+ */
2080
+ BuilderLatestRowWithMetadata: components["schemas"]["BuilderLatestRow"] & {
2081
+ metadata?: null | components["schemas"]["BuilderMetadataInline"];
2082
+ };
2083
+ /**
2084
+ * @description One row of `polymarket_builder_metadata`. Includes `builder_code` since
2085
+ * it's used as the keying field on the standalone metadata endpoints.
2086
+ */
2073
2087
  BuilderMetadata: {
2074
2088
  builder_code: string;
2075
2089
  name: string;
@@ -2078,6 +2092,19 @@ export interface components {
2078
2092
  icon_url?: string | null;
2079
2093
  description?: string | null;
2080
2094
  };
2095
+ /**
2096
+ * @description Same fields as `BuilderMetadata` minus `builder_code`. Used when embedding
2097
+ * metadata under a `metadata` field on a row that already carries
2098
+ * `builder_code` at the top level (leaderboard / get / tag responses) so we
2099
+ * don't duplicate the key.
2100
+ */
2101
+ BuilderMetadataInline: {
2102
+ name: string;
2103
+ website?: string | null;
2104
+ twitter?: string | null;
2105
+ icon_url?: string | null;
2106
+ description?: string | null;
2107
+ };
2081
2108
  /** @description Per-metric percentage change for a builder over the requested lookback window. */
2082
2109
  BuilderPctChange: {
2083
2110
  /** Format: double */
@@ -2440,7 +2467,7 @@ export interface components {
2440
2467
  * synthetic `"other"` aggregate row is never present here.
2441
2468
  */
2442
2469
  builder_metadata: {
2443
- [key: string]: components["schemas"]["BuilderMetadata"];
2470
+ [key: string]: components["schemas"]["BuilderMetadataInline"];
2444
2471
  };
2445
2472
  };
2446
2473
  /**
@@ -5283,13 +5310,13 @@ export interface operations {
5283
5310
  };
5284
5311
  requestBody?: never;
5285
5312
  responses: {
5286
- /** @description Ranked list of builders */
5313
+ /** @description Ranked list of builders, each with embedded display metadata. */
5287
5314
  200: {
5288
5315
  headers: {
5289
5316
  [name: string]: unknown;
5290
5317
  };
5291
5318
  content: {
5292
- "application/json": components["schemas"]["BuilderLatestRow"][];
5319
+ "application/json": components["schemas"]["BuilderLatestRowWithMetadata"][];
5293
5320
  };
5294
5321
  };
5295
5322
  };
@@ -5548,22 +5575,15 @@ export interface operations {
5548
5575
  };
5549
5576
  requestBody?: never;
5550
5577
  responses: {
5551
- /** @description Builder snapshot */
5578
+ /** @description Builder snapshot with embedded display metadata. */
5552
5579
  200: {
5553
5580
  headers: {
5554
5581
  [name: string]: unknown;
5555
5582
  };
5556
5583
  content: {
5557
- "application/json": components["schemas"]["BuilderLatestRow"];
5584
+ "application/json": components["schemas"]["BuilderLatestRowWithMetadata"];
5558
5585
  };
5559
5586
  };
5560
- /** @description Builder not found */
5561
- 404: {
5562
- headers: {
5563
- [name: string]: unknown;
5564
- };
5565
- content?: never;
5566
- };
5567
5587
  };
5568
5588
  };
5569
5589
  get_builder_analytics_changes: {
@@ -17,7 +17,9 @@ export type BuilderFeeRate = Schemas["BuilderFeeRate"];
17
17
  export type BuilderFeeRateHistoryEntry = Schemas["BuilderFeeRateHistoryEntry"];
18
18
  export type BuilderGlobalLatestRow = Schemas["BuilderGlobalLatestRow"];
19
19
  export type BuilderLatestRow = Schemas["BuilderLatestRow"];
20
+ export type BuilderLatestRowWithMetadata = Schemas["BuilderLatestRowWithMetadata"];
20
21
  export type BuilderMetadata = Schemas["BuilderMetadata"];
22
+ export type BuilderMetadataInline = Schemas["BuilderMetadataInline"];
21
23
  export type BuilderPctChange = Schemas["BuilderPctChange"];
22
24
  export type BuilderSortBy = Schemas["BuilderSortBy"];
23
25
  export type BuilderTagRow = Schemas["BuilderTagRow"];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@structbuild/sdk",
3
- "version": "0.5.0",
3
+ "version": "0.5.1",
4
4
  "type": "module",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.js",