export async function runtimeRawCall(input) {
    const binding = input.methodLookup[input.methodId];
    if (!binding) {
        throw input.createMethodNotAllowlistedError(input.methodId);
    }
    input.assertMethodAvailable(binding.moduleKey, binding.methodKey);
    return input.invokeWithClient(async (client) => {
        const module = client[binding.moduleKey];
        const method = module[binding.methodKey];
        if (typeof method !== 'function') {
            throw input.createMethodNotImplementedError(binding.moduleKey, binding.methodKey);
        }
        if (binding.stream) {
            return method(input.request, input.options);
        }
        return method(input.request, input.options);
    });
}
//# sourceMappingURL=runtime-raw-call.js.map