@0xinsider/sdk 0.123.0 → 0.124.0
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/README.md +5 -2
- package/dist/provenance.d.ts +1 -1
- package/dist/provenance.js +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -225,6 +225,8 @@ SDK 0.122.0 documents rugby on `listGames` (#36388). Rugby games, the Top 14 tod
|
|
|
225
225
|
|
|
226
226
|
SDK 0.123.0 documents that a rugby game stays readable after it leaves the list (#36397). `getGame` reads it from its stored record from then on, as for every other sport: `status.state` is `unknown` until Polymarket settles its match-winner markets, then `ended`, with `freshness.source` `stored`. `listGames({ sport: "Rugby", status: "ended" })` lists finished rugby games from their stored records too. No type changes.
|
|
227
227
|
|
|
228
|
+
SDK 0.124.0 documents one more read that queues no lines on `listGameMarkets` with `expand: ["sharp_money"]` (#36413). While your key reads another game 477 seconds or more apart, a read that comes 477 seconds or more after your last read of a game asks for no frame lines when that last read came within 2 minutes of the one before it. Such a read still serves the stored split, and your next read sooner asks again, as a first read does. No type changes.
|
|
229
|
+
|
|
228
230
|
SDK 0.41.0 adds the closing line (#32517). `getMarketClose(conditionId)` reads a market's stored close: each outcome's price in the last provider minute bucket that ended at or before kickoff, captured once after settlement. Its `status` is `measured`, `pending` or `unavailable`, with `unavailable_reason`; a missing close is never 0. Every large trade (`listLargeTrades`, `listLargeTradeHistory`, `getLargeTrade`, and the expanded trades of the `getEventReplaySince` replay) now carries `clv`: cents per share against that close, positive when the trade beat it, measured on pre-kickoff trades only (`status` `measured`, `in_play`, `pending` or `unavailable`). `getTraderClv(address, { from, to, min_size, category })` summarizes one wallet's large trades in a window: the mean, stake-weighted and per-market mean CLV with a 95% interval, the share that beat the close, and the trades excluded by status. `batchGetMarketClose({ condition_ids })` reads up to 25 markets' closes in one request (#33025). New types: `MarketClose`, `TraderClv`.
|
|
229
231
|
|
|
230
232
|
```ts
|
|
@@ -1090,10 +1092,11 @@ Pass `apiKey` to the client constructor. Public operations (`getApiDiscovery`, `
|
|
|
1090
1092
|
|
|
1091
1093
|
## How it is built
|
|
1092
1094
|
|
|
1093
|
-
`src/schema.ts` is generated from the
|
|
1095
|
+
`src/schema.ts` is generated from the [OpenAPI document](https://0xinsider.com/api/v1/openapi.json) with the same generator the 0xinsider app runs (vendored in `scripts/app/`). A release takes the document and the types from one app commit: `scripts/sync-from-app.mjs` copies the app's document at that commit into `openapi.json` byte for byte, copies its `src/schema.ts`, and writes `src/provenance.ts`, so the types never depend on what the live site serves at release time. The client itself (`src/client.ts`, `src/stream.ts`, `src/pagination.ts`, `src/retry.ts`, `src/webhooks.ts`, `src/errors.ts`) is hand-written against those types.
|
|
1094
1096
|
|
|
1095
1097
|
```bash
|
|
1096
|
-
npm run generate #
|
|
1098
|
+
npm run generate # re-render src/schema.ts and src/provenance.ts from the committed openapi.json
|
|
1099
|
+
node scripts/generate.mjs --live # fetch the published document; rewrite openapi.json, src/schema.ts, src/provenance.ts
|
|
1097
1100
|
npm run check # the committed files match the committed snapshot, and the client table matches it
|
|
1098
1101
|
npm run check:live # the same checks against the published document: is this release behind the API?
|
|
1099
1102
|
npm test # build, then the unit tests (node:test, no network)
|
package/dist/provenance.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare const OPENAPI_SOURCE = "0xinsider/0xinsider:web/public/api/v1/openapi.json";
|
|
2
|
-
export declare const OPENAPI_SHA256 = "
|
|
2
|
+
export declare const OPENAPI_SHA256 = "5764c108585aa48c805126c12763f943885890e417698fbc4e071bbf1a8c51e8";
|
|
3
3
|
export declare const OPENAPI_VERSION = "1.0.0";
|
|
4
4
|
export declare const OPERATION_COUNT = 118;
|
|
5
5
|
export declare const APP_REPOSITORY = "0xinsider/0xinsider";
|
package/dist/provenance.js
CHANGED
|
@@ -6,10 +6,10 @@
|
|
|
6
6
|
// when it could be resolved, else null. Compare OPENAPI_SHA256 with the live
|
|
7
7
|
// document to see whether a release is behind the API.
|
|
8
8
|
export const OPENAPI_SOURCE = "0xinsider/0xinsider:web/public/api/v1/openapi.json";
|
|
9
|
-
export const OPENAPI_SHA256 = "
|
|
9
|
+
export const OPENAPI_SHA256 = "5764c108585aa48c805126c12763f943885890e417698fbc4e071bbf1a8c51e8";
|
|
10
10
|
export const OPENAPI_VERSION = "1.0.0";
|
|
11
11
|
export const OPERATION_COUNT = 118;
|
|
12
12
|
export const APP_REPOSITORY = "0xinsider/0xinsider";
|
|
13
13
|
export const APP_SPEC_PATH = "web/public/api/v1/openapi.json";
|
|
14
|
-
export const APP_COMMIT = "
|
|
14
|
+
export const APP_COMMIT = "c80bce59cea50e79dd5e04dd7b401b7a4d3acd30";
|
|
15
15
|
//# sourceMappingURL=provenance.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@0xinsider/sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.124.0",
|
|
4
4
|
"description": "Official TypeScript SDK for the 0xinsider API - analytics for Polymarket sports and esports markets (REST, cursor pagination, SSE stream, webhook verification)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|