/*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ import { $ as PermitResult, $n as jcsCanonicalize, $r as JsonRpcError, $t as HubRpcJsonRpcMessage, A as identityStorageInterface, An as getKeyId, Ar as requestType, At as ChannelTransport, B as createManagedPrincipal, Bn as PrincipalId, Br as EnumSchema, Bt as StreamSendOpts, C as SignedRpcCall, Cn as Base64Sha256, Cr as interfaceFromSchema, Ct as JsonRpcChannel, D as signRpcCall, Dn as SignDomain, Dr as RequestType, Dt as KeepConnectedHandle, E as attachCapabilities, En as HUBRPC_UNSIGNED_KEY, Er as NotificationType, Et as ExpBackoffOptions, F as OneShotCapStaging, Fn as withSignature, Fr as MethodSchema, Ft as MessageWithCtx, G as InMemoryManagedIdentityStorage, Gn as X25519Keypair, Gr as ObjectSchema, Gt as MessageTransportTrace, H as CapBag, Hn as PublicKey, Hr as IntegerSchema, Ht as MuxEnvelope, I as SigningCallCtx, In as KEY_ID_PREFIX, Ir as ArraySchema, It as RawStreamingCall, J as ManagedIdentityStorageBackend, Jn as keyIdForPrincipal, Jr as SchemaBase, Jt as TransportPair, K as ManagedIdentity, Kn as base64UrlToBytes, Kr as OneOfSchema, Kt as MessageTransportWithContext, L as SigningSender, Ln as KeyId, Lr as BooleanSchema, Lt as Result, M as CapProvider, Mn as signedHash, Mr as ErrorSchema, Mt as IRequestSender, N as CapProviderResult, Nn as signingDomainValue, Nr as HubRpcInterfaceSchema, Nt as IncomingCall, O as verifyRpcCall, On as SignatureEnvelope, Or as Schema, Ot as OnChannelConnect, P as ManagedSigningChannel, Pn as signingInput, Pr as MemberAnnotations, Pt as IncomingStream, Q as AcceptedRootIssuer, Qn as resolveSigningKey, Qr as ErrorCode, Qt as CallMeta, R as SigningSenderConfig, Rn as Keypair, Rr as ConstSchema, Rt as RpcError, S as SignRpcCallOptions, Sn as permissionPermits, Sr as defineInterface, St as parseEndpointUri, T as VerifyRpcCallResult, Tn as HUBRPC_SIGNATURE_KEY, Tr as MemberType, Tt as ConnectableChannel, U as CapBagOptions, Un as ResolveSigningKeyArgs, Ur as NullSchema, Ut as IMessageTransport, V as Principal, Vn as PrivateKey, Vr as HubRpcJsonSchema, Vt as MultiplexedTransport, W as InMemoryManagedIdentity, Wn as Signature, Wr as NumberSchema, Wt as MessageTransportDirection, X as registerIdentityOnOverlay, Xn as principalForPublicKey, Xr as TupleSchema, Xt as traceMessageTransport, Y as createManagedIdentity, Yn as keyIdForPublicKey, Yr as StringSchema, Yt as connectTransports, Z as registerLazyIdentityOnOverlay, Zn as publicKeyForKeyId, Zr as UnionSchema, _ as SignParamsOptions, _n as SignedCapability, _r as InterfaceInfo, _t as SocketEndpoint, a as ServiceHandle, ai as RequestId, an as requireObjectParams, ar as StreamSendParams, at as KeypairIdentity, b as signParams, bn as matchParams, br as StreamCallOptions, bt as formatEndpointUri, c as defaultsInterface, ci as isResponse, cn as parseMethodName, cr as generateTsInterface, ct as PublicWrappingIdentity, d as schemasInterface, dn as CallBind, dr as normalizeJsonSchema, dt as WrappingIdentity, ei as JsonRpcMessage, en as HubRpcJsonRpcNotification, er as jcsCanonicalizeBytes, et as capBagFreshAt, f as SeededPrincipalOptions, fn as CallTarget, fr as computeInterfaceHash, ft as CmdEnvEndpoint, g as JsonObject, gn as Permission, gr as InterfaceHandlers, gt as ResolvedEndpoint, h as createSeededSigningIdentity, hn as Pattern, hr as InterfaceDefinitionOpts, ht as FormatEndpointOptions, i as RegisterOptions, ii as JsonRpcSuccess, in as HubRpcWireParams, ir as StreamDir, it as Identity, j as crypto_d_exports, jn as readSignature, jr as zodToSvcJsonSchema, jt as IRequestHandler, k as identityInterface, kn as Signatures, kr as notificationType, kt as Channel, l as directoryInterface, li as JsonValue, ln as Ability, lr as Components, lt as SerializedKeypairSigningIdentity, m as createSeededMemoryPrincipal, mn as ParamMatcher, mr as InterfaceDefinition, mt as EndpointCommand, n as HubRpcConnection, ni as JsonRpcRequest, nn as HubRpcUnsigned, nr as StreamControlReason, nt as permits, o as RootPrincipalReq, oi as isNotification, on as ParsedMethodName, or as streamInterface, ot as KeypairSigningIdentity, p as createMemoryPrincipal, pn as Capability, pr as InterfaceClient, pt as CmdStdioEndpoint, q as ManagedIdentityStorage, qn as bytesToBase64Url, qr as RefSchema, qt as MessageWithContext, r as InterfaceRegistration, ri as JsonRpcResponse, rn as HubRpcWireMeta, rr as StreamControlType, rt as signCapability, s as RootPrincipalSet, si as isRequest, sn as methodNameToTarget, sr as GenerateInterfaceOptions, st as PublicSigningIdentity, t as GetOptions, ti as JsonRpcNotification, tn as HubRpcJsonRpcRequest, tr as STREAM_METHOD, tt as capabilityFreshAt, u as directoryWatchNever, un as Call, ur as isAssignable, ut as SigningIdentity, v as VerifyCallOptions, vn as TargetPattern, vr as MemberMap, vt as WsEndpoint, w as VerifyRpcCallOptions, wn as HUBRPC_META_KEY, wr as MemberDocs, wt as ChannelConnector, x as verifyCall, xn as permissionMatchesTarget, xr as StreamingCall, xt as isHubEndpoint, y as VerifyResult, yn as capabilityPermits, yr as StreamApi, z as PrincipalWithStore, zn as PRINCIPAL_PREFIX, zr as DiscriminatorSchema, zt as SendOpts } from "./chunks/hubRpcConnection-Ba6dm9d-.js"; //#region src/transport/windowMessageTransport.d.ts /** * Minimal shape of `window` we need. Kept as a structural type so this module * works in any environment that provides postMessage / message events. */ interface MessageEndpoint { postMessage(message: unknown, targetOrigin?: string): void; addEventListener(type: 'message', listener: (event: MessageLikeEvent) => void): void; removeEventListener(type: 'message', listener: (event: MessageLikeEvent) => void): void; } interface MessageLikeEvent { data: unknown; source?: unknown; } /** * IMessageTransport for two `window`-like endpoints exchanging JSON-RPC * messages via `postMessage`. Outgoing messages go to `their`; incoming * `message` events are filtered to those whose `source` is `their`. * * Typical pairings: * - Editor in iframe: `new WindowMessageTransport(window, window.parent)` * - Host wrapping an iframe: `new WindowMessageTransport(window, iframe.contentWindow)` */ declare class WindowMessageTransport implements IMessageTransport { private readonly _our; private readonly _their; private readonly _filterSource; private _listener; private readonly _buffer; private _closed; private readonly _handler; constructor(_our: MessageEndpoint, _their: MessageEndpoint, _filterSource?: boolean); send(message: JsonRpcMessage): void; setListener(listener: ((message: JsonRpcMessage) => void) | undefined): void; dispose(): void; } //#endregion export { Ability, type AcceptedRootIssuer, ArraySchema, Base64Sha256, BooleanSchema, Call, CallBind, CallMeta, CallTarget, CapBag, CapBagOptions, type CapProvider, type CapProviderResult, Capability, Channel, ChannelConnector, type ChannelTransport, type CmdEnvEndpoint, type CmdStdioEndpoint, Components, type ConnectableChannel, ConstSchema, DiscriminatorSchema, type EndpointCommand, EnumSchema, ErrorCode, ErrorSchema, type ExpBackoffOptions, type FormatEndpointOptions, GenerateInterfaceOptions, GetOptions, HUBRPC_META_KEY, HUBRPC_SIGNATURE_KEY, HUBRPC_UNSIGNED_KEY, HubRpcConnection, HubRpcInterfaceSchema, HubRpcJsonRpcMessage, HubRpcJsonRpcNotification, HubRpcJsonRpcRequest, HubRpcJsonSchema, HubRpcUnsigned, HubRpcWireMeta, HubRpcWireParams, IMessageTransport, type IRequestHandler, type IRequestSender, Identity, InMemoryManagedIdentity, InMemoryManagedIdentityStorage, type IncomingCall, type IncomingStream, IntegerSchema, InterfaceClient, InterfaceDefinition, InterfaceDefinitionOpts, InterfaceHandlers, InterfaceInfo, InterfaceRegistration, JsonObject, JsonRpcChannel, JsonRpcError, JsonRpcMessage, JsonRpcNotification, JsonRpcRequest, JsonRpcResponse, JsonRpcSuccess, JsonValue, KEY_ID_PREFIX, type KeepConnectedHandle, KeyId, Keypair, KeypairIdentity, KeypairSigningIdentity, ManagedIdentity, ManagedIdentityStorage, ManagedIdentityStorageBackend, type ManagedSigningChannel, MemberAnnotations, MemberDocs, MemberMap, MemberType, type MessageEndpoint, type MessageLikeEvent, MessageTransportDirection, MessageTransportTrace, MessageTransportWithContext, MessageWithContext, type MessageWithCtx, MethodSchema, MultiplexedTransport, MuxEnvelope, NotificationType, NullSchema, NumberSchema, ObjectSchema, type OnChannelConnect, OneOfSchema, OneShotCapStaging, PRINCIPAL_PREFIX, ParamMatcher, ParsedMethodName, Pattern, Permission, type PermitResult, Principal, PrincipalId, PrincipalWithStore, PrivateKey, PublicKey, PublicSigningIdentity, PublicWrappingIdentity, type RawStreamingCall, RefSchema, RegisterOptions, RequestId, RequestType, ResolveSigningKeyArgs, type ResolvedEndpoint, type Result, RootPrincipalReq, RootPrincipalSet, RpcError, STREAM_METHOD, Schema, SchemaBase, SeededPrincipalOptions, type SendOpts, SerializedKeypairSigningIdentity, ServiceHandle, SignDomain, SignParamsOptions, SignRpcCallOptions, Signature, SignatureEnvelope, Signatures, SignedCapability, SignedRpcCall, type SigningCallCtx, SigningIdentity, SigningSender, type SigningSenderConfig, type SocketEndpoint, StreamApi, StreamCallOptions, StreamControlReason, StreamControlType, StreamDir, type StreamSendOpts, StreamSendParams, StreamingCall, StringSchema, TargetPattern, TransportPair, TupleSchema, UnionSchema, VerifyCallOptions, VerifyResult, VerifyRpcCallOptions, VerifyRpcCallResult, WindowMessageTransport, WrappingIdentity, type WsEndpoint, X25519Keypair, attachCapabilities, base64UrlToBytes, bytesToBase64Url, capBagFreshAt, capabilityFreshAt, capabilityPermits, computeInterfaceHash, connectTransports, createManagedIdentity, createManagedPrincipal, createMemoryPrincipal, createSeededMemoryPrincipal, createSeededSigningIdentity, crypto_d_exports as crypto, defaultsInterface, defineInterface, directoryInterface, directoryWatchNever, formatEndpointUri, generateTsInterface, getKeyId, identityInterface, identityStorageInterface, interfaceFromSchema, isAssignable, isHubEndpoint, isNotification, isRequest, isResponse, jcsCanonicalize, jcsCanonicalizeBytes, keyIdForPrincipal, keyIdForPublicKey, matchParams, methodNameToTarget, normalizeJsonSchema, notificationType, parseEndpointUri, parseMethodName, permissionMatchesTarget, permissionPermits, permits, principalForPublicKey, publicKeyForKeyId, readSignature, registerIdentityOnOverlay, registerLazyIdentityOnOverlay, requestType, requireObjectParams, resolveSigningKey, schemasInterface, signCapability, signParams, signRpcCall, signedHash, signingDomainValue, signingInput, streamInterface, traceMessageTransport, verifyCall, verifyRpcCall, withSignature, zodToSvcJsonSchema }; //# sourceMappingURL=web.d.ts.map