// Copyright (c) 2025 ObjectStack. Licensed under the Apache-2.0 license.

/**
 * Auto-generated by 'os i18n extract' for locale 'ja-JP'.
 * Edit translations in place; re-run extract (with --merge) to fill new gaps.
 * Do not hand-edit the structure — only the leaf string values.
 */

import type { TranslationData } from '@objectstack/spec/system';

export const jaJPObjects: NonNullable<TranslationData['objects']> = {
  sys_webhook: {
    label: "Webhook",
    pluralLabel: "Webhook",
    description: "送信 HTTP Webhook サブスクリプション。defineWebhook() またはスタジオエディタで作成し、HTTP コネクタプラグインが実行します。",
    fields: {
      id: {
        label: "Webhook ID"
      },
      name: {
        label: "名前",
        help: "一意の snake_case 名 — ログおよび監査で参照"
      },
      label: {
        label: "表示名"
      },
      object_name: {
        label: "オブジェクト",
        help: "このウェブフックを発火するイベントのオブジェクト短縮名（空白 = 手動 / API トリガー）"
      },
      triggers: {
        label: "トリガー",
        help: "カンマ区切りのイベントリスト: create,update,delete,undelete,api"
      },
      url: {
        label: "ターゲット URL",
        help: "POST を受信する外部エンドポイント"
      },
      method: {
        label: "HTTP メソッド",
        help: "GET / POST / PUT / PATCH / DELETE"
      },
      description: {
        label: "説明"
      },
      active: {
        label: "有効",
        help: "無効にするとディスパッチャにスキップされます"
      },
      definition_json: {
        label: "定義",
        help: "シリアライズされた Webhook JSON（@objectstack/spec/automation/webhook 参照）— ヘッダー/認証/リトライ/ペイロード設定を含む"
      },
      created_at: {
        label: "作成日時"
      },
      updated_at: {
        label: "更新日時"
      }
    },
    _views: {
      active: {
        label: "有効"
      },
      inactive: {
        label: "無効"
      },
      by_object: {
        label: "オブジェクト別"
      },
      all_webhooks: {
        label: "すべて"
      }
    }
  },
  sys_webhook_delivery: {
    label: "Webhook Delivery",
    pluralLabel: "Webhook Deliveries",
    description: "Durable outbox row for one webhook attempt. Managed by @objectstack/plugin-webhooks; do not write directly.",
    fields: {
      id: {
        label: "Delivery ID",
        help: "UUID — also doubles as the receiver-side idempotency key"
      },
      webhook_id: {
        label: "Webhook ID",
        help: "FK to sys_webhook.id (loosely coupled — denormalised URL/secret on row)"
      },
      event_id: {
        label: "Event ID",
        help: "Source event id; UNIQUE(event_id, webhook_id) for dedup"
      },
      event_type: {
        label: "Event Type",
        help: "e.g. data.record.created"
      },
      url: {
        label: "Target URL",
        help: "Snapshotted at enqueue so config edits do not rewrite live rows"
      },
      method: {
        label: "Method"
      },
      headers_json: {
        label: "Headers JSON"
      },
      secret: {
        label: "HMAC Secret"
      },
      timeout_ms: {
        label: "Timeout (ms)"
      },
      payload_json: {
        label: "Payload JSON"
      },
      partition_key: {
        label: "Partition",
        help: "hash(webhook_id) mod partitionCount — precomputed for cheap WHERE"
      },
      status: {
        label: "Status",
        help: "pending | in_flight | success | failed | dead"
      },
      attempts: {
        label: "Attempts",
        help: "Number of POST attempts made so far"
      },
      claimed_by: {
        label: "Claimed By"
      },
      claimed_at: {
        label: "Claimed At (ms)"
      },
      next_retry_at: {
        label: "Next Retry At (ms)"
      },
      last_attempted_at: {
        label: "Last Attempted At (ms)"
      },
      response_code: {
        label: "HTTP Status"
      },
      response_body: {
        label: "Response Body (capped)"
      },
      error: {
        label: "Error"
      },
      created_at: {
        label: "Created At (ms)"
      },
      updated_at: {
        label: "Updated At (ms)"
      }
    },
    _views: {
      recent: {
        label: "Recent"
      },
      failures: {
        label: "Failures"
      },
      in_flight: {
        label: "In Flight"
      },
      pending: {
        label: "Pending"
      },
      by_status: {
        label: "By Status"
      },
      by_webhook: {
        label: "By Webhook"
      },
      all_deliveries: {
        label: "All"
      }
    },
    _actions: {
      redeliver: {
        label: "Redeliver",
        confirmText: "Replay this delivery? The receiver will get the original payload again — they must be idempotent on the X-Objectstack-Delivery header.",
        successMessage: "Queued for redelivery"
      }
    }
  }
};
