@kuest/bindings 0.0.0-stage → 0.13.1

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.
@@ -0,0 +1,2 @@
1
+ import {a,J,e,w,v,u as u$1}from'../chunk-53SZ2ZWR.js';export{B as BestLineSchema,d as CategoryReferenceSchema,x as ChatSchema,g as ClobRewardsSchema,u as CollectionReferenceSchema,i as ComboKnownStatus,S as CommentMediaSchema,N as CommentPositionSchema,O as CommentProfileSchema,T as CommentSchema,y as EventCreatorSchema,A as EventExternalPartnerMappingSchema,c as EventReferenceSchema,J as EventSchema,b as FeeScheduleSchema,M as FetchEventTagsResponseSchema,q as FetchMarketTagsResponseSchema,I as GammaEventSchema,m as GammaMarketSchema,a as ImageOptimizationSchema,h as InternalUserSchema,V as ListCommentsKeysetResponseSchema,U as ListCommentsResponseSchema,L as ListEventsKeysetResponseSchema,K as ListEventsResponseSchema,p as ListMarketsKeysetResponseSchema,o as ListMarketsResponseSchema,G as ListSportsMetadataResponseSchema,F as ListTeamsResponseSchema,l as MarketResolutionStatus,n as MarketSchema,z as PartnerSchema,j as ProtocolVersion,R as ReactionSchema,P as ReactionType,Q as ReactionTypeSchema,f as RelatedMarketSchema,t as SeriesIdSchema,v as SeriesReferenceSchema,H as SportsMarketTypesResponseSchema,E as SportsMetadataSchema,e as TagReferenceSchema,C as TeamOrdering,D as TeamSchema,w as TemplateReferenceSchema,k as UmaResolutionStatus,s as hasBinaryOutcomes,r as normalizeMarket}from'../chunk-53SZ2ZWR.js';import {C as C$1,pa,Oa,da,Ga,na,La}from'../chunk-2KNK5TP7.js';export{La as TagIdSchema}from'../chunk-2KNK5TP7.js';import {z as z$1}from'zod';var z=(a=>(a.Pending="pending",a.Queued="queued",a.Success="success",a.Failed="failed",a.Cancelled="cancelled",a))(z||{}),E=z$1.union([z$1.string(),z$1.number().int().transform(String)]).transform(C$1),O=z$1.object({id:z$1.number().int(),marketId:E.nullish(),eventId:na.nullish(),questionId:Ga.nullish(),content:z$1.string().nullish(),state:z$1.enum(z).nullish(),clearBook:z$1.boolean().nullish(),notifyDiscord:z$1.boolean().nullish(),showInFrontend:z$1.boolean().nullish(),adapterAddress:da.nullish(),negRiskRequestId:z$1.string().nullish(),txHash:Oa.nullish(),createdAt:pa.nullish(),queuedAt:pa.nullish(),scheduledFor:pa.nullish(),txTimestamp:pa.nullish()}),Le=z$1.array(O);var Ee=z$1.object({hasMore:z$1.boolean().nullish(),totalResults:z$1.number().int().nullish()});var j=z$1.object({id:z$1.string(),communityMod:z$1.boolean().nullish(),creator:z$1.boolean().nullish(),mod:z$1.boolean().nullish()}),L=z$1.object({id:z$1.string().nullish(),name:z$1.string().nullish(),user:z$1.number().int().nullish(),referral:z$1.string().nullish(),createdBy:z$1.number().int().nullish(),updatedBy:z$1.number().int().nullish(),createdAt:pa.nullish(),updatedAt:pa.nullish(),utmSource:z$1.string().nullish(),utmMedium:z$1.string().nullish(),utmCampaign:z$1.string().nullish(),utmContent:z$1.string().nullish(),utmTerm:z$1.string().nullish(),walletActivated:z$1.boolean().nullish(),pseudonym:z$1.string().nullish(),displayUsernamePublic:z$1.boolean().nullish(),profileImage:z$1.string().nullish(),bio:z$1.string().nullish(),proxyWallet:z$1.string().nullish(),profileImageOptimized:a.nullish(),isCloseOnly:z$1.boolean().nullish(),isCertReq:z$1.boolean().nullish(),certReqDate:pa.nullish(),discordUsername:z$1.string().nullish(),xUsername:z$1.string().nullish(),verifiedBadge:z$1.boolean().nullish(),dubPartnerId:z$1.string().nullish(),termsAcceptedAt:pa.nullish(),viewOnlyAcknowledgedAt:pa.nullish(),isReferralRestricted:z$1.boolean().nullish()}).transform(({proxyWallet:i,...l})=>({...l,wallet:i})),De=z$1.object({createdAt:pa.nullish(),proxyWallet:da.nullish(),profileImage:z$1.string().nullish(),displayUsernamePublic:z$1.boolean().nullish(),bio:z$1.string().nullish(),pseudonym:z$1.string().nullish(),name:z$1.string().nullish(),users:z$1.array(j).nullish(),xUsername:z$1.string().nullish(),verifiedBadge:z$1.boolean().nullish()}).transform(({proxyWallet:i,...l})=>({...l,wallet:i}));var k=z$1.object({id:La,event_count:z$1.number().int().nullish(),label:z$1.string().nullish(),slug:z$1.string().nullish()}).transform(({event_count:i,...l})=>({...l,eventCount:i})),C=z$1.object({hasMore:z$1.boolean().nullish(),totalResults:z$1.number().int().nullish()}),Fe=z$1.object({events:z$1.array(J).nullish(),tags:z$1.array(k).nullish(),profiles:z$1.array(L).nullish(),pagination:C.nullish()});var u=e.extend({templates:z$1.array(w).nullish()}),D=z$1.object({id:z$1.string(),tagID:z$1.number().int().nullish(),relatedTagID:z$1.number().int().nullish(),rank:z$1.number().int().nullish()}).transform(({tagID:i,relatedTagID:l,...v})=>({...v,tagId:i,relatedTagId:l})),Qe=z$1.array(u),Xe=z$1.array(D),Je=z$1.array(u);var U=v.extend({events:z$1.array(J).nullish(),collections:z$1.array(u$1).nullish(),tags:z$1.array(u).nullish()}),We=z$1.array(U);var A=(s=>(s[s.EOA=0]="EOA",s[s.POLY_PROXY=1]="POLY_PROXY",s[s.GNOSIS_SAFE=2]="GNOSIS_SAFE",s[s.DEPOSIT_WALLET=3]="DEPOSIT_WALLET",s))(A||{}),nr=z$1.object({type:z$1.enum(A),typeName:z$1.enum(["EOA","POLY_PROXY","GNOSIS_SAFE","DEPOSIT_WALLET"])});export{Le as ListMarketClarificationsResponseSchema,Je as ListRelatedTagResourcesResponseSchema,Xe as ListRelatedTagsResponseSchema,We as ListSeriesResponseSchema,Qe as ListTagsResponseSchema,O as MarketClarificationSchema,z as MarketClarificationState,Ee as PaginationEnvelopeSchema,L as ProfileSchema,De as PublicProfileSchema,j as PublicProfileUserSchema,Fe as PublicSearchResponseSchema,D as RelatedTagSchema,C as SearchPaginationSchema,k as SearchTagSchema,U as SeriesSchema,u as TagSchema,A as WalletType,nr as WalletTypeSchema};//# sourceMappingURL=index.js.map
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/gamma/market-clarification.ts","../../src/gamma/pagination.ts","../../src/gamma/profile.ts","../../src/gamma/search.ts","../../src/gamma/tag.ts","../../src/gamma/series.ts","../../src/gamma/wallet.ts"],"names":["MarketClarificationState","MarketIdFromWireSchema","z","toMarketId","MarketClarificationSchema","EventIdSchema","QuestionIdSchema","EvmAddressSchema","TxHashSchema","IsoDateTimeStringSchema","ListMarketClarificationsResponseSchema","PaginationEnvelopeSchema","PublicProfileUserSchema","ProfileSchema","ImageOptimizationSchema","proxyWallet","rest","PublicProfileSchema","SearchTagSchema","TagIdSchema","event_count","SearchPaginationSchema","PublicSearchResponseSchema","EventSchema","TagSchema","TagReferenceSchema","TemplateReferenceSchema","RelatedTagSchema","tagID","relatedTagID","ListTagsResponseSchema","ListRelatedTagsResponseSchema","ListRelatedTagResourcesResponseSchema","SeriesSchema","SeriesReferenceSchema","CollectionReferenceSchema","ListSeriesResponseSchema","WalletType","WalletTypeSchema"],"mappings":"o8CAWYA,CAAAA,CAAAA,CAAAA,CAAAA,GACVA,CAAAA,CAAA,QAAU,SAAA,CACVA,CAAAA,CAAA,MAAA,CAAS,QAAA,CACTA,EAAA,OAAA,CAAU,SAAA,CACVA,EAAA,MAAA,CAAS,QAAA,CACTA,EAAA,SAAA,CAAY,WAAA,CALFA,CAAAA,CAAAA,EAAAA,CAAAA,EAAA,EAAA,CAAA,CAUNC,EAAyBC,GAAAA,CAC5B,KAAA,CAAM,CAACA,GAAAA,CAAE,MAAA,GAAUA,GAAAA,CAAE,MAAA,GAAS,GAAA,EAAI,CAAE,UAAU,MAAM,CAAC,CAAC,CAAA,CACtD,SAAA,CAAUC,GAAU,CAAA,CAEVC,CAAAA,CAA4BF,GAAAA,CAAE,MAAA,CAAO,CAChD,EAAA,CAAIA,GAAAA,CAAE,QAAO,CAAE,GAAA,GACf,QAAA,CAAUD,CAAAA,CAAuB,SAAQ,CACzC,OAAA,CAASI,GAAc,OAAA,EAAQ,CAC/B,WAAYC,EAAAA,CAAiB,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,CAESC,EAAAA,CAAyB5B,GAAAA,CAAE,KAAA,CAAMsB,CAAS,CAAA,CAC1CO,EAAAA,CAAgC7B,IAAE,KAAA,CAAMyB,CAAgB,EACxDK,EAAAA,CAAwC9B,GAAAA,CAAE,MAAMsB,CAAS,MChBzDS,CAAAA,CAAeC,CAAAA,CAAsB,OAAO,CACvD,MAAA,CAAQhC,IAAE,KAAA,CAAMqB,CAAW,CAAA,CAAE,OAAA,GAC7B,WAAA,CAAarB,GAAAA,CAAE,MAAMiC,GAAyB,CAAA,CAAE,SAAQ,CACxD,IAAA,CAAMjC,IAAE,KAAA,CAAMsB,CAAS,EAAE,OAAA,EAC3B,CAAC,CAAA,CAEYY,EAAAA,CAA2BlC,IAAE,KAAA,CAAM+B,CAAY,MCZhDI,CAAAA,CAAAA,CAAAA,CAAAA,GACVA,CAAAA,CAAAA,CAAAA,CAAA,IAAM,CAAA,CAAA,CAAN,KAAA,CACAA,IAAA,UAAA,CAAa,CAAA,CAAA,CAAb,aACAA,CAAAA,CAAAA,CAAAA,CAAA,WAAA,CAAc,GAAd,aAAA,CACAA,CAAAA,CAAAA,CAAAA,CAAA,eAAiB,CAAA,CAAA,CAAjB,gBAAA,CAJUA,CAAAA,CAAAA,EAAAA,CAAAA,EAAA,EAAA,CAAA,CAOCC,GAAmBpC,GAAAA,CAAE,MAAA,CAAO,CACvC,IAAA,CAAMA,GAAAA,CAAE,KAAKmC,CAAU,CAAA,CACvB,SAAUnC,GAAAA,CAAE,IAAA,CAAK,CAAC,KAAA,CAAO,YAAA,CAAc,cAAe,gBAAgB,CAAC,CACzE,CAAC","file":"index.js","sourcesContent":["import { z } from 'zod';\nimport {\n EventIdSchema,\n EvmAddressSchema,\n IsoDateTimeStringSchema,\n QuestionIdSchema,\n TxHashSchema,\n toMarketId,\n} from '../shared';\n\n/** Lifecycle state of a clarification as it is scheduled and posted on-chain. */\nexport enum MarketClarificationState {\n Pending = 'pending',\n Queued = 'queued',\n Success = 'success',\n Failed = 'failed',\n Cancelled = 'cancelled',\n}\n\n// The upstream payload returns `marketId` as a JSON number, but the `MarketId`\n// brand is string-valued, so accept number-or-string here (mirrors `EventIdSchema`).\nconst MarketIdFromWireSchema = z\n .union([z.string(), z.number().int().transform(String)])\n .transform(toMarketId);\n\nexport const MarketClarificationSchema = z.object({\n id: z.number().int(),\n marketId: MarketIdFromWireSchema.nullish(),\n eventId: EventIdSchema.nullish(),\n questionId: QuestionIdSchema.nullish(),\n content: z.string().nullish(),\n state: z.enum(MarketClarificationState).nullish(),\n clearBook: z.boolean().nullish(),\n notifyDiscord: z.boolean().nullish(),\n showInFrontend: z.boolean().nullish(),\n adapterAddress: EvmAddressSchema.nullish(),\n negRiskRequestId: z.string().nullish(),\n txHash: TxHashSchema.nullish(),\n createdAt: IsoDateTimeStringSchema.nullish(),\n queuedAt: IsoDateTimeStringSchema.nullish(),\n scheduledFor: IsoDateTimeStringSchema.nullish(),\n txTimestamp: IsoDateTimeStringSchema.nullish(),\n});\n\nexport const ListMarketClarificationsResponseSchema = z.array(\n MarketClarificationSchema,\n);\n\nexport type MarketClarification = z.infer<typeof MarketClarificationSchema>;\nexport type ListMarketClarificationsResponse = z.infer<\n typeof ListMarketClarificationsResponseSchema\n>;\n","import { z } from 'zod';\n\nexport const PaginationEnvelopeSchema = z.object({\n hasMore: z.boolean().nullish(),\n totalResults: z.number().int().nullish(),\n});\n\nexport type PaginationEnvelope = z.infer<typeof PaginationEnvelopeSchema>;\n","import { z } from 'zod';\nimport { EvmAddressSchema, IsoDateTimeStringSchema } from '../shared';\nimport { ImageOptimizationSchema } from './common';\n\nexport const PublicProfileUserSchema = z.object({\n id: z.string(),\n communityMod: z.boolean().nullish(),\n creator: z.boolean().nullish(),\n mod: z.boolean().nullish(),\n});\n\nexport const ProfileSchema = z\n .object({\n id: z.string().nullish(),\n name: z.string().nullish(),\n user: z.number().int().nullish(),\n referral: z.string().nullish(),\n createdBy: z.number().int().nullish(),\n updatedBy: z.number().int().nullish(),\n createdAt: IsoDateTimeStringSchema.nullish(),\n updatedAt: IsoDateTimeStringSchema.nullish(),\n utmSource: z.string().nullish(),\n utmMedium: z.string().nullish(),\n utmCampaign: z.string().nullish(),\n utmContent: z.string().nullish(),\n utmTerm: z.string().nullish(),\n walletActivated: z.boolean().nullish(),\n pseudonym: z.string().nullish(),\n displayUsernamePublic: z.boolean().nullish(),\n profileImage: z.string().nullish(),\n bio: z.string().nullish(),\n proxyWallet: z.string().nullish(),\n profileImageOptimized: ImageOptimizationSchema.nullish(),\n isCloseOnly: z.boolean().nullish(),\n isCertReq: z.boolean().nullish(),\n certReqDate: IsoDateTimeStringSchema.nullish(),\n discordUsername: z.string().nullish(),\n xUsername: z.string().nullish(),\n verifiedBadge: z.boolean().nullish(),\n dubPartnerId: z.string().nullish(),\n termsAcceptedAt: IsoDateTimeStringSchema.nullish(),\n viewOnlyAcknowledgedAt: IsoDateTimeStringSchema.nullish(),\n isReferralRestricted: z.boolean().nullish(),\n })\n .transform(({ proxyWallet, ...rest }) => ({\n ...rest,\n wallet: proxyWallet,\n }));\n\nexport const PublicProfileSchema = z\n .object({\n createdAt: IsoDateTimeStringSchema.nullish(),\n proxyWallet: EvmAddressSchema.nullish(),\n profileImage: z.string().nullish(),\n displayUsernamePublic: z.boolean().nullish(),\n bio: z.string().nullish(),\n pseudonym: z.string().nullish(),\n name: z.string().nullish(),\n users: z.array(PublicProfileUserSchema).nullish(),\n xUsername: z.string().nullish(),\n verifiedBadge: z.boolean().nullish(),\n })\n .transform(({ proxyWallet, ...rest }) => ({\n ...rest,\n wallet: proxyWallet,\n }));\n\nexport type PublicProfile = z.infer<typeof PublicProfileSchema>;\nexport type Profile = z.infer<typeof ProfileSchema>;\nexport type PublicProfileUser = z.infer<typeof PublicProfileUserSchema>;\n","import { z } from 'zod';\nimport { TagIdSchema } from '../shared';\nimport { EventSchema } from './event';\nimport { ProfileSchema } from './profile';\n\nexport const SearchTagSchema = z\n .object({\n id: TagIdSchema,\n event_count: z.number().int().nullish(),\n label: z.string().nullish(),\n slug: z.string().nullish(),\n })\n .transform(({ event_count, ...rest }) => ({\n ...rest,\n eventCount: event_count,\n }));\n\nexport const SearchPaginationSchema = z.object({\n hasMore: z.boolean().nullish(),\n totalResults: z.number().int().nullish(),\n});\n\nexport const PublicSearchResponseSchema = z.object({\n events: z.array(EventSchema).nullish(),\n tags: z.array(SearchTagSchema).nullish(),\n profiles: z.array(ProfileSchema).nullish(),\n pagination: SearchPaginationSchema.nullish(),\n});\n\nexport type SearchTag = z.infer<typeof SearchTagSchema>;\nexport type SearchPagination = z.infer<typeof SearchPaginationSchema>;\nexport type PublicSearchResponse = z.infer<typeof PublicSearchResponseSchema>;\n","import { z } from 'zod';\nimport { TagIdSchema } from '../shared';\nimport { TagReferenceSchema } from './common';\nimport { TemplateReferenceSchema } from './event';\n\nexport const TagSchema = TagReferenceSchema.extend({\n templates: z.array(TemplateReferenceSchema).nullish(),\n});\n\nexport const RelatedTagSchema = z\n .object({\n id: z.string(),\n tagID: z.number().int().nullish(),\n relatedTagID: z.number().int().nullish(),\n rank: z.number().int().nullish(),\n })\n .transform(({ tagID, relatedTagID, ...rest }) => ({\n ...rest,\n tagId: tagID,\n relatedTagId: relatedTagID,\n }));\n\nexport const ListTagsResponseSchema = z.array(TagSchema);\nexport const ListRelatedTagsResponseSchema = z.array(RelatedTagSchema);\nexport const ListRelatedTagResourcesResponseSchema = z.array(TagSchema);\n\nexport type Tag = z.infer<typeof TagSchema>;\nexport type RelatedTag = z.infer<typeof RelatedTagSchema>;\nexport type ListTagsResponse = z.infer<typeof ListTagsResponseSchema>;\nexport type ListRelatedTagsResponse = z.infer<\n typeof ListRelatedTagsResponseSchema\n>;\nexport type ListRelatedTagResourcesResponse = z.infer<\n typeof ListRelatedTagResourcesResponseSchema\n>;\n\nexport { TagIdSchema };\n","import { z } from 'zod';\nimport {\n CollectionReferenceSchema,\n EventSchema,\n SeriesReferenceSchema,\n} from './event';\nimport { TagSchema } from './tag';\n\nexport const SeriesSchema = SeriesReferenceSchema.extend({\n events: z.array(EventSchema).nullish(),\n collections: z.array(CollectionReferenceSchema).nullish(),\n tags: z.array(TagSchema).nullish(),\n});\n\nexport const ListSeriesResponseSchema = z.array(SeriesSchema);\n\nexport type Series = z.infer<typeof SeriesSchema>;\nexport type ListSeriesResponse = z.infer<typeof ListSeriesResponseSchema>;\n","import { z } from 'zod';\n\nexport enum WalletType {\n EOA = 0,\n POLY_PROXY = 1,\n GNOSIS_SAFE = 2,\n DEPOSIT_WALLET = 3,\n}\n\nexport const WalletTypeSchema = z.object({\n type: z.enum(WalletType),\n typeName: z.enum(['EOA', 'POLY_PROXY', 'GNOSIS_SAFE', 'DEPOSIT_WALLET']),\n});\n"]}
@@ -0,0 +1,112 @@
1
+ import { z } from 'zod';
2
+ export { A as ApiKey, a as ApiKeySchema, B as BaseUnits, b as BaseUnitsSchema, c as BestLineId, d as BuilderCode, e as BuilderCodeSchema, C as CategoryId, f as CategoryIdSchema, g as ChatId, h as ClobAssetId, i as ClobAssetIdSchema, j as ClobRewardId, k as ClobRewardIdSchema, l as CollectionId, m as ComboActivityId, n as ComboActivityIdSchema, o as ComboConditionId, p as ComboConditionIdSchema, q as CommentId, r as CommentIdSchema, s as CommentParentEntityType, t as CommentParentEntityTypeSchema, u as ConditionId, v as ConditionIdResponseSchema, w as ConditionIdSchema, x as CtfConditionId, D as DateLikeToIsoDateTimeStringSchema, y as DecimalString, z as DecimalStringSchema, E as DecimalishSchema, F as E6BigIntStringToDecimalStringSchema, G as EpochLikeToIsoDateTimeStringSchema, H as EpochMilliseconds, I as EpochMillisecondsSchema, J as EpochMillisecondsStringSchema, K as EpochMillisecondsToIsoDateTimeStringSchema, L as EpochSecondsToMillisecondsSchema, M as EventCreatorId, N as EventExternalPartnerMappingId, O as EventId, P as EventIdSchema, Q as EvmAddressSchema, R as ISOCalendarDateSchema, S as ISOCalendarDateString, T as ISODateString, U as ISODateStringSchema, V as ImageOptimizationId, W as ImageOptimizationIdSchema, X as InternalUserId, Y as InternalUserIdSchema, Z as IsoCalendarDateString, _ as IsoCalendarDateStringSchema, $ as IsoDateTimeString, a0 as IsoDateTimeStringSchema, a1 as MarketId, a2 as MarketIdSchema, a3 as MixedDateTimeString, a4 as MixedDateTimeStringSchema, a5 as NegRiskEventId, a6 as NegRiskEventIdSchema, a7 as NotificationId, a8 as NotificationIdSchema, a9 as OptionalDateLikeToIsoDateTimeStringSchema, aa as OptionalDecimalStringSchema, ab as OptionalEpochLikeToIsoDateTimeStringSchema, ac as OptionalEpochMillisecondsToIsoDateTimeStringSchema, ad as OrderId, ae as OrderIdSchema, af as OrderSide, ag as OrderSideSchema, ah as OrderType, ai as OrderTypeSchema, aj as PaginationCursor, ak as PaginationCursorSchema, al as PartnerId, am as PositionId, an as PositionIdSchema, ao as PositiveDecimalNumberSchema, ap as QuestionId, aq as QuestionIdSchema, ar as ResolutionRequestId, as as ResolutionRequestIdSchema, at as RfqId, au as RfqIdSchema, av as RfqQuoteId, aw as RfqQuoteIdSchema, ax as RfqRequestorPublicId, ay as RfqRequestorPublicIdSchema, az as SeriesId, aA as SessionSignerKnownScope, aB as SessionSignerScope, aC as SessionSignerScopeSchema, aD as SportId, aE as TagId, aF as TagIdSchema, aG as TeamId, aH as TemplateId, aI as TickSizeValue, aJ as TickSizeValueSchema, aK as TokenId, aL as TokenIdSchema, aM as TradeStatus, aN as TradeStatusSchema, aO as TransactionId, aP as TransactionIdSchema, aQ as TxHashSchema, aR as Uuid, aS as emptyStringToNull, aT as emptyStringToUndefined, aU as toApiKey, aV as toBaseUnits, aW as toBestLineId, aX as toBuilderCode, aY as toCategoryId, aZ as toChatId, a_ as toClobRewardId, a$ as toCollectionId, b0 as toComboActivityId, b1 as toComboConditionId, b2 as toCommentId, b3 as toConditionId, b4 as toDecimalString, b5 as toEpochMilliseconds, b6 as toEventCreatorId, b7 as toEventExternalPartnerMappingId, b8 as toEventId, b9 as toImageOptimizationId, ba as toInternalUserId, bb as toIsoCalendarDateString, bc as toIsoDateTimeString, bd as toMarketId, be as toMixedDateTimeString, bf as toNotificationId, bg as toOrderId, bh as toPaginationCursor, bi as toPartnerId, bj as toPositionId, bk as toQuestionId, bl as toResolutionRequestId, bm as toRfqId, bn as toRfqQuoteId, bo as toRfqRequestorPublicId, bp as toSeriesId, bq as toSportId, br as toTagId, bs as toTeamId, bt as toTemplateId, bu as toTokenId, bv as toTransactionId, bw as toUuid } from './shared-Dm807IWG.js';
3
+ export { EvmAddress, TxHash } from '@kuest/types';
4
+
5
+ /** Known rejection codes; unknown future codes remain valid. */
6
+ declare enum GatewayKnownErrorCode {
7
+ InvalidCursor = "invalid_cursor",
8
+ InvalidQueryParam = "invalid_query_param",
9
+ InvalidPathParam = "invalid_path_param",
10
+ InvalidRequestBody = "invalid_request_body",
11
+ InsufficientLiquidity = "insufficient_liquidity",
12
+ InvalidApiKey = "invalid_api_key",
13
+ InvalidCredentials = "invalid_credentials",
14
+ LoginRejected = "login_rejected",
15
+ InvalidOrderTokenId = "invalid_order_token_id",
16
+ InvalidOrderPrice = "invalid_order_price",
17
+ InvalidBuilderCode = "invalid_builder_code",
18
+ InvalidOrderExpiration = "invalid_order_expiration",
19
+ InvalidOrderAmount = "invalid_order_amount",
20
+ InvalidOrderIdentity = "invalid_order_identity",
21
+ OrderTooSmall = "order_too_small",
22
+ InvalidClobCredentials = "invalid_clob_credentials",
23
+ PayloadTooLarge = "payload_too_large",
24
+ InvalidBuilderCredentials = "invalid_builder_credentials",
25
+ UpstreamUnavailable = "upstream_unavailable",
26
+ RateLimited = "rate_limited",
27
+ SubmissionOutcomeUnknown = "submission_outcome_unknown",
28
+ CancelOutcomeUnknown = "cancel_outcome_unknown",
29
+ RfqOutcomeUnknown = "rfq_outcome_unknown",
30
+ BuilderAttributionUnsupported = "builder_attribution_unsupported",
31
+ RestrictedRegionCloseOnly = "restricted_region_close_only",
32
+ NotFound = "not_found",
33
+ EventArchived = "event_archived",
34
+ MarketNotFound = "market_not_found",
35
+ DepositWalletNotFound = "deposit_wallet_not_found",
36
+ InvalidTransaction = "invalid_transaction",
37
+ TransactionNotAllowed = "transaction_not_allowed",
38
+ DuplicateInFlightNonce = "duplicate_in_flight_nonce",
39
+ InternalError = "internal_error",
40
+ InvalidAccessToken = "invalid_access_token",
41
+ ExpiredAccessToken = "expired_access_token",
42
+ ApiKeyMismatch = "api_key_mismatch",
43
+ IdentityProviderUnavailable = "identity_provider_unavailable",
44
+ IdentityProviderProtocolError = "identity_provider_protocol_error",
45
+ InvalidSigner = "invalid_signer",
46
+ InvalidSignature = "invalid_signature",
47
+ MalformedRefreshToken = "malformed_refresh_token",
48
+ ChallengeNotFound = "challenge_not_found",
49
+ ChallengeExpired = "challenge_expired",
50
+ InvalidAttestation = "invalid_attestation",
51
+ InvalidRefreshToken = "invalid_refresh_token",
52
+ ChallengeConsumed = "challenge_consumed",
53
+ InvalidWallet = "invalid_wallet",
54
+ WalletNotAuthorized = "wallet_not_authorized"
55
+ }
56
+ /** A known rejection code or an unrecognized code returned by the server. */
57
+ type GatewayErrorCode = GatewayKnownErrorCode | (string & {});
58
+ /** Native error envelope, retaining unrecognized codes for forward compatibility. */
59
+ declare const GatewayErrorResponseSchema: z.ZodPipe<z.ZodObject<{
60
+ code: z.ZodPipe<z.ZodString, z.ZodTransform<GatewayKnownErrorCode | (string & {}), string>>;
61
+ message: z.ZodString;
62
+ retry_after_seconds: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodNumber>>, z.ZodTransform<number | undefined, number | null | undefined>>;
63
+ }, z.core.$strip>, z.ZodTransform<{
64
+ code: GatewayKnownErrorCode | (string & {});
65
+ message: string;
66
+ retryAfter: number | undefined;
67
+ }, {
68
+ code: GatewayKnownErrorCode | (string & {});
69
+ message: string;
70
+ retry_after_seconds: number | undefined;
71
+ }>>;
72
+ /** Upstream error envelope normalized to the transport's error fields. */
73
+ declare const PassthroughErrorResponseSchema: z.ZodPipe<z.ZodObject<{
74
+ error: z.ZodString;
75
+ code: z.ZodOptional<z.ZodNullable<z.ZodString>>;
76
+ retry_after_seconds: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodNumber>>, z.ZodTransform<number | undefined, number | null | undefined>>;
77
+ }, z.core.$strip>, z.ZodTransform<{
78
+ message: string;
79
+ code: string | undefined;
80
+ retryAfter: number | undefined;
81
+ }, {
82
+ error: string;
83
+ retry_after_seconds: number | undefined;
84
+ code?: string | null | undefined;
85
+ }>>;
86
+ declare const ErrorResponseSchema: z.ZodUnion<readonly [z.ZodPipe<z.ZodObject<{
87
+ error: z.ZodString;
88
+ code: z.ZodOptional<z.ZodNullable<z.ZodString>>;
89
+ retry_after_seconds: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodNumber>>, z.ZodTransform<number | undefined, number | null | undefined>>;
90
+ }, z.core.$strip>, z.ZodTransform<{
91
+ message: string;
92
+ code: string | undefined;
93
+ retryAfter: number | undefined;
94
+ }, {
95
+ error: string;
96
+ retry_after_seconds: number | undefined;
97
+ code?: string | null | undefined;
98
+ }>>, z.ZodPipe<z.ZodObject<{
99
+ code: z.ZodPipe<z.ZodString, z.ZodTransform<GatewayKnownErrorCode | (string & {}), string>>;
100
+ message: z.ZodString;
101
+ retry_after_seconds: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodNumber>>, z.ZodTransform<number | undefined, number | null | undefined>>;
102
+ }, z.core.$strip>, z.ZodTransform<{
103
+ code: GatewayKnownErrorCode | (string & {});
104
+ message: string;
105
+ retryAfter: number | undefined;
106
+ }, {
107
+ code: GatewayKnownErrorCode | (string & {});
108
+ message: string;
109
+ retry_after_seconds: number | undefined;
110
+ }>>]>;
111
+
112
+ export { ErrorResponseSchema, type GatewayErrorCode, GatewayErrorResponseSchema, GatewayKnownErrorCode, PassthroughErrorResponseSchema };
package/dist/index.js ADDED
@@ -0,0 +1,2 @@
1
+ export{X as ApiKeySchema,Ta as BaseUnitsSchema,Y as BuilderCodeSchema,W as CategoryIdSchema,Fa as ClobAssetIdSchema,Z as ClobRewardIdSchema,$ as ComboActivityIdSchema,aa as ComboConditionIdSchema,_ as CommentIdSchema,a as CommentParentEntityType,ya as CommentParentEntityTypeSchema,ca as ConditionIdResponseSchema,ba as ConditionIdSchema,ha as DateLikeToIsoDateTimeStringSchema,Pa as DecimalStringSchema,Ra as DecimalishSchema,Qa as E6BigIntStringToDecimalStringSchema,ia as EpochLikeToIsoDateTimeStringSchema,ea as EpochMillisecondsSchema,ga as EpochMillisecondsStringSchema,la as EpochMillisecondsToIsoDateTimeStringSchema,fa as EpochSecondsToMillisecondsSchema,na as EventIdSchema,da as EvmAddressSchema,ta as ISOCalendarDateSchema,sa as ISODateStringSchema,ua as ImageOptimizationIdSchema,va as InternalUserIdSchema,qa as IsoCalendarDateStringSchema,pa as IsoDateTimeStringSchema,wa as MarketIdSchema,ra as MixedDateTimeStringSchema,g as NegRiskEventIdSchema,xa as NotificationIdSchema,ja as OptionalDateLikeToIsoDateTimeStringSchema,Wa as OptionalDecimalStringSchema,ka as OptionalEpochLikeToIsoDateTimeStringSchema,ma as OptionalEpochMillisecondsToIsoDateTimeStringSchema,za as OrderIdSchema,b as OrderSide,Aa as OrderSideSchema,c as OrderType,Ba as OrderTypeSchema,Da as PaginationCursorSchema,Ea as PositionIdSchema,Sa as PositiveDecimalNumberSchema,Ga as QuestionIdSchema,Ha as ResolutionRequestIdSchema,Ia as RfqIdSchema,Ja as RfqQuoteIdSchema,Ka as RfqRequestorPublicIdSchema,e as SessionSignerKnownScope,f as SessionSignerScopeSchema,La as TagIdSchema,oa as TickSizeValueSchema,Ma as TokenIdSchema,d as TradeStatus,Ca as TradeStatusSchema,Na as TransactionIdSchema,Oa as TxHashSchema,Ua as emptyStringToNull,Va as emptyStringToUndefined,k as toApiKey,V as toBaseUnits,h as toBestLineId,i as toBuilderCode,l as toCategoryId,m as toChatId,n as toClobRewardId,s as toCollectionId,p as toComboActivityId,r as toComboConditionId,o as toCommentId,q as toConditionId,U as toDecimalString,v as toEpochMilliseconds,t as toEventCreatorId,u as toEventExternalPartnerMappingId,w as toEventId,x as toImageOptimizationId,y as toInternalUserId,z as toIsoCalendarDateString,A as toIsoDateTimeString,C as toMarketId,B as toMixedDateTimeString,D as toNotificationId,E as toOrderId,G as toPaginationCursor,F as toPartnerId,H as toPositionId,I as toQuestionId,J as toResolutionRequestId,K as toRfqId,L as toRfqQuoteId,M as toRfqRequestorPublicId,N as toSeriesId,O as toSportId,P as toTagId,Q as toTeamId,R as toTemplateId,T as toTokenId,S as toTransactionId,j as toUuid}from'./chunk-2KNK5TP7.js';import {z}from'zod';var s=(i=>(i.InvalidCursor="invalid_cursor",i.InvalidQueryParam="invalid_query_param",i.InvalidPathParam="invalid_path_param",i.InvalidRequestBody="invalid_request_body",i.InsufficientLiquidity="insufficient_liquidity",i.InvalidApiKey="invalid_api_key",i.InvalidCredentials="invalid_credentials",i.LoginRejected="login_rejected",i.InvalidOrderTokenId="invalid_order_token_id",i.InvalidOrderPrice="invalid_order_price",i.InvalidBuilderCode="invalid_builder_code",i.InvalidOrderExpiration="invalid_order_expiration",i.InvalidOrderAmount="invalid_order_amount",i.InvalidOrderIdentity="invalid_order_identity",i.OrderTooSmall="order_too_small",i.InvalidClobCredentials="invalid_clob_credentials",i.PayloadTooLarge="payload_too_large",i.InvalidBuilderCredentials="invalid_builder_credentials",i.UpstreamUnavailable="upstream_unavailable",i.RateLimited="rate_limited",i.SubmissionOutcomeUnknown="submission_outcome_unknown",i.CancelOutcomeUnknown="cancel_outcome_unknown",i.RfqOutcomeUnknown="rfq_outcome_unknown",i.BuilderAttributionUnsupported="builder_attribution_unsupported",i.RestrictedRegionCloseOnly="restricted_region_close_only",i.NotFound="not_found",i.EventArchived="event_archived",i.MarketNotFound="market_not_found",i.DepositWalletNotFound="deposit_wallet_not_found",i.InvalidTransaction="invalid_transaction",i.TransactionNotAllowed="transaction_not_allowed",i.DuplicateInFlightNonce="duplicate_in_flight_nonce",i.InternalError="internal_error",i.InvalidAccessToken="invalid_access_token",i.ExpiredAccessToken="expired_access_token",i.ApiKeyMismatch="api_key_mismatch",i.IdentityProviderUnavailable="identity_provider_unavailable",i.IdentityProviderProtocolError="identity_provider_protocol_error",i.InvalidSigner="invalid_signer",i.InvalidSignature="invalid_signature",i.MalformedRefreshToken="malformed_refresh_token",i.ChallengeNotFound="challenge_not_found",i.ChallengeExpired="challenge_expired",i.InvalidAttestation="invalid_attestation",i.InvalidRefreshToken="invalid_refresh_token",i.ChallengeConsumed="challenge_consumed",i.InvalidWallet="invalid_wallet",i.WalletNotAuthorized="wallet_not_authorized",i))(s||{}),_=z.number().finite().nonnegative().nullish().transform(l=>l??void 0),d=z.object({code:z.string().min(1).transform(l=>l),message:z.string().min(1),retry_after_seconds:_}).transform(({code:l,message:t,retry_after_seconds:n})=>({code:l,message:t,retryAfter:n})),c=z.object({error:z.string().min(1),code:z.string().nullish(),retry_after_seconds:_}).transform(({error:l,code:t,retry_after_seconds:n})=>({message:l,code:t||void 0,retryAfter:n})),_e=z.union([c,d]);export{_e as ErrorResponseSchema,d as GatewayErrorResponseSchema,s as GatewayKnownErrorCode,c as PassthroughErrorResponseSchema};//# sourceMappingURL=index.js.map
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/errors.ts"],"names":["GatewayKnownErrorCode","RetryAfterSecondsSchema","z","value","GatewayErrorResponseSchema","code","message","retry_after_seconds","PassthroughErrorResponseSchema","error","ErrorResponseSchema"],"mappings":"gjFAGO,IAAKA,CAAAA,CAAAA,CAAAA,CAAAA,GACVA,CAAAA,CAAA,aAAA,CAAgB,gBAAA,CAChBA,CAAAA,CAAA,iBAAA,CAAoB,qBAAA,CACpBA,CAAAA,CAAA,gBAAA,CAAmB,oBAAA,CACnBA,CAAAA,CAAA,kBAAA,CAAqB,sBAAA,CACrBA,CAAAA,CAAA,qBAAA,CAAwB,wBAAA,CACxBA,CAAAA,CAAA,aAAA,CAAgB,iBAAA,CAChBA,CAAAA,CAAA,kBAAA,CAAqB,qBAAA,CACrBA,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,MAAA,EAAO,CAAE,GAAA,CAAI,CAAC,CAAA,CACvB,IAAA,CAAMA,CAAAA,CAAE,QAAO,CAAE,OAAA,EAAQ,CACzB,mBAAA,CAAqBD,CACvB,CAAC,CAAA,CACA,SAAA,CAAU,CAAC,CAAE,KAAA,CAAAQ,CAAAA,CAAO,IAAA,CAAAJ,CAAAA,CAAM,mBAAA,CAAAE,CAAoB,CAAA,IAAO,CACpD,OAAA,CAASE,CAAAA,CACT,IAAA,CAAMJ,CAAAA,EAAQ,MAAA,CACd,UAAA,CAAYE,CACd,CAAA,CAAE,CAAA,CAGSG,EAAAA,CAAsBR,CAAAA,CAAE,KAAA,CAAM,CACzCM,CAAAA,CACAJ,CACF,CAAC","file":"index.js","sourcesContent":["import { z } from 'zod';\n\n/** Known rejection codes; unknown future codes remain valid. */\nexport enum GatewayKnownErrorCode {\n InvalidCursor = 'invalid_cursor',\n InvalidQueryParam = 'invalid_query_param',\n InvalidPathParam = 'invalid_path_param',\n InvalidRequestBody = 'invalid_request_body',\n InsufficientLiquidity = 'insufficient_liquidity',\n InvalidApiKey = 'invalid_api_key',\n InvalidCredentials = 'invalid_credentials',\n LoginRejected = 'login_rejected',\n InvalidOrderTokenId = 'invalid_order_token_id',\n InvalidOrderPrice = 'invalid_order_price',\n InvalidBuilderCode = 'invalid_builder_code',\n InvalidOrderExpiration = 'invalid_order_expiration',\n InvalidOrderAmount = 'invalid_order_amount',\n InvalidOrderIdentity = 'invalid_order_identity',\n OrderTooSmall = 'order_too_small',\n InvalidClobCredentials = 'invalid_clob_credentials',\n PayloadTooLarge = 'payload_too_large',\n InvalidBuilderCredentials = 'invalid_builder_credentials',\n UpstreamUnavailable = 'upstream_unavailable',\n RateLimited = 'rate_limited',\n SubmissionOutcomeUnknown = 'submission_outcome_unknown',\n CancelOutcomeUnknown = 'cancel_outcome_unknown',\n RfqOutcomeUnknown = 'rfq_outcome_unknown',\n BuilderAttributionUnsupported = 'builder_attribution_unsupported',\n RestrictedRegionCloseOnly = 'restricted_region_close_only',\n NotFound = 'not_found',\n EventArchived = 'event_archived',\n MarketNotFound = 'market_not_found',\n DepositWalletNotFound = 'deposit_wallet_not_found',\n InvalidTransaction = 'invalid_transaction',\n TransactionNotAllowed = 'transaction_not_allowed',\n DuplicateInFlightNonce = 'duplicate_in_flight_nonce',\n InternalError = 'internal_error',\n InvalidAccessToken = 'invalid_access_token',\n ExpiredAccessToken = 'expired_access_token',\n ApiKeyMismatch = 'api_key_mismatch',\n IdentityProviderUnavailable = 'identity_provider_unavailable',\n IdentityProviderProtocolError = 'identity_provider_protocol_error',\n InvalidSigner = 'invalid_signer',\n InvalidSignature = 'invalid_signature',\n MalformedRefreshToken = 'malformed_refresh_token',\n ChallengeNotFound = 'challenge_not_found',\n ChallengeExpired = 'challenge_expired',\n InvalidAttestation = 'invalid_attestation',\n InvalidRefreshToken = 'invalid_refresh_token',\n ChallengeConsumed = 'challenge_consumed',\n InvalidWallet = 'invalid_wallet',\n WalletNotAuthorized = 'wallet_not_authorized',\n}\n\n/** A known rejection code or an unrecognized code returned by the server. */\nexport type GatewayErrorCode = GatewayKnownErrorCode | (string & {});\n\n// Nullable optional hints carry no value; keep the error envelope usable.\nconst RetryAfterSecondsSchema = z\n .number()\n .finite()\n .nonnegative()\n .nullish()\n .transform((value) => value ?? undefined);\n\n/** Native error envelope, retaining unrecognized codes for forward compatibility. */\nexport const GatewayErrorResponseSchema = z\n .object({\n code: z\n .string()\n .min(1)\n .transform((code): GatewayErrorCode => code),\n message: z.string().min(1),\n retry_after_seconds: RetryAfterSecondsSchema,\n })\n .transform(({ code, message, retry_after_seconds }) => ({\n code,\n message,\n retryAfter: retry_after_seconds,\n }));\n\n/** Upstream error envelope normalized to the transport's error fields. */\nexport const PassthroughErrorResponseSchema = z\n .object({\n error: z.string().min(1),\n code: z.string().nullish(),\n retry_after_seconds: RetryAfterSecondsSchema,\n })\n .transform(({ error, code, retry_after_seconds }) => ({\n message: error,\n code: code || undefined,\n retryAfter: retry_after_seconds,\n }));\n\n// Preserve upstream error/retry precedence for responses containing both shapes.\nexport const ErrorResponseSchema = z.union([\n PassthroughErrorResponseSchema,\n GatewayErrorResponseSchema,\n]);\n"]}