# 陸上アカデミア アカウント地図（Layer 1: 認証・ログイン実測情報）
# 2026-04-23 確定版。AI と内川様が「どのアカウントで何を操作するか」の正。
# 月 1 回以上の頻度で実測再検証する（scripts/cron/account_health_audit.py）。

last_verified_at: "2026-04-23T13:50:00+09:00"
verified_by: "AI 実測（API 経由で全 SaaS に疎通確認）"

google_ads:
  # rikuaca@gmail.com がアクセス可能な customer 2 件
  accessible_customers:
    - customer_id: "2312876887"
      customer_id_ui_format: "231-287-6887"   # Google Ads UI はハイフン区切り表示。数値は同じ
      name: "陸上アカデミア"
      type: "standard"          # 単独アカ（MCC ではない）
      is_active: true
      usage: "実配信アカウント・AI 側 API 経由の mutation 対象"
      ui_direct_url: "https://ads.google.com/aw/overview?__c=2312876887"
      conversions_url: "https://ads.google.com/aw/conversions?__c=2312876887"
    - customer_id: "7112787084"
      customer_id_ui_format: "711-278-7084"
      name: "陸上アカデミア管理"
      type: "mcc"
      is_active: false
      usage: "空の MCC・リンクされたクライアントなし・使用しない（混乱の元なので将来的に削除検討）"
      ui_direct_url: "https://ads.google.com/aw/overview?__c=7112787084"
      warning: "ここを開いても CV action は表示されない。2312876887 を直接開くこと"

  # 設定ファイルとの突合
  api_config_file: "部署/営業部/成果物/ads-ai-ops/config/.env"
  api_login_customer_id: "2312876887"    # GOOGLE_LOGIN_CUSTOMER_ID
  api_customer_id: "2312876887"          # GOOGLE_CUSTOMER_ID（単独アカなので同値）

  # ログイン可能な Google アカウント
  login_emails:
    - email: "rikuaca@gmail.com"
      role: "owner"
      access_scope: ["2312876887", "7112787084"]

  # 既知の API 制約
  api_constraints:
    conversion_action_immutable_fields:
      - "primary_for_goal"
      - "include_in_conversions_metric"
    reason: "Google Ads API v23 で immutable。UI 手動変更のみ可能"
    ui_operation_url: "https://ads.google.com/aw/conversions?__c=2312876887"

yahoo_ads:
  # LINEヤフー広告
  accounts:
    - account_id: "1450626"
      name: "【陸上アカデミア】"
      type: "standard"          # isMccAccount: FALSE
      status: "SERVING"
      delivery_status: "PAUSED"  # 2026-04-23 時点
      start_date: "2026-04-01"
      authorization_business_id: "avail25139spence"
      usage: "実配信アカウント・API の payload accountIds に指定"
    - account_id: "1002794106"
      name: "合同会社ボディメイクラボ（MCC）"
      type: "mcc"
      usage: "API の x-z-base-account-id ヘッダ専用・payload には使わない"

  business_id: "avail25139spence"
  login_email: "rikuaca.business@gmail.com"    # 2026-04-22 転送設定済→ rikuaca@gmail.com に届く
  api_config_file: "部署/調査分析部/scripts/yahoo_ads_config.json"
  api_app_id: "1076604"                        # Yahoo! デベロッパー アプリID（旧）
  api_client_id: "connect-business 発行（596cc6...78ca）"  # 新・実稼働中
  api_scope: "yahooads"
  ui_urls:
    top: "https://ads.yahoo.co.jp/"
    app_manage: "https://e.developer.yahoo.co.jp/dashboard/app.info/1076604"
    connect_business: "https://connect-business.yahoo.co.jp/cooperation"

meta_ads:
  # メタ広告アカウント
  status: "新規作成必要（旧 FB アカウント乗っ取り済）"
  login_emails: []
  note: "2026-04 時点で Meta 広告アカウント未作成。内川様の手動再作成待ち"

stripe:
  # 決済
  buy_urls:
    fe_4980: "https://buy.stripe.com/14A14o6p6bRP7ZZ9fb33W0o"
    rao_minimum_98000: "https://buy.stripe.com/fZu4gAbJqf41a87dvr33W0q"
    ai_coach_2980: "https://buy.stripe.com/aFa4gAaFm8FD4NNezv33W0u"
    rao_normal_255000: "https://buy.stripe.com/8x23cw7tadZX3JJ8b733W0r"
    rao_platinum_637500: "https://buy.stripe.com/6oUaEY14M4pn5RRcrn33W0s"

cloudflare:
  # Workers と Pages
  workers:
    - name: "gclid-logger"
      url: "https://gclid-logger.rikuaca.workers.dev"
      src: "部署/営業部/成果物/workers/gclid-logger"
      usage: "LP CTA クリック時の gclid 蓄積。OCI アップロードの元データ"
      admin_token_file: "credentials/gclid_logger.env"
    - name: "referral-discount"
      src: "部署/営業部/成果物/referral-discount"
      usage: "紹介キャンペーン"
    - name: "coach-guide-bot"
      src: "部署/教務部/output/coach-guide-bot"
      usage: "コーチ指導ガイド Bot"
    - name: "ai-coach (KV 版)"
      usage: "AI コーチ MVP"
  pages:
    - name: "rikuaca-docs"
      url: "https://rikuaca-docs.pages.dev/"
    - name: "rikuaca-viewer"
      url: "https://rikuaca-viewer.pages.dev/"

wordpress:
  site_url: "https://rikujou-ac.com"
  admin_user: "rikuaca-uchikawa"
  api_config_file: "部署/マーケティング部/scripts/wp_config.json"
  rest_api_base: "https://rikujou-ac.com/wp-json/wp/v2"
  lp_trial_006_ad_id: 28827
  code_snippets_api: "https://rikujou-ac.com/wp-json/code-snippets/v1/snippets"

proline:
  # プロライン（LINE 配信管理）
  url: "https://autosns.jp/"
  line_official_account: "@620xvxfj"
  accounts:
    - id: "FeSUEf5QbT"
      name: "【陸上アカデミア】"
      usage: "本アカ・実配信"
    - id: "wEj6oUafM4"
      name: "子1：【公式】陸上アカデミア"
      usage: "サブアカ"
    - id: "DadsLBvYPi"
      name: "【陸アカ】体験レッスン用"
      usage: "サブアカ・未使用"
  login_method: "Playwright 自動ログイン（scripts/cron/run_proline_fetch.py）"
  note: "API/webhook なし・ブラウザ操作のみ（reference_proline_automation.md）"

telegram_bots:
  - bot_id: "8719140146"
    name: "rikuaca_coaching_bot"
    username: "陸アコーチング"
    monitored_by_uchikawa: true
    usage:
      - "scripts/cv_monitor.py（CV発生通知）"
      - "scripts/daily_ads_analysis.py（朝9時レポート）"
      - "scripts/cron/mutation_dispatcher.py（Mutation Plan Review ACK）"
      - "scripts/cron/run_trust_audit.py（信頼監査 Stop hook）"
    token_hardcoded_at:
      - "scripts/cv_monitor.py L12"
      - "scripts/daily_ads_analysis.py L43"
      - "scripts/cron/mutation_dispatcher.py L71"
      - "scripts/cron/run_trust_audit.py L51"
    issue: "token がコード直書きで git 管理下に露出。環境変数化は内川様手動 protect で要実施"
    critical_conflict: "複数スクリプトが同じ Bot を getUpdates すると競合。Claude Code 公式 Telegram プラグインも同 Bot で polling→ ACK 消化問題（2026-04-23 発覚）"
  - bot_id: "8727394298"
    name: "senda_telegram_bot"
    monitored_by_uchikawa: false
    usage:
      - "scripts/senda_telegram_bot.py（別 Bot・別用途）"

gmail:
  primary_account: "rikuaca@gmail.com"
  mcp_connected_to: "rikuaca@gmail.com"
  secondary_account: "rikuaca.business@gmail.com"
  forward_setup:
    direction: "rikuaca.business@gmail.com → rikuaca@gmail.com"
    configured_at: "2026-04-22"
    status: "active"

# 将来追加予定
# - Notion workspace
# - Google Drive / Gmail ラベル設計
# - BAND アカウント
# - 各種 SaaS の 2FA バックアップコード保管場所
