#!/usr/bin/env python3
from __future__ import annotations

from _common import build_auth_parser, dump, tenant_access_token


def main() -> int:
    parser = build_auth_parser("Get Feishu tenant access token")
    args = parser.parse_args()
    token = tenant_access_token(args.app_id, args.app_secret)
    dump({"tenant_access_token": token})
    return 0


if __name__ == "__main__":
    raise SystemExit(main())
