@predictorsdk/client 0.4.0 → 0.6.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.
Files changed (63) hide show
  1. package/dist/Client.d.ts +80 -0
  2. package/dist/Client.js +432 -0
  3. package/dist/api/client/requests/GetEventRequest.d.ts +13 -0
  4. package/dist/api/client/requests/GetEventRequest.js +2 -0
  5. package/dist/api/client/requests/GetMarketRequest.d.ts +13 -0
  6. package/dist/api/client/requests/GetMarketRequest.js +2 -0
  7. package/dist/api/client/requests/ListPolymarketWalletPositionsRequest.d.ts +16 -0
  8. package/dist/api/client/requests/ListPolymarketWalletPositionsRequest.js +2 -0
  9. package/dist/api/client/requests/index.d.ts +3 -0
  10. package/dist/api/types/EventFanout.d.ts +8 -0
  11. package/dist/api/types/EventFanout.js +2 -0
  12. package/dist/api/types/EventMarket.d.ts +6 -0
  13. package/dist/api/types/EventMarket.js +2 -0
  14. package/dist/api/types/EventResponse.d.ts +13 -0
  15. package/dist/api/types/EventResponse.js +2 -0
  16. package/dist/api/types/EventResponsePlatform.d.ts +8 -0
  17. package/dist/api/types/EventResponsePlatform.js +8 -0
  18. package/dist/api/types/GetEventRequestPlatform.d.ts +7 -0
  19. package/dist/api/types/GetEventRequestPlatform.js +7 -0
  20. package/dist/api/types/GetMarketRequestPlatform.d.ts +7 -0
  21. package/dist/api/types/GetMarketRequestPlatform.js +7 -0
  22. package/dist/api/types/MarketDetailOutcome.d.ts +4 -0
  23. package/dist/api/types/MarketDetailOutcome.js +2 -0
  24. package/dist/api/types/MarketDetailResponse.d.ts +18 -0
  25. package/dist/api/types/MarketDetailResponse.js +2 -0
  26. package/dist/api/types/MarketDetailResponseProvider.d.ts +8 -0
  27. package/dist/api/types/MarketDetailResponseProvider.js +8 -0
  28. package/dist/api/types/MarketDetailResponseStatus.d.ts +7 -0
  29. package/dist/api/types/MarketDetailResponseStatus.js +7 -0
  30. package/dist/api/types/PaginationBlock.d.ts +1 -1
  31. package/dist/api/types/PolymarketPosition.d.ts +8 -0
  32. package/dist/api/types/PolymarketPosition.js +2 -0
  33. package/dist/api/types/PolymarketPositionsResponse.d.ts +7 -0
  34. package/dist/api/types/PolymarketPositionsResponse.js +2 -0
  35. package/dist/api/types/index.d.ts +12 -0
  36. package/dist/api/types/index.js +12 -0
  37. package/dist/serialization/types/EventFanout.d.ts +11 -0
  38. package/dist/serialization/types/EventFanout.js +7 -0
  39. package/dist/serialization/types/EventMarket.d.ts +10 -0
  40. package/dist/serialization/types/EventMarket.js +6 -0
  41. package/dist/serialization/types/EventResponse.d.ts +16 -0
  42. package/dist/serialization/types/EventResponse.js +12 -0
  43. package/dist/serialization/types/EventResponsePlatform.d.ts +7 -0
  44. package/dist/serialization/types/EventResponsePlatform.js +3 -0
  45. package/dist/serialization/types/GetEventRequestPlatform.d.ts +7 -0
  46. package/dist/serialization/types/GetEventRequestPlatform.js +3 -0
  47. package/dist/serialization/types/GetMarketRequestPlatform.d.ts +7 -0
  48. package/dist/serialization/types/GetMarketRequestPlatform.js +3 -0
  49. package/dist/serialization/types/MarketDetailOutcome.d.ts +9 -0
  50. package/dist/serialization/types/MarketDetailOutcome.js +5 -0
  51. package/dist/serialization/types/MarketDetailResponse.d.ts +17 -0
  52. package/dist/serialization/types/MarketDetailResponse.js +13 -0
  53. package/dist/serialization/types/MarketDetailResponseProvider.d.ts +7 -0
  54. package/dist/serialization/types/MarketDetailResponseProvider.js +3 -0
  55. package/dist/serialization/types/MarketDetailResponseStatus.d.ts +7 -0
  56. package/dist/serialization/types/MarketDetailResponseStatus.js +3 -0
  57. package/dist/serialization/types/PolymarketPosition.d.ts +11 -0
  58. package/dist/serialization/types/PolymarketPosition.js +7 -0
  59. package/dist/serialization/types/PolymarketPositionsResponse.d.ts +13 -0
  60. package/dist/serialization/types/PolymarketPositionsResponse.js +9 -0
  61. package/dist/serialization/types/index.d.ts +12 -0
  62. package/dist/serialization/types/index.js +12 -0
  63. package/package.json +1 -1
@@ -0,0 +1,13 @@
1
+ import type * as PredictorSDK from "../index.js";
2
+ export interface EventResponse {
3
+ /** Echo of the platform-native event identifier supplied in the request path. */
4
+ eventId: string;
5
+ /** The platform the event_id was resolved against, either inferred from the ID format or supplied via `?platform=`. */
6
+ platform: PredictorSDK.EventResponsePlatform;
7
+ /** Human-readable event title from the platform. */
8
+ title: string;
9
+ /** Markets nested under this event. Order is platform-native for the primary event, followed by markets from fanout siblings (Kalshi sports) in registry order. */
10
+ markets: PredictorSDK.EventMarket[];
11
+ /** Present when the response was assembled from multiple upstream events (Kalshi sports sibling fanout). Lists which sibling event tickers were attempted, which contributed markets, and which failed or didn't exist. Absent for non-Kalshi platforms and for Kalshi events whose series is not in the sibling registry. */
12
+ fanout?: PredictorSDK.EventFanout;
13
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -0,0 +1,8 @@
1
+ /** The platform the event_id was resolved against, either inferred from the ID format or supplied via `?platform=`. */
2
+ export declare const EventResponsePlatform: {
3
+ readonly Kalshi: "kalshi";
4
+ readonly Polymarket: "polymarket";
5
+ readonly Predict: "predict";
6
+ readonly Sxbet: "sxbet";
7
+ };
8
+ export type EventResponsePlatform = (typeof EventResponsePlatform)[keyof typeof EventResponsePlatform];
@@ -0,0 +1,8 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ /** The platform the event_id was resolved against, either inferred from the ID format or supplied via `?platform=`. */
3
+ export const EventResponsePlatform = {
4
+ Kalshi: "kalshi",
5
+ Polymarket: "polymarket",
6
+ Predict: "predict",
7
+ Sxbet: "sxbet",
8
+ };
@@ -0,0 +1,7 @@
1
+ export declare const GetEventRequestPlatform: {
2
+ readonly Kalshi: "kalshi";
3
+ readonly Polymarket: "polymarket";
4
+ readonly Predict: "predict";
5
+ readonly Sxbet: "sxbet";
6
+ };
7
+ export type GetEventRequestPlatform = (typeof GetEventRequestPlatform)[keyof typeof GetEventRequestPlatform];
@@ -0,0 +1,7 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export const GetEventRequestPlatform = {
3
+ Kalshi: "kalshi",
4
+ Polymarket: "polymarket",
5
+ Predict: "predict",
6
+ Sxbet: "sxbet",
7
+ };
@@ -0,0 +1,7 @@
1
+ export declare const GetMarketRequestPlatform: {
2
+ readonly Kalshi: "kalshi";
3
+ readonly Polymarket: "polymarket";
4
+ readonly Predict: "predict";
5
+ readonly Sxbet: "sxbet";
6
+ };
7
+ export type GetMarketRequestPlatform = (typeof GetMarketRequestPlatform)[keyof typeof GetMarketRequestPlatform];
@@ -0,0 +1,7 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export const GetMarketRequestPlatform = {
3
+ Kalshi: "kalshi",
4
+ Polymarket: "polymarket",
5
+ Predict: "predict",
6
+ Sxbet: "sxbet",
7
+ };
@@ -0,0 +1,4 @@
1
+ export interface MarketDetailOutcome {
2
+ /** Outcome label as the platform reports it. Kalshi binary markets normalize to `Yes`/`No`; Polymarket parses the stringified outcomes array (also typically `Yes`/`No`); Predict reports per-outcome names; SX Bet uses outcome-one/outcome-two names (e.g. team labels with spreads applied). */
3
+ name: string;
4
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -0,0 +1,18 @@
1
+ import type * as PredictorSDK from "../index.js";
2
+ /**
3
+ * Single-market detail across all four supported platforms. Strict-universal v0 shape — only fields every platform exposes natively without a second fetch. Pricing/volume/closes_at/ event_id are deliberately omitted, see the endpoint description for the rationale.
4
+ */
5
+ export interface MarketDetailResponse {
6
+ /** Composite market identifier in the format `{provider}:{provider_id}`. Matches the `id` field returned by `GET /v1/markets` so list output flows into detail lookups without preprocessing. */
7
+ id: string;
8
+ /** Prediction market provider the market_id resolved against. */
9
+ provider: PredictorSDK.MarketDetailResponseProvider;
10
+ /** Platform-native market identifier. Kalshi ticker, Polymarket numeric id, Predict numeric id, or SX Bet `marketHash`. For Polymarket markets resolved by slug, this is normalized to the numeric id. */
11
+ providerId: string;
12
+ /** Human-readable market title. Each platform exposes a slightly different field — Kalshi `title`, Polymarket `question`, Predict `title`, SX Bet composed from team names with outcome-name fallback for outright markets. */
13
+ title: string;
14
+ /** Normalized lifecycle status. Mapping per platform: Kalshi `active` → open · `closed`/`determined` → closed · `settled`/`finalized` → settled. Polymarket `archived` → settled · `closed && !archived` → closed · otherwise → open. Predict `tradingStatus=OPEN` → open · `CLOSED && !RESOLVED` → closed · `status=RESOLVED` → settled. SX Bet `ACTIVE` → open · otherwise closed. Unknown upstream values default to closed. */
15
+ status: PredictorSDK.MarketDetailResponseStatus;
16
+ /** Outcome labels for the market. Every supported platform models per-market outcomes as a 2-element list in practice (multi-outcome events are modeled as multiple binary markets nested under one event/category). Prices and sizes are deliberately omitted from v0 — see the endpoint description. */
17
+ outcomes: PredictorSDK.MarketDetailOutcome[];
18
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -0,0 +1,8 @@
1
+ /** Prediction market provider the market_id resolved against. */
2
+ export declare const MarketDetailResponseProvider: {
3
+ readonly Kalshi: "kalshi";
4
+ readonly Polymarket: "polymarket";
5
+ readonly Predict: "predict";
6
+ readonly Sxbet: "sxbet";
7
+ };
8
+ export type MarketDetailResponseProvider = (typeof MarketDetailResponseProvider)[keyof typeof MarketDetailResponseProvider];
@@ -0,0 +1,8 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ /** Prediction market provider the market_id resolved against. */
3
+ export const MarketDetailResponseProvider = {
4
+ Kalshi: "kalshi",
5
+ Polymarket: "polymarket",
6
+ Predict: "predict",
7
+ Sxbet: "sxbet",
8
+ };
@@ -0,0 +1,7 @@
1
+ /** Normalized lifecycle status. Mapping per platform: Kalshi `active` → open · `closed`/`determined` → closed · `settled`/`finalized` → settled. Polymarket `archived` → settled · `closed && !archived` → closed · otherwise → open. Predict `tradingStatus=OPEN` → open · `CLOSED && !RESOLVED` → closed · `status=RESOLVED` → settled. SX Bet `ACTIVE` → open · otherwise closed. Unknown upstream values default to closed. */
2
+ export declare const MarketDetailResponseStatus: {
3
+ readonly Open: "open";
4
+ readonly Closed: "closed";
5
+ readonly Settled: "settled";
6
+ };
7
+ export type MarketDetailResponseStatus = (typeof MarketDetailResponseStatus)[keyof typeof MarketDetailResponseStatus];
@@ -0,0 +1,7 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ /** Normalized lifecycle status. Mapping per platform: Kalshi `active` → open · `closed`/`determined` → closed · `settled`/`finalized` → settled. Polymarket `archived` → settled · `closed && !archived` → closed · otherwise → open. Predict `tradingStatus=OPEN` → open · `CLOSED && !RESOLVED` → closed · `status=RESOLVED` → settled. SX Bet `ACTIVE` → open · otherwise closed. Unknown upstream values default to closed. */
3
+ export const MarketDetailResponseStatus = {
4
+ Open: "open",
5
+ Closed: "closed",
6
+ Settled: "settled",
7
+ };
@@ -1,7 +1,7 @@
1
1
  export interface PaginationBlock {
2
2
  /** Number of items requested per page (echoes the `limit` query param). */
3
3
  limit: number;
4
- /** Total matching items across all pages. */
4
+ /** Total matching items across all pages, when known. Set to `0` for endpoints whose upstream does not expose a total count — clients should rely on `has_more` and `next_cursor` to paginate in that case. */
5
5
  total: number;
6
6
  /** Whether additional pages exist beyond this one. */
7
7
  hasMore: boolean;
@@ -0,0 +1,8 @@
1
+ export interface PolymarketPosition {
2
+ /** Polymarket condition ID (`0x`-prefixed hex). */
3
+ conditionId: string;
4
+ /** Outcome label held in this position (`Yes`/`No` for binary markets). */
5
+ outcome: string;
6
+ /** Number of outcome shares held. */
7
+ shares: number;
8
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -0,0 +1,7 @@
1
+ import type * as PredictorSDK from "../index.js";
2
+ export interface PolymarketPositionsResponse {
3
+ /** Resolved Polymarket proxy wallet (lowercased). */
4
+ address: string;
5
+ data: PredictorSDK.PolymarketPosition[];
6
+ pagination: PredictorSDK.PaginationBlock;
7
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -1,12 +1,24 @@
1
1
  export * from "./CryptoPriceItem.js";
2
2
  export * from "./CryptoPricesResponse.js";
3
3
  export * from "./ErrorResponse.js";
4
+ export * from "./EventFanout.js";
5
+ export * from "./EventMarket.js";
6
+ export * from "./EventResponse.js";
7
+ export * from "./EventResponsePlatform.js";
8
+ export * from "./GetEventRequestPlatform.js";
9
+ export * from "./GetMarketRequestPlatform.js";
10
+ export * from "./MarketDetailOutcome.js";
11
+ export * from "./MarketDetailResponse.js";
12
+ export * from "./MarketDetailResponseProvider.js";
13
+ export * from "./MarketDetailResponseStatus.js";
4
14
  export * from "./MarketsListResponse.js";
5
15
  export * from "./PaginationBlock.js";
6
16
  export * from "./PaymentRequiredErrorAction.js";
7
17
  export * from "./PaymentRequiredErrorBody.js";
8
18
  export * from "./PlatformMarket.js";
9
19
  export * from "./PlatformMarketPlatform.js";
20
+ export * from "./PolymarketPosition.js";
21
+ export * from "./PolymarketPositionsResponse.js";
10
22
  export * from "./PolymarketWalletResponse.js";
11
23
  export * from "./SportsMatchingResponse.js";
12
24
  export * from "./UnifiedMarket.js";
@@ -1,12 +1,24 @@
1
1
  export * from "./CryptoPriceItem.js";
2
2
  export * from "./CryptoPricesResponse.js";
3
3
  export * from "./ErrorResponse.js";
4
+ export * from "./EventFanout.js";
5
+ export * from "./EventMarket.js";
6
+ export * from "./EventResponse.js";
7
+ export * from "./EventResponsePlatform.js";
8
+ export * from "./GetEventRequestPlatform.js";
9
+ export * from "./GetMarketRequestPlatform.js";
10
+ export * from "./MarketDetailOutcome.js";
11
+ export * from "./MarketDetailResponse.js";
12
+ export * from "./MarketDetailResponseProvider.js";
13
+ export * from "./MarketDetailResponseStatus.js";
4
14
  export * from "./MarketsListResponse.js";
5
15
  export * from "./PaginationBlock.js";
6
16
  export * from "./PaymentRequiredErrorAction.js";
7
17
  export * from "./PaymentRequiredErrorBody.js";
8
18
  export * from "./PlatformMarket.js";
9
19
  export * from "./PlatformMarketPlatform.js";
20
+ export * from "./PolymarketPosition.js";
21
+ export * from "./PolymarketPositionsResponse.js";
10
22
  export * from "./PolymarketWalletResponse.js";
11
23
  export * from "./SportsMatchingResponse.js";
12
24
  export * from "./UnifiedMarket.js";
@@ -0,0 +1,11 @@
1
+ import type * as PredictorSDK from "../../api/index.js";
2
+ import * as core from "../../core/index.js";
3
+ import type * as serializers from "../index.js";
4
+ export declare const EventFanout: core.serialization.ObjectSchema<serializers.EventFanout.Raw, PredictorSDK.EventFanout>;
5
+ export declare namespace EventFanout {
6
+ interface Raw {
7
+ siblings_attempted: string[];
8
+ siblings_returned: string[];
9
+ siblings_missing: string[];
10
+ }
11
+ }
@@ -0,0 +1,7 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ import * as core from "../../core/index.js";
3
+ export const EventFanout = core.serialization.object({
4
+ siblingsAttempted: core.serialization.property("siblings_attempted", core.serialization.list(core.serialization.string())),
5
+ siblingsReturned: core.serialization.property("siblings_returned", core.serialization.list(core.serialization.string())),
6
+ siblingsMissing: core.serialization.property("siblings_missing", core.serialization.list(core.serialization.string())),
7
+ });
@@ -0,0 +1,10 @@
1
+ import type * as PredictorSDK from "../../api/index.js";
2
+ import * as core from "../../core/index.js";
3
+ import type * as serializers from "../index.js";
4
+ export declare const EventMarket: core.serialization.ObjectSchema<serializers.EventMarket.Raw, PredictorSDK.EventMarket>;
5
+ export declare namespace EventMarket {
6
+ interface Raw {
7
+ market_id: string;
8
+ title: string;
9
+ }
10
+ }
@@ -0,0 +1,6 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ import * as core from "../../core/index.js";
3
+ export const EventMarket = core.serialization.object({
4
+ marketId: core.serialization.property("market_id", core.serialization.string()),
5
+ title: core.serialization.string(),
6
+ });
@@ -0,0 +1,16 @@
1
+ import type * as PredictorSDK from "../../api/index.js";
2
+ import * as core from "../../core/index.js";
3
+ import type * as serializers from "../index.js";
4
+ import { EventFanout } from "./EventFanout.js";
5
+ import { EventMarket } from "./EventMarket.js";
6
+ import { EventResponsePlatform } from "./EventResponsePlatform.js";
7
+ export declare const EventResponse: core.serialization.ObjectSchema<serializers.EventResponse.Raw, PredictorSDK.EventResponse>;
8
+ export declare namespace EventResponse {
9
+ interface Raw {
10
+ event_id: string;
11
+ platform: EventResponsePlatform.Raw;
12
+ title: string;
13
+ markets: EventMarket.Raw[];
14
+ fanout?: EventFanout.Raw | null;
15
+ }
16
+ }
@@ -0,0 +1,12 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ import * as core from "../../core/index.js";
3
+ import { EventFanout } from "./EventFanout.js";
4
+ import { EventMarket } from "./EventMarket.js";
5
+ import { EventResponsePlatform } from "./EventResponsePlatform.js";
6
+ export const EventResponse = core.serialization.object({
7
+ eventId: core.serialization.property("event_id", core.serialization.string()),
8
+ platform: EventResponsePlatform,
9
+ title: core.serialization.string(),
10
+ markets: core.serialization.list(EventMarket),
11
+ fanout: EventFanout.optional(),
12
+ });
@@ -0,0 +1,7 @@
1
+ import type * as PredictorSDK from "../../api/index.js";
2
+ import * as core from "../../core/index.js";
3
+ import type * as serializers from "../index.js";
4
+ export declare const EventResponsePlatform: core.serialization.Schema<serializers.EventResponsePlatform.Raw, PredictorSDK.EventResponsePlatform>;
5
+ export declare namespace EventResponsePlatform {
6
+ type Raw = "kalshi" | "polymarket" | "predict" | "sxbet";
7
+ }
@@ -0,0 +1,3 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ import * as core from "../../core/index.js";
3
+ export const EventResponsePlatform = core.serialization.enum_(["kalshi", "polymarket", "predict", "sxbet"]);
@@ -0,0 +1,7 @@
1
+ import type * as PredictorSDK from "../../api/index.js";
2
+ import * as core from "../../core/index.js";
3
+ import type * as serializers from "../index.js";
4
+ export declare const GetEventRequestPlatform: core.serialization.Schema<serializers.GetEventRequestPlatform.Raw, PredictorSDK.GetEventRequestPlatform>;
5
+ export declare namespace GetEventRequestPlatform {
6
+ type Raw = "kalshi" | "polymarket" | "predict" | "sxbet";
7
+ }
@@ -0,0 +1,3 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ import * as core from "../../core/index.js";
3
+ export const GetEventRequestPlatform = core.serialization.enum_(["kalshi", "polymarket", "predict", "sxbet"]);
@@ -0,0 +1,7 @@
1
+ import type * as PredictorSDK from "../../api/index.js";
2
+ import * as core from "../../core/index.js";
3
+ import type * as serializers from "../index.js";
4
+ export declare const GetMarketRequestPlatform: core.serialization.Schema<serializers.GetMarketRequestPlatform.Raw, PredictorSDK.GetMarketRequestPlatform>;
5
+ export declare namespace GetMarketRequestPlatform {
6
+ type Raw = "kalshi" | "polymarket" | "predict" | "sxbet";
7
+ }
@@ -0,0 +1,3 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ import * as core from "../../core/index.js";
3
+ export const GetMarketRequestPlatform = core.serialization.enum_(["kalshi", "polymarket", "predict", "sxbet"]);
@@ -0,0 +1,9 @@
1
+ import type * as PredictorSDK from "../../api/index.js";
2
+ import * as core from "../../core/index.js";
3
+ import type * as serializers from "../index.js";
4
+ export declare const MarketDetailOutcome: core.serialization.ObjectSchema<serializers.MarketDetailOutcome.Raw, PredictorSDK.MarketDetailOutcome>;
5
+ export declare namespace MarketDetailOutcome {
6
+ interface Raw {
7
+ name: string;
8
+ }
9
+ }
@@ -0,0 +1,5 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ import * as core from "../../core/index.js";
3
+ export const MarketDetailOutcome = core.serialization.object({
4
+ name: core.serialization.string(),
5
+ });
@@ -0,0 +1,17 @@
1
+ import type * as PredictorSDK from "../../api/index.js";
2
+ import * as core from "../../core/index.js";
3
+ import type * as serializers from "../index.js";
4
+ import { MarketDetailOutcome } from "./MarketDetailOutcome.js";
5
+ import { MarketDetailResponseProvider } from "./MarketDetailResponseProvider.js";
6
+ import { MarketDetailResponseStatus } from "./MarketDetailResponseStatus.js";
7
+ export declare const MarketDetailResponse: core.serialization.ObjectSchema<serializers.MarketDetailResponse.Raw, PredictorSDK.MarketDetailResponse>;
8
+ export declare namespace MarketDetailResponse {
9
+ interface Raw {
10
+ id: string;
11
+ provider: MarketDetailResponseProvider.Raw;
12
+ provider_id: string;
13
+ title: string;
14
+ status: MarketDetailResponseStatus.Raw;
15
+ outcomes: MarketDetailOutcome.Raw[];
16
+ }
17
+ }
@@ -0,0 +1,13 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ import * as core from "../../core/index.js";
3
+ import { MarketDetailOutcome } from "./MarketDetailOutcome.js";
4
+ import { MarketDetailResponseProvider } from "./MarketDetailResponseProvider.js";
5
+ import { MarketDetailResponseStatus } from "./MarketDetailResponseStatus.js";
6
+ export const MarketDetailResponse = core.serialization.object({
7
+ id: core.serialization.string(),
8
+ provider: MarketDetailResponseProvider,
9
+ providerId: core.serialization.property("provider_id", core.serialization.string()),
10
+ title: core.serialization.string(),
11
+ status: MarketDetailResponseStatus,
12
+ outcomes: core.serialization.list(MarketDetailOutcome),
13
+ });
@@ -0,0 +1,7 @@
1
+ import type * as PredictorSDK from "../../api/index.js";
2
+ import * as core from "../../core/index.js";
3
+ import type * as serializers from "../index.js";
4
+ export declare const MarketDetailResponseProvider: core.serialization.Schema<serializers.MarketDetailResponseProvider.Raw, PredictorSDK.MarketDetailResponseProvider>;
5
+ export declare namespace MarketDetailResponseProvider {
6
+ type Raw = "kalshi" | "polymarket" | "predict" | "sxbet";
7
+ }
@@ -0,0 +1,3 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ import * as core from "../../core/index.js";
3
+ export const MarketDetailResponseProvider = core.serialization.enum_(["kalshi", "polymarket", "predict", "sxbet"]);
@@ -0,0 +1,7 @@
1
+ import type * as PredictorSDK from "../../api/index.js";
2
+ import * as core from "../../core/index.js";
3
+ import type * as serializers from "../index.js";
4
+ export declare const MarketDetailResponseStatus: core.serialization.Schema<serializers.MarketDetailResponseStatus.Raw, PredictorSDK.MarketDetailResponseStatus>;
5
+ export declare namespace MarketDetailResponseStatus {
6
+ type Raw = "open" | "closed" | "settled";
7
+ }
@@ -0,0 +1,3 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ import * as core from "../../core/index.js";
3
+ export const MarketDetailResponseStatus = core.serialization.enum_(["open", "closed", "settled"]);
@@ -0,0 +1,11 @@
1
+ import type * as PredictorSDK from "../../api/index.js";
2
+ import * as core from "../../core/index.js";
3
+ import type * as serializers from "../index.js";
4
+ export declare const PolymarketPosition: core.serialization.ObjectSchema<serializers.PolymarketPosition.Raw, PredictorSDK.PolymarketPosition>;
5
+ export declare namespace PolymarketPosition {
6
+ interface Raw {
7
+ condition_id: string;
8
+ outcome: string;
9
+ shares: number;
10
+ }
11
+ }
@@ -0,0 +1,7 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ import * as core from "../../core/index.js";
3
+ export const PolymarketPosition = core.serialization.object({
4
+ conditionId: core.serialization.property("condition_id", core.serialization.string()),
5
+ outcome: core.serialization.string(),
6
+ shares: core.serialization.number(),
7
+ });
@@ -0,0 +1,13 @@
1
+ import type * as PredictorSDK from "../../api/index.js";
2
+ import * as core from "../../core/index.js";
3
+ import type * as serializers from "../index.js";
4
+ import { PaginationBlock } from "./PaginationBlock.js";
5
+ import { PolymarketPosition } from "./PolymarketPosition.js";
6
+ export declare const PolymarketPositionsResponse: core.serialization.ObjectSchema<serializers.PolymarketPositionsResponse.Raw, PredictorSDK.PolymarketPositionsResponse>;
7
+ export declare namespace PolymarketPositionsResponse {
8
+ interface Raw {
9
+ address: string;
10
+ data: PolymarketPosition.Raw[];
11
+ pagination: PaginationBlock.Raw;
12
+ }
13
+ }
@@ -0,0 +1,9 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ import * as core from "../../core/index.js";
3
+ import { PaginationBlock } from "./PaginationBlock.js";
4
+ import { PolymarketPosition } from "./PolymarketPosition.js";
5
+ export const PolymarketPositionsResponse = core.serialization.object({
6
+ address: core.serialization.string(),
7
+ data: core.serialization.list(PolymarketPosition),
8
+ pagination: PaginationBlock,
9
+ });
@@ -1,12 +1,24 @@
1
1
  export * from "./CryptoPriceItem.js";
2
2
  export * from "./CryptoPricesResponse.js";
3
3
  export * from "./ErrorResponse.js";
4
+ export * from "./EventFanout.js";
5
+ export * from "./EventMarket.js";
6
+ export * from "./EventResponse.js";
7
+ export * from "./EventResponsePlatform.js";
8
+ export * from "./GetEventRequestPlatform.js";
9
+ export * from "./GetMarketRequestPlatform.js";
10
+ export * from "./MarketDetailOutcome.js";
11
+ export * from "./MarketDetailResponse.js";
12
+ export * from "./MarketDetailResponseProvider.js";
13
+ export * from "./MarketDetailResponseStatus.js";
4
14
  export * from "./MarketsListResponse.js";
5
15
  export * from "./PaginationBlock.js";
6
16
  export * from "./PaymentRequiredErrorAction.js";
7
17
  export * from "./PaymentRequiredErrorBody.js";
8
18
  export * from "./PlatformMarket.js";
9
19
  export * from "./PlatformMarketPlatform.js";
20
+ export * from "./PolymarketPosition.js";
21
+ export * from "./PolymarketPositionsResponse.js";
10
22
  export * from "./PolymarketWalletResponse.js";
11
23
  export * from "./SportsMatchingResponse.js";
12
24
  export * from "./UnifiedMarket.js";
@@ -1,12 +1,24 @@
1
1
  export * from "./CryptoPriceItem.js";
2
2
  export * from "./CryptoPricesResponse.js";
3
3
  export * from "./ErrorResponse.js";
4
+ export * from "./EventFanout.js";
5
+ export * from "./EventMarket.js";
6
+ export * from "./EventResponse.js";
7
+ export * from "./EventResponsePlatform.js";
8
+ export * from "./GetEventRequestPlatform.js";
9
+ export * from "./GetMarketRequestPlatform.js";
10
+ export * from "./MarketDetailOutcome.js";
11
+ export * from "./MarketDetailResponse.js";
12
+ export * from "./MarketDetailResponseProvider.js";
13
+ export * from "./MarketDetailResponseStatus.js";
4
14
  export * from "./MarketsListResponse.js";
5
15
  export * from "./PaginationBlock.js";
6
16
  export * from "./PaymentRequiredErrorAction.js";
7
17
  export * from "./PaymentRequiredErrorBody.js";
8
18
  export * from "./PlatformMarket.js";
9
19
  export * from "./PlatformMarketPlatform.js";
20
+ export * from "./PolymarketPosition.js";
21
+ export * from "./PolymarketPositionsResponse.js";
10
22
  export * from "./PolymarketWalletResponse.js";
11
23
  export * from "./SportsMatchingResponse.js";
12
24
  export * from "./UnifiedMarket.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@predictorsdk/client",
3
- "version": "0.4.0",
3
+ "version": "0.6.0",
4
4
  "description": "The official TypeScript/JavaScript client for the PredictorSDK matching markets API",
5
5
  "license": "MIT",
6
6
  "keywords": [