UNPKG

@microsoft/windows-admin-center-sdk

Version:

Microsoft - Windows Admin Center Shell

1 lines 2.25 kB
{"version":3,"sources":["../../../packages/core/rpc/rpc-outbound-client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAC5B,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,qBAAa,iBAAiB;IAC1B;;;;;;;;;OASG;WACW,IAAI,CAAC,KAAK,EAAE,OAAO,EAAE,GAAG,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,GAAG,OAAO,CAAC,OAAO,CAAC;IAI7G;;;;;;;;;;OAUG;WACW,YAAY,CAAC,KAAK,EAAE,OAAO,EACjC,UAAU,EAAE,UAAU,EACtB,QAAQ,EAAE,WAAW,EACrB,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,KAAK,GAAG,OAAO,CAAC,OAAO,CAAC;CAGzC","file":"rpc-outbound-client.d.ts","sourcesContent":["import { Rpc } from './rpc';\r\nimport { RpcChannel } from './rpc-channel';\r\nimport { RpcOutbound } from './rpc-outbound';\r\n\r\nexport class RpcOutboundClient {\r\n /**\r\n * The generic command to make outbound request of RPC.\r\n * (From shell to module or from parent to child window.)\r\n *\r\n * @param rpc the rpc instance.\r\n * @param command the command name.\r\n * @param version the version string.\r\n * @param data the TData object.\r\n * @return Promise<TResult> the promise object.\r\n */\r\n public static call<TData, TResult>(rpc: Rpc, command: string, version: string, data: TData): Promise<TResult> {\r\n return rpc.rpcManager.rpcChannel.post<TData, TResult>(rpc.rpcManager.rpcOutbound, { command, version, data });\r\n }\r\n\r\n /**\r\n * The generic command to make outbound request of outbound instance.\r\n * (From shell to module or from parent to child window.)\r\n *\r\n * @param rpcChannel the rpc channel instance.\r\n * @param outbound the RPC outbound instance.\r\n * @param command the command name.\r\n * @param version the version string.\r\n * @param data the TData object.\r\n * @return Promise<TResult> the promise object.\r\n */\r\n public static callOutbound<TData, TResult>(\r\n rpcChannel: RpcChannel,\r\n outbound: RpcOutbound,\r\n command: string,\r\n version: string,\r\n data: TData): Promise<TResult> {\r\n return rpcChannel.post<TData, TResult>(outbound, { command, version, data });\r\n }\r\n}\r\n"]}