from __future__ import annotations

import json
import os
import sys

sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))

from worklib import admin_data
from worklib.graphql_client import DEFAULT_COMPANY_ID, execute_graphql


def main() -> None:
    token = admin_data.get_access_token_from_env()
    query = """
query __placeTypeEnum {
  __type(name: "PlaceType") {
    kind
    enumValues { name }
  }
}
""".strip()
    resp = execute_graphql(query=query, variables=None, company_id=DEFAULT_COMPANY_ID, access_token=token)
    print(json.dumps(resp, ensure_ascii=False, indent=2))


if __name__ == "__main__":
    main()

