@keystrokehq/polymarket 0.0.7 → 0.0.9

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.
@@ -1,2 +1,2 @@
1
- import { r as polymarketBundle } from "../integration-CTzLOy9r.mjs";
1
+ import { r as polymarketBundle } from "../integration-B_E07iTd.mjs";
2
2
  export { polymarketBundle };
@@ -1,3 +1,3 @@
1
- import { n as polymarketBundle } from "../integration-KDxC97JC.mjs";
1
+ import { n as polymarketBundle } from "../integration-Bf-3OGOJ.mjs";
2
2
 
3
3
  export { polymarketBundle };
package/dist/data.d.mts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { z } from "zod";
2
- import * as _keystrokehq_core_credential_set0 from "@keystrokehq/core/credential-set";
3
2
  import * as _keystrokehq_core0 from "@keystrokehq/core";
3
+ import * as _keystrokehq_core_credential_set0 from "@keystrokehq/core/credential-set";
4
4
 
5
5
  //#region src/data.d.ts
6
6
  declare const listTrades: _keystrokehq_core0.Operation<z.ZodObject<{
@@ -17,9 +17,9 @@ declare const listTrades: _keystrokehq_core0.Operation<z.ZodObject<{
17
17
  market: z.ZodOptional<z.ZodString>;
18
18
  asset_id: z.ZodOptional<z.ZodString>;
19
19
  side: z.ZodOptional<z.ZodString>;
20
- size: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>>;
21
- fee_rate_bps: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>>;
22
- price: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>>;
20
+ size: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
21
+ fee_rate_bps: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
22
+ price: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
23
23
  status: z.ZodOptional<z.ZodString>;
24
24
  match_time: z.ZodOptional<z.ZodString>;
25
25
  last_update: z.ZodOptional<z.ZodString>;
@@ -30,7 +30,7 @@ declare const listTrades: _keystrokehq_core0.Operation<z.ZodObject<{
30
30
  bucket_index: z.ZodOptional<z.ZodNumber>;
31
31
  owner: z.ZodOptional<z.ZodString>;
32
32
  type: z.ZodOptional<z.ZodString>;
33
- }, z.core.$loose>>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:polymarket", z.ZodObject<{
33
+ }, z.core.$catchall<z.ZodJSONSchema>>>, readonly [_keystrokehq_core0.CredentialSet<"polymarket", z.ZodObject<{
34
34
  POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
35
35
  }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
36
36
  POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
@@ -62,7 +62,7 @@ declare const getUserPositions: _keystrokehq_core0.Operation<z.ZodObject<{
62
62
  icon: z.ZodOptional<z.ZodString>;
63
63
  eventSlug: z.ZodOptional<z.ZodString>;
64
64
  eventTitle: z.ZodOptional<z.ZodString>;
65
- }, z.core.$loose>>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:polymarket", z.ZodObject<{
65
+ }, z.core.$loose>>, readonly [_keystrokehq_core0.CredentialSet<"polymarket", z.ZodObject<{
66
66
  POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
67
67
  }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
68
68
  POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
@@ -77,7 +77,7 @@ declare const getMarketHolders: _keystrokehq_core0.Operation<z.ZodObject<{
77
77
  amount: z.ZodOptional<z.ZodNumber>;
78
78
  value: z.ZodOptional<z.ZodNumber>;
79
79
  position: z.ZodOptional<z.ZodString>;
80
- }, z.core.$loose>>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:polymarket", z.ZodObject<{
80
+ }, z.core.$loose>>, readonly [_keystrokehq_core0.CredentialSet<"polymarket", z.ZodObject<{
81
81
  POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
82
82
  }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
83
83
  POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
@@ -87,7 +87,7 @@ declare const getOpenInterest: _keystrokehq_core0.Operation<z.ZodObject<{
87
87
  }, z.core.$strip>, z.ZodObject<{
88
88
  conditionId: z.ZodOptional<z.ZodString>;
89
89
  openInterest: z.ZodOptional<z.ZodNumber>;
90
- }, z.core.$loose>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:polymarket", z.ZodObject<{
90
+ }, z.core.$loose>, readonly [_keystrokehq_core0.CredentialSet<"polymarket", z.ZodObject<{
91
91
  POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
92
92
  }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
93
93
  POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
@@ -97,7 +97,7 @@ declare const getLiveVolume: _keystrokehq_core0.Operation<z.ZodObject<{
97
97
  }, z.core.$strip>, z.ZodObject<{
98
98
  volume: z.ZodOptional<z.ZodNumber>;
99
99
  volume24hr: z.ZodOptional<z.ZodNumber>;
100
- }, z.core.$loose>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:polymarket", z.ZodObject<{
100
+ }, z.core.$loose>, readonly [_keystrokehq_core0.CredentialSet<"polymarket", z.ZodObject<{
101
101
  POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
102
102
  }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
103
103
  POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
package/dist/data.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { D as createPolymarketClient, E as polymarketOperation, T as tradeSchema, a as holderSchema, c as liveVolumeSchema, m as positionSchema, u as openInterestSchema } from "./schemas-C6SqZjA-.mjs";
1
+ import { D as createPolymarketClient, E as polymarketOperation, T as tradeSchema, a as holderSchema, c as liveVolumeSchema, m as positionSchema, u as openInterestSchema } from "./schemas-DGLbQgHc.mjs";
2
2
  import { z } from "zod";
3
3
 
4
4
  //#region src/data.ts
@@ -9,7 +9,7 @@ import { z } from "zod";
9
9
  * via the Polymarket Data API.
10
10
  */
11
11
  const listTrades = polymarketOperation({
12
- id: "list_polymarket_trades",
12
+ id: "polymarket.list-polymarket-trades",
13
13
  name: "List Polymarket Trades",
14
14
  description: "List trades with filters via the Data API",
15
15
  input: z.object({
@@ -32,7 +32,7 @@ const listTrades = polymarketOperation({
32
32
  }
33
33
  });
34
34
  const getUserPositions = polymarketOperation({
35
- id: "get_polymarket_user_positions",
35
+ id: "polymarket.get-polymarket-user-positions",
36
36
  name: "Get Polymarket User Positions",
37
37
  description: "Get positions for a user wallet via the Data API",
38
38
  input: z.object({
@@ -57,7 +57,7 @@ const getUserPositions = polymarketOperation({
57
57
  }
58
58
  });
59
59
  const getMarketHolders = polymarketOperation({
60
- id: "get_polymarket_market_holders",
60
+ id: "polymarket.get-polymarket-market-holders",
61
61
  name: "Get Polymarket Market Holders",
62
62
  description: "Get top holders for a market via the Data API",
63
63
  input: z.object({
@@ -80,7 +80,7 @@ const getMarketHolders = polymarketOperation({
80
80
  }
81
81
  });
82
82
  const getOpenInterest = polymarketOperation({
83
- id: "get_polymarket_open_interest",
83
+ id: "polymarket.get-polymarket-open-interest",
84
84
  name: "Get Polymarket Open Interest",
85
85
  description: "Get open interest for market(s) via the Data API",
86
86
  input: z.object({ conditionId: z.string() }),
@@ -95,7 +95,7 @@ const getOpenInterest = polymarketOperation({
95
95
  }
96
96
  });
97
97
  const getLiveVolume = polymarketOperation({
98
- id: "get_polymarket_live_volume",
98
+ id: "polymarket.get-polymarket-live-volume",
99
99
  name: "Get Polymarket Live Volume",
100
100
  description: "Get live volume for an event via the Data API",
101
101
  input: z.object({ eventId: z.string() }),
@@ -1,13 +1,13 @@
1
1
  import { z } from "zod";
2
- import * as _keystrokehq_core_credential_set0 from "@keystrokehq/core/credential-set";
3
2
  import * as _keystrokehq_core0 from "@keystrokehq/core";
3
+ import * as _keystrokehq_core_credential_set0 from "@keystrokehq/core/credential-set";
4
4
 
5
5
  //#region src/discovery.d.ts
6
6
  declare const listTags: _keystrokehq_core0.Operation<z.ZodObject<{}, z.core.$strip>, z.ZodArray<z.ZodObject<{
7
7
  id: z.ZodString;
8
8
  label: z.ZodString;
9
9
  slug: z.ZodOptional<z.ZodString>;
10
- }, z.core.$loose>>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:polymarket", z.ZodObject<{
10
+ }, z.core.$loose>>, readonly [_keystrokehq_core0.CredentialSet<"polymarket", z.ZodObject<{
11
11
  POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
12
12
  }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
13
13
  POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
@@ -17,7 +17,7 @@ declare const listSeries: _keystrokehq_core0.Operation<z.ZodObject<{}, z.core.$s
17
17
  title: z.ZodString;
18
18
  slug: z.ZodOptional<z.ZodString>;
19
19
  description: z.ZodOptional<z.ZodString>;
20
- }, z.core.$loose>>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:polymarket", z.ZodObject<{
20
+ }, z.core.$loose>>, readonly [_keystrokehq_core0.CredentialSet<"polymarket", z.ZodObject<{
21
21
  POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
22
22
  }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
23
23
  POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
@@ -29,7 +29,7 @@ declare const getSeries: _keystrokehq_core0.Operation<z.ZodObject<{
29
29
  title: z.ZodString;
30
30
  slug: z.ZodOptional<z.ZodString>;
31
31
  description: z.ZodOptional<z.ZodString>;
32
- }, z.core.$loose>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:polymarket", z.ZodObject<{
32
+ }, z.core.$loose>, readonly [_keystrokehq_core0.CredentialSet<"polymarket", z.ZodObject<{
33
33
  POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
34
34
  }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
35
35
  POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
@@ -44,7 +44,7 @@ declare const search: _keystrokehq_core0.Operation<z.ZodObject<{
44
44
  hasMore: z.ZodOptional<z.ZodBoolean>;
45
45
  totalResults: z.ZodOptional<z.ZodNumber>;
46
46
  }, z.core.$strip>>;
47
- }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:polymarket", z.ZodObject<{
47
+ }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"polymarket", z.ZodObject<{
48
48
  POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
49
49
  }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
50
50
  POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
@@ -57,22 +57,22 @@ declare const getProfile: _keystrokehq_core0.Operation<z.ZodObject<{
57
57
  bio: z.ZodOptional<z.ZodString>;
58
58
  profileImage: z.ZodOptional<z.ZodString>;
59
59
  displayUsernamePublic: z.ZodOptional<z.ZodBoolean>;
60
- }, z.core.$loose>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:polymarket", z.ZodObject<{
60
+ }, z.core.$loose>, readonly [_keystrokehq_core0.CredentialSet<"polymarket", z.ZodObject<{
61
61
  POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
62
62
  }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
63
63
  POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
64
64
  }, z.core.$strip>>[] | undefined>], undefined>;
65
- declare const getSportsMetadata: _keystrokehq_core0.Operation<z.ZodObject<{}, z.core.$strip>, z.ZodUnknown, readonly [_keystrokehq_core0.CredentialSet<"keystroke:polymarket", z.ZodObject<{
65
+ declare const getSportsMetadata: _keystrokehq_core0.Operation<z.ZodObject<{}, z.core.$strip>, z.ZodUnknown, readonly [_keystrokehq_core0.CredentialSet<"polymarket", z.ZodObject<{
66
66
  POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
67
67
  }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
68
68
  POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
69
69
  }, z.core.$strip>>[] | undefined>], undefined>;
70
- declare const getSportsMarketTypes: _keystrokehq_core0.Operation<z.ZodObject<{}, z.core.$strip>, z.ZodUnknown, readonly [_keystrokehq_core0.CredentialSet<"keystroke:polymarket", z.ZodObject<{
70
+ declare const getSportsMarketTypes: _keystrokehq_core0.Operation<z.ZodObject<{}, z.core.$strip>, z.ZodUnknown, readonly [_keystrokehq_core0.CredentialSet<"polymarket", z.ZodObject<{
71
71
  POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
72
72
  }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
73
73
  POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
74
74
  }, z.core.$strip>>[] | undefined>], undefined>;
75
- declare const getSportsTeams: _keystrokehq_core0.Operation<z.ZodObject<{}, z.core.$strip>, z.ZodUnknown, readonly [_keystrokehq_core0.CredentialSet<"keystroke:polymarket", z.ZodObject<{
75
+ declare const getSportsTeams: _keystrokehq_core0.Operation<z.ZodObject<{}, z.core.$strip>, z.ZodUnknown, readonly [_keystrokehq_core0.CredentialSet<"polymarket", z.ZodObject<{
76
76
  POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
77
77
  }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
78
78
  POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
@@ -1,4 +1,4 @@
1
- import { D as createPolymarketClient, E as polymarketOperation, S as sportsTeamSchema, _ as profileSchema, b as sportsMarketTypeSchema, v as searchResultSchema, w as tagSchema, x as sportsMetadataSchema, y as seriesSchema } from "./schemas-C6SqZjA-.mjs";
1
+ import { D as createPolymarketClient, E as polymarketOperation, S as sportsTeamSchema, _ as profileSchema, b as sportsMarketTypeSchema, v as searchResultSchema, w as tagSchema, x as sportsMetadataSchema, y as seriesSchema } from "./schemas-DGLbQgHc.mjs";
2
2
  import { z } from "zod";
3
3
 
4
4
  //#region src/discovery.ts
@@ -8,7 +8,7 @@ import { z } from "zod";
8
8
  * Steps for tags, series, search, profiles, and sports metadata via the Gamma API.
9
9
  */
10
10
  const listTags = polymarketOperation({
11
- id: "list_polymarket_tags",
11
+ id: "polymarket.list-polymarket-tags",
12
12
  name: "List Polymarket Tags",
13
13
  description: "List all tags from the Gamma API",
14
14
  input: z.object({}),
@@ -22,7 +22,7 @@ const listTags = polymarketOperation({
22
22
  }
23
23
  });
24
24
  const listSeries = polymarketOperation({
25
- id: "list_polymarket_series",
25
+ id: "polymarket.list-polymarket-series",
26
26
  name: "List Polymarket Series",
27
27
  description: "List all series from the Gamma API",
28
28
  input: z.object({}),
@@ -36,7 +36,7 @@ const listSeries = polymarketOperation({
36
36
  }
37
37
  });
38
38
  const getSeries = polymarketOperation({
39
- id: "get_polymarket_series",
39
+ id: "polymarket.get-polymarket-series",
40
40
  name: "Get Polymarket Series",
41
41
  description: "Get a series by ID from the Gamma API",
42
42
  input: z.object({ id: z.string() }),
@@ -50,7 +50,7 @@ const getSeries = polymarketOperation({
50
50
  }
51
51
  });
52
52
  const search = polymarketOperation({
53
- id: "search_polymarket",
53
+ id: "polymarket.search-polymarket",
54
54
  name: "Search Polymarket",
55
55
  description: "Search markets, events, and profiles via the Gamma API",
56
56
  input: z.object({ q: z.string() }),
@@ -65,7 +65,7 @@ const search = polymarketOperation({
65
65
  }
66
66
  });
67
67
  const getProfile = polymarketOperation({
68
- id: "get_polymarket_profile",
68
+ id: "polymarket.get-polymarket-profile",
69
69
  name: "Get Polymarket Profile",
70
70
  description: "Get a user profile by wallet address via the Gamma API",
71
71
  input: z.object({ address: z.string().regex(/^0x[a-fA-F0-9]{40}$/) }),
@@ -80,7 +80,7 @@ const getProfile = polymarketOperation({
80
80
  }
81
81
  });
82
82
  const getSportsMetadata = polymarketOperation({
83
- id: "get_polymarket_sports_metadata",
83
+ id: "polymarket.get-polymarket-sports-metadata",
84
84
  name: "Get Polymarket Sports Metadata",
85
85
  description: "Get sports metadata from the Gamma API",
86
86
  input: z.object({}),
@@ -94,7 +94,7 @@ const getSportsMetadata = polymarketOperation({
94
94
  }
95
95
  });
96
96
  const getSportsMarketTypes = polymarketOperation({
97
- id: "get_polymarket_sports_market_types",
97
+ id: "polymarket.get-polymarket-sports-market-types",
98
98
  name: "Get Polymarket Sports Market Types",
99
99
  description: "Get sports market types from the Gamma API",
100
100
  input: z.object({}),
@@ -108,7 +108,7 @@ const getSportsMarketTypes = polymarketOperation({
108
108
  }
109
109
  });
110
110
  const getSportsTeams = polymarketOperation({
111
- id: "get_polymarket_sports_teams",
111
+ id: "polymarket.get-polymarket-sports-teams",
112
112
  name: "Get Polymarket Sports Teams",
113
113
  description: "Get sports teams from the Gamma API",
114
114
  input: z.object({}),
package/dist/events.d.mts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { z } from "zod";
2
- import * as _keystrokehq_core_credential_set0 from "@keystrokehq/core/credential-set";
3
2
  import * as _keystrokehq_core0 from "@keystrokehq/core";
3
+ import * as _keystrokehq_core_credential_set0 from "@keystrokehq/core/credential-set";
4
4
 
5
5
  //#region src/events.d.ts
6
6
  declare const listEvents: _keystrokehq_core0.Operation<z.ZodObject<{
@@ -75,7 +75,7 @@ declare const listEvents: _keystrokehq_core0.Operation<z.ZodObject<{
75
75
  slug: z.ZodOptional<z.ZodString>;
76
76
  }, z.core.$loose>>>;
77
77
  categories: z.ZodOptional<z.ZodArray<z.ZodUnknown>>;
78
- }, z.core.$loose>>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:polymarket", z.ZodObject<{
78
+ }, z.core.$loose>>, readonly [_keystrokehq_core0.CredentialSet<"polymarket", z.ZodObject<{
79
79
  POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
80
80
  }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
81
81
  POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
@@ -133,7 +133,7 @@ declare const getEvent: _keystrokehq_core0.Operation<z.ZodObject<{
133
133
  slug: z.ZodOptional<z.ZodString>;
134
134
  }, z.core.$loose>>>;
135
135
  categories: z.ZodOptional<z.ZodArray<z.ZodUnknown>>;
136
- }, z.core.$loose>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:polymarket", z.ZodObject<{
136
+ }, z.core.$loose>, readonly [_keystrokehq_core0.CredentialSet<"polymarket", z.ZodObject<{
137
137
  POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
138
138
  }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
139
139
  POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
@@ -191,7 +191,7 @@ declare const getEventBySlug: _keystrokehq_core0.Operation<z.ZodObject<{
191
191
  slug: z.ZodOptional<z.ZodString>;
192
192
  }, z.core.$loose>>>;
193
193
  categories: z.ZodOptional<z.ZodArray<z.ZodUnknown>>;
194
- }, z.core.$loose>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:polymarket", z.ZodObject<{
194
+ }, z.core.$loose>, readonly [_keystrokehq_core0.CredentialSet<"polymarket", z.ZodObject<{
195
195
  POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
196
196
  }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
197
197
  POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
@@ -202,7 +202,7 @@ declare const getEventTags: _keystrokehq_core0.Operation<z.ZodObject<{
202
202
  id: z.ZodString;
203
203
  label: z.ZodString;
204
204
  slug: z.ZodOptional<z.ZodString>;
205
- }, z.core.$loose>>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:polymarket", z.ZodObject<{
205
+ }, z.core.$loose>>, readonly [_keystrokehq_core0.CredentialSet<"polymarket", z.ZodObject<{
206
206
  POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
207
207
  }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
208
208
  POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
package/dist/events.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { D as createPolymarketClient, E as polymarketOperation, i as eventSchema, o as listEventsParamsSchema, w as tagSchema } from "./schemas-C6SqZjA-.mjs";
1
+ import { D as createPolymarketClient, E as polymarketOperation, i as eventSchema, o as listEventsParamsSchema, w as tagSchema } from "./schemas-DGLbQgHc.mjs";
2
2
  import { z } from "zod";
3
3
 
4
4
  //#region src/events.ts
@@ -8,7 +8,7 @@ import { z } from "zod";
8
8
  * Steps for listing, getting, and querying Polymarket events via the Gamma API.
9
9
  */
10
10
  const listEvents = polymarketOperation({
11
- id: "list_polymarket_events",
11
+ id: "polymarket.list-polymarket-events",
12
12
  name: "List Polymarket Events",
13
13
  description: "List and filter events with query params via the Gamma API",
14
14
  input: listEventsParamsSchema,
@@ -23,7 +23,7 @@ const listEvents = polymarketOperation({
23
23
  }
24
24
  });
25
25
  const getEvent = polymarketOperation({
26
- id: "get_polymarket_event",
26
+ id: "polymarket.get-polymarket-event",
27
27
  name: "Get Polymarket Event",
28
28
  description: "Get a single event by ID from the Gamma API",
29
29
  input: z.object({ id: z.string() }),
@@ -37,7 +37,7 @@ const getEvent = polymarketOperation({
37
37
  }
38
38
  });
39
39
  const getEventBySlug = polymarketOperation({
40
- id: "get_polymarket_event_by_slug",
40
+ id: "polymarket.get-polymarket-event-by-slug",
41
41
  name: "Get Polymarket Event by Slug",
42
42
  description: "Get a single event by slug from the Gamma API",
43
43
  input: z.object({ slug: z.string() }),
@@ -51,7 +51,7 @@ const getEventBySlug = polymarketOperation({
51
51
  }
52
52
  });
53
53
  const getEventTags = polymarketOperation({
54
- id: "get_polymarket_event_tags",
54
+ id: "polymarket.get-polymarket-event-tags",
55
55
  name: "Get Polymarket Event Tags",
56
56
  description: "Get tags for an event by event ID from the Gamma API",
57
57
  input: z.object({ id: z.string() }),
package/dist/index.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { n as polymarket, t as PolymarketCredentials } from "./integration-CTzLOy9r.mjs";
1
+ import { n as polymarket, t as PolymarketCredentials } from "./integration-B_E07iTd.mjs";
2
2
  import { getLiveVolume, getMarketHolders, getOpenInterest, getUserPositions, listTrades } from "./data.mjs";
3
3
  import { getProfile, getSeries, getSportsMarketTypes, getSportsMetadata, getSportsTeams, listSeries, listTags, search } from "./discovery.mjs";
4
4
  import { getEvent, getEventBySlug, getEventTags, listEvents } from "./events.mjs";
@@ -90,10 +90,10 @@ declare const listMarketsParamsSchema: z.ZodObject<{
90
90
  offset: z.ZodOptional<z.ZodNumber>;
91
91
  order: z.ZodOptional<z.ZodEnum<{
92
92
  volume24hr: "volume24hr";
93
- volumeNum: "volumeNum";
94
- liquidityNum: "liquidityNum";
95
93
  startDate: "startDate";
96
94
  endDate: "endDate";
95
+ volumeNum: "volumeNum";
96
+ liquidityNum: "liquidityNum";
97
97
  competitive: "competitive";
98
98
  closedTime: "closedTime";
99
99
  }>>;
@@ -311,9 +311,9 @@ declare const tradeSchema: z.ZodObject<{
311
311
  market: z.ZodOptional<z.ZodString>;
312
312
  asset_id: z.ZodOptional<z.ZodString>;
313
313
  side: z.ZodOptional<z.ZodString>;
314
- size: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>>;
315
- fee_rate_bps: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>>;
316
- price: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>>;
314
+ size: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
315
+ fee_rate_bps: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
316
+ price: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
317
317
  status: z.ZodOptional<z.ZodString>;
318
318
  match_time: z.ZodOptional<z.ZodString>;
319
319
  last_update: z.ZodOptional<z.ZodString>;
@@ -324,7 +324,7 @@ declare const tradeSchema: z.ZodObject<{
324
324
  bucket_index: z.ZodOptional<z.ZodNumber>;
325
325
  owner: z.ZodOptional<z.ZodString>;
326
326
  type: z.ZodOptional<z.ZodString>;
327
- }, z.core.$loose>;
327
+ }, z.core.$catchall<z.ZodJSONSchema>>;
328
328
  type Trade = z.infer<typeof tradeSchema>;
329
329
  declare const positionSchema: z.ZodObject<{
330
330
  asset: z.ZodOptional<z.ZodString>;
package/dist/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
- import { C as spreadSchema, D as createPolymarketClient, S as sportsTeamSchema, T as tradeSchema, _ as profileSchema, a as holderSchema, b as sportsMarketTypeSchema, c as liveVolumeSchema, d as orderBookEntrySchema, f as orderBookSummarySchema, g as priceHistoryResponseSchema, h as priceHistoryPointSchema, i as eventSchema, l as marketSchema, m as positionSchema, n as clobPriceSchema, o as listEventsParamsSchema, p as paginationParamsSchema, r as clobPricesMapSchema, s as listMarketsParamsSchema, t as clobMidpointSchema, u as openInterestSchema, v as searchResultSchema, w as tagSchema, x as sportsMetadataSchema, y as seriesSchema } from "./schemas-C6SqZjA-.mjs";
2
- import { t as polymarket } from "./integration-KDxC97JC.mjs";
1
+ import { C as spreadSchema, D as createPolymarketClient, S as sportsTeamSchema, T as tradeSchema, _ as profileSchema, a as holderSchema, b as sportsMarketTypeSchema, c as liveVolumeSchema, d as orderBookEntrySchema, f as orderBookSummarySchema, g as priceHistoryResponseSchema, h as priceHistoryPointSchema, i as eventSchema, l as marketSchema, m as positionSchema, n as clobPriceSchema, o as listEventsParamsSchema, p as paginationParamsSchema, r as clobPricesMapSchema, s as listMarketsParamsSchema, t as clobMidpointSchema, u as openInterestSchema, v as searchResultSchema, w as tagSchema, x as sportsMetadataSchema, y as seriesSchema } from "./schemas-DGLbQgHc.mjs";
2
+ import { t as polymarket } from "./integration-Bf-3OGOJ.mjs";
3
3
  import { getLiveVolume, getMarketHolders, getOpenInterest, getUserPositions, listTrades } from "./data.mjs";
4
4
  import { getProfile, getSeries, getSportsMarketTypes, getSportsMetadata, getSportsTeams, listSeries, listTags, search } from "./discovery.mjs";
5
5
  import { getEvent, getEventBySlug, getEventTags, listEvents } from "./events.mjs";
@@ -1,14 +1,13 @@
1
1
  import { z } from "zod";
2
- import * as _keystrokehq_integration_authoring_official0 from "@keystrokehq/integration-authoring/official";
2
+ import * as _keystrokehq_core0 from "@keystrokehq/core";
3
3
  import * as _keystrokehq_core_credential_set0 from "@keystrokehq/core/credential-set";
4
4
  import { InferCredentialSetAuth } from "@keystrokehq/core/credential-set";
5
- import * as _keystrokehq_core0 from "@keystrokehq/core";
6
5
 
7
6
  //#region src/integration.d.ts
8
- declare const polymarketBundle: _keystrokehq_integration_authoring_official0.OfficialIntegrationBundle<"polymarket", z.ZodObject<{
7
+ declare const polymarketBundle: undefined<"polymarket", z.ZodObject<{
9
8
  POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
10
9
  }, z.core.$strip>>;
11
- declare const polymarket: _keystrokehq_core0.CredentialSet<"keystroke:polymarket", z.ZodObject<{
10
+ declare const polymarket: _keystrokehq_core0.CredentialSet<"polymarket", z.ZodObject<{
12
11
  POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
13
12
  }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
14
13
  POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
@@ -0,0 +1,117 @@
1
+ import { z } from "zod";
2
+ import { CredentialSet, Operation } from "@keystrokehq/core";
3
+
4
+ //#region ../../packages/integration-authoring/dist/official/runtime.mjs
5
+ const REGISTRY_KEY = "__ks_official_integration_metadata_registry";
6
+ function getRegistry() {
7
+ const globalStore = globalThis;
8
+ if (!globalStore[REGISTRY_KEY]) globalStore[REGISTRY_KEY] = /* @__PURE__ */ new WeakMap();
9
+ return globalStore[REGISTRY_KEY];
10
+ }
11
+ function registerOfficialOperation(operation, metadata) {
12
+ getRegistry().set(operation, Object.freeze({ ...metadata }));
13
+ }
14
+
15
+ //#endregion
16
+ //#region ../../packages/integration-authoring/dist/official/index.mjs
17
+ const OFFICIAL_CREDENTIAL_SET_ID_PREFIX = "keystroke:";
18
+ function stripOfficialCredentialSetIdPrefix(id) {
19
+ return id.startsWith(OFFICIAL_CREDENTIAL_SET_ID_PREFIX) ? id.slice(10) : id;
20
+ }
21
+ /**
22
+ * Creates a factory for Keystroke-official integration operations.
23
+ *
24
+ * It keeps the same flat `run(input, credentials)` ergonomics as the generic
25
+ * operation factory, while registering official metadata for builder/runtime
26
+ * operation metadata.
27
+ */
28
+ function createOfficialOperationFactory(credentialSet) {
29
+ const integrationId = stripOfficialCredentialSetIdPrefix(credentialSet.id);
30
+ return (config) => {
31
+ const wrappedRun = async (input, ctx) => {
32
+ const creds = ctx.credentials[credentialSet.id];
33
+ return config.run(input, creds);
34
+ };
35
+ const operation = new Operation({
36
+ id: config.id,
37
+ name: config.name,
38
+ description: config.description,
39
+ input: config.input,
40
+ output: config.output,
41
+ credentialSets: [credentialSet],
42
+ ...config.tags !== void 0 ? { tags: config.tags } : {},
43
+ ...config.needsApproval !== void 0 ? { needsApproval: config.needsApproval } : {},
44
+ ...config.requiredOAuthScopes !== void 0 ? { requiredOAuthScopes: config.requiredOAuthScopes } : {},
45
+ ...config.retries !== void 0 ? { retries: config.retries } : {},
46
+ ...config.timeout !== void 0 ? { timeout: config.timeout } : {},
47
+ ...config.maxDurationMs !== void 0 ? { maxDurationMs: config.maxDurationMs } : {},
48
+ run: wrappedRun
49
+ });
50
+ registerOfficialOperation(operation, { integrationId });
51
+ return operation;
52
+ };
53
+ }
54
+ /**
55
+ * Creates an official integration bundle from a single config object.
56
+ *
57
+ * - Creates the public `CredentialSet` internally.
58
+ * - Accepts optional `internal` fields for Keystroke-owned platform credentials.
59
+ */
60
+ function defineOfficialIntegration(config) {
61
+ const internalCredentialSets = config.internal ?? {};
62
+ const allInternalCredentialSets = [
63
+ ...internalCredentialSets.providerApp ? [internalCredentialSets.providerApp] : [],
64
+ ...internalCredentialSets.providerAppVariants ?? [],
65
+ ...internalCredentialSets.webhookVerification ? [internalCredentialSets.webhookVerification] : [],
66
+ ...internalCredentialSets.other ?? []
67
+ ];
68
+ const credentialSet = new CredentialSet({
69
+ id: config.id,
70
+ name: config.name,
71
+ description: config.description,
72
+ auth: config.auth,
73
+ ...config.connections ? { connections: config.connections } : {},
74
+ ...config.proxy ? { proxy: config.proxy } : {},
75
+ ...config.needsRawSecret === true ? { needsRawSecret: true } : {}
76
+ });
77
+ return Object.freeze({
78
+ integration: {
79
+ id: config.id,
80
+ name: config.name,
81
+ ...config.description !== void 0 ? { description: config.description } : {},
82
+ auth: config.auth,
83
+ ...config.proxy ? { proxy: config.proxy } : {},
84
+ ...config.needsRawSecret === true ? { needsRawSecret: true } : {},
85
+ ...config.connections ? { connections: config.connections } : {}
86
+ },
87
+ credentialSet,
88
+ internalCredentialSets,
89
+ allInternalCredentialSets
90
+ });
91
+ }
92
+
93
+ //#endregion
94
+ //#region src/integration.ts
95
+ const polymarketAuthSchema = z.object({ POLYMARKET_API_KEY: z.string().optional() });
96
+ /**
97
+ * Polymarket integration — prediction market data via three public APIs.
98
+ *
99
+ * The API key is stored as a credential and included as a header when present.
100
+ * This enables future support for authenticated CLOB trading endpoints.
101
+ */
102
+ const polymarketOfficialIntegration = {
103
+ id: "polymarket",
104
+ name: "Polymarket",
105
+ description: "Polymarket — decentralized prediction market data",
106
+ auth: polymarketAuthSchema,
107
+ proxy: { hosts: [
108
+ "gamma-api.polymarket.com",
109
+ "clob.polymarket.com",
110
+ "data-api.polymarket.com"
111
+ ] }
112
+ };
113
+ const polymarketBundle = defineOfficialIntegration(polymarketOfficialIntegration);
114
+ const polymarket = polymarketBundle.credentialSet;
115
+
116
+ //#endregion
117
+ export { polymarketBundle as n, createOfficialOperationFactory as r, polymarket as t };
@@ -1,6 +1,6 @@
1
1
  import { z } from "zod";
2
- import * as _keystrokehq_core_credential_set0 from "@keystrokehq/core/credential-set";
3
2
  import * as _keystrokehq_core0 from "@keystrokehq/core";
3
+ import * as _keystrokehq_core_credential_set0 from "@keystrokehq/core/credential-set";
4
4
 
5
5
  //#region src/markets.d.ts
6
6
  declare const listMarkets: _keystrokehq_core0.Operation<z.ZodObject<{
@@ -8,10 +8,10 @@ declare const listMarkets: _keystrokehq_core0.Operation<z.ZodObject<{
8
8
  offset: z.ZodOptional<z.ZodNumber>;
9
9
  order: z.ZodOptional<z.ZodEnum<{
10
10
  volume24hr: "volume24hr";
11
- volumeNum: "volumeNum";
12
- liquidityNum: "liquidityNum";
13
11
  startDate: "startDate";
14
12
  endDate: "endDate";
13
+ volumeNum: "volumeNum";
14
+ liquidityNum: "liquidityNum";
15
15
  competitive: "competitive";
16
16
  closedTime: "closedTime";
17
17
  }>>;
@@ -60,7 +60,7 @@ declare const listMarkets: _keystrokehq_core0.Operation<z.ZodObject<{
60
60
  enableOrderBook: z.ZodOptional<z.ZodBoolean>;
61
61
  createdAt: z.ZodOptional<z.ZodString>;
62
62
  updatedAt: z.ZodOptional<z.ZodString>;
63
- }, z.core.$loose>>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:polymarket", z.ZodObject<{
63
+ }, z.core.$loose>>, readonly [_keystrokehq_core0.CredentialSet<"polymarket", z.ZodObject<{
64
64
  POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
65
65
  }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
66
66
  POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
@@ -96,7 +96,7 @@ declare const getMarket: _keystrokehq_core0.Operation<z.ZodObject<{
96
96
  enableOrderBook: z.ZodOptional<z.ZodBoolean>;
97
97
  createdAt: z.ZodOptional<z.ZodString>;
98
98
  updatedAt: z.ZodOptional<z.ZodString>;
99
- }, z.core.$loose>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:polymarket", z.ZodObject<{
99
+ }, z.core.$loose>, readonly [_keystrokehq_core0.CredentialSet<"polymarket", z.ZodObject<{
100
100
  POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
101
101
  }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
102
102
  POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
@@ -132,7 +132,7 @@ declare const getMarketBySlug: _keystrokehq_core0.Operation<z.ZodObject<{
132
132
  enableOrderBook: z.ZodOptional<z.ZodBoolean>;
133
133
  createdAt: z.ZodOptional<z.ZodString>;
134
134
  updatedAt: z.ZodOptional<z.ZodString>;
135
- }, z.core.$loose>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:polymarket", z.ZodObject<{
135
+ }, z.core.$loose>, readonly [_keystrokehq_core0.CredentialSet<"polymarket", z.ZodObject<{
136
136
  POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
137
137
  }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
138
138
  POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
@@ -143,7 +143,7 @@ declare const getMarketTags: _keystrokehq_core0.Operation<z.ZodObject<{
143
143
  id: z.ZodString;
144
144
  label: z.ZodString;
145
145
  slug: z.ZodOptional<z.ZodString>;
146
- }, z.core.$loose>>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:polymarket", z.ZodObject<{
146
+ }, z.core.$loose>>, readonly [_keystrokehq_core0.CredentialSet<"polymarket", z.ZodObject<{
147
147
  POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
148
148
  }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
149
149
  POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
package/dist/markets.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { D as createPolymarketClient, E as polymarketOperation, l as marketSchema, s as listMarketsParamsSchema, w as tagSchema } from "./schemas-C6SqZjA-.mjs";
1
+ import { D as createPolymarketClient, E as polymarketOperation, l as marketSchema, s as listMarketsParamsSchema, w as tagSchema } from "./schemas-DGLbQgHc.mjs";
2
2
  import { z } from "zod";
3
3
 
4
4
  //#region src/markets.ts
@@ -8,7 +8,7 @@ import { z } from "zod";
8
8
  * Steps for listing, getting, and querying Polymarket markets via the Gamma API.
9
9
  */
10
10
  const listMarkets = polymarketOperation({
11
- id: "list_polymarket_markets",
11
+ id: "polymarket.list-polymarket-markets",
12
12
  name: "List Polymarket Markets",
13
13
  description: "List and filter markets with extensive query params via the Gamma API",
14
14
  input: listMarketsParamsSchema,
@@ -23,7 +23,7 @@ const listMarkets = polymarketOperation({
23
23
  }
24
24
  });
25
25
  const getMarket = polymarketOperation({
26
- id: "get_polymarket_market",
26
+ id: "polymarket.get-polymarket-market",
27
27
  name: "Get Polymarket Market",
28
28
  description: "Get a single market by ID from the Gamma API",
29
29
  input: z.object({ id: z.string() }),
@@ -37,7 +37,7 @@ const getMarket = polymarketOperation({
37
37
  }
38
38
  });
39
39
  const getMarketBySlug = polymarketOperation({
40
- id: "get_polymarket_market_by_slug",
40
+ id: "polymarket.get-polymarket-market-by-slug",
41
41
  name: "Get Polymarket Market by Slug",
42
42
  description: "Get a single market by slug from the Gamma API",
43
43
  input: z.object({ slug: z.string() }),
@@ -51,7 +51,7 @@ const getMarketBySlug = polymarketOperation({
51
51
  }
52
52
  });
53
53
  const getMarketTags = polymarketOperation({
54
- id: "get_polymarket_market_tags",
54
+ id: "polymarket.get-polymarket-market-tags",
55
55
  name: "Get Polymarket Market Tags",
56
56
  description: "Get tags for a market by market ID from the Gamma API",
57
57
  input: z.object({ id: z.string() }),
@@ -1,6 +1,6 @@
1
1
  import { z } from "zod";
2
- import * as _keystrokehq_core_credential_set0 from "@keystrokehq/core/credential-set";
3
2
  import * as _keystrokehq_core0 from "@keystrokehq/core";
3
+ import * as _keystrokehq_core_credential_set0 from "@keystrokehq/core/credential-set";
4
4
 
5
5
  //#region src/orderbook.d.ts
6
6
  declare const getOrderBook: _keystrokehq_core0.Operation<z.ZodObject<{
@@ -21,7 +21,7 @@ declare const getOrderBook: _keystrokehq_core0.Operation<z.ZodObject<{
21
21
  min_order_size: z.ZodOptional<z.ZodString>;
22
22
  tick_size: z.ZodOptional<z.ZodString>;
23
23
  neg_risk: z.ZodOptional<z.ZodBoolean>;
24
- }, z.core.$loose>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:polymarket", z.ZodObject<{
24
+ }, z.core.$loose>, readonly [_keystrokehq_core0.CredentialSet<"polymarket", z.ZodObject<{
25
25
  POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
26
26
  }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
27
27
  POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
@@ -44,7 +44,7 @@ declare const batchGetOrderBooks: _keystrokehq_core0.Operation<z.ZodObject<{
44
44
  min_order_size: z.ZodOptional<z.ZodString>;
45
45
  tick_size: z.ZodOptional<z.ZodString>;
46
46
  neg_risk: z.ZodOptional<z.ZodBoolean>;
47
- }, z.core.$loose>>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:polymarket", z.ZodObject<{
47
+ }, z.core.$loose>>, readonly [_keystrokehq_core0.CredentialSet<"polymarket", z.ZodObject<{
48
48
  POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
49
49
  }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
50
50
  POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
@@ -56,7 +56,7 @@ declare const batchGetSpreads: _keystrokehq_core0.Operation<z.ZodObject<{
56
56
  spread: z.ZodString;
57
57
  bid: z.ZodOptional<z.ZodString>;
58
58
  ask: z.ZodOptional<z.ZodString>;
59
- }, z.core.$loose>>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:polymarket", z.ZodObject<{
59
+ }, z.core.$loose>>, readonly [_keystrokehq_core0.CredentialSet<"polymarket", z.ZodObject<{
60
60
  POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
61
61
  }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
62
62
  POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
@@ -1,4 +1,4 @@
1
- import { C as spreadSchema, D as createPolymarketClient, E as polymarketOperation, f as orderBookSummarySchema } from "./schemas-C6SqZjA-.mjs";
1
+ import { C as spreadSchema, D as createPolymarketClient, E as polymarketOperation, f as orderBookSummarySchema } from "./schemas-DGLbQgHc.mjs";
2
2
  import { z } from "zod";
3
3
 
4
4
  //#region src/orderbook.ts
@@ -9,7 +9,7 @@ import { z } from "zod";
9
9
  * Prices and sizes are returned as strings.
10
10
  */
11
11
  const getOrderBook = polymarketOperation({
12
- id: "get_polymarket_order_book",
12
+ id: "polymarket.get-polymarket-order-book",
13
13
  name: "Get Polymarket Order Book",
14
14
  description: "Get order book (bids/asks) for a token via the CLOB API",
15
15
  input: z.object({ tokenID: z.string() }),
@@ -24,7 +24,7 @@ const getOrderBook = polymarketOperation({
24
24
  }
25
25
  });
26
26
  const batchGetOrderBooks = polymarketOperation({
27
- id: "batch_get_polymarket_order_books",
27
+ id: "polymarket.batch-get-polymarket-order-books",
28
28
  name: "Batch Get Polymarket Order Books",
29
29
  description: "Get order books for multiple tokens (max 500) via the CLOB API",
30
30
  input: z.object({ tokenIDs: z.array(z.string()).max(500) }),
@@ -39,7 +39,7 @@ const batchGetOrderBooks = polymarketOperation({
39
39
  }
40
40
  });
41
41
  const batchGetSpreads = polymarketOperation({
42
- id: "batch_get_polymarket_spreads",
42
+ id: "polymarket.batch-get-polymarket-spreads",
43
43
  name: "Batch Get Polymarket Spreads",
44
44
  description: "Get spreads for multiple tokens (max 500) via the CLOB API",
45
45
  input: z.object({ tokenIDs: z.array(z.string()).max(500) }),
@@ -1,6 +1,6 @@
1
1
  import { z } from "zod";
2
- import * as _keystrokehq_core_credential_set0 from "@keystrokehq/core/credential-set";
3
2
  import * as _keystrokehq_core0 from "@keystrokehq/core";
3
+ import * as _keystrokehq_core_credential_set0 from "@keystrokehq/core/credential-set";
4
4
 
5
5
  //#region src/pricing.d.ts
6
6
  declare const getPrice: _keystrokehq_core0.Operation<z.ZodObject<{
@@ -11,7 +11,7 @@ declare const getPrice: _keystrokehq_core0.Operation<z.ZodObject<{
11
11
  }>;
12
12
  }, z.core.$strip>, z.ZodObject<{
13
13
  price: z.ZodString;
14
- }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:polymarket", z.ZodObject<{
14
+ }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"polymarket", z.ZodObject<{
15
15
  POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
16
16
  }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
17
17
  POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
@@ -20,7 +20,7 @@ declare const getMidpoint: _keystrokehq_core0.Operation<z.ZodObject<{
20
20
  tokenID: z.ZodString;
21
21
  }, z.core.$strip>, z.ZodObject<{
22
22
  mid: z.ZodString;
23
- }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:polymarket", z.ZodObject<{
23
+ }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"polymarket", z.ZodObject<{
24
24
  POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
25
25
  }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
26
26
  POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
@@ -28,7 +28,7 @@ declare const getMidpoint: _keystrokehq_core0.Operation<z.ZodObject<{
28
28
  declare const listPrices: _keystrokehq_core0.Operation<z.ZodObject<{}, z.core.$strip>, z.ZodRecord<z.ZodString, z.ZodObject<{
29
29
  BUY: z.ZodString;
30
30
  SELL: z.ZodString;
31
- }, z.core.$strip>>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:polymarket", z.ZodObject<{
31
+ }, z.core.$strip>>, readonly [_keystrokehq_core0.CredentialSet<"polymarket", z.ZodObject<{
32
32
  POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
33
33
  }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
34
34
  POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
@@ -38,7 +38,7 @@ declare const batchGetPrices: _keystrokehq_core0.Operation<z.ZodObject<{
38
38
  }, z.core.$strip>, z.ZodRecord<z.ZodString, z.ZodObject<{
39
39
  BUY: z.ZodString;
40
40
  SELL: z.ZodString;
41
- }, z.core.$strip>>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:polymarket", z.ZodObject<{
41
+ }, z.core.$strip>>, readonly [_keystrokehq_core0.CredentialSet<"polymarket", z.ZodObject<{
42
42
  POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
43
43
  }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
44
44
  POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
@@ -54,7 +54,7 @@ declare const getPriceHistory: _keystrokehq_core0.Operation<z.ZodObject<{
54
54
  t: z.ZodNumber;
55
55
  p: z.ZodNumber;
56
56
  }, z.core.$strip>>;
57
- }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:polymarket", z.ZodObject<{
57
+ }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"polymarket", z.ZodObject<{
58
58
  POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
59
59
  }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
60
60
  POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
package/dist/pricing.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { D as createPolymarketClient, E as polymarketOperation, g as priceHistoryResponseSchema, n as clobPriceSchema, r as clobPricesMapSchema, t as clobMidpointSchema } from "./schemas-C6SqZjA-.mjs";
1
+ import { D as createPolymarketClient, E as polymarketOperation, g as priceHistoryResponseSchema, n as clobPriceSchema, r as clobPricesMapSchema, t as clobMidpointSchema } from "./schemas-DGLbQgHc.mjs";
2
2
  import { z } from "zod";
3
3
 
4
4
  //#region src/pricing.ts
@@ -9,7 +9,7 @@ import { z } from "zod";
9
9
  * Note: CLOB API returns prices as strings, not numbers.
10
10
  */
11
11
  const getPrice = polymarketOperation({
12
- id: "get_polymarket_price",
12
+ id: "polymarket.get-polymarket-price",
13
13
  name: "Get Polymarket Price",
14
14
  description: "Get price for a token and side (BUY/SELL) via the CLOB API",
15
15
  input: z.object({
@@ -30,7 +30,7 @@ const getPrice = polymarketOperation({
30
30
  }
31
31
  });
32
32
  const getMidpoint = polymarketOperation({
33
- id: "get_polymarket_midpoint",
33
+ id: "polymarket.get-polymarket-midpoint",
34
34
  name: "Get Polymarket Midpoint",
35
35
  description: "Get midpoint price for a token via the CLOB API",
36
36
  input: z.object({ tokenID: z.string() }),
@@ -45,7 +45,7 @@ const getMidpoint = polymarketOperation({
45
45
  }
46
46
  });
47
47
  const listPrices = polymarketOperation({
48
- id: "list_polymarket_prices",
48
+ id: "polymarket.list-polymarket-prices",
49
49
  name: "List Polymarket Prices",
50
50
  description: "Get all current prices via the CLOB API",
51
51
  input: z.object({}),
@@ -59,7 +59,7 @@ const listPrices = polymarketOperation({
59
59
  }
60
60
  });
61
61
  const batchGetPrices = polymarketOperation({
62
- id: "batch_get_polymarket_prices",
62
+ id: "polymarket.batch-get-polymarket-prices",
63
63
  name: "Batch Get Polymarket Prices",
64
64
  description: "Get prices for multiple tokens (max 500) via the CLOB API",
65
65
  input: z.object({ tokenIDs: z.array(z.string()).max(500) }),
@@ -74,7 +74,7 @@ const batchGetPrices = polymarketOperation({
74
74
  }
75
75
  });
76
76
  const getPriceHistory = polymarketOperation({
77
- id: "get_polymarket_price_history",
77
+ id: "polymarket.get-polymarket-price-history",
78
78
  name: "Get Polymarket Price History",
79
79
  description: "Get historical prices with interval/fidelity via the CLOB API",
80
80
  input: z.object({
@@ -1,6 +1,5 @@
1
- import { t as polymarket } from "./integration-KDxC97JC.mjs";
1
+ import { r as createOfficialOperationFactory, t as polymarket } from "./integration-Bf-3OGOJ.mjs";
2
2
  import { z } from "zod";
3
- import { createOfficialOperationFactory } from "@keystrokehq/integration-authoring/official";
4
3
 
5
4
  //#region src/client.ts
6
5
  const POLYMARKET_HOSTS = {
@@ -280,9 +279,9 @@ const tradeSchema = z.object({
280
279
  market: z.string().optional(),
281
280
  asset_id: z.string().optional(),
282
281
  side: z.string().optional(),
283
- size: z.union([z.string(), z.number()]).transform(String).optional(),
284
- fee_rate_bps: z.union([z.string(), z.number()]).transform(String).optional(),
285
- price: z.union([z.string(), z.number()]).transform(String).optional(),
282
+ size: z.union([z.string(), z.number()]).optional(),
283
+ fee_rate_bps: z.union([z.string(), z.number()]).optional(),
284
+ price: z.union([z.string(), z.number()]).optional(),
286
285
  status: z.string().optional(),
287
286
  match_time: z.string().optional(),
288
287
  last_update: z.string().optional(),
@@ -293,7 +292,7 @@ const tradeSchema = z.object({
293
292
  bucket_index: z.number().optional(),
294
293
  owner: z.string().optional(),
295
294
  type: z.string().optional()
296
- }).passthrough();
295
+ }).catchall(z.json());
297
296
  const positionSchema = z.object({
298
297
  asset: z.string().optional(),
299
298
  conditionId: z.string().optional(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@keystrokehq/polymarket",
3
- "version": "0.0.7",
3
+ "version": "0.0.9",
4
4
  "private": false,
5
5
  "sideEffects": false,
6
6
  "type": "module",
@@ -44,7 +44,6 @@
44
44
  "LICENSE"
45
45
  ],
46
46
  "dependencies": {
47
- "@keystrokehq/integration-authoring": "^0.0.7",
48
47
  "zod": "^4.3.6"
49
48
  },
50
49
  "peerDependencies": {
@@ -55,8 +54,9 @@
55
54
  "tsdown": "^0.20.3",
56
55
  "typescript": "^5.9.3",
57
56
  "vitest": "^4.0.18",
58
- "@keystrokehq/core": "^0.0.8",
57
+ "@keystrokehq/core": "^0.0.12",
59
58
  "@keystrokehq/test-utils": "0.0.0",
59
+ "@keystrokehq/integration-authoring": "0.0.9",
60
60
  "@keystrokehq/typescript-config": "0.0.0"
61
61
  },
62
62
  "keywords": [
@@ -1,27 +0,0 @@
1
- import { z } from "zod";
2
- import { defineOfficialIntegration } from "@keystrokehq/integration-authoring/official";
3
-
4
- //#region src/integration.ts
5
- const polymarketAuthSchema = z.object({ POLYMARKET_API_KEY: z.string().optional() });
6
- /**
7
- * Polymarket integration — prediction market data via three public APIs.
8
- *
9
- * The API key is stored as a credential and included as a header when present.
10
- * This enables future support for authenticated CLOB trading endpoints.
11
- */
12
- const polymarketOfficialIntegration = {
13
- id: "polymarket",
14
- name: "Polymarket",
15
- description: "Polymarket — decentralized prediction market data",
16
- auth: polymarketAuthSchema,
17
- proxy: { hosts: [
18
- "gamma-api.polymarket.com",
19
- "clob.polymarket.com",
20
- "data-api.polymarket.com"
21
- ] }
22
- };
23
- const polymarketBundle = defineOfficialIntegration(polymarketOfficialIntegration);
24
- const polymarket = polymarketBundle.credentialSet;
25
-
26
- //#endregion
27
- export { polymarketBundle as n, polymarket as t };