def list_sync(api, instance="", **params):
    # type (ApiClient, str) -> list[dict[str]]
    """
    list all the communities of an instance. If no instance is provided , all the communities

    Args:
        api: the ApiClient instance to use for requests
        instance: the instance id
        **params: optional  dictionary of search parameters as defined in https://api.lumapps.com/docs/community/list
        
    Returns: 
        list: a list of Lumapps Community resources
    """
    if not params:
        params = dict()

    if not params.get("fields", None):
        params[
            "fields"
        ] = "cursor,items(adminKeys,instance,status,title,type,uid,userKeys,authorId, description)"

    if not params.get("body", None):
        params["body"] = {"lang": "en"}
        if instance:
            params["body"]["instanceId"] = instance

    result = api.get_call("community", "list", **params)
    return result