import json


def _ft_gen_texbundle_json_bundled(
        b64bytes:bytes,
        entryfile='main.tex',
        worker='xelatex',
        timeout=60) -> str:
    """
    Generate json bundle (bundled style) from base64 bytes and given metadata
    as api_1_0.

    Written to use json.dumps()

    :returns: JSON-formatted bundle string
    :rtype: str
    """


    return json.dumps(
        dict(
            request=dict(
                worker=worker,
                timeout=timeout, 
                entryfile=entryfile,
                ),
            type='bundle',
            content=dict(
                content_type='base64',
                content=b64bytes.decode('UTF-8'),
                ),
            )
        )