{"version":3,"sources":["../../src/types/serverSubscriptionTypes.ts"],"sourcesContent":["export interface EngineServerOrderUpdateStreamParams {\n  product_id: number;\n  subaccount: string;\n}\n\nexport interface EngineServerTradeStreamParams {\n  product_id: number;\n}\n\nexport interface EngineServerBestBidOfferStreamParams {\n  product_id: number;\n}\n\nexport interface EngineServerFillStreamParams {\n  product_id: number;\n  subaccount: string;\n}\n\nexport interface EngineServerPositionChangeStreamParams {\n  product_id: number;\n  subaccount: string;\n}\n\nexport interface EngineServerBookDepthStreamParams {\n  product_id: number;\n}\n\n/**\n * Available subscription streams\n */\nexport interface EngineServerSubscriptionStreamParamsByType {\n  order_update: EngineServerOrderUpdateStreamParams;\n  trade: EngineServerTradeStreamParams;\n  best_bid_offer: EngineServerBestBidOfferStreamParams;\n  fill: EngineServerFillStreamParams;\n  position_change: EngineServerPositionChangeStreamParams;\n  book_depth: EngineServerBookDepthStreamParams;\n}\n\nexport type EngineServerSubscriptionStreamParamsType =\n  keyof EngineServerSubscriptionStreamParamsByType;\n\n/**\n * Describes a stream that can be subscribed to.\n */\nexport type EngineServerSubscriptionStream<\n  TStreamType extends EngineServerSubscriptionStreamParamsType,\n> = {\n  type: TStreamType;\n} & EngineServerSubscriptionStreamParamsByType[TStreamType];\n\n/**\n * Params to provide to a `subscribe` / `unsubscribe` action.\n */\nexport interface EngineServerSubscriptionParams {\n  stream: EngineServerSubscriptionStream<EngineServerSubscriptionStreamParamsType>;\n}\n\n/**\n * Available actions on the subscription API.\n */\nexport interface EngineServerSubscriptionRequestByType {\n  subscribe: EngineServerSubscriptionParams;\n  unsubscribe: EngineServerSubscriptionParams;\n  list: Record<string, never>;\n}\n\nexport type EngineServerSubscriptionRequestType =\n  keyof EngineServerSubscriptionRequestByType;\n\n/**\n * Top level request to send to the server.\n */\nexport type EngineServerSubscriptionRequest<\n  TRequestType extends EngineServerSubscriptionRequestType,\n> = {\n  id: number;\n  method: TRequestType;\n} & EngineServerSubscriptionRequestByType[TRequestType];\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}