@polymarket/bindings 0.1.0-beta.2 → 0.1.0-beta.3

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 {U as U$1,ua,Q as Q$1,qa,sa,aa,ba,ca}from'../chunk-TM2ZY32Q.js';import {z as z$1}from'zod';var a=z$1.string(),g=z$1.string(),f=(m=>(m.TRADE="TRADE",m.SPLIT="SPLIT",m.MERGE="MERGE",m.REDEEM="REDEEM",m.REWARD="REWARD",m.CONVERSION="CONVERSION",m.MAKER_REBATE="MAKER_REBATE",m.REFERRAL_REWARD="REFERRAL_REWARD",m.YIELD="YIELD",m))(f||{}),b=z$1.enum(f),x=z$1.enum(["BUY","SELL"]),U=z$1.enum(["DAY","WEEK","MONTH","ALL"]),K=z$1.enum(["OVERALL","POLITICS","SPORTS","CRYPTO","CULTURE","MENTIONS","WEATHER","ECONOMICS","TECH","FINANCE"]),G=z$1.enum(["PNL","VOL"]);var u=z$1.preprocess(e=>e===""?void 0:e,z$1.string().optional()),z=z$1.object({proxyWallet:a.nullish(),side:x.nullish(),asset:qa.nullish(),conditionId:Q$1.nullish(),size:ua.nullish(),price:ua.nullish(),timestamp:U$1.nullish(),title:z$1.string().nullish(),slug:z$1.string().nullish(),icon:z$1.string().nullish(),eventSlug:z$1.string().nullish(),outcome:z$1.string().nullish(),outcomeIndex:z$1.number().int().nullish(),name:z$1.string().nullish(),pseudonym:z$1.string().nullish(),bio:z$1.string().nullish(),profileImage:z$1.string().nullish(),profileImageOptimized:z$1.string().nullish(),transactionHash:z$1.string().nullish()}).transform(({asset:e,proxyWallet:r,...c})=>({...c,wallet:r,tokenId:e})),T=z$1.object({proxyWallet:a.nullish(),timestamp:U$1.nullish(),conditionId:z$1.preprocess(e=>e===""?void 0:e,Q$1.optional()),type:b,size:ua.nullish(),usdcSize:ua.nullish(),transactionHash:sa.nullish(),price:ua.nullish(),asset:z$1.preprocess(e=>e===""?void 0:e,qa.optional()),side:z$1.preprocess(e=>e===""?void 0:e,x.nullish()),outcomeIndex:z$1.preprocess(e=>e===999?void 0:e,z$1.number().int().optional()),title:u,slug:u,icon:u,eventSlug:u,outcome:u,name:u,pseudonym:u,bio:u,profileImage:u,profileImageOptimized:u}),P=T.transform(M),Q=z$1.object({user:a.nullish(),traded:z$1.number().int().nullish()}),X=z$1.array(z),ee=z$1.array(P);function M(e){let r=v(e);switch(e.type){case "TRADE":return {...r,type:e.type,conditionId:s(e.conditionId,"conditionId"),tokenId:s(e.asset,"asset"),side:s(e.side,"side"),shares:s(e.size,"size"),amount:R(e),price:s(e.price,"price"),outcome:s(e.outcome,"outcome"),outcomeIndex:s(e.outcomeIndex,"outcomeIndex"),title:s(e.title,"title"),slug:s(e.slug,"slug"),icon:s(e.icon,"icon"),eventSlug:s(e.eventSlug,"eventSlug")};case "SPLIT":case "MERGE":case "REDEEM":case "CONVERSION":return {...r,type:e.type,conditionId:s(e.conditionId,"conditionId"),amount:R(e),title:s(e.title,"title"),slug:s(e.slug,"slug"),icon:s(e.icon,"icon"),eventSlug:s(e.eventSlug,"eventSlug")};case "REWARD":case "MAKER_REBATE":case "REFERRAL_REWARD":case "YIELD":return {...r,type:e.type,amount:R(e)}}}function v(e){return {wallet:s(e.proxyWallet,"proxyWallet"),timestamp:s(e.timestamp,"timestamp"),transactionHash:s(e.transactionHash,"transactionHash"),name:e.name??null,pseudonym:e.pseudonym??null,bio:e.bio??null,profileImage:e.profileImage??null,profileImageOptimized:e.profileImageOptimized??null}}function R(e){return s(e.usdcSize??e.size,"usdcSize")}function s(e,r){if(e==null)throw new TypeError(`Expected activity.${r} to be present`);return e}var D=z$1.object({proxyWallet:a.nullish(),bio:z$1.string().nullish(),asset:qa.nullish(),pseudonym:z$1.string().nullish(),amount:ua.nullish(),displayUsernamePublic:z$1.boolean().nullish(),outcomeIndex:z$1.number().int().nullish(),name:z$1.string().nullish(),profileImage:z$1.string().nullish(),profileImageOptimized:z$1.string().nullish()}).transform(({asset:e,proxyWallet:r,...c})=>({...c,wallet:r,tokenId:e})),k=z$1.object({token:z$1.string().nullish(),holders:z$1.array(D).nullish()}),O=z$1.object({market:g.nullish(),value:ua.nullish()}),B=z$1.object({market:g.nullish(),value:ua.nullish()}),C=z$1.object({total:ua.nullish(),markets:z$1.array(B).nullish()}),se=z$1.array(k),re=z$1.array(O),le=z$1.array(C);var V=z$1.object({rank:z$1.string().nullish(),builder:z$1.string().nullish(),volume:ua.nullish(),activeUsers:z$1.number().int().nullish(),verified:z$1.boolean().nullish(),builderLogo:z$1.string().nullish()}),H=z$1.object({dt:aa.nullish(),builder:z$1.string().nullish(),builderLogo:z$1.string().nullish(),verified:z$1.boolean().nullish(),volume:ua.nullish(),activeUsers:z$1.number().int().nullish(),rank:z$1.string().nullish()}).transform(({dt:e,...r})=>({...r,bucketAt:e})),w=z$1.object({rank:z$1.string().nullish(),proxyWallet:a.nullish(),userName:z$1.string().nullish(),vol:ua.nullish(),pnl:ua.nullish(),profileImage:z$1.string().nullish(),xUsername:z$1.string().nullish(),verifiedBadge:z$1.boolean().nullish()}).transform(({proxyWallet:e,...r})=>({...r,wallet:e})),me=z$1.array(V),he=z$1.array(H),de=z$1.array(w);var W=z$1.object({proxyWallet:a.nullish(),asset:qa.nullish(),conditionId:Q$1,size:ua.nullish(),avgPrice:ua.nullish(),initialValue:ua.nullish(),currentValue:ua.nullish(),cashPnl:ua.nullish(),percentPnl:z$1.number().nullish(),totalBought:ua.nullish(),realizedPnl:ua.nullish(),percentRealizedPnl:z$1.number().nullish(),curPrice:ua.nullish(),redeemable:z$1.boolean().nullish(),mergeable:z$1.boolean().nullish(),title:z$1.string().nullish(),slug:z$1.string().nullish(),icon:z$1.string().nullish(),eventId:z$1.string().nullish(),eventSlug:z$1.string().nullish(),outcome:z$1.string().nullish(),outcomeIndex:z$1.number().int().nullish(),oppositeOutcome:z$1.string().nullish(),oppositeAsset:qa.nullish(),endDate:ba.nullish(),negativeRisk:z$1.boolean().nullish()}).transform(({asset:e,oppositeAsset:r,proxyWallet:c,...S})=>({...S,wallet:c,tokenId:e,oppositeTokenId:r})),j=z$1.object({proxyWallet:a.nullish(),asset:qa.nullish(),conditionId:Q$1.nullish(),avgPrice:ua.nullish(),totalBought:ua.nullish(),realizedPnl:ua.nullish(),curPrice:ua.nullish(),timestamp:U$1.nullish(),title:z$1.string().nullish(),slug:z$1.string().nullish(),icon:z$1.string().nullish(),eventSlug:z$1.string().nullish(),outcome:z$1.string().nullish(),outcomeIndex:z$1.number().int().nullish(),oppositeOutcome:z$1.string().nullish(),oppositeAsset:qa.nullish(),endDate:ca.nullish()}).transform(({asset:e,oppositeAsset:r,proxyWallet:c,...S})=>({...S,wallet:c,tokenId:e,oppositeTokenId:r})),N=z$1.object({user:a.nullish(),value:ua.nullish()}),F=z$1.object({proxyWallet:a.nullish(),name:z$1.string().nullish(),profileImage:z$1.string().nullish(),verified:z$1.boolean().nullish(),asset:qa.nullish(),conditionId:Q$1.nullish(),avgPrice:ua.nullish(),size:ua.nullish(),currPrice:ua.nullish(),currentValue:ua.nullish(),cashPnl:ua.nullish(),totalBought:ua.nullish(),realizedPnl:ua.nullish(),totalPnl:ua.nullish(),outcome:z$1.string().nullish(),outcomeIndex:z$1.number().int().nullish()}).transform(({asset:e,proxyWallet:r,...c})=>({...c,wallet:r,tokenId:e})),Y=z$1.object({token:z$1.string().nullish(),positions:z$1.array(F).nullish()}),xe=z$1.array(W),Re=z$1.array(j),Ee=z$1.array(N),Ie=z$1.array(Y);export{P as ActivitySchema,f as ActivityType,b as ActivityTypeSchema,a as AddressSchema,H as BuilderVolumeEntrySchema,j as ClosedPositionSchema,le as FetchEventLiveVolumeResponseSchema,Ee as FetchPortfolioValueResponseSchema,g as Hash64Schema,D as HolderSchema,K as LeaderboardCategorySchema,V as LeaderboardEntrySchema,G as LeaderboardOrderBySchema,ee as ListActivityResponseSchema,me as ListBuilderLeaderboardResponseSchema,he as ListBuilderVolumeResponseSchema,Re as ListClosedPositionsResponseSchema,se as ListMarketHoldersResponseSchema,Ie as ListMarketPositionsResponseSchema,re as ListOpenInterestResponseSchema,xe as ListPositionsResponseSchema,de as ListTraderLeaderboardResponseSchema,X as ListTradesResponseSchema,C as LiveVolumeSchema,F as MarketPositionSchema,B as MarketVolumeSchema,k as MetaHolderSchema,Y as MetaMarketPositionSchema,O as OpenInterestSchema,W as PositionSchema,x as SideSchema,U as TimePeriodSchema,z as TradeSchema,Q as TradedSchema,w as TraderLeaderboardEntrySchema,N as ValueSchema};//# sourceMappingURL=index.js.map
1
+ import {Y as Y$1,Da,U as U$1,za,Ba,fa,ga,ha,sa,ra}from'../chunk-KZQH7LDK.js';import {z as z$1}from'zod';var u=z$1.string(),L=z$1.string(),A=(c=>(c.TRADE="TRADE",c.SPLIT="SPLIT",c.MERGE="MERGE",c.REDEEM="REDEEM",c.REWARD="REWARD",c.CONVERSION="CONVERSION",c.MAKER_REBATE="MAKER_REBATE",c.REFERRAL_REWARD="REFERRAL_REWARD",c.YIELD="YIELD",c))(A||{}),k=z$1.enum(A),P=z$1.enum(["BUY","SELL"]),le=z$1.enum(["DAY","WEEK","MONTH","ALL"]),ae=z$1.enum(["OVERALL","POLITICS","SPORTS","CRYPTO","CULTURE","MENTIONS","WEATHER","ECONOMICS","TECH","FINANCE"]),ue=z$1.enum(["PNL","VOL"]);var h=z$1.preprocess(e=>e===""?void 0:e,z$1.string().optional()),H=z$1.object({proxyWallet:u.nullish(),side:P.nullish(),asset:za.nullish(),conditionId:U$1.nullish(),size:Da.nullish(),price:Da.nullish(),timestamp:Y$1.nullish(),title:z$1.string().nullish(),slug:z$1.string().nullish(),icon:z$1.string().nullish(),eventSlug:z$1.string().nullish(),outcome:z$1.string().nullish(),outcomeIndex:z$1.number().int().nullish(),name:z$1.string().nullish(),pseudonym:z$1.string().nullish(),bio:z$1.string().nullish(),profileImage:z$1.string().nullish(),profileImageOptimized:z$1.string().nullish(),transactionHash:z$1.string().nullish()}).transform(({asset:e,proxyWallet:i,...a})=>({...a,wallet:i,tokenId:e})),j=z$1.object({proxyWallet:u.nullish(),timestamp:Y$1.nullish(),conditionId:z$1.preprocess(e=>e===""?void 0:e,U$1.optional()),type:k,size:Da.nullish(),usdcSize:Da.nullish(),transactionHash:Ba.nullish(),price:Da.nullish(),asset:z$1.preprocess(e=>e===""?void 0:e,za.optional()),side:z$1.preprocess(e=>e===""?void 0:e,P.nullish()),outcomeIndex:z$1.preprocess(e=>e===999?void 0:e,z$1.number().int().optional()),title:h,slug:h,icon:h,eventSlug:h,outcome:h,name:h,pseudonym:h,bio:h,profileImage:h,profileImageOptimized:h}),w=j.transform(W),he=z$1.object({user:u.nullish(),traded:z$1.number().int().nullish()}),ge=z$1.array(H),ye=z$1.array(w);function W(e){let i=N(e);switch(e.type){case "TRADE":return {...i,type:e.type,conditionId:r(e.conditionId,"conditionId"),tokenId:r(e.asset,"asset"),side:r(e.side,"side"),shares:r(e.size,"size"),amount:z(e),price:r(e.price,"price"),outcome:r(e.outcome,"outcome"),outcomeIndex:r(e.outcomeIndex,"outcomeIndex"),title:r(e.title,"title"),slug:r(e.slug,"slug"),icon:e.icon??null,eventSlug:r(e.eventSlug,"eventSlug")};case "SPLIT":case "MERGE":case "REDEEM":case "CONVERSION":return {...i,type:e.type,conditionId:r(e.conditionId,"conditionId"),amount:z(e),title:r(e.title,"title"),slug:r(e.slug,"slug"),icon:e.icon??null,eventSlug:r(e.eventSlug,"eventSlug")};case "REWARD":case "MAKER_REBATE":case "REFERRAL_REWARD":case "YIELD":return {...i,type:e.type,amount:z(e)}}}function N(e){return {wallet:r(e.proxyWallet,"proxyWallet"),timestamp:r(e.timestamp,"timestamp"),transactionHash:r(e.transactionHash,"transactionHash"),name:e.name??null,pseudonym:e.pseudonym??null,bio:e.bio??null,profileImage:e.profileImage??null,profileImageOptimized:e.profileImageOptimized??null}}function z(e){return r(e.usdcSize??e.size,"usdcSize")}function r(e,i){if(e==null)throw new TypeError(`Expected activity.${i} to be present`);return e}var F=z$1.object({proxyWallet:u.nullish(),bio:z$1.string().nullish(),asset:za.nullish(),pseudonym:z$1.string().nullish(),amount:Da.nullish(),displayUsernamePublic:z$1.boolean().nullish(),outcomeIndex:z$1.number().int().nullish(),name:z$1.string().nullish(),profileImage:z$1.string().nullish(),profileImageOptimized:z$1.string().nullish()}).transform(({asset:e,proxyWallet:i,...a})=>({...a,wallet:i,tokenId:e})),U=z$1.object({token:z$1.string().nullish(),holders:z$1.array(F).nullish()}),Y=z$1.object({market:L.nullish(),value:Da.nullish()}),K=z$1.object({market:L.nullish(),value:Da.nullish()}),G=z$1.object({total:Da.nullish(),markets:z$1.array(K).nullish()}),be=z$1.array(U),Ie=z$1.array(Y),Ee=z$1.array(G);var Z=z$1.object({rank:z$1.string().nullish(),builder:z$1.string().nullish(),volume:Da.nullish(),activeUsers:z$1.number().int().nullish(),verified:z$1.boolean().nullish(),builderLogo:z$1.string().nullish()}),$=z$1.object({dt:fa.nullish(),builder:z$1.string().nullish(),builderLogo:z$1.string().nullish(),verified:z$1.boolean().nullish(),volume:Da.nullish(),activeUsers:z$1.number().int().nullish(),rank:z$1.string().nullish()}).transform(({dt:e,...i})=>({...i,bucketAt:e})),q=z$1.object({rank:z$1.string().nullish(),proxyWallet:u.nullish(),userName:z$1.string().nullish(),vol:Da.nullish(),pnl:Da.nullish(),profileImage:z$1.string().nullish(),xUsername:z$1.string().nullish(),verifiedBadge:z$1.boolean().nullish()}).transform(({proxyWallet:e,...i})=>({...i,wallet:e})),ve=z$1.array(Z),Te=z$1.array($),_e=z$1.array(q);var C=(d=>(d.Open="OPEN",d.Partial="PARTIAL",d.ResolvedWin="RESOLVED_WIN",d.ResolvedLoss="RESOLVED_LOSS",d))(C||{}),D=z$1.enum(C),J=z$1.object({proxyWallet:u.nullish(),asset:za.nullish(),conditionId:U$1,size:Da.nullish(),avgPrice:Da.nullish(),initialValue:Da.nullish(),currentValue:Da.nullish(),cashPnl:Da.nullish(),percentPnl:z$1.number().nullish(),totalBought:Da.nullish(),realizedPnl:Da.nullish(),percentRealizedPnl:z$1.number().nullish(),curPrice:Da.nullish(),redeemable:z$1.boolean().nullish(),mergeable:z$1.boolean().nullish(),title:z$1.string().nullish(),slug:z$1.string().nullish(),icon:z$1.string().nullish(),eventId:z$1.string().nullish(),eventSlug:z$1.string().nullish(),outcome:z$1.string().nullish(),outcomeIndex:z$1.number().int().nullish(),oppositeOutcome:z$1.string().nullish(),oppositeAsset:za.nullish(),endDate:ga.nullish(),negativeRisk:z$1.boolean().nullish()}).transform(({asset:e,oppositeAsset:i,proxyWallet:a,...p})=>({...p,wallet:a,tokenId:e,oppositeTokenId:i})),Q=z$1.object({proxyWallet:u.nullish(),asset:za.nullish(),conditionId:U$1.nullish(),avgPrice:Da.nullish(),totalBought:Da.nullish(),realizedPnl:Da.nullish(),curPrice:Da.nullish(),timestamp:Y$1.nullish(),title:z$1.string().nullish(),slug:z$1.string().nullish(),icon:z$1.string().nullish(),eventSlug:z$1.string().nullish(),outcome:z$1.string().nullish(),outcomeIndex:z$1.number().int().nullish(),oppositeOutcome:z$1.string().nullish(),oppositeAsset:za.nullish(),endDate:ha.nullish()}).transform(({asset:e,oppositeAsset:i,proxyWallet:a,...p})=>({...p,wallet:a,tokenId:e,oppositeTokenId:i})),X=z$1.object({user:u.nullish(),value:Da.nullish()}),ee=z$1.object({proxyWallet:u.nullish(),name:z$1.string().nullish(),profileImage:z$1.string().nullish(),verified:z$1.boolean().nullish(),asset:za.nullish(),conditionId:U$1.nullish(),avgPrice:Da.nullish(),size:Da.nullish(),currPrice:Da.nullish(),currentValue:Da.nullish(),cashPnl:Da.nullish(),totalBought:Da.nullish(),realizedPnl:Da.nullish(),totalPnl:Da.nullish(),outcome:z$1.string().nullish(),outcomeIndex:z$1.number().int().nullish()}).transform(({asset:e,proxyWallet:i,...a})=>({...a,wallet:i,tokenId:e})),te=z$1.object({token:z$1.string().nullish(),positions:z$1.array(ee).nullish()}),ne=z$1.object({event_id:z$1.string().nullish(),event_slug:z$1.string().nullish(),event_title:z$1.string().nullish(),event_image:z$1.string().nullish()}).transform(({event_id:e,event_slug:i,event_title:a,event_image:p})=>({eventId:e,eventSlug:i,eventTitle:a,eventImage:p})),ie=z$1.object({market_id:z$1.string().nullish(),slug:z$1.string().nullish(),title:z$1.string().nullish(),outcome:z$1.string().nullish(),image_url:z$1.string().nullish(),icon_url:z$1.string().nullish(),category:z$1.string().nullish(),subcategory:z$1.string().nullish(),tags:z$1.array(z$1.string()).nullish(),end_date:fa.nullish(),event:ne.nullish()}).transform(({market_id:e,image_url:i,icon_url:a,end_date:p,...d})=>({...d,marketId:e,imageUrl:i,iconUrl:a,endDate:p})),oe=z$1.object({leg_index:z$1.number().int(),leg_position_id:sa,leg_condition_id:U$1,leg_outcome_index:z$1.number().int(),leg_outcome_label:z$1.string().nullish(),leg_status:D,leg_resolved_at:fa.nullish(),leg_current_price:Da.nullish(),market:ie.nullish()}).transform(({leg_index:e,leg_position_id:i,leg_condition_id:a,leg_outcome_index:p,leg_outcome_label:d,leg_status:x,leg_resolved_at:R,leg_current_price:b,...I})=>({...I,legIndex:e,legPositionId:i,legConditionId:a,legOutcomeIndex:p,legOutcomeLabel:d,legStatus:x,legResolvedAt:R,legCurrentPrice:b})),se=z$1.object({combo_condition_id:U$1,combo_position_id:sa,module_id:z$1.number().int(),user_address:u,shares_balance:Da,entry_avg_price_usdc:Da.nullish(),entry_cost_usdc:Da.nullish(),status:D,first_entry_at:fa,resolved_at:fa.nullish(),legs_total:z$1.number().int(),legs_resolved:z$1.number().int(),legs_pending:z$1.number().int(),legs:z$1.array(oe)}).transform(({combo_condition_id:e,combo_position_id:i,module_id:a,user_address:p,shares_balance:d,entry_avg_price_usdc:x,entry_cost_usdc:R,first_entry_at:b,resolved_at:I,legs_total:c,legs_resolved:O,legs_pending:B,...V})=>({...V,conditionId:e,positionId:i,moduleId:a,userAddress:p,shares:d,entryAvgPriceUsdc:x,entryCostUsdc:R,firstEntryAt:b,resolvedAt:I,legsTotal:c,legsResolved:O,legsPending:B})),Oe=z$1.object({combos:z$1.array(se),pagination:z$1.object({limit:z$1.number().int(),offset:z$1.number().int(),has_more:z$1.boolean(),next_cursor:ra.nullish()})}).transform(({pagination:e,...i})=>({...i,pagination:{limit:e.limit,offset:e.offset,hasMore:e.has_more,nextCursor:e.next_cursor}})),Be=z$1.array(J),Ve=z$1.array(Q),He=z$1.array(X),je=z$1.array(te);export{w as ActivitySchema,A as ActivityType,k as ActivityTypeSchema,u as AddressSchema,$ as BuilderVolumeEntrySchema,Q as ClosedPositionSchema,oe as ComboPositionLegSchema,ne as ComboPositionMarketEventSchema,ie as ComboPositionMarketSchema,se as ComboPositionSchema,C as ComboPositionStatus,D as ComboPositionStatusSchema,Ee as FetchEventLiveVolumeResponseSchema,He as FetchPortfolioValueResponseSchema,L as Hash64Schema,F as HolderSchema,ae as LeaderboardCategorySchema,Z as LeaderboardEntrySchema,ue as LeaderboardOrderBySchema,ye as ListActivityResponseSchema,ve as ListBuilderLeaderboardResponseSchema,Te as ListBuilderVolumeResponseSchema,Ve as ListClosedPositionsResponseSchema,Oe as ListComboPositionsResponseSchema,be as ListMarketHoldersResponseSchema,je as ListMarketPositionsResponseSchema,Ie as ListOpenInterestResponseSchema,Be as ListPositionsResponseSchema,_e as ListTraderLeaderboardResponseSchema,ge as ListTradesResponseSchema,G as LiveVolumeSchema,ee as MarketPositionSchema,K as MarketVolumeSchema,U as MetaHolderSchema,te as MetaMarketPositionSchema,Y as OpenInterestSchema,J as PositionSchema,P as SideSchema,le as TimePeriodSchema,H as TradeSchema,he as TradedSchema,q as TraderLeaderboardEntrySchema,X as ValueSchema};//# sourceMappingURL=index.js.map
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/data/common.ts","../../src/data/activity.ts","../../src/data/analytics.ts","../../src/data/leaderboard.ts","../../src/data/portfolio.ts"],"names":["AddressSchema","z","Hash64Schema","ActivityType","ActivityTypeSchema","SideSchema","TimePeriodSchema","LeaderboardCategorySchema","LeaderboardOrderBySchema","OptionalTextSchema","value","TradeSchema","TokenIdSchema","ConditionIdSchema","DecimalishSchema","EpochSecondsToMillisecondsSchema","asset","proxyWallet","rest","RawActivitySchema","TxHashSchema","ActivitySchema","normalizeActivity","TradedSchema","ListTradesResponseSchema","ListActivityResponseSchema","activity","base","normalizeActivityBase","expectPresent","inferAmount","field","HolderSchema","MetaHolderSchema","OpenInterestSchema","MarketVolumeSchema","LiveVolumeSchema","ListMarketHoldersResponseSchema","ListOpenInterestResponseSchema","FetchEventLiveVolumeResponseSchema","LeaderboardEntrySchema","BuilderVolumeEntrySchema","IsoDateTimeStringSchema","dt","TraderLeaderboardEntrySchema","ListBuilderLeaderboardResponseSchema","ListBuilderVolumeResponseSchema","ListTraderLeaderboardResponseSchema","PositionSchema","IsoCalendarDateStringSchema","oppositeAsset","ClosedPositionSchema","MixedDateTimeStringSchema","ValueSchema","MarketPositionSchema","MetaMarketPositionSchema","ListPositionsResponseSchema","ListClosedPositionsResponseSchema","FetchPortfolioValueResponseSchema","ListMarketPositionsResponseSchema"],"mappings":"kGAEO,IAAMA,CAAAA,CAAgBC,GAAAA,CAAE,QAAO,CACzBC,CAAAA,CAAeD,IAAE,MAAA,EAAO,CAEzBE,OACVA,CAAAA,CAAA,KAAA,CAAQ,OAAA,CACRA,CAAAA,CAAA,MAAQ,OAAA,CACRA,CAAAA,CAAA,MAAQ,OAAA,CACRA,CAAAA,CAAA,OAAS,QAAA,CACTA,CAAAA,CAAA,MAAA,CAAS,QAAA,CACTA,EAAA,UAAA,CAAa,YAAA,CACbA,EAAA,YAAA,CAAe,cAAA,CACfA,EAAA,eAAA,CAAkB,iBAAA,CAClBA,CAAAA,CAAA,KAAA,CAAQ,QATEA,CAAAA,CAAAA,EAAAA,CAAAA,EAAA,EAAA,CAAA,CAYCC,CAAAA,CAAqBH,GAAAA,CAAE,KAAKE,CAAY,CAAA,CAExCE,CAAAA,CAAaJ,GAAAA,CAAE,KAAK,CAAC,KAAA,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AAAA,CACR,OAAA,CAASD,CACX,CAAA,CAAE,CAAA,CAESuC,EAA2BtD,GAAAA,CAAE,MAAA,CAAO,CAC/C,KAAA,CAAOA,GAAAA,CAAE,MAAA,EAAO,CAAE,SAAQ,CAC1B,SAAA,CAAWA,IAAE,KAAA,CAAMqD,CAAoB,EAAE,OAAA,EAC3C,CAAC,CAAA,CAEYE,GAA8BvD,GAAAA,CAAE,KAAA,CAAM+C,CAAc,CAAA,CACpDS,EAAAA,CAAoCxD,IAAE,KAAA,CAAMkD,CAAoB,CAAA,CAChEO,EAAAA,CAAoCzD,IAAE,KAAA,CAAMoD,CAAW,EACvDM,EAAAA,CAAoC1D,GAAAA,CAAE,MACjDsD,CACF","file":"index.js","sourcesContent":["import { z } from 'zod';\n\nexport const AddressSchema = z.string();\nexport const Hash64Schema = z.string();\n\nexport enum ActivityType {\n TRADE = 'TRADE',\n SPLIT = 'SPLIT',\n MERGE = 'MERGE',\n REDEEM = 'REDEEM',\n REWARD = 'REWARD',\n CONVERSION = 'CONVERSION',\n MAKER_REBATE = 'MAKER_REBATE',\n REFERRAL_REWARD = 'REFERRAL_REWARD',\n YIELD = 'YIELD',\n}\n\nexport const ActivityTypeSchema = z.enum(ActivityType);\n\nexport const SideSchema = z.enum(['BUY', 'SELL']);\n\nexport const TimePeriodSchema = z.enum(['DAY', 'WEEK', 'MONTH', 'ALL']);\n\nexport const LeaderboardCategorySchema = z.enum([\n 'OVERALL',\n 'POLITICS',\n 'SPORTS',\n 'CRYPTO',\n 'CULTURE',\n 'MENTIONS',\n 'WEATHER',\n 'ECONOMICS',\n 'TECH',\n 'FINANCE',\n]);\n\nexport const LeaderboardOrderBySchema = z.enum(['PNL', 'VOL']);\n\nexport type Address = z.infer<typeof AddressSchema>;\nexport type Hash64 = z.infer<typeof Hash64Schema>;\nexport type Side = z.infer<typeof SideSchema>;\nexport type TimePeriod = z.infer<typeof TimePeriodSchema>;\nexport type LeaderboardCategory = z.infer<typeof LeaderboardCategorySchema>;\nexport type LeaderboardOrderBy = z.infer<typeof LeaderboardOrderBySchema>;\n","import { z } from 'zod';\nimport {\n type ConditionId,\n ConditionIdSchema,\n DecimalishSchema,\n type DecimalString,\n type EpochMilliseconds,\n EpochSecondsToMillisecondsSchema,\n type TokenId,\n TokenIdSchema,\n type TxHash,\n TxHashSchema,\n} from '../shared';\nimport {\n ActivityType,\n ActivityTypeSchema,\n type Address,\n AddressSchema,\n type Side,\n SideSchema,\n} from './common';\n\nexport type ActivityBase = {\n /** Wallet address whose account history contains this activity. */\n wallet: Address;\n /** Activity time as Unix epoch milliseconds. */\n timestamp: EpochMilliseconds;\n /** Polygon transaction hash that produced or records this activity. */\n transactionHash: TxHash;\n /** Display name of the wallet owner at the time returned by the API. */\n name: string | null;\n /** Public pseudonym of the wallet owner at the time returned by the API. */\n pseudonym: string | null;\n /** Profile biography of the wallet owner at the time returned by the API. */\n bio: string | null;\n /** Source profile image URL for the wallet owner. */\n profileImage: string | null;\n /** Optimized profile image URL for the wallet owner. */\n profileImageOptimized: string | null;\n};\n\nexport type TradeActivity = ActivityBase & {\n /** A directional outcome-token trade. */\n type: 'TRADE';\n /** Condition id of the market traded by the wallet. */\n conditionId: ConditionId;\n /** Outcome token id bought or sold by the wallet. */\n tokenId: TokenId;\n /** Direction of the wallet's trade in the outcome token. */\n side: Side;\n /** Number of outcome-token shares traded by the wallet. */\n shares: DecimalString;\n /** The notional value of the traded shares in USD. */\n amount: DecimalString;\n /** The execution price per outcome-token share in USD. */\n price: DecimalString;\n /** Display label of the outcome token traded by the wallet. */\n outcome: string;\n /** Zero-based index of the outcome token in the market's outcome list. */\n outcomeIndex: number;\n /** Human-readable title of the market traded by the wallet. */\n title: string;\n /** URL slug of the market traded by the wallet. */\n slug: string;\n /** Icon URL for the market traded by the wallet. */\n icon: string;\n /** URL slug of the event containing the traded market. */\n eventSlug: string;\n};\n\nexport type SplitActivity = ActivityBase & {\n /** Splitting collateral into a complete market set. */\n type: 'SPLIT';\n /** Condition id of the market whose complete set was created. */\n conditionId: ConditionId;\n /** The collateral amount split into the complete set in USD. */\n amount: DecimalString;\n /** Human-readable title of the market whose complete set was created. */\n title: string;\n /** URL slug of the market whose complete set was created. */\n slug: string;\n /** Icon URL for the market whose complete set was created. */\n icon: string;\n /** URL slug of the event containing the split market. */\n eventSlug: string;\n};\n\nexport type MergeActivity = ActivityBase & {\n /** Merging a complete market set into collateral. */\n type: 'MERGE';\n /** Condition id of the market whose complete set was merged. */\n conditionId: ConditionId;\n /** The collateral amount received from merging the complete set in USD. */\n amount: DecimalString;\n /** Human-readable title of the market whose complete set was merged. */\n title: string;\n /** URL slug of the market whose complete set was merged. */\n slug: string;\n /** Icon URL for the market whose complete set was merged. */\n icon: string;\n /** URL slug of the event containing the merged market. */\n eventSlug: string;\n};\n\nexport type RedeemActivity = ActivityBase & {\n /** Redeeming resolved market proceeds. */\n type: 'REDEEM';\n /** Condition id of the market redeemed by the wallet. */\n conditionId: ConditionId;\n /** The proceeds redeemed from the resolved market in USD. */\n amount: DecimalString;\n /** Human-readable title of the market redeemed by the wallet. */\n title: string;\n /** URL slug of the market redeemed by the wallet. */\n slug: string;\n /** Icon URL for the market redeemed by the wallet. */\n icon: string;\n /** URL slug of the event containing the redeemed market. */\n eventSlug: string;\n};\n\nexport type ConversionActivity = ActivityBase & {\n /** A market conversion or migration activity. */\n type: 'CONVERSION';\n /** Condition id of the market involved in the conversion. */\n conditionId: ConditionId;\n /** The amount converted or migrated for the market in USD. */\n amount: DecimalString;\n /** Human-readable title of the market involved in the conversion. */\n title: string;\n /** URL slug of the market involved in the conversion. */\n slug: string;\n /** Icon URL for the market involved in the conversion. */\n icon: string;\n /** URL slug of the event containing the converted market. */\n eventSlug: string;\n};\n\nexport type RewardActivity = ActivityBase & {\n /** An account-level reward credit. */\n type: 'REWARD';\n /** The reward amount credited to the wallet in USD. */\n amount: DecimalString;\n};\n\nexport type MakerRebateActivity = ActivityBase & {\n /** An account-level maker rebate credit. */\n type: 'MAKER_REBATE';\n /** The maker rebate amount credited to the wallet in USD. */\n amount: DecimalString;\n};\n\nexport type ReferralRewardActivity = ActivityBase & {\n /** An account-level referral reward credit. */\n type: 'REFERRAL_REWARD';\n /** The referral reward amount credited to the wallet in USD. */\n amount: DecimalString;\n};\n\nexport type YieldActivity = ActivityBase & {\n /** An account-level yield credit. */\n type: 'YIELD';\n /** The yield amount credited to the wallet in USD. */\n amount: DecimalString;\n};\n\nexport type Activity =\n | TradeActivity\n | SplitActivity\n | MergeActivity\n | RedeemActivity\n | ConversionActivity\n | RewardActivity\n | MakerRebateActivity\n | ReferralRewardActivity\n | YieldActivity;\n\nconst OptionalTextSchema = z.preprocess(\n (value) => (value === '' ? undefined : value),\n z.string().optional(),\n);\n\nexport const TradeSchema = z\n .object({\n proxyWallet: AddressSchema.nullish(),\n side: SideSchema.nullish(),\n asset: TokenIdSchema.nullish(),\n conditionId: ConditionIdSchema.nullish(),\n size: DecimalishSchema.nullish(),\n price: DecimalishSchema.nullish(),\n timestamp: EpochSecondsToMillisecondsSchema.nullish(),\n title: z.string().nullish(),\n slug: z.string().nullish(),\n icon: z.string().nullish(),\n eventSlug: z.string().nullish(),\n outcome: z.string().nullish(),\n outcomeIndex: z.number().int().nullish(),\n name: z.string().nullish(),\n pseudonym: z.string().nullish(),\n bio: z.string().nullish(),\n profileImage: z.string().nullish(),\n profileImageOptimized: z.string().nullish(),\n transactionHash: z.string().nullish(),\n })\n .transform(({ asset, proxyWallet, ...rest }) => ({\n ...rest,\n wallet: proxyWallet,\n tokenId: asset,\n }));\n\nconst RawActivitySchema = z.object({\n proxyWallet: AddressSchema.nullish(),\n timestamp: EpochSecondsToMillisecondsSchema.nullish(),\n conditionId: z.preprocess(\n (value) => (value === '' ? undefined : value),\n ConditionIdSchema.optional(),\n ),\n type: ActivityTypeSchema,\n size: DecimalishSchema.nullish(),\n usdcSize: DecimalishSchema.nullish(),\n transactionHash: TxHashSchema.nullish(),\n price: DecimalishSchema.nullish(),\n asset: z.preprocess(\n (value) => (value === '' ? undefined : value),\n TokenIdSchema.optional(),\n ),\n side: z.preprocess(\n (value) => (value === '' ? undefined : value),\n SideSchema.nullish(),\n ),\n outcomeIndex: z.preprocess(\n (value) => (value === 999 ? undefined : value),\n z.number().int().optional(),\n ),\n title: OptionalTextSchema,\n slug: OptionalTextSchema,\n icon: OptionalTextSchema,\n eventSlug: OptionalTextSchema,\n outcome: OptionalTextSchema,\n name: OptionalTextSchema,\n pseudonym: OptionalTextSchema,\n bio: OptionalTextSchema,\n profileImage: OptionalTextSchema,\n profileImageOptimized: OptionalTextSchema,\n});\n\nexport const ActivitySchema: z.ZodType<Activity> =\n RawActivitySchema.transform(normalizeActivity);\n\nexport const TradedSchema = z.object({\n user: AddressSchema.nullish(),\n traded: z.number().int().nullish(),\n});\n\nexport const ListTradesResponseSchema = z.array(TradeSchema);\nexport const ListActivityResponseSchema = z.array(ActivitySchema);\n\nexport type Trade = z.infer<typeof TradeSchema>;\nexport type Traded = z.infer<typeof TradedSchema>;\nexport type ListTradesResponse = z.infer<typeof ListTradesResponseSchema>;\nexport type ListActivityResponse = z.infer<typeof ListActivityResponseSchema>;\n\ntype RawActivity = z.infer<typeof RawActivitySchema>;\n\nfunction normalizeActivity(activity: RawActivity): Activity {\n const base = normalizeActivityBase(activity);\n\n switch (activity.type) {\n case ActivityType.TRADE:\n return {\n ...base,\n type: activity.type,\n conditionId: expectPresent(activity.conditionId, 'conditionId'),\n tokenId: expectPresent(activity.asset, 'asset'),\n side: expectPresent(activity.side, 'side'),\n shares: expectPresent(activity.size, 'size'),\n amount: inferAmount(activity),\n price: expectPresent(activity.price, 'price'),\n outcome: expectPresent(activity.outcome, 'outcome'),\n outcomeIndex: expectPresent(activity.outcomeIndex, 'outcomeIndex'),\n title: expectPresent(activity.title, 'title'),\n slug: expectPresent(activity.slug, 'slug'),\n icon: expectPresent(activity.icon, 'icon'),\n eventSlug: expectPresent(activity.eventSlug, 'eventSlug'),\n };\n case ActivityType.SPLIT:\n case ActivityType.MERGE:\n case ActivityType.REDEEM:\n case ActivityType.CONVERSION:\n return {\n ...base,\n type: activity.type,\n conditionId: expectPresent(activity.conditionId, 'conditionId'),\n amount: inferAmount(activity),\n title: expectPresent(activity.title, 'title'),\n slug: expectPresent(activity.slug, 'slug'),\n icon: expectPresent(activity.icon, 'icon'),\n eventSlug: expectPresent(activity.eventSlug, 'eventSlug'),\n };\n case ActivityType.REWARD:\n case ActivityType.MAKER_REBATE:\n case ActivityType.REFERRAL_REWARD:\n case ActivityType.YIELD:\n return {\n ...base,\n type: activity.type,\n amount: inferAmount(activity),\n };\n }\n}\n\nfunction normalizeActivityBase(activity: RawActivity): ActivityBase {\n return {\n wallet: expectPresent(activity.proxyWallet, 'proxyWallet'),\n timestamp: expectPresent(activity.timestamp, 'timestamp'),\n transactionHash: expectPresent(activity.transactionHash, 'transactionHash'),\n name: activity.name ?? null,\n pseudonym: activity.pseudonym ?? null,\n bio: activity.bio ?? null,\n profileImage: activity.profileImage ?? null,\n profileImageOptimized: activity.profileImageOptimized ?? null,\n };\n}\n\nfunction inferAmount(activity: RawActivity): DecimalString {\n return expectPresent(activity.usdcSize ?? activity.size, 'usdcSize');\n}\n\nfunction expectPresent<T>(value: T | null | undefined, field: string): T {\n if (value === null || value === undefined) {\n throw new TypeError(`Expected activity.${field} to be present`);\n }\n\n return value;\n}\n","import { z } from 'zod';\nimport { DecimalishSchema, TokenIdSchema } from '../shared';\nimport { AddressSchema, Hash64Schema } from './common';\n\nexport const HolderSchema = z\n .object({\n proxyWallet: AddressSchema.nullish(),\n bio: z.string().nullish(),\n asset: TokenIdSchema.nullish(),\n pseudonym: z.string().nullish(),\n amount: DecimalishSchema.nullish(),\n displayUsernamePublic: z.boolean().nullish(),\n outcomeIndex: z.number().int().nullish(),\n name: z.string().nullish(),\n profileImage: z.string().nullish(),\n profileImageOptimized: z.string().nullish(),\n })\n .transform(({ asset, proxyWallet, ...rest }) => ({\n ...rest,\n wallet: proxyWallet,\n tokenId: asset,\n }));\n\nexport const MetaHolderSchema = z.object({\n token: z.string().nullish(),\n holders: z.array(HolderSchema).nullish(),\n});\n\nexport const OpenInterestSchema = z.object({\n market: Hash64Schema.nullish(),\n value: DecimalishSchema.nullish(),\n});\n\nexport const MarketVolumeSchema = z.object({\n market: Hash64Schema.nullish(),\n value: DecimalishSchema.nullish(),\n});\n\nexport const LiveVolumeSchema = z.object({\n total: DecimalishSchema.nullish(),\n markets: z.array(MarketVolumeSchema).nullish(),\n});\n\nexport const ListMarketHoldersResponseSchema = z.array(MetaHolderSchema);\nexport const ListOpenInterestResponseSchema = z.array(OpenInterestSchema);\nexport const FetchEventLiveVolumeResponseSchema = z.array(LiveVolumeSchema);\n\nexport type Holder = z.infer<typeof HolderSchema>;\nexport type MetaHolder = z.infer<typeof MetaHolderSchema>;\nexport type OpenInterest = z.infer<typeof OpenInterestSchema>;\nexport type MarketVolume = z.infer<typeof MarketVolumeSchema>;\nexport type LiveVolume = z.infer<typeof LiveVolumeSchema>;\nexport type ListMarketHoldersResponse = z.infer<\n typeof ListMarketHoldersResponseSchema\n>;\nexport type ListOpenInterestResponse = z.infer<\n typeof ListOpenInterestResponseSchema\n>;\nexport type FetchEventLiveVolumeResponse = z.infer<\n typeof FetchEventLiveVolumeResponseSchema\n>;\n","import { z } from 'zod';\nimport { DecimalishSchema, IsoDateTimeStringSchema } from '../shared';\nimport { AddressSchema } from './common';\n\nexport const LeaderboardEntrySchema = z.object({\n rank: z.string().nullish(),\n builder: z.string().nullish(),\n volume: DecimalishSchema.nullish(),\n activeUsers: z.number().int().nullish(),\n verified: z.boolean().nullish(),\n builderLogo: z.string().nullish(),\n});\n\nexport const BuilderVolumeEntrySchema = z\n .object({\n dt: IsoDateTimeStringSchema.nullish(),\n builder: z.string().nullish(),\n builderLogo: z.string().nullish(),\n verified: z.boolean().nullish(),\n volume: DecimalishSchema.nullish(),\n activeUsers: z.number().int().nullish(),\n rank: z.string().nullish(),\n })\n .transform(({ dt, ...rest }) => ({\n ...rest,\n bucketAt: dt,\n }));\n\nexport const TraderLeaderboardEntrySchema = z\n .object({\n rank: z.string().nullish(),\n proxyWallet: AddressSchema.nullish(),\n userName: z.string().nullish(),\n vol: DecimalishSchema.nullish(),\n pnl: DecimalishSchema.nullish(),\n profileImage: z.string().nullish(),\n xUsername: z.string().nullish(),\n verifiedBadge: z.boolean().nullish(),\n })\n .transform(({ proxyWallet, ...rest }) => ({\n ...rest,\n wallet: proxyWallet,\n }));\n\nexport const ListBuilderLeaderboardResponseSchema = z.array(\n LeaderboardEntrySchema,\n);\nexport const ListBuilderVolumeResponseSchema = z.array(\n BuilderVolumeEntrySchema,\n);\nexport const ListTraderLeaderboardResponseSchema = z.array(\n TraderLeaderboardEntrySchema,\n);\n\nexport type LeaderboardEntry = z.infer<typeof LeaderboardEntrySchema>;\nexport type BuilderVolumeEntry = z.infer<typeof BuilderVolumeEntrySchema>;\nexport type TraderLeaderboardEntry = z.infer<\n typeof TraderLeaderboardEntrySchema\n>;\nexport type ListBuilderLeaderboardResponse = z.infer<\n typeof ListBuilderLeaderboardResponseSchema\n>;\nexport type ListBuilderVolumeResponse = z.infer<\n typeof ListBuilderVolumeResponseSchema\n>;\nexport type ListTraderLeaderboardResponse = z.infer<\n typeof ListTraderLeaderboardResponseSchema\n>;\n","import { z } from 'zod';\nimport {\n ConditionIdSchema,\n DecimalishSchema,\n EpochSecondsToMillisecondsSchema,\n IsoCalendarDateStringSchema,\n MixedDateTimeStringSchema,\n TokenIdSchema,\n} from '../shared';\nimport { AddressSchema } from './common';\n\nexport const PositionSchema = z\n .object({\n proxyWallet: AddressSchema.nullish(),\n asset: TokenIdSchema.nullish(),\n conditionId: ConditionIdSchema,\n size: DecimalishSchema.nullish(),\n avgPrice: DecimalishSchema.nullish(),\n initialValue: DecimalishSchema.nullish(),\n currentValue: DecimalishSchema.nullish(),\n cashPnl: DecimalishSchema.nullish(),\n percentPnl: z.number().nullish(),\n totalBought: DecimalishSchema.nullish(),\n realizedPnl: DecimalishSchema.nullish(),\n percentRealizedPnl: z.number().nullish(),\n curPrice: DecimalishSchema.nullish(),\n redeemable: z.boolean().nullish(),\n mergeable: z.boolean().nullish(),\n title: z.string().nullish(),\n slug: z.string().nullish(),\n icon: z.string().nullish(),\n eventId: z.string().nullish(),\n eventSlug: z.string().nullish(),\n outcome: z.string().nullish(),\n outcomeIndex: z.number().int().nullish(),\n oppositeOutcome: z.string().nullish(),\n oppositeAsset: TokenIdSchema.nullish(),\n endDate: IsoCalendarDateStringSchema.nullish(),\n negativeRisk: z.boolean().nullish(),\n })\n .transform(({ asset, oppositeAsset, proxyWallet, ...rest }) => ({\n ...rest,\n wallet: proxyWallet,\n tokenId: asset,\n oppositeTokenId: oppositeAsset,\n }));\n\nexport const ClosedPositionSchema = z\n .object({\n proxyWallet: AddressSchema.nullish(),\n asset: TokenIdSchema.nullish(),\n conditionId: ConditionIdSchema.nullish(),\n avgPrice: DecimalishSchema.nullish(),\n totalBought: DecimalishSchema.nullish(),\n realizedPnl: DecimalishSchema.nullish(),\n curPrice: DecimalishSchema.nullish(),\n timestamp: EpochSecondsToMillisecondsSchema.nullish(),\n title: z.string().nullish(),\n slug: z.string().nullish(),\n icon: z.string().nullish(),\n eventSlug: z.string().nullish(),\n outcome: z.string().nullish(),\n outcomeIndex: z.number().int().nullish(),\n oppositeOutcome: z.string().nullish(),\n oppositeAsset: TokenIdSchema.nullish(),\n endDate: MixedDateTimeStringSchema.nullish(),\n })\n .transform(({ asset, oppositeAsset, proxyWallet, ...rest }) => ({\n ...rest,\n wallet: proxyWallet,\n tokenId: asset,\n oppositeTokenId: oppositeAsset,\n }));\n\nexport const ValueSchema = z.object({\n user: AddressSchema.nullish(),\n value: DecimalishSchema.nullish(),\n});\n\nexport const MarketPositionSchema = z\n .object({\n proxyWallet: AddressSchema.nullish(),\n name: z.string().nullish(),\n profileImage: z.string().nullish(),\n verified: z.boolean().nullish(),\n asset: TokenIdSchema.nullish(),\n conditionId: ConditionIdSchema.nullish(),\n avgPrice: DecimalishSchema.nullish(),\n size: DecimalishSchema.nullish(),\n currPrice: DecimalishSchema.nullish(),\n currentValue: DecimalishSchema.nullish(),\n cashPnl: DecimalishSchema.nullish(),\n totalBought: DecimalishSchema.nullish(),\n realizedPnl: DecimalishSchema.nullish(),\n totalPnl: DecimalishSchema.nullish(),\n outcome: z.string().nullish(),\n outcomeIndex: z.number().int().nullish(),\n })\n .transform(({ asset, proxyWallet, ...rest }) => ({\n ...rest,\n wallet: proxyWallet,\n tokenId: asset,\n }));\n\nexport const MetaMarketPositionSchema = z.object({\n token: z.string().nullish(),\n positions: z.array(MarketPositionSchema).nullish(),\n});\n\nexport const ListPositionsResponseSchema = z.array(PositionSchema);\nexport const ListClosedPositionsResponseSchema = z.array(ClosedPositionSchema);\nexport const FetchPortfolioValueResponseSchema = z.array(ValueSchema);\nexport const ListMarketPositionsResponseSchema = z.array(\n MetaMarketPositionSchema,\n);\n\nexport type Position = z.infer<typeof PositionSchema>;\nexport type ClosedPosition = z.infer<typeof ClosedPositionSchema>;\nexport type Value = z.infer<typeof ValueSchema>;\nexport type MarketPosition = z.infer<typeof MarketPositionSchema>;\nexport type MetaMarketPosition = z.infer<typeof MetaMarketPositionSchema>;\nexport type ListPositionsResponse = z.infer<typeof ListPositionsResponseSchema>;\nexport type ListClosedPositionsResponse = z.infer<\n typeof ListClosedPositionsResponseSchema\n>;\nexport type FetchPortfolioValueResponse = z.infer<\n typeof FetchPortfolioValueResponseSchema\n>;\nexport type ListMarketPositionsResponse = z.infer<\n typeof ListMarketPositionsResponseSchema\n>;\n"]}
1
+ {"version":3,"sources":["../../src/data/common.ts","../../src/data/activity.ts","../../src/data/analytics.ts","../../src/data/leaderboard.ts","../../src/data/portfolio.ts"],"names":["AddressSchema","z","Hash64Schema","ActivityType","ActivityTypeSchema","SideSchema","TimePeriodSchema","LeaderboardCategorySchema","LeaderboardOrderBySchema","OptionalTextSchema","value","TradeSchema","TokenIdSchema","ConditionIdSchema","DecimalishSchema","EpochSecondsToMillisecondsSchema","asset","proxyWallet","rest","RawActivitySchema","TxHashSchema","ActivitySchema","normalizeActivity","TradedSchema","ListTradesResponseSchema","ListActivityResponseSchema","activity","base","normalizeActivityBase","expectPresent","inferAmount","field","HolderSchema","MetaHolderSchema","OpenInterestSchema","MarketVolumeSchema","LiveVolumeSchema","ListMarketHoldersResponseSchema","ListOpenInterestResponseSchema","FetchEventLiveVolumeResponseSchema","LeaderboardEntrySchema","BuilderVolumeEntrySchema","IsoDateTimeStringSchema","dt","TraderLeaderboardEntrySchema","ListBuilderLeaderboardResponseSchema","ListBuilderVolumeResponseSchema","ListTraderLeaderboardResponseSchema","ComboPositionStatus","ComboPositionStatusSchema","PositionSchema","IsoCalendarDateStringSchema","oppositeAsset","ClosedPositionSchema","MixedDateTimeStringSchema","ValueSchema","MarketPositionSchema","MetaMarketPositionSchema","ComboPositionMarketEventSchema","event_id","event_slug","event_title","event_image","ComboPositionMarketSchema","market_id","image_url","icon_url","end_date","ComboPositionLegSchema","PositionIdSchema","leg_index","leg_position_id","leg_condition_id","leg_outcome_index","leg_outcome_label","leg_status","leg_resolved_at","leg_current_price","ComboPositionSchema","combo_condition_id","combo_position_id","module_id","user_address","shares_balance","entry_avg_price_usdc","entry_cost_usdc","first_entry_at","resolved_at","legs_total","legs_resolved","legs_pending","ListComboPositionsResponseSchema","PaginationCursorSchema","pagination","ListPositionsResponseSchema","ListClosedPositionsResponseSchema","FetchPortfolioValueResponseSchema","ListMarketPositionsResponseSchema"],"mappings":"wGAEO,IAAMA,CAAAA,CAAgBC,GAAAA,CAAE,MAAA,EAAO,CACzBC,EAAeD,GAAAA,CAAE,MAAA,EAAO,CAEzBE,CAAAA,CAAAA,CAAAA,CAAAA,GACVA,CAAAA,CAAA,KAAA,CAAQ,QACRA,CAAAA,CAAA,KAAA,CAAQ,OAAA,CACRA,CAAAA,CAAA,KAAA,CAAQ,OAAA,CACRA,EAAA,MAAA,CAAS,QAAA,CACTA,CAAAA,CAAA,MAAA,CAAS,QAAA,C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QAAA,CACpB,UAAA,CAAYA,CAAAA,CAAW,WACzB,CACF,EAAE,CAAA,CAESC,EAAAA,CAA8B7F,GAAAA,CAAE,KAAA,CAAMiD,CAAc,CAAA,CACpD6C,GAAoC9F,GAAAA,CAAE,KAAA,CAAMoD,CAAoB,CAAA,CAChE2C,EAAAA,CAAoC/F,GAAAA,CAAE,KAAA,CAAMsD,CAAW,CAAA,CACvD0C,EAAAA,CAAoChG,GAAAA,CAAE,KAAA,CACjDwD,EACF","file":"index.js","sourcesContent":["import { z } from 'zod';\n\nexport const AddressSchema = z.string();\nexport const Hash64Schema = z.string();\n\nexport enum ActivityType {\n TRADE = 'TRADE',\n SPLIT = 'SPLIT',\n MERGE = 'MERGE',\n REDEEM = 'REDEEM',\n REWARD = 'REWARD',\n CONVERSION = 'CONVERSION',\n MAKER_REBATE = 'MAKER_REBATE',\n REFERRAL_REWARD = 'REFERRAL_REWARD',\n YIELD = 'YIELD',\n}\n\nexport const ActivityTypeSchema = z.enum(ActivityType);\n\nexport const SideSchema = z.enum(['BUY', 'SELL']);\n\nexport const TimePeriodSchema = z.enum(['DAY', 'WEEK', 'MONTH', 'ALL']);\n\nexport const LeaderboardCategorySchema = z.enum([\n 'OVERALL',\n 'POLITICS',\n 'SPORTS',\n 'CRYPTO',\n 'CULTURE',\n 'MENTIONS',\n 'WEATHER',\n 'ECONOMICS',\n 'TECH',\n 'FINANCE',\n]);\n\nexport const LeaderboardOrderBySchema = z.enum(['PNL', 'VOL']);\n\nexport type Address = z.infer<typeof AddressSchema>;\nexport type Hash64 = z.infer<typeof Hash64Schema>;\nexport type Side = z.infer<typeof SideSchema>;\nexport type TimePeriod = z.infer<typeof TimePeriodSchema>;\nexport type LeaderboardCategory = z.infer<typeof LeaderboardCategorySchema>;\nexport type LeaderboardOrderBy = z.infer<typeof LeaderboardOrderBySchema>;\n","import { z } from 'zod';\nimport {\n type ConditionId,\n ConditionIdSchema,\n DecimalishSchema,\n type DecimalString,\n type EpochMilliseconds,\n EpochSecondsToMillisecondsSchema,\n type TokenId,\n TokenIdSchema,\n type TxHash,\n TxHashSchema,\n} from '../shared';\nimport {\n ActivityType,\n ActivityTypeSchema,\n type Address,\n AddressSchema,\n type Side,\n SideSchema,\n} from './common';\n\nexport type ActivityBase = {\n /** Wallet address whose account history contains this activity. */\n wallet: Address;\n /** Activity time as Unix epoch milliseconds. */\n timestamp: EpochMilliseconds;\n /** Polygon transaction hash that produced or records this activity. */\n transactionHash: TxHash;\n /** Display name of the wallet owner at the time returned by the API. */\n name: string | null;\n /** Public pseudonym of the wallet owner at the time returned by the API. */\n pseudonym: string | null;\n /** Profile biography of the wallet owner at the time returned by the API. */\n bio: string | null;\n /** Source profile image URL for the wallet owner. */\n profileImage: string | null;\n /** Optimized profile image URL for the wallet owner. */\n profileImageOptimized: string | null;\n};\n\nexport type TradeActivity = ActivityBase & {\n /** A directional outcome-token trade. */\n type: 'TRADE';\n /** Condition id of the market traded by the wallet. */\n conditionId: ConditionId;\n /** Outcome token id bought or sold by the wallet. */\n tokenId: TokenId;\n /** Direction of the wallet's trade in the outcome token. */\n side: Side;\n /** Number of outcome-token shares traded by the wallet. */\n shares: DecimalString;\n /** The notional value of the traded shares in USD. */\n amount: DecimalString;\n /** The execution price per outcome-token share in USD. */\n price: DecimalString;\n /** Display label of the outcome token traded by the wallet. */\n outcome: string;\n /** Zero-based index of the outcome token in the market's outcome list. */\n outcomeIndex: number;\n /** Human-readable title of the market traded by the wallet. */\n title: string;\n /** URL slug of the market traded by the wallet. */\n slug: string;\n /** Icon URL for the market traded by the wallet, when available. */\n icon: string | null;\n /** URL slug of the event containing the traded market. */\n eventSlug: string;\n};\n\nexport type SplitActivity = ActivityBase & {\n /** Splitting collateral into a complete market set. */\n type: 'SPLIT';\n /** Condition id of the market whose complete set was created. */\n conditionId: ConditionId;\n /** The collateral amount split into the complete set in USD. */\n amount: DecimalString;\n /** Human-readable title of the market whose complete set was created. */\n title: string;\n /** URL slug of the market whose complete set was created. */\n slug: string;\n /** Icon URL for the market whose complete set was created, when available. */\n icon: string | null;\n /** URL slug of the event containing the split market. */\n eventSlug: string;\n};\n\nexport type MergeActivity = ActivityBase & {\n /** Merging a complete market set into collateral. */\n type: 'MERGE';\n /** Condition id of the market whose complete set was merged. */\n conditionId: ConditionId;\n /** The collateral amount received from merging the complete set in USD. */\n amount: DecimalString;\n /** Human-readable title of the market whose complete set was merged. */\n title: string;\n /** URL slug of the market whose complete set was merged. */\n slug: string;\n /** Icon URL for the market whose complete set was merged, when available. */\n icon: string | null;\n /** URL slug of the event containing the merged market. */\n eventSlug: string;\n};\n\nexport type RedeemActivity = ActivityBase & {\n /** Redeeming resolved market proceeds. */\n type: 'REDEEM';\n /** Condition id of the market redeemed by the wallet. */\n conditionId: ConditionId;\n /** The proceeds redeemed from the resolved market in USD. */\n amount: DecimalString;\n /** Human-readable title of the market redeemed by the wallet. */\n title: string;\n /** URL slug of the market redeemed by the wallet. */\n slug: string;\n /** Icon URL for the market redeemed by the wallet, when available. */\n icon: string | null;\n /** URL slug of the event containing the redeemed market. */\n eventSlug: string;\n};\n\nexport type ConversionActivity = ActivityBase & {\n /** A market conversion or migration activity. */\n type: 'CONVERSION';\n /** Condition id of the market involved in the conversion. */\n conditionId: ConditionId;\n /** The amount converted or migrated for the market in USD. */\n amount: DecimalString;\n /** Human-readable title of the market involved in the conversion. */\n title: string;\n /** URL slug of the market involved in the conversion. */\n slug: string;\n /** Icon URL for the market involved in the conversion, when available. */\n icon: string | null;\n /** URL slug of the event containing the converted market. */\n eventSlug: string;\n};\n\nexport type RewardActivity = ActivityBase & {\n /** An account-level reward credit. */\n type: 'REWARD';\n /** The reward amount credited to the wallet in USD. */\n amount: DecimalString;\n};\n\nexport type MakerRebateActivity = ActivityBase & {\n /** An account-level maker rebate credit. */\n type: 'MAKER_REBATE';\n /** The maker rebate amount credited to the wallet in USD. */\n amount: DecimalString;\n};\n\nexport type ReferralRewardActivity = ActivityBase & {\n /** An account-level referral reward credit. */\n type: 'REFERRAL_REWARD';\n /** The referral reward amount credited to the wallet in USD. */\n amount: DecimalString;\n};\n\nexport type YieldActivity = ActivityBase & {\n /** An account-level yield credit. */\n type: 'YIELD';\n /** The yield amount credited to the wallet in USD. */\n amount: DecimalString;\n};\n\nexport type Activity =\n | TradeActivity\n | SplitActivity\n | MergeActivity\n | RedeemActivity\n | ConversionActivity\n | RewardActivity\n | MakerRebateActivity\n | ReferralRewardActivity\n | YieldActivity;\n\nconst OptionalTextSchema = z.preprocess(\n (value) => (value === '' ? undefined : value),\n z.string().optional(),\n);\n\nexport const TradeSchema = z\n .object({\n proxyWallet: AddressSchema.nullish(),\n side: SideSchema.nullish(),\n asset: TokenIdSchema.nullish(),\n conditionId: ConditionIdSchema.nullish(),\n size: DecimalishSchema.nullish(),\n price: DecimalishSchema.nullish(),\n timestamp: EpochSecondsToMillisecondsSchema.nullish(),\n title: z.string().nullish(),\n slug: z.string().nullish(),\n icon: z.string().nullish(),\n eventSlug: z.string().nullish(),\n outcome: z.string().nullish(),\n outcomeIndex: z.number().int().nullish(),\n name: z.string().nullish(),\n pseudonym: z.string().nullish(),\n bio: z.string().nullish(),\n profileImage: z.string().nullish(),\n profileImageOptimized: z.string().nullish(),\n transactionHash: z.string().nullish(),\n })\n .transform(({ asset, proxyWallet, ...rest }) => ({\n ...rest,\n wallet: proxyWallet,\n tokenId: asset,\n }));\n\nconst RawActivitySchema = z.object({\n proxyWallet: AddressSchema.nullish(),\n timestamp: EpochSecondsToMillisecondsSchema.nullish(),\n conditionId: z.preprocess(\n (value) => (value === '' ? undefined : value),\n ConditionIdSchema.optional(),\n ),\n type: ActivityTypeSchema,\n size: DecimalishSchema.nullish(),\n usdcSize: DecimalishSchema.nullish(),\n transactionHash: TxHashSchema.nullish(),\n price: DecimalishSchema.nullish(),\n asset: z.preprocess(\n (value) => (value === '' ? undefined : value),\n TokenIdSchema.optional(),\n ),\n side: z.preprocess(\n (value) => (value === '' ? undefined : value),\n SideSchema.nullish(),\n ),\n outcomeIndex: z.preprocess(\n (value) => (value === 999 ? undefined : value),\n z.number().int().optional(),\n ),\n title: OptionalTextSchema,\n slug: OptionalTextSchema,\n icon: OptionalTextSchema,\n eventSlug: OptionalTextSchema,\n outcome: OptionalTextSchema,\n name: OptionalTextSchema,\n pseudonym: OptionalTextSchema,\n bio: OptionalTextSchema,\n profileImage: OptionalTextSchema,\n profileImageOptimized: OptionalTextSchema,\n});\n\nexport const ActivitySchema: z.ZodType<Activity> =\n RawActivitySchema.transform(normalizeActivity);\n\nexport const TradedSchema = z.object({\n user: AddressSchema.nullish(),\n traded: z.number().int().nullish(),\n});\n\nexport const ListTradesResponseSchema = z.array(TradeSchema);\nexport const ListActivityResponseSchema = z.array(ActivitySchema);\n\nexport type Trade = z.infer<typeof TradeSchema>;\nexport type Traded = z.infer<typeof TradedSchema>;\nexport type ListTradesResponse = z.infer<typeof ListTradesResponseSchema>;\nexport type ListActivityResponse = z.infer<typeof ListActivityResponseSchema>;\n\ntype RawActivity = z.infer<typeof RawActivitySchema>;\n\nfunction normalizeActivity(activity: RawActivity): Activity {\n const base = normalizeActivityBase(activity);\n\n switch (activity.type) {\n case ActivityType.TRADE:\n return {\n ...base,\n type: activity.type,\n conditionId: expectPresent(activity.conditionId, 'conditionId'),\n tokenId: expectPresent(activity.asset, 'asset'),\n side: expectPresent(activity.side, 'side'),\n shares: expectPresent(activity.size, 'size'),\n amount: inferAmount(activity),\n price: expectPresent(activity.price, 'price'),\n outcome: expectPresent(activity.outcome, 'outcome'),\n outcomeIndex: expectPresent(activity.outcomeIndex, 'outcomeIndex'),\n title: expectPresent(activity.title, 'title'),\n slug: expectPresent(activity.slug, 'slug'),\n icon: activity.icon ?? null,\n eventSlug: expectPresent(activity.eventSlug, 'eventSlug'),\n };\n case ActivityType.SPLIT:\n case ActivityType.MERGE:\n case ActivityType.REDEEM:\n case ActivityType.CONVERSION:\n return {\n ...base,\n type: activity.type,\n conditionId: expectPresent(activity.conditionId, 'conditionId'),\n amount: inferAmount(activity),\n title: expectPresent(activity.title, 'title'),\n slug: expectPresent(activity.slug, 'slug'),\n icon: activity.icon ?? null,\n eventSlug: expectPresent(activity.eventSlug, 'eventSlug'),\n };\n case ActivityType.REWARD:\n case ActivityType.MAKER_REBATE:\n case ActivityType.REFERRAL_REWARD:\n case ActivityType.YIELD:\n return {\n ...base,\n type: activity.type,\n amount: inferAmount(activity),\n };\n }\n}\n\nfunction normalizeActivityBase(activity: RawActivity): ActivityBase {\n return {\n wallet: expectPresent(activity.proxyWallet, 'proxyWallet'),\n timestamp: expectPresent(activity.timestamp, 'timestamp'),\n transactionHash: expectPresent(activity.transactionHash, 'transactionHash'),\n name: activity.name ?? null,\n pseudonym: activity.pseudonym ?? null,\n bio: activity.bio ?? null,\n profileImage: activity.profileImage ?? null,\n profileImageOptimized: activity.profileImageOptimized ?? null,\n };\n}\n\nfunction inferAmount(activity: RawActivity): DecimalString {\n return expectPresent(activity.usdcSize ?? activity.size, 'usdcSize');\n}\n\nfunction expectPresent<T>(value: T | null | undefined, field: string): T {\n if (value === null || value === undefined) {\n throw new TypeError(`Expected activity.${field} to be present`);\n }\n\n return value;\n}\n","import { z } from 'zod';\nimport { DecimalishSchema, TokenIdSchema } from '../shared';\nimport { AddressSchema, Hash64Schema } from './common';\n\nexport const HolderSchema = z\n .object({\n proxyWallet: AddressSchema.nullish(),\n bio: z.string().nullish(),\n asset: TokenIdSchema.nullish(),\n pseudonym: z.string().nullish(),\n amount: DecimalishSchema.nullish(),\n displayUsernamePublic: z.boolean().nullish(),\n outcomeIndex: z.number().int().nullish(),\n name: z.string().nullish(),\n profileImage: z.string().nullish(),\n profileImageOptimized: z.string().nullish(),\n })\n .transform(({ asset, proxyWallet, ...rest }) => ({\n ...rest,\n wallet: proxyWallet,\n tokenId: asset,\n }));\n\nexport const MetaHolderSchema = z.object({\n token: z.string().nullish(),\n holders: z.array(HolderSchema).nullish(),\n});\n\nexport const OpenInterestSchema = z.object({\n market: Hash64Schema.nullish(),\n value: DecimalishSchema.nullish(),\n});\n\nexport const MarketVolumeSchema = z.object({\n market: Hash64Schema.nullish(),\n value: DecimalishSchema.nullish(),\n});\n\nexport const LiveVolumeSchema = z.object({\n total: DecimalishSchema.nullish(),\n markets: z.array(MarketVolumeSchema).nullish(),\n});\n\nexport const ListMarketHoldersResponseSchema = z.array(MetaHolderSchema);\nexport const ListOpenInterestResponseSchema = z.array(OpenInterestSchema);\nexport const FetchEventLiveVolumeResponseSchema = z.array(LiveVolumeSchema);\n\nexport type Holder = z.infer<typeof HolderSchema>;\nexport type MetaHolder = z.infer<typeof MetaHolderSchema>;\nexport type OpenInterest = z.infer<typeof OpenInterestSchema>;\nexport type MarketVolume = z.infer<typeof MarketVolumeSchema>;\nexport type LiveVolume = z.infer<typeof LiveVolumeSchema>;\nexport type ListMarketHoldersResponse = z.infer<\n typeof ListMarketHoldersResponseSchema\n>;\nexport type ListOpenInterestResponse = z.infer<\n typeof ListOpenInterestResponseSchema\n>;\nexport type FetchEventLiveVolumeResponse = z.infer<\n typeof FetchEventLiveVolumeResponseSchema\n>;\n","import { z } from 'zod';\nimport { DecimalishSchema, IsoDateTimeStringSchema } from '../shared';\nimport { AddressSchema } from './common';\n\nexport const LeaderboardEntrySchema = z.object({\n rank: z.string().nullish(),\n builder: z.string().nullish(),\n volume: DecimalishSchema.nullish(),\n activeUsers: z.number().int().nullish(),\n verified: z.boolean().nullish(),\n builderLogo: z.string().nullish(),\n});\n\nexport const BuilderVolumeEntrySchema = z\n .object({\n dt: IsoDateTimeStringSchema.nullish(),\n builder: z.string().nullish(),\n builderLogo: z.string().nullish(),\n verified: z.boolean().nullish(),\n volume: DecimalishSchema.nullish(),\n activeUsers: z.number().int().nullish(),\n rank: z.string().nullish(),\n })\n .transform(({ dt, ...rest }) => ({\n ...rest,\n bucketAt: dt,\n }));\n\nexport const TraderLeaderboardEntrySchema = z\n .object({\n rank: z.string().nullish(),\n proxyWallet: AddressSchema.nullish(),\n userName: z.string().nullish(),\n vol: DecimalishSchema.nullish(),\n pnl: DecimalishSchema.nullish(),\n profileImage: z.string().nullish(),\n xUsername: z.string().nullish(),\n verifiedBadge: z.boolean().nullish(),\n })\n .transform(({ proxyWallet, ...rest }) => ({\n ...rest,\n wallet: proxyWallet,\n }));\n\nexport const ListBuilderLeaderboardResponseSchema = z.array(\n LeaderboardEntrySchema,\n);\nexport const ListBuilderVolumeResponseSchema = z.array(\n BuilderVolumeEntrySchema,\n);\nexport const ListTraderLeaderboardResponseSchema = z.array(\n TraderLeaderboardEntrySchema,\n);\n\nexport type LeaderboardEntry = z.infer<typeof LeaderboardEntrySchema>;\nexport type BuilderVolumeEntry = z.infer<typeof BuilderVolumeEntrySchema>;\nexport type TraderLeaderboardEntry = z.infer<\n typeof TraderLeaderboardEntrySchema\n>;\nexport type ListBuilderLeaderboardResponse = z.infer<\n typeof ListBuilderLeaderboardResponseSchema\n>;\nexport type ListBuilderVolumeResponse = z.infer<\n typeof ListBuilderVolumeResponseSchema\n>;\nexport type ListTraderLeaderboardResponse = z.infer<\n typeof ListTraderLeaderboardResponseSchema\n>;\n","import { z } from 'zod';\nimport {\n ConditionIdSchema,\n DecimalishSchema,\n EpochSecondsToMillisecondsSchema,\n IsoCalendarDateStringSchema,\n IsoDateTimeStringSchema,\n MixedDateTimeStringSchema,\n PaginationCursorSchema,\n PositionIdSchema,\n TokenIdSchema,\n} from '../shared';\nimport { AddressSchema } from './common';\n\nexport enum ComboPositionStatus {\n Open = 'OPEN',\n Partial = 'PARTIAL',\n ResolvedWin = 'RESOLVED_WIN',\n ResolvedLoss = 'RESOLVED_LOSS',\n}\n\nexport const ComboPositionStatusSchema = z.enum(ComboPositionStatus);\n\nexport const PositionSchema = z\n .object({\n proxyWallet: AddressSchema.nullish(),\n asset: TokenIdSchema.nullish(),\n conditionId: ConditionIdSchema,\n size: DecimalishSchema.nullish(),\n avgPrice: DecimalishSchema.nullish(),\n initialValue: DecimalishSchema.nullish(),\n currentValue: DecimalishSchema.nullish(),\n cashPnl: DecimalishSchema.nullish(),\n percentPnl: z.number().nullish(),\n totalBought: DecimalishSchema.nullish(),\n realizedPnl: DecimalishSchema.nullish(),\n percentRealizedPnl: z.number().nullish(),\n curPrice: DecimalishSchema.nullish(),\n redeemable: z.boolean().nullish(),\n mergeable: z.boolean().nullish(),\n title: z.string().nullish(),\n slug: z.string().nullish(),\n icon: z.string().nullish(),\n eventId: z.string().nullish(),\n eventSlug: z.string().nullish(),\n outcome: z.string().nullish(),\n outcomeIndex: z.number().int().nullish(),\n oppositeOutcome: z.string().nullish(),\n oppositeAsset: TokenIdSchema.nullish(),\n endDate: IsoCalendarDateStringSchema.nullish(),\n negativeRisk: z.boolean().nullish(),\n })\n .transform(({ asset, oppositeAsset, proxyWallet, ...rest }) => ({\n ...rest,\n wallet: proxyWallet,\n tokenId: asset,\n oppositeTokenId: oppositeAsset,\n }));\n\nexport const ClosedPositionSchema = z\n .object({\n proxyWallet: AddressSchema.nullish(),\n asset: TokenIdSchema.nullish(),\n conditionId: ConditionIdSchema.nullish(),\n avgPrice: DecimalishSchema.nullish(),\n totalBought: DecimalishSchema.nullish(),\n realizedPnl: DecimalishSchema.nullish(),\n curPrice: DecimalishSchema.nullish(),\n timestamp: EpochSecondsToMillisecondsSchema.nullish(),\n title: z.string().nullish(),\n slug: z.string().nullish(),\n icon: z.string().nullish(),\n eventSlug: z.string().nullish(),\n outcome: z.string().nullish(),\n outcomeIndex: z.number().int().nullish(),\n oppositeOutcome: z.string().nullish(),\n oppositeAsset: TokenIdSchema.nullish(),\n endDate: MixedDateTimeStringSchema.nullish(),\n })\n .transform(({ asset, oppositeAsset, proxyWallet, ...rest }) => ({\n ...rest,\n wallet: proxyWallet,\n tokenId: asset,\n oppositeTokenId: oppositeAsset,\n }));\n\nexport const ValueSchema = z.object({\n user: AddressSchema.nullish(),\n value: DecimalishSchema.nullish(),\n});\n\nexport const MarketPositionSchema = z\n .object({\n proxyWallet: AddressSchema.nullish(),\n name: z.string().nullish(),\n profileImage: z.string().nullish(),\n verified: z.boolean().nullish(),\n asset: TokenIdSchema.nullish(),\n conditionId: ConditionIdSchema.nullish(),\n avgPrice: DecimalishSchema.nullish(),\n size: DecimalishSchema.nullish(),\n currPrice: DecimalishSchema.nullish(),\n currentValue: DecimalishSchema.nullish(),\n cashPnl: DecimalishSchema.nullish(),\n totalBought: DecimalishSchema.nullish(),\n realizedPnl: DecimalishSchema.nullish(),\n totalPnl: DecimalishSchema.nullish(),\n outcome: z.string().nullish(),\n outcomeIndex: z.number().int().nullish(),\n })\n .transform(({ asset, proxyWallet, ...rest }) => ({\n ...rest,\n wallet: proxyWallet,\n tokenId: asset,\n }));\n\nexport const MetaMarketPositionSchema = z.object({\n token: z.string().nullish(),\n positions: z.array(MarketPositionSchema).nullish(),\n});\n\nexport const ComboPositionMarketEventSchema = z\n .object({\n event_id: z.string().nullish(),\n event_slug: z.string().nullish(),\n event_title: z.string().nullish(),\n event_image: z.string().nullish(),\n })\n .transform(({ event_id, event_slug, event_title, event_image }) => ({\n eventId: event_id,\n eventSlug: event_slug,\n eventTitle: event_title,\n eventImage: event_image,\n }));\n\nexport const ComboPositionMarketSchema = z\n .object({\n market_id: z.string().nullish(),\n slug: z.string().nullish(),\n title: z.string().nullish(),\n outcome: z.string().nullish(),\n image_url: z.string().nullish(),\n icon_url: z.string().nullish(),\n category: z.string().nullish(),\n subcategory: z.string().nullish(),\n tags: z.array(z.string()).nullish(),\n end_date: IsoDateTimeStringSchema.nullish(),\n event: ComboPositionMarketEventSchema.nullish(),\n })\n .transform(({ market_id, image_url, icon_url, end_date, ...rest }) => ({\n ...rest,\n marketId: market_id,\n imageUrl: image_url,\n iconUrl: icon_url,\n endDate: end_date,\n }));\n\nexport const ComboPositionLegSchema = z\n .object({\n leg_index: z.number().int(),\n leg_position_id: PositionIdSchema,\n leg_condition_id: ConditionIdSchema,\n leg_outcome_index: z.number().int(),\n leg_outcome_label: z.string().nullish(),\n leg_status: ComboPositionStatusSchema,\n leg_resolved_at: IsoDateTimeStringSchema.nullish(),\n leg_current_price: DecimalishSchema.nullish(),\n market: ComboPositionMarketSchema.nullish(),\n })\n .transform(\n ({\n leg_index,\n leg_position_id,\n leg_condition_id,\n leg_outcome_index,\n leg_outcome_label,\n leg_status,\n leg_resolved_at,\n leg_current_price,\n ...rest\n }) => ({\n ...rest,\n legIndex: leg_index,\n legPositionId: leg_position_id,\n legConditionId: leg_condition_id,\n legOutcomeIndex: leg_outcome_index,\n legOutcomeLabel: leg_outcome_label,\n legStatus: leg_status,\n legResolvedAt: leg_resolved_at,\n legCurrentPrice: leg_current_price,\n }),\n );\n\nexport const ComboPositionSchema = z\n .object({\n combo_condition_id: ConditionIdSchema,\n combo_position_id: PositionIdSchema,\n module_id: z.number().int(),\n user_address: AddressSchema,\n shares_balance: DecimalishSchema,\n entry_avg_price_usdc: DecimalishSchema.nullish(),\n entry_cost_usdc: DecimalishSchema.nullish(),\n status: ComboPositionStatusSchema,\n first_entry_at: IsoDateTimeStringSchema,\n resolved_at: IsoDateTimeStringSchema.nullish(),\n legs_total: z.number().int(),\n legs_resolved: z.number().int(),\n legs_pending: z.number().int(),\n legs: z.array(ComboPositionLegSchema),\n })\n .transform(\n ({\n combo_condition_id,\n combo_position_id,\n module_id,\n user_address,\n shares_balance,\n entry_avg_price_usdc,\n entry_cost_usdc,\n first_entry_at,\n resolved_at,\n legs_total,\n legs_resolved,\n legs_pending,\n ...rest\n }) => ({\n ...rest,\n conditionId: combo_condition_id,\n positionId: combo_position_id,\n moduleId: module_id,\n userAddress: user_address,\n shares: shares_balance,\n entryAvgPriceUsdc: entry_avg_price_usdc,\n entryCostUsdc: entry_cost_usdc,\n firstEntryAt: first_entry_at,\n resolvedAt: resolved_at,\n legsTotal: legs_total,\n legsResolved: legs_resolved,\n legsPending: legs_pending,\n }),\n );\n\nexport const ListComboPositionsResponseSchema = z\n .object({\n combos: z.array(ComboPositionSchema),\n pagination: z.object({\n limit: z.number().int(),\n offset: z.number().int(),\n has_more: z.boolean(),\n next_cursor: PaginationCursorSchema.nullish(),\n }),\n })\n .transform(({ pagination, ...rest }) => ({\n ...rest,\n pagination: {\n limit: pagination.limit,\n offset: pagination.offset,\n hasMore: pagination.has_more,\n nextCursor: pagination.next_cursor,\n },\n }));\n\nexport const ListPositionsResponseSchema = z.array(PositionSchema);\nexport const ListClosedPositionsResponseSchema = z.array(ClosedPositionSchema);\nexport const FetchPortfolioValueResponseSchema = z.array(ValueSchema);\nexport const ListMarketPositionsResponseSchema = z.array(\n MetaMarketPositionSchema,\n);\n\nexport type Position = z.infer<typeof PositionSchema>;\nexport type ClosedPosition = z.infer<typeof ClosedPositionSchema>;\nexport type Value = z.infer<typeof ValueSchema>;\nexport type MarketPosition = z.infer<typeof MarketPositionSchema>;\nexport type MetaMarketPosition = z.infer<typeof MetaMarketPositionSchema>;\nexport type ComboPositionMarketEvent = z.infer<\n typeof ComboPositionMarketEventSchema\n>;\nexport type ComboPositionMarket = z.infer<typeof ComboPositionMarketSchema>;\nexport type ComboPositionLeg = z.infer<typeof ComboPositionLegSchema>;\nexport type ComboPosition = z.infer<typeof ComboPositionSchema>;\nexport type ListPositionsResponse = z.infer<typeof ListPositionsResponseSchema>;\nexport type ListClosedPositionsResponse = z.infer<\n typeof ListClosedPositionsResponseSchema\n>;\nexport type FetchPortfolioValueResponse = z.infer<\n typeof FetchPortfolioValueResponseSchema\n>;\nexport type ListMarketPositionsResponse = z.infer<\n typeof ListMarketPositionsResponseSchema\n>;\nexport type ListComboPositionsResponse = z.infer<\n typeof ListComboPositionsResponseSchema\n>;\n"]}
@@ -1,5 +1,5 @@
1
1
  export { C as Comment, a as CommentMedia, b as CommentMediaSchema, c as CommentPosition, d as CommentPositionSchema, e as CommentProfile, f as CommentProfileSchema, g as CommentSchema, L as ListCommentsResponse, h as ListCommentsResponseSchema, i as Reaction, j as ReactionSchema, R as ReactionType, k as ReactionTypeSchema } from '../comment-C-jBbhp7.js';
2
- import { CategoryId, IsoDateTimeString, ClobRewardId, ConditionId, DecimalString, IsoCalendarDateString, ImageOptimizationId, EventId, InternalUserId, MarketId, TagId, TokenId, TickSizeValue, QuestionId, ResolutionRequestId, MixedDateTimeString, PaginationCursor, BestLineId, ChatId, CollectionId, TeamId, SportId, EventExternalPartnerMappingId, PartnerId, SeriesId, EventCreatorId, TemplateId } from '../index.js';
2
+ import { CategoryId, IsoDateTimeString, ClobRewardId, ConditionId, DecimalString, IsoCalendarDateString, ImageOptimizationId, EventId, InternalUserId, MarketId, TagId, TokenId, TickSizeValue, QuestionId, ResolutionRequestId, PositionId, MixedDateTimeString, PaginationCursor, BestLineId, ChatId, CollectionId, TeamId, SportId, EventExternalPartnerMappingId, PartnerId, SeriesId, EventCreatorId, TemplateId } from '../index.js';
3
3
  export { TagIdSchema } from '../index.js';
4
4
  import { z } from 'zod';
5
5
  import * as _polymarket_types from '@polymarket/types';
@@ -193,6 +193,7 @@ type Market = {
193
193
  sports: MarketSportsMetadata;
194
194
  events: MarketEvent[];
195
195
  tags: MarketTag[];
196
+ positionIds: PositionId[];
196
197
  };
197
198
  declare const GammaMarketSchema: z.ZodObject<{
198
199
  id: z.ZodPipe<z.ZodString, z.ZodTransform<MarketId, string>>;
@@ -271,6 +272,7 @@ declare const GammaMarketSchema: z.ZodObject<{
271
272
  gameStartTime: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodPipe<z.ZodString, z.ZodTransform<IsoDateTimeString, string>>, z.ZodPipe<z.ZodDate, z.ZodTransform<IsoDateTimeString, Date>>]>>>;
272
273
  secondsDelay: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
273
274
  clobTokenIds: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<TokenId, string>>>>>>, z.ZodTransform<TokenId[], TokenId[] | null | undefined>>;
275
+ positionIds: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<PositionId, string>>>>>>, z.ZodTransform<PositionId[], PositionId[] | null | undefined>>;
274
276
  disqusThread: z.ZodOptional<z.ZodNullable<z.ZodString>>;
275
277
  shortOutcomes: z.ZodOptional<z.ZodNullable<z.ZodString>>;
276
278
  teamAID: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -500,6 +502,7 @@ declare const MarketSchema: z.ZodPipe<z.ZodObject<{
500
502
  gameStartTime: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodPipe<z.ZodString, z.ZodTransform<IsoDateTimeString, string>>, z.ZodPipe<z.ZodDate, z.ZodTransform<IsoDateTimeString, Date>>]>>>;
501
503
  secondsDelay: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
502
504
  clobTokenIds: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<TokenId, string>>>>>>, z.ZodTransform<TokenId[], TokenId[] | null | undefined>>;
505
+ positionIds: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<PositionId, string>>>>>>, z.ZodTransform<PositionId[], PositionId[] | null | undefined>>;
503
506
  disqusThread: z.ZodOptional<z.ZodNullable<z.ZodString>>;
504
507
  shortOutcomes: z.ZodOptional<z.ZodNullable<z.ZodString>>;
505
508
  teamAID: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -661,6 +664,7 @@ declare const MarketSchema: z.ZodPipe<z.ZodObject<{
661
664
  questionID: QuestionId | null;
662
665
  umaResolutionStatus: UmaResolutionStatus | null;
663
666
  clobTokenIds: TokenId[];
667
+ positionIds: PositionId[];
664
668
  negRiskRequestID: ResolutionRequestId | null;
665
669
  question?: string | null | undefined;
666
670
  slug?: string | null | undefined;
@@ -957,6 +961,7 @@ declare const ListMarketsResponseSchema: z.ZodArray<z.ZodPipe<z.ZodObject<{
957
961
  gameStartTime: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodPipe<z.ZodString, z.ZodTransform<IsoDateTimeString, string>>, z.ZodPipe<z.ZodDate, z.ZodTransform<IsoDateTimeString, Date>>]>>>;
958
962
  secondsDelay: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
959
963
  clobTokenIds: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<TokenId, string>>>>>>, z.ZodTransform<TokenId[], TokenId[] | null | undefined>>;
964
+ positionIds: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<PositionId, string>>>>>>, z.ZodTransform<PositionId[], PositionId[] | null | undefined>>;
960
965
  disqusThread: z.ZodOptional<z.ZodNullable<z.ZodString>>;
961
966
  shortOutcomes: z.ZodOptional<z.ZodNullable<z.ZodString>>;
962
967
  teamAID: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -1118,6 +1123,7 @@ declare const ListMarketsResponseSchema: z.ZodArray<z.ZodPipe<z.ZodObject<{
1118
1123
  questionID: QuestionId | null;
1119
1124
  umaResolutionStatus: UmaResolutionStatus | null;
1120
1125
  clobTokenIds: TokenId[];
1126
+ positionIds: PositionId[];
1121
1127
  negRiskRequestID: ResolutionRequestId | null;
1122
1128
  question?: string | null | undefined;
1123
1129
  slug?: string | null | undefined;
@@ -1415,6 +1421,7 @@ declare const ListMarketsKeysetResponseSchema: z.ZodPipe<z.ZodObject<{
1415
1421
  gameStartTime: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodPipe<z.ZodString, z.ZodTransform<IsoDateTimeString, string>>, z.ZodPipe<z.ZodDate, z.ZodTransform<IsoDateTimeString, Date>>]>>>;
1416
1422
  secondsDelay: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1417
1423
  clobTokenIds: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<TokenId, string>>>>>>, z.ZodTransform<TokenId[], TokenId[] | null | undefined>>;
1424
+ positionIds: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<PositionId, string>>>>>>, z.ZodTransform<PositionId[], PositionId[] | null | undefined>>;
1418
1425
  disqusThread: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1419
1426
  shortOutcomes: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1420
1427
  teamAID: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -1576,6 +1583,7 @@ declare const ListMarketsKeysetResponseSchema: z.ZodPipe<z.ZodObject<{
1576
1583
  questionID: QuestionId | null;
1577
1584
  umaResolutionStatus: UmaResolutionStatus | null;
1578
1585
  clobTokenIds: TokenId[];
1586
+ positionIds: PositionId[];
1579
1587
  negRiskRequestID: ResolutionRequestId | null;
1580
1588
  question?: string | null | undefined;
1581
1589
  slug?: string | null | undefined;
@@ -2326,6 +2334,7 @@ declare const GammaEventSchema: z.ZodObject<{
2326
2334
  gameStartTime: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodPipe<z.ZodString, z.ZodTransform<IsoDateTimeString, string>>, z.ZodPipe<z.ZodDate, z.ZodTransform<IsoDateTimeString, Date>>]>>>;
2327
2335
  secondsDelay: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
2328
2336
  clobTokenIds: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<TokenId, string>>>>>>, z.ZodTransform<TokenId[], TokenId[] | null | undefined>>;
2337
+ positionIds: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<PositionId, string>>>>>>, z.ZodTransform<PositionId[], PositionId[] | null | undefined>>;
2329
2338
  disqusThread: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2330
2339
  shortOutcomes: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2331
2340
  teamAID: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -2487,6 +2496,7 @@ declare const GammaEventSchema: z.ZodObject<{
2487
2496
  questionID: QuestionId | null;
2488
2497
  umaResolutionStatus: UmaResolutionStatus | null;
2489
2498
  clobTokenIds: TokenId[];
2499
+ positionIds: PositionId[];
2490
2500
  negRiskRequestID: ResolutionRequestId | null;
2491
2501
  question?: string | null | undefined;
2492
2502
  slug?: string | null | undefined;
@@ -3094,6 +3104,7 @@ declare const EventSchema: z.ZodPipe<z.ZodObject<{
3094
3104
  gameStartTime: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodPipe<z.ZodString, z.ZodTransform<IsoDateTimeString, string>>, z.ZodPipe<z.ZodDate, z.ZodTransform<IsoDateTimeString, Date>>]>>>;
3095
3105
  secondsDelay: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
3096
3106
  clobTokenIds: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<TokenId, string>>>>>>, z.ZodTransform<TokenId[], TokenId[] | null | undefined>>;
3107
+ positionIds: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<PositionId, string>>>>>>, z.ZodTransform<PositionId[], PositionId[] | null | undefined>>;
3097
3108
  disqusThread: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3098
3109
  shortOutcomes: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3099
3110
  teamAID: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -3255,6 +3266,7 @@ declare const EventSchema: z.ZodPipe<z.ZodObject<{
3255
3266
  questionID: QuestionId | null;
3256
3267
  umaResolutionStatus: UmaResolutionStatus | null;
3257
3268
  clobTokenIds: TokenId[];
3269
+ positionIds: PositionId[];
3258
3270
  negRiskRequestID: ResolutionRequestId | null;
3259
3271
  question?: string | null | undefined;
3260
3272
  slug?: string | null | undefined;
@@ -4173,6 +4185,7 @@ declare const ListEventsResponseSchema: z.ZodArray<z.ZodPipe<z.ZodObject<{
4173
4185
  gameStartTime: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodPipe<z.ZodString, z.ZodTransform<IsoDateTimeString, string>>, z.ZodPipe<z.ZodDate, z.ZodTransform<IsoDateTimeString, Date>>]>>>;
4174
4186
  secondsDelay: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
4175
4187
  clobTokenIds: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<TokenId, string>>>>>>, z.ZodTransform<TokenId[], TokenId[] | null | undefined>>;
4188
+ positionIds: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<PositionId, string>>>>>>, z.ZodTransform<PositionId[], PositionId[] | null | undefined>>;
4176
4189
  disqusThread: z.ZodOptional<z.ZodNullable<z.ZodString>>;
4177
4190
  shortOutcomes: z.ZodOptional<z.ZodNullable<z.ZodString>>;
4178
4191
  teamAID: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -4334,6 +4347,7 @@ declare const ListEventsResponseSchema: z.ZodArray<z.ZodPipe<z.ZodObject<{
4334
4347
  questionID: QuestionId | null;
4335
4348
  umaResolutionStatus: UmaResolutionStatus | null;
4336
4349
  clobTokenIds: TokenId[];
4350
+ positionIds: PositionId[];
4337
4351
  negRiskRequestID: ResolutionRequestId | null;
4338
4352
  question?: string | null | undefined;
4339
4353
  slug?: string | null | undefined;
@@ -5253,6 +5267,7 @@ declare const ListEventsKeysetResponseSchema: z.ZodPipe<z.ZodObject<{
5253
5267
  gameStartTime: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodPipe<z.ZodString, z.ZodTransform<IsoDateTimeString, string>>, z.ZodPipe<z.ZodDate, z.ZodTransform<IsoDateTimeString, Date>>]>>>;
5254
5268
  secondsDelay: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
5255
5269
  clobTokenIds: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<TokenId, string>>>>>>, z.ZodTransform<TokenId[], TokenId[] | null | undefined>>;
5270
+ positionIds: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<PositionId, string>>>>>>, z.ZodTransform<PositionId[], PositionId[] | null | undefined>>;
5256
5271
  disqusThread: z.ZodOptional<z.ZodNullable<z.ZodString>>;
5257
5272
  shortOutcomes: z.ZodOptional<z.ZodNullable<z.ZodString>>;
5258
5273
  teamAID: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -5414,6 +5429,7 @@ declare const ListEventsKeysetResponseSchema: z.ZodPipe<z.ZodObject<{
5414
5429
  questionID: QuestionId | null;
5415
5430
  umaResolutionStatus: UmaResolutionStatus | null;
5416
5431
  clobTokenIds: TokenId[];
5432
+ positionIds: PositionId[];
5417
5433
  negRiskRequestID: ResolutionRequestId | null;
5418
5434
  question?: string | null | undefined;
5419
5435
  slug?: string | null | undefined;
@@ -6585,6 +6601,7 @@ declare const PublicSearchResponseSchema: z.ZodObject<{
6585
6601
  gameStartTime: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodPipe<z.ZodString, z.ZodTransform<IsoDateTimeString, string>>, z.ZodPipe<z.ZodDate, z.ZodTransform<IsoDateTimeString, Date>>]>>>;
6586
6602
  secondsDelay: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
6587
6603
  clobTokenIds: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<TokenId, string>>>>>>, z.ZodTransform<TokenId[], TokenId[] | null | undefined>>;
6604
+ positionIds: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<PositionId, string>>>>>>, z.ZodTransform<PositionId[], PositionId[] | null | undefined>>;
6588
6605
  disqusThread: z.ZodOptional<z.ZodNullable<z.ZodString>>;
6589
6606
  shortOutcomes: z.ZodOptional<z.ZodNullable<z.ZodString>>;
6590
6607
  teamAID: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -6746,6 +6763,7 @@ declare const PublicSearchResponseSchema: z.ZodObject<{
6746
6763
  questionID: QuestionId | null;
6747
6764
  umaResolutionStatus: UmaResolutionStatus | null;
6748
6765
  clobTokenIds: TokenId[];
6766
+ positionIds: PositionId[];
6749
6767
  negRiskRequestID: ResolutionRequestId | null;
6750
6768
  question?: string | null | undefined;
6751
6769
  slug?: string | null | undefined;
@@ -7852,6 +7870,7 @@ declare const SeriesSchema: z.ZodObject<{
7852
7870
  gameStartTime: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodPipe<z.ZodString, z.ZodTransform<IsoDateTimeString, string>>, z.ZodPipe<z.ZodDate, z.ZodTransform<IsoDateTimeString, Date>>]>>>;
7853
7871
  secondsDelay: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
7854
7872
  clobTokenIds: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<TokenId, string>>>>>>, z.ZodTransform<TokenId[], TokenId[] | null | undefined>>;
7873
+ positionIds: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<PositionId, string>>>>>>, z.ZodTransform<PositionId[], PositionId[] | null | undefined>>;
7855
7874
  disqusThread: z.ZodOptional<z.ZodNullable<z.ZodString>>;
7856
7875
  shortOutcomes: z.ZodOptional<z.ZodNullable<z.ZodString>>;
7857
7876
  teamAID: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -8013,6 +8032,7 @@ declare const SeriesSchema: z.ZodObject<{
8013
8032
  questionID: QuestionId | null;
8014
8033
  umaResolutionStatus: UmaResolutionStatus | null;
8015
8034
  clobTokenIds: TokenId[];
8035
+ positionIds: PositionId[];
8016
8036
  negRiskRequestID: ResolutionRequestId | null;
8017
8037
  question?: string | null | undefined;
8018
8038
  slug?: string | null | undefined;
@@ -8798,26 +8818,6 @@ declare const SeriesSchema: z.ZodObject<{
8798
8818
  disqusThread: z.ZodOptional<z.ZodNullable<z.ZodString>>;
8799
8819
  commentsEnabled: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
8800
8820
  }, z.core.$strip>>>>;
8801
- categories: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
8802
- id: z.ZodPipe<z.ZodString, z.ZodTransform<CategoryId, string>>;
8803
- label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
8804
- parentCategory: z.ZodOptional<z.ZodNullable<z.ZodString>>;
8805
- slug: z.ZodOptional<z.ZodNullable<z.ZodString>>;
8806
- publishedAt: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodPipe<z.ZodString, z.ZodTransform<IsoDateTimeString, string>>, z.ZodPipe<z.ZodDate, z.ZodTransform<IsoDateTimeString, Date>>]>>>;
8807
- createdBy: z.ZodOptional<z.ZodNullable<z.ZodString>>;
8808
- updatedBy: z.ZodOptional<z.ZodNullable<z.ZodString>>;
8809
- createdAt: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodPipe<z.ZodString, z.ZodTransform<IsoDateTimeString, string>>, z.ZodPipe<z.ZodDate, z.ZodTransform<IsoDateTimeString, Date>>]>>>;
8810
- updatedAt: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodPipe<z.ZodString, z.ZodTransform<IsoDateTimeString, string>>, z.ZodPipe<z.ZodDate, z.ZodTransform<IsoDateTimeString, Date>>]>>>;
8811
- }, z.core.$strip>>>>;
8812
- chats: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
8813
- id: z.ZodPipe<z.ZodString, z.ZodTransform<ChatId, string>>;
8814
- channelId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
8815
- channelName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
8816
- channelImage: z.ZodOptional<z.ZodNullable<z.ZodString>>;
8817
- live: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
8818
- startTime: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodPipe<z.ZodString, z.ZodTransform<IsoDateTimeString, string>>, z.ZodPipe<z.ZodDate, z.ZodTransform<IsoDateTimeString, Date>>]>>>;
8819
- endTime: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodPipe<z.ZodString, z.ZodTransform<IsoDateTimeString, string>>, z.ZodPipe<z.ZodDate, z.ZodTransform<IsoDateTimeString, Date>>]>>>;
8820
- }, z.core.$strip>>>>;
8821
8821
  tags: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
8822
8822
  id: z.ZodPipe<z.ZodString, z.ZodTransform<TagId, string>>;
8823
8823
  label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -8832,15 +8832,6 @@ declare const SeriesSchema: z.ZodObject<{
8832
8832
  isCarousel: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
8833
8833
  requiresTranslation: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
8834
8834
  activeEventsCount: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
8835
- chats: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
8836
- id: z.ZodPipe<z.ZodString, z.ZodTransform<ChatId, string>>;
8837
- channelId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
8838
- channelName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
8839
- channelImage: z.ZodOptional<z.ZodNullable<z.ZodString>>;
8840
- live: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
8841
- startTime: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodPipe<z.ZodString, z.ZodTransform<IsoDateTimeString, string>>, z.ZodPipe<z.ZodDate, z.ZodTransform<IsoDateTimeString, Date>>]>>>;
8842
- endTime: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodPipe<z.ZodString, z.ZodTransform<IsoDateTimeString, string>>, z.ZodPipe<z.ZodDate, z.ZodTransform<IsoDateTimeString, Date>>]>>>;
8843
- }, z.core.$strip>>>>;
8844
8835
  templates: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
8845
8836
  id: z.ZodPipe<z.ZodString, z.ZodTransform<TemplateId, string>>;
8846
8837
  displayName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -9058,6 +9049,7 @@ declare const ListSeriesResponseSchema: z.ZodArray<z.ZodObject<{
9058
9049
  gameStartTime: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodPipe<z.ZodString, z.ZodTransform<IsoDateTimeString, string>>, z.ZodPipe<z.ZodDate, z.ZodTransform<IsoDateTimeString, Date>>]>>>;
9059
9050
  secondsDelay: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
9060
9051
  clobTokenIds: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<TokenId, string>>>>>>, z.ZodTransform<TokenId[], TokenId[] | null | undefined>>;
9052
+ positionIds: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<PositionId, string>>>>>>, z.ZodTransform<PositionId[], PositionId[] | null | undefined>>;
9061
9053
  disqusThread: z.ZodOptional<z.ZodNullable<z.ZodString>>;
9062
9054
  shortOutcomes: z.ZodOptional<z.ZodNullable<z.ZodString>>;
9063
9055
  teamAID: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -9219,6 +9211,7 @@ declare const ListSeriesResponseSchema: z.ZodArray<z.ZodObject<{
9219
9211
  questionID: QuestionId | null;
9220
9212
  umaResolutionStatus: UmaResolutionStatus | null;
9221
9213
  clobTokenIds: TokenId[];
9214
+ positionIds: PositionId[];
9222
9215
  negRiskRequestID: ResolutionRequestId | null;
9223
9216
  question?: string | null | undefined;
9224
9217
  slug?: string | null | undefined;
@@ -10004,26 +9997,6 @@ declare const ListSeriesResponseSchema: z.ZodArray<z.ZodObject<{
10004
9997
  disqusThread: z.ZodOptional<z.ZodNullable<z.ZodString>>;
10005
9998
  commentsEnabled: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
10006
9999
  }, z.core.$strip>>>>;
10007
- categories: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
10008
- id: z.ZodPipe<z.ZodString, z.ZodTransform<CategoryId, string>>;
10009
- label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
10010
- parentCategory: z.ZodOptional<z.ZodNullable<z.ZodString>>;
10011
- slug: z.ZodOptional<z.ZodNullable<z.ZodString>>;
10012
- publishedAt: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodPipe<z.ZodString, z.ZodTransform<IsoDateTimeString, string>>, z.ZodPipe<z.ZodDate, z.ZodTransform<IsoDateTimeString, Date>>]>>>;
10013
- createdBy: z.ZodOptional<z.ZodNullable<z.ZodString>>;
10014
- updatedBy: z.ZodOptional<z.ZodNullable<z.ZodString>>;
10015
- createdAt: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodPipe<z.ZodString, z.ZodTransform<IsoDateTimeString, string>>, z.ZodPipe<z.ZodDate, z.ZodTransform<IsoDateTimeString, Date>>]>>>;
10016
- updatedAt: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodPipe<z.ZodString, z.ZodTransform<IsoDateTimeString, string>>, z.ZodPipe<z.ZodDate, z.ZodTransform<IsoDateTimeString, Date>>]>>>;
10017
- }, z.core.$strip>>>>;
10018
- chats: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
10019
- id: z.ZodPipe<z.ZodString, z.ZodTransform<ChatId, string>>;
10020
- channelId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
10021
- channelName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
10022
- channelImage: z.ZodOptional<z.ZodNullable<z.ZodString>>;
10023
- live: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
10024
- startTime: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodPipe<z.ZodString, z.ZodTransform<IsoDateTimeString, string>>, z.ZodPipe<z.ZodDate, z.ZodTransform<IsoDateTimeString, Date>>]>>>;
10025
- endTime: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodPipe<z.ZodString, z.ZodTransform<IsoDateTimeString, string>>, z.ZodPipe<z.ZodDate, z.ZodTransform<IsoDateTimeString, Date>>]>>>;
10026
- }, z.core.$strip>>>>;
10027
10000
  tags: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
10028
10001
  id: z.ZodPipe<z.ZodString, z.ZodTransform<TagId, string>>;
10029
10002
  label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -10038,15 +10011,6 @@ declare const ListSeriesResponseSchema: z.ZodArray<z.ZodObject<{
10038
10011
  isCarousel: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
10039
10012
  requiresTranslation: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
10040
10013
  activeEventsCount: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
10041
- chats: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
10042
- id: z.ZodPipe<z.ZodString, z.ZodTransform<ChatId, string>>;
10043
- channelId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
10044
- channelName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
10045
- channelImage: z.ZodOptional<z.ZodNullable<z.ZodString>>;
10046
- live: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
10047
- startTime: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodPipe<z.ZodString, z.ZodTransform<IsoDateTimeString, string>>, z.ZodPipe<z.ZodDate, z.ZodTransform<IsoDateTimeString, Date>>]>>>;
10048
- endTime: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodPipe<z.ZodString, z.ZodTransform<IsoDateTimeString, string>>, z.ZodPipe<z.ZodDate, z.ZodTransform<IsoDateTimeString, Date>>]>>>;
10049
- }, z.core.$strip>>>>;
10050
10014
  templates: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
10051
10015
  id: z.ZodPipe<z.ZodString, z.ZodTransform<TemplateId, string>>;
10052
10016
  displayName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -10083,15 +10047,6 @@ declare const TagSchema: z.ZodObject<{
10083
10047
  isCarousel: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
10084
10048
  requiresTranslation: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
10085
10049
  activeEventsCount: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
10086
- chats: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
10087
- id: z.ZodPipe<z.ZodString, z.ZodTransform<ChatId, string>>;
10088
- channelId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
10089
- channelName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
10090
- channelImage: z.ZodOptional<z.ZodNullable<z.ZodString>>;
10091
- live: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
10092
- startTime: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodPipe<z.ZodString, z.ZodTransform<IsoDateTimeString, string>>, z.ZodPipe<z.ZodDate, z.ZodTransform<IsoDateTimeString, Date>>]>>>;
10093
- endTime: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodPipe<z.ZodString, z.ZodTransform<IsoDateTimeString, string>>, z.ZodPipe<z.ZodDate, z.ZodTransform<IsoDateTimeString, Date>>]>>>;
10094
- }, z.core.$strip>>>>;
10095
10050
  templates: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
10096
10051
  id: z.ZodPipe<z.ZodString, z.ZodTransform<TemplateId, string>>;
10097
10052
  displayName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -10110,12 +10065,22 @@ declare const TagSchema: z.ZodObject<{
10110
10065
  updatedAt: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodPipe<z.ZodString, z.ZodTransform<IsoDateTimeString, string>>, z.ZodPipe<z.ZodDate, z.ZodTransform<IsoDateTimeString, Date>>]>>>;
10111
10066
  }, z.core.$strip>>>>;
10112
10067
  }, z.core.$strip>;
10113
- declare const RelatedTagSchema: z.ZodObject<{
10068
+ declare const RelatedTagSchema: z.ZodPipe<z.ZodObject<{
10114
10069
  id: z.ZodString;
10115
10070
  tagID: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
10116
10071
  relatedTagID: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
10117
10072
  rank: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
10118
- }, z.core.$strip>;
10073
+ }, z.core.$strip>, z.ZodTransform<{
10074
+ tagId: number | null | undefined;
10075
+ relatedTagId: number | null | undefined;
10076
+ id: string;
10077
+ rank?: number | null | undefined;
10078
+ }, {
10079
+ id: string;
10080
+ tagID?: number | null | undefined;
10081
+ relatedTagID?: number | null | undefined;
10082
+ rank?: number | null | undefined;
10083
+ }>>;
10119
10084
  declare const ListTagsResponseSchema: z.ZodArray<z.ZodObject<{
10120
10085
  id: z.ZodPipe<z.ZodString, z.ZodTransform<TagId, string>>;
10121
10086
  label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -10130,15 +10095,6 @@ declare const ListTagsResponseSchema: z.ZodArray<z.ZodObject<{
10130
10095
  isCarousel: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
10131
10096
  requiresTranslation: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
10132
10097
  activeEventsCount: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
10133
- chats: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
10134
- id: z.ZodPipe<z.ZodString, z.ZodTransform<ChatId, string>>;
10135
- channelId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
10136
- channelName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
10137
- channelImage: z.ZodOptional<z.ZodNullable<z.ZodString>>;
10138
- live: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
10139
- startTime: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodPipe<z.ZodString, z.ZodTransform<IsoDateTimeString, string>>, z.ZodPipe<z.ZodDate, z.ZodTransform<IsoDateTimeString, Date>>]>>>;
10140
- endTime: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodPipe<z.ZodString, z.ZodTransform<IsoDateTimeString, string>>, z.ZodPipe<z.ZodDate, z.ZodTransform<IsoDateTimeString, Date>>]>>>;
10141
- }, z.core.$strip>>>>;
10142
10098
  templates: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
10143
10099
  id: z.ZodPipe<z.ZodString, z.ZodTransform<TemplateId, string>>;
10144
10100
  displayName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -10157,12 +10113,22 @@ declare const ListTagsResponseSchema: z.ZodArray<z.ZodObject<{
10157
10113
  updatedAt: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodPipe<z.ZodString, z.ZodTransform<IsoDateTimeString, string>>, z.ZodPipe<z.ZodDate, z.ZodTransform<IsoDateTimeString, Date>>]>>>;
10158
10114
  }, z.core.$strip>>>>;
10159
10115
  }, z.core.$strip>>;
10160
- declare const ListRelatedTagsResponseSchema: z.ZodArray<z.ZodObject<{
10116
+ declare const ListRelatedTagsResponseSchema: z.ZodArray<z.ZodPipe<z.ZodObject<{
10161
10117
  id: z.ZodString;
10162
10118
  tagID: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
10163
10119
  relatedTagID: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
10164
10120
  rank: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
10165
- }, z.core.$strip>>;
10121
+ }, z.core.$strip>, z.ZodTransform<{
10122
+ tagId: number | null | undefined;
10123
+ relatedTagId: number | null | undefined;
10124
+ id: string;
10125
+ rank?: number | null | undefined;
10126
+ }, {
10127
+ id: string;
10128
+ tagID?: number | null | undefined;
10129
+ relatedTagID?: number | null | undefined;
10130
+ rank?: number | null | undefined;
10131
+ }>>>;
10166
10132
  declare const ListRelatedTagResourcesResponseSchema: z.ZodArray<z.ZodObject<{
10167
10133
  id: z.ZodPipe<z.ZodString, z.ZodTransform<TagId, string>>;
10168
10134
  label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -10177,15 +10143,6 @@ declare const ListRelatedTagResourcesResponseSchema: z.ZodArray<z.ZodObject<{
10177
10143
  isCarousel: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
10178
10144
  requiresTranslation: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
10179
10145
  activeEventsCount: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
10180
- chats: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
10181
- id: z.ZodPipe<z.ZodString, z.ZodTransform<ChatId, string>>;
10182
- channelId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
10183
- channelName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
10184
- channelImage: z.ZodOptional<z.ZodNullable<z.ZodString>>;
10185
- live: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
10186
- startTime: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodPipe<z.ZodString, z.ZodTransform<IsoDateTimeString, string>>, z.ZodPipe<z.ZodDate, z.ZodTransform<IsoDateTimeString, Date>>]>>>;
10187
- endTime: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodPipe<z.ZodString, z.ZodTransform<IsoDateTimeString, string>>, z.ZodPipe<z.ZodDate, z.ZodTransform<IsoDateTimeString, Date>>]>>>;
10188
- }, z.core.$strip>>>>;
10189
10146
  templates: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
10190
10147
  id: z.ZodPipe<z.ZodString, z.ZodTransform<TemplateId, string>>;
10191
10148
  displayName: z.ZodOptional<z.ZodNullable<z.ZodString>>;