{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,uBAAuB,CAAC;AACzE,OAAO,KAAK,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC5E,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAE3D,MAAM,MAAM,eAAe,GAAG,cAAc,GAAG,YAAY,GAAG,WAAW,CAAC;AAE1E,MAAM,WAAW,qBAAqB;IACrC,KAAK,EAAE,eAAe,CAAC;IACvB,KAAK,CAAC,EAAE,KAAK,CAAC;CACd;AAED,MAAM,MAAM,WAAW,GAAG,MAAM,IAAI,CAAC;AACrC,MAAM,MAAM,oBAAoB,GAAG,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;AAC1D,MAAM,MAAM,wBAAwB,GAAG,CAAC,UAAU,EAAE,aAAa,GAAG,SAAS,KAAK,IAAI,CAAC;AAEvF,MAAM,WAAW,mBAAmB;IACnC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,MAAM,EAAE,SAAS,CAAC;IAC3B,QAAQ,CAAC,QAAQ,EAAE,2BAA2B,CAAC;IAC/C,iFAAiF;IACjF,KAAK,IAAI,IAAI,CAAC;IACd,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CACzB;AAED,MAAM,WAAW,aAAa;IAC7B,gBAAgB,EAAE,oBAAoB,CAAC;IACvC,iEAAiE;IACjE,QAAQ,EAAE,MAAM,CAAC;IACjB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,iFAAiF;IACjF,eAAe,CAAC,EAAE,oBAAoB,CAAC;CACvC","sourcesContent":["import type { ServiceSubscriptionSnapshot } from \"@earendil-works/chord\";\nimport type { RpcTarget, SessionTarget } from \"@earendil-works/pi-protocol\";\nimport type { ByteTransportFactory } from \"./transport.ts\";\n\nexport type ConnectionState = \"disconnected\" | \"connecting\" | \"connected\";\n\nexport interface ConnectionStateChange {\n\tstate: ConnectionState;\n\terror?: Error;\n}\n\nexport type Unsubscribe = () => void;\nexport type ListenerErrorHandler = (error: Error) => void;\nexport type AttachmentChangeListener = (attachment: SessionTarget | undefined) => void;\n\nexport interface ServiceSubscription {\n\treadonly id: string;\n\treadonly target: RpcTarget;\n\treadonly snapshot: ServiceSubscriptionSnapshot;\n\t/** Begin ordered update delivery after the caller has installed the snapshot. */\n\tstart(): void;\n\tdispose(): Promise<void>;\n}\n\nexport interface ClientOptions {\n\ttransportFactory: ByteTransportFactory;\n\t/** Logical server identity expected at the physical endpoint. */\n\tserverId: string;\n\tmaxFrameLength?: number;\n\t/** Reports subscriber failures without allowing them to corrupt client state. */\n\tonListenerError?: ListenerErrorHandler;\n}\n"]}