@structbuild/sdk 0.1.18 → 0.1.20

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,10 +1,8 @@
1
1
  import { Namespace } from "./base.js";
2
2
  import type { HttpResponse } from "../types/http.js";
3
3
  import type { Venue } from "../types/common.js";
4
- import type { Series, SeriesDetail, Event, GetSeriesListParams, GetSeriesDetailParams, GetSeriesEventsParams, GetSeriesOutcomesParams } from "../types/index.js";
4
+ import type { Series, GetSeriesListParams, GetSeriesOutcomesParams } from "../types/index.js";
5
5
  export declare class SeriesNamespace extends Namespace {
6
6
  getSeriesList(params?: GetSeriesListParams, venue?: Venue): Promise<HttpResponse<Series[]>>;
7
- getSeriesDetail(params: GetSeriesDetailParams, venue?: Venue): Promise<HttpResponse<SeriesDetail>>;
8
- getSeriesEvents(params: GetSeriesEventsParams, venue?: Venue): Promise<HttpResponse<Event[]>>;
9
7
  getSeriesOutcomes(params: GetSeriesOutcomesParams, venue?: Venue): Promise<HttpResponse<Record<string, string>>>;
10
8
  }
@@ -1,12 +1,12 @@
1
1
  import { PlatformNamespace } from "./base.js";
2
2
  import type { HttpResponse } from "../types/http.js";
3
- import type { WebhookResponse, WebhookListResponseBody, WebhookTestResponseBody, RotateSecretResponse, ListEventsResponse, ListWebhooksParams, GetWebhookParams, CreateWebhookParams, UpdateWebhookParams, DeleteWebhookParams, TestWebhookParams, RotateSecretParams } from "../types/index.js";
3
+ import type { WebhookResponse, WebhookListResponseBody, WebhookTestResponseBody, RotateSecretResponse, ListEventsResponse, ListWebhooksParams, GetWebhookParams, CreateWebhookParams, UpdateWebhookParams, DeleteWebhookParams, DeleteWebhookResponse, TestWebhookParams, RotateSecretParams } from "../types/index.js";
4
4
  export declare class WebhooksNamespace extends PlatformNamespace {
5
5
  list(params?: ListWebhooksParams): Promise<HttpResponse<WebhookListResponseBody>>;
6
6
  create(body: CreateWebhookParams): Promise<HttpResponse<WebhookResponse>>;
7
7
  getWebhook(params: GetWebhookParams): Promise<HttpResponse<WebhookResponse>>;
8
8
  update(params: UpdateWebhookParams): Promise<HttpResponse<WebhookResponse>>;
9
- deleteWebhook(params: DeleteWebhookParams): Promise<HttpResponse<void>>;
9
+ deleteWebhook(params: DeleteWebhookParams): Promise<HttpResponse<DeleteWebhookResponse>>;
10
10
  test(params: TestWebhookParams): Promise<HttpResponse<WebhookTestResponseBody>>;
11
11
  rotateSecret(params: RotateSecretParams): Promise<HttpResponse<RotateSecretResponse>>;
12
12
  listEvents(): Promise<HttpResponse<ListEventsResponse>>;
@@ -43,7 +43,6 @@ export type PositionVolumeDataPoint = Schemas["PositionVolumeDataPoint"];
43
43
  export type PredictionCandlestickBar = Schemas["PredictionCandlestickBar"];
44
44
  export type PredictionTradeResponse = Schemas["PredictionTradeResponse"];
45
45
  export type SearchResponse = Schemas["SearchResponse"];
46
- export type SeriesFullResponse = Schemas["SeriesFullResponse"];
47
46
  export type SimpleTimeframeMetrics = Schemas["SimpleTimeframeMetrics"];
48
47
  export type SortDirection = Schemas["SortDirection"];
49
48
  export type TokenOutcome = Schemas["TokenOutcome"];
@@ -59,8 +58,15 @@ export type AssetPriceHistoryRow = Schemas["AssetPriceHistoryRow"];
59
58
  export type AssetSymbol = Schemas["AssetSymbol"];
60
59
  export type AssetVariant = Schemas["AssetVariant"];
61
60
  export type PriceJump = Schemas["PriceJump"];
61
+ export type EventMarketChartDataPoint = Schemas["EventMarketChartDataPoint"];
62
+ export type MarketResponse = Schemas["MarketResponse"];
63
+ export type MarketReward = Schemas["MarketReward"];
64
+ export type MarketSortBy = Schemas["MarketSortBy"];
65
+ export type MarketStatus = Schemas["MarketStatus"];
66
+ export type OutcomeIndex = Schemas["OutcomeIndex"];
67
+ export type PositionChartDataPoint = Schemas["PositionChartDataPoint"];
68
+ export type TradeType = Schemas["TradeType"];
62
69
  export type Series = Schemas["PolymarketSeries"];
63
- export type SeriesDetail = Schemas["SeriesFullResponse"];
64
70
  export type Trade = Schemas["PredictionTradeResponse"];
65
71
  export type Candlestick = Schemas["PredictionCandlestickBar"];
66
72
  export type CandlestickResponse = Schemas["PredictionCandlestickBar"][];
@@ -136,6 +142,12 @@ export interface GetBondsParams extends OperationQuery<"get_bonds"> {
136
142
  }
137
143
  export interface GetEventsParams extends OperationQuery<"get_events"> {
138
144
  }
145
+ export interface GetEventParams extends OperationQuery<"get_event"> {
146
+ identifier: string;
147
+ }
148
+ export interface GetEventBySlugParams extends OperationQuery<"get_event_by_slug"> {
149
+ slug: string;
150
+ }
139
151
  export interface GetEventMetricsParams extends OperationQuery<"get_event_metrics"> {
140
152
  }
141
153
  export interface GetMarketMetricsParams extends OperationQuery<"get_market_metrics"> {
@@ -155,6 +167,12 @@ export interface GetPositionHoldersHistoryParams {
155
167
  }
156
168
  export interface GetMarketsParams extends OperationQuery<"list_markets"> {
157
169
  }
170
+ export interface GetMarketParams extends OperationQuery<"get_market"> {
171
+ conditionId: string;
172
+ }
173
+ export interface GetMarketBySlugParams extends OperationQuery<"get_market_by_slug"> {
174
+ slug: string;
175
+ }
158
176
  export interface GetCandlestickParams extends OperationQuery<"get_market_candlestick"> {
159
177
  }
160
178
  export interface GetPositionCandlestickParams extends OperationQuery<"get_position_candlestick"> {
@@ -169,12 +187,6 @@ export interface GetSearchParams extends OperationQuery<"search"> {
169
187
  }
170
188
  export interface GetSeriesListParams extends OperationQuery<"get_series_list"> {
171
189
  }
172
- export interface GetSeriesDetailParams extends OperationQuery<"get_series_by_id"> {
173
- identifier: string;
174
- }
175
- export interface GetSeriesEventsParams extends OperationQuery<"get_series_events"> {
176
- identifier: string;
177
- }
178
190
  export interface GetSeriesOutcomesParams extends OperationQuery<"get_series_outcomes"> {
179
191
  }
180
192
  export interface GetTagsParams extends OperationQuery<"get_tags"> {
@@ -250,8 +262,19 @@ export type EventVolumeMilestonePayload = WebhookSchemas["EventVolumeMilestonePa
250
262
  export type PositionVolumeMilestonePayload = WebhookSchemas["PositionVolumeMilestonePayload"];
251
263
  export type ProbabilitySpikePayload = WebhookSchemas["ProbabilitySpikePayload"];
252
264
  export type RotateSecretResponse = WebhookSchemas["RotateSecretResponse"];
265
+ export type DeleteWebhookResponse = WebhookSchemas["DeleteWebhookResponse"];
253
266
  export type ListEventsResponse = WebhookSchemas["ListEventsResponse"];
254
267
  export type WebhookEventInfo = WebhookSchemas["WebhookEventInfo"];
268
+ export type CloseToBondPayload = WebhookSchemas["CloseToBondPayload"];
269
+ export type MarketCreatedOutcome = WebhookSchemas["MarketCreatedOutcome"];
270
+ export type MarketCreatedPayload = WebhookSchemas["MarketCreatedPayload"];
271
+ export type NewMarketPayload = WebhookSchemas["NewMarketPayload"];
272
+ export type WhaleTradePayload = WebhookSchemas["WhaleTradePayload"];
273
+ export type AssetPriceTickPayload = WebhookSchemas["AssetPriceTickPayload"];
274
+ export type AssetPriceWindowUpdatePayload = WebhookSchemas["AssetPriceWindowUpdatePayload"];
275
+ export type EventVolumeSpikePayload = WebhookSchemas["EventVolumeSpikePayload"];
276
+ export type MarketVolumeSpikePayload = WebhookSchemas["MarketVolumeSpikePayload"];
277
+ export type PositionVolumeSpikePayload = WebhookSchemas["PositionVolumeSpikePayload"];
255
278
  export interface ListWebhooksParams extends WebhookOperationQuery<"list_webhooks"> {
256
279
  }
257
280
  export interface GetWebhookParams {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@structbuild/sdk",
3
- "version": "0.1.18",
3
+ "version": "0.1.20",
4
4
  "type": "module",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.js",