import { createLazyRuntimeMethod, createLazyRuntimeSurface } from "../../shared/lazy-runtime.js"; import type { PluginRuntimeChannel } from "./types-channel.js"; type RuntimeSlackOps = typeof import("./runtime-slack-ops.runtime.js").runtimeSlackOps; const loadRuntimeSlackOps = createLazyRuntimeSurface( () => import("./runtime-slack-ops.runtime.js"), ({ runtimeSlackOps }) => runtimeSlackOps, ); const listDirectoryGroupsLiveLazy = createLazyRuntimeMethod< RuntimeSlackOps, Parameters, ReturnType >(loadRuntimeSlackOps, (runtimeSlackOps) => runtimeSlackOps.listDirectoryGroupsLive); const listDirectoryPeersLiveLazy = createLazyRuntimeMethod< RuntimeSlackOps, Parameters, ReturnType >(loadRuntimeSlackOps, (runtimeSlackOps) => runtimeSlackOps.listDirectoryPeersLive); const probeSlackLazy = createLazyRuntimeMethod< RuntimeSlackOps, Parameters, ReturnType >(loadRuntimeSlackOps, (runtimeSlackOps) => runtimeSlackOps.probeSlack); const resolveChannelAllowlistLazy = createLazyRuntimeMethod< RuntimeSlackOps, Parameters, ReturnType >(loadRuntimeSlackOps, (runtimeSlackOps) => runtimeSlackOps.resolveChannelAllowlist); const resolveUserAllowlistLazy = createLazyRuntimeMethod< RuntimeSlackOps, Parameters, ReturnType >(loadRuntimeSlackOps, (runtimeSlackOps) => runtimeSlackOps.resolveUserAllowlist); const sendMessageSlackLazy = createLazyRuntimeMethod< RuntimeSlackOps, Parameters, ReturnType >(loadRuntimeSlackOps, (runtimeSlackOps) => runtimeSlackOps.sendMessageSlack); const monitorSlackProviderLazy = createLazyRuntimeMethod< RuntimeSlackOps, Parameters, ReturnType >(loadRuntimeSlackOps, (runtimeSlackOps) => runtimeSlackOps.monitorSlackProvider); const handleSlackActionLazy = createLazyRuntimeMethod< RuntimeSlackOps, Parameters, ReturnType >(loadRuntimeSlackOps, (runtimeSlackOps) => runtimeSlackOps.handleSlackAction); export function createRuntimeSlack(): PluginRuntimeChannel["slack"] { return { listDirectoryGroupsLive: listDirectoryGroupsLiveLazy, listDirectoryPeersLive: listDirectoryPeersLiveLazy, probeSlack: probeSlackLazy, resolveChannelAllowlist: resolveChannelAllowlistLazy, resolveUserAllowlist: resolveUserAllowlistLazy, sendMessageSlack: sendMessageSlackLazy, monitorSlackProvider: monitorSlackProviderLazy, handleSlackAction: handleSlackActionLazy, }; }